git.iko.soy/typeable/pandoc
on master help sign in
Use {} around ctable caption. Closes #445.
commit60fb915351c22bea339dbce503a03c691c793f6b authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 12 Mar 2012, 11:06 (15 years ago) parent1202f01
2 files changed+4−4
src/Text/Pandoc/Writers/LaTeX.hs+1−1 tests/tables.latex+3−3
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -372,7 +372,7 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
372372 captionText <- inlineListToLaTeX caption
373373 let capt = if isEmpty captionText
374374 then empty
375− else text "caption = " <> captionText <> "," <> space
375+ else text "caption = {" <> captionText <> "}," <> space
376376 rows' <- mapM (tableRowToLaTeX False aligns widths) rows
377377 let rows'' = intersperse ("\\\\\\noalign{\\medskip}") rows'
378378 tableNotes <- liftM (reverse . stTableNotes) get
tests/tables.latex+3−3
@@ -1,6 +1,6 @@
11Simple table with caption:
22
3−\ctable[caption = Demonstration of simple table syntax.,
3+\ctable[caption = {Demonstration of simple table syntax.},
44pos = H, center, botcap]{rlcl}
55{% notes
66}
@@ -35,7 +35,7 @@ Right & Left & Center & Default
3535
3636Simple table indented two spaces:
3737
38−\ctable[caption = Demonstration of simple table syntax.,
38+\ctable[caption = {Demonstration of simple table syntax.},
3939pos = H, center, botcap]{rlcl}
4040{% notes
4141}
@@ -53,7 +53,7 @@ Right & Left & Center & Default
5353
5454Multiline table with caption:
5555
56−\ctable[caption = Here's the caption. It may span multiple lines.,
56+\ctable[caption = {Here's the caption. It may span multiple lines.},
5757pos = H, center, botcap]{clrl}
5858{% notes
5959}