Merge pull request #3023 from jfbu/fixpysiglineissue

Fix an issue with ``\pysigline`` in LaTeX style file.
This commit is contained in:
Jean-François B 2016-10-10 20:59:59 +02:00 committed by GitHub
commit 940fa11b9b

View File

@ -546,12 +546,12 @@
\newlength{\py@argswidth} \newlength{\py@argswidth}
\newcommand{\py@sigparams}[2]{% \newcommand{\py@sigparams}[2]{%
\parbox[t]{\py@argswidth}{#1\sphinxcode{)}#2}} \parbox[t]{\py@argswidth}{#1\sphinxcode{)}#2}}
\newcommand{\pysigline}[1]{\item[#1]\nopagebreak} \newcommand{\pysigline}[1]{\item[{#1}]\nopagebreak}
\newcommand{\pysiglinewithargsret}[3]{% \newcommand{\pysiglinewithargsret}[3]{%
\settowidth{\py@argswidth}{#1\sphinxcode{(}}% \settowidth{\py@argswidth}{#1\sphinxcode{(}}%
\addtolength{\py@argswidth}{-2\py@argswidth}% \addtolength{\py@argswidth}{-2\py@argswidth}%
\addtolength{\py@argswidth}{\linewidth}% \addtolength{\py@argswidth}{\linewidth}%
\item[#1\sphinxcode{(}\py@sigparams{#2}{#3}]} \item[{#1\sphinxcode{(}\py@sigparams{#2}{#3}}]}
% Production lists % Production lists
% %
@ -774,7 +774,7 @@
% %
\newenvironment{definitions}{% \newenvironment{definitions}{%
\begin{description}% \begin{description}%
\def\term##1{\item[##1]\mbox{}\\*[0mm]} \def\term##1{\item[{##1}]\mbox{}\\*[0mm]}
}{% }{%
\end{description}% \end{description}%
} }