diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-22 17:59:47 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-22 18:03:51 -0800 |
commit | 28b736bf957da0df79ffb211fc5e7ec4ff713c4b (patch) | |
tree | 5c8d905498626c2f32c49cacde3af7096485c21c /MANUAL.txt | |
parent | 4a07977715021da241b1bf5ab3e1ee62fef89fa1 (diff) |
`latex_macros` extension changes.
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.
Diffstat (limited to 'MANUAL.txt')
-rw-r--r-- | MANUAL.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 19e1764a1..78bd057ed 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -3195,18 +3195,22 @@ LaTeX macros #### Extension: `latex_macros` #### -For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and -`\renewcommand` definitions and apply the resulting macros to all LaTeX -math. So, for example, the following will work in all output formats, -not just LaTeX: +For output formats other than LaTeX, pandoc will parse LaTeX +macro definitions and apply the resulting macros to all LaTeX +math and raw LaTeX. So, for example, the following will work in +all output formats, not just LaTeX: \newcommand{\tuple}[1]{\langle #1 \rangle} $\tuple{a, b, c}$ -In LaTeX output, the `\newcommand` definition will simply be passed -unchanged to the output. +In LaTeX output, the macro definitions will not be passed +through as raw LaTeX. +When `latex_macros` is disabled, the macro definitions will +be passed through as raw LaTeX, and the raw LaTeX and math will +not have macros applied. This is usually a better approach when +you are targeting LaTeX or PDF. Links ----- |