From a51331c4b7d35af73e566ef724e2e12d70917f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Fri, 17 May 2024 12:28:50 +0200 Subject: [PATCH] LaTeX: fix #12380 (#12382) --- CHANGES.rst | 3 +++ sphinx/texinputs/sphinxpackagefootnote.sty | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cc4e9db59..98f0334bb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 ------- diff --git a/sphinx/texinputs/sphinxpackagefootnote.sty b/sphinx/texinputs/sphinxpackagefootnote.sty index 55901234d..7f2e29138 100644 --- a/sphinx/texinputs/sphinxpackagefootnote.sty +++ b/sphinx/texinputs/sphinxpackagefootnote.sty @@ -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 @@ -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