3

(Updated to reflect newest findings.)

I recently switched to TeX Live 2015 and am struggling with a few problems in code that worked perfectly fine in TeX Live 2014. For instance: \mathit does not work with Greek symbols when using fonstpec and lualatex.

Consider this minimal example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}

\begin{document}
  $ A \Delta a \Gamma \mathit{\Gamma} $
\end{document}

By convention in my field of work, \Gamma is supposed to be italic (only this Gamma, not all Greek letters). Not using fontspec works fine. Once fontspec is loaded, the \Gamma just disappears without any warning. Including or not including unicode-math does not help.

Somehow this problem only occurs when TeX Live 2015 is used and all packages are updated to the latest versions (as of 2015-09-30). A clean install from MacTex 2015 is not affected. After updating the packages via TeX Live Utility, the slanted \mathit{\Gamma} is gone.

(TeX Live 2015, all packages updated, Mac OS X 10.10.5)

3
  • Just to verify: In your field, all uppercase Greek letters should be typeset slanted -- not just \Gamma, right? Please advise.
    – Mico
    Sep 30, 2015 at 8:14
  • No, only some Greek letters need to be slanted, like \Gamma in this meaning. Not even all \Gamma in the document need to be slanted. Sep 30, 2015 at 8:21
  • 1
    The new commands in v0.8 onwards are \symit and so on for performing these transformations. Sep 30, 2015 at 15:46

2 Answers 2

5

As of v0.8 of unicode-math \mathit functionality has changed. However, the new commands for single symbols work:

Use symit:

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\begin{document}
  $ A \Delta a \Gamma \symit{\Gamma} $
\end{document} 

Legacy mode for documents relying on the old mathit behavior:

\usepackage[mathit=sym]{unicode-math}

See §4.4 of unicode-math documentation for more details.

6
  • 3
    Not broken, by design — \mathit now switches to "text italic font in maths mode" to be consistent with regular LaTeX. Sep 30, 2015 at 15:45
  • No, Latin Modern definitely has an ä, but it does not show up with mathit.
    – MaxNoe
    Sep 30, 2015 at 23:03
  • @Will Robertson which font is used and how can I set it?
    – MaxNoe
    Oct 1, 2015 at 8:03
  • MaxNoe — Looks like a bug :) I must have forgotten to include \mathit to be auto-selected. You can use \setmathfontface\mathit{...} to choose that font explicitly. Oct 1, 2015 at 9:20
  • If I do this: \setmathfontface\mathit{Latin Modern Roman} I get upright \mathit{}.
    – MaxNoe
    Oct 1, 2015 at 10:49
3

(Edited the answer after the OP clarified that only \Gamma, but no other Greek uppercase letters, should be rendered in slanted rather than upright shape.)

The following method should work with TeX installations that are a few months old (as of 2015/09/30) or older: You need to load the unicode-math package in order to make \mathit{\Gamma} work as expected. (To generate an upright \Gamma, just keep inputting \Gamma.)

A full MWE:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\begin{document}
  $ A \Delta a \Gamma \mathit{\Gamma} $
\end{document} 

In contrast, if your system has version 0.8 (or later) of the unicode-math package -- see also Will Robertson's comment below -- you should write

\symit{Gamma}

in order to get the slanted glyph. Page 4 of the package's user guide explains the "new" syntax for invoking glyphs from various math alphabets.

13
  • And add bold-style=ISO for italics in bold math by default.
    – MaxNoe
    Sep 30, 2015 at 8:17
  • Not working for me. This makes \Delta (and all other Greek symbols) italic as well. Only \Gamma is supposed to be italic (not my decision…). Sep 30, 2015 at 8:18
  • @FlorianKruse - Thanks for clarifying that only \Gamma, but no other uppercase Greek letters, should be rendered in slanted form. I've updated my answer accordingly.
    – Mico
    Sep 30, 2015 at 8:41
  • 1
    works with the new \symit{\Gamma}, Γ also gone on arch linux
    – MaxNoe
    Sep 30, 2015 at 15:22
  • 2
    I thought I was more clear in the unicode-math documentation about this change, but perhaps not. As of v0.8, \mathit reverts to its original LaTeX definition of not affecting math symbol. As @MaxNoe says, the new command is \symit. But see Table 3 in the docs if you need backwards compatibility. Sep 30, 2015 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .