[Tex/LaTex] shell escape is disabled

ifplatformmintedpygmentsshell-escapetexniccenter

I am trying to use minted for code highlighting. Now to use this package I need to enable shell escape. So I have set the compiler options as follows:

latex shell escape in TeXnicCenter

However, I am still getting the same error from minted:

Package minted Error: You must invoke LaTeX with the -shell-escape flag.

Only this time there is a warning from ifplatform:

shell escape is disabled, so I can only detect \ifwindows.

Please let me know how to resolve this issue.

Additional Information:

  • Tex distribution: TexLive 2016
  • Editor: TeXnicCenter
  • Platform: Windows 10
  • Installed python 3.5 and pygments using pip. The scripts path is also set in PATH variable.

Best Answer

In the options for latex, the tex file goes last (AFAIK). So when specifying options for an editor know which will be the placeholder for the tex file, and make sure it comes last