5

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}
  • 3
    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
9

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

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

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

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}.

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

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.