Merge pull request #3550 from jfbu/fixcolorsetup

Streamline obsolete color set-up in LaTeX style file
This commit is contained in:
Jean-François B 2017-03-18 23:15:57 +01:00 committed by GitHub
commit 4fb01cae8c
4 changed files with 16 additions and 32 deletions

View File

@ -402,33 +402,15 @@
%% COLOR (general)
%
% FIXME: the reasons might be obsolete (better color drivers now?)
% use pdfoutput for pTeX and dvipdfmx
% when pTeX (\kanjiskip is defined), set pdfoutput to evade \include{pdfcolor}
\ifx\kanjiskip\undefined\else
\newcount\pdfoutput\pdfoutput=0
\fi
% for PDF output, use colors and maximal compression
\newif\ifsphinxpdfoutput % used in \maketitle
\ifx\pdfoutput\undefined\else
\ifnum\pdfoutput=\z@
\let\py@NormalColor\relax
\let\py@TitleColor\relax
\else
\sphinxpdfoutputtrue
\input{pdfcolor}
\def\py@NormalColor{\color[rgb]{0.0,0.0,0.0}}
\def\py@TitleColor{\color{TitleColor}}
\pdfcompresslevel=9
\fi
\fi
% XeLaTeX can do colors, too
\ifx\XeTeXrevision\undefined\else
\def\py@NormalColor{\color[rgb]{0.0,0.0,0.0}}
\def\py@TitleColor{\color{TitleColor}}
\fi
% FIXME: \normalcolor should probably be used in place of \py@NormalColor
% elsewhere, and \py@NormalColor should never be defined. \normalcolor
% switches to the colour from last \color call in preamble.
\def\py@NormalColor{\color{black}}
% FIXME: it is probably better to use \color{TitleColor}, as TitleColor
% can be customized from 'sphinxsetup', and drop usage of \py@TitleColor
\def\py@TitleColor{\color{TitleColor}}
% FIXME: this line should be dropped, as "9" is default anyhow.
\ifdefined\pdfcompresslevel\pdfcompresslevel = 9 \fi
%% PAGE STYLING

View File

@ -30,8 +30,9 @@
% ``Bjarne'' style a bit better.
%
\renewcommand{\maketitle}{%
\noindent\rule{\textwidth}{1pt}\ifsphinxpdfoutput\newline\null\fi\par
\ifsphinxpdfoutput
\noindent\rule{\textwidth}{1pt}\par
% FIXME: use \hypersetup{pdfauthor={\@author}, pdftitle={\@title}}
\ifdefined\pdfinfo
\begingroup
% These \defs are required to deal with multi-line authors; it
% changes \\ to ', ' (comma-space), making it pass muster for

View File

@ -40,8 +40,9 @@
\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\noindent\rule{\textwidth}{1pt}\ifsphinxpdfoutput\newline\null\fi\par
\ifsphinxpdfoutput
\noindent\rule{\textwidth}{1pt}\par
% FIXME: use \hypersetup{pdfauthor={\@author}, pdftitle={\@title}}
\ifdefined\pdfinfo
\begingroup
% These \defs are required to deal with multi-line authors; it
% changes \\ to ', ' (comma-space), making it pass muster for

View File

@ -86,7 +86,7 @@ DEFAULT_SETTINGS = {
'date': '',
'release': '',
'author': '',
'logo': '',
'logo': '\\vbox{}',
'releasename': '',
'makeindex': '\\makeindex',
'shorthandoff': '',