diff options
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 4 | ||||
m--------- | templates | 10 | ||||
-rw-r--r-- | tests/writer.context | 75 |
3 files changed, 44 insertions, 45 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 01b2cd601..b59b71cf0 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -214,8 +214,8 @@ defListItemToConTeXt :: ([Inline], [[Block]]) -> State WriterState Doc defListItemToConTeXt (term, defs) = do term' <- inlineListToConTeXt term def' <- liftM vsep $ mapM blockListToConTeXt defs - return $ "\\startdescr" <> braces term' $$ nest 2 def' $$ - "\\stopdescr" <> blankline + return $ "\\startdescription" <> braces term' $$ nest 2 def' $$ + "\\stopdescription" <> blankline -- | Convert list of block elements to ConTeXt. blockListToConTeXt :: [Block] -> State WriterState Doc diff --git a/templates b/templates -Subproject aa479cad5b23fc4c95c379b5a57d77239d9e809 +Subproject 939e3e151bdc9de5ee0247f0bc29d16fc4d4bb6 diff --git a/tests/writer.context b/tests/writer.context index 6450f18c7..874702ef3 100644 --- a/tests/writer.context +++ b/tests/writer.context @@ -14,10 +14,9 @@ \setuphead[subsection][style=\tfb] \setuphead[subsubsection][style=\bf] -% define descr (for definition lists) -\definedescription[descr][ - headstyle=bold,style=normal,align=left,location=hanging, - width=broad,margin=1cm] +% define description (for definition lists) +\definedescription[description][ + headstyle=bold,style=normal,location=hanging,width=broad,margin=1cm] % prevent orphaned list intros \setupitemize[autointro] @@ -439,55 +438,55 @@ B. Williams Tight using spaces: -\startdescr{apple} +\startdescription{apple} red fruit -\stopdescr +\stopdescription -\startdescr{orange} +\startdescription{orange} orange fruit -\stopdescr +\stopdescription -\startdescr{banana} +\startdescription{banana} yellow fruit -\stopdescr +\stopdescription Tight using tabs: -\startdescr{apple} +\startdescription{apple} red fruit -\stopdescr +\stopdescription -\startdescr{orange} +\startdescription{orange} orange fruit -\stopdescr +\stopdescription -\startdescr{banana} +\startdescription{banana} yellow fruit -\stopdescr +\stopdescription Loose: -\startdescr{apple} +\startdescription{apple} red fruit -\stopdescr +\stopdescription -\startdescr{orange} +\startdescription{orange} orange fruit -\stopdescr +\stopdescription -\startdescr{banana} +\startdescription{banana} yellow fruit -\stopdescr +\stopdescription Multiple blocks with italics: -\startdescr{{\em apple}} +\startdescription{{\em apple}} red fruit contains seeds, crisp, pleasant to taste -\stopdescr +\stopdescription -\startdescr{{\em orange}} +\startdescription{{\em orange}} orange fruit \starttyping @@ -497,45 +496,45 @@ Multiple blocks with italics: \startblockquote orange block quote \stopblockquote -\stopdescr +\stopdescription Multiple definitions, tight: -\startdescr{apple} +\startdescription{apple} red fruit computer -\stopdescr +\stopdescription -\startdescr{orange} +\startdescription{orange} orange fruit bank -\stopdescr +\stopdescription Multiple definitions, loose: -\startdescr{apple} +\startdescription{apple} red fruit computer -\stopdescr +\stopdescription -\startdescr{orange} +\startdescription{orange} orange fruit bank -\stopdescr +\stopdescription Blank line after term, indented marker, alternate markers: -\startdescr{apple} +\startdescription{apple} red fruit computer -\stopdescr +\stopdescription -\startdescr{orange} +\startdescription{orange} orange fruit \startitemize[n][stopper=.] @@ -544,7 +543,7 @@ Blank line after term, indented marker, alternate markers: \item sublist \stopitemize -\stopdescr +\stopdescription \subject{HTML Blocks} |