git.iko.soy/typeable/pandoc
on master help sign in
Texinfo writer: fixed headerless tables.
bc31d9ffiddlosopher
src/Text/Pandoc/Writers/Texinfo.hs+3−1
@@ -191,7 +191,9 @@ blockToTexinfo (Header level lst) = do
191 seccmd _ = error "illegal seccmd level"
191 seccmd _ = error "illegal seccmd level"
192
192
193blockToTexinfo (Table caption aligns widths heads rows) = do
193blockToTexinfo (Table caption aligns widths heads rows) = do
194+ headers <- if all null heads
195+ then return empty
194− headers <- tableHeadToTexinfo aligns heads
196+ else tableHeadToTexinfo aligns heads
195 captionText <- inlineListToTexinfo caption
197 captionText <- inlineListToTexinfo caption
196 rowsText <- mapM (tableRowToTexinfo aligns) rows
198 rowsText <- mapM (tableRowToTexinfo aligns) rows
197 colDescriptors <-
199 colDescriptors <-
tests/tables.texinfo+35
@@ -122,3 +122,38 @@ Second
122 @tab Here's another one. Note the blank line between rows.
122 @tab Here's another one. Note the blank line between rows.
123@end multitable
123@end multitable
124
124
125+Table without column headers:
126+
127+@multitable {123} {123} {123} {123}
128+@item
129+12
130+ @tab 12
131+ @tab 12
132+ @tab 12
133+@item
134+123
135+ @tab 123
136+ @tab 123
137+ @tab 123
138+@item
139+1
140+ @tab 1
141+ @tab 1
142+ @tab 1
143+@end multitable
144+
145+Multiline table without column headers:
146+
147+@multitable @columnfractions 0.15 0.14 0.16 0.34
148+@item
149+First
150+ @tab row
151+ @tab 12.0
152+ @tab Example of a row that spans multiple lines.
153+@item
154+Second
155+ @tab row
156+ @tab 5.0
157+ @tab Here's another one. Note the blank line between rows.
158+@end multitable
159+