git.iko.soy/typeable/pandoc
on rc/2.8.0.1 help sign in
289 lines 5.0 kB history raw
1List-table with header-rows and widths options.
3```
4% pandoc -f rst
5.. list-table:: Frozen Delights!
6 :widths: 15 10 30
7 :header-rows: 1
9 * - Treat
10 - Quantity
11 - Description
12 * - Albatross
13 - 2.99
14 - On a stick!
15 * - Crunchy Frog
16 - 1.49
17 - If we took the bones out, it wouldn't be
18 crunchy, now would it?
19 * - Gannet Ripple
20 - 1.99
21 - On a stick!
22^D
23<table>
24<caption>Frozen Delights!</caption>
25<colgroup>
26<col style="width: 27%" />
27<col style="width: 18%" />
28<col style="width: 54%" />
29</colgroup>
30<thead>
31<tr class="header">
32<th>Treat</th>
33<th>Quantity</th>
34<th>Description</th>
35</tr>
36</thead>
37<tbody>
38<tr class="odd">
39<td>Albatross</td>
40<td>2.99</td>
41<td>On a stick!</td>
42</tr>
43<tr class="even">
44<td>Crunchy Frog</td>
45<td>1.49</td>
46<td>If we took the bones out, it wouldn't be crunchy, now would it?</td>
47</tr>
48<tr class="odd">
49<td>Gannet Ripple</td>
50<td>1.99</td>
51<td>On a stick!</td>
52</tr>
53</tbody>
54</table>
55```
57List-table whose widths is "auto".
59```
60% pandoc -f rst
61.. list-table:: Frozen Delights!
62 :header-rows: 1
63 :widths: auto
65 * - Treat
66 - Quantity
67 - Description
68 * - Albatross
69 - 2.99
70 - On a stick!
71 * - Crunchy Frog
72 - 1.49
73 - If we took the bones out, it wouldn't be
74 crunchy, now would it?
75 * - Gannet Ripple
76 - 1.99
77 - On a stick!
78^D
79<table>
80<caption>Frozen Delights!</caption>
81<thead>
82<tr class="header">
83<th>Treat</th>
84<th>Quantity</th>
85<th>Description</th>
86</tr>
87</thead>
88<tbody>
89<tr class="odd">
90<td>Albatross</td>
91<td>2.99</td>
92<td>On a stick!</td>
93</tr>
94<tr class="even">
95<td>Crunchy Frog</td>
96<td>1.49</td>
97<td>If we took the bones out, it wouldn't be crunchy, now would it?</td>
98</tr>
99<tr class="odd">
100<td>Gannet Ripple</td>
101<td>1.99</td>
102<td>On a stick!</td>
103</tr>
104</tbody>
105</table>
106```
109List-table with header-rows which is bigger than 1. Only the first row is treated as a header.
111```
112% pandoc -f rst
113.. list-table:: Frozen Delights!
114 :header-rows: 2
116 * - Treat
117 - Quantity
118 - Description
119 * - Albatross
120 - 2.99
121 - On a stick!
122 * - Crunchy Frog
123 - 1.49
124 - If we took the bones out, it wouldn't be
125 crunchy, now would it?
126 * - Gannet Ripple
127 - 1.99
128 - On a stick!
129^D
130<table>
131<caption>Frozen Delights!</caption>
132<thead>
133<tr class="header">
134<th>Treat</th>
135<th>Quantity</th>
136<th>Description</th>
137</tr>
138</thead>
139<tbody>
140<tr class="odd">
141<td>Albatross</td>
142<td>2.99</td>
143<td>On a stick!</td>
144</tr>
145<tr class="even">
146<td>Crunchy Frog</td>
147<td>1.49</td>
148<td>If we took the bones out, it wouldn't be crunchy, now would it?</td>
149</tr>
150<tr class="odd">
151<td>Gannet Ripple</td>
152<td>1.99</td>
153<td>On a stick!</td>
154</tr>
155</tbody>
156</table>
157```
159List-table without header-rows.
161```
162% pandoc -f rst
163.. list-table:: Frozen Delights!
165 * - Albatross
166 - 2.99
167 - On a stick!
168 * - Crunchy Frog
169 - 1.49
170 - If we took the bones out, it wouldn't be
171 crunchy, now would it?
172 * - Gannet Ripple
173 - 1.99
174 - On a stick!
175^D
176<table>
177<caption>Frozen Delights!</caption>
178<tbody>
179<tr class="odd">
180<td>Albatross</td>
181<td>2.99</td>
182<td>On a stick!</td>
183</tr>
184<tr class="even">
185<td>Crunchy Frog</td>
186<td>1.49</td>
187<td>If we took the bones out, it wouldn't be crunchy, now would it?</td>
188</tr>
189<tr class="odd">
190<td>Gannet Ripple</td>
191<td>1.99</td>
192<td>On a stick!</td>
193</tr>
194</tbody>
195</table>
196```
198List-table with empty cells. You need a space after '-', otherwise the row will disappear. Parser for Bulletlists causes this restriction.
200```
201% pandoc -f rst
202.. list-table:: Frozen Delights!
203 :header-rows: 2
205 * - Treat
206 - Quantity
207 - Description
208 * - Albatross
209 - 2.99
210 -
211 * - Crunchy Frog
212 -
213 - If we took the bones out, it wouldn't be
214 crunchy, now would it?
215 * - Gannet Ripple
216 - 1.99
217 - On a stick!
218^D
219<table>
220<caption>Frozen Delights!</caption>
221<thead>
222<tr class="header">
223<th>Treat</th>
224<th>Quantity</th>
225<th>Description</th>
226</tr>
227</thead>
228<tbody>
229<tr class="odd">
230<td>Albatross</td>
231<td>2.99</td>
232<td></td>
233</tr>
234<tr class="even">
235<td>Crunchy Frog</td>
236<td></td>
237<td>If we took the bones out, it wouldn't be crunchy, now would it?</td>
238</tr>
239<tr class="odd">
240<td>Gannet Ripple</td>
241<td>1.99</td>
242<td>On a stick!</td>
243</tr>
244</tbody>
245</table>
246```
248List-table with a cell having a bulletlist
250```
251% pandoc -f rst
252.. list-table:: Frozen Delights!
254 * - Albatross
255 - 2.99
256 - + On a stick!
257 + In a cup!
258 * - Crunchy Frog
259 - 1.49
260 - If we took the bones out, it wouldn't be
261 crunchy, now would it?
262 * - Gannet Ripple
263 - 1.99
264 - On a stick!
265^D
266<table>
267<caption>Frozen Delights!</caption>
268<tbody>
269<tr class="odd">
270<td>Albatross</td>
271<td>2.99</td>
272<td><ul>
273<li>On a stick!</li>
274<li>In a cup!</li>
275</ul></td>
276</tr>
277<tr class="even">
278<td>Crunchy Frog</td>
279<td>1.49</td>
280<td>If we took the bones out, it wouldn't be crunchy, now would it?</td>
281</tr>
282<tr class="odd">
283<td>Gannet Ripple</td>
284<td>1.99</td>
285<td>On a stick!</td>
286</tr>
287</tbody>
288</table>
289```