Conversation
8807740 to
ba46f17
Compare
Collaborator
|
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 |
Collaborator
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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. ↩