2017-07-23 20:46:37 +02:00
|
|
|
```
|
2017-07-23 21:10:36 +02:00
|
|
|
% pandoc -f markdown+latex_macros -t markdown
|
2017-07-23 20:46:37 +02:00
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
$\my+\my$
|
|
|
|
^D
|
2018-01-14 07:12:32 +01:00
|
|
|
\newcommand{\my}{\phi}
|
2018-10-15 02:12:06 +02:00
|
|
|
|
2017-07-23 20:46:37 +02:00
|
|
|
$\phi+\phi$
|
|
|
|
```
|
2017-07-23 21:10:36 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f markdown-latex_macros -t markdown
|
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
$\my+\my$
|
|
|
|
^D
|
|
|
|
\newcommand{\my}{\phi}
|
2018-10-15 02:12:06 +02:00
|
|
|
|
2017-07-23 21:10:36 +02:00
|
|
|
$\my+\my$
|
|
|
|
```
|
2017-08-07 22:38:15 +02:00
|
|
|
|
|
|
|
`\let` macros should be expanded at point of
|
|
|
|
definition, while `\newcommand` macros should be
|
|
|
|
expanded at point of use:
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t latex
|
|
|
|
\let\a\b
|
|
|
|
\newcommand{\b}{\emph{ouk}}
|
LaTeX reader: Support more text-mode accents.
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`,
`\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`.
Also fall back to combining characters when composed
characters are not available.
Closes #4652.
2018-08-18 08:19:38 +02:00
|
|
|
\a a
|
2017-08-07 22:38:15 +02:00
|
|
|
^D
|
LaTeX reader: Support more text-mode accents.
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`,
`\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`.
Also fall back to combining characters when composed
characters are not available.
Closes #4652.
2018-08-18 08:19:38 +02:00
|
|
|
a̱
|
2017-08-07 22:38:15 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t latex
|
|
|
|
\newcommand{\a}{\b}
|
|
|
|
\newcommand{\b}{\emph{ouk}}
|
LaTeX reader: Support more text-mode accents.
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`,
`\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`.
Also fall back to combining characters when composed
characters are not available.
Closes #4652.
2018-08-18 08:19:38 +02:00
|
|
|
\a a
|
2017-08-07 22:38:15 +02:00
|
|
|
^D
|
LaTeX reader: Support more text-mode accents.
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`,
`\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`.
Also fall back to combining characters when composed
characters are not available.
Closes #4652.
2018-08-18 08:19:38 +02:00
|
|
|
\emph{ouk}a
|
2017-08-07 22:38:15 +02:00
|
|
|
```
|
|
|
|
|
2017-08-08 01:06:19 +02:00
|
|
|
```
|
|
|
|
% 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}
|
|
|
|
```
|
2017-12-23 02:59:47 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f markdown+latex_macros -t markdown
|
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
\begin{equation}
|
|
|
|
\my+\my
|
|
|
|
\end{equation}
|
|
|
|
^D
|
2018-01-14 07:12:32 +01:00
|
|
|
\newcommand{\my}{\phi}
|
2018-10-15 02:12:06 +02:00
|
|
|
|
2017-12-23 02:59:47 +01:00
|
|
|
\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}
|
2018-10-15 02:12:06 +02:00
|
|
|
|
2017-12-23 02:59:47 +01:00
|
|
|
\begin{equation}
|
|
|
|
\my+\my
|
|
|
|
\end{equation}
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f markdown+latex_macros -t markdown
|
|
|
|
\newcommand{\my}{\emph{a}}
|
|
|
|
\my
|
|
|
|
^D
|
2018-01-14 07:12:32 +01:00
|
|
|
\newcommand{\my}{\emph{a}}
|
2017-12-23 02:59:47 +01:00
|
|
|
\emph{a}
|
|
|
|
```
|
2018-10-15 07:50:47 +02:00
|
|
|
|
|
|
|
<https://tex.stackexchange.com/questions/258/what-is-the-difference-between-let-and-def>
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t plain
|
|
|
|
\def\bar{hello}
|
|
|
|
\let\fooi\bar
|
|
|
|
\def\fooii{\bar}
|
|
|
|
\fooi +\fooii
|
|
|
|
|
|
|
|
\def\bar{goodbye}
|
|
|
|
\fooi +\fooii
|
|
|
|
^D
|
|
|
|
hello+hello
|
|
|
|
|
|
|
|
hello+goodbye
|
|
|
|
```
|
|
|
|
|