[XeTeX] Using the Unicode prime character (Was re. Single glyphs from a font)

Ross Moore ross at ics.mq.edu.au
Tue Jun 9 23:28:17 CEST 2009


Hi Joel,

On 10/06/2009, at 12:32 AM, Joel C. Salomon wrote:

> Ross,
>
> Thanks for all the help here.

You're welcome.

>>>> Now even this works:    \tag{$\ref{abc}'$}
>>>> using the ordinary ASCII single-quote/apostrophe.
>>> Not quite; $'$ has some superscripting magic associated with it.   
>>> Try
>>> $\prime{}'$ and you’ll see the difference.  (Without the ‘{}’,  
>>> you’ll
>>> get a weird primed prime.)
>>
>> That is TeX's  \mathcode"8000  trick, which allows ordinary
>> letters to become macros when in math-mode.
> <snip>
>> This makes it very convenient to do  f'' and f'''  etc.
>> But other complicated superscripting should not be done this way.
>
> I’d read about that trick.  The problem is that it want to treat $x'$
> like $x^\prime$ using the large CM Math prime character.

There is a discussion of these "pseudo-script" characters also
taking place on a MathML-related list.

Some software uses the Unicode character directly, while
other software (such as TeX) has a character that is required
to be superscripted; e.g., as $...^\prime ...$.
With these it is not normal to use the oversized character by itself.
It is only included in the font for the convenience of encoding,
and when it might be needed at \Large (etc.) sizes.


> The Unicode
> prime character is already at the correct size and position.  Try
> $\prime{}'$ and you’ll see that the second one is shifted up by some
> amount.  (With $\prime'$ it’s even worse.)

I don't see a difference in the placement. (see attached image)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 8.png
Type: image/png
Size: 72322 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20090610/44841e21/attachment-0001.png>
-------------- next part --------------


> I suppose the fix for this would be to redefine the \mathcode"8000  
> macro
> for ['] so that it directly evaluates to [?].  Or just to avoid  
> the $x'$
> form and directly use $x\prime$ or $x?$.

I'd not mess with the \mathcode of ['].
You'll surely break multiple primes. See my attached image.

If you want to mess with anything, do some tracing to look at how
$f''$ expands. Hook into the internal macros rather than change
the user-interface.

>
> —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