2

I installed STIX2 fonts in otf format on my Win10 machine.

I tried:


\documentclass{minimal}
\usepackage{bm}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{STIX2Text-Regular.otf}
\setmathfont{STIX2Math.otf}
\begin{document}
$$
\bm{\alpha}
$$
\end{document}

--------------------------------

by (under xelatex, miktex 2.9) I get error:

! Improper alphabetic constant.
<to be read again> 
               \mitalpha 
l.11  \bm{\alpha}
             ? 
Process has been terminated ...

------------------------

I can get standard text to work but I have issues with math. Where could I learn about this? I can use STIX rel.1x fonts in standard latex compilation (with \usepackage{stix}) but I wanted to try STIX2 for which there is no latex package yet.

Thanks Maurizio

3

The bm-package and unicode-math (often/sometimes) doesn't work well together. See e.g. https://tex.stackexchange.com/a/315389/2388

You can use \symbf to get a bold alpha:

\documentclass{article}
\usepackage{bm}
\usepackage{fontspec}
\usepackage{unicode-math}

\setmainfont{STIX2Text-Regular.otf}
\setmathfont{STIX2Math.otf}
\begin{document}

$\alpha\symbf{\alpha}$

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.