latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
239 stars 28 forks source link

Missing character: There is no 𝜋 (U+1D70B) in font [lmroman10-regular] #629

Closed Mankka closed 5 months ago

Mankka commented 5 months ago

I have a class of operators, where the default operator is pi. This sometimes results in \operatorname{\pi}(x) being typeset. The minimal example below results in error Missing character: There is no 𝜋 (U+1D70B) in font [lmroman10-regular]:+tlig;! and no pi character is printed. Same problem with STIX fonts. If I remove unicode-math, everything works. The system is up to date: This is LuaHBTeX, Version 1.17.0 (TeX Live 2023).

\documentclass{article}

\usepackage{unicode-math}

\begin{document}

$\operatorname{\pi}(x)$

\end{document}
davidcarlisle commented 5 months ago

This isn't really a unicode-math issue, operatorname uses the roman upright fomt (latin modern here) and the roman font chosen doesn't have the math Greek (or any other Greek) characters.

You could for example do

\documentclass{article}

\usepackage{unicode-math}

\begin{document}

$\mathop{\pi}(x)$

\end{document}

and select operator spacing without switching to the roman font.

It sort of accidentally works without unicode-math as there you are usng classic 8 bit math fonts and \pi is a fixed symbol that ignores math font commands like \mathrm but with Unicode math it's just a "normal character" and is set up to follow math font switches, but if you switch to a font without the characetr you get the warning shown,

Mankka commented 5 months ago

Thank you for the clarification! I closed this as a non-issue.