summaryrefslogtreecommitdiff
path: root/test/latex-reader.latex
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-07-01 19:31:43 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-07-07 12:36:00 +0200
commit0feb7504b1c68cef76b30ea9987e2eae3101714c (patch)
tree6d64b020b93416b6970b4a6d2e59595f82fa405e /test/latex-reader.latex
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 'test/latex-reader.latex')
-rw-r--r--test/latex-reader.latex1
1 files changed, 0 insertions, 1 deletions
diff --git a/test/latex-reader.latex b/test/latex-reader.latex
index 2ebdfed99..7cbcc9672 100644
--- a/test/latex-reader.latex
+++ b/test/latex-reader.latex
@@ -4,7 +4,6 @@
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
-\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
\usepackage[breaklinks=true,unicode=true]{hyperref}
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref: