aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-06-08LaTeX reader: pass through unknown listings language as class.John MacFarlane1-7/+13
Previously if the language was not in the list of listings- supported languages, it would not be added as a class, so custom syntax highlighting could not be used. Closes #5540.
2019-06-04Include trailing {}s in raw latex commands.John MacFarlane1-2/+7
Change is in rawLaTeXInline in LaTeX reader, but it affects the markdown reader and other readers that allow raw LaTeX. Previously, trailing `{}` would be included for unknown commands, but not for known commands. However, they are sometimes used to avoid a trailing space after the command. The chances that a `{}` after a LaTeX command is not part of the command are very small. Closes #5439.
2019-05-03LaTeX reader: Allow newlines in `\mintinline`.John MacFarlane1-3/+7
2019-04-10LaTeX reader: add braces when resolving `\DeclareMathOperator`.John MacFarlane1-1/+2
These seem to be needed for xelatex but not pdflatex. Closes #5441.
2019-03-10LaTeX reader: support `\underline`, `\ul`, `\uline` (#5359)Paul Tilley1-0/+5
These are parsed as a Span with class `underline`, as with other readers.
2019-03-07Add inNote to Footcite and FootcitesJohn MacFarlane1-2/+2
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-01-22LaTeX reader: support `\endinput`. Closes #5233.John MacFarlane1-0/+1
2019-01-20LaTeX reader: allow includes with dots like cc_by_4.0.John MacFarlane1-3/+5
Previously the `.0` was interpreted as a file extension, leading pandoc not to add `.tex` (and thus not to find the file). The new behavior matches tex more closely.
2019-01-20LaTeX reader: cleaned up 'input' code.John MacFarlane1-10/+5
2019-01-08Removed superfluous sourceCode class on code blocks.John MacFarlane1-2/+1
* These were added by the RST reader and, for literate Haskell, by the Markdown and LaTeX readers. There is no point to this class, and it is not applied consistently by all readers. See #5047. * Reverse order of `literate` and `haskell` classes on code blocks when parsing literate Haskell. Better if `haskell` comes first.
2018-12-17LaTeX reader: Support `\DeclareMathOperator`.John MacFarlane1-1/+11
Closes #5149.
2018-11-29LaTeX reader: Support \inputminted (closes #5103).John MacFarlane1-2/+21
2018-11-22Hlint suggestions.John MacFarlane1-1/+1
2018-11-19LaTeX reader: cleaned up handling of dimension arguments.John MacFarlane1-1/+1
Allow decimal points, preceding space. Also require text 1.1+.
2018-11-18LaTeX reader: don't allow arguments for verbatim, etc.John MacFarlane1-1/+0
2018-11-18LaTeX reader: Allow space before bracketed options.John MacFarlane1-1/+2
2018-11-18LaTeX reader: allow optional arguments after \\ in tables.John MacFarlane1-1/+2
2018-11-18LaTeX reader: improve parsing of `\tiny`, `scriptsize`, etc.John MacFarlane1-4/+18
Parse as raw, but know that these font changing commands take no arguments.
2018-10-29LaTeX reader: allow space at end of math after `\`.John MacFarlane1-2/+2
Closes #5010. Expose trimMath from T.P.Shared.
2018-10-22LaTeX reader: add support for `nolinkurl` command. (#4992)Brian Leung1-0/+2
2018-10-15LaTeX reader: small verbatim mode cleanups.John MacFarlane1-17/+15
2018-10-15LaTeX reader: simplified type on doMacros'.John MacFarlane1-1/+1
2018-10-15LaTeX reader: tokenize before pulling tokens,John MacFarlane1-4/+2
rather than after. This has some performance penalty but is more reliable. Closes #4408.
2018-10-15LaTeX reader: more care with verbatim mode in macro definitions.John MacFarlane1-17/+20
This solves some of the issues in #4408, but it is fragile and may introduce new problems. We really need to change the approach fundamentally and expand macros before pulling tokens from the stream, rather than after.
2018-10-15LaTeX reader: more careful placement of withVerbatimMode.John MacFarlane1-14/+16
for macros
2018-10-15LaTeX reader: make macroDef polymorphic and allow in inline context.John MacFarlane1-10/+4
Otherwise we can't parse something like ``` \lowercase{\def\x{Foo}} ``` I have actually seen tex like this in the wild.
2018-10-15LaTeX reader: improved parsing of `\def`, `\let`.John MacFarlane1-11/+18
We now correctly parse: ``` \def\bar{hello} \let\fooi\bar \def\fooii{\bar} \fooi +\fooii \def\bar{goodbye} \fooi +\fooii ```
2018-10-15More refactoring of LaTeX reader code.John MacFarlane1-1/+1
2018-10-15LaTeX reader: improve parsing of `\def` argspec.John MacFarlane1-4/+4
2018-10-14LaTeX reader: skip `\PackageError` commands.John MacFarlane1-0/+2
See #4408. But this doesn't fix the issue.
2018-10-07LaTeX reader: fix bugs omitting raw tex.John MacFarlane1-2/+7
The default is `-raw_tex`, so no raw tex should result unless we explicitly say `+raw_tex`. Previously some raw commands did make it through. Closes #4527.
2018-10-01Moved isArgTok to Readers.LaTeX.Parsing.John MacFarlane1-4/+0
2018-10-01Moved babelLangToBCP, polyglossiaLangToBCP to new module...John MacFarlane1-134/+2
Text.Pandoc.Readers.LaTeX.Lang (unexported).
2018-09-30LaTeX reader: simplified accent code using unicode-transforms.John MacFarlane1-322/+33
New dependency on unicode-transforms package for normalization.
2018-09-29LaTeX reader: allow verbatim blocks ending with blank lines.John MacFarlane1-1/+14
Closes #4624.
2018-09-29LaTeX reader: support breq math environments: dmath, dgroup, darray.John MacFarlane1-0/+6
2018-09-28Added Text.Pandoc.Readers.LaTeX.Parsing (unexported).John MacFarlane1-557/+3
This collects some of the general-purpose code from the LaTeX reader, with the aim of making the module smaller. (We've been having out-of-memory issues compiling this module on CI.)
2018-09-25Add support for multiprenote and multipostnote arguments in LaTeX. (#4930)Brian Leung1-1/+34
* Add support for multiprenote and multipostnote arguments. The multiprenotes occur before the first prefix of a multicite, and the multipostnotes follow the last suffix. * Add test for multiprenote and multipostnote.
2018-09-09LaTeX reader: resolve `\ref` for figure numbers.John MacFarlane1-12/+41
2018-08-29LaTeX reader: fixed parsing of \texorpdfstring.John MacFarlane1-1/+1
We were returning the wrong argument as the content.
2018-08-21LaTeX reader: support blockcquote, foreignblockquote from csquotes.John MacFarlane1-5/+19
Also foreigncblockquote, hyphenblockquote, hyphencblockquote. Closes #4848. But note: currently foreignquote will be parsed as a regular Quoted inline (not using the quotes appropriate to the foreign language).
2018-08-21LaTeX reader: support enquote*, foreignquote, hypphenquote...John MacFarlane1-6/+24
from csquotes. See #4848. Still TBD: blockquote, blockcquote, foreignblockquote.
2018-08-18Fix compiler warning.John MacFarlane1-1/+1
2018-08-17LaTeX reader: Support more text-mode accents.John MacFarlane1-1/+91
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`, `\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`. Also fall back to combining characters when composed characters are not available. Closes #4652.
2018-08-17LaTeX reader: use combining characters when needed for accents.John MacFarlane1-1/+4
For example, there is no unicode code point corresponding to \"{X}, so we use a combining accent.
2018-08-17Add support for latex mintinline (#4365)Marc Schreiber1-0/+11
2018-08-17LaTeX reader: fix siunitx unit commands...John MacFarlane1-174/+182
...they should only be recognized in siunitx contexts. For example, `\l` outside of an siunitx context should be l-slash, not l (for liter)! Closes #4842.
2018-08-16LaTeX reader: fix double `unnumbered` class.John MacFarlane1-21/+20
The `unnumbered` class was being included twice for starred sections. Closes #4838.