-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setminus and smallsetminus #181
Comments
That might well be one of the errors in the STIX table that Hans recently mentioned. U+29F5 is called the reverse solidus operator in Unicode. Many fonts (but not Cambria Math) use a more slanted version for U+2216, that could be the reason why the STIX team chose U+29F5. Windows 7's math input panel recognizes a set difference as U+2216, too. So both the standard and the reference implementation say that you're right, and if Will has no objections, I'll rename the definition. |
I do have objections! The unicode-math definitions come from the STIX table and match up with the STIX fonts (see below), which are the reference implementation for unicode math fonts. I've already noted in the documentation the inconsistency with 2216 ≠ set minus (according to the traditional TeX terminology) but there's nothing we can do about it unless STIX changes their mind. If the other unicode math implementations (being only Cambria Math + MS Word at present) do not change then we're in a bit of a pickle and we might need to add an option to the package for this case. ( \documentclass{article} \usepackage{ifxetex} \ifxetex \usepackage{unicode-math} \setmathfont{XITS Math} \else \usepackage{amssymb} \fi \begin{document} $a\setminus b$ $a\smallsetminus b$ \end{document} |
I don't think we should introduce an option for this (and, by extension, for every questionable characters). Probably we should implement ConTeXt-like "typescripts" or at least individual packages for specific fonts: |
Yeah, I guess in the future I'm expecting that we'll have in-built defaults for loading certain fonts. (I promised Karl I'd do this for fontspec by TL2011; hopefully that will still be possible even though I haven't looked at the code for months…) I don't think we'll have too many of these questionable characters — I don't mind having the switch in unicode-math rather than in the font loading. I'm sort of burnt out trying to communicate with whoever is responsible for this stuff. If we can come up with a solid argument that the STIX design is flat-out wrong, then we should get it signed by Hans et al. and forward it on to to everyone concerned. |
ConTeXt patches a few fonts before loading them. See In the long term, it better to fix such "bugs" upstream, so that the fonts are usable in other programs (like Word) also. Perhaps it might be easier to ask Khaled to patch XITS? |
@khaledhosny please have a look at this. (But ultimately it has to be fixed at the STIX side) I agree that font bugs should be fixed upstream, but it can take a long time until e.g. Microsoft fixes Cambria Math, so I expect that we have to do a lot of patching anyway provided the fixes are simple enough. I think that for now, I'll set |
Please note this isn't really a bug in STIX, it's behaviour by design. I'll try and contact Barbara and see what her thoughts are. |
"Fixing" XITS is not hard, just give me a concrete bug report (once it is identified as bug) and I'll fix it. |
It is not a bug, just a design issue:
|
BTW, STIXVar.otf font have a glyph for U+2216 that is identical to U+29F5, so I guess they were aware of the issue, dropping a line to Barbara Beeton asking about the idea behind current glyph selection wouldn't hurt. |
We've just bumped up against this incompatibility during development of the STIX Two fonts: stipub/stixfonts#179. (I'm not sure what took us so long.) Would anyone from here like to comment on that proposal? |
Another unexpected interaction I found (clearly a font issue) is with the New CM fonts where both character are actually the small set minus, so I actually have to redefine |
Yes and no. Unicode doesn't specify a "small" set minus character, instead it follows TeX (in a way) by standardizing the reverse solidus operator (that TeX was using as a set minus character) plus a set minus operator that may or may not be "small". Consequently, HTML So, arguably, U+2216 is the "small" set minus, or "semantic" set minus.
In fact, in plain TeX it is the reverse solidus operator with additional spacing! Just as the Unicode name suggests.
Indeed, the LaTeX names
The options key could be
The existing glyph is the small set minus in virtually any font---as can be observed when comparing it to the I think the best way forward would be to keep the |
Thanks for the decades of commentary here. I'm sorry that I dug my heels in so much about this -- in hindsight, it would have been better to make the change originally proposed to correspond to Unicode as much as possible. My solution to this issue is going to be exactly that -- use "2216 for |
I know it's generally preferred to use GitHub reactions to express gratitude, but they easily get lost so I want to take the short time to say thank you for coming around with a (simple) solution—as well as all the other maintenance work. I'm looking forward to deleting a lot of code from my personal class to make my documents compile w/o missing symbols 0:-) Thanks again and have a great day! |
unicode-math defines the following mappings:
This appears to a bit strange to me. Unicode defines 2216 as "set minus", so shouldn't 2216 map to
\setminus
? This is pointed out in Will's tugboat article, but I do not understand the rational behind the choice made my unicode-math.The text was updated successfully, but these errors were encountered: