Skip to content

Commit 6b16f3b

Browse files
authored
Org writer: inline latex envs need newlines (jgm#7259)
Closes jgm#7252 As specified in https://orgmode.org/manual/LaTeX-fragments.html, an inline \begin{}...\end{} LaTeX block must start on a new line.
1 parent dc0e482 commit 6b16f3b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Text/Pandoc/Writers/Org.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ inlineToOrg (Math t str) = do
407407
then "\\(" <> literal str <> "\\)"
408408
else "\\[" <> literal str <> "\\]"
409409
inlineToOrg il@(RawInline f str)
410+
| elem f ["tex", "latex"] && T.isPrefixOf "\\begin" str =
411+
return $ cr <> literal str <> cr
410412
| isRawFormat f = return $ literal str
411413
| otherwise = do
412414
report $ InlineNotRendered il

0 commit comments

Comments
 (0)