Skip to content

[add] accessibility for num#86

Draft
Mc-Zen wants to merge 3 commits into
mainfrom
accessibility
Draft

[add] accessibility for num#86
Mc-Zen wants to merge 3 commits into
mainfrom
accessibility

Conversation

@Mc-Zen
Copy link
Copy Markdown
Owner

@Mc-Zen Mc-Zen commented May 11, 2026

This PR adds support for specifying manual as well as generating automatic alt texts to standalone numbers in equations for export to accessible formats like PDF UA-1.

This is done by adding a parameter alt that can be one of the following

  • a string for specifying a manual alt text
  • auto for automatic locale-aware description generation (PRs for adding more translations welcome!)
  • a dictionary with the keys times, plus, minus, and power. For English, the corresponding values would be "times", "plus", "minus", and "to the power of".
  • a function that receives a dictionary with the keys int, frac, decimal-separator, base, expoenent, abd uncertainty.

Work in progress: alt texts for units.

Note that when a num is inserted into an equation (like $a=#num[2.2e4]$) the alt text of the number will be dismissed since the equation is merged with the outer equation. Maybe Typst will add some modularity in the future.

Closes #82

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing support for PDF/UA-1 export

1 participant