path: root/pandoc.cabal
diff options
authorJohn MacFarlane <>2017-07-01 19:31:43 +0200
committerJohn MacFarlane <>2017-07-07 12:36:00 +0200
commit0feb7504b1c68cef76b30ea9987e2eae3101714c (patch)
tree6d64b020b93416b6970b4a6d2e59595f82fa405e /pandoc.cabal
parent1dd769e55897757812a1d8188b80c5df7fcb2971 (diff)
Rewrote LaTeX reader with proper tokenization.
This rewrite is primarily motivated by the need to get macros working properly. A side benefit is that the reader is significantly faster (27s -> 19s in one benchmark, and there is a lot of room for further optimization). We now tokenize the input text, then parse the token stream. Macros modify the token stream, so they should now be effective in any context, including math. Thus, we no longer need the clunky macro processing capacities of texmath. A custom state LaTeXState is used instead of ParserState. This, plus the tokenization, will require some rewriting of the exported functions rawLaTeXInline, inlineCommand, rawLaTeXBlock. * Added Text.Pandoc.Readers.LaTeX.Types (new exported module). Exports Macro, Tok, TokType, Line, Column. [API change] * Text.Pandoc.Parsing: adjusted type of `insertIncludedFile` so it can be used with token parser. * Removed old texmath macro stuff from Parsing. Use Macro from Text.Pandoc.Readers.LaTeX.Types instead. * Removed texmath macro material from Markdown reader. * Changed types for Text.Pandoc.Readers.LaTeX's rawLaTeXInline and rawLaTeXBlock. (Both now return a String, and they are polymorphic in state.) * Added orgMacros field to OrgState. [API change] * Removed readerApplyMacros from ReaderOptions. Now we just check the `latex_macros` reader extension. * Allow `\newcommand\foo{blah}` without braces. Fixes #1390. Fixes #2118. Fixes #3236. Fixes #3779. Fixes #934. Fixes #982.
Diffstat (limited to 'pandoc.cabal')
1 files changed, 1 insertions, 0 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index 70475568e..dd92690ce 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -366,6 +366,7 @@ Library
+ Text.Pandoc.Readers.LaTeX.Types,