0

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.

\documentclass[]{report}

\usepackage[no-math]{fontspec} \setmainfont[]{TeX Gyre Pagella Math}

\usepackage{amsmath,amssymb,amsthm} \usepackage{unicode-math}

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

\AtBeginDocument{% \Umathchardef\myint 0 0 4185 } \begin{document}

{\XeTeXglyph4185\relax

( \myint )

\end{document}

overfull hbox
  • 223
  • 1
  • 5
  • That's not supported. If the font doesn't map the glyph to some Unicode codepoints then you can't use it in mathchardef. – Marcel Krüger May 10 '22 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. – overfull hbox May 10 '22 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 '22 at 20:41
  • @tch How willing are you to use LuaLaTeX instead? – Marcel Krüger May 10 '22 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. – overfull hbox May 10 '22 at 21:02
  • @tch That integral sign is huge. Do you really want to use it in inline math? Or do you want to use it in display math? Do you want e.g. \sum to be so big too? – Marcel Krüger May 10 '22 at 21:12
  • I was just using this particular integral size as an example. I want to use a somewhat larger size than the default in display math. – overfull hbox May 10 '22 at 21:55
  • I ended up switching to lualatex and it woks fine after applying the fix from: https://tex.stackexchange.com/questions/489859/tex-gyre-pagella-math-integral-sign-much-too-small. Thanks! – overfull hbox May 12 '22 at 15:14

0 Answers0