aboutsummaryrefslogtreecommitdiff
path: root/test/command/macros.md
AgeCommit message (Collapse)AuthorFilesLines
2017-12-22`latex_macros` extension changes.John MacFarlane1-1/+33
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-08-07LaTeX reader: Support simple `\def` macros.John MacFarlane1-0/+28
Note that we still don't support macros with fancy parameter delimiters, like \def\foo#1..#2{...}
2017-08-07LaTeX reader: Support `\let`.John MacFarlane1-0/+23
Also, fix regular macros so they're expanded at the point of use, and NOT also the point of definition. `\let` macros, by contrast, are expanded at the point of definition. Added an `ExpansionPoint` field to `Macro` to track this difference.
2017-07-24Added a test case with `markdown-latex_macros`.John MacFarlane1-1/+10
2017-07-24LaTeX reader: some improvements in macro parsing.John MacFarlane1-0/+8
Fixed applyMacros so that it operates on the whole string, not just the first token! Don't remove macro definitions from the output, even if Ext_latex_macros is set, so that macros will be applied. Since they're only applied to math in Markdown, removing the macros can have bad effects. Even for math macros, keeping them should be harmless.