Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support filtering by math class in symbol search#8653

Open
MDLC01 wants to merge 3 commits into
typst:maintypst/typst:mainfrom
MDLC01:symbol-search-classMDLC01/typst:symbol-search-classCopy head branch name to clipboard
Open

Support filtering by math class in symbol search#8653
MDLC01 wants to merge 3 commits into
typst:maintypst/typst:mainfrom
MDLC01:symbol-search-classMDLC01/typst:symbol-search-classCopy head branch name to clipboard

Conversation

@MDLC01

@MDLC01 MDLC01 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #8265.

This implements support for filtering symbols by math class in symbol search by adding class:<class> as a search term, where <class> is case-insensitive and can be:

  • none, matching symbols without a math class;
  • a Unicode math class or class name1 (i.e., the one-letter form, like X, or the full name, like Special), matching symbols with this math class.2

Alternatively, one can filter out symbols by adding a minus sign before the filter (e.g., -class:none displays all symbols that do have a math class). Note that this operates on the default math class assigned to each symbol by Typst. Notably, Typst does not fully follow UTR #25 as it overrides the default math class for some symbols.3

This is currently a draft because I am unsure whether this is the right way to expose this feature. This also needs to be documented, which is done is perhaps the most ugly way right now. Any input is welcome!

Also, I implemented this in a way that makes it easy to define further filters in the future.

The first commit is a somewhat-related minor fix. Since Codex doesn't assign names to Glyph_Part symbols, and likely never will, the bug is unlikely to ever surface anyway.

Footnotes

  1. https://www.unicode.org/reports/tr25/

  2. The underscore can be replaced with a hyphen in Glyph_Part, matching the convention used by Typst.

  3. https://github.com/typst/typst/blob/ed1973b0aec242a41cd3331b266ca13fb887fd59/crates/typst-utils/src/lib.rs#L385

@MDLC01 MDLC01 added symbols Related to the symbols category, which gives names and shorthands to symbols docs-infra Related to the PDF and website documentation system. labels Jul 16, 2026
@MDLC01

MDLC01 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

This is now ready for review but not ready to be merged as is as explained above.

@MDLC01
MDLC01 marked this pull request as ready for review July 22, 2026 09:38
@laurmaedje laurmaedje added the waiting-on-review This PR is waiting to be reviewed. label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-infra Related to the PDF and website documentation system. symbols Related to the symbols category, which gives names and shorthands to symbols waiting-on-review This PR is waiting to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow filtering symbols by math class in the General Symbols page

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.