git.iko.soy/typeable/pandoc
on master help sign in
Org reader: prefer plain symbols over math symbols

Symbols like `\alpha` are output plain and unemphasized, not as math. Fixes: #5483

commit33e2d46dbea6ca216b44d2f5d6cf3b74899caef6 authorAlbert Krewinkel <albert@zeitkraut.de> dateSun 5 May 2019, 14:48 (8 years ago) parent7e7bc34
2 files changed+8−4
src/Text/Pandoc/Readers/Org/Inlines.hs+1−1 test/Tests/Readers/Org/Inline.hs+7−3
src/Text/Pandoc/Readers/Org/Inlines.hs+1−1
@@ -791,7 +791,7 @@ inlineLaTeX = try $ do
791791 cmd <- inlineLaTeXCommand
792792 ils <- (lift . lift) $ parseAsInlineLaTeX cmd
793793 maybe mzero returnF $
794− parseAsMath cmd `mplus` parseAsMathMLSym cmd `mplus` ils
794+ parseAsMathMLSym cmd `mplus` parseAsMath cmd `mplus` ils
795795 where
796796 parseAsMath :: String -> Maybe Inlines
797797 parseAsMath cs = B.fromList <$> texMathToPandoc cs
test/Tests/Readers/Org/Inline.hs+7−3
@@ -328,9 +328,13 @@ tests =
328328 "\\emph{Emphasis mine}" =?>
329329 para (emph "Emphasis mine")
330330
331− , "Inline LaTeX math symbol" =:
332− "\\tau" =?>
333− para (emph "τ")
331+ , "Inline math symbols" =:
332+ "\\tau \\oplus \\alpha" =?>
333+ para "τ ⊕ α"
334+
335+ , "Inline LaTeX math command" =:
336+ "\\crarr" =?>
337+ para "↵"
334338
335339 , "Unknown inline LaTeX command" =:
336340 "\\notacommand{foo}" =?>