LaTeX: remove use of \ifthenelse macro from sphinx.sty

Simpler \ifdefined is already available without package.
This commit is contained in:
jfbu 2016-06-05 21:34:25 +02:00
parent cb26ec4d4c
commit ff8d4709d8

View File

@ -21,6 +21,7 @@
% For framing code-blocks and warning type notices, and shadowing topics % For framing code-blocks and warning type notices, and shadowing topics
\RequirePackage{framed} \RequirePackage{framed}
\newif\ifSphinx@inframed % flag set if we are in a framed environment \newif\ifSphinx@inframed % flag set if we are in a framed environment
% ifthen not used anymore and will be removed at Sphinx-1.5
\RequirePackage{ifthen} \RequirePackage{ifthen}
% The xcolor package draws better fcolorboxes around verbatim code % The xcolor package draws better fcolorboxes around verbatim code
\IfFileExists{xcolor.sty}{ \IfFileExists{xcolor.sty}{
@ -752,12 +753,12 @@
\fi% \fi%
} }
\providecommand*{\DUprovidelength}[2]{ \providecommand*{\DUprovidelength}[2]{%
\ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{} \ifdefined#1\else\newlength{#1}\setlength{#1}{#2}\fi
} }
\DUprovidelength{\DUlineblockindent}{2.5em} \DUprovidelength{\DUlineblockindent}{2.5em}
\ifthenelse{\isundefined{\DUlineblock}}{ \ifdefined\DUlineblock\else
\newenvironment{DUlineblock}[1]{% \newenvironment{DUlineblock}[1]{%
\list{}{\setlength{\partopsep}{\parskip} \list{}{\setlength{\partopsep}{\parskip}
\addtolength{\partopsep}{\baselineskip} \addtolength{\partopsep}{\baselineskip}
@ -768,8 +769,7 @@
\raggedright \raggedright
} }
{\endlist} {\endlist}
}{} \fi
% From footmisc.sty: allows footnotes in titles % From footmisc.sty: allows footnotes in titles
\let\FN@sf@@footnote\footnote \let\FN@sf@@footnote\footnote