diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-02-01 21:17:46 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-02-01 21:17:46 -0800 |
commit | 633a9ecfecd7a111d6727bd4c44750dbb3c9af23 (patch) | |
tree | 9992326d40d693d644d253eeb1e26a4f5bfa6089 /test | |
parent | b436087bc8b59222fe031910aa85fea88cd6b1eb (diff) | |
download | pandoc-633a9ecfecd7a111d6727bd4c44750dbb3c9af23.tar.gz |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/1126.md | 5 | ||||
-rw-r--r-- | test/command/ascii.md | 2 | ||||
-rw-r--r-- | test/writer.latex | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/test/command/1126.md b/test/command/1126.md index 014a8ae2d..e78646fad 100644 --- a/test/command/1126.md +++ b/test/command/1126.md @@ -5,9 +5,8 @@ A&=&B,\\ C&=&D \end{eqnarray} ^D -\textbackslash{}begin\{eqnarray\} -A\&=\&B,\textbackslash{}\textbackslash{} C\&=\&D -\textbackslash{}end\{eqnarray\} +\textbackslash begin\{eqnarray\} A\&=\&B,\textbackslash\textbackslash{} +C\&=\&D \textbackslash end\{eqnarray\} ``` ``` diff --git a/test/command/ascii.md b/test/command/ascii.md index d01389a60..492bf248f 100644 --- a/test/command/ascii.md +++ b/test/command/ascii.md @@ -9,7 +9,7 @@ pandoc -t html --ascii pandoc -t latex --ascii äéıå ^D -\"{a}\'{e}\i \r{a} +\"{a}\'{e}\i\r{a} ``` ``` diff --git a/test/writer.latex b/test/writer.latex index 04ba7cd15..45723c94e 100644 --- a/test/writer.latex +++ b/test/writer.latex @@ -719,7 +719,7 @@ Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, H\textsubscript{many~of~them}O. These should not be superscripts or subscripts, because of the unescaped -spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d. +spaces: a\^{}b c\^{}d, a\textasciitilde b c\textasciitilde d. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} @@ -741,7 +741,7 @@ Some dashes: one---two --- three---four --- five. Dashes between numbers: 5--7, 255--66, 1987--1999. -Ellipses\ldots{}and\ldots{}and\ldots{}. +Ellipses\ldots and\ldots and\ldots. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} |