aboutsummaryrefslogtreecommitdiff
path: root/test/latex-reader.native
AgeCommit message (Collapse)AuthorFilesLines
2020-11-26LaTeX reader: preserve center environment (#6852)Igor Pashev1-13/+26
The contents of the `center` environment are put in a `Div` with class `center`.
2020-04-15Use the new builders, modify readers to preserve empty headersdespresc1-3/+1
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
2020-04-15Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessorsdespresc1-11/+11
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc1-25/+36
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Implement the new Table typedespresc1-11/+30
2017-07-12Make sure \write18 is parsed as raw LaTeX.John MacFarlane1-1/+1
The change is in the LaTeX reader's treatment of raw commands, but it also affects the Markdown reader.
2017-07-07Rewrote LaTeX reader with proper tokenization.John MacFarlane1-1/+1
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.
2017-05-15Added support for horizontal spacing in LaTeX: parse \, to \8198 (six-per-em ↵Henri Werth1-2/+2
space)
2017-02-22When parsing raw LaTeX commands, include trailing space.John MacFarlane1-1/+1
Otherwise things like `\noindent foo` break and turn into `\noindentfoo`. Affects `-f latex+raw_tex` and `-f markdown` (and other formats that allow `raw_tex`). Closes #1773.
2017-02-04Moved tests/ -> test/.John MacFarlane1-0/+375