Commits

Georg Brandl committed 3cf6181

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

Comments (0)

Files changed (5)

 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.
 
 # 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'

sphinx/texinputs/howto.cls

   \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)
     {\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

sphinx/texinputs/manual.cls

     \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)
       {\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

tests/root/conf.py

 
 latex_documents = [
   ('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation',
-   'Georg Brandl', 'manual'),
+   'Georg Brandl \\and someone else', 'manual'),
 ]
 
 latex_additional_files = ['svgimg.svg']
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.