I'm trying to compile a document with XeLaTeX. The document is a beamer document created from the template of the theme


that OverLeaf provides. I was trying to compile it with AucTeX, fixing the Use Xetex engine, but it throws and error. If I compile from the terminal using xelatex it throws a bunch of error messages, but if I skip through all of them with enter, it produces me the right pdf, without any weird thing. I would like some help understanding them to see how to compile it with auctex.

The first one is this.

Package ifplatform Warning: 
    shell escape is disabled, so I can only detect \ifwindows.


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

Why does this happen?

Then it asks me to provide a file:

! LaTeX Error: File `project.pyg' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: pyg)

Enter file name:

I don't know what file this is supposed to be, and it wasn't there in the git clone from overleaf.

That's it, if I just ignore it, it gives me the pdf I want.

Calling xelatex -shell-escape project.pdf works, but my problem is making it work with AucTex.

  • That's what the error says: you need to pass the -shell-escape command line option. – egreg May 30 '15 at 22:47
  • Yes, and if I do so, it just works. But why is it not working with auctex? Is there anything needed not activated by default? – MyUserIsThis May 30 '15 at 22:49
  • the minted program needs to call the external python program pygmentize to syntax highlight the code listings. Such calls are not allowed unless you specify -shell-escape – David Carlisle May 30 '15 at 22:49
  • @DavidCarlisle Oh, I see. Thank you. So if I were using any code listings the output shouldn't be right, I guess. Is the shell-escape flag not activated in auctex by default? – MyUserIsThis May 30 '15 at 22:50
  • See tex.stackexchange.com/questions/157242/… It's about PDFLaTeX, but it applies to XeLaTeX as well. – egreg May 30 '15 at 22:50

Your Answer

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

Browse other questions tagged or ask your own question.