From 66a4c021788868446e9b1b47df625cd228651c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:18:44 +0200 Subject: [PATCH 1/5] fix(typst): proper array syntax for bibliography Fixes #13602 --- src/resources/formats/typst/pandoc/quarto/biblio.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/formats/typst/pandoc/quarto/biblio.typ b/src/resources/formats/typst/pandoc/quarto/biblio.typ index bb5a44a29c0..49ce4c99c2d 100644 --- a/src/resources/formats/typst/pandoc/quarto/biblio.typ +++ b/src/resources/formats/typst/pandoc/quarto/biblio.typ @@ -8,6 +8,6 @@ $elseif(bibliographystyle)$ $endif$ $if(bibliography)$ -#bibliography($for(bibliography)$"$bibliography$"$sep$,$endfor$) +#bibliography(($for(bibliography)$"$bibliography$"$sep$,$endfor$)) $endif$ $endif$ From fa5574c88f83280069c0506a1da9950dfff660d5 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 23 Oct 2025 15:43:24 +0200 Subject: [PATCH 2/5] Add a test for multiple bibliographies in Typst output. --- .../docs/smoke-all/2025/10/23/13602/13602.qmd | 19 +++++++++++++++++++ .../2025/10/23/13602/references-1.bib | 8 ++++++++ .../smoke-all/2025/10/23/13602/references.bib | 10 ++++++++++ 3 files changed, 37 insertions(+) create mode 100644 tests/docs/smoke-all/2025/10/23/13602/13602.qmd create mode 100644 tests/docs/smoke-all/2025/10/23/13602/references-1.bib create mode 100644 tests/docs/smoke-all/2025/10/23/13602/references.bib diff --git a/tests/docs/smoke-all/2025/10/23/13602/13602.qmd b/tests/docs/smoke-all/2025/10/23/13602/13602.qmd new file mode 100644 index 00000000000..18a687298fb --- /dev/null +++ b/tests/docs/smoke-all/2025/10/23/13602/13602.qmd @@ -0,0 +1,19 @@ +--- +title: Multiple bib in typst +format: typst +keep-typ: true +bibliography: + - references.bib + - references-1.bib +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - ['\#bibliography\(\("references.bib","references-1.bib"\)\)'] + - [] +--- + +A reference from the first file @smith1776inquirynaturecauses + +A reference from the second file @ricardo1817principlespoliticaleconomy + diff --git a/tests/docs/smoke-all/2025/10/23/13602/references-1.bib b/tests/docs/smoke-all/2025/10/23/13602/references-1.bib new file mode 100644 index 00000000000..1b0377243b7 --- /dev/null +++ b/tests/docs/smoke-all/2025/10/23/13602/references-1.bib @@ -0,0 +1,8 @@ +@book{ricardo1817principlespoliticaleconomy, + title = {On the Principles of Political Economy and Taxation}, + author = {Ricardo, D.}, + date = {1817}, + publisher = {John Murray}, + url = {https://books.google.com.au/books?id=cUBKAAAAYAAJ}, + lccn = {18015237} +} \ No newline at end of file diff --git a/tests/docs/smoke-all/2025/10/23/13602/references.bib b/tests/docs/smoke-all/2025/10/23/13602/references.bib new file mode 100644 index 00000000000..e9c025fd04d --- /dev/null +++ b/tests/docs/smoke-all/2025/10/23/13602/references.bib @@ -0,0 +1,10 @@ +@book{smith1776inquirynaturecauses, + title = {An {{Inquiry}} into the {{Nature}} and {{Causes}} of the {{Wealth}} of {{Nations}}}, + author = {Smith, Adam}, + year = 1776, + edition = {1}, + publisher = {Wiley}, + urldate = {2024-11-07}, + langid = {english}, + +} \ No newline at end of file From 3a1f4ed908c1d2c6884e0e5bab771ba27115a2b5 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 23 Oct 2025 15:45:02 +0200 Subject: [PATCH 3/5] Add a NEWS item --- news/changelog-1.9.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index 5a16132488e..f11b71fa171 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -31,6 +31,7 @@ All changes included in 1.9: - ([#13474](https://github.com/quarto-dev/quarto-cli/issues/13474)): Heading font for title should default to `mainfont`. - ([#13555](https://github.com/quarto-dev/quarto-cli/issues/13555)): Add support for `icon=false` in callouts when used in `format: typst`. - ([#13589](https://github.com/quarto-dev/quarto-cli/issues/13589)): Fix callouts with invalid ID prefixes crashing with "attempt to index a nil value". Callouts with unknown reference types now render as non-crossreferenceable callouts with a warning, ignoring the invalid ID. +- ([#13602](https://github.com/quarto-dev/quarto-cli/issues/13602)): Fix support of multiple `bibliography` for tyspt in `biblio.typ` template partial. ## Projects From 741f8f9d748b57374cf6426715d1bc10101ff359 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 23 Oct 2025 15:47:08 +0200 Subject: [PATCH 4/5] better wording in changelog --- news/changelog-1.9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index f11b71fa171..4e2c3478ce3 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -31,7 +31,7 @@ All changes included in 1.9: - ([#13474](https://github.com/quarto-dev/quarto-cli/issues/13474)): Heading font for title should default to `mainfont`. - ([#13555](https://github.com/quarto-dev/quarto-cli/issues/13555)): Add support for `icon=false` in callouts when used in `format: typst`. - ([#13589](https://github.com/quarto-dev/quarto-cli/issues/13589)): Fix callouts with invalid ID prefixes crashing with "attempt to index a nil value". Callouts with unknown reference types now render as non-crossreferenceable callouts with a warning, ignoring the invalid ID. -- ([#13602](https://github.com/quarto-dev/quarto-cli/issues/13602)): Fix support of multiple `bibliography` for tyspt in `biblio.typ` template partial. +- ([#13602](https://github.com/quarto-dev/quarto-cli/issues/13602)): Fix support for multiple files set in `bibliography` field in `biblio.typ` template partial. ## Projects From 5d36ee51accc2e64fcb5d1a3727ab1c9300702ae Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 23 Oct 2025 15:50:21 +0200 Subject: [PATCH 5/5] Add test for single bib file too --- tests/docs/smoke-all/2025/10/23/13602/13602-1.qmd | 15 +++++++++++++++ .../2025/10/23/13602/{13602.qmd => 13602-2.qmd} | 0 2 files changed, 15 insertions(+) create mode 100644 tests/docs/smoke-all/2025/10/23/13602/13602-1.qmd rename tests/docs/smoke-all/2025/10/23/13602/{13602.qmd => 13602-2.qmd} (100%) diff --git a/tests/docs/smoke-all/2025/10/23/13602/13602-1.qmd b/tests/docs/smoke-all/2025/10/23/13602/13602-1.qmd new file mode 100644 index 00000000000..65fab87e97c --- /dev/null +++ b/tests/docs/smoke-all/2025/10/23/13602/13602-1.qmd @@ -0,0 +1,15 @@ +--- +title: Multiple bib in typst +format: typst +keep-typ: true +bibliography: references.bib +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - ['\#bibliography\(\("references.bib"\)\)'] + - [] +--- + +A reference from the first file @smith1776inquirynaturecauses + diff --git a/tests/docs/smoke-all/2025/10/23/13602/13602.qmd b/tests/docs/smoke-all/2025/10/23/13602/13602-2.qmd similarity index 100% rename from tests/docs/smoke-all/2025/10/23/13602/13602.qmd rename to tests/docs/smoke-all/2025/10/23/13602/13602-2.qmd