A Typst project render cannot find the bibliography file in `output-dir`
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start in crates/quarto-core/src/transforms/resource_collector.rs, where the issue says resource copies are collected from the document AST, and compare that with the flush-before-compile step in crates/quarto-core/src/pipeline.rs. Run the provided reproduction with citeproc: false and output-dir: _site; done means references.bib is available beside _site/index.typ and rendering produces _site/index.pdf.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
In a project with output-dir: _site, a Typst document with bibliography: references.bib and citeproc: false fails on q2, and Quarto 1 renders it.
The generated _site/index.typ contains #bibliography(("references.bib")), but q2 never copies references.bib into _site, so typst compile cannot open it.
q2 already flushes the collected resource copies before the Typst compile step, which fixed the same failure for images:
The collector that builds those copies walks the document AST for image targets.
A bibliography: value sits in the metadata, so no copy is queued for it:
With citeproc: true the failure does not appear, because q2 resolves the citations itself and no #bibliography call is written.
The cause is my reading of the source.
The run confirms the missing file, and I have not checked that a queued copy fixes it.
Steps to reproduce
_quarto.yml:
project:
output-dir: _site
index.qmd:
---
format: typst
bibliography: references.bib
citeproc: false
---
[@a]
references.bib:
@book{a, title={A}, author={B}, year={2000}}
With q2:
q2 render
With Quarto 1:
quarto render
Actual behavior
q2 fails and leaves only _site/index.typ:
Error [Q-21-3]: typst compile exited with exit status: 1:
error: file not found (searched at /private/tmp/q2-typst.AqB0/_site/references.bib)
┌─ _site/index.typ:438:14
│
438 │ #bibliography(("references.bib"))
│ ^^^^^^^^^^^^^^^^^^
Quarto 1 writes _site/index.pdf.
Expected behavior
q2 copies references.bib next to _site/index.typ before it compiles, so _site/index.pdf is written, as in Quarto 1.
Your environment
- q2:
Q2 (quarto 2) 0.40.0-nightly.20261101(nightly built from a2a1cb9). - Quarto 1 for comparison: 1.12.0 (pre-release).
- OS: macOS 27.2 (arm64).
- Terminal, no IDE.
- Ngôn ngữ chính
- Rust
- Star
- 302
- Fork
- 22
- Merge trung bình
- 5 giờ 2 phút
- Pull request đã merge (30 ngày)
- 213
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
-
`dir: rtl` isn't written to `<html>` in HTML outputCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/q2#1219 ·
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 75/100
quarto-dev/q2#1188 · 3 bình luận ·
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 73/100
quarto-dev/q2#1179 ·
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 82/100
quarto-dev/q2#1133 ·
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 76/100
quarto-dev/q2#1103 · 1 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ự
-
bug image layout P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày