XeLaTeX still using CMM fonts

70 views
Skip to first unread message

Joel C. Salomon

unread,
Jun 8, 2009, 12:41:21 PM6/8/09
to "Unicode Maths for Τεχ"
\documentclass{minimal}
\usepackage{fontspec, xunicode, xltxtra}

\usepackage{amsmath}

\usepackage{unicode-math}

\setmainfont[Mapping=tex-text]{Cambria}
\setmathfont{Cambria Math}

\begin{document}
Compare the ellipsis dots in
\[ x_0, x_1, \ldots, x_n, \dotsc \]
to those in
\[ x_0 + x_1 + \cdots + x_n, \dotsb \]
Note: Even though Cambria Math includes both [U+002E ‘.’ Full Stop]
and [U+2026 ‘…’ Horizontal Ellipsis], the dots in the first example
are taken from the Computer Modern Math font.
\end{document}


A few observations:
• \ldots & \dotsc both use spaced-out full-stops [U+002E ‘.’]
• unicode-math.tex sets \cdots to [U+22EF ‘⋯’ Midline Horizontal Ellipsis]
• \dotsb uses spaced-out middle dots [U+00B7 ‘·’]
• I’ve tried including the ‘…’ character in the math, as in
\( x_0, x_1, …, x_n \)
but it gets ignored.

So my questions are:
1. How can I redefine \ldots to the Unicode character? and
2. How can I get \dotsc to use the full-stop from Cambria Math?

—Joel Salomon

Ross Moore

unread,
Jun 8, 2009, 5:36:41 PM6/8/09
to uni...@googlegroups.com, Joel C. Salomon
Hello Joel,

\dotsb and \dotsc are defined by AMSmath, and expand to internal
control sequences, rather than directly to characters.
These assume CM and AMS fonts, and changing this is indeed rather
awkward.
For \dotsc you really don't want the full-stop, but the proper
Unicode character.

Here is some coding that works --- though there may be more elegant
ways to do it.


\makeatletter
\let\UnicodeMathSymbol\um@mathsymbol@noparse
\UnicodeMathSymbol{"02026}{\mathellipsis}{\mathrel}{ellipsis}%
\UnicodeMathSymbol{"022EF}{\cdots}{\mathrel}{midline horizontal
ellipsis}%
\let\mathellipsis …
\let\@ldots …
\let\@cdots ⋯
\makeatother

Put the above in your preamble, after all the relevant packages have
been loaded, and after having called \setmathfont{...} .


>
> —Joel Salomon

Hope this helps,

Ross

------------------------------------------------------------------------
Ross Moore ro...@maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages