Closed
Description
Describe the bug
Since Sphinx 5.0.0 (PR #10191) there is a mechanism for PDF output via LaTeX so that footnotes which end up on a later page get referred to as Page N, M
where N is page number and M footnote number.
But sometimes the Page N,
part is printed even though the footnote is on same page as footnote mark.
How to Reproduce
index.rst
Welcome to FOO's documentation!
===============================
.. toctree::
index1
index2
index1.rst
A chapter
=========
Test footnote in title [#]_
---------------------------
Text
.. [#] I am on same page
index2.rst
Another chapter
===============
Problematic PR [#]_
-------------------
Text.
.. [#] https://github.com/sphinx-doc/sphinx/pull/10191
Environment Information
Python version: 3.12.3 (v3.12.3:f6650f9ad7, Apr 9 2024, 08:18:48) [Clang 13.0.0 (clang-1300.0.29.30)])
Python implementation: CPython
Sphinx version: 7.4.0+/98f953e15
Docutils version: 0.21.2
Jinja2 version: 3.1.4
Pygments version: 2.18.0
Sphinx extensions
No response
Additional context
Originally reported on sphinx-users newsgroup news://news.gmane.io:119/5ce01972-b17d-407f-9b62-742ce50a7375n@googlegroups.com