[Tex/LaTex] Sublime Text with LaTeXTools sets wrong PATH for TeX in OSX Mavericks

sublime-text

I'm having a very bizarre problem with ST2 for Mac OSX. I just installed it today, along with the LaTeXTools plugin. With the standard classes it works just fine.

My dissertation, however, uses a custom class (umthesis, which I renamed to umassthesis.cls [and updated the \ProvidesClass accordingly] to avoid conflict with the University of Michigan class on CTAN) and for some reason my ST2+LaTeXTools isn't locating the file. It's giving me the following error in the console: "./umthsmpl.tex:91: LaTeX Error: File `umassthesis.cls' not found. [^^M]"

It is, I believe, in the appropriate place (/Users/Dennis/Library/texmf/tex/latex/umassthesis.cls) and the other program I use to edit TeX (LaTeXian) is finding the class file without issue.

Is there something I need to modify in order to get this working with ST2?

UPDATE:

I also ran latexmk (the same process ST2 runs) from the command line, which also gave me a successful compilation.

UPDATE 2:

Following a comment, I placed the class file in the same directory as the .tex file I'm trying to compile, and it worked. So it seems that Sublime is setting the PATH incorrectly. How do I modify the path ST2 w/ LaTeXTools sets so that it scans my user texmf directory?

Best Answer

Well I found the solution to the problem here. Quoting from the post there:

Alright, I solved it. Something about upgrading to OSX Mavericks changed the path in which the MacTeX TeXLive distribution was located. ...I had to go into LaTeXTools.sublime-settings and change the OSX path. The default setting for OSX is:

"texpath" : "$PATH:/usr/texbin:/usr/local/bin:/opt/local/bin"

You just have to add the following path (/usr/local/texlive) to get things to work:

"texpath" : "$PATH:/usr/texbin:/usr/local/texlive:/usr/local/bin:/opt/local/bin"