summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2017-08-08 21:39:19 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2017-08-08 21:39:19 +0000
commitfb586be34ad228b02a4573bc71da0ad1567dc421 (patch)
tree691981e5ce1c1dfdd492f064bcc3cec11b1af226 /test
parent9fd8f35a3a069f22a25d0b93f96ec64d5de8eb88 (diff)
downloaddocutils-fb586be34ad228b02a4573bc71da0ad1567dc421.tar.gz
Fix [ 323 ]: do not add ``\\\\phantomsection`` and whitespace to ``parts["title"].
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@8161 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test')
-rw-r--r--test/functional/expected/cyrillic.tex1
-rw-r--r--test/functional/expected/latex_babel.tex1
-rw-r--r--test/functional/expected/latex_cornercases.tex9
-rw-r--r--test/functional/expected/latex_docinfo.tex6
-rw-r--r--test/functional/expected/standalone_rst_latex.tex9
-rw-r--r--test/functional/expected/standalone_rst_xetex.tex5
-rw-r--r--test/functional/expected/xetex-cyrillic.tex1
-rwxr-xr-xtest/test_writers/test_latex2e.py7
8 files changed, 11 insertions, 28 deletions
diff --git a/test/functional/expected/cyrillic.tex b/test/functional/expected/cyrillic.tex
index d562fd6ca..28a48dcc1 100644
--- a/test/functional/expected/cyrillic.tex
+++ b/test/functional/expected/cyrillic.tex
@@ -28,7 +28,6 @@
\urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
-
%%% Body
\begin{document}
diff --git a/test/functional/expected/latex_babel.tex b/test/functional/expected/latex_babel.tex
index 106dcb6f5..14cdbac03 100644
--- a/test/functional/expected/latex_babel.tex
+++ b/test/functional/expected/latex_babel.tex
@@ -31,7 +31,6 @@
\urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
-
%%% Body
\begin{document}
diff --git a/test/functional/expected/latex_cornercases.tex b/test/functional/expected/latex_cornercases.tex
index 25079a4a1..175511ee6 100644
--- a/test/functional/expected/latex_cornercases.tex
+++ b/test/functional/expected/latex_cornercases.tex
@@ -37,15 +37,12 @@
pdftitle={Some Tests for the LaTeX Writer},
}
-%%% Title Data
-\title{\phantomsection%
- Some Tests for the LaTeX Writer%
+%%% Body
+\begin{document}
+\title{Some Tests for the LaTeX Writer%
\label{some-tests-for-the-latex-writer}}
\author{}
\date{}
-
-%%% Body
-\begin{document}
\maketitle
These tests contain unusual combinations of syntax elements which may cause
diff --git a/test/functional/expected/latex_docinfo.tex b/test/functional/expected/latex_docinfo.tex
index a51d15891..0be892f78 100644
--- a/test/functional/expected/latex_docinfo.tex
+++ b/test/functional/expected/latex_docinfo.tex
@@ -25,7 +25,8 @@
pdfauthor={Foo Fred;Bar Barney}
}
-%%% Title Data
+%%% Body
+\begin{document}
\title{}
\author{Foo Fred\\
Food Foomatics \& Friends\\
@@ -38,9 +39,6 @@ Bar-BQ Bar\\
Barbara St 16\\
South Barwell}
\date{}
-
-%%% Body
-\begin{document}
\maketitle
\end{document}
diff --git a/test/functional/expected/standalone_rst_latex.tex b/test/functional/expected/standalone_rst_latex.tex
index 42fe61553..6b4222fc2 100644
--- a/test/functional/expected/standalone_rst_latex.tex
+++ b/test/functional/expected/standalone_rst_latex.tex
@@ -196,9 +196,9 @@
pdfauthor={David Goodger;Me;Myself;I}
}
-%%% Title Data
-\title{\phantomsection%
- reStructuredText Test Document%
+%%% Body
+\begin{document}
+\title{reStructuredText Test Document%
\label{restructuredtext-test-document}%
\label{doctitle}%
\\ % subtitle%
@@ -207,9 +207,6 @@
\label{subtitle}}
\author{}
\date{}
-
-%%% Body
-\begin{document}
\maketitle
% Docinfo
diff --git a/test/functional/expected/standalone_rst_xetex.tex b/test/functional/expected/standalone_rst_xetex.tex
index 058c20e5c..111f6eb7f 100644
--- a/test/functional/expected/standalone_rst_xetex.tex
+++ b/test/functional/expected/standalone_rst_xetex.tex
@@ -186,7 +186,6 @@
\hspace*{\fill}\hrulefill\hspace*{\fill}
\vskip 0.5\baselineskip
}
-
% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
@@ -198,9 +197,7 @@
pdfauthor={David Goodger;Me;Myself;I}
}
-%%% Title Data
-\title{\phantomsection%
- reStructuredText Test Document%
+\title{reStructuredText Test Document%
\label{restructuredtext-test-document}%
\label{doctitle}%
\\ % subtitle%
diff --git a/test/functional/expected/xetex-cyrillic.tex b/test/functional/expected/xetex-cyrillic.tex
index 13727e7de..8268a71d9 100644
--- a/test/functional/expected/xetex-cyrillic.tex
+++ b/test/functional/expected/xetex-cyrillic.tex
@@ -26,7 +26,6 @@
% titlereference role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
-
% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,unicode=false]{hyperref}
diff --git a/test/test_writers/test_latex2e.py b/test/test_writers/test_latex2e.py
index 6a3ada132..0c68f8cb1 100755
--- a/test/test_writers/test_latex2e.py
+++ b/test/test_writers/test_latex2e.py
@@ -45,10 +45,9 @@ $latex_preamble
$stylesheet
%%% Fallback definitions for Docutils-specific commands
$fallbacks$pdfsetup
-$titledata
%%% Body
\begin{document}
-""")
+$titledata""")
parts = dict(
head_prefix = r"""\documentclass[a4paper]{article}
@@ -899,9 +898,7 @@ head_template.substitute(dict(parts,
pdfsetup=parts['pdfsetup'] + r"""\hypersetup{
pdftitle={This is the Title},
}
-""", titledata=r"""%%% Title Data
-\title{\phantomsection%
- This is the \emph{Title}%
+""", titledata=r"""\title{This is the \emph{Title}%
\label{this-is-the-title}%
\\ % subtitle%
\DUdocumentsubtitle{This is the \emph{Subtitle}}%