1

What is the reason for the following error?

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

Schweinebacke
  • 26,336
  • 2
    It's because you haven't invoked the -shell-escape flag. It's pretty clear, in my opinion. – Werner Jul 21 '17 at 19:25
  • 1
    Run your latex with -shell-escape (e.g. pdflatex -shell-escape). – TeXnician Jul 21 '17 at 19:25
  • 1
    For a few guides how to enable sell escape in some popular editors, see https://tex.stackexchange.com/questions/99475/how-to-invoke-latex-with-the-shell-escape-flag-in-texmakerx https://tex.stackexchange.com/questions/82699/how-to-enable-shell-escape-in-texworks https://stackoverflow.com/questions/28039856/how-do-i-add-the-shell-escape-option-in-texshop – samcarter_is_at_topanswers.xyz Jul 21 '17 at 20:49
  • @Schweinebacke Yes, same question, but there also nobody explained anything about shell-escape. – Keks Dose Jul 23 '17 at 07:12
  • @KeksDose: What does --shell-escape do? Perhaps this would be the better duplicate. But if I retract my vote I cannot vote for another duplicate. – Schweinebacke Jul 23 '17 at 07:37

1 Answers1

3

The package minted uses an external software »pygments«, written in Python. So pdfLaTeX needs to run »third party software«. This brings security issues: the external software can do anything, as far as your rights on the computer allow that.

Be aware of this when you start pdfLaTeX with -shell-escape. Pygments is used a lot, so if there were an issue, somebody would probably notice it. But if you ever start experimenting with Lua programms of whatever source, maybe think twice.

By the way, the name »shell-escape« refers to the fact that the external software is started via a system call in a shell of the OS.

Keks Dose
  • 30,892