knitr: fig-width, fig-height and fig-format are silently ignored outside execute: and cell options
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 293
- Forks
- 20
- Merge medio
- 13 h 28 min
- PR fusionados (30 d)
- 163
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/q2
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarto-dev/q2#1032 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
quarto-dev/q2#1031 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarto-dev/q2#1020 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/q2#957 ·
Los mantenedores suelen responder en 1 día
-
hub-client: "Expand markup" and "Expand preview" should hide the other pane instead of shrinking itAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
quarto-dev/q2#1037 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/q2
Issues similares
-
docs(metrics): replace stale src/metrics.rs line anchors in dashboard-metrics.md with symbol namesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
vfarcic/dot-agent-deck#2079 ·
Los mantenedores suelen responder en 1 día
-
修改文件名时主键盘上的数字无法输入Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
qingjian-team/qingjian#894 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
rubys/roundhouse#1757 ·
-
[Feature] 侧边栏Agent HTTP请求UA适配Abiertoenhancement user-priority/P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
t8y2/dbx#14196 · 1 comentario ·
Los mantenedores suelen responder en 1 día