3

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.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
cachiama
  • 163

3 Answers3

4

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

Jonas Nyrup
  • 1,438
  • 10
  • 17
3

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.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
1

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

-shell-escape

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.

naphaneal
  • 2,614