[XeTeX] Newbie troubles with XeTex for Linux

Jonathan Kew jonathan_kew at sil.org
Fri Aug 25 13:55:19 CEST 2006


On 25 Aug 2006, at 2:21 am, Steven Shaviro wrote:

>> I wonder -- do you *also* have the Ubuntu
>> teTeX packages installed, by any chance? (Are they shown as installed
>> in Synaptic?) I'm guessing that you may have two TeX installations,
>> and xetex got installed (or at least partially installed) with the
>> one you aren't actually using!
>
> yes, you are right. There was a teTeX installation at one point; I
> tried to remove all of it, but I seem to have missed parts of it.

In principle, using the distribution's package manager (e.g.,  
Synaptic) should take care of this; if you start adding or deleting  
stuff "behind its back", as it were, then things can get messy fast.

As far as I know, the xetex and xdvipdfmx .deb packages should have  
refused to install (using dpkg --install, for instance) unless the  
package manager believed teTeX was already present. But if the teTeX  
installation had been removed (partially, or even completely but  
without telling the package manager).... who knows!

> When I do a sudo texhash, I get:
> texhash: Updating /usr/share/texmf.ls -R
> Does this mean it is only updating the teTeX installation, and not
> the TeXLive one?

That doesn't sound complete for either one; I think it's confused.

My guess is that the easiest way forward (not necessarily *quickest*,  
but simplest!) would be a thorough "purge" (via the package manager,  
where appropriate) and reinstallation .... and note that the xetex  
Ubuntu .deb packages are for teTeX and *not* for TeX Live, so to work  
with TL you probably would need to build/install from source.

Alternatively, you can run texhash (or mktexlsr, which is the same  
thing) on specific trees by saying something like:

   sudo texhash /usr/local/texlive/2005/texmf

or wherever the new files are installed.

>
>> How is TL installed -- using the installation script directly from
>> the TeX Live DVD, or is there an Ubuntu package for this? (I don't
>> see one in Synaptic on my system.)
>
> I used the installation script from the TeXLive CD.

OK. I'm intending to take a look at this setup soon, as it's not one  
I've ever worked with.

> When I try to run:
>   ls -l 'which xetex
> all I get is:
> ls: which xetex: No such file or directory
> Am I somehow getting the syntax wrong?

Peter responded to this; it's

   ls -l `which xetex`

with "back-ticks", not quote marks.

Copy-and-paste between email and the terminal window, both for  
commands you want to try and for their results you want to show  
people, can help avoid typos like this.

>
>
>> I'm guessing that your real TeXLive binaries live somewhere like / 
>> usr/
>> local/texlive/2005/bin/i386-linux, and either this directory is in
>> the PATH or there are symlinks in /usr/bin. To work as expected, the
>> xetex binaries would need to be installed in the same way, otherwise
>> they won't find the same configuration files.
>
> /usr/local/texlive/2005/bin/i-386-linux is indeed included in the  
> PATH.

(That last directory would be "i386-linux", I believe.)

This is where the xetex and xdvipdfmx binaries should also go, then,  
in the TeX Live world. That way, they should find the TeX Live  
configuration files.


> .....
> However, xelatex still fails to run.

With the xetex binary in the correct location under texlive/2005/bin/ 
i386-linux, see if it works to build the format files using:

   sudo fmtutil-sys --byfmt xetex
   sudo fmtutil-sys --byfmt xelatex

If so, most things are being found. (And if not, the errors may tell  
you what files are still not where xetex can find them.) The most  
likely problem (besides simply failing to find files, if the ls-R  
database is not updated, or they're not in the right place) is that  
the xelatex format may fail because of invalid hyphenation files.  
Hungarian is a common culprit, and I believe a couple of others in  
TL2005 cause problems as well.

The (temporary) solution to this is to disable those languages in  
language.dat, or create "dummy" empty files in the current directory  
where you're running these commands. E.g., "touch huhyphn.tex" will  
create an empty file that xetex will find instead of the real  
patterns; of course, this will disable hyphenation for that language,  
but at least the format can be built.

Then the remaining step would be to create a "xelatex" symlink in the  
binaries directory, pointing to xetex:

   sudo ln -s xetex xelatex

(executed *in* the ....bin/i386-linux directory).


In theory, the "install-xetex" script that is part of the source  
distribution is supposed to take care of all this, so that you can  
download the source, run "sh ./build-xetex" and then "sudo sh ./ 
install-xetex", and you're all set. In practice, there may be issues  
with hyphenation files when building the xelatex format, as noted  
above, so this needs to be fixed before that format will build  
successfully.

HTH,

JK




More information about the XeTeX mailing list