latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
239 stars 28 forks source link

`math-style` affects Upright/Italic Mathematical Symbols #509

Closed e-kwsm closed 5 years ago

e-kwsm commented 5 years ago

Description

Passing math-style=ISO makes upright Greek symbols (e.g., \mupGamma) italic. Passing math-style=upright makes italic Latins and Greek symbols (e.g., \mitA and \mitGamma) upright.

Check/indicate

Minimal example demonstrating the issue

\documentclass[]{article}
\def\mathstyle{math-style=upright}
\usepackage[\mathstyle]{unicode-math}
\setmathfont{texgyrepagella-math.otf}
\begin{document}
\texttt{\mathstyle}

\begin{tabular}{cccccccc}
  \verb|A| & \verb|\mitA| & \verb|\Gamma| & \verb|Γ| & \verb|\itGamma| & \verb|\mitGamma| & \verb|\upGamma| & \verb|\mupGamma| \\
  \hline
  {}   $A$ &      $\mitA$ &      $\Gamma$ &      $Γ$ &      $\itGamma$ &      $\mitGamma$ &      $\upGamma$ &      $\mupGamma$ \\
\end{tabular}

\end{document}

iso

upright

Further details

I expect that \mupGamma is upright and \mitA and \mitGamma are italic regardless of math-style, like \upGamma and \itGamma.

https://github.com/wspr/unicode-math/blob/19f569d8449059a2e663f01ad8aae20a060c7235/um-doc-main.tex#L525-L527

Is this intended?

My Environment

wspr commented 5 years ago

Sorry, this is poorly explained in the documentation. \mupgamma is upright gamma as an “input character". It is identical to typing in the matching unicode char.

The idea of u-m is to then normalise the input chars to receive consistent output. If you want to specify an “output glyph" you need to use either \symup / \symit or one of the shorthands like \upgamma / \itgamma.

And if you don’t like the normalisation for some reason, then there’s math-style=literal :)

e-kwsm commented 5 years ago

I understand, thanks.