From 829677a7b7953bbf8a97f64b6595ec6d1e2a2178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Fri, 30 Jan 2026 11:50:07 +0100 Subject: [PATCH 1/3] fix: prevent breaking inside definition items Ensure that terms and their descriptions remain together by setting the block to be non-breakable. --- src/resources/formats/typst/pandoc/quarto/definitions.typ | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resources/formats/typst/pandoc/quarto/definitions.typ b/src/resources/formats/typst/pandoc/quarto/definitions.typ index 161469dac4..5657c633b8 100644 --- a/src/resources/formats/typst/pandoc/quarto/definitions.typ +++ b/src/resources/formats/typst/pandoc/quarto/definitions.typ @@ -28,6 +28,9 @@ it } +// Prevent breaking inside definition items, i.e., keep term and description together. +#show terms.item: set block(breakable: false) + // Some quarto-specific definitions. #show raw.where(block: true): set block( From 6cc92310317e89a42394c9552db88b44ce334336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Fri, 30 Jan 2026 11:56:30 +0100 Subject: [PATCH 2/3] chore: add changelog --- 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 ff9ffefd75..b10afe00db 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -56,6 +56,7 @@ All changes included in 1.9: - ([#13870](https://github.com/quarto-dev/quarto-cli/issues/13870)): Add support for `alt` attribute on cross-referenced equations for improved accessibility. (author: @mcanouil) - ([#13950](https://github.com/quarto-dev/quarto-cli/pull/13950)): Replace ctheorems with theorion package for theorem environments. Add `theorem-appearance` option to control styling: `simple` (default, classic LaTeX style), `fancy` (colored boxes with brand colors), `clouds` (rounded backgrounds), or `rainbow` (colored start border and colored title). - ([#13954](https://github.com/quarto-dev/quarto-cli/issues/13954)): Add support for Typst book projects via format extensions. Quarto now bundles the `orange-book` extension which provides a textbook-style format with chapter numbering, cross-references, and professional styling. Book projects with `format: typst` automatically use this extension. +- ([#13978])(https://github.com/quarto-dev/quarto-cli/pull/13978)): Keep term and description together in definition lists to avoid breaking across pages. (author: @mcanouil) ### `pdf` From 6df044516287acce6b0b0a94ec93a72be95bb7be Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 30 Jan 2026 10:21:23 -0500 Subject: [PATCH 3/3] test: add ensurePdfTextPositions test for definition item no-break Verifies that definition list terms and descriptions stay on the same page and that descriptions are indented from terms. Co-Authored-By: Claude Opus 4.5 --- .../typst/definition-item-no-break.qmd | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/docs/smoke-all/typst/definition-item-no-break.qmd diff --git a/tests/docs/smoke-all/typst/definition-item-no-break.qmd b/tests/docs/smoke-all/typst/definition-item-no-break.qmd new file mode 100644 index 0000000000..9874a40fde --- /dev/null +++ b/tests/docs/smoke-all/typst/definition-item-no-break.qmd @@ -0,0 +1,24 @@ +--- +title: "Definition Item No Break Test" +format: typst +_quarto: + tests: + typst: + ensurePdfTextPositions: + - # Term and description must be on the same page (fails if on different pages) + - subject: "Generate HTML" + relation: below + object: "Multi-format" + - # Description should be indented (NOT left-aligned with term) + - subject: "Generate HTML" + relation: leftAligned + object: "Multi-format" + noErrors: default +--- + +## Introduction + +{{< lipsum 4 >}} + +Multi-format +: Generate HTML, PDF, Word, ePub, and more from one source.