diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2017-11-06 14:14:14 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2017-11-06 14:14:14 +0000 |
commit | 75766d1e8915a9e544f2545c82e96a9fffb9d3fa (patch) | |
tree | ae5e4e3d158db57a3227ad0aa5cf89f2fddb3072 /docutils | |
parent | f438ae1c56183af55530c0eeaa6e1dfbe897da87 (diff) | |
download | docutils-75766d1e8915a9e544f2545c82e96a9fffb9d3fa.tar.gz |
Properly escape LaTeX commands in test samples.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8200 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
4 files changed, 21 insertions, 21 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex index 46467fe48..fffd72187 100644 --- a/docutils/test/functional/expected/standalone_rst_latex.tex +++ b/docutils/test/functional/expected/standalone_rst_latex.tex @@ -2636,7 +2636,7 @@ In that case the contents between that bracket and the following closing bracket on the same grouping level are taken as the optional argument. What makes this unintuitive is the fact that the square brackets aren’t grouping characters themselves, so in -your last example item{[}{[}…{]}{]} the optional argument consists of +your last example \texttt{\textbackslash{}item{[}{[}...{]}{]}} the optional argument consists of {[}… (without the closing bracket). \end{quote} @@ -2717,9 +2717,9 @@ See \hyperref[hypertarget-in-plain-text]{hypertarget in plain text}, \label{external-references}% } -Long URLs should be wrapped in the PDF. -This can be achieved with the url command which is used by the LaTeX writer -whenever the content (name) of a reference node equals the link URL. +Long URLs should be wrapped in the PDF. This can be achieved with the +\texttt{\textbackslash{}url} command which is used by the LaTeX writer whenever the content +(name) of a reference node equals the link URL. \begin{description} \item[{Example:}] \leavevmode @@ -2770,13 +2770,13 @@ These URLs are typeset inside a LaTeX command without error. \end{itemize} \begin{itemize} -\item \textasciicircum{}\textasciicircum{} LaTeX’s special syntax for characters results in “strange” replacements -(both with href and url). A warning is given. +\item \texttt{\textasciicircum{}\textasciicircum{}} LaTeX’s special syntax for characters results in “strange” replacements +(both with \texttt{\textbackslash{}href} and \texttt{\textbackslash{}url}). A warning is given. \href{../strange^^name}{file with \textasciicircum{}\textasciicircum{}}: \url{../strange^^name} -\item Unbalanced braces, \{ or \}, will fail (both with href and url): +\item Unbalanced braces, \{ or \}, will fail (both with \texttt{\textbackslash{}href} and \texttt{\textbackslash{}url}): \begin{quote} \begin{alltt} diff --git a/docutils/test/functional/expected/standalone_rst_xetex.tex b/docutils/test/functional/expected/standalone_rst_xetex.tex index 7a50bb290..6f1d7a0b2 100644 --- a/docutils/test/functional/expected/standalone_rst_xetex.tex +++ b/docutils/test/functional/expected/standalone_rst_xetex.tex @@ -2642,7 +2642,7 @@ In that case the contents between that bracket and the following closing bracket on the same grouping level are taken as the optional argument. What makes this unintuitive is the fact that the square brackets aren’t grouping characters themselves, so in -your last example item{[}{[}…{]}{]} the optional argument consists of +your last example \texttt{\textbackslash{}item{[}{[}...{]}{]}} the optional argument consists of {[}… (without the closing bracket). \end{quote} @@ -2723,9 +2723,9 @@ See \hyperref[hypertarget-in-plain-text]{hypertarget in plain text}, \label{external-references}% } -Long URLs should be wrapped in the PDF. -This can be achieved with the url command which is used by the LaTeX writer -whenever the content (name) of a reference node equals the link URL. +Long URLs should be wrapped in the PDF. This can be achieved with the +\texttt{\textbackslash{}url} command which is used by the LaTeX writer whenever the content +(name) of a reference node equals the link URL. \begin{description} \item[{Example:}] \leavevmode @@ -2776,13 +2776,13 @@ These URLs are typeset inside a LaTeX command without error. \end{itemize} \begin{itemize} -\item \textasciicircum{}\textasciicircum{} LaTeX’s special syntax for characters results in “strange” replacements -(both with href and url). A warning is given. +\item \texttt{\textasciicircum{}\textasciicircum{}} LaTeX’s special syntax for characters results in “strange” replacements +(both with \texttt{\textbackslash{}href} and \texttt{\textbackslash{}url}). A warning is given. \href{../strange^^name}{file with \textasciicircum{}\textasciicircum{}}: \url{../strange^^name} -\item Unbalanced braces, \{ or \}, will fail (both with href and url): +\item Unbalanced braces, \{ or \}, will fail (both with \texttt{\textbackslash{}href} and \texttt{\textbackslash{}url}): \begin{quote} \begin{alltt} diff --git a/docutils/test/functional/input/data/latex_encoding.txt b/docutils/test/functional/input/data/latex_encoding.txt index eefb0b970..96ee9f10d 100644 --- a/docutils/test/functional/input/data/latex_encoding.txt +++ b/docutils/test/functional/input/data/latex_encoding.txt @@ -20,7 +20,7 @@ However also *square brackets* [] need special care. closing bracket on the same grouping level are taken as the optional argument. What makes this unintuitive is the fact that the square brackets aren't grouping characters themselves, so in - your last example \item[[...]] the optional argument consists of + your last example ``\item[[...]]`` the optional argument consists of [... (without the closing bracket). Compare the items in the following lists: diff --git a/docutils/test/functional/input/data/urls.txt b/docutils/test/functional/input/data/urls.txt index 9b17e5801..3da9b30a8 100644 --- a/docutils/test/functional/input/data/urls.txt +++ b/docutils/test/functional/input/data/urls.txt @@ -1,9 +1,9 @@ External references ------------------- -Long URLs should be wrapped in the PDF. -This can be achieved with the \url command which is used by the LaTeX writer -whenever the content (name) of a reference node equals the link URL. +Long URLs should be wrapped in the PDF. This can be achieved with the +``\url`` command which is used by the LaTeX writer whenever the content +(name) of a reference node equals the link URL. Example: a long URL that should wrap in the output @@ -44,13 +44,13 @@ __ __ A:DOS\\path\\ -* ^^ LaTeX's special syntax for characters results in "strange" replacements - (both with \href and \url). A warning is given. +* ``^^`` LaTeX's special syntax for characters results in "strange" replacements + (both with ``\href`` and ``\url``). A warning is given. `file with ^^ <../strange^^name>`__: `<../strange^^name>`__ -* Unbalanced braces, { or }, will fail (both with \href and \url):: +* Unbalanced braces, { or }, will fail (both with ``\href`` and ``\url``):: `file with { <../strange{name>`__ `<../strange{name>`__ |