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

How to use regular sans-serif italic/upright greek letter in math mode? #620

Open Firestar-Reimu opened 10 months ago

Firestar-Reimu commented 10 months ago

Description

Unicode-math does not support sans-serif italic/upright greek letter

Add info or delete as appropriate:

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}% filename only please!
\begin{document}
\[
  \alpha \mathsf{\alpha}
\]
\end{document}

You can try STIX Two Math, still do not support

Further details

https://mirrors.zju.edu.cn/CTAN/macros/unicodetex/latex/unicode-math/unimath-symbols.pdf

stone-zeng commented 10 months ago

Sans-serif italic/upright greek letters are not defined in Unicode.

stone-zeng commented 10 months ago

Some fonts may support these letters alternatively. For XITS, you can use ss02 to load the sans-serif version:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont[StylisticSet=2]{XITSMath-Regular.otf}
\begin{document}
\[ \alpha + \beta + \Gamma \]
\end{document}
Screenshot 2023-08-17 at 16 43 35
Firestar-Reimu commented 10 months ago

What can I do if I want some greek letters be sans-serif but a lot more others don't?

For example:

$$ X^\mu\nu = X^{\mu\rho} \eta{\rho_\nu} = \mathsf{X \eta} $$

X^\mu_\nu = X^{\mu\rho} \eta_{\rho_\nu} = \mathsf{X \eta}
stone-zeng commented 10 months ago

It's clearly impossible to use a glyph that doesn't exist in a font, unless you modify the font and add the things you need.

khaledhosny commented 3 months ago

No unicode-math issue here.