Search code examples
pluginslatexsublimetextsublimetext3latexmk

Sublime Text 3 LaTeXTools plugin won't compile on Ubuntu


I've been a fan of the LaTeXTools plugin for Sublime Text for a while. However, the author recently updated the plugin, and it will no longer build my LaTeX documents. I'm wondering if anyone else has had this problem and knows how to fix it? Here's the full console output that I'm getting:

[Compiling /home/tingley/Dropbox/testtex.tex]

TraditionalBuilder: Invoking latexmk... 

COULD NOT COMPILE!

Attempted command:latexmk -cd -e $pdflatex = 'pdflatex -interaction=nonstopmode -synctex=1 %S %O' -f -pdf testtex.tex
Build engine: Traditional Builder

I'm using Sublime Text 3 on Ubuntu 13.10 with TeXLive. I can manually compile the document and generate a PDF with the following command:

pdflatex ~/Dropbox/testtex.tex

I would like to be able to do this easily within Sublime, though. I've already tried running "Update LaTeXTools and migrate settings" as well as removing and re-installing the plugin through package control.

Thank you!


Solution

  • I had the same problem too. I did 2 things that fixed the problem. After migrating my preferences, I opened:

    /"yourUsername"/.config/sublime-text-2/Packages/LaTeXTools/builders/traditionalBuilder.py

    and I removed the space after the = and before '%E:

    $pdflatex = '%E -interaction=nonstopmode........

    in the DEFAULT_COMMAND_LATEXMK.

    Also, I changed the file:

    /"yourUsername"/.config/sublime-text-2/Packages/LaTeXTools/LaTeXTools.default-settings

    specifically in the "Platform settings: adapt as needed for your machine" I changed the "linux" section:

    from "texpath" : "/usr/texbin"

    to "texpath" : "$PATH:/usr/texbin"

    After saving the changes, I went to Preferences->Package Settings->LaTexTools and selected Reconfigure LaTexTools and migrate settings.

    Restart Sublime and Ready.

    I use sublime-text-2 in Arch Linux but I think the changes will work.