Skip to content

Commit

Permalink
Merge pull request #7559 from quarto-dev/multiple-p-footnote-margin
Browse files Browse the repository at this point in the history
Patch Footnotes when in margin to support multiple paragraph
  • Loading branch information
cscheid authored Nov 22, 2023
2 parents 00e834e + ab1fa7a commit f8dc7c0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
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
-- 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.

0 comments on commit f8dc7c0

Please sign in to comment.