LaTeX reader: pass through macro defs in rawLaTeXBlock...

even if the `latex_macros` extension is set.
This reverts to earlier behavior and is probably safer
on the whole, since some macros only modify things in
included packages, which pandoc's macro expansion can't
modify.

Closes #4246.
This commit is contained in:
John MacFarlane
2018-01-13 22:12:32 -08:00
parent 485535464d
commit e7d95cadf5
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -3,5 +3,6 @@
\newcommand{\gen}{a\ Gen\ b}
abc
^D
[Para [Str "abc"]]
[RawBlock (Format "latex") "\\newcommand{\\gen}{a\\ Gen\\ b}"
,Para [Str "abc"]]
```
+3
View File
@@ -3,6 +3,7 @@
\newcommand{\my}{\phi}
$\my+\my$
^D
\newcommand{\my}{\phi}
$\phi+\phi$
```
@@ -73,6 +74,7 @@ x &= y\\\end{aligned}\]
\my+\my
\end{equation}
^D
\newcommand{\my}{\phi}
\begin{equation}
\phi+\phi
\end{equation}
@@ -96,5 +98,6 @@ x &= y\\\end{aligned}\]
\newcommand{\my}{\emph{a}}
\my
^D
\newcommand{\my}{\emph{a}}
\emph{a}
```