Skip to content

Alt-text for math equations in Typst #13870

Description

@mcanouil

PDF UA-1 accessibility standard requires math equations (cross-references) to have alternative text.
Typst (> 0.14) supports this with alt of math.equation() but currently cannot be set.

  • elseif _quarto.format.isTypstOutput() then
    local is_block = eq.mathtype == "DisplayMath" and "true" or "false"
    targetInlines:insert(pandoc.RawInline("typst",
    "#math.equation(block: " .. is_block .. ", numbering: \"(1)\", " ..
    "[ "))
    targetInlines:insert(eq)
    targetInlines:insert(pandoc.RawInline("typst", " ])<" .. label .. ">"))
    else

Expected:

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

$$
E = mc^2
$$

$$
E = mc^2
$$ {#eq-einstein alt="Einstein's mass-energy equivalence formula"}
...

$ E = m c^2 $

#math.equation(block: true, alt: "Einstein's mass-energy equivalence formula", numbering: "(1)", [ $ E = m c^2 $ ])<eq-einstein>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

accessibilityenhancementNew feature or requestmathany issue related to math support in specific formatstypst

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions