Typst equation numbering is hardcoded

Open
#13,462 0 comments 1 reaction 1 assignee View on GitHub

@cscheid is already working on this.

Since Sep 29, 2025.

Assessment

This issue has not been assessed yet.

Description

bug typst
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/13460

Originally posted by mvuorre September 29, 2025

Description

(Discussed previously at https://github.com/quarto-dev/quarto-cli/discussions/13457)

Description

I would like to customize how equations are numbered in Typst output. The "(1)" numbering is currently hard coded in Quarto.

Current behavior

Here is an example Quarto Typst document:

---
title: "Hello Typst!"
format:
  typst:
    include-before-body:
      - text: |
          #set text(fill: red) // To confirm code is passed
          #set math.equation(numbering: "A.")
    keep-typ: true
---

Math numbering (@eq-test).

$$
y = 1
$$ {#eq-test}

It creates this .typ output (showing only relevant bits at the end):

#set text(fill: red) // To confirm code is passed
#set math.equation(numbering: "A.")

Math numbering (#ref(<eq-test>, supplement: [Equation])).

#math.equation(block: true, numbering: "(1)", [ $ y = 1 $ ])<eq-test>

And this PDF document:

image

Desired behavior

I tested this syntax in the Typst webapp and it produces desired output:

#set math.equation(numbering: "A.")

#math.equation(block: true, [ $ y = 1 $ ])<eq-test>
image

Notes

Among other things, this would be useful in appendices when I'd like to re-number equations as e.g. "A.1." and so forth.

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.