4

This is a follow up question to here.

The recommended solution doesn't work for me. I therefore let all my mathematical packages in the MWE. The result is an upright Psi followed by an italic Psi. I would like to have all upper-case Greeks being italic in formulas. The possibility to set one character upright (for a constant, an operator...) would be great. Therefore I wonder, if there is a more beautiful solution around.

\documentclass[]{scrreprt}

\usepackage[final]{microtype}
\usepackage{luatextra}
\usepackage{fontenc}
    \defaultfontfeatures{Ligatures={TeX}}
\usepackage[ngerman, english]{babel}
\useshorthands{"}
\addto\extrasenglish{\languageshorthands{ngerman}}
\usepackage{amsmath}
\let\Gamma\varGamma
\let\Delta\varDelta
\let\Theta\varTheta
\let\Lambda\varLambda
\let\Xi\varXi
\let\Pi\varPi
\let\Sigma\varSigma
\let\Upsilon\varUpsilon
\let\Phi\varPhi
\let\Psi\varPsi
\let\Omega\varOmega
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{commath}
\usepackage[
per-mode=symbol-or-fraction,
locale=DE,
sticky-per
]{siunitx} 
\usepackage{xfrac}
%
\begin{document}
$\Psi \varPsi$
\end{document}

Edit My knowledge over the used math-packages is quite small. Don't know, if I use them at all (amssymb and mathtools). If they are obsolete or not recommended for typesetting in Germany (English and German) or if something is missing for typical formula setting, I would be glad for every advise.

  • 1
    The package luatextra interfers... – karlkoeller Jul 19 '13 at 14:54
  • 1
    You have to load \usepackage[no-math]{fontspec}, while luatextra loads it without that option. – egreg Jul 19 '13 at 15:04
  • 1
    if you need a single upright greek cap, before redefining the name of that letter, do something like this: \let\upPsi\Psi, then do your reassignment for the new default: \let\Psi\varPsi. then you can ask for $\upPsi \Psi$. – barbara beeton Jul 19 '13 at 15:09
  • [no-math]{fontspec} before luatextra works fine. Is that an answer or just a workaround? Should I report the interference anywhere? – LaRiFaRi Jul 19 '13 at 15:12
  • @LaRiFaRi There's nothing to report. – egreg Jul 19 '13 at 15:13
3

My advice is to use unicode-math:

\documentclass{scrreprt}
\usepackage[ngerman, english]{babel}

\usepackage{amsmath}
\usepackage[math-style=ISO]{unicode-math}
\usepackage[final]{microtype}

\usepackage[table]{xcolor}
\usepackage[
  per-mode=symbol-or-fraction,
  locale=DE,
  sticky-per
]{siunitx}

\useshorthands{"}
\addto\extrasenglish{\languageshorthands{ngerman}}

\begin{document}
$\Psi \mathup{\Psi}$
\end{document}

enter image description here

You can see that the default is slanted, but with \mathup you can get the upright letter.


With unicode-math you don't need amssymb. Load mathtools, if you want it, in place of amsmath before unicode-math.

Don't load commath: it is buggy.

  • 1. would you mind a personal recommendation: mathtools vs. amsmath? 2. how do you set operators like differential, derivative or partials? (no commath) 3. Package unicode-math Error: Cannot be run with pdfLaTeX (with LuaLaTeX I get over hundret errors...) – LaRiFaRi Jul 19 '13 at 15:23
  • 1
    @LaRiFaRi If you load luatextra you're running LuaLaTeX; if you get errors, you probably have an outdated TeX distribution. About mathtools vs. amsmath: it's a false problem, because the former loads the latter; if you need the features of mathtools, then load it. For commath, see tex.stackexchange.com/a/120379/4427 and you won't use it any more. – egreg Jul 19 '13 at 15:36
  • I will contact MikTeX or see, if there are newer versions. Updates are all installed (MikTeX 2.9). Your MWE only compiles with XeLaTeX. Thanks for your explanations and the help. Commath has been dismissed from my cluttered header.tex – LaRiFaRi Jul 19 '13 at 15:55
  • Ulrike Fischer already reported it here: sourceforge.net/p/miktex/bugs/2276 – LaRiFaRi Jul 19 '13 at 18:52
  • Did someone succeed with this? I am still getting \um_set_mathcode:nnn errors although the MiKTeX maintainer "fixed" that a while ago. Unicode-Math is not working with LuaLaTeX for me. – LaRiFaRi Aug 21 '13 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.