git.iko.soy/typeable/pandoc
on master help sign in
Texinfo writer: fixed headerless tables.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1880 788f1e2b-df1e-0410-8736-df70ead52e1b

commitbc31d9fe28db967bf02bc165300f68b5061f8db9 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 13 Mar 2010, 03:19 (17 years ago) parenta34afa9
2 files changed+38−1
src/Text/Pandoc/Writers/Texinfo.hs+3−1 tests/tables.texinfo+35
src/Text/Pandoc/Writers/Texinfo.hs+3−1
@@ -191,7 +191,9 @@ blockToTexinfo (Header level lst) = do
191191 seccmd _ = error "illegal seccmd level"
192192
193193blockToTexinfo (Table caption aligns widths heads rows) = do
194− headers <- tableHeadToTexinfo aligns heads
194+ headers <- if all null heads
195+ then return empty
196+ else tableHeadToTexinfo aligns heads
195197 captionText <- inlineListToTexinfo caption
196198 rowsText <- mapM (tableRowToTexinfo aligns) rows
197199 colDescriptors <-
tests/tables.texinfo+35
@@ -122,3 +122,38 @@ Second
122122 @tab Here's another one. Note the blank line between rows.
123123@end multitable
124124
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+