latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
246 stars 29 forks source link

Not getting italics in mathmode with math-style=TeX #105

Closed frabjous closed 14 years ago

frabjous commented 14 years ago

Firstly, let me say that I know that unicode-math package is intended primarily for TeXlive 2010 and later. However, I have installed it (along side the newer version of fontspec) with the version of TeXlive 2009 that comes with the Debian/Ubuntu packages, running on Ubuntu 10.04 64-bit.

For the most part, the package works well. (At the moment, I am using the STIX fonts, though I get the same behavior with Asana Math, Neo Euler, Iwona, DejaVu, etc.)

The one problem I am having is that even when I use math-style=TeX (which is supposed to give me italics in Latin and lowercase Greek variables by default), I don't get italics with any of those.

That is, the following MWE:

\documentclass{article}
\usepackage[math-style=TeX]{unicode-math}
\setmathfont{STIXGeneral}
\begin{document}
[
⊨ ¬∃y∀x[x∈y ↔ x∉x]
]
\end{document}

produces upright x's and y's.

A couple odd things here. Changing math-style=TeX to math-style=ISO, which is supposed to have the effect of making UpperCase Greek in math mode italicized as well, has the effect of italicizing lowercase Latin letters, while leaving the rest alone.

Another oddity is that I can achieve the desired effect if I explicitly specify an italic font, not for \mathit, but for \mathup, suggesting that \mathup is explicitly being used even with math-style=TeX. In other words:

\documentclass{article}
\usepackage[math-style=TeX]{unicode-math}
\setmathfont{STIXGeneral}
\setmathfont[range=\mathup/{latin,Latin}]{STIXGeneral Italic}
\begin{document}
[
⊨ ¬∃y∀x[x∈y ↔ x∉x]
]
\end{document}

generates x's and y's with italics.

It could well be that my version of xpackages or expl3 is out of date, but this just seems like such a strange thing.

Incidentally, you asked us to mention which other fonts are supported by the package. Besides the ones mentioned on the project page, and in documentation (FreeSans, FreeSerif, FreeMono, etc.) I've have some successes using the fonts on the following list, all of which are OFL or at least freely available, though none have near comprehensive coverage. (I'd be happy to provide links if need be.)

DejaVu Serif/Sans/Sans Mono Garava Guru Iwona Kabala Kurier Liberation Sans/Serif/Mono Linux Libertine/Biolinum Old Standard Open Symbol Pali Quivira Talapanna UnBatang/UnDotum Wen QuanYi Micro Hei

frabjous commented 14 years ago

Follow up: the problem is fixed when running under the testing version of TeXlive 2010 instead, at least on 32 bit linux. (Under 64 bit linux, I can't fully test, because the \setmathfont command always leads to a segfault, which I'll discuss separately.)

wspr commented 14 years ago

Sorry for the slow reply. This is really bizarre. I wonder what was going on; glad it's fixed now :)