summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-05-22 14:15:39 +0200
committerGeorg Brandl <georg@python.org>2010-05-22 14:15:39 +0200
commit529d3f5329b7fc8f374df8d6859cdfd402f966f3 (patch)
tree9a520d12dba85fe647d18ef35018ec6206c9c083
parent87a4417791cd22148ea559363e01b31106b1b95f (diff)
downloadsphinx-git-529d3f5329b7fc8f374df8d6859cdfd402f966f3.tar.gz
#404: Make ``\and`` work properly in the author field of the ``latex_documents`` setting.
-rw-r--r--CHANGES3
-rw-r--r--doc/conf.py2
-rw-r--r--sphinx/texinputs/howto.cls8
-rw-r--r--sphinx/texinputs/manual.cls9
-rw-r--r--tests/root/conf.py2
5 files changed, 18 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index 5980b942c..a46b36d50 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
Release 0.6.6 (in development)
==============================
+* #404: Make ``\and`` work properly in the author field of the
+ ``latex_documents`` setting.
+
* #409: Make the ``highlight_language`` config value work properly
in the LaTeX builder.
diff --git a/doc/conf.py b/doc/conf.py
index 415b0c8dd..70aaf5f4e 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -65,7 +65,7 @@ htmlhelp_basename = 'Sphinxdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',
- 'Georg Brandl', 'manual', 1)]
+ 'Georg Brandl \\and Me Myself', 'manual', 1)]
# Add our logo to the LaTeX file.
latex_logo = '_static/sphinx.png'
diff --git a/sphinx/texinputs/howto.cls b/sphinx/texinputs/howto.cls
index 87d207d17..6844533a7 100644
--- a/sphinx/texinputs/howto.cls
+++ b/sphinx/texinputs/howto.cls
@@ -22,10 +22,11 @@
\rule{\textwidth}{1pt}
\ifsphinxpdfoutput
\begingroup
- % This \def is required to deal with multi-line authors; it
+ % These \defs are required to deal with multi-line authors; it
% changes \\ to ', ' (comma-space), making it pass muster for
% generating document info in the PDF file.
\def\\{, }
+ \def\and{and }
\pdfinfo{
/Author (\@author)
/Title (\@title)
@@ -37,7 +38,10 @@
{\rm\Huge\py@HeaderFamily \@title} \par
{\em\large\py@HeaderFamily \py@release\releaseinfo} \par
\vspace{25pt}
- {\Large\py@HeaderFamily \@author} \par
+ {\Large\py@HeaderFamily
+ \begin{tabular}[t]{c}
+ \@author
+ \end{tabular}} \par
\vspace{25pt}
\@date \par
\py@authoraddress \par
diff --git a/sphinx/texinputs/manual.cls b/sphinx/texinputs/manual.cls
index f94ee6d62..2fb77c620 100644
--- a/sphinx/texinputs/manual.cls
+++ b/sphinx/texinputs/manual.cls
@@ -26,10 +26,11 @@
\rule{\textwidth}{1pt}%
\ifsphinxpdfoutput
\begingroup
- % This \def is required to deal with multi-line authors; it
+ % These \defs are required to deal with multi-line authors; it
% changes \\ to ', ' (comma-space), making it pass muster for
% generating document info in the PDF file.
\def\\{, }
+ \def\and{and }
\pdfinfo{
/Author (\@author)
/Title (\@title)
@@ -41,7 +42,11 @@
{\rm\Huge\py@HeaderFamily \@title \par}%
{\em\LARGE\py@HeaderFamily \py@release\releaseinfo \par}
\vfill
- {\LARGE\py@HeaderFamily \@author \par}
+ {\LARGE\py@HeaderFamily
+ \begin{tabular}[t]{c}
+ \@author
+ \end{tabular}
+ \par}
\vfill\vfill
{\large
\@date \par
diff --git a/tests/root/conf.py b/tests/root/conf.py
index 6657714d7..19c803c98 100644
--- a/tests/root/conf.py
+++ b/tests/root/conf.py
@@ -41,7 +41,7 @@ htmlhelp_basename = 'SphinxTestsdoc'
latex_documents = [
('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation',
- 'Georg Brandl', 'manual'),
+ 'Georg Brandl \\and someone else', 'manual'),
]
latex_additional_files = ['svgimg.svg']