2017-07-23 20:46:37 +02:00
|
|
|
```
|
2019-07-18 22:30:05 -07:00
|
|
|
% pandoc -f markdown+latex_macros -t markdown+raw_tex-raw_attribute
|
2017-07-23 20:46:37 +02:00
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
$\my+\my$
|
|
|
|
^D
|
2018-01-13 22:12:32 -08:00
|
|
|
\newcommand{\my}{\phi}
|
2018-10-14 17:12:06 -07:00
|
|
|
|
2017-07-23 20:46:37 +02:00
|
|
|
$\phi+\phi$
|
|
|
|
```
|
2017-07-23 21:10:36 +02:00
|
|
|
|
|
|
|
```
|
2019-07-18 22:30:05 -07:00
|
|
|
% pandoc -f markdown-latex_macros -t markdown+raw_tex-raw_attribute
|
2017-07-23 21:10:36 +02:00
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
$\my+\my$
|
|
|
|
^D
|
|
|
|
\newcommand{\my}{\phi}
|
2018-10-14 17:12:06 -07:00
|
|
|
|
2017-07-23 21:10:36 +02:00
|
|
|
$\my+\my$
|
|
|
|
```
|
2017-08-07 13:38:15 -07: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-17 23:19:38 -07:00
|
|
|
\a a
|
2017-08-07 13:38:15 -07: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-17 23:19:38 -07:00
|
|
|
a̱
|
2017-08-07 13:38:15 -07: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-17 23:19:38 -07:00
|
|
|
\a a
|
2017-08-07 13:38:15 -07: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-17 23:19:38 -07:00
|
|
|
\emph{ouk}a
|
2017-08-07 13:38:15 -07:00
|
|
|
```
|
|
|
|
|
2017-08-07 16:06:19 -07: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-22 17:59:47 -08:00
|
|
|
|
|
|
|
```
|
2019-07-18 22:30:05 -07:00
|
|
|
% pandoc -f markdown+latex_macros -t markdown+raw_tex-raw_attribute
|
2017-12-22 17:59:47 -08:00
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
\begin{equation}
|
|
|
|
\my+\my
|
|
|
|
\end{equation}
|
|
|
|
^D
|
2018-01-13 22:12:32 -08:00
|
|
|
\newcommand{\my}{\phi}
|
2018-10-14 17:12:06 -07:00
|
|
|
|
2017-12-22 17:59:47 -08:00
|
|
|
\begin{equation}
|
|
|
|
\phi+\phi
|
|
|
|
\end{equation}
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
2019-07-18 22:30:05 -07:00
|
|
|
% pandoc -f markdown-latex_macros -t markdown+raw_tex-raw_attribute
|
2017-12-22 17:59:47 -08:00
|
|
|
\newcommand{\my}{\phi}
|
|
|
|
\begin{equation}
|
|
|
|
\my+\my
|
|
|
|
\end{equation}
|
|
|
|
^D
|
|
|
|
\newcommand{\my}{\phi}
|
2018-10-14 17:12:06 -07:00
|
|
|
|
2017-12-22 17:59:47 -08:00
|
|
|
\begin{equation}
|
|
|
|
\my+\my
|
|
|
|
\end{equation}
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
2019-07-18 22:30:05 -07:00
|
|
|
% pandoc -f markdown+latex_macros -t markdown+raw_tex-raw_attribute
|
2017-12-22 17:59:47 -08:00
|
|
|
\newcommand{\my}{\emph{a}}
|
|
|
|
\my
|
|
|
|
^D
|
2018-01-13 22:12:32 -08:00
|
|
|
\newcommand{\my}{\emph{a}}
|
2017-12-22 17:59:47 -08:00
|
|
|
\emph{a}
|
|
|
|
```
|
2018-10-14 22:50:47 -07: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
|
|
|
|
```
|
|
|
|
|