[Tex/LaTex] LaTeXTools in ST3 no longer compiling LaTeX after upgrade to El Capitan

macmactexsublime-text

I can use LaTeX in the terminal just fine, but after installing El Capitan I receive the following error.

    TraditionalBuilder: Invoking latexmk... 

    COULD NOT COMPILE!

    Attempted command:latexmk -cd -e $pdflatex = 'pdflatex -interaction=nonstopmode -synctex=1 %S %O' -f -pdf exam_1_sol.tex

Build engine: Traditional Builder

I reconfigured and migrated settings, that didn't change anything. I also checked the package settings, which appear below.

"osx":  {
    // Path used when invoking tex & friends; MUST include $PATH
    "texpath" : "$PATH:/usr/texbin:/usr/local/bin:/opt/local/bin"
    // Path to PDF viewer, if needed
    // TODO think about it. Also, maybe configure it here!
},

Any help?

Best Answer

I'm the author of LaTeXTools. I pushed an update a couple of days ago that should have fixed the El Capitan issue. However, as they say on Facebook, it's complicated :)

El Capitan no longer allows apps access to /usr. MacTeX 2015 addresses this by creating a link to the TeX binaries in /Library/TeX/texbin. The LaTeXTool update adds this to the texpath option by default (you may need to reconfigure your settings). See the README for details.

However, MacTeX <2015 do NOT have the /Library/TeX/texbin link. Exactly where the binaries are depends on the MacTeX version. Recent ones do seem to use /Library/TeX/Distributions/Programs/texbin, but older ones do not. Sadly, this means you need to figure out the right path and add it to the texpath option.

As for EPS files, I'm not sure what's going on---it may be that some external tool (perhaps even latexmk) fails because of the El Capitan changes. Not sure it's something that's related to LaTeXTools per se.

Related Question