tables not being placed in margin in latex/pdf
@cscheid is already working on this.
Since Oct 17, 2024.
Assessment
This issue has not been assessed yet.
Description
Bug description
Tables placed in fenced divs with .column-margin should appear in the margin, as should tables with chunk option column: margin.
Markdown (pipe) tables seem to only be placed in the margin if they have no label (table 1), otherwise they're placed in the main body, whether the label is in the fenced div (table 2) or in the table caption (table 3).
Chunk output tables seem to be placed in the margin if they're in a fenced div (table 4) but not if they have the margin chunk option (table 5).
The latex for all of these tables seems to be basically the same (using the longtable environment), with the difference being just whether they're wrapped in a marginnote environment.
Steps to reproduce
---
format:
pdf:
keep-tex: true
execute:
echo: false
---
Table 1 appears in the margin but isn't labelled/referenceable
::: {.column-margin}
| Col1 | Col2 |
|------|------|
| a | b |
| c | d |
: pipe table without label
:::
@tbl-label-fenced fails to appear in the margin
::: {.column-margin #tbl-label-fenced}
| Col1 | Col2 |
|------|------|
| a | b |
| c | d |
: pipe table with label in fenced div
:::
@tbl-label-caption fails to appear in the margin
::: {.column-margin}
| Col1 | Col2 |
|------|------|
| a | b |
| c | d |
: pipe table with label in caption {#tbl-label-caption}
:::
@tbl-chunk-fenced appears in the margin!
::: {.column-margin}
```{r}
#| label: tbl-chunk-fenced
#| tbl-cap: "chunk output table in fenced div"
knitr::kable(head(mtcars[,1:2], 2))
```
:::
@tbl-chunk-opt fails to appear in the margin
```{r}
#| column: margin
#| label: tbl-chunk-opt
#| tbl-cap: "chunk output table with chunk option"
knitr::kable(head(mtcars[,1:2], 2))
```
Expected behavior
All these tables are placed in the margin.
Actual behavior
Pipe tables with labels are placed in the main body, chunk output tables with margin chunk option are placed in the main body.
Your environment
No response
Quarto check output
Quarto 1.5.56
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.56
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2023.10
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/mikabr/Library/TinyTeX/bin/universal-darwin
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.3
Path: /opt/homebrew/opt/python@3.12/bin/python3.12
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.3.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/mikabr/Dropbox (Personal)/projects/_langcog/_experimentology/experimentology/renv/library/R-4.3/aarch64-apple-darwin20
- /Users/mikabr/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.3/aarch64-apple-darwin20/ac5c2659
knitr: 1.45
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy-website#2595 ·