[Tex/LaTex] Where and how to enable ‘–shell-escape’ or ‘–enable-write18’ of pdflatex.exe in LaTeXTools of Sublime Text

miktexshell-escapesublime-text

I know how to deal with the problem with the older version of LaTeXTools. But recently LaTeXTools has been updated, which turn out to deprive me of knowing what to do.

I use Windows+MikTex, by the way.

Best Answer

In the more recent versions of LaTeXTools, enabling this has become less hackish. There are two methods that can be used to set flags for pdflatex. Either:

  1. At the start of your text file include a "magic" comment like this: %!TEX option = --shell-escape

Or

  1. In the builder_settings section of LaTeXTools setting file, add a key "options" like this:

    "options": [ "--shell-escape" ],