16

I'm using LatexTools for Sublime 2. I want to add the parameter -shell-escape to the build command, but struggling. The documentation says not to edit 'LaTeX.sublime-build', but to edit 'LaTeXTools.sublime-settings'. I've tried doing this, setting "builder": "script" and the build settings as follows:

"builder_settings" : { // General settings: // See README or third-party documentation // (built-ins): true shows the log of each command in the output panel "display_log" : true, // Platform-specific settings: "osx" : { // See README or third-party documentation "program": "pdflatex", "command": ["latexmk", "-cd", "-e", "$pdflatex = '%E -interaction=nonstopmode -synctex=1 %S %O'", "-f", "-pdf"] // "cmd": ["latexmk", "-cd", // "-e", "\\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'", // //"-silent", // "-shell-escape", // "-f", "-pdf"] }, "windows" : { // See README or third-party documentation }, "linux" : { // See README or third-party documentation } }, 

Which I think is what I need. But now when I try and build something, nothing happens.

Any suggestions on what to do?

2 Answers 2

14

What worked for me was adding "options": ["--shell-escape"], to builder_settings. The whole block looks like this for me:

"builder_settings" : { // General settings: // See README or third-party documentation // (built-ins): true shows the log of each command in the output panel "display_log" : false, "options": ["--shell-escape"], // Platform-specific settings: "osx" : { // See README or third-party documentation }, "windows" : { // See README or third-party documentation }, "linux" : { // See README or third-party documentation } }, 

Also, remember to delete all the auxiliary files before trying to build again.

2
  • this worked. nice! Commented Sep 15, 2016 at 15:11
  • For some reason, for me this setting was only applied after restarting Sublime Text. Commented May 1, 2019 at 13:00
8

I had similar problems, but these builder-settings eventually worked for me:

 "builder": "default", "builder_settings" : { // General settings: // See README or third-party documentation // (built-ins): true shows the log of each command in the output panel "display_log" : false, "program": "pdflatex", "command": ["latexmk", "-cd", "-e", "$pdflatex = '%E -shell-escape -interaction=nonstopmode -synctex=1 %S %O'", "-f", "-pdf"], // Platform-specific settings: "osx" : { // See README or third-party documentation }, "windows" : { // See README or third-party documentation }, "linux" : { // See README or third-party documentation } }, 

My problem was Sublime itself. I had to install a package called Fix My Path so Sublime used the $PATH variable correctly and inkscape could be recognized.

3
  • I fixed it! See the edits. Commented May 17, 2014 at 21:35
  • This worked for me, but I did get a Log parsing issues. Disregard unless something else is wrong message, any idea why? Commented Aug 27, 2015 at 0:26
  • Can't help you there, sorry. It's been a long time, and I don't have the same environment anymore... Commented Aug 28, 2015 at 8:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.