git.iko.soy/typeable/pandoc
on master help sign in
ConTeXt writer: xtables: correct wrong usage of caption
commit71bbadb7936e68673a46f7391caf446e35c81205 authorHenri Menke <henri@icp.uni-stuttgart.de> dateTue 23 Jan 2018, 09:15 (9 years ago) parentf8640fd
3 files changed+5−5
src/Text/Pandoc/Writers/ConTeXt.hs+1−1 test/Tests/Writers/ConTeXt.hs+1−1 test/tables.context+3−3
src/Text/Pandoc/Writers/ConTeXt.hs+1−1
@@ -267,7 +267,7 @@ blockToConTeXt (Table caption aligns widths heads rows) = do
267267 return $ "\\startplacetable" <> brackets (
268268 if null caption
269269 then "location=none"
270− else "caption=" <> braces captionText
270+ else "title=" <> braces captionText
271271 ) $$ body $$ "\\stopplacetable" <> blankline
272272
273273tableToConTeXt :: PandocMonad m => Tabl -> Doc -> [Doc] -> WM m Doc
test/Tests/Writers/ConTeXt.hs+1−1
@@ -92,7 +92,7 @@ tests = [ testGroup "inline code"
9292 plain $ text "3.3",
9393 plain $ text "3.4"]]
9494 in table caption aligns headers rows
95− =?> unlines [ "\\startplacetable[caption={Table 1}]"
95+ =?> unlines [ "\\startplacetable[title={Table 1}]"
9696 , "\\startTABLE"
9797 , "\\startTABLEhead"
9898 , "\\NC[align=left] Right"
test/tables.context+3−3
@@ -1,6 +1,6 @@
11Simple table with caption:
22
3−\startplacetable[caption={Demonstration of simple table syntax.}]
3+\startplacetable[title={Demonstration of simple table syntax.}]
44\startxtable
55\startxtablehead[head]
66\startxrow
@@ -74,7 +74,7 @@ Simple table without caption:
7474
7575Simple table indented two spaces:
7676
77−\startplacetable[caption={Demonstration of simple table syntax.}]
77+\startplacetable[title={Demonstration of simple table syntax.}]
7878\startxtable
7979\startxtablehead[head]
8080\startxrow
@@ -111,7 +111,7 @@ Simple table indented two spaces:
111111
112112Multiline table with caption:
113113
114−\startplacetable[caption={Here's the caption. It may span multiple lines.}]
114+\startplacetable[title={Here's the caption. It may span multiple lines.}]
115115\startxtable
116116\startxtablehead[head]
117117\startxrow