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
Lists inside callouts cause sidenotes to expand frame into margins #8032
Comments
This is indeed similar to #7153 where we put the margin note inside the callout structure and not outside. This is the HTML produced for the first callout that does not work <div class="callout callout-style-default callout-tip callout-titled page-columns page-full">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Tip
</div>
</div>
<div class="callout-body-container callout-body page-columns page-full">
<p>Callout with numbered list</p>
<ol type="1">
<li>blah 2 <a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a></li>
<li>blah 3</li>
</ol>
<div class="no-row-height column-margin column-container">
<li id="fn3">
<p><sup>3</sup> Sidenote for numbered list inside callout</p>
</li>
</div>
</div>
</div>
<div class="no-row-height column-margin column-container">
<li id="fn3">
<p><sup>3</sup> Sidenote for numbered list inside callout</p>
</li>
</div> is put inside the Whereas in first case, it is outside <div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Tip
</div>
</div>
<div class="callout-body-container callout-body">
<p>Line A</p>
<p>Line B <a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
</div>
</div>
<div class="no-row-height column-margin column-container">
<li id="fn1">
<p><sup>1</sup> Sidenote 1</p>
</li>
</div> |
I believe this is the exact same issue as in #7153 When moving the footnote, we are identifying a valid parent quarto-cli/src/format/html/format-html-bootstrap.ts Lines 1616 to 1621 in 27b29d9
and based on that moving to the right container quarto-cli/src/format/html/format-html-bootstrap.ts Lines 1724 to 1800 in 27b29d9
We probably need more edge case in there |
Bug description
When a
:::{callout-tip}
element contains a list, andreference-location
is set tomargin
in document YAML, the resulting element is spread across the entire page, encompassing the left margin and the right margin containing the sidenote.This occurs because the callout element is assigned
page-columns
andpage-full
classes (but removing them doesn't quite fix the layout).Related to #7153 - but with callouts in this newly identified issue, the problem only occurs when the callout contains a list.
Steps to reproduce
quarto create project website quarto-sideref --no-open cd quarto-sideref nano index.qmd
Expected behavior
The callout and sidenote layout should look the same regardless if there is a list in the callout.### ###
Actual behavior
See reprex
Your environment
Quarto check output
Quarto 1.4.533
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.533
Path: /Users/petr/.local/share/qvm/versions/v1.4.533/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/petr/Library/TinyTeX/bin/universal-darwin
Version: 2022
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.0
Path: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
Jupyter: (None)
[✓] Checking R installation...........OK
Version: 4.3.1
Path: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources
LibPaths:
- /Users/petr/Library/R/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.44
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered: