mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: avoid a footnote in a signature line executing \label twice
The signature may contain an auto-generated footnote, which now always sets a label (formerly this happened only for multiply referred-to footnotes so the problem did not arise).
This commit is contained in:
parent
33cc980cec
commit
a1d9127725
@ -137,7 +137,11 @@
|
||||
\pysigadjustitemsep
|
||||
}
|
||||
\newcommand{\pysiglinewithargsret}[3]{%
|
||||
% as #1 may contain a footnote using \label we need to make \label
|
||||
% a no-op here to avoid LaTeX complaining about duplicates
|
||||
\let\spx@label\label\let\label\@gobble
|
||||
\settowidth{\py@argswidth}{#1\sphinxcode{(}}%
|
||||
\let\label\spx@label
|
||||
\py@argswidth=\dimexpr\linewidth+\labelwidth-\py@argswidth\relax\relax
|
||||
\item[{#1\sphinxcode{(}\py@sigparams{#2}{#3}\strut}]
|
||||
\pysigadjustitemsep
|
||||
|
Loading…
Reference in New Issue
Block a user