[XeTeX] Re: [MacTeX] XeTeX

Bruno Voisin Bruno.Voisin at hmg.inpg.fr
Mon Apr 12 19:31:27 CEST 2004

Hi Ross,

Thanks for your patient and extensive explanations. Some brief answers
follow, I won't have time to go much further on this discussion.
>   2.  when installing a new version using  tar  then existing
>       directories are not rewritten --- rather, new files
>       are added and old ones updated. So local additions should
>       survive an update...
>    ... unless the update strategy is to create a completely
>       new directory and remove the old one entirely.

Yes I think that's exactly what it is. It may be the result of options I
chose once and don't remember, I'm not sure, but it seems to me that:
- when you update the TeX i-Package i-Installer downloads the new bits 

- and then when you press Install & Configure i-Installer first erases 
the TeX tree save the content of texmf.local, then redoes a complete
>     see above.  Does Gerben replace whole directories ?
>     Certainly the TeXLive installer does not (at least in
>     the pre-gwTeX days).

I think so.

>>> [glenlivet:] rossmoor% more `which pdflatex`
>>> #!/bin/sh
>>> test -f "`kpsewhich pdflatex.fmt`" || fmtutil --byfmt pdflatex
>>> exec pdftex -fmt=pdflatex -progname=pdflatex "$@"
> This says...
> 1st line:
>  test to see whether  pdflatex.fmt  exists within
>  a valid  texmf/ tree.  If not, then create it.
> 2nd line:
>  run pdftex with pdflatex.fmt preloaded, and use the name
>   'pdflatex' to identify this kind of action.
>  Also, make sure to use all the command-line arguments $@
>  that the user provided.

Thanks for the explanation. The above was clearly beyond my competence.

>> Being able to compile custom formats and have them used by
>> TeXShop is
>> something I miss from Textures.
> You can do all that with teTeX.
> Here are the steps; hopefully this will make some sense to you:
>   1.  use  pdfinitex   instead of  pdftex
>       or   pdfinilatex  instead of  pdflatex
>      [snip]
>>   2.  place  \dump  at the place in your code where you want
>       the format to be dump'd from --- same with Textures.
> [snip]
>   3.  rename the .fmt (if you want --- no spaces allowed!!)
>       move the .fmt  into a place where TeX expects to look
>       for such format files; e.g.
>              ...../texmf.local/web2c/
>   4.  add a line into   texmf.cnf  that will help TeX find
>       any support files that your new format needs;
>       e.g.
>         (for  myformat.fmt  being customised from LaTeX)
>         TEXINPUTS.myformat  =  .;$TEXMF/tex/{generic,latex}//

Aside: I think this step too will create problems with Gerben's install.
The directory /usr/local/teTeX/share/texmf/ inside which texmf.cnf lives
(inside web2c) is erased in the process. Actually, if I remember
correctly, Gerben's installer warns that texmf.cnf will be replaced by a
newer version, and asks whether the former version should be saved on 
Desktop (default answer is yes) so that the user can inspect it later 
merge his/her changes with the newer version.
>   5.  make sure to run:  sudo texhash

Sorry, I wasn't clear in my cry for help: I did not have problems with
creating the format with initex (I did this routinely at the time I was
running OzTeX), my problems were about adding this format to the list of
available formats (Plain, LaTeX, ConTeXt) in TeXShop.
The ideal solution would be that it behaves as Textures, i.e. you create
the .fmt (or here .xfmt) file and put it where it belongs, and then the
format becomes automatically one of the available formats in TeXShop.
As I understand it, the above isn't possible, the only possibility is to
create an executable file or script calling the new format, and define 
as the personal script in TeXShop, and set TeXShop to use the personal
script by default. A drawback of this method is that you can only have 
personal script for Plain and another for LaTeX.
My problem was with creating the script: the solution from two years ago
involved a script similar, as far I remember, to the one you gave, and
this was clearly beyond my competence. Now it seems simpler and
straightforward (see below).
Actually the problem here is a bit different (my fault for describing it
as creating custom formats): it's not creating custom formats for the
existing TeX or pdfTeX engines, it's compiling the usual plain and LaTeX
formats for the new XeTeX engine. The same did not happen with Textures,
which can only use one engine.
> Nowadays, the command name can be parsed to help decide
> which format file to preload.
> e.g. with the symbolic link   pdflatex -> pdfetex
> the commandline is parsed to detect the  'latex' .
> THe result should be the same as:
>       pdfetex &latex  <document>
> or    pdfetex -fmt=pdfelatex  <document>
> The (older) script method should still work.
> Indeed, this may be the only way that does work with your
> own \dump'd formats, since the command-parsing may not be
> able to determine which .fmt to preload.
> Try it and see.

I tried the newer method and it seems to work:

1. Run "xeinitex -jobname=xelatex latex.ltx".

2. Move the created xelatex.xfmt to
3. Move to /usr/local/teTeX/bin/powerpc-apple-darwin-current and run "ln
-s xetex xelatex", to created a symlink xelatex to xetex.
4. Run "sudo texhash".

5. In TeXShop, define xelatex to be your personal LaTeX script.

I tried it with Bob's letter, it works. Two worries though: (i) the 
lines don't show up, because of course there is no color driver for
xdv2pdf yet; (ii) the margins seem to be different from those with 
or TeX + dvips, possibly because my setup is made for A4 paper (a choice
during Gerben's install) and the same has probably not been applied to


More information about the XeTeX mailing list