TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I require use of the minted package of similar one which support Prolog syntax-highlighting.

Given that I use the TeXworks "IDE", how do I enable shell-escape?


Though I attempted—see above—I still receive this in my output:

! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
share|improve this question
Just found this answer… is there a similar line I add for -shell-escape? – A T Nov 14 '12 at 11:20
You should move --shell-escape before $fullname (just select the line and use the green arrows). – egreg Nov 14 '12 at 11:28
Note the two dashes in the argument (as per egreg's comment) for MiKTeX. – cyberSingularity Nov 14 '12 at 11:47
up vote 16 down vote accepted

I have defined a new tool called pdflatex+shellescape:

enter image description here

And this is the console output if I run it on a file:

enter image description here

The log shows that the --shell-escape option has been activated. With MiKTeX you can call it --enable-write18, but since it understands also --shell-escape it's better to stick with the more general one.

share|improve this answer
Thanks; also I noticed after doing this it became impossible to compile the .tex file when it had spaces... – A T Nov 15 '12 at 5:05
@AT I don't know in Windows, but on Unix systems "$fullname" should work. In any case, better not using spaces in TeX file names. – egreg Nov 15 '12 at 7:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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