[OS X TeX] Coexisting TeX distributions and TeXShop .engine files

Jonathan Kew jonathan_kew at sil.org
Mon Jan 29 04:57:17 EST 2007

On 29 Jan 2007, at 8:50 am, Malcolm Ross wrote:

> I have two coexisting TeX distributions on my PowerBook G4. The TeX  
> Distributions preference pane shows them as gwTeX-2003-2005 and  
> TeXLive-2007, and the pane is switched to  TeXLive-2007. When I run  
> LaTeX, the log shows that TeXLive-2007 is used, but when I run  
> XeLaTeX, the log shows that teTeX (i.e. gwTeX) is used instead. I  
> had expected TeXLive to be used in both cases, and I am struggling  
> to understand why teTeX is used with XeLaTeX. Xe(La)TeX is present  
> in both distributions.
> The XeLaTeX.engine file reads:
> #!/bin/tcsh
> set path= ($path /usr/texbin /usr/local/bin)
> xelatex  "$1"
> I was under the impression that '/usr/texbin' should cause TeXShop  
> to use the distribution selected in the preference pane.

Note that this script *appends* /usr/texbin and /usr/local/bin to  
your existing $path. This means that if tcsh already has a $path  
element where xelatex exists, that will still be used.

The behavior with (pdf)latex is different because this doesn't use a  
separate .engine file running in a shell; TeXShop is calling pdftex  
directly using the full path from its preferences.

> It seems I am wrong. Can anyone enlighten me as to why this might  
> be happening and how I can fix things so that TeXLive-2007 is  
> chosen in all cases?

My guess is that you have a ~/.tcshrc or ~/.cshrc or /etc/csh.cshrc  
or something that is putting the old gwTeX binary directory into the  
path. Try running tcsh in Terminal (note that Terminal windows may  
well be running bash by default, which uses separate settings), and  
see what path it reports:

   Last login: Sat Jan 27 14:38:19 on ttyp2
   Welcome to Darwin!
   Kew-PBG4:~ jonathan$ /bin/tcsh
   [Kew-PBG4:~] jonathan% echo $path
   /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/mysql/bin
   [Kew-PBG4:~] jonathan% exit
   Kew-PBG4:~ jonathan$

One fix would be to change the engine file so that /usr/texbin is  
*prefixed* to the existing path, so it'll take precedence over  
anything that's already there:

> set path= (/usr/texbin $path /usr/local/bin)

The other (better) solution is to track down the out-of-date  
initialization file that is putting the old directory in the path,  
and change it to use the new /usr/texbin convention instead.



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/

More information about the MacOSX-TeX mailing list