Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX: fix #12380 #12382

Merged
merged 2 commits into from
May 17, 2024
Merged

LaTeX: fix #12380 #12382

merged 2 commits into from
May 17, 2024

Conversation

jfbu
Copy link
Contributor

@jfbu jfbu commented May 17, 2024

Subject: Fix #12380 (LaTeX footnotes)

The problem was there ever since #10191 added the footnote feature to
indicate the page number where footnote ends up printed, if not on same
page.

It is complicated to add a test for this change because the patch only
modifies how a certain custom LaTeX macro behaves so one has to check
PDF output which is bothersome. But it got tested with a number of
sources already used for #10191 (one such test showed already the #12380
problem, but got overlooked at that time).

MEMO: the feature works only when Sphinx uses \sphinxfootnotemark
mark-up in LaTeX output; sometimes it may use rather a footnote
environment, then the mechanism is not activated. This may happen for
example inside a cell of a long table, it can be that Page N will not
be added, because the \sphinxfootnotemark which does that is not
activated, although the footnote, which gets printed after the long
table ends, is on a different page.

Feature or Bugfix

  • Bugfix

Relates

jfbu added 2 commits May 17, 2024 12:03
The problem was there ever since sphinx-doc#10191 added the footnote feature to
indicate the page number where footnote ends up printed, if not on same
page.

It is complicated to add a test for this change because the patch only
modifies how a certain custom LaTeX macro behaves so one has to check
PDF output which is bothersome.  But it got tested with a number of
sources already used for sphinx-doc#10191 (one such test showed already the sphinx-doc#12380
problem, but got overlooked at that time).

MEMO: the feature works only when Sphinx uses `\sphinxfootnotemark`
mark-up in LaTeX output; sometimes it may use rather a `footnote`
environment, then the mechanism is not activated.  This may happen for
example inside a cell of a long table, it can be that `Page N` will not
be added, because the `\sphinxfootnotemark` which does that is not
activated, although the footnote, which gets printed after the long
table ends, is on a different page.
@jfbu jfbu merged commit a51331c into sphinx-doc:master May 17, 2024
23 checks passed
@jfbu jfbu deleted the latex_fix_12380 branch May 17, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LaTeX: footnote mark may indicate "Page N, M" but footnote M is already on page N
1 participant