-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
Italic digits do not work in math. #4139
Comments
Because numbers are conventionally written upright in math, there are simply no italic numerals in Unicode. There's not much typst can do about that, other than potentially faking italics or using the text font. Exactly what LaTeX is doing in this situation is not clear to me. |
See #394 |
AFAIK, italicity is mainly a property of the font, not the character set. I expect that italics in math work the same way as in text, that it uses the italic glyph from the font. That is what LATEX does, I think. |
They do not |
The problem is that Typst's math doesn't use various font styles (¿at all?); it uses just Unicode characters with the default style. That has a (significant IMO) limitation that not every letter has Unicode variants in various styles (normal, bold, italic…). For example, if I have a variable named “š”, I want it italic, but Typst sets it upright because Unicode doesn't have an italic š. I would appreciate that Typst would apply font styles to math so also characters without styled Unicode characters would be styled. Although, if I designed a math typesetting system, it would ignore styled Unicode characters and use the normal characters with styled font glyphs for consistency across characters. |
I'm not sure where you're going with this. Typst has to deal with the reality of how math fonts work. The glyphs you're talking about simply do not exist. |
Excuse me, I am frustrated with how math typesetting works. I thought that moving beyond LATEX and using Unicode and OpenType would enable convenient and consistent typesetting of whichever characters, but it seems that it doesn't. I don't know where the main problem is, but I dislike it. |
That doesn't work in longer variable names like “šířka”, which I would use more probably than just “š”. |
LaTeX’s |
Multi-letter variables should be set using the text font, the math font will give bad spacing since it is designed/optimized for single-letter variables that are the most common in math. |
It's not quite that clear cut. This is why unicode-math provides both \math* and \sym* commands to provide both options (as I'm sure you know). It may for instance be that the text and math fonts are very different. |
I don’t see the relation between the presence of |
I don't necessarily disagree, but if the option isn't there, people will still ask for it. (I personally never use multi-letter variable names anyway) |
Description
If I try to typeset an italic mathematical digit like
$italic("1")$
, it shows that digit but upright, and I want it italic.It is not a font issue; it behaves that way with multiple fonts (as shown in the linked project), and it works as expected in LATEX with multiple fonts.
Typst example (wrong)
LATEX example (as expected)
Reproduction URL
https://typst.app/project/rcsyUogPKHnzEMkcoaL4yE
Operating system
Web app
Typst version
The text was updated successfully, but these errors were encountered: