knitr: fig-width, fig-height and fig-format are silently ignored outside execute: and cell options
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start in crates/quarto-core/src/engine/knitr/mod.rs at build_format_config, which calls overlay_document_scope in engine/knitr/format.rs. Reproduce with the header example and confirm that fig-width is dropped at top level. Maintainers must first decide whether to honor these keys or warn on them, so ask before coding. Done means the chosen behavior holds for top-level and format: html: placements, and docs/guides/authoring/figures.qmd matches it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
fig-width, fig-height and fig-format are silently ignored for knitr documents unless they are under execute: or set on the cell. No warning is emitted, so the figure simply comes out at the defaults (7×5 in, 672×480 px PNG).
docs/guides/authoring/figures.qmd previously told readers to set fig-width and fig-height "in the document header", which leads straight to this.
Reproduction
---
title: t
fig-width: 9
fig-height: 4
fig-format: svg
---
```{r}
plot(1:3)
```
q2 render exits 0 with no warning and produces a 672×480 PNG instead of an SVG.
Results by placement
Tested with q2 0.39.0 and R 4.6.0 on macOS:
| Where the options go | Result |
|---|---|
| Top level of the header | ignored, no warning |
format: html: |
ignored, no warning |
execute: |
works |
Cell #| comments |
works |
Cause
The knitr engine only overlays the execute: scope onto its defaults (build_format_config in crates/quarto-core/src/engine/knitr/mod.rs, which calls overlay_document_scope in engine/knitr/format.rs).
Only knitr was tested; Jupyter's behavior is unknown.
Decision needed
Either honor these options at the top level and under format: <fmt>:, or warn when they appear there.
The docs passage has been corrected locally (not yet committed) to describe the execute: form and to state that the other placements have no effect. That wording would need to change if the options become honored.
- Lingua principale
- Rust
- Stelle
- 283
- Fork
- 20
- Merge medio
- 19h 33m
- PR unite (30g)
- 165
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Altre issue di quarto-dev/q2
-
`q2 add owner/repo@<sha>` fails for a commit SHAForse già presa @cscheid l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
quarto-dev/q2#1005 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/q2#957 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
quarto-dev/q2#986 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
quarto-dev/q2#985 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
quarto-dev/q2#984 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/q2
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
limitlessprojects/Go-Hybrid#3342 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
librespeed/speedtest-rust#52 · 1 commento ·
-
enhancement needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bherbruck/solvecraft#11246 · 1 commento · 1 reazione ·
-
example
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rust-lang-nursery/rust-cookbook#954 ·
I maintainer di solito rispondono entro 1 giorno