-
Notifications
You must be signed in to change notification settings - Fork 331
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
Unexpected behaviors in marginal figures with subfigures #11854
Comments
The issue is that you are applying column-margin at the same level as the composite figure. You should not set column and layout at the same time in a code cell. In general, you should not mix at the same level layout options. See
|
Thanks, that is helpful. I did not see it addressed anywhere in the documentation. |
it's not, at least not explicitly. |
To note, the behaviour when combining
|
This is a bug in how the fenced div is created in a code cell as the options can be actually combined at least in 1.7.9 and above. Nesting layout options is a workaround in the end. |
Just a note, as people work on this: the issue is not necessarily limited to content with sub-parts. It appears with tables generated by a code cell. ---
title: "Test"
format: html
---
Sadly, the caption of @tbl-test-1 appears in the main column.
```{r echo=FALSE}
#| label: tbl-test-1
#| tbl-cap: "Marginal table with caption in main column"
#| column: margin
plot(rnorm(100))
```
@tbl-test-2 is made with the workaround, applying the styling to an enclosing div:
::: {.column-margin}
```{r echo=FALSE}
#| label: tbl-test-2
#| tbl-cap: "Marginal table with caption in expected place"
plot(rnorm(100))
```
::: |
Thanks for the additional details. Side note: do not mix code cells options syntax. Still to YAML. |
Good to know, that we should not mix syntax. |
Bug description
When attempting to make a figure with sub-figures appear in the margin, the caption for the entire figure appears in the main column, and if one formats with
layout-ncol
the figure shows up in the main column, lying over subsequent content.Steps to reproduce
Reproduced with source code here.
Expected behavior
Figures and their captions should appear in the margin.
Actual behavior
The caption for the entire figure appears in the main column, and if one formats with
layout-ncol
the figure shows up in the main column, lying over subsequent content.Your environment
Quarto check output
Quarto 1.7.9 [✓] Checking environment information... Quarto cache location: /Users/homer/Library/Caches/quarto [✓] Checking versions of quarto binary dependencies... Pandoc version 3.4.0: OK Dart Sass version 1.70.0: OK Deno version 1.46.3: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.7.9 Path: /Applications/quarto/bin [✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed) [✓] Checking LaTeX....................OK Using: Installation From Path Path: /Library/TeX/texbin Version: 2024 [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.9.6 Path: /Library/Developer/CommandLineTools/usr/bin/python3 Jupyter: (None) Jupyter is not available in this Python installation. Install with python3 -m pip install jupyter [✓] Checking R installation...........OK Version: 4.4.2 Path: /Library/Frameworks/R.framework/Resources LibPaths: - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library knitr: 1.49 rmarkdown: 2.29 [✓] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered: