summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-01-13 22:12:32 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-01-13 22:12:32 -0800
commite7d95cadf537909bcb1e7d17d4545932d6bb34bc (patch)
tree30e2fd0f5f116f252d68b894f073a96b779a75ea /test
parent485535464df27f5c2e2dd144650af318bde239c1 (diff)
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.
Diffstat (limited to 'test')
-rw-r--r--test/command/4159.md3
-rw-r--r--test/command/macros.md3
-rw-r--r--test/markdown-reader-more.native1
3 files changed, 6 insertions, 1 deletions
diff --git a/test/command/4159.md b/test/command/4159.md
index 81deba53a..4881edcc5 100644
--- a/test/command/4159.md
+++ b/test/command/4159.md
@@ -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"]]
```
diff --git a/test/command/macros.md b/test/command/macros.md
index 4bd2eb00a..9de87e7a0 100644
--- a/test/command/macros.md
+++ b/test/command/macros.md
@@ -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}
```
diff --git a/test/markdown-reader-more.native b/test/markdown-reader-more.native
index 742b6187c..5f34c7927 100644
--- a/test/markdown-reader-more.native
+++ b/test/markdown-reader-more.native
@@ -54,6 +54,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Author",S
,OrderedList (3,Example,TwoParens)
[[Plain [Str "Third",Space,Str "example."]]]
,Header 2 ("macros",[],[]) [Str "Macros"]
+,RawBlock (Format "latex") "\\newcommand{\\tuple}[1]{\\langle #1 \\rangle}"
,Para [Math InlineMath "\\langle x,y \\rangle"]
,Header 2 ("case-insensitive-references",[],[]) [Str "Case-insensitive",Space,Str "references"]
,Para [Link ("",[],[]) [Str "Fum"] ("/fum","")]