aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/tables.docxbin42792 -> 49780 bytes
-rw-r--r--tests/docx/tables.native50
-rw-r--r--tests/tables.latex188
3 files changed, 125 insertions, 113 deletions
diff --git a/tests/docx/tables.docx b/tests/docx/tables.docx
index 7dcff8d35..28087ead5 100644
--- a/tests/docx/tables.docx
+++ b/tests/docx/tables.docx
Binary files differ
diff --git a/tests/docx/tables.native b/tests/docx/tables.native
index 2564afcec..cf23cf404 100644
--- a/tests/docx/tables.native
+++ b/tests/docx/tables.native
@@ -1,24 +1,34 @@
[Header 2 ("a-table-with-and-without-a-header-row",[],[]) [Str "A",Space,Str "table,",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "a",Space,Str "header",Space,Str "row"]
,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0]
- [[Para [Str "Name"]]
- ,[Para [Str "Game"]]
- ,[Para [Str "Fame"]]
- ,[Para [Str "Blame"]]]
- [[[Para [Str "Lebron",Space,Str "James"]]
- ,[Para [Str "Basketball"]]
- ,[Para [Str "Very",Space,Str "High"]]
- ,[Para [Str "Leaving",Space,Str "Cleveland"]]]
- ,[[Para [Str "Ryan",Space,Str "Braun"]]
- ,[Para [Str "Baseball"]]
- ,[Para [Str "Moderate"]]
- ,[Para [Str "Steroids"]]]
- ,[[Para [Str "Russell",Space,Str "Wilson"]]
- ,[Para [Str "Football"]]
- ,[Para [Str "High"]]
- ,[Para [Str "Tacky",Space,Str "uniform"]]]]
+ [[Plain [Str "Name"]]
+ ,[Plain [Str "Game"]]
+ ,[Plain [Str "Fame"]]
+ ,[Plain [Str "Blame"]]]
+ [[[Plain [Str "Lebron",Space,Str "James"]]
+ ,[Plain [Str "Basketball"]]
+ ,[Plain [Str "Very",Space,Str "High"]]
+ ,[Plain [Str "Leaving",Space,Str "Cleveland"]]]
+ ,[[Plain [Str "Ryan",Space,Str "Braun"]]
+ ,[Plain [Str "Baseball"]]
+ ,[Plain [Str "Moderate"]]
+ ,[Plain [Str "Steroids"]]]
+ ,[[Plain [Str "Russell",Space,Str "Wilson"]]
+ ,[Plain [Str "Football"]]
+ ,[Plain [Str "High"]]
+ ,[Plain [Str "Tacky",Space,Str "uniform"]]]]
,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
[]
- [[[Para [Str "Sinple"]]
- ,[Para [Str "Table"]]]
- ,[[Para [Str "Without"]]
- ,[Para [Str "Header"]]]]]
+ [[[Plain [Str "Sinple"]]
+ ,[Plain [Str "Table"]]]
+ ,[[Plain [Str "Without"]]
+ ,[Plain [Str "Header"]]]]
+,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
+ []
+ [[[Para [Str "Simple"]
+ ,Para [Str "Multiparagraph"]]
+ ,[Para [Str "Table"]
+ ,Para [Str "Full"]]]
+ ,[[Para [Str "Of"]
+ ,Para [Str "Paragraphs"]]
+ ,[Para [Str "In",Space,Str "each"]
+ ,Para [Str "Cell."]]]]]
diff --git a/tests/tables.latex b/tests/tables.latex
index eb665204d..850629499 100644
--- a/tests/tables.latex
+++ b/tests/tables.latex
@@ -1,166 +1,168 @@
Simple table with caption:
\begin{longtable}[c]{@{}rlcl@{}}
-\caption{Demonstration of simple table syntax.}\\
-\toprule\addlinespace
-Right & Left & Center & Default
-\\\addlinespace
-\midrule\endhead
-12 & 12 & 12 & 12
-\\\addlinespace
-123 & 123 & 123 & 123
-\\\addlinespace
-1 & 1 & 1 & 1
-\\\addlinespace
+\caption{Demonstration of simple table syntax.}\tabularnewline
+\toprule
+Right & Left & Center & Default\tabularnewline
+\midrule
+\endfirsthead
+\toprule
+Right & Left & Center & Default\tabularnewline
+\midrule
+\endhead
+12 & 12 & 12 & 12\tabularnewline
+123 & 123 & 123 & 123\tabularnewline
+1 & 1 & 1 & 1\tabularnewline
\bottomrule
\end{longtable}
Simple table without caption:
\begin{longtable}[c]{@{}rlcl@{}}
-\toprule\addlinespace
-Right & Left & Center & Default
-\\\addlinespace
-\midrule\endhead
-12 & 12 & 12 & 12
-\\\addlinespace
-123 & 123 & 123 & 123
-\\\addlinespace
-1 & 1 & 1 & 1
-\\\addlinespace
+\toprule
+Right & Left & Center & Default\tabularnewline
+\midrule
+\endhead
+12 & 12 & 12 & 12\tabularnewline
+123 & 123 & 123 & 123\tabularnewline
+1 & 1 & 1 & 1\tabularnewline
\bottomrule
\end{longtable}
Simple table indented two spaces:
\begin{longtable}[c]{@{}rlcl@{}}
-\caption{Demonstration of simple table syntax.}\\
-\toprule\addlinespace
-Right & Left & Center & Default
-\\\addlinespace
-\midrule\endhead
-12 & 12 & 12 & 12
-\\\addlinespace
-123 & 123 & 123 & 123
-\\\addlinespace
-1 & 1 & 1 & 1
-\\\addlinespace
+\caption{Demonstration of simple table syntax.}\tabularnewline
+\toprule
+Right & Left & Center & Default\tabularnewline
+\midrule
+\endfirsthead
+\toprule
+Right & Left & Center & Default\tabularnewline
+\midrule
+\endhead
+12 & 12 & 12 & 12\tabularnewline
+123 & 123 & 123 & 123\tabularnewline
+1 & 1 & 1 & 1\tabularnewline
\bottomrule
\end{longtable}
Multiline table with caption:
\begin{longtable}[c]{@{}clrl@{}}
-\caption{Here's the caption. It may span multiple lines.}\\
-\toprule\addlinespace
-\begin{minipage}[b]{0.13\columnwidth}\centering
+\caption{Here's the caption. It may span multiple lines.}\tabularnewline
+\toprule
+\begin{minipage}[b]{0.13\columnwidth}\centering\strut
Centered Header
-\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright\strut
Left Aligned
-\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft\strut
Right Aligned
-\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright\strut
Default aligned
-\end{minipage}
-\\\addlinespace
-\midrule\endhead
-\begin{minipage}[t]{0.13\columnwidth}\centering
+\strut\end{minipage}\tabularnewline
+\midrule
+\endfirsthead
+\toprule
+\begin{minipage}[b]{0.13\columnwidth}\centering\strut
+Centered Header
+\strut\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright\strut
+Left Aligned
+\strut\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft\strut
+Right Aligned
+\strut\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright\strut
+Default aligned
+\strut\end{minipage}\tabularnewline
+\midrule
+\endhead
+\begin{minipage}[t]{0.13\columnwidth}\centering\strut
First
-\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut
row
-\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut
12.0
-\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut
Example of a row that spans multiple lines.
-\end{minipage}
-\\\addlinespace
-\begin{minipage}[t]{0.13\columnwidth}\centering
+\strut\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.13\columnwidth}\centering\strut
Second
-\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut
row
-\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut
5.0
-\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut
Here's another one. Note the blank line between rows.
-\end{minipage}
-\\\addlinespace
+\strut\end{minipage}\tabularnewline
\bottomrule
\end{longtable}
Multiline table without caption:
\begin{longtable}[c]{@{}clrl@{}}
-\toprule\addlinespace
-\begin{minipage}[b]{0.13\columnwidth}\centering
+\toprule
+\begin{minipage}[b]{0.13\columnwidth}\centering\strut
Centered Header
-\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright\strut
Left Aligned
-\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft\strut
Right Aligned
-\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright\strut
Default aligned
-\end{minipage}
-\\\addlinespace
-\midrule\endhead
-\begin{minipage}[t]{0.13\columnwidth}\centering
+\strut\end{minipage}\tabularnewline
+\midrule
+\endhead
+\begin{minipage}[t]{0.13\columnwidth}\centering\strut
First
-\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut
row
-\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut
12.0
-\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut
Example of a row that spans multiple lines.
-\end{minipage}
-\\\addlinespace
-\begin{minipage}[t]{0.13\columnwidth}\centering
+\strut\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.13\columnwidth}\centering\strut
Second
-\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut
row
-\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut
5.0
-\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut
Here's another one. Note the blank line between rows.
-\end{minipage}
-\\\addlinespace
+\strut\end{minipage}\tabularnewline
\bottomrule
\end{longtable}
Table without column headers:
\begin{longtable}[c]{@{}rlcr@{}}
-\toprule\addlinespace
-12 & 12 & 12 & 12
-\\\addlinespace
-123 & 123 & 123 & 123
-\\\addlinespace
-1 & 1 & 1 & 1
-\\\addlinespace
+\toprule
+12 & 12 & 12 & 12\tabularnewline
+123 & 123 & 123 & 123\tabularnewline
+1 & 1 & 1 & 1\tabularnewline
\bottomrule
\end{longtable}
Multiline table without column headers:
\begin{longtable}[c]{@{}clrl@{}}
-\toprule\addlinespace
-\begin{minipage}[t]{0.13\columnwidth}\centering
+\toprule
+\begin{minipage}[t]{0.13\columnwidth}\centering\strut
First
-\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut
row
-\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut
12.0
-\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut
Example of a row that spans multiple lines.
-\end{minipage}
-\\\addlinespace
-\begin{minipage}[t]{0.13\columnwidth}\centering
+\strut\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.13\columnwidth}\centering\strut
Second
-\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut
row
-\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft
+\strut\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut
5.0
-\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright
+\strut\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut
Here's another one. Note the blank line between rows.
-\end{minipage}
-\\\addlinespace
+\strut\end{minipage}\tabularnewline
\bottomrule
\end{longtable}