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
  • 3
    Which release of fontspec do you have?
    – Joseph Wright
    Feb 23, 2020 at 17:01
  • I have 2.7h and I'm in the process of updating Feb 23, 2020 at 17:40
  • @JosephWright The problem just disappears with the last version ! thanks Feb 23, 2020 at 17:46

2 Answers 2

9

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

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

2
  • I don't know the macro symbf. Is this part of a unicode-math ? Feb 23, 2020 at 17:45
  • 1
    @AlainMatthes Yes, since a couple of years, IIRC
    – egreg
    Feb 23, 2020 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}.

1
  • 1
    Thanks, it's very useful as a complement Feb 24, 2020 at 4:58

You must log in to answer this question.

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