[XeTeX] access to composite characters

musa furber musaf at runbox.com
Wed Nov 2 18:19:45 CET 2005


On Nov 2, 2005, at 5:56 AM, Will Robertson wrote:

> 02/11/2005, 1pm - musa furber wrote:
>
>> Every once in a while I ask for a hint on how to adjust the  
>> placement of the dot when I switch back and forth between regular  
>> and italic, but so far no luck.
>
> You can query this sort of information with various NFSS control  
> sequences. In this case \f at shape will contain n,it,sl,sc,... for  
> upright, italic, slanted, small caps... ("si" if using fontspec for  
> italic small caps)
>
> Try something like:
>
> \documentclass[12pt]{article}
> \begin{document}
> \makeatletter
> \newcommand\uprightornot{%
>   \edef\@tempa{n}%
>   \ifx\@tempa\f at shape
>     UPRIGHT%
>   \else
>     NOT UPRIGHT%
>   \fi}
> \makeatother
> this text is \uprightornot. \textit{this text is \uprightornot}.
> \end{document}
>
> How to use this for your purposes is left as an exercise...note  
> that when XeTeX gets font slant information, you should be able to  
> use that to adjust the position of the accent more automatically.

That is exactly the type of thing I was looking for. Thanks.

Exercisingly,
Musa




More information about the XeTeX mailing list