quarto-dev / quarto-dev/quarto-cli
Wide table with column: page does not fill the page width in PDF
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 6k
- Fork
- 458
- Merge medio
- 1g 9h
- PR unite (30g)
- 41
Descrizione
Bug description
Wide tables do not stretch beyond the body column in PDFs.
(For HTML, it is working:)
Steps to reproduce
---
title: Example
format:
pdf:
papersize: a4
fontsize: 9pt
geometry:
- showframe
html:
fontsize: 9pt
---
```{python}
# | label: tbl-official-overview
# | tbl-cap: Official overview.
# | column: page
# | echo: false
from IPython.display import Markdown
import pandas as pd
md = pd.read_csv("table.csv", sep=";").to_markdown(index=False)
print("\n".join(md.split("\n")[:4]))
Markdown(md)
```
table.csv:
region;city;kpop;cap?;reg?;obs?;2015;2016;2017;2018;2019;2020;2021;2022
Baden-Württemberg;Karlsruhe;283; ;x; ; ; ; ; ; ; ;490;467
Bayern;München;1,260;x;x; ; ; ; ;1,145;1,170;1,364;1,983;1,169
Berlin;Berlin;3,426;x;x;x; ; ; ;4,290;5,405;5,890;6,207;6,442
Brandenburg;Potsdam;182;x;x; ; ; ; ; ;214;238;287;326
Bremen;Bremen;546;x; ; ; ; ; ; ;654;631;623;721
Hamburg;–;–; ; ; ; ; ; ; ; ; ; ;
Hessen;Wiesbaden;278;x;x; ; ; ; ; ;159;235;304;256
Mecklenburg-Vorpommern;–;–; ; ; ; ; ; ; ; ; ; ;
Niedersachsen;–;–; ; ; ; ; ; ; ; ; ; ;
Nordrhein-Westfalen;Köln;963; ;x; ; ; ; ;1,037; ; ; ;1,551
Nordrhein-Westfalen;Wuppertal;360; ;x; ; ; ; ; ; ; ; ;209
Rheinland-Pfalz;Mainz;217;x;x; ; ; ; ;255;248;305;312;411
Saarland;–;–; ; ; ; ; ; ; ; ; ; ;
Sachsen;Dresden;556;x;x; ; ; ; ; ; ;164;292;405
Sachsen-Anhalt;Magdeburg;235;x;x;x;215;167;135;175;222;312;411;435
Schleswig-Holstein;Kiel;246;x;x; ; ; ; ; ; ; ;272;341
Thüringen;Erfurt;213;x; ; ; ; ; ; ;305;285;331;351
;sum;8,771;10;11;2;215;167;135;6,902;8,377;9,424;11,512;13,084
Markdown that is produced as intermediate step:
| region | city | kpop | cap? | reg? | obs? | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 |
|:-----------------------|:----------|:-------|:-------|:--------|:--------|:-------|:-------|:-------|:-------|:-------|:-------|:-------|:-------|
| Baden-Württemberg | Karlsruhe | 283 | | x | | | | | | | | 490 | 467 |
| Bayern | München | 1,260 | x | x | | | | | 1,145 | 1,170 | 1,364 | 1,983 | 1,169 |
| Berlin | Berlin | 3,426 | x | x | x | | | | 4,290 | 5,405 | 5,890 | 6,207 | 6,442 |
| Brandenburg | Potsdam | 182 | x | x | | | | | | 214 | 238 | 287 | 326 |
| Bremen | Bremen | 546 | x | | | | | | | 654 | 631 | 623 | 721 |
| Hamburg | – | – | | | | | | | | | | | |
| Hessen | Wiesbaden | 278 | x | x | | | | | | 159 | 235 | 304 | 256 |
| Mecklenburg-Vorpommern | – | – | | | | | | | | | | | |
| Niedersachsen | – | – | | | | | | | | | | | |
| Nordrhein-Westfalen | Köln | 963 | | x | | | | | 1,037 | | | | 1,551 |
| Nordrhein-Westfalen | Wuppertal | 360 | | x | | | | | | | | | 209 |
| Rheinland-Pfalz | Mainz | 217 | x | x | | | | | 255 | 248 | 305 | 312 | 411 |
| Saarland | – | – | | | | | | | | | | | |
| Sachsen | Dresden | 556 | x | x | | | | | | | 164 | 292 | 405 |
| Sachsen-Anhalt | Magdeburg | 235 | x | x | x | 215 | 167 | 135 | 175 | 222 | 312 | 411 | 435 |
| Schleswig-Holstein | Kiel | 246 | x | x | | | | | | | | 272 | 341 |
| Thüringen | Erfurt | 213 | x | | | | | | | 305 | 285 | 331 | 351 |
| | sum | 8,771 | 10 | 11 | 2 | 215 | 167 | 135 | 6,902 | 8,377 | 9,424 | 11,512 | 13,084 |
The rendered table (just to show that the Markdown is correct):
| region | city | kpop | cap? | reg? | obs? | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Baden-Württemberg | Karlsruhe | 283 | x | 490 | 467 | ||||||||
| Bayern | München | 1,260 | x | x | 1,145 | 1,170 | 1,364 | 1,983 | 1,169 | ||||
| Berlin | Berlin | 3,426 | x | x | x | 4,290 | 5,405 | 5,890 | 6,207 | 6,442 | |||
| Brandenburg | Potsdam | 182 | x | x | 214 | 238 | 287 | 326 | |||||
| Bremen | Bremen | 546 | x | 654 | 631 | 623 | 721 | ||||||
| Hamburg | – | – | |||||||||||
| Hessen | Wiesbaden | 278 | x | x | 159 | 235 | 304 | 256 | |||||
| Mecklenburg-Vorpommern | – | – | |||||||||||
| Niedersachsen | – | – | |||||||||||
| Nordrhein-Westfalen | Köln | 963 | x | 1,037 | 1,551 | ||||||||
| Nordrhein-Westfalen | Wuppertal | 360 | x | 209 | |||||||||
| Rheinland-Pfalz | Mainz | 217 | x | x | 255 | 248 | 305 | 312 | 411 | ||||
| Saarland | – | – | |||||||||||
| Sachsen | Dresden | 556 | x | x | 164 | 292 | 405 | ||||||
| Sachsen-Anhalt | Magdeburg | 235 | x | x | x | 215 | 167 | 135 | 175 | 222 | 312 | 411 | 435 |
| Schleswig-Holstein | Kiel | 246 | x | x | 272 | 341 | |||||||
| Thüringen | Erfurt | 213 | x | 305 | 285 | 331 | 351 | ||||||
| sum | 8,771 | 10 | 11 | 2 | 215 | 167 | 135 | 6,902 | 8,377 | 9,424 | 11,512 | 13,084 |
Expected behavior
The table should fill both the body column and the margin.
Actual behavior
In the PDF, the table only fills the body column. The table caption is too far at the left.
In the HTML, things work.
https://quarto.org/docs/authoring/article-layout.html#pdflatex-layout states that PDF does not support all layout options in PDF, but to my understanding this one should work.
Your environment
- IDE: VSCode, but this is an issue with quarto-cli
- OS: MacOS 13.4
Quarto check output
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.361
Path: /Applications/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.10
Path: /Users/david/Repositories/protest-impact/.venv/bin/python
Jupyter: 5.3.0
Kernels: ir, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
knitr: 1.39
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.