-
Notifications
You must be signed in to change notification settings - Fork 29
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
\setmathfontface\mathit has no effect in preamble #618
Comments
Thank you for this valuable bit of information, but I think this does not suit my needs, because of kerning (eg. when typesetting My use case is I typeset computer science, where multi-letter variables are a thing. I need the kerning of such a variable to be word-like, not product-of-single-letter-variables-like, while retaining letters that are of the same nature as single-letter variables (that is : not the same italic which is used to emphasise text). |
Nice. After going through the package, it seems I can get the output I want by saying \documentclass[varwidth, border=3pt]{standalone}
\usepackage{fontspec, unicode-math}
\setmainfont{texgyrepagella}
\setmathfont{texgyrepagella-math.otf}
\setmainfont{Gentium}
\begin{document}
different\\
$d$\\
$\mathit{different}$ \\
\textit{different}
\end{document} Removing Removing Also, the first I wonder if this is normal. |
Poor Solution:
Or:
|
The purpose is consistantly to use different font between \textit and \mathit, isn’t it? |
it depends on what you define!
Only for fonts which have text and math glyphs, it is the same for |
No fonts have text and math glyphs. \symit and \mathit should be distinguished. 〇〇-Math.otf should be assigned for \symit, but 〇〇-Italic.otc should be assigned for \mathit. Now we have discussed about how to assign different (text) fonts to \textit and \mathit. Easy way is using \setmathrm, but unicode-math also provide \setmathfontface. But it sometimes doesn’t work, like ysalmon pointed out. |
Description
Issuing
\setmathfontface\mathit{texgyrepagella-italic.otf}
in the preamble of my document does not change the appearance of things typeset with\mathit
.Add info or delete as appropriate:
\mathit
looks like the italic variant of the main font). However this happens without any call to\setmainfont
as well.Minimal example demonstrating the issue
The third
a
should look like the second one, because TexGyrePagella italic does look like the math characters of TexGyrePagella-math.Further details
Issuing
\setmathfontface
after\begin{document}
gives an error that it should only be used in preamble.Issuing
\AtBeginDocument{\setmathfontface...}
in the preamble works.The log shows that the requested font is indeed loaded at some point.
document1.log
The text was updated successfully, but these errors were encountered: