[XeTeX] class "book" in LaTeX

Jonathan Kew jonathan_kew at sil.org
Sat Sep 18 11:44:41 CEST 2004


On 18 Sep 2004, at 10:32 am, Bruno Voisin wrote:

> Le 18 sept. 04, à 10:15, Yves Codet a écrit :
>
>> I tried a test with the class "book" in LaTeX with the following 
>> input file:
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> \documentclass[10pt,a4paper]{book}
>> \usepackage{utf8accents}
>> \usepackage[frenchb]{babel}
>>
>> \DeclareFontFamily{U}{Zapfino}{}
>> \DeclareFontShape{U}{Zapfino}{m}{n}%
>>      {<-> "Zapfino"}{}
>> \DeclareFontShape{U}{Zapfino}{m}{it}%
>>      {<-> ssub * Zapfino/m/n}{}
>>
>> [...]
>>
>> I got some errors shown in this output:
>>
>> [...]
>>
>> ! Font \U/Zapfino/m/n/24.88=Zapfino at 24.88pt not loadable: Metric 
>> (TFM) file
>> or ATSUI font not found.
>> <to be read again>
>>                    \relax
>> l.38 \chapter{I}
>>
>
> Font substitution doesn't work. If you add in the preamble this 
> redefinition of LaTeX's internals, given by Ross Moore earlier last 
> month in a thread "Rép : [XeTeX] misplaced combining diacritical 
> marks":
>
> \makeatletter
> \def\do at subst@correction{%
>         \xdef\subst at correction{\font at name
>           \global\let\csname\curr at fontshape/\f at size\endcsname\font at name
>           \relax}%
>       \aftergroup\subst at correction
> }
> \makeatother
>
> then things work allright.
>
> I thought XeTeX's latest versions had been modified to eliminate this 
> problem, and for me they indeed work for other fonts than Zapfino (and 
> less substitutions than in your example). Why this happens here is a 
> mistery to me, and I won't be able to look into more detail this 
> weekend.
>

Yes, the latest XeTeX release was supposed to fix this, but it seems 
that I didn't quite get it right! :-(

A workaround is to ensure that your font name includes a space; that 
will force XeTeX to quote the name returned by \fontname, and this in 
turn makes the LaTeX substitution work. For example,

   \DeclareFontShape{U}{Zapfino}{m}{n}%
      {<-> "Zapfino:Ligatures=Common\space Ligatures"}{}

(which makes no difference, as the Common Ligatures feature is on by 
default anyway). With this modification, your file should run fine.

Incidentally, I noticed that you loaded the utf8accents package; as 
you're using Unicode input directly in this document, there's no need 
for that. (It shouldn't do any harm, either, but why make XeTeX take 
time reading extra source files?)

I'll fix the underlying font name problem better in the next update, in 
hopes of finally putting this problem behind us.

Jonathan



More information about the XeTeX mailing list