Permalink
Browse files

Use {} around ctable caption. Closes jgm#445.

  • Loading branch information...
John MacFarlane
John MacFarlane committed Mar 12, 2012
1 parent 1202f01 commit 60fb915351c22bea339dbce503a03c691c793f6b
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/Text/Pandoc/Writers/LaTeX.hs
  2. +3 −3 tests/tables.latex
@@ -372,7 +372,7 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
captionText <- inlineListToLaTeX caption
let capt = if isEmpty captionText
then empty
else text "caption = " <> captionText <> "," <> space
else text "caption = {" <> captionText <> "}," <> space
rows' <- mapM (tableRowToLaTeX False aligns widths) rows
let rows'' = intersperse ("\\\\\\noalign{\\medskip}") rows'
tableNotes <- liftM (reverse . stTableNotes) get
View
@@ -1,6 +1,6 @@
Simple table with caption:
\ctable[caption = Demonstration of simple table syntax.,
\ctable[caption = {Demonstration of simple table syntax.},
pos = H, center, botcap]{rlcl}
{% notes
}
@@ -35,7 +35,7 @@ Right & Left & Center & Default
Simple table indented two spaces:
\ctable[caption = Demonstration of simple table syntax.,
\ctable[caption = {Demonstration of simple table syntax.},
pos = H, center, botcap]{rlcl}
{% notes
}
@@ -53,7 +53,7 @@ Right & Left & Center & Default
Multiline table with caption:
\ctable[caption = Here's the caption. It may span multiple lines.,
\ctable[caption = {Here's the caption. It may span multiple lines.},
pos = H, center, botcap]{clrl}
{% notes
}

0 comments on commit 60fb915

Please sign in to comment.