Repository navigation
Fix numbering of several footnotes in one callout in LaTeX output - #15412
Open
chanellebingham wants to merge 1 commit into
Open
chanellebingham wants to merge 1 commit into
chanellebingham wants to merge 1 commit into
Conversation
Footnotes inside a callout become \footnotemark, with their text written after the box using \footnotetext. Each mark steps the footnote counter and a plain \footnotetext uses its current value, so every text got the last mark's number. Rewind the counter to the first mark and step it before each following text. Fixes quarto-dev#15299
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15299
Description
When a callout has more than one footnote, the PDF prints all of them at the bottom of the page with the callout's last number. On the test page the notes came out as 1, 2, 5, 5, 5 instead of 1, 2, 3, 4, 5.
Inside a callout, footnotes are written as
\footnotemark, with their text added after the box using\footnotetext. Each mark steps the footnote counter, and\footnotetextuses wherever the counter is at, so every text got the last number. This rewinds the counter to the first mark, then steps it before each of the other texts. A callout with a single footnote is unchanged.The numbers were checked in a rendered PDF for default, simple (with and without an icon) and minimal callouts. The new smoke test fails on
mainand passes here.Some rarer cases are not fixed here and are also wrong on
main, so they are left for separate issues:reference-location: marginChecklist
I have (if applicable):
main. That includes the 2tufte.qmdcases, which don't finish on either becauselualatexhangs on this machine; the LaTeX it receives is byte-identical on both. The full suite also needs Python and Julia, which aren't installed here.)AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.