From 70a7c2446e4f150c49b681040a2489c398931c70 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Wed, 25 Nov 2020 15:49:17 -0800
Subject: Update tests for LaTeX table changes.

---
 test/tables.latex | 144 +++++++++++++-----------------------------------------
 1 file changed, 33 insertions(+), 111 deletions(-)

(limited to 'test/tables.latex')

diff --git a/test/tables.latex b/test/tables.latex
index bb3534f47..38c571ba6 100644
--- a/test/tables.latex
+++ b/test/tables.latex
@@ -49,107 +49,45 @@ Right & Left & Center & Default \\ \addlinespace
 
 Multiline table with caption:
 
-\begin{longtable}[]{@{}clrl@{}}
+\begin{longtable}[]{@{}
+  >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
+  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
+  >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
+  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
 \caption{Here's the caption. It may span multiple lines.}\tabularnewline
 \toprule
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-Centered Header
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-Left Aligned
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-Right Aligned
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Default aligned
-\end{minipage} \\ \addlinespace
+Centered Header & Left Aligned & Right Aligned & Default
+aligned \\ \addlinespace
 \midrule
 \endfirsthead
 \toprule
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-Centered Header
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-Left Aligned
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-Right Aligned
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Default aligned
-\end{minipage} \\ \addlinespace
+Centered Header & Left Aligned & Right Aligned & Default
+aligned \\ \addlinespace
 \midrule
 \endhead
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-First
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-row
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-12.0
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Example of a row that spans multiple lines.
-\end{minipage} \\ \addlinespace
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-Second
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-row
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-5.0
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Here's another one. Note the blank line between rows.
-\end{minipage} \\ \addlinespace
+First & row & 12.0 & Example of a row that spans multiple
+lines. \\ \addlinespace
+Second & row & 5.0 & Here's another one. Note the blank line between
+rows. \\ \addlinespace
 \bottomrule
 \end{longtable}
 
 Multiline table without caption:
 
-\begin{longtable}[]{@{}clrl@{}}
+\begin{longtable}[]{@{}
+  >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
+  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
+  >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
+  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
 \toprule
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-Centered Header
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-Left Aligned
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-Right Aligned
-\end{minipage} &
-\begin{minipage}[b]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Default aligned
-\end{minipage} \\ \addlinespace
+Centered Header & Left Aligned & Right Aligned & Default
+aligned \\ \addlinespace
 \midrule
 \endhead
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-First
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-row
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-12.0
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Example of a row that spans multiple lines.
-\end{minipage} \\ \addlinespace
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-Second
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-row
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-5.0
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Here's another one. Note the blank line between rows.
-\end{minipage} \\ \addlinespace
+First & row & 12.0 & Example of a row that spans multiple
+lines. \\ \addlinespace
+Second & row & 5.0 & Here's another one. Note the blank line between
+rows. \\ \addlinespace
 \bottomrule
 \end{longtable}
 
@@ -166,32 +104,16 @@ Table without column headers:
 
 Multiline table without column headers:
 
-\begin{longtable}[]{@{}clrl@{}}
+\begin{longtable}[]{@{}
+  >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
+  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
+  >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
+  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
 \toprule
 \endhead
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-First
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-row
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-12.0
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Example of a row that spans multiple lines.
-\end{minipage} \\ \addlinespace
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.15}}\centering
-Second
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.14}}\raggedright
-row
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.16}}\raggedleft
-5.0
-\end{minipage} &
-\begin{minipage}[t]{(\columnwidth - 6\tabcolsep) * \real{0.35}}\raggedright
-Here's another one. Note the blank line between rows.
-\end{minipage} \\ \addlinespace
+First & row & 12.0 & Example of a row that spans multiple
+lines. \\ \addlinespace
+Second & row & 5.0 & Here's another one. Note the blank line between
+rows. \\ \addlinespace
 \bottomrule
 \end{longtable}
-- 
cgit v1.2.3

