From 6b16f3bb0d4c3a0ddc051ff9948c67d5cac72bcb Mon Sep 17 00:00:00 2001 From: tecosaur Date: Fri, 30 Apr 2021 16:23:28 +0800 Subject: Org writer: inline latex envs need newlines (#7259) Closes #7252 As specified in https://orgmode.org/manual/LaTeX-fragments.html, an inline \begin{}...\end{} LaTeX block must start on a new line. --- src/Text/Pandoc/Writers/Org.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index d0c9813da..d404f1c8d 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -407,6 +407,8 @@ inlineToOrg (Math t str) = do then "\\(" <> literal str <> "\\)" else "\\[" <> literal str <> "\\]" inlineToOrg il@(RawInline f str) + | elem f ["tex", "latex"] && T.isPrefixOf "\\begin" str = + return $ cr <> literal str <> cr | isRawFormat f = return $ literal str | otherwise = do report $ InlineNotRendered il -- cgit v1.2.3