Extension: latex_macros
When this extension is enabled, 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}$
Note that LaTeX macros will not be applied if they occur inside a raw span or block marked with the raw_attribute
extension.
When latex_macros
is disabled, the raw LaTeX and math will not have macros applied. This is usually a better approach when you are targeting LaTeX or PDF.
Whether or not latex_macros
is enabled, the macro definitions will still be passed through as raw LaTeX.