4

I have used the first option in the accepted answer to Garamond and math fonts However, I get errors such as Missing character: There is no ___ (U+225C) in font [Garamond-Math.otf]:mode=bas" And indeed those symbols are missing in the final pdf. How to fix this and make the math symbols appear? I am using texlive-full-2019 and lualatex. (For your reference, the above symbol is \triangleeq.)

EDIT: There are some 20-ish missing symbols, so defining them one by one is not an ideal solution. Is there anything scalable?

1
  • No, no automatic replacement.
    – egreg
    Nov 30, 2020 at 21:30

2 Answers 2

5

You can take the symbols that your primary math font lacks from another math font, such as STIX Two Math:

\documentclass{article}
\tracinglostchars=2
\usepackage{unicode-math}

\defaultfontfeatures{ Scale=MatchLowercase }
\setmainfont{EB Garamond}[Scale = 1.0]
\setmathfont{Garamond Math}
\setmathfont{STIX Two Math}[range=\triangleq]

\pagestyle{empty}

\begin{document}
\[ a\triangleq b \]
\end{document}

Garamond Math/STIX Two Math sample

This document contains a number of font specimens that you can check.

Edit: It’s been a while, but I missed the follow-up question you edited in. You can load ranges of mathematical symbols, such as range="2200-"22FF (for the full mathematical symbols block).

If you’re missing most of the symbols you use, you might actually want to do it the other way around, loading a different main math font for its symbols, and then loading the letters and basic ASCII from Garamond.

2

You can define missing symbol. For example:

\def\triangleeq{\buildrel\bigtriangleup\over=}
1
  • This will not work with unicode-math, which defers its definitions until the end of the preamble. You have to wrap the redefinition in \AtBeginDocument for it to take effect.
    – Davislor
    Mar 2, 2023 at 20:32

You must log in to answer this question.

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