#404: Make `\and work properly in the author field of the latex_documents` setting.

This commit is contained in:
Georg Brandl 2010-05-22 14:15:39 +02:00
parent 87a4417791
commit 529d3f5329
5 changed files with 18 additions and 6 deletions

View File

@ -1,6 +1,9 @@
Release 0.6.6 (in development) 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 * #409: Make the ``highlight_language`` config value work properly
in the LaTeX builder. in the LaTeX builder.

View File

@ -65,7 +65,7 @@ htmlhelp_basename = 'Sphinxdoc'
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]). # (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation', 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. # Add our logo to the LaTeX file.
latex_logo = '_static/sphinx.png' latex_logo = '_static/sphinx.png'

View File

@ -22,10 +22,11 @@
\rule{\textwidth}{1pt} \rule{\textwidth}{1pt}
\ifsphinxpdfoutput \ifsphinxpdfoutput
\begingroup \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 % changes \\ to ', ' (comma-space), making it pass muster for
% generating document info in the PDF file. % generating document info in the PDF file.
\def\\{, } \def\\{, }
\def\and{and }
\pdfinfo{ \pdfinfo{
/Author (\@author) /Author (\@author)
/Title (\@title) /Title (\@title)
@ -37,7 +38,10 @@
{\rm\Huge\py@HeaderFamily \@title} \par {\rm\Huge\py@HeaderFamily \@title} \par
{\em\large\py@HeaderFamily \py@release\releaseinfo} \par {\em\large\py@HeaderFamily \py@release\releaseinfo} \par
\vspace{25pt} \vspace{25pt}
{\Large\py@HeaderFamily \@author} \par {\Large\py@HeaderFamily
\begin{tabular}[t]{c}
\@author
\end{tabular}} \par
\vspace{25pt} \vspace{25pt}
\@date \par \@date \par
\py@authoraddress \par \py@authoraddress \par

View File

@ -26,10 +26,11 @@
\rule{\textwidth}{1pt}% \rule{\textwidth}{1pt}%
\ifsphinxpdfoutput \ifsphinxpdfoutput
\begingroup \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 % changes \\ to ', ' (comma-space), making it pass muster for
% generating document info in the PDF file. % generating document info in the PDF file.
\def\\{, } \def\\{, }
\def\and{and }
\pdfinfo{ \pdfinfo{
/Author (\@author) /Author (\@author)
/Title (\@title) /Title (\@title)
@ -41,7 +42,11 @@
{\rm\Huge\py@HeaderFamily \@title \par}% {\rm\Huge\py@HeaderFamily \@title \par}%
{\em\LARGE\py@HeaderFamily \py@release\releaseinfo \par} {\em\LARGE\py@HeaderFamily \py@release\releaseinfo \par}
\vfill \vfill
{\LARGE\py@HeaderFamily \@author \par} {\LARGE\py@HeaderFamily
\begin{tabular}[t]{c}
\@author
\end{tabular}
\par}
\vfill\vfill \vfill\vfill
{\large {\large
\@date \par \@date \par

View File

@ -41,7 +41,7 @@ htmlhelp_basename = 'SphinxTestsdoc'
latex_documents = [ latex_documents = [
('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation', ('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation',
'Georg Brandl', 'manual'), 'Georg Brandl \\and someone else', 'manual'),
] ]
latex_additional_files = ['svgimg.svg'] latex_additional_files = ['svgimg.svg']