# Problem with lualatex, TeXGyre Pagella Math and mathbf

With the next code I get:

LaTeX Font Warning: Font shape TU/TeXGyrePagella(1)/bx/n' undefined (Font) usingTU/TeXGyrePagella(1)/m/n'

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

How to avoid these warnings? At the moment my only solution is not to use TeX Gyre Pagella

% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{unicode-math}
\setmainfont[ Ligatures=TeX]{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
$\mathbf{R}^2$
\end{document}

• Which release of fontspec do you have? – Joseph Wright Feb 23 at 17:01
• I have 2.7h and I'm in the process of updating – Alain Matthes Feb 23 at 17:40
• @JosephWright The problem just disappears with the last version ! thanks – Alain Matthes Feb 23 at 17:46

The warning appears with fontspec version 2.7h, but disappears with version 2.7i (just downloaded).

However, you should be using \symbf{R}.

• I don't know the macro symbf. Is this part of a unicode-math ? – Alain Matthes Feb 23 at 17:45
• @AlainMatthes Yes, since a couple of years, IIRC – egreg Feb 23 at 20:29

You probably want \symbfup or \symbfit to get individual bold letters in math mode.

In unicode-math, \mathbf and \mathrm are intended more for complete words, such as \frac{\mathrm{RISE}}{\mathrm{RUN}}.

If you want to denote the Euclidean space ℝ², a good alternative is to use the blackboard letter \symbb{R} or, for compatibility, \mathbb{R}.

• Thanks, it's very useful as a complement – Alain Matthes Feb 24 at 4:58