In an equation I want to use some bold calligraphic letters. This should be possible using \bm{\mathcal{X}}. However, even wenn using \bm{X} alone I get an error ("Extended mathchar used as mathchar"). I use xelatex from the latest MikTeX distribution.

Here is the MWE.

\documentclass{article}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\usepackage{bm}
\begin{document}
This is a simple math example with a variable $k$.
This does not work $\bm{k}$.
What I actually need is this: $\bm{\mathcal{X}}$ and $\bm{\Theta}$.
\end{document}

Do I do something wrong or is there a bug in XeLaTeX or in one of the packages?

up vote 1 down vote accepted

With unicode-math you don't generally need bm:

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

\setmainfont{XITS}
\setmathfont{XITS Math}

\begin{document}

This is a simple math example with a variable $k$.
This works $\symbfit{k}$.
What I actually need is this: $\mathbfcal{X}$ and $\symbf{\Theta}$.
Compare with $\mathcal{X}$ and $\Theta$.

\end{document}

enter image description here

  • Thank you! That's cool! Although now I have to change all occurences of \bm in my old code... – Mik May 10 at 17:28

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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