Org reader: prefer plain symbols over math symbols

Symbols like `\alpha` are output plain and unemphasized, not as math.

Fixes: #5483
This commit is contained in:
Albert Krewinkel
2019-05-05 14:48:37 +02:00
parent 7e7bc3493e
commit 33e2d46dbe
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -791,7 +791,7 @@ inlineLaTeX = try $ do
cmd <- inlineLaTeXCommand
ils <- (lift . lift) $ parseAsInlineLaTeX cmd
maybe mzero returnF $
parseAsMath cmd `mplus` parseAsMathMLSym cmd `mplus` ils
parseAsMathMLSym cmd `mplus` parseAsMath cmd `mplus` ils
where
parseAsMath :: String -> Maybe Inlines
parseAsMath cs = B.fromList <$> texMathToPandoc cs
+7 -3
View File
@@ -328,9 +328,13 @@ tests =
"\\emph{Emphasis mine}" =?>
para (emph "Emphasis mine")
, "Inline LaTeX math symbol" =:
"\\tau" =?>
para (emph "τ")
, "Inline math symbols" =:
"\\tau \\oplus \\alpha" =?>
para "τα"
, "Inline LaTeX math command" =:
"\\crarr" =?>
para ""
, "Unknown inline LaTeX command" =:
"\\notacommand{foo}" =?>