[XeTeX] access to composite characters

Ross Moore ross at ics.mq.edu.au
Thu Nov 3 02:58:35 CET 2005


Hi Will,

On 03/11/2005, at 12:16 PM, Will Robertson wrote:

> 02/11/2005, 9pm - Malte Rosenau wrote:
>
>> In T1 font encoding this letter was usually faked (unless it was  
>> available
>> in the font) via \d{h} (and in utf8x.sty mapped to \d{h}). If I  
>> understand
>> xunicode.sty correctly \d{h} points now to an empty unicode slot  
>> in my font
>> which produces this strange boxshaped character in my document.  
>> How can I
>> declare my own composite letter?
>
> If you're using xunicode for other things, then I guess all you  
> want to do is override \d{} in those cases you wish to use it.

This is a fine way of faking it, provided you allow for the
extra slant in italics, as has been discussed already.
But it stuffs up searchability, as has been mentioned already.
There *is* a way around this, ...

>
> T1's definition of it is:
>   \DeclareTextCommand{\d}{T1}[1]
>     {\hmode at bgroup
>      \o at lign{\relax#1\crcr\hidewidth\sh at ft{10}.\hidewidth}\egroup}
>
> So, all you need to do is coerce this definition to your requirements.
> You could therefore do something like:
>   \makeatletter
>   \def\dh{\hmode at bgroup
>      \o at lign{\relax h\crcr\hidewidth\sh at ft{10}.\hidewidth}\egroup}
>   \makeatother
>
> (untested)
>
> Remember, XeTeX is just TeX with some extra stuff, so the ways of  
> doing things in LaTeX are still valid. If you are using legacy  
> fonts to typeset what should be present in unicode, then the only  
> way to do it is via these old techniques.

  ... if you have a font with the correct character in it, somewhere.
The trick is to include a /ToUnicode resource for the font.
This allows you to associate the correct Unicode code-point to the
specific font's code-point.
Now searches within Preview *will* find occurrences of that symbol.

Of course some work may be needed to construct the appropriate
resource for your font, and to get it included within the PDF.
I have experience at doing this with pdfTeX, but haven't tried
yet with XeTeX.


Cheers,

	Ross

>
> Hope this helps,
>
> Will
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex

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




More information about the XeTeX mailing list