Skip to content

Commit

Permalink
LaTeX: fix #12380 (#12382)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed May 17, 2024
1 parent 43276dc commit a51331c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Bugs fixed
Patch by Matthias Geier.
* #12224: Properly detect WebP files.
Patch by Benjamin Cabé.
* #12380: LaTeX: Footnote mark sometimes indicates ``Page N`` where ``N`` is
the current page number and the footnote does appear on that same page.
Patch by Jean-François B.

Testing
-------
Expand Down
7 changes: 4 additions & 3 deletions sphinx/texinputs/sphinxpackagefootnote.sty
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sphinxpackagefootnote}%
[2022/08/15 v5.3.0 Sphinx custom footnotehyper package (Sphinx team)]
[2024/05/17 v7.3.x Sphinx custom footnotehyper package (Sphinx team)]
%%
%% Package: sphinxpackagefootnote
%% Version: based on footnotehyper.sty 2021/02/04 v1.1d
Expand Down Expand Up @@ -409,9 +409,10 @@
{\gdef\@thefnmark{?}% on first LaTeX run
\refstepcounter{sphinxfootnotemark}\label{footnotemark.\thesphinxfootnotemark}%
}%
{\sphinx@xdef@thefnmark{#1}% also defines \spx@footrefHref
\def\@makefnmark{% will be used by \H@@footnotemark
{\def\@makefnmark{% will be used by \H@@footnotemark
\refstepcounter{sphinxfootnotemark}\label{footnotemark.\thesphinxfootnotemark}%
\sphinx@xdef@thefnmark{#1}% also defines \spx@footrefHref
% must be executed after \refstepcounter
\hyper@linkstart{link}{\spx@footrefHref}%
\spx@saved@makefnmark
\hyper@linkend
Expand Down

0 comments on commit a51331c

Please sign in to comment.