aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorTG <tarik.graba@telecom-paristech.fr>2019-01-10 17:21:01 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2019-02-09 08:20:56 -0800
commit8fdeae2872d76e0d6cd996d595aa22d259074a91 (patch)
tree5c80cc075c4888ec13929f1ef2aae31846872a01 /src/Text
parentb8eeb0f4daeecdbed8ec077defd5114e731da06c (diff)
downloadpandoc-8fdeae2872d76e0d6cd996d595aa22d259074a91.tar.gz
AsciiDoc Writer: DisplayMath as asciidoc latexmath block
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/AsciiDoc.hs5
1 files changed, 4 insertions, 1 deletions
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