# Emulating amsmath's \varGamma…\varOmega with unicode-math

While recompiling old documents with XeLaTeX and unicode-math I have run into the two problems:

1. The amsmath \varGamma...\varOmega macros for slanted uppercase Greek math characters are not defined. A simple \let substitution can at least provide characters, but it does not give the required italic characters with the math-style=TeX option. Some font packages have options to change the default uppercase Greek chars to italics (math-style=ISO equivalent), then the \varGamma... are defined to give upright chars. I would like to define these macros to behave consistently with the amsmath/LaTeX definitions.

2. The \bm macro form the bm package is the "best" way to obtain bold math in LaTeX. Without replacing all the \bm macros in the document, a \let\bm=\mathbf seem to work with unicode-math, but I do not know about potential pitfalls.

The problem is that all these macros are written in Latex3 programming style, which is way above my knowledge level.

\documentclass{article}
\usepackage{ifxetex}
\usepackage{amsmath}% for uppercase greek slanted variants
\ifxetex
\usepackage{xltxtra}
\def\mathstyle{TeX}   % or ISO
\usepackage[math-style=\mathstyle,
bold-style=\mathstyle,
vargreek-shape=TeX
]{unicode-math}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{TeX Gyre Pagella}
\setmathfont{Asana Math}
\let\bm\mathbf
\AtBeginDocument{
\let\varGamma  \mitGamma
\let\varDelta  \Delta
\let\varTheta  \Theta
\let\varLambda \Lambda
\let\varXi     \Xi
\let\varPi     \Pi
\let\varSigma  \Sigma
\let\varUpsilon\Upsilon
\let\varPhi    \Phi
\let\varPsi    \Psi
\let\varOmega  \Omega}
\else
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{mathpazo}
\usepackage{bm}
\fi
\begin{document}
\ifxetex
\XeLaTeX{} (\texttt{math-style=\mathstyle})
\else
\LaTeX
\fi
\medskip

\verb+\Gamma...\Omega+\par
$\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega$\quad
$\bm{\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega}$
\medskip

\verb+\varGamma...\varOmega+\par
$\varGamma\varDelta\varTheta\varLambda\varXi\varPi\varSigma\varUpsilon\varPhi\varPsi\varOmega$\quad
$\bm{\varGamma\varDelta\varTheta\varLambda\varXi\varPi\varSigma\varUpsilon\varPhi\varPsi\varOmega}$

\end{document}


-

There is the start of a unicode-math aware version of bm at

but I got busy and it's not fully finished (so not on ctan) as you say you can use \mathbf (I'm not sure I agree with unicode-math changing the meaning of \mathbf but anyway that's what it does:-)
I actually think it is great that unicode-math fixed \mathbf because its idiosyncratic behaviour WRT Greek lower case is IMO a bug if it weren’t for the idiosyncrasies of Computer Modern math fonts. –  Khaled Hosny Mar 28 '13 at 12:36
I agree with that (though I have no idea how to achieve it, most of unicode-math is black magic to me). –  Khaled Hosny Mar 28 '13 at 13:50