Fix an issue with `\pysigline` in LaTeX style file.

This issue was initially reported as
<http://tex.stackexchange.com/questions/201270/argument-of-item-has-an-extra>

The commit also fixes two other potential problematic code locations in
sphinx.sty
This commit is contained in:
jfbu
2016-10-09 22:19:25 +02:00
parent 6a6843096c
commit 5e2c8b9f74
+3 -3
View File
@@ -564,12 +564,12 @@
\newlength{\py@argswidth}
\newcommand{\py@sigparams}[2]{%
\parbox[t]{\py@argswidth}{#1\sphinxcode{)}#2}}
\newcommand{\pysigline}[1]{\item[#1]\nopagebreak}
\newcommand{\pysigline}[1]{\item[{#1}]\nopagebreak}
\newcommand{\pysiglinewithargsret}[3]{%
\settowidth{\py@argswidth}{#1\sphinxcode{(}}%
\addtolength{\py@argswidth}{-2\py@argswidth}%
\addtolength{\py@argswidth}{\linewidth}%
\item[#1\sphinxcode{(}\py@sigparams{#2}{#3}]}
\item[{#1\sphinxcode{(}\py@sigparams{#2}{#3}}]}
% Production lists
%
@@ -787,7 +787,7 @@
%
\newenvironment{definitions}{%
\begin{description}%
\def\term##1{\item[##1]\mbox{}\\*[0mm]}
\def\term##1{\item[{##1}]\mbox{}\\*[0mm]}
}{%
\end{description}%
}