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 /test/command/macros.md | |
parent | 4a07977715021da241b1bf5ab3e1ee62fef89fa1 (diff) | |
download | pandoc-28b736bf957da0df79ffb211fc5e7ec4ff713c4b.tar.gz |
`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 'test/command/macros.md')
-rw-r--r-- | test/command/macros.md | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/test/command/macros.md b/test/command/macros.md index 46179e3c7..4bd2eb00a 100644 --- a/test/command/macros.md +++ b/test/command/macros.md @@ -3,7 +3,6 @@ \newcommand{\my}{\phi} $\my+\my$ ^D -\newcommand{\my}{\phi} $\phi+\phi$ ``` @@ -66,3 +65,36 @@ x &= y\\\end{aligned}\] \emph{hi--ok} ``` + +``` +% pandoc -f markdown+latex_macros -t markdown +\newcommand{\my}{\phi} +\begin{equation} +\my+\my +\end{equation} +^D +\begin{equation} +\phi+\phi +\end{equation} +``` + +``` +% pandoc -f markdown-latex_macros -t markdown +\newcommand{\my}{\phi} +\begin{equation} +\my+\my +\end{equation} +^D +\newcommand{\my}{\phi} +\begin{equation} +\my+\my +\end{equation} +``` + +``` +% pandoc -f markdown+latex_macros -t markdown +\newcommand{\my}{\emph{a}} +\my +^D +\emph{a} +``` |