[XeTeX] Single glyphs from a font
Ross Moore
ross at ics.mq.edu.au
Tue Jun 9 00:20:54 CEST 2009
Hi Joel,
On 09/06/2009, at 6:08 AM, Joel C. Salomon wrote:
> Joel C. Salomon wrote:
>> I’m trying to create this effect:
>> a² + b² = c² (1)
>> x² + y² = z² (1′)
>>
>
> I think I figured it out. In my preamble I have:
> \newfontface\cambriamath{Cambria Math}
> \newcommand{\textprime}{\cambriamath ′}
> Then the equation looks like:
> \begin{equation} \label{abc}
> a^2 + b^2 = c^2
> \end{equation}
> \begin{equation*} \label{abc:prime} \tag{\ref*{abc}\textprime}
> x^2 + y^2 = z^2
> \end{equation*}
> This works, but need I be wary of font-change commands in \tag{}s?
Yes, you probably should be.
>
> Also, why does
> \tag{\ref*{abc}$′$}
> not work? The glyph seems to be treated as a no-op in this context.
Firstly, why \ref* ? i.e., why the * ?
That doesn't work at all for me, but this is fine:
\tag{$\ref{abc}^\prime$}
Now to get the math symbol using Cambria, do similarly
to my previous posting about \ldots and \cdots, etc.
(on the "Unicode maths for TeX" email list)
viz.
\makeatletter
\let\UnicodeMathSymbol\um at mathsymbol@noparse
\UnicodeMathSymbol{"02026}{\mathellipsis}{\mathrel}{ellipsis}%
\UnicodeMathSymbol{"02032}{\prime}{\mathord}{prime}%
\UnicodeMathSymbol{"022EF}{\cdots}{\mathrel}{midline horizontal
ellipsis}%
\let\prime ′
\let\mathellipsis …
\let\@ldots …
\let\@cdots ⋯
\makeatother
Now even this works: \tag{$\ref{abc}'$}
using the ordinary ASCII single-quote/apostrophe.
>
> —Joel Salomon
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore ross at 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
------------------------------------------------------------------------
More information about the XeTeX
mailing list