[XeTeX] OS X fonts.

Alain Schremmer Schremmer.Alain at verizon.net
Fri Jul 23 02:33:34 CEST 2004

First, let me say that I am overwhelmed. This is above and beyond  
anything I would have expected.

On Jul 22, 2004, at 6:46 PM, Bruno Voisin wrote:

> Le 22 juil. 04, à 23:57, Alain Schremmer a écrit :
>> (1) I downloaded the Sample Files.
>> When I tried to typeset XeTeX-notes, though, the console told me that  
>> it couldn't find `XeLaTeX.xfmt'!
>> I remembered seeing something about that in the FAQ and, sure enough,  
>> there it was. So, I used i-Installer to reconfigure with "no critical  
>> error" but `XeLaTeX.xfmt' still missing.
> - Do you have a file (notice the all-lowercase name)  
> /Library/teTeX/share/texmf.local/web2c/xelatex.xfmt? If not, the  
> XeLaTeX format has not been created.
Yes, I do. (Reminds me of when I got married and when I got naturalized  
a US citizen. No connection between the latter two, though.)

> - Do you have a directory /Library/teTeX/share/texmf.local/tex/xetex/  
> containing, in particular, xelatex.ini and xplain.tex? These files are  
> needed during the format creation.
Yes, I do.

> - Does the file /Library/teTeX/share/texmf.local/web2c/fmtutil.cnf  
> (the configuration file read by the command-line tool fmtutil which  
> does the actual format creation) contain the three lines:
> 	# XeTeX formats
> 	xetex		xetex		-			*xetex.ini
> 	xelatex		xetex		language.dat	*xelatex.ini
Yes, it does.

> If the answer is "no" to this question, then you probably have a  
> non-standard TeX setup, or the installation of XeTeX has not proceeded  
> correctly.
> - Did you modify the default language selection of the TeX i-Package  
> (see next answer below), to include languages for which the  
> hyphenation pattern files (in  
> /Library/teTeX/share/texmf.tetex/tex/generic/hyphen/) include  
> non-UTF-8 characters?
As far as I can remember, if this is what you mean, when I installed  
TeXshop etc, I chose English, French, Italian and Spanish. I never  
changed anything after that.
I looked at  /Library/teTeX/share/texmf.tetex/tex/generic/hyphen and  
here is what I found:


If what you mean is whether I changed the encoding in  
TeXshop/Preferences/Document, I tried with MacOSRoman, then changed and  
tried with UTF-8 Unicode, then changed back to MacOSRoman. Each time, I  
closed and reopened XeTeX Notes and tried to typeset.

> In case you did, did you try to come back to the default, as explained  
> in the XeTeX FAQ at  
> <http://scripts.sil.org/cms/scripts/page.php? 
> site_id=nrsi&item_id=xetex_faq>, and did it solve your problem?
I assume you are referring to:

Question: XeTeX is installed, but there's no xelatex.xfmt format so I  
can't use it with LaTeX files. And fmtutil can't seem to build this  
format. What's wrong?

Answer: The xelatex.xfmt file, along with the "plain" xetex.xfmt, is  
supposed to be created and installed by the configuration script. To  
see what went wrong, you can re-run the installer and review the output  
of the scripts (use Show Log in the Apple Installer, or View Subprocess  
Output in i-Installer).

One reason the creation of xelatex.xfmt may fail is related to  
hyphenation files and language settings. XeTeX reads all input files as  
Unicode text. However, the standard hyphenation files for many  
languages use encodings such as the TeX-Latin1 (Cork) encoding or  
various others. Such files, if they include literal characters in the  
range above 127, will almost certainly cause XeTeX to fail, with an  
"invalid character" error. This problem has been reported with Russian  
and Hungarian pattern files, and probably applies to others as well.

The correct solution to this is to create true Unicode versions of all  
such input files; then the patterns can be loaded and will work as  
intended with Unicode text. (Note that although simply using hex  
sequences ^^xx to represent the 8-bit character codes should allow  
XeTeX to read the files, the resulting hyphenation patterns will not be  
right for true Unicode text, only for text that uses that same legacy  

A workaround to allow xelatex.xfmt to be created is to skip the loading  
of hyphenation patterns for whichever languages are causing the  
problem, by modifying the language.dat file, usually found somewhere  
like texmf/tex/generic/config/.

There was nothing there that I felt that I could do without taking the  
risk of "doing damage to an otherwise perfectly good installation" or  
something to that effect.
> - Just to be sure, is XeTeX really installed on your system (did you  
> install the i-Package using i-Installer, or the .pkg file using  
> Apple's Installer), and TeXShop configured to use it (in the Composer  
> menu, Personal Script and LaTeX both checked)? In case it is, the  
> first line of your TeXShop run in the console window should be:
> 	This is XeTeXk, Version 3.14159-2.1-0.84 (Web2C 7.5.2)

Here is the full console message:

This is XeTeXk, Version 3.14159-2.1-0.84 (Web2C 7.5.2)
  %&-line parsing enabled.
kpathsea: Running mktexfmt XeLaTeX.xfmt
fmtutil: no info for format `XeLaTeX'.
I can't find the format file `XeLaTeX.xfmt'!

>> The Subprocess output says in several places
>> Hyphenation trie of length 8525 has 308 ops out of 35111
>>   9 for language 3
>>   30 for language 2
>>   88 for language 1
>>   181 for language 0
>> No pages of output.
>> Of course it doesn't mean anything to me.
> AFAIK, this is normal output during creation of a format. The  
> different languages means the different hyphenation patterns that are  
> preloaded in the format, as defined in  
> /Library/teTeX/share/texmf.local/tex/generic/config/language.dat:  
> language 0, the default hyphenation pattern, is always US English; the  
> other patterns loaded by default when installing teTeX are, I think,  
> French, German (old spelling), New German (new spelling), and possibly  
> also No Hyphenation.
> The list is preloaded hyphenation patterns is better modified during  
> the configuration stage of the TeX i-package (in Expert, not Basic,  
> mode), by adding or removing checkmarks in a list of available  
> patterns, then re-creating all the formats preloading them.

Should I re-install TeX or just re-configure it?
>> (2) But I did read the source of XeTeX-notes and it confirmed what  
>> you said and what I thought (not the same things):
>> It is work in progress and, moreover, more oriented towards TeX than  
>> LaTeX (and for non-Roman languages). Therefore emphatically not my  
>> size.
>> However, to quote:
>> 	[...]
>> But this only(?) in TeX.

> What do you mean?
It is just that it the quoted passage seemed to be about what I wanted  
to do but seemed to be in a TeX context—as opposed to a LaTeX one. I  
any case, this is quite above my currents capabilities.

Once again, I am truly embarrassed to have caused all this work. I seem  
to recall your saying that you were pressed for time.

Grateful regards

More information about the XeTeX mailing list