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

[Enhance] bold style for italic latin/Latin/greek and upright Greek #599

Open Firestar-Reimu opened 1 year ago

Firestar-Reimu commented 1 year ago

I want this style: (0 for italic and 1 for upright)

      a A \gamma \Gamma
math  0 0    0      1
bold  0 0    0      1

but style=TeX provides:

      a A \gamma \Gamma
math  0 0    0      1
bold  1 1    0      1

and style=ISO provides:

      a A \gamma \Gamma
math  0 0    0      0
bold  0 0    0      0
davidcarlisle commented 1 year ago

You don't show how you are selecting bold italic.

this works for me

\documentclass{article}
\usepackage{unicode-math}
\begin{document}

$Aa\Gamma\gamma$

$\symbfit{A}\symbfit{a}\symbf{\Gamma}\symbf{\gamma}$

\end{document}

image

Firestar-Reimu commented 1 year ago

I mean using \unimathsetup{mathbf=sym,math-style=???,bold-style=???} and use \mathbf{}

for example:

\documentclass{article}

\usepackage{fontspec}
\setmainfont{STIX Two Text}
\usepackage{unicode-math}
\unimathsetup{mathbf=sym,math-style=ISO,bold-style=ISO}
\setmathfont{STIX Two Math}
\begin{document}
\[
    a A \gamma \Gamma
\]
\[
    \mathbf{a} \mathbf{A} \mathbf{\gamma} \mathbf{\Gamma}
\]
\end{document}

A bold-style=upGreek in /texlive/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty line 468 (maybe produced by here) produce the same upright/italic glyphs as math-style=TeX, or a global setting of upGreek=true

  {upGreek} {
                \bool_gset_false:N \g__um_bfliteral_bool
                \bool_gset_true:N \g__um_bfupGreek_bool
                \bool_gset_false:N \g__um_bfupgreek_bool
                \bool_gset_false:N \g__um_bfupLatin_bool
                \bool_gset_false:N \g__um_bfuplatin_bool
            }
Firestar-Reimu commented 1 year ago

maybe we can use more options like [math-style={uplatin,upLatin,upgreek,upGreek}]