diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-04 19:18:20 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-04 19:18:20 -0800 |
commit | dac2e9156fffe4cef12271e0284e5f43f5b7e10f (patch) | |
tree | 6077af2f71e6f0ee8d83a775d13a5e69902cbe64 /src/Text/Pandoc/Readers | |
parent | fcbe1e95ebe170aadc6eadd6797ddf7fbb286ef2 (diff) | |
download | pandoc-dac2e9156fffe4cef12271e0284e5f43f5b7e10f.tar.gz |
LaTeX reader: parse macros and apply to math.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 659382772..abec41349 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -150,6 +150,7 @@ block = choice [ hrule , list , blockQuote , commentBlock + , macro , bibliographic , para , itemBlock @@ -726,13 +727,13 @@ endline :: GenParser Char st Inline endline = try $ newline >> notFollowedBy blankline >> return Space -- math -math :: GenParser Char st Inline -math = (math3 >>= return . Math DisplayMath) - <|> (math1 >>= return . Math InlineMath) - <|> (math2 >>= return . Math InlineMath) - <|> (math4 >>= return . Math DisplayMath) - <|> (math5 >>= return . Math DisplayMath) - <|> (math6 >>= return . Math DisplayMath) +math :: GenParser Char ParserState Inline +math = (math3 >>= applyMacros' >>= return . Math DisplayMath) + <|> (math1 >>= applyMacros' >>= return . Math InlineMath) + <|> (math2 >>= applyMacros' >>= return . Math InlineMath) + <|> (math4 >>= applyMacros' >>= return . Math DisplayMath) + <|> (math5 >>= applyMacros' >>= return . Math DisplayMath) + <|> (math6 >>= applyMacros' >>= return . Math DisplayMath) <?> "math" math1 :: GenParser Char st String |