Is it possible and if so how can you pass flags to the ShareLaTeX compiler which one would have passed as parameters to the LaTeX compiler?

I am using the minted package and need to pass the -shell-escape flag.

  • 6
    You are very unlikely to be allowed shell escape on a server-based installation.
    – Joseph Wright
    Apr 22, 2013 at 6:19

3 Answers 3


ShareLaTeX announced in their newsletter from January 28th 2014, that their compiler now supports the minted package

  • 2
    ONLY if you place it in the root folder of your project - if you place it in a subdirectory it breaks.
    – Centril
    Jan 30, 2016 at 0:40
  • Wow, that really got me confused. Thanks. They should be more clear with that.
    – lindhe
    Apr 22, 2016 at 9:22
  • Note that it also supports converting images from pdf format to png images Nov 15, 2017 at 7:55

Without an 'official line' from the ShareLaTeX people, the answer we can give is almost certainly 'no'. The -shell-escape system is turned off as standard for a reason: there are security issues. On a server, these become even more important than on a stand-alone machine. Even if you were allowed -shell-escape, without Pygmentize installed minted still won't work.

It would be possible for ShareLaTeX to install Pygmentize and add it to the 'trusted' list of programs that LaTeX can run without -shell-escape, but minted actually checks for -shell-escape so this wouldn't work. You are therefore out of luck, I think.


Alltough a few weeks old now, people might still be interested in a solution. If you are running your own docker, you get this done quite simple by activating the


flag and installing the software and packages you need (in your case minted). But keep in mind, this is a severe security issue as users can basically run every bash command out of LaTeX now! Edit /var/www/pdflatex and add the flag, thats all you need to do. You can also move

pdflatex (in /usr/bin/ or something like this) to pdflatex_orig

and replace pdflatex through a script calling pdflatex_orig with addtionally added flags. Not much work to be done to edit this, but of course you need your own ShareLaTeX docker to do so.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .