-
Notifications
You must be signed in to change notification settings - Fork 14
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
strange kerning after some letters in math #152
Comments
Sorry, I don't know, where the problem is. In LuaLaTeX or in the math font. If you try lualatex with |
The following seems to work: \mathitalicsmode = 2
\fontfam[LMfonts]
$T$'
\bye but it might present new problems: \fontfam[LMfonts]
\typosize[40/48]\parskip=40pt
\margins/1 (150,110) (7,7,7,7)mm
\footline={}
\fornum 0..2 \do{\mathitalicsmode=#1\relax #1:
$T$'\quad $f(T)$\quad
$1\over T$\quad $\int_a^b$\par}
\bye with some manual italic correction you can get a decent output \fontfam[LMfonts]
\typosize[40/48]\parskip=40pt
\margins/1 (150,110) (7,7,7,7)mm
\footline={}
\fornum 0..2 \do{\mathitalicsmode=#1\relax #1:
$T\/$'\quad $f(T\/)$\quad
$1\over T\/$\quad $\int_a^b$\par}
\bye maybe the italic correction can be inserted automatically using see https://tex.stackexchange.com/questions/697498/luatex-unicode-math-and-italic-correction?noredirect=1&lq=1 |
Maybe you will be interested in this talk: |
Your first problem was that luaTeX doesn't add italic correction at the end of the math list when Unicode math is used. With classical math, the italic correction is added. And I don't know how there is this different behavior. Try:
The first A:T' is printed by classical math font, the second one B:T' by Unicode math font. You can see in the log file:
The italic correction
prints to the log file:
Why this feature isn't default? What does mean We can try to implement automatic italic correction using |
You can experiment with the following code, which adds the italic correction at the end of the inline math mode. But I don't understand why this is not default behavior. Is it a bug in luaTeX?
|
To my understanding it is not a bug. I'm not sure why this is not the default, but one can argue that in some cases the italic correction is redundant, namely before punctuation (comma or a dot). Additionally Hans claims that the OpenType Math fonts standard is a mess, so maybe when LuaTeX was developed this was their choice. Note that in addition to the redundant italic correction before punctuation, the code does not fix sublists. As demonstrated above, the missing italic correction is causing the fraction rule to be too short. |
Try
The apostrophe seems too close to the letter. Not sure if this is a feature or a bug, but I think it does not look too good (imagine you have a text in quotation marks ending with
$T$
). The same works with$P$
. Also if you write something like$T$ h
, the letter h seems to be too close as if there was no space. If you comment out the\fontfam
line, there is no problem.The text was updated successfully, but these errors were encountered: