7

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.

5
  • 1
    The package luatextra interfers... Commented Jul 19, 2013 at 14:54
  • 1
    You have to load \usepackage[no-math]{fontspec}, while luatextra loads it without that option. Commented Jul 19, 2013 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$. Commented Jul 19, 2013 at 15:09
  • [no-math]{fontspec} before luatextra works fine. Is that an answer or just a workaround? Should I report the interference anywhere? Commented Jul 19, 2013 at 15:12
  • @LaRiFaRi There's nothing to report. Commented Jul 19, 2013 at 15:13

1 Answer 1

5

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 \symup{\Psi}$
\end{document}

enter image description here

You can see that the default is slanted, but with \symup 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.


Note: in the previous version of the code \mathup was used, but unicode-math underwent some changes and now \symup is the command to use for this purpose.

8
  • 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...) Commented Jul 19, 2013 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. Commented Jul 19, 2013 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 Commented Jul 19, 2013 at 15:55
  • Ulrike Fischer already reported it here: sourceforge.net/p/miktex/bugs/2276 Commented Jul 19, 2013 at 18:52
  • 1
    @schtandard The answer was working in 2013; now \symup should be used instead of \mathup. Commented Sep 17, 2019 at 16:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.