2

Given that I have a unicode math font with a glyph that I want to use in math mode, how can I, using the unicode-math package, define the glyph? I can get this to kind of work using \DeclareUTFcharacter, but with a resulting "invalid in math mode" warning.

\documentclass{article}
\usepackage{xunicode}
\usepackage{unicode-math}
\setmathfont{XITSMath-Regular.otf}
\DeclareUTFcharacter[\UTFencname]{x24C7}{\circledR} % "LaTeX Warning: Command \circledR invalid in math mode"
%\UnicodeMathSymbol{"024C7}{\circledR} {\mathrel}{circled R}
%\__um_process_symbol_noparse:nnn {"024C7}{\circledR} {\mathbin}
\begin{document}
circleddash: $\circleddash$
\\circledparallel: $\circledparallel$
\\circledR: $\circledR$
\end{document}
Vincent
  • 20,157

1 Answers1

1

I'm not sure there's an official interface; anyway, this works.

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITSMath-Regular.otf}

\Umathchardef\circledR="0 \symsymbols "24C7

\begin{document}

circleddash: $\circleddash$

circledparallel: $\circledparallel$

circledR: $\circledR$

\end{document}

enter image description here

egreg
  • 1,121,712