From c806ef1b150147ecaf5a4781e2ac1ce921559ca4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 7 Aug 2017 16:06:19 -0700 Subject: LaTeX reader: Support simple `\def` macros. Note that we still don't support macros with fancy parameter delimiters, like \def\foo#1..#2{...} --- test/command/macros.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/command') diff --git a/test/command/macros.md b/test/command/macros.md index 49a648c79..46179e3c7 100644 --- a/test/command/macros.md +++ b/test/command/macros.md @@ -38,3 +38,31 @@ expanded at point of use: \emph{ouk} ``` +``` +% pandoc -f latex -t latex +\def\BDpos{} +\def\BDneg{-} +\def\beq{\begin{align}} +\def\eeq{\end{align}} +\def\e#1{\emph{#1}} +\def\f#1#2{\emph{#1--#2}} + +$5\BDneg 6\BDpos 7$ + +\beq +x &= y\\ +\eeq + +\e{hi} + +\f{hi}{ok} +^D +\(5-67\) + +\[\begin{aligned} +x &= y\\\end{aligned}\] + +\emph{hi} + +\emph{hi--ok} +``` -- cgit v1.2.3