pandoc/test/command
John MacFarlane 0feb7504b1 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.
2017-07-07 12:36:00 +02:00
..
256.md Added test for #256. 2017-03-16 22:31:36 +01:00
262.md RST reader: support anchors. 2017-06-27 15:03:16 +02:00
512.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
645.md LaTeX writer: don't use lstinline it \item[..]. 2017-04-28 12:03:59 +02:00
853.md RST reader: support RST-style citations. 2017-03-03 22:23:01 +01:00
934.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
982.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
987.md Expand \newenvironment macros. 2017-03-10 09:46:32 +01:00
1166.md RST reader: Handle multiline cells in simple tables. 2017-03-02 16:48:53 +01:00
1279.md Parse YAML metadata in a context that sees footnotes... 2017-03-05 01:36:40 +01:00
1390.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
1592.md Fixed some loose ends in #1592. 2017-03-04 23:01:29 +01:00
1629.md LaTeX writer: Fix problem with escaping in lstinline. 2017-04-29 11:05:44 +02:00
1718.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
1745.md Improved behavior of auto_identifiers when there are explicit ids. 2017-03-12 21:30:04 +01:00
1773.md When parsing raw LaTeX commands, include trailing space. 2017-02-22 21:15:25 +01:00
1841.md Markdown reader: improved parsing of indented raw HTML blocks. 2017-05-06 22:56:16 +02:00
1905.md Better handling of \part in LaTeX. 2017-03-13 22:11:10 +01:00
2118.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
2228.md Markdown reader: fixed smart quotes after emphasis. 2017-05-24 23:23:08 +02:00
2378.md Fixed footnotes in table captions. 2017-06-20 11:21:32 +02:00
2397.md Markdown reader: fixed internal header links. 2017-03-05 16:34:47 +01:00
2434.md OpenDocument writer: fixed dropped elements in some ordered lists. 2017-03-03 22:48:37 +01:00
2602.md Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
2606.md MediaWiki reader: ensure that list starts begin at left margin. 2017-02-21 23:41:32 +01:00
2649.md MediaWiki reader: fixed more table issues. 2017-02-21 21:28:24 +01:00
2662.md RST reader: support scale and align attributes of images. 2017-02-26 23:40:31 +01:00
2834.md Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
2874.md LaTeX writer: fix error with line breaks after empty content. 2017-04-25 15:00:27 +02:00
3113.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3236.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3257.md HTML reader: Better sanity checks on raw HTML. 2017-03-18 22:43:57 +01:00
3309.md Markdown reader: Treat certain environments as inline 2017-03-07 15:00:32 +01:00
3314.md Org reader: support table.el tables 2017-05-03 22:43:34 +02:00
3337.md Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
3348.md Removed failing part of 3348 test. 2017-03-19 20:37:39 +01:00
3401.md Org reader: support macros 2017-05-06 11:00:32 +02:00
3422.md LaTeX writer: Fix problem with escaping in lstinline. 2017-04-29 11:05:44 +02:00
3432.md RST Reader: parse list table directive (#3688) 2017-05-23 20:53:04 +02:00
3432a.md Fixed small bug in RST list parsing. 2017-02-11 20:55:13 +01:00
3450.md Allow em for image height/width in HTML, LaTeX. 2017-05-25 22:48:27 +02:00
3475.md RST reader: implemented implicit internal header links. 2017-02-28 10:32:36 +01:00
3487.md Markdown writer: Avoid spurious blanklines at end of document... 2017-03-08 12:47:39 +01:00
3494.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
3497.md Added test case for #3497. 2017-03-08 12:23:01 +01:00
3499.md Org reader: disallow tables on list marker lines 2017-03-08 15:45:00 +01:00
3510-export.latex Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3510-src.hs Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3510-subdoc.org Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3510.md Org reader: add basic file inclusion mechanism 2017-05-14 12:45:31 +02:00
3512.md Add space_in_atx_header extension. 2017-03-20 21:55:30 +01:00
3516.md Combine grid table parsers 2017-05-11 00:17:56 +02:00
3518.md Improve rendering of superscript in plain output. 2017-03-21 14:43:14 +01:00
3526.md Pipe tables: impose minimum cell size. 2017-03-23 16:54:47 +01:00
3529.md Markdown writer: don't emit a simple table if simple_tables disabled. 2017-03-24 16:11:56 +01:00
3530.md LaTeX reader: add support for LaTeX subfiles package. 2017-03-27 21:20:27 +02:00
3531.md Add blank lines to #3531 command test. 2017-03-26 20:48:54 +02:00
3534.md lstinline with braces can be used (verb cannot be used with braces) (#3535) 2017-03-29 14:49:46 +02:00
3537.md Text.Pandoc.Extensions: Added Ext_raw_attribute. 2017-06-23 00:37:13 +02:00
3558.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
3568.md Man writer: Fix handling of nested font commands. 2017-04-12 12:23:29 +02:00
3570.md Avoid parsing "Notes:**" as a bare URI. 2017-04-15 13:32:28 +02:00
3577.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
3585.md MediaWiki reader: don't do curly quotes inside <tt> contexts. 2017-05-25 09:35:25 +02:00
3587.md Add siunitx Support (#3588) 2017-04-22 21:57:21 +02:00
3596.md HTML reader: Revise treatment of li with id attribute. 2017-04-23 11:03:48 +02:00
3615.md Markdown writer: Case-insensitive reference links. (#3616) 2017-05-02 09:00:37 +02:00
3619.md Markdown writer: better escaping for links (#3628) 2017-05-03 12:19:45 +02:00
3630.md Markdown Writer: put space before reference link definitions 2017-05-03 12:13:25 +02:00
3667.md Textile reader: fix bug for certain links in table cells. 2017-05-15 20:36:11 +02:00
3674.md Markdown: allow attributes in reference links to start on next line. 2017-05-18 13:20:32 +02:00
3675.md RST writer: add empty comments when needed... 2017-05-19 21:05:15 +02:00
3690.md Parsing: Provide parseFromString'. 2017-05-24 22:41:47 +02:00
3701.md Markdown writer: changes to --reference-links. 2017-05-27 23:18:45 +02:00
3706.md Org reader: recognize babel result blocks with attributes 2017-05-31 20:01:04 +02:00
3708.md LaTeX reader: handle escaped & inside table cell. 2017-05-29 22:47:04 +02:00
3715.md Markdown writer: Avoid inline surround-marking with empty content. 2017-06-01 12:30:58 +02:00
3716.md HTML writer: Avoid two class attributes when adding 'uri' class. 2017-06-01 18:41:54 +02:00
3730.md Don't allow backslash + newline to affect block structure. 2017-06-11 22:24:20 +02:00
3736.md Markdown writer: don't allow soft break in header. 2017-06-12 09:23:30 +02:00
3755.md Markdown reader: interpret YAML metadata as Inlines when possible. 2017-06-23 22:31:08 +02:00
3773.md Markdown writer: Ensure that + and - are escaped properly... 2017-06-30 17:41:25 +02:00
3779.md Rewrote LaTeX reader with proper tokenization. 2017-07-07 12:36:00 +02:00
abbrevs Added test for #256. 2017-03-16 22:31:36 +01:00
corrupt.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
dots.md LaTeX reader: Add support for \vdots (#3607) 2017-04-26 12:03:07 +02:00
hspace.md LaTeX reader: allow hspace and vspace to count as raw block or inline. 2017-02-25 12:43:00 +01:00
hyphenat.md LaTeX reader: Add basic support for hyphenat package (#3603) 2017-04-26 12:05:13 +02:00
inkscape-cube.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
latex-fontawesome.md Support for \faCheck and \faClose (#3727) 2017-06-11 07:47:42 +02:00
latex-tabular-column-specs.md LaTeX reader: properly handle column prefixes/suffixes. 2017-02-13 22:39:59 +01:00
lstlisting.md Fix keyval funtion: pandoc did not parse options in braces correctly.… (#3642) 2017-05-06 15:09:29 +02:00
md-abbrevs.md Added a markdown abbrevation test case. 2017-03-05 10:44:25 +01:00
multiple-metadata-blocks.md Markdown reader: Fixed regression on left-biased union for metadata. 2017-03-05 09:28:44 +01:00
parse-raw.md Update command tests to include stderr output. 2017-05-25 11:52:09 +02:00
smart.md More smart escaping tests. 2017-02-04 22:09:19 +01:00
sub-file-chapter-1.tex LaTeX reader: add support for LaTeX subfiles package. 2017-03-27 21:20:27 +02:00
sub-file-chapter-2.tex LaTeX reader: add support for LaTeX subfiles package. 2017-03-27 21:20:27 +02:00
svg.md Allow em for image height/width in HTML, LaTeX. 2017-05-25 22:48:27 +02:00
SVG_logo-without-xml-declaration.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
SVG_logo.svg Improve SVG image size code. 2017-05-20 23:09:08 +02:00
tabularx.md LaTeX reader: handle some width specifiers on table columns. 2017-06-01 12:08:28 +02:00
vars-and-metadata.md Added test case for variables/metadata in Markdown writer. 2017-02-25 23:54:30 +01:00