Fix refs positionning using a div for PDF output #7621
Merged
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.
This should fix #6867
As discussed, this is a regression in 1.4 due to some change at #6620 regarding flattening the divs in
coalesce_raw()
atsrc\resources\filters\quarto-finalize\coalesceraw.lua
This PR complements the fix at #6952 by also checking for empty ids on the Div before doing the flattening.
@cscheid is that too wide ? We could just disallow flattening for div with id
refs
if needed. I am not too sure why we would flatten in LaTeX all the div of the document - but you know better.Also I added some tests. For that, I thought about your Lua testing tricks. But it required to add and entry point at the very end .
Is that ok ?
Otherwise, classic test is to check inside output.
To prevent regression, I also added some tests about the refs positioning feature for natbib and biblatex, which is a Quarto feature (https://quarto.org/docs/authoring/footnotes-and-citations.html#bibliography-generation) cc @dragonstyle I did not found any for this feature