[XeTeX] xetex and xfrac?

Stephen Moye stephenmoye at mac.com
Thu Dec 4 14:54:59 CET 2008


 On Thursday, December 04, 2008, at 05:50AM, "Axel E. Retif" <axel.retif at mac.com> wrote:
>On  3 Dec, 2008, at 10:46, Stephen Moye wrote:
>
>> I have tried to get xfrac to work using xetex and fontspec, but have  
>> had only limited success. If, for example, I set
>>
>>   \setmainfont{Goudy Std}
>>
>> and
>>
>>    \sfrac{1}{2}
>>
>> (notice, not in math mode, but in text mode) there is a 1/2  
>> fraction, but the spacing is not optimal. I tried:
>>
>> \DeclareInstance{xfrac}{"Goudy Std"}{text}{%
>> 	slash-right-kern = 1pt,
>> 	slash-left-kern	= 1pt,
>> }
>>
>> but this does not seem to do anything.
>>
>> I understand that xfrac is an experimental package at present, but  
>> just want to make sure that I am doing the right thing -- or not.
>
>I guess xfrac doesn't understand fonts that way, but with the tfm  
>family names (cmr, for Computer Modern; hlh, for Lucida, etc.); but try
>
>\DeclareInstance{xfrac}{default}{text}{%
>	slash-right-kern = 1pt,
>	slash-left-kern	= 1pt,
>}
>
>This will affect sfrac in san serif and italics as well, though.
>
>
>Best,
>
>Axel

Brilliant! Worked like the proverbial charm. Fortunately, I'm using \sfrac only with the roman -- no italics and no sans are involved.

Many thanks.

Stephen Moye


More information about the XeTeX mailing list