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

Patch Footnotes when in margin to support multiple paragraph #7559

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
- ([#6990](https://github.com/quarto-dev/quarto-cli/issues/6990)): Fix an issue where underscore in `filename` code cell attribute were not escaped.
- ([#7175](https://github.com/quarto-dev/quarto-cli/issues/7175)): Fix an issue with code annotations when more than one digit is used for annotation number.
- ([#7267](https://github.com/quarto-dev/quarto-cli/issues/7267)): Fix issue with longtable environments interfering with the `table` counter.
- ([#7534](https://github.com/quarto-dev/quarto-cli/issues/7534)): Fix issue with multiple paragraph footnotes when using `reference-location: margin`.

## Docusaurus Format

Expand Down
9 changes: 8 additions & 1 deletion src/resources/filters/quarto-post/latex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,14 @@ function render_latex()
end

return pandoc.Div(calloutContents)
end
end,
Note = function(n)
if marginReferences() then
cscheid marked this conversation as resolved.
Show resolved Hide resolved
-- This is to support multiple paragraphs in footnotes in margin as sidenotes CTAN has some issue (quarto-dev/quarto-cli#7534)
n.content = pandoc.Para(pandoc.utils.blocks_to_inlines(n.content, {pandoc.RawInline('latex', '\n\\endgraf\n')}))
return n
end
end
}
end

Expand Down
17 changes: 17 additions & 0 deletions tests/docs/smoke-all/2023/11/13/7534.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: multiple paragraph in footnotes (#7534)
reference-location: margin
_quarto:
tests:
pdf: null
latex:
ensureFileRegexMatches:
- ['The first paragraph\.[\s\S]+\\endgraf[\s\S]+The second paragraph']
- []
---

Some text.[^note] Some more text.

[^note]: The first paragraph.

The second paragraph.