[Tex/LaTex] LuaLatex + Unicode-math, can’t get upright greek with “\up*” commands

greekluatexunicode-math

I was trying to type in upright greek letters in LaTex, and I've been recommended to use LuaLaTex with Unicode-math package to accomplish that.

However I ran into a weird issue. If I want to type in upright letter $\upmu$, it will be displayed as italicized. I can only get it by typing \mathrm{\mu}. Below is an example and its output. Am I missing something obvious here?

Thanks for your help.

enter image description here

\documentclass{article}
\usepackage{upgreek}
\usepackage{amsmath}
\usepackage{unicode-math}

\begin{document}
This will not work: $\upmu$ $\mitAlpha$

But this will work: $\mathrm{\mu}$ $\mathit{\Alpha}$
\end{document}

Best Answer

How greek letter are typeset depends on the option math-style. With e.g. french both \upmu and \mu will be upright, with ISO both are italic. (I do find this confusing too, that \upXXX ends up italic ...). If you want to force upright mode for a single instance use a markup command like \mathup.

\documentclass{article}
\usepackage{amsmath}
\usepackage[math-style=ISO]{unicode-math} %or french, TeX, literal, upright

\begin{document}
$\upmu \mu x  $ 
$\mathup{\mu}$ 
$\mathit{\Alpha}$
\end{document}
Related Question