fix(pdf/latex): wrap Note content in Blocks list for reference-location margin (#13588)#14464
Merged
cderv merged 1 commit intoquarto-dev:mainfrom Apr 30, 2026
Conversation
…gin (quarto-dev#13588) n.content on a Note element must be a Blocks list, but the handler introduced for quarto-dev#7534 was assigning a bare pandoc.Para (a single Block), causing scopedwalk.lua to crash with "attempt to get length of a Block value" whenever a footnote appeared alongside a fig-cap figure in a PDF document using reference-location: margin. Wrapping the Para in pandoc.Blocks({...}) restores the correct type and preserves the \endgraf behaviour needed for multi-paragraph sidenotes.
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.
n.contenton aNoteelement must be aBlockslist, but the handler introduced for #7534 was assigning a barepandoc.Para(...)(a singleBlock), causingscopedwalk.luato crash withattempt to get length of a Block valuewhenever a footnote appeared alongside a figure withfig-capin a PDF document usingreference-location: margin.Wrapping the
Parainpandoc.Blocks({...})restores the correct type and preserves the\endgrafbehaviour needed for multi-paragraph sidenotes.Closes #13588