diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2009-05-07 21:20:05 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2009-05-07 21:20:05 +0000 |
| commit | edebe7f4cc8c4a7093391f60e190868805a55313 (patch) | |
| tree | 9b8e0da860ffef4b832c833375f70b1e26315f74 /test | |
| parent | 9a5a1cbf8ed43c6716734f71f3601288146434fc (diff) | |
| download | docutils-edebe7f4cc8c4a7093391f60e190868805a55313.tar.gz | |
Use \\textsubscript and \\textsuperscript for sub- and superscript roles.
Always load fixltx2e.sty package (providing \\textsubscript).
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@5938 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test')
5 files changed, 17 insertions, 12 deletions
diff --git a/test/functional/expected/latex_docinfo.tex b/test/functional/expected/latex_docinfo.tex index 3ed9dd0ae..de3778131 100644 --- a/test/functional/expected/latex_docinfo.tex +++ b/test/functional/expected/latex_docinfo.tex @@ -4,6 +4,7 @@ %\usepackage[OT1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{ifthen} +\usepackage{fixltx2e} % fix LaTeX2e shortcomings \usepackage{tabularx} \usepackage{typearea} % provide a length variable and set it diff --git a/test/functional/expected/multistyle_path_embed_rst_latex2e.tex b/test/functional/expected/multistyle_path_embed_rst_latex2e.tex index c670418ef..a9590b2e1 100644 --- a/test/functional/expected/multistyle_path_embed_rst_latex2e.tex +++ b/test/functional/expected/multistyle_path_embed_rst_latex2e.tex @@ -4,6 +4,7 @@ %\usepackage[OT1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{ifthen} +\usepackage{fixltx2e} % fix LaTeX2e shortcomings \usepackage{typearea} %%% User specified packages and stylesheets diff --git a/test/functional/expected/multistyle_path_rst_latex2e.tex b/test/functional/expected/multistyle_path_rst_latex2e.tex index 6215527fe..865382b15 100644 --- a/test/functional/expected/multistyle_path_rst_latex2e.tex +++ b/test/functional/expected/multistyle_path_rst_latex2e.tex @@ -4,6 +4,7 @@ %\usepackage[OT1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{ifthen} +\usepackage{fixltx2e} % fix LaTeX2e shortcomings \usepackage{typearea} %%% User specified packages and stylesheets diff --git a/test/functional/expected/standalone_rst_latex.tex b/test/functional/expected/standalone_rst_latex.tex index 0a6589771..c1b62459d 100644 --- a/test/functional/expected/standalone_rst_latex.tex +++ b/test/functional/expected/standalone_rst_latex.tex @@ -4,6 +4,7 @@ %\usepackage[OT1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{ifthen} +\usepackage{fixltx2e} % fix LaTeX2e shortcomings \usepackage{color} \usepackage{graphicx} \usepackage{multirow} @@ -363,11 +364,11 @@ A paragraph. Paragraphs contain text and may contain inline markup: \emph{emphasis}, \textbf{strong emphasis}, \texttt{inline literals}, standalone hyperlinks -(\href{http://www.python.org}{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id27}{5}}), internal +(\href{http://www.python.org}{http://www.python.org}), external hyperlinks (\href{http://www.python.org/}{Python}\textsuperscript{\hyperlink{id27}{5}}), internal cross-references (\href{\#example}{example}), external hyperlinks with embedded URIs (\href{http://www.python.org}{Python web site}), \href{http://www.python.org/}{anonymous hyperlink -references}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id27}{5}} (\href{http://docutils.sourceforge.net/}{a second reference}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id32}{6}}), footnote references (manually -numbered\raisebox{.5em}[0em]{\scriptsize\hyperlink{id8}{1}}, anonymous auto-numbered\raisebox{.5em}[0em]{\scriptsize\hyperlink{id12}{3}}, labeled auto-numbered\raisebox{.5em}[0em]{\scriptsize\hyperlink{label}{2}}, or symbolic\raisebox{.5em}[0em]{\scriptsize\hyperlink{id13}{*}}), citation references ([\hyperlink{cit2002}{CIT2002}]), +references}\textsuperscript{\hyperlink{id27}{5}} (\href{http://docutils.sourceforge.net/}{a second reference}\textsuperscript{\hyperlink{id32}{6}}), footnote references (manually +numbered\textsuperscript{\hyperlink{id8}{1}}, anonymous auto-numbered\textsuperscript{\hyperlink{id12}{3}}, labeled auto-numbered\textsuperscript{\hyperlink{label}{2}}, or symbolic\textsuperscript{\hyperlink{id13}{*}}), citation references ([\hyperlink{cit2002}{CIT2002}]), substitution references (\includegraphics{../../../docs/user/rst/images/biohazard.png}), and \hypertarget{inline-hyperlink-targets}{inline hyperlink targets} (see \href{\#id23}{Targets} below for a reference back to here). Character-level inline markup is also possible (although exceedingly ugly!) in \emph{re}\texttt{Structured}\emph{Text}. Problems are indicated by {\color{red}\bfseries{}\textbar{}problematic\textbar{}} text @@ -376,7 +377,7 @@ reference to the \href{\#doctitle}{doctitle} and the \href{\#subtitle}{subtitle} The default role for interpreted text is \DUroletitlereference{Title Reference}. Here are some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an -RFC reference (\href{http://www.faqs.org/rfcs/rfc2822.html}{RFC 2822}); a $_{\mbox{\scriptsize subscript}}$; a $^{\mbox{\scriptsize superscript}}$; +RFC reference (\href{http://www.faqs.org/rfcs/rfc2822.html}{RFC 2822}); a \textsubscript{subscript}; a \textsuperscript{superscript}; and explicit roles for \emph{standard} \textbf{inline} \texttt{markup}. % DO NOT RE-WRAP THE FOLLOWING PARAGRAPH! @@ -787,10 +788,10 @@ least 3 spaces. This is the footnote's second paragraph. \end{figure} \begin{figure}[b]\hypertarget{label}$^{2}$ -Footnotes may be numbered, either manually (as in\raisebox{.5em}[0em]{\scriptsize\hyperlink{id8}{1}}) or +Footnotes may be numbered, either manually (as in\textsuperscript{\hyperlink{id8}{1}}) or automatically using a ``\#''-prefixed label. This footnote has a label so it can be referred to from multiple places, both as a -footnote reference (\raisebox{.5em}[0em]{\scriptsize\hyperlink{label}{2}}) and as a \href{\#label}{hyperlink reference}. +footnote reference (\textsuperscript{\hyperlink{label}{2}}) and as a \href{\#label}{hyperlink reference}. \hypertarget{label}{}\end{figure} \begin{figure}[b]\hypertarget{id12}$^{3}$ This footnote is numbered automatically and anonymously using a @@ -802,7 +803,7 @@ And this is the third paragraph. \end{figure} \begin{figure}[b]\hypertarget{id13}$^{*}$ Footnotes may also use symbols, specified with a ``*'' label. -Here's a reference to the next footnote:\raisebox{.5em}[0em]{\scriptsize\hyperlink{id15}{\dag{}}}. +Here's a reference to the next footnote:\textsuperscript{\hyperlink{id15}{\dag{}}}. \end{figure} \begin{figure}[b]\hypertarget{id15}$^{\dag{}}$ This footnote shows the next symbol in the sequence. @@ -846,7 +847,7 @@ Section headers are implicit targets, referred to by name. See \href{\#id23}{Targets}, which is a subsection of \href{\#body-elements}{Body Elements}. Explicit external targets are interpolated into references such as -``\href{http://www.python.org/}{Python}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id27}{5}}''. +``\href{http://www.python.org/}{Python}\textsuperscript{\hyperlink{id27}{5}}''. Targets may be indirect and anonymous. Thus \href{\#id23}{this phrase} may also refer to the \href{\#id23}{Targets} section. @@ -1140,7 +1141,7 @@ This is a topic. \subsubsection*{2.14.6~~~Replacement Text} \label{replacement-text} -I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\raisebox{.5em}[0em]{\scriptsize\hyperlink{id27}{5}}. +I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\textsuperscript{\hyperlink{id27}{5}}. %___________________________________________________________________________ @@ -1231,7 +1232,7 @@ This~is~a~parsed~literal~block.~\\ ~~~~This~line~is~indented.~~The~next~line~is~blank.~\\ ~\\ Inline~markup~is~supported,~e.g.~\emph{emphasis},~\textbf{strong},~\texttt{literal~\\ -text},~footnotes\raisebox{.5em}[0em]{\scriptsize\hyperlink{id8}{1}},~\hypertarget{id23}{targets},~and~\href{http://www.python.org/}{references}. +text},~footnotes\textsuperscript{\hyperlink{id8}{1}},~\hypertarget{id23}{targets},~and~\href{http://www.python.org/}{references}. }\end{quote} @@ -1517,9 +1518,9 @@ This is a \texttt{\DUrole{custom-literal}{customized literal text role}} This is a \textbf{\DUrole{custom-strong}{customized strong text role}} -This is a $_{\mbox{\scriptsize \DUrole{custom-subscript}{customized subscript text role}}}$ +This is a \textsubscript{\DUrole{custom-subscript}{customized subscript text role}} -This is a $^{\mbox{\scriptsize \DUrole{custom-superscript}{customized superscript text role}}}$ +This is a \textsuperscript{\DUrole{custom-superscript}{customized superscript text role}} This is a \DUroletitlereference{\DUrole{custom-title-reference}{customized title-reference text role}} diff --git a/test/test_writers/test_latex2e.py b/test/test_writers/test_latex2e.py index 584b166fe..990cfcb62 100755 --- a/test/test_writers/test_latex2e.py +++ b/test/test_writers/test_latex2e.py @@ -29,6 +29,7 @@ r"""% generated by Docutils <http://docutils.sourceforge.net/> %\usepackage[OT1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{ifthen} +\usepackage{fixltx2e} % fix LaTeX2e shortcomings """) latex_requirements = b("""\usepackage{typearea} |
