Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I installed a TeX Live 2011 distribution on a network drive, actually an Apple Time Capsule. Even though normal TeXing with LaTeX (via pdfTeX) in TeXShop works fine, when I try to use the %!TEX TS-program = xelatex option, I only get the xelatex: Command not found. error in the console.

This is what I have entered in TeXShop to be the (pdf)TeX path:

/Volumes/Time Capsule/TeX Live/2011/bin/x86_64-darwin/

A ls -l of this directory returns the following:

lrwxrwxrwx@ 1 username  staff         5 23 Oct 17:00 xelatex -> xetex
-rwxrwxrwx  1 username  staff  17777824 22 Jun 00:11 xetex

But also changing the typesetting option to %!TEX TS-program = xetex is to no avail, as it gives me the error xetex: Command not found.

Does anyone have an idea of how to solve this problem?

Thank you in advance.

share|improve this question
Did you try protecting the spaces? /Volumes/Time\ Capsule/TeX\ Live/2011/bin/x86_64-darwin? –  egreg Nov 21 '11 at 20:45
add comment

2 Answers

up vote 2 down vote accepted

The method used by MacTeX is to build a symbolic link to the directory containing the binaries. You can try the same strategy: from the Terminal issue the following commands

sudo ln -s "/Volumes/Time Capsule/TeX Live/2011/bin/x86_64-darwin" /usr/texbin
echo "/usr/texbin" > TeX
sudo mv TeX /etc/paths.d

In this way you can put into the preferences of TeXShop simply the path /usr/texbin. The second and third line will make available /usr/texbin also for all other applications (the Terminal, for instance).

This has another advantage; when TeX Live 2012 will be available, all you'll have to do, after installing it, will be

sudo rm /usr/texbin
sudo ln -s "/Volumes/Time Capsule/TeX Live/2011/bin/x86_64-darwin" /usr/texbin

and the new binaries will be available to all programs without any other intervention.

You may want to choose a different name than texbin, if you intend to try MacTeX, that would overwrite that symbolic link. But reinstating it is simply a matter of repeating that command at the Terminal.

Note also that this procedure doesn't touch anything in the system: the former state can be obtained by simply removing the symbolic link and the added file:

sudo rm /usr/texbin
sudo rm /etc/paths.d/TeX
share|improve this answer
add comment

The problem lies within the specifics of my installation as I installed TeXLive to the NAS and just the “GUI-Applications.pkg” from the MacTeX bundle to my local machine.

So it is actually more a TeXShop-related problem rather than a MacTeX problem because it turns out that TeXShop uses the path set in its preferences exactly for what it is labelled: (pdf)TeX. The problem with this is that it only uses it for (pdf)TeX. All other so-called TeXShop Engines are stored separately in the user Library (~/Library/TeXShop/Engines/). The XeLaTeX engine for example looks like this:


set path= ($path /usr/texbin /usr/local/bin)
xelatex  -file-line-error -synctex=1 "$1"

This means that it searches for the xelatex program in the system PATH and the standard bins of a local installation exclusively.

To solve this problem, I need to either add the remote texbin to my system PATH as pointed out by egreg (thank you for that) or add it manually to all TeXShop engines. If done the latter way, one has to escape the spaces like this /Volumes/Time\ Capsule/TeX\ Live/2011/bin/x86_64-darwin, of course, as said by egreg as well.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.