Add more .not variants
#133
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.notvariants 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.altor.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.
Footnotes
New Computer Modern Math, Fira Math, Libertinus Math and Lete Sans Math. ↩