summaryrefslogtreecommitdiff
path: root/sphinx/texinputs
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2019-11-30 23:47:31 +0100
committerjfbu <jfbu@free.fr>2019-11-30 23:49:57 +0100
commit204c230c7325fdd939635b5b35675a19ace4113f (patch)
tree4391efc1e1b8c194c6573a22c17b98053e1c6dcf /sphinx/texinputs
parent0d80cff43cade8edf81f6d61c1dbe8188025b664 (diff)
downloadsphinx-git-204c230c7325fdd939635b5b35675a19ace4113f.tar.gz
LaTeX: avoid ragged line endings in case of multi-line author display
Closes #6876
Diffstat (limited to 'sphinx/texinputs')
-rw-r--r--sphinx/texinputs/sphinxhowto.cls13
-rw-r--r--sphinx/texinputs/sphinxmanual.cls13
2 files changed, 24 insertions, 2 deletions
diff --git a/sphinx/texinputs/sphinxhowto.cls b/sphinx/texinputs/sphinxhowto.cls
index ba5e0031c..57d73cebf 100644
--- a/sphinx/texinputs/sphinxhowto.cls
+++ b/sphinx/texinputs/sphinxhowto.cls
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{sphinxhowto}[2018/12/23 v2.0 Document class (Sphinx howto)]
+\ProvidesClass{sphinxhowto}[2019/12/01 v2.3.0 Document class (Sphinx howto)]
% 'oneside' option overriding the 'twoside' default
\newif\if@oneside
@@ -27,6 +27,17 @@
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}% i.e. section and subsection
+% Adapt \and command to the flushright context of \sphinxmaketitle, to
+% avoid ragged line endings if author names do not fit all on one single line
+\DeclareRobustCommand{\and}{%
+ \end{tabular}\kern-\tabcolsep
+ \allowbreak
+ \hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}%
+}%
+% If it is desired that each author name be on its own line, use in preamble:
+%\DeclareRobustCommand{\and}{%
+% \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}%
+%}%
% Change the title page to look a bit better, and fit in with the fncychap
% ``Bjarne'' style a bit better.
%
diff --git a/sphinx/texinputs/sphinxmanual.cls b/sphinx/texinputs/sphinxmanual.cls
index e7c8f41ef..718189d57 100644
--- a/sphinx/texinputs/sphinxmanual.cls
+++ b/sphinx/texinputs/sphinxmanual.cls
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{sphinxmanual}[2018/12/23 v2.0 Document class (Sphinx manual)]
+\ProvidesClass{sphinxmanual}[2019/12/01 v2.3.0 Document class (Sphinx manual)]
% chapters starting at odd pages (overridden by 'openany' document option)
\PassOptionsToClass{openright}{\sphinxdocclass}
@@ -30,6 +30,17 @@
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{1}
+% Adapt \and command to the flushright context of \sphinxmaketitle, to
+% avoid ragged line endings if author names do not fit all on one single line
+\DeclareRobustCommand{\and}{%
+ \end{tabular}\kern-\tabcolsep
+ \allowbreak
+ \hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}%
+}%
+% If it is desired that each author name be on its own line, use in preamble:
+%\DeclareRobustCommand{\and}{%
+% \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}%
+%}%
% Change the title page to look a bit better, and fit in with the fncychap
% ``Bjarne'' style a bit better.
%