Skip to content

feat(typst): add support for loading symbol mappings from Typst codex crate#53

Merged
FineFindus merged 2 commits into
FineFindus:mainfrom
Bnyro:codex
Jun 24, 2026
Merged

feat(typst): add support for loading symbol mappings from Typst codex crate#53
FineFindus merged 2 commits into
FineFindus:mainfrom
Bnyro:codex

Conversation

@Bnyro

@Bnyro Bnyro commented Jun 20, 2026

Copy link
Copy Markdown

This PR adds support for the symbols from https://github.com/typst/codex.

Stats:

  1. Iterating over all Typst codex symbols gives us 997 symbols, although there are more than 1.3k in https://raw.githubusercontent.com/typst/codex/refs/heads/main/src/modules/sym.txt?
  2. We can successfully map around 270 symbols from Typst codex to Latex commands using Unicode
  3. In the end, we get 127 new symbols that aren't already covered by other sources

So there's a lot of loss in steps 1 and 2 - I'm not really sure why. Some of it is because Typst codex includes a lot of emojis that don't have any latex commands, but still we're loosing a lot of commands :/

@FineFindus FineFindus left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Iterating over all Typst codex symbols gives us 997 symbols, although there are more than 1.3k in https://raw.githubusercontent.com/typst/codex/refs/heads/main/src/modules/sym.txt?

Counting only the pure symbol definitions (no module names) with a quick CLI oneliner, I only get 939, so I'm guessing some other parsing then the obvious.

Comment thread scripts/load_unicode_to_latex_mapping.py Outdated
Comment thread scripts/load_unicode_to_latex_mapping.py Outdated
Comment thread build.rs Outdated
@FineFindus

Copy link
Copy Markdown
Owner

Thanks!

@FineFindus FineFindus merged commit 482bae1 into FineFindus:main Jun 24, 2026
4 checks passed
@Bnyro Bnyro deleted the codex branch June 24, 2026 20:21
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.

2 participants