10

I'm using Latin Modern Math as math font but, since I don't like the blackboard bold letters that come with it, I replace them with the ones from TeX Gyre Termes Math. I believe to achieve this, the following is correct

\usepackage{unicode-math}
\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}
\setmathfont{TeX Gyre Termes Math}[range=bb] % blackboard letters

Unfortunately the last line also introduces white space after \big* delimiters:

enter image description here

Compare with:

enter image description here

Any idea why this is happening?

\documentclass{article}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{unicode-math}
\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}
\setmathfont{TeX Gyre Termes Math}[range=bb] % blackboard letters
\begin{document}

\[
\Bigl(\frac{d\symbf\varphi}{d\symbf\theta}\Bigr)^{\top} \frac{d\eta}{d\mu}
\quad \mathbb{R}^2
\]

\end{document}
9
  • what if you put the lmodern math after gyre?
    – naphaneal
    Apr 5, 2016 at 13:01
  • @naphaneal if reverse the order I get the same result as in the second picture
    – Ernest A
    Apr 5, 2016 at 13:09
  • Strange... I can't predict what could be causing this. Unfortunately I probably can't investigate in the near future, apologies. Will attempt over the weekend. Can you file a bug on GitHub please? Apr 5, 2016 at 13:23
  • with \left(...\right) it is ok
    – user2478
    Apr 5, 2016 at 13:26
  • 2
    @WillRobertson: The problem is the implicit ` \right.` in the code. The \setmathfont with "range" changes the delcode of the period, it is then no longer in the operators font but in __um_fam1 and one get a Missing character: There is no ^^@ in font LatinModernMath-Regular and some space. Everything works fine if I change in \__um_setup_delcodes: the delcode setting of the period to \__um_set_delcode:nnn {operators} {\.} {\c_zero}`. Apr 5, 2016 at 14:40

2 Answers 2

1

With \left(...\right) instead and, of course, an upright differential operator:

\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}
\setmathfont{TeX Gyre Termes Math}[range=bb] % blackboard letters
\begin{document}

    \[
    \left(\frac{\mathrm{d}\mbfitphi}{\mathrm{d}\mbfittheta}\right)^{\top} 
    \frac{\mathrm{d}\eta}{\mathrm{d}\mu}
    \quad \BbbR^2
    \]

\end{document}

enter image description here

0

The problem seem to be gone with LuaTeX in TL 2016. With XeTeX it is still broken, but Unicode math typesetting is in general broken in XeTeX.

Also amssymb and amsfonts are superfluous as unicode-math has all the symbols.

\documentclass{article}
\pagestyle{empty}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}
\setmathfont{TeX Gyre Termes Math}[range=\mathbb] % blackboard letters
\begin{document}

\[
\Bigl(\frac{d\symbf\varphi}{d\symbf\theta}\Bigr)^{\top} \frac{d\eta}{d\mu}
\quad \mathbb{R}^2
\]

\end{document}

With TeX Gyre Termes

enter image description here

Without TeX Gyre Termes

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .