git.iko.soy/typeable/pandoc
on master help sign in
Revised latex writer tests to use longtable.
a71ac7cJohn MacFarlane
tests/tables.latex+51−57
@@ -1,64 +1,59 @@
1Simple table with caption:
1Simple table with caption:
2
2
3−\ctable[caption = {Demonstration of simple table syntax.},
3+\begin{longtable}[c]{rlcl}
4−pos = H, center, botcap]{rlcl}
4+\hline\noalign{\medskip}
5−{% notes
6−}
7−{% rows
8−\FL
9Right & Left & Center & Default
5Right & Left & Center & Default
10−\ML
6+\\\noalign{\medskip}
7+\hline\endhead\noalign{\medskip}
1112 & 12 & 12 & 12
812 & 12 & 12 & 12
12\\\noalign{\medskip}
9\\\noalign{\medskip}
13123 & 123 & 123 & 123
10123 & 123 & 123 & 123
14\\\noalign{\medskip}
11\\\noalign{\medskip}
151 & 1 & 1 & 1
121 & 1 & 1 & 1
16−\LL
13+\\\noalign{\medskip}
17−}
14+\hline
15+\noalign{\medskip}
16+\caption{Demonstration of simple table syntax.}
17+\end{longtable}
18
18
19Simple table without caption:
19Simple table without caption:
20
20
21−\ctable[pos = H, center, botcap]{rlcl}
21+\begin{longtable}[c]{rlcl}
22−{% notes
22+\hline\noalign{\medskip}
23−}
24−{% rows
25−\FL
26Right & Left & Center & Default
23Right & Left & Center & Default
27−\ML
24+\\\noalign{\medskip}
25+\hline\endhead\noalign{\medskip}
2812 & 12 & 12 & 12
2612 & 12 & 12 & 12
29\\\noalign{\medskip}
27\\\noalign{\medskip}
30123 & 123 & 123 & 123
28123 & 123 & 123 & 123
31\\\noalign{\medskip}
29\\\noalign{\medskip}
321 & 1 & 1 & 1
301 & 1 & 1 & 1
33−\LL
31+\\\noalign{\medskip}
34−}
32+\hline
33+\end{longtable}
35
34
36Simple table indented two spaces:
35Simple table indented two spaces:
37
36
38−\ctable[caption = {Demonstration of simple table syntax.},
37+\begin{longtable}[c]{rlcl}
39−pos = H, center, botcap]{rlcl}
38+\hline\noalign{\medskip}
40−{% notes
41−}
42−{% rows
43−\FL
44Right & Left & Center & Default
39Right & Left & Center & Default
45−\ML
40+\\\noalign{\medskip}
41+\hline\endhead\noalign{\medskip}
4612 & 12 & 12 & 12
4212 & 12 & 12 & 12
47\\\noalign{\medskip}
43\\\noalign{\medskip}
48123 & 123 & 123 & 123
44123 & 123 & 123 & 123
49\\\noalign{\medskip}
45\\\noalign{\medskip}
501 & 1 & 1 & 1
461 & 1 & 1 & 1
51−\LL
47+\\\noalign{\medskip}
52−}
48+\hline
49+\noalign{\medskip}
50+\caption{Demonstration of simple table syntax.}
51+\end{longtable}
53
52
54Multiline table with caption:
53Multiline table with caption:
55
54
56−\ctable[caption = {Here's the caption. It may span multiple lines.},
55+\begin{longtable}[c]{clrl}
57−pos = H, center, botcap]{clrl}
56+\hline\noalign{\medskip}
58−{% notes
59−}
60−{% rows
61−\FL
62\parbox[b]{0.15\columnwidth}{\centering
57\parbox[b]{0.15\columnwidth}{\centering
63Centered Header
58Centered Header
64} & \parbox[b]{0.14\columnwidth}{\raggedright
59} & \parbox[b]{0.14\columnwidth}{\raggedright
@@ -68,7 +63,8 @@ Right Aligned
68} & \parbox[b]{0.34\columnwidth}{\raggedright
63} & \parbox[b]{0.34\columnwidth}{\raggedright
69Default aligned
64Default aligned
70}
65}
71−\ML
66+\\\noalign{\medskip}
67+\hline\endhead\noalign{\medskip}
72\parbox[t]{0.15\columnwidth}{\centering
68\parbox[t]{0.15\columnwidth}{\centering
73First
69First
74} & \parbox[t]{0.14\columnwidth}{\raggedright
70} & \parbox[t]{0.14\columnwidth}{\raggedright
@@ -88,16 +84,16 @@ row
88} & \parbox[t]{0.34\columnwidth}{\raggedright
84} & \parbox[t]{0.34\columnwidth}{\raggedright
89Here's another one. Note the blank line between rows.
85Here's another one. Note the blank line between rows.
90}
86}
91−\LL
87+\\\noalign{\medskip}
92−}
88+\hline
89+\noalign{\medskip}
90+\caption{Here's the caption. It may span multiple lines.}
91+\end{longtable}
93
92
94Multiline table without caption:
93Multiline table without caption:
95
94
96−\ctable[pos = H, center, botcap]{clrl}
95+\begin{longtable}[c]{clrl}
97−{% notes
96+\hline\noalign{\medskip}
98−}
99−{% rows
100−\FL
101\parbox[b]{0.15\columnwidth}{\centering
97\parbox[b]{0.15\columnwidth}{\centering
102Centered Header
98Centered Header
103} & \parbox[b]{0.14\columnwidth}{\raggedright
99} & \parbox[b]{0.14\columnwidth}{\raggedright
@@ -107,7 +103,8 @@ Right Aligned
107} & \parbox[b]{0.34\columnwidth}{\raggedright
103} & \parbox[b]{0.34\columnwidth}{\raggedright
108Default aligned
104Default aligned
109}
105}
110−\ML
106+\\\noalign{\medskip}
107+\hline\endhead\noalign{\medskip}
111\parbox[t]{0.15\columnwidth}{\centering
108\parbox[t]{0.15\columnwidth}{\centering
112First
109First
113} & \parbox[t]{0.14\columnwidth}{\raggedright
110} & \parbox[t]{0.14\columnwidth}{\raggedright
@@ -127,31 +124,27 @@ row
127} & \parbox[t]{0.34\columnwidth}{\raggedright
124} & \parbox[t]{0.34\columnwidth}{\raggedright
128Here's another one. Note the blank line between rows.
125Here's another one. Note the blank line between rows.
129}
126}
130−\LL
127+\\\noalign{\medskip}
131−}
128+\hline
129+\end{longtable}
132
130
133Table without column headers:
131Table without column headers:
134
132
135−\ctable[pos = H, center, botcap]{rlcr}
133+\begin{longtable}[c]{rlcr}
136−{% notes
134+\hline\noalign{\medskip}
137−}
138−{% rows
139−\FL
14012 & 12 & 12 & 12
13512 & 12 & 12 & 12
141\\\noalign{\medskip}
136\\\noalign{\medskip}
142123 & 123 & 123 & 123
137123 & 123 & 123 & 123
143\\\noalign{\medskip}
138\\\noalign{\medskip}
1441 & 1 & 1 & 1
1391 & 1 & 1 & 1
145−\LL
140+\\\noalign{\medskip}
146−}
141+\hline
142+\end{longtable}
147
143
148Multiline table without column headers:
144Multiline table without column headers:
149
145
150−\ctable[pos = H, center, botcap]{clrl}
146+\begin{longtable}[c]{clrl}
151−{% notes
147+\hline\noalign{\medskip}
152−}
153−{% rows
154−\FL
155\parbox[t]{0.15\columnwidth}{\centering
148\parbox[t]{0.15\columnwidth}{\centering
156First
149First
157} & \parbox[t]{0.14\columnwidth}{\raggedright
150} & \parbox[t]{0.14\columnwidth}{\raggedright
@@ -171,5 +164,6 @@ row
171} & \parbox[t]{0.34\columnwidth}{\raggedright
164} & \parbox[t]{0.34\columnwidth}{\raggedright
172Here's another one. Note the blank line between rows.
165Here's another one. Note the blank line between rows.
173}
166}
174−\LL
167+\\\noalign{\medskip}
175−}
168+\hline
169+\end{longtable}