Skip to content

Commit 2c69df5

Browse files
authored
docs: Pandoc 3.13 changes for Quarto 1.12 (#2355)
* Drop tables from the Content with Caption layout description Pandoc 3.13, bundled with Quarto 1.12, puts a non-two-column slide that contains a table on the Title and Content layout, so text followed by a table no longer selects Content with Caption as it did with Pandoc 3.10. Text followed by an image still does. Two-column slides are unchanged: a column with text followed by a table still selects Comparison. * Document typst-label and lang on spans for Typst output Quarto 1.12 bundles Pandoc 3.13, which reads two attributes in Typst output that Pandoc 3.10, bundled with Quarto 1.11, ignored. A div with a typst-label attribute gets that Typst label, replacing the label Pandoc already derived from the div's identifier; the attribute was added in Pandoc 3.10.2. A span with lang now renders as #text(lang: ...)[...], where Pandoc 3.10 dropped the attribute; lang on a div already worked. The labels section says that typst-label is for raw Typst code, and that cross-references keep using Quarto identifiers: Quarto's crossref filters write their own labels, and typst-label has no consistent effect on them (no label on a figure, an extra label on a theorem). * Add Pandoc 3.13 notes to the 1.12 pre-release highlights Quarto 1.12 bundles Pandoc 3.13. The highlights list the changes that can break an existing document under "When upgrading", following the 1.11 page: bibliography files with duplicate keys, particle sorting, Word bookmark names and percent image widths, MathML in HTML without Bootstrap, divs that wrap a heading, and Typst horizontal rules with the Typst 0.15 requirement for QUARTO_TYPST. Smaller changes stay in the changelog. The LaTeX Equations section of the HTML page said MathJax is the default. That is true for Bootstrap HTML only; minimal: true, theme: none and theme: pandoc now render math as MathML, where Pandoc 3.10 left it as plain text. * Trim the Pandoc 3.13 notes in the 1.12 highlights Earlier highlights mention a Pandoc update in one line and keep the "When upgrading" list to changes users must act on. The list now keeps the changes that stop a render or visibly change output: duplicate bibliography keys, Word bookmark names, MathML in HTML without Bootstrap and the Typst 0.15 requirement for QUARTO_TYPST. Particle sorting, Word percent widths, Typst horizontal rules and divs wrapping a heading stay in the changelog, which the download page shows in full. * Add a rule for writing release highlights The 1.12 draft listed every Pandoc 3.13 change and described the div-around-heading change from the Pandoc release notes, missing the finalizer quarto-cli added for it. Earlier releases keep highlights short and leave details to the changelog shown on the download page. * Mention later YAML metadata blocks in the duplicate-key highlight Pandoc 3.13 also errors on a duplicated key in a YAML metadata block after the front matter, not only in a bibliography file. The quarto-cli 1.12 changelog covers both cases since quarto-dev/quarto-cli#15356.
1 parent 1c59075 commit 2c69df5

5 files changed

Lines changed: 59 additions & 3 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
paths:
3+
- "docs/prerelease/**/_highlights.qmd"
4+
---
5+
6+
# Release Highlights
7+
8+
`_highlights.qmd` is a short summary. The download page shows it above the full changelog, so details belong in the changelog. Match the length of earlier releases' highlights (compare `docs/prerelease/1.11/_highlights.qmd`).
9+
10+
- Feature bullets: one or two sentences, linking to the docs section.
11+
- A dependency update (Pandoc, Typst, Deno) is one line, such as "Pandoc updated to 3.13". Its user-facing additions go in that line or as feature bullets.
12+
- "When upgrading" lists only changes users must act on: a render that now fails, or output that changes visibly. One sentence each, plus the fix when there is one.
13+
- Edge cases, niche behavior changes and per-format details stay in the quarto-cli changelog.
14+
- Before describing a behavior change that comes from a dependency, read the quarto-cli PR and changelog entry for it: Quarto often adjusts the result (a filter or finalizer), so the upstream release notes alone can misstate what users see.

‎docs/output-formats/html-basics.qmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Using the `css` option works well for simple tweaks to document appearance. If y
124124

125125
## LaTeX Equations
126126

127-
By default, LaTeX equations are rendered using [MathJax](https://www.mathjax.org/). Use the `html-math-method` option to choose another method. For example:
127+
By default, LaTeX equations are rendered using [MathJax](https://www.mathjax.org/). HTML documents without the Bootstrap theme (`minimal: true`, `theme: none`, or `theme: pandoc`) render them as MathML instead. Use the `html-math-method` option to choose another method. For example:
128128

129129
``` yaml
130130
format:

‎docs/output-formats/typst.qmd‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,38 @@ This gets compiled to
232232
[This is a block with gray background and slightly rounded corners.])
233233
````
234234

235+
## Typst Labels
236+
237+
{{< prerelease-callout 1.12 >}}
238+
239+
The identifier of a div becomes a [Typst label](https://typst.app/docs/reference/foundations/label/) on its content, so [raw Typst](#raw-typst) code can target the div, for example with a show rule. To give the div a Typst label that differs from its identifier, or a label without an identifier, use the `typst-label` attribute:
240+
241+
```` markdown
242+
```{=typst}
243+
#show <note-box>: set text(fill: blue)
244+
```
245+
246+
::: {typst-label="note-box"}
247+
This text is blue.
248+
:::
249+
````
250+
251+
A show rule applies only to content after it, so place the raw Typst block before the div.
252+
253+
`typst-label` is for raw Typst code. To refer to a figure, table, or theorem, give it a Quarto [cross-reference](/docs/authoring/cross-references.qmd) identifier such as `#fig-plot` and use `@fig-plot`, as in other formats.
254+
255+
## Text Language
256+
257+
{{< prerelease-callout 1.12 >}}
258+
259+
Set `lang` on a span or a div to write content in a language other than the document's `lang`. Typst then uses that language for the content, for example for hyphenation and smart quotes:
260+
261+
``` markdown
262+
The German greeting [Guten Tag]{lang="de"} means "good day".
263+
```
264+
265+
The span renders as `#text(lang: "de")[Guten Tag]`.
266+
235267
## Theorems
236268

237269
{{< prerelease-callout 1.9 >}}
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
Quarto v1.12 was just released, nothing to see here -- yet!
1+
Quarto 1.12 includes the following new features:
2+
3+
- Pandoc updated to 3.13, which adds [Typst labels](/docs/output-formats/typst.qmd#typst-labels) with the `typst-label` attribute and [`lang` on spans](/docs/output-formats/typst.qmd#text-language) in `typst` output.
4+
- `quarto render` supports Pandoc's `--math-method` option. The `--katex`, `--mathjax`, `--mathml`, and `--webtex` options are deprecated.
5+
6+
When upgrading:
7+
8+
- A duplicated key in a YAML [bibliography file](/docs/authoring/citations.qmd#bibliography-files), or in a YAML metadata block after the front matter, now stops the render with an error.
9+
- In `docx` output, cross-reference targets are bookmarks with generated names, so a link from outside the document such as `report.docx#fig-plot` no longer finds its target.
10+
- HTML documents without the Bootstrap theme (`minimal: true`, `theme: none`, or `theme: pandoc`) now render [math](/docs/output-formats/html-basics.qmd#latex-equations) as MathML. Set `html-math-method: plain` for the previous output.
11+
- A Typst binary set through the `QUARTO_TYPST` environment variable must be version 0.15 or later.

‎docs/presentations/powerpoint.qmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ When creating slides, the pptx writer chooses from a number of pre-defined layou
7878

7979
**Content with Caption**
8080

81-
: This layout is used for any non-two-column slides which contain text followed by non-text (e.g. an image or a table).
81+
: This layout is used for any non-two-column slides which contain text followed by an image, unless the slide also contains a table.
8282

8383
**Blank**
8484

0 commit comments

Comments
 (0)