unicode-math icon indicating copy to clipboard operation
unicode-math copied to clipboard

Using \mathversion breaks \SI

Open kexplorning opened this issue 4 years ago • 4 comments

Description

Using \mathversion will break \SI.

Add info or delete as appropriate:

  • Relevant for XeTeX

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}[version = tex]
\setmathfont{latinmodern-math.otf}[version = lm]
\mathversion{lm}

\usepackage{siunitx}

\begin{document}
\SI{1.2e-1}{kg.m^2}
$\SI{1.2e-1}{kg.m^2}$
\end{document}

image

- and \times is missing.

kexplorning avatar Mar 06 '20 07:03 kexplorning

Am 06.03.2020 um 08:31 schrieb kexplorning [email protected]:

Description

Using \mathversion will break \SI.

Add info or delete as appropriate:

Relevant for XeTeX Minimal example demonstrating the issue

\documentclass{article} \usepackage{unicode-math} \setmathfont{texgyrepagella-math.otf}][version = tex] ^^^^^ should be

\setmathfont{texgyrepagella-math.otf}[version = tex]

and then no problem with xelatex/lualatex

\setmathfont{latinmodern-math.otf}[version = lm] \mathversion{lm}

\usepackage{siunitx}

\begin{document} \SI{1.2e-1}{kg.m^2} $\SI{1.2e-1}{kg.m^2}$ \end{document} — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wspr/unicode-math/issues/538?email_source=notifications&email_token=ADCLIP4BYJ4EOTPIZBDNJHLRGCREBA5CNFSM4LC2MPEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ITAQAYA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCLIP274JMSNPEFS2FBCHDRGCREBANCNFSM4LC2MPEA.

hvoss49 avatar Mar 06 '20 09:03 hvoss49

@hvoss49 Sorry for misspelling, I was in a harry and didn't have a TeX system at that time.

I have fixed the description.

kexplorning avatar Mar 06 '20 10:03 kexplorning

You have to define one active main mathfont, e.g.:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}[version = tex]
\setmathfont{latinmodern-math.otf}[version = lm]
\setmathfont{xitsmath-regular.otf}%  Main math font
\mathversion{lm}
\usepackage{siunitx}
\begin{document}
\SI{1.2e-1}{kg.m^2}
$\SI{1.2e-1}{kg.m^2}$
\end{document}

Bildschirmfoto 2020-03-06 um 13 37 56

hvoss49 avatar Mar 06 '20 12:03 hvoss49

Thanks, it fixes the problem. But I don't understand why it doesn't influence math typesetting except this.

kexplorning avatar Mar 06 '20 12:03 kexplorning