[XeTeX] unicode-math package and \UnicodeMathSymbol command

Joel C. Salomon joelcsalomon at gmail.com
Sun Jun 21 09:05:13 CEST 2009


Ed Morehouse wrote:
> i'm using the unicode-math package (2008/08/27 v0.3b) (which is really
> fantastic, by the way) with the xetex from texlive 2008, and having some trouble
> (re)declaring unicode math symbols.  for example, at the moment i would like to
> use the vertical bar as a relation symbol and inverted exclamation mark as an
> ordinary symbol.  but adding:
> 
>   \UnicodeMathSymbol{"0007C}{\vert}{\mathrel}{vertical bar}
>   \UnicodeMathSymbol{"000A1}{\invexclam}{\mathord}{inverted exclamation mark}
> 
> to the end of my preamble doesn't have any effect.

Is it having no effect at all, or are you getting an error message about
 \UnicodeMathSymbol being undefined?

If it’s the latter, try:

\makeatletter
	\let\UnicodeMathSymbol\um at mathsymbol@noparse
	\UnicodeMathSymbol{"0007C}{\vert}{\mathrel}{vertical bar}
	…
\makeatother

(Or maybe the \let\UnicodeMathSymbol\… is not needed?  Must test.)

When unicode-math.sty calls in unicode-math.tex and
unicode-math-add.tex, the \input command is wrapped in a \makeatletter
\makeatother, and \UnicodeMathSymbol has been defined as above.

> but what i would like is a way to make these declarations local to a document,
> or better yet abstract them in a package, without editing the unicode-math
> package itself.  any ideas?

Or, taking the lead from some other packages I’ve seen, unicode-math
could look for a local file unicode-math.cfg that holds commands like
\UnicodeMathSymbol{"0007C}{\vert}{\mathrel}{vertical bar} &c.

(Can somebody get Will his magnetically-suspended table, so that he’ll
have time to work on Important Stuff like unicode-math, so that I can
work on my rocket lander? ☺

(Seriously, though, I want to thank Will for all the time he’s taken
from his thesis work to help make things work.  Being in middle of a
thesis myself, I know how irritating such myriad little distractions can
be.  Beer’s on me if we ever meet up.)

—Joel Salomon


More information about the XeTeX mailing list