-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Font is italic for unicode text #2744
Comments
@abnerlee Just upgraded to the latest Typora and noticed the change. The italic Chinese characters in my math formulas looks really bad (actually italic font shapes are just not for Chinese characters at all). Is it possible to change the font by solely configuring Typora, for example, using CSS? A workaround is to wrap Chinese characters in math into |
@GoBigorGoHome If you don't need italic in math at all, then you can use css [data-variant='italic'] {
font-style: normal;
} to force ignore italic texts, but that is just workaround with side effects. still requires feedback from MathJax side. |
In versions prior to 3.2, MathJax would place all characters that it doesn't think of as "letters" into Since an As a work-around, you could change the MathML node associated with the Chinese ranges to be MathJax = {
startup: {
ready() {
const {RANGES} = MathJax._.core.MmlTree.OperatorDictionary;
RANGES[28][3] = RANGES[30][3] = RANGES[33][3] = RANGES[47][3] = 'mtext';
MathJax.startup.defaultReady();
}
}
}; into your current MathJax configuration. |
Frankly speaking, the biggest problem is that almost no one uses italicized Chinese characters. |
I saw English letters and geek letters like α are also be put into |
They should be, and they are for me. Can you provide a minimal example page where they are not italic? |
Add ability for TeX input to force normal variant for CJK input. (mathjax/MathJax#2744)
Could I get an explanation for how to get upper-case greek letters to be displayed upright in math mode? In my setup, for instance (I write documents in Org Mode, and would like the maths to be displayed in the same way whether it’s exported to HTML or LaTeX.) |
@njlarsson, do you know the version of MathJax that you are using? (Use the "About MathJax" entry in the MathJax contextual menu to find out.) Older versions of org-mode used MathJax v2, but it looks like the current version of org-mode has been updated to use MathJax v3, so that should allow you to use v3.2, which should handle the Unicode characters properly for you. |
@dpvc It’s 3.2. “Properly” may be different things for different people. I suppose some people want Σ to be slanted, and I don’t expect upright to be the default. But for instance, this small example,
makes \Sigma come out upright but the Σ slanted: I would like to know how to configure MathJax to make them both look like the first one. |
@njlarsson: OK, my fault. I was looking at 4.0.0-beta.3, which handles the Greek characters differently. Here is a configuration for v3.2.2 that will make the upper-case Greek letters upright when entered as literal Unicode characters. MathJax = {
startup: {
ready() {
const {RANGES} = MathJax._.core.MmlTree.OperatorDictionary;
const {TEXCLASS} = MathJax._.core.MmlTree.MmlNode;
RANGES.splice(4, 1,
[0x0370, 0x0385, TEXCLASS.ORD, 'mi'],
[0x0386, 0x3AB, TEXCLASS.ORD, 'mi', 'normal'],
[0x03AC, 0x1A20, TEXCLASS.ORD, 'mi']
);
MathJax.startup.defaultReady();
}
}
}; (at least all the plain ones; some explicitly accented ones are not fixed by this.) See if that works for you. |
MathJax v3
For math like$$数学$$ , the Chinese characters are italic, its character is rendered as
but in v2, the character are not in italic.
So, is there a reason of this spec change, and is there any options to control this?
The text was updated successfully, but these errors were encountered: