From 8fdeae2872d76e0d6cd996d595aa22d259074a91 Mon Sep 17 00:00:00 2001 From: TG Date: Thu, 10 Jan 2019 17:21:01 +0100 Subject: AsciiDoc Writer: DisplayMath as asciidoc latexmath block --- src/Text/Pandoc/Writers/AsciiDoc.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index 7b417af47..c156a1908 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -414,7 +414,10 @@ inlineToAsciiDoc _ (Str str) = return $ text $ escapeString str inlineToAsciiDoc _ (Math InlineMath str) = return $ "latexmath:[$" <> text str <> "$]" inlineToAsciiDoc _ (Math DisplayMath str) = - return $ "latexmath:[\\[" <> text str <> "\\]]" + return $ + blankline <> "[latexmath]" $$ "++++" $$ + "\\[" <> text str <> "\\]" + $$ "++++" $$ blankline inlineToAsciiDoc _ il@(RawInline f s) | f == "asciidoc" = return $ text s | otherwise = do -- cgit v1.2.3