typst cannot compile when headings contain enclosed alphanumerics

Open
#12,660 7 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since May 6, 2025.

Assessment

This issue has not been assessed yet.

Description

bug crossref pandoc upstream
Bug description

When headings contain enclosed alphanumerics, quarto documents fail to render to typst.
This appears to be an issue with quarto (or possibly pandoc?), not typst, and seems to be caused by the <heading> text that is added to the line following the ==heading

I have seen character rendering issues with some subset of unicode in ajax and, as a result, rstudio. A quick prod indicates that the issue is probably only with the enclosed alphanumerics.

Steps to reproduce

with the below document as test.qmd

---
format: 
    typst:
        keep-typ: true
---

### Test①

xxx
Actual behavior

% quarto render test.qmd -o test.pdf
pandoc -o test.typ
to: typst
standalone: true
shift-heading-level-by: -1
default-image-extension: svg
wrap: none
citeproc: false

metadata
title: ''

[typst]: Compiling test.typ to test.pdf...error: unclosed label
┌─ test.typ:300:0

300 │ <test①>
│ ^^^^^

The .typ output ends with:

== Test①
<test①>
xxx
Expected behavior

a rendered pdf

typst compile test.typ test1.pdf compiles the pdf with no issue if the <test①> line is removed:

== Test①
xxx
Your environment

MacOS Sequoia 15.4.1 (24E263)

quarto v1.6.40

pandoc v3.6.4

Quarto check output

Quarto 1.6.40
[✓] Checking environment information...
Quarto cache location: /Users/anthony/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.40
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/anthony/Library/TinyTeX/bin/universal-darwin
Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.9.12 (Conda)
Path: /opt/anaconda3/bin/python
Jupyter: 4.9.2
Kernels: python3

(|) Checking Jupyter engine render....[IPKernelApp] ERROR | No such comm target registered: quarto_kernel_setup
[✓] Checking Jupyter engine render....OK

(/) Checking R installation...........During startup - Warning messages:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
[✓] Checking R installation...........OK
Version: 4.4.2
Path: /usr/local/Cellar/r/4.4.2_2/lib/R
LibPaths:
- /usr/local/lib/R/4.4/site-library
- /usr/local/Cellar/r/4.4.2_2/lib/R/library
knitr: 1.50
rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.