2

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.
  • 1
    Try first the command from a DOS window and see if you get same error. This makes it easier to isolate the problem from the GUI. – Nasser Jun 27 '16 at 5:04
  • 1
    Have you checked if it is an issue that shell escape is last. I'd have "%vm" last – daleif Jun 27 '16 at 5:14
  • Thank you all for your comment. Executing pdflatex from cmd line run successfully. And also in TeXnicCenter I had changed the argument list as -interaction=nonstopmode -shell-escape "%wm", and that also worked in TeXnicCenter. If possible please post it as answer. – Sayan Pal Jun 27 '16 at 5:26
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.