mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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}" =?>
|
||||
|
||||
Reference in New Issue
Block a user