Computational figure filenames regress to positional auto-naming, losing Q1's label-based stability (knitr; Jupyter has the same gap unimplemented)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start with the typst-testing/p8-orange-book-base fixture under crates/quarto/tests/smoke-all/typst/orange-book/ and reproduce the missing fig-cars-1.svg during q2 render. Trace how the label is handled for the knitr execution path and compare the expected label-derived filename with the observed positional name. Done means the fixture's cross-document figure reference resolves with a stable label-derived filename; the issue notes that work is already tracked in internal strand bd-2lxj10z0.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Computational figure filenames lose their label-based stability compared to Quarto 1.x. In Quarto 1.x, a labelled executable chunk's output filename is derived from the author's label: option — #| label: fig-cars on an R chunk yields fig-cars-1.svg; the same principle applies to Jupyter, which names outputs <label>-output-<n>.<ext> (e.g. fig-visualization-output-1.png). Different concatenation convention per engine, but in both cases the label, not the chunk's position in the document, determines the artifact's filename — which is what makes the name stable across edits (reordering sections, inserting a chunk earlier in the file, etc. doesn't change it).
In q2, the knitr chunk's label: option never reaches the engine — it's consumed upstream (to drive q2's own crossref numbering) and stripped from the code text before knitr ever executes it. knitr falls back to its generic positional default, the same name it would produce for an unlabelled chunk (unnamed-chunk-1-1.svg instead of fig-cars-1.svg), even though the chunk is labelled. Any file or document that references the artifact by its expected, label-derived name breaks.
Reproduction
chapter1.qmd:
```{r}
#| label: fig-cars
#| fig-cap: "A plot of the cars dataset"
plot(cars)
Another file in the same project hand-references the artifact chapter1 produces, exactly as Quarto 1.x would name it:
```markdown
{#fig-appendix-panel-a}
Expected (matches quarto render, Quarto 1.x): chapter1.qmd execution produces chapter1_files/figure-typst/fig-cars-1.svg, and the reference above resolves.
Observed (q2 render): the same chunk instead produces chapter1_files/figure-typst/unnamed-chunk-1-1.svg. The hand-authored reference to fig-cars-1.svg now points at a file that doesn't exist, which fails at compile time (missing-image error) for any format that isn't forgiving about broken image links (e.g. Typst).
Found via the typst-testing/p8-orange-book-base smoke-all fixture (crates/quarto/tests/smoke-all/typst/orange-book/), which reuses the same figure across chapter2.qmd, appendix.qmd, and appendix-b.qmd by referencing it directly by its expected filename — a pattern Quarto 1.x's naming convention is specifically designed to support.
Why this matters beyond the immediate 404
Stable, label-derived artifact filenames are a real, relied-upon Quarto 1.x behavior — they let other documents, includes, and hand-authored references point at a generated artifact by a name that won't shift as the document changes. Falling back to positional auto-naming (unnamed-chunk-N) removes that guarantee silently: the render succeeds for the originating document and only breaks downstream, wherever something else references the artifact by name.
Tracking
Root-caused and being fixed via internal strand bd-2lxj10z0.
- Ngôn ngữ chính
- Rust
- Star
- 264
- Fork
- 18
- Merge trung bình
- 12 giờ 54 phút
- Pull request đã merge (30 ngày)
- 105
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/q2
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
quarto-dev/q2#642 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TS Engines which claim files will spawn Deno in Pass-1Có thể làm lại được @gordonwoodhull đã nhận 39 ngày trước và không có pull request nào đang mở. Đang mởbug
quarto-dev/q2#576 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
quarto-dev/q2#436 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Recent project files not syncedĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
quarto-dev/q2#433 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug quarto-hub revealjs
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
quarto-dev/q2#419 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/q2
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
aws-samples/sample-pacer#76 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mime-type element is mandatoryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
axodotdev/cargo-dist#2523 ·
Maintainer thường phản hồi trong vòng 2 ngày