diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index 5a16132488..4e2c3478ce 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 for multiple files set in `bibliography` field in `biblio.typ` template partial. ## Projects diff --git a/src/resources/formats/typst/pandoc/quarto/biblio.typ b/src/resources/formats/typst/pandoc/quarto/biblio.typ index bb5a44a29c..49ce4c99c2 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$ 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 0000000000..65fab87e97 --- /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-2.qmd b/tests/docs/smoke-all/2025/10/23/13602/13602-2.qmd new file mode 100644 index 0000000000..18a687298f --- /dev/null +++ b/tests/docs/smoke-all/2025/10/23/13602/13602-2.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 0000000000..1b0377243b --- /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 0000000000..e9c025fd04 --- /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