pandoc/test/command/1126.md
John MacFarlane 633a9ecfec LaTeX writer: avoid {} after control sequences when escaping.
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex
ellipsis package.  This patch causes pandoc to avoid emitting
the `{}` when it is not necessary.  Now `\ldots` and other
control sequences used in escaping will be followed by either
a `{}`, a space, or nothing, depending on context.

Thanks to Elliott Slaughter for the suggestion.
2019-02-01 21:17:46 -08:00

28 lines
415 B
Markdown

```
% pandoc -f html -t latex
\begin{eqnarray}
A&=&B,\\
C&=&D
\end{eqnarray}
^D
\textbackslash begin\{eqnarray\} A\&=\&B,\textbackslash\textbackslash{}
C\&=\&D \textbackslash end\{eqnarray\}
```
```
% pandoc -f html+raw_tex -t latex
<p>See \eqref{myeq}.</p>
\begin{eqnarray}
A&=&B,\\
C&amp;=&amp;D
\\label{myeq}
\end{eqnarray}
^D
See \eqref{myeq}.
\begin{eqnarray}
A&=&B,\\
C&=&D
\\label{myeq}
\end{eqnarray}
```