aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-12-30LaTeX reader: Simplified a check for raw tex command.John MacFarlane1-2/+2
2017-12-28LaTeX reader: be more tolerant of `&` character.John MacFarlane1-1/+1
This allows us to parse unknown tabular environments as raw LaTeX. Closes #4208.
2017-12-26LaTeX reader: support `\foreignlanguage` from babel.John MacFarlane1-0/+30
2017-12-22`latex_macros` extension changes.John MacFarlane1-2/+4
Don't pass through macro definitions themselves when `latex_macros` is set. The macros have already been applied. If `latex_macros` is enabled, then `rawLaTeXBlock` in Text.Pandoc.Readers.LaTeX will succeed in parsing a macro definition, and will update pandoc's internal macro map accordingly, but the empty string will be returned. Together with earlier changes, this closes #4179.
2017-12-22LaTeX reader: use applyMacros in rawLaTeXBlock, rawLaTeXInline.John MacFarlane1-2/+5
2017-12-22LaTeX reader: Refactored inlineCommand.John MacFarlane1-24/+11
2017-12-21LaTeX reader: Fixed subtle bug in tokenizer.John MacFarlane1-2/+3
Material following `^^` was dropped if it wasn't a character escape. This only affected invalid LaTeX, so we didn't see it in the wild, but it appeared in a QuickCheck test failure https://travis-ci.org/jgm/pandoc/jobs/319812224
2017-12-15LaTeX reader: export tokenize, untokenize.John MacFarlane1-1/+3
Mainly so they can be tested.
2017-12-15Fixed regression in LateX tokenization.John MacFarlane1-2/+2
This mainly affects the Markdown reader when parsing raw LaTeX with escaped spaces. Closes #4159.
2017-12-08LaTeX reader: fix \ before newline.John MacFarlane1-3/+14
This should be a nonbreaking space, as long as it's not followed by a blank line. This has been fixed at the tokenizer level. Closes #4134.
2017-11-29Support beamer `\alert` in LaTeX reader. Closes #4091.John MacFarlane1-0/+1
2017-11-13LaTeX reader: allow optional arguments on `\footnote`.John MacFarlane1-2/+2
Closes #4062.
2017-11-12Fix comment that confuses haddock.John MacFarlane1-1/+1
2017-11-12LaTeX reader: support column specs like `*{2}{r}`.John MacFarlane1-3/+13
This is equivalent to `rr`. We now expand it like a macro. Closes #4056.
2017-11-12LaTeX reader: allow optional args for parbox.John MacFarlane1-1/+1
See #4056.
2017-10-31LaTeX reader: handle `%` comment right after command.John MacFarlane1-1/+1
For example \emph% {hi}
2017-10-30LaTeX reader: insert space when needed in macro expansion.John MacFarlane1-1/+8
Sometimes we need to insert a space after a control sequence to prevent it merging with a following letter. Closes #4007.
2017-10-30Allow unbraced arguments for macros.John MacFarlane1-8/+8
See #4007.
2017-10-30Allow body of macro definition to be unbraced.John MacFarlane1-7/+10
e.g. \newcommand\arrow\to See #4007.
2017-10-29More hlint fixes.John MacFarlane1-2/+2
2017-10-27hlint suggestions.John MacFarlane1-34/+34
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-59/+57
2017-10-22LaTeX Reader: support \lettrinemb211-0/+1
2017-10-22LaTeX Reader: use opt function consistentlymb211-3/+3
2017-10-19LaTeX reader: be more forgiving in parsing command options.John MacFarlane1-2/+2
This was needed, for example, to make some minted options work.
2017-10-19LaTeX reader: Strip off quotes in `\include` filenames.John MacFarlane1-1/+2
2017-10-19LaTeX reader: support `\expandafter`.John MacFarlane1-6/+19
Closes #3983.
2017-10-19LaTeX reader: handle `\DeclareRobustCommand`.John MacFarlane1-2/+3
Currently it's just treated as a synonym for `\newcommand`. Handles the second case mentioned in #3983.
2017-10-17Latex reader: Skip spaces in image optionsBen Firshman1-0/+2
2017-10-16Improved handling of include files in LaTeX reader.John MacFarlane1-57/+77
Previously `\include` wouldn't work if the included file contained, e.g., a begin without a matching end. We've changed the Tok type so that it stores a full SourcePos, rather than just a line and column. So tokens keeep track of the file they came from. This allows us to use a simpler method for includes, which doesn't require parsing the included document as a whole. Closes #3971.
2017-10-08LaTeX reader: don't treat "..." as Quoted.John MacFarlane1-2/+0
This caused quotes to be omitted in `\texttt` contexts. Closes #3958. However, a better fix would be to modify the
2017-10-08Small logic fix.John MacFarlane1-2/+1
2017-10-06LaTeX reader: read polyglossia/babel \text($LANG){...}.bucklereed1-113/+129
2017-09-08Removed old beamer template.John MacFarlane1-0/+1
We now use the default.latex template for both latex and beamer. It contains conditionals for the beamer-specific things. `pandoc -D beamer` will return this template.
2017-09-05LaTeX reader: Better support for ogonek accents.John MacFarlane1-0/+10
2017-09-05LaTeX reader: Improve handling of accents.John MacFarlane1-15/+17
Handle ogonek, and fall back correctly with forms like `\"{}`.
2017-09-05LaTeX reader: support `\k` ogonek accent.John MacFarlane1-0/+5
2017-08-25LaTeX reader: improved support for \hyperlink, \hypertarget.John MacFarlane1-6/+23
Closes #2549.
2017-08-24LaTeX reader: RN and Rn, from biblatex (#3854)bucklereed1-1/+29
2017-08-20LaTeX reader: Set identifiers on Spans used for \label.John MacFarlane1-1/+2
2017-08-20LaTeX reader: allow `]` inside group in option brackets.John MacFarlane1-3/+2
Closes #3857.
2017-08-18LaTeX reader: implement \newtoggle, \iftoggle, \toggletrue|falseJohn MacFarlane1-5/+47
from etoolbox. Closes #3853.
2017-08-17LaTeX reader: support \lq, \rq.John MacFarlane1-0/+2
2017-08-17LaTeX reader: support \textquoteleft|right, \textquotedblleft|right.John MacFarlane1-0/+4
Closes #3849.
2017-08-16LaTeX reader: rudimentary support for `\hyperlink`.John MacFarlane1-0/+4
2017-08-16LaTeX reader: use Link instead of Span for `\ref`.John MacFarlane1-5/+6
This makes more sense semantically and avoids unnecessary Span [Link] nestings when references are resolved.
2017-08-16LaTeX reader: add Support for `glossaries` and `acronym` package (#3589)schrieveslaach1-0/+39
Acronyms are not resolved by the reader, but acronym and glossary information is put into attributes on Spans so that they can be processed in filters.
2017-08-13Better handle complex \def macros as raw latex.John MacFarlane1-9/+11
2017-08-13LaTeX reader: Allow @ as a letter in control sequences.John MacFarlane1-2/+8
@ is commonly used in macros using `\makeatletter`. Ideally we'd make the tokenizer sensitive to `\makeatletter` and `\makeatother`, but until then this seems a good change.
2017-08-13LaTeX reader: fix `\let\a=0` case, with single character token.John MacFarlane1-13/+18