Skip to content

Conversation

@MDLC01
Copy link
Collaborator

@MDLC01 MDLC01 commented Dec 19, 2025

Some mathematical characters do not have a precomposed "not" variant. Instead, Unicode allows using U+0338 COMBINING LONG SOLIDUS OVERLAY to produce the negation of a character.

In this pull request, I added a few of those decomposed forms. More specifically, I added the ones that are listed in Table 2.8 of UTR #25 (Table 9 in the recent proposed update) for which the base characters already have a name in Typst. I decided to stick to those for now as a starting point, but I definitely think we should add .not variants for all relations in the future.

Note that U+20D2 COMBINING LONG VERTICAL LINE OVERLAY is also a valid way to encode negation, but serves as an alternative to U+0338. If we decide to add them in the future, they would not be using .not (possible options include .not.alt or .neg).

Regarding font support, none of the few fonts I tested1 seem to support this for now in the sense that there does not seem to be specific glyphs for those symbols. Below is the result I get with New Computer Modern Math. We may want to reach out to the maintainer to make them aware of this Unicode feature.

The combining slash is not placed very gracefully but the intent is still understandable.

Footnotes

  1. New Computer Modern Math, Fira Math, Libertinus Math and Lete Sans Math.

@MDLC01 MDLC01 added the waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews label Dec 19, 2025
@Enivex
Copy link
Collaborator

Enivex commented Dec 19, 2025

In my opinion it would make more sense to introduce a function for this, like we do for combining accents. This can be used for all symbols.

There's a bunch more we can add to (though font support is lacking). At one point I started writing down names, but didn't get very far

https://en.wikipedia.org/wiki/Combining_Diacritical_Marks

https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols

@MDLC01
Copy link
Collaborator Author

MDLC01 commented Dec 19, 2025

There is indeed a lot more combining diacritics, but U+0338 specifically feels special as it is clearly the intended way to produce negated variants of existing symbols. I think giving a name to decomposed negations of relation symbols is just what the end users who don't know about precomposed vs. decomposed symbols expect.

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

Labels

waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants