I am currently trying to submit my bachelors thesis to arXiv. However, it does not work:
(/texlive/2011/texmf-dist/tex/generic/oberdiek/etexcmds.sty))
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.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
l.50 \setcapindent
{0pt}
?
! Emergency stop.
...
l.50 \setcapindent
{0pt}
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on thesis.log.
Is there a work-around for this error?
For example, could I create an intermediate file so that arXiv does not have to execute minted?
Best Answer
You know you really should provide an MWE:-)
So here's one:
which makes
Now all the formatting is cached in a
_minted-something
directory of the current file.When minted uses that cache it doesn't use
pygmentize
so wouldn't need shell escape, except that it does shell escape for checking and cleaning up. It could have an option to just use the cache but as it doesn't, help it a bit.The cache has three files:
copy the two
*.pygstyle
files into the preamble, and the*.pygtex
file (the one with the long name) where you want your listing, and use the[draft]
option sominted
does not try to shell-escape:which produces:
Update: the next version of
minted
will have options so that the edits described here will be done automatically just adding a package option will be sufficient, seehttps://github.com/gpoore/minted/issues/113#issuecomment-223451550