2

Consider the following minimal example:

\documentclass{minimal}

\usepackage{fontspec}
\usepackage{unicode-math}

\defaultfontfeatures{Ligatures=TeX}
\setmainfont{TeX Gyre Pagella}
\setsansfont[Scale=MatchLowercase]{Tex Gyre Heros}
\setmonofont{Tex Gyre Cursor}
\setmathfont{TeX Gyre Pagella Math}

\begin{document}
$a \boxdiag b$

$a \boxbslash b$
\end{document}

If compiled with lualatex minimal.tex, the output ends up in something like

a b
a b

That means, the symbols \boxdiag and \boxbslash are not printed. Why do I even not get an error message? Are the symbols missing and I need to load a package for them?

2
  • you do get a warning in the log Missing character: There is no ⧄ (U+29C4) in font TeXGyrePagellaMath:mode=base ;script=math;language=DFLT;+tlig;! Missing character: There is no ⧅ (U+29C5) in font TeXGyrePagellaMath:mode=base ;script=math;language=DFLT;+tlig;! so it seems the font doesn't have those symbols Aug 16, 2016 at 15:59
  • you are right the warning is reported in the file minimal.log but is not output on the console where I would have expected the warning/error message. Thank you letting me know!
    – Max Maier
    Aug 16, 2016 at 17:25

1 Answer 1

3

As the warning in the log states, the font doesn't have those characters. Since they are just boxes, you could steal them from any font that does without too much typographic pain, xits math works:

enter image description here

\documentclass{minimal}

\usepackage{fontspec}
\usepackage{unicode-math}

\defaultfontfeatures{Ligatures=TeX}
\setmainfont{TeX Gyre Pagella}
\setsansfont[Scale=MatchLowercase]{Tex Gyre Heros}
\setmonofont{Tex Gyre Cursor}
\setmathfont{TeX Gyre Pagella Math}
\setmathfont[range={\boxdiag,\boxbslash}]{XITS Math}

\begin{document}
$a \boxdiag b$

$a \boxbslash b$
\end{document}
1
  • Thank you for your explanations! Interestingly on the console output the warning is not shown but in the log file it is. Didn't expect such a behaviour.
    – Max Maier
    Aug 16, 2016 at 17:29

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.