In XeXeX I can input a glyph by the glyph ID \XeTeXglyph4185\relax

However, when I try to define a math character, no character is inserted: \Umathchardef\myint 0 0 4185

If I instead use \Umathchardef\myint 0 0 "222B then I get the standard unicode integral. However, I of course want a different symbol.

I have tried reading the XeTeX reference pdf, but I am unable to figure out what values for ⟨math type⟩ ⟨fam.⟩ I should use.


\setmainfont[]{TeX Gyre Pagella Math}


mathrm = sym,
mathup = sym,
mathit = sym,
mathbf = sym,
mathbf = sym,
math-style = TeX,
bold-style = TeX,
]{TeX Gyre Pagella Math}

  \Umathchardef\myint 0 0 4185


\( \myint \)

  • That's not supported. If the font doesn't map the glyph to some Unicode codepoints then you can't use it in mathchardef. May 10, 2022 at 19:50
  • I see. Is there a standard way to do what I'm asking then? (i.e. to define this command). I figure I could modify the font file or to just use XeTeXglyph inside \text in mathmode. May 10, 2022 at 20:11
  • Quite likely the glyph was added with the idea of making a style selection feature, but the idea was never implemented.
    – egreg
    May 10, 2022 at 20:41
  • @tch How willing are you to use LuaLaTeX instead? May 10, 2022 at 20:49
  • Based on some other answers on this site I plan to try it out. I'm quite willing to use it as long as it doesn't take too much trouble to get my document to compile. May 10, 2022 at 21:02


You must log in to answer this question.

Browse other questions tagged .