Posted by & filed under Hacks.

I tried installing LaTeX using the MacTex distribution, but had trouble using it with the excellent text editor TextMate, it simply could not find pdflatex or any of the other binaries needed to compile my paper. The error message I got was simply

pdflatex not found

After some fumbling I was able to specify the whereabouts of pdflatex by using TextMate’s shell variables (Under Preferences->Advanced), only to find that it still could not find the needed binaries:

kpsewhich: command not found

The LaTeX bundle manual indicated that the MacTeX installer should modify the path environment variable, but it did not modify mine. The solution was to modify /etc/profile’s path variable by changing




Log in and out, and test it by pressing Command-R in TextMate. Voila!

One Response to “MacTeX and TextMate”

  1. Michael

    Hi, I had the same problem. TextMate was not able to find kpsewhich, so it asked me to add the containing folder to its PATH varibale. The problem with that was that I could not find the file, too. Your solution worked well and everything is running now! Thank you


Leave a Reply

  • (will not be published)