TransWikia.com

Work-around for minted code highlighting in arXiv?

TeX - LaTeX Asked on June 25, 2021

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?

4 Answers

You know you really should provide an MWE:-)

So here's one:

documentclass{report}

usepackage{minted}

begin{document}

zzz

begin{minted}{html}
<!DOCTYPE html
<html>
 <head>
 </head>
 <body>
 <ol>
  <li class="z">z
    <li>zzzz</li>
    <li>something <b>bold</b></li>
  </ol>
  <p><a href="somewhere.html">aaa</a></p>
 </body>
</html>
end{minted}


end{document

which makes

enter image description here

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:

$ ls _minted-gg496/
9CEDBF3C3E0F3958DE3150F596B294B8E453E7F2043D40FA47ECCB2444F29644.pygtex
default.pygstyle
default-pyg-prefix.pygstyle

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 so minted does not try to shell-escape:

documentclass{report}

usepackage[draft]{minted}


makeatletter
defPYGdefault@reset{letPYGdefault@it=relax letPYGdefault@bf=relax%
    letPYGdefault@ul=relax letPYGdefault@tc=relax%
    letPYGdefault@bc=relax letPYGdefault@ff=relax}
defPYGdefault@tok#1{csname PYGdefault@tok@#1endcsname}
defPYGdefault@toks#1+{ifxrelax#1emptyelse%
    PYGdefault@tok{#1}expandafterPYGdefault@toksfi}
defPYGdefault@do#1{PYGdefault@bc{PYGdefault@tc{PYGdefault@ul{%
    PYGdefault@it{PYGdefault@bf{PYGdefault@ff{#1}}}}}}}
defPYGdefault#1#2{PYGdefault@resetPYGdefault@toks#1+relax+PYGdefault@do{#2}}

expandafterdefcsname PYGdefault@tok@gdendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.63,0.00,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@guendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.50,0.00,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@gtendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.27,0.87}{##1}}}
expandafterdefcsname PYGdefault@tok@gsendcsname{letPYGdefault@bf=textbf}
expandafterdefcsname PYGdefault@tok@grendcsname{defPYGdefault@tc##1{textcolor[rgb]{1.00,0.00,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@cmendcsname{letPYGdefault@it=textitdefPYGdefault@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@vgendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYGdefault@tok@mendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@mhendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@goendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.53,0.53,0.53}{##1}}}
expandafterdefcsname PYGdefault@tok@geendcsname{letPYGdefault@it=textit}
expandafterdefcsname PYGdefault@tok@vcendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYGdefault@tok@ilendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@csendcsname{letPYGdefault@it=textitdefPYGdefault@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@cpendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.74,0.48,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@giendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.63,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@ghendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.00,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@niendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.60,0.60,0.60}{##1}}}
expandafterdefcsname PYGdefault@tok@nlendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.63,0.63,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@nnendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.00,1.00}{##1}}}
expandafterdefcsname PYGdefault@tok@noendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.53,0.00,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@naendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.49,0.56,0.16}{##1}}}
expandafterdefcsname PYGdefault@tok@nbendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@ncendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.00,1.00}{##1}}}
expandafterdefcsname PYGdefault@tok@ndendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.67,0.13,1.00}{##1}}}
expandafterdefcsname PYGdefault@tok@neendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.82,0.25,0.23}{##1}}}
expandafterdefcsname PYGdefault@tok@nfendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.00,1.00}{##1}}}
expandafterdefcsname PYGdefault@tok@siendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.73,0.40,0.53}{##1}}}
expandafterdefcsname PYGdefault@tok@s2endcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@viendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYGdefault@tok@ntendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@nvendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYGdefault@tok@s1endcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@shendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@scendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@sxendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@bpendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@c1endcsname{letPYGdefault@it=textitdefPYGdefault@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@kcendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@cendcsname{letPYGdefault@it=textitdefPYGdefault@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@mfendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@errendcsname{defPYGdefault@bc##1{setlength{fboxsep}{0pt}fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{strut ##1}}}
expandafterdefcsname PYGdefault@tok@kdendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@ssendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYGdefault@tok@srendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.40,0.53}{##1}}}
expandafterdefcsname PYGdefault@tok@moendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@knendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@miendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@gpendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.00,0.50}{##1}}}
expandafterdefcsname PYGdefault@tok@oendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYGdefault@tok@krendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@sendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@kpendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@wendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.73,0.73}{##1}}}
expandafterdefcsname PYGdefault@tok@ktendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.69,0.00,0.25}{##1}}}
expandafterdefcsname PYGdefault@tok@owendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.67,0.13,1.00}{##1}}}
expandafterdefcsname PYGdefault@tok@sbendcsname{defPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@kendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYGdefault@tok@seendcsname{letPYGdefault@bf=textbfdefPYGdefault@tc##1{textcolor[rgb]{0.73,0.40,0.13}{##1}}}
expandafterdefcsname PYGdefault@tok@sdendcsname{letPYGdefault@it=textitdefPYGdefault@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}

defPYGdefaultZbs{char`}
defPYGdefaultZus{char`_}
defPYGdefaultZob{char`{}
defPYGdefaultZcb{char`}}
defPYGdefaultZca{char`^}
defPYGdefaultZam{char`&}
defPYGdefaultZlt{char`<}
defPYGdefaultZgt{char`>}
defPYGdefaultZsh{char`#}
defPYGdefaultZpc{char`%}
defPYGdefaultZdl{char`$}
defPYGdefaultZhy{char`-}
defPYGdefaultZsq{char`'}
defPYGdefaultZdq{char`"}
defPYGdefaultZti{char`~}
% for compatibility with earlier versions
defPYGdefaultZat{@}
defPYGdefaultZlb{[}
defPYGdefaultZrb{]}
makeatother


makeatletter
defPYG@reset{letPYG@it=relax letPYG@bf=relax%
    letPYG@ul=relax letPYG@tc=relax%
    letPYG@bc=relax letPYG@ff=relax}
defPYG@tok#1{csname PYG@tok@#1endcsname}
defPYG@toks#1+{ifxrelax#1emptyelse%
    PYG@tok{#1}expandafterPYG@toksfi}
defPYG@do#1{PYG@bc{PYG@tc{PYG@ul{%
    PYG@it{PYG@bf{PYG@ff{#1}}}}}}}
defPYG#1#2{PYG@resetPYG@toks#1+relax+PYG@do{#2}}

expandafterdefcsname PYG@tok@gdendcsname{defPYG@tc##1{textcolor[rgb]{0.63,0.00,0.00}{##1}}}
expandafterdefcsname PYG@tok@guendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.50,0.00,0.50}{##1}}}
expandafterdefcsname PYG@tok@gtendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.27,0.87}{##1}}}
expandafterdefcsname PYG@tok@gsendcsname{letPYG@bf=textbf}
expandafterdefcsname PYG@tok@grendcsname{defPYG@tc##1{textcolor[rgb]{1.00,0.00,0.00}{##1}}}
expandafterdefcsname PYG@tok@cmendcsname{letPYG@it=textitdefPYG@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYG@tok@vgendcsname{defPYG@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYG@tok@mendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@mhendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@goendcsname{defPYG@tc##1{textcolor[rgb]{0.53,0.53,0.53}{##1}}}
expandafterdefcsname PYG@tok@geendcsname{letPYG@it=textit}
expandafterdefcsname PYG@tok@vcendcsname{defPYG@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYG@tok@ilendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@csendcsname{letPYG@it=textitdefPYG@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYG@tok@cpendcsname{defPYG@tc##1{textcolor[rgb]{0.74,0.48,0.00}{##1}}}
expandafterdefcsname PYG@tok@giendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.63,0.00}{##1}}}
expandafterdefcsname PYG@tok@ghendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.00,0.50}{##1}}}
expandafterdefcsname PYG@tok@niendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.60,0.60,0.60}{##1}}}
expandafterdefcsname PYG@tok@nlendcsname{defPYG@tc##1{textcolor[rgb]{0.63,0.63,0.00}{##1}}}
expandafterdefcsname PYG@tok@nnendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.00,1.00}{##1}}}
expandafterdefcsname PYG@tok@noendcsname{defPYG@tc##1{textcolor[rgb]{0.53,0.00,0.00}{##1}}}
expandafterdefcsname PYG@tok@naendcsname{defPYG@tc##1{textcolor[rgb]{0.49,0.56,0.16}{##1}}}
expandafterdefcsname PYG@tok@nbendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@ncendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.00,1.00}{##1}}}
expandafterdefcsname PYG@tok@ndendcsname{defPYG@tc##1{textcolor[rgb]{0.67,0.13,1.00}{##1}}}
expandafterdefcsname PYG@tok@neendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.82,0.25,0.23}{##1}}}
expandafterdefcsname PYG@tok@nfendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.00,1.00}{##1}}}
expandafterdefcsname PYG@tok@siendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.73,0.40,0.53}{##1}}}
expandafterdefcsname PYG@tok@s2endcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYG@tok@viendcsname{defPYG@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYG@tok@ntendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@nvendcsname{defPYG@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYG@tok@s1endcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYG@tok@shendcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYG@tok@scendcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYG@tok@sxendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@bpendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@c1endcsname{letPYG@it=textitdefPYG@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYG@tok@kcendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@cendcsname{letPYG@it=textitdefPYG@tc##1{textcolor[rgb]{0.25,0.50,0.50}{##1}}}
expandafterdefcsname PYG@tok@mfendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@errendcsname{defPYG@bc##1{setlength{fboxsep}{0pt}fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{strut ##1}}}
expandafterdefcsname PYG@tok@kdendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@ssendcsname{defPYG@tc##1{textcolor[rgb]{0.10,0.09,0.49}{##1}}}
expandafterdefcsname PYG@tok@srendcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.40,0.53}{##1}}}
expandafterdefcsname PYG@tok@moendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@knendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@miendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@gpendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.00,0.50}{##1}}}
expandafterdefcsname PYG@tok@oendcsname{defPYG@tc##1{textcolor[rgb]{0.40,0.40,0.40}{##1}}}
expandafterdefcsname PYG@tok@krendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@sendcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYG@tok@kpendcsname{defPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@wendcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.73,0.73}{##1}}}
expandafterdefcsname PYG@tok@ktendcsname{defPYG@tc##1{textcolor[rgb]{0.69,0.00,0.25}{##1}}}
expandafterdefcsname PYG@tok@owendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.67,0.13,1.00}{##1}}}
expandafterdefcsname PYG@tok@sbendcsname{defPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}
expandafterdefcsname PYG@tok@kendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.00,0.50,0.00}{##1}}}
expandafterdefcsname PYG@tok@seendcsname{letPYG@bf=textbfdefPYG@tc##1{textcolor[rgb]{0.73,0.40,0.13}{##1}}}
expandafterdefcsname PYG@tok@sdendcsname{letPYG@it=textitdefPYG@tc##1{textcolor[rgb]{0.73,0.13,0.13}{##1}}}

defPYGZbs{char`}
defPYGZus{char`_}
defPYGZob{char`{}
defPYGZcb{char`}}
defPYGZca{char`^}
defPYGZam{char`&}
defPYGZlt{char`<}
defPYGZgt{char`>}
defPYGZsh{char`#}
defPYGZpc{char`%}
defPYGZdl{char`$}
defPYGZhy{char`-}
defPYGZsq{char`'}
defPYGZdq{char`"}
defPYGZti{char`~}
% for compatibility with earlier versions
defPYGZat{@}
defPYGZlb{[}
defPYGZrb{]}
makeatother


begin{document}

zzz

begin{Verbatim}[commandchars={}]
PYG{c+cp}{PYGZlt{}!DOCTYPE html}
PYG{c+cp}{PYGZlt{}htmlPYGZgt{}}
 PYG{n+nt}{PYGZlt{}headPYGZgt{}}
 PYG{n+nt}{PYGZlt{}/headPYGZgt{}}
 PYG{n+nt}{PYGZlt{}bodyPYGZgt{}}
 PYG{n+nt}{PYGZlt{}olPYGZgt{}}
  PYG{n+nt}{PYGZlt{}li} PYG{n+na}{class=}PYG{l+s}{PYGZdq{}zPYGZdq{}}PYG{n+nt}{PYGZgt{}}z
    PYG{n+nt}{PYGZlt{}liPYGZgt{}}zzzzPYG{n+nt}{PYGZlt{}/liPYGZgt{}}
    PYG{n+nt}{PYGZlt{}liPYGZgt{}}something PYG{n+nt}{PYGZlt{}bPYGZgt{}}boldPYG{n+nt}{PYGZlt{}/bPYGZgt{}PYGZlt{}/liPYGZgt{}}
  PYG{n+nt}{PYGZlt{}/olPYGZgt{}}
  PYG{n+nt}{PYGZlt{}pPYGZgt{}PYGZlt{}a} PYG{n+na}{href=}PYG{l+s}{PYGZdq{}somewhere.htmlPYGZdq{}}PYG{n+nt}{PYGZgt{}}aaaPYG{n+nt}{PYGZlt{}/aPYGZgt{}PYGZlt{}/pPYGZgt{}}
 PYG{n+nt}{PYGZlt{}/bodyPYGZgt{}}
PYG{n+nt}{PYGZlt{}/htmlPYGZgt{}}
end{Verbatim}


end{document}

which produces:

enter image description here


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, see

https://github.com/gpoore/minted/issues/113#issuecomment-223451550

Correct answer by David Carlisle on June 25, 2021

As already pointed out by David Carlisle, minted provides a built-in workaround for environments that don't support -shell-escape/Pyhton/Pygments.

As of minted version 2.2, you can use the package options finalizecache and frozencache:

These allow the cache to be prepared for (finalizecache) and then used (frozencache) […] Note that this only works if minted content does not need to be modified, and if no settings that depend on Pygments or Python need to be changed […]

That is, in a first step compile the document using finalizecache, then switch to frozencache. Afterwards, you can simply include the _minted-${project-name} folder in the arXiv upload and everything should be fine.

Answered by beatngu13 on June 25, 2021

I was facing the same issue, but none of the above answers worked. Finally, I had to specify the option cachedir=. in order to generate the cache in the same directory than the tex file.

After that, it compiled on arxiv.

Answered by ElBaulP on June 25, 2021

As of Aug 10th, 2020. I have to use usepackage[finalizecache=true,cachedir=.]{minted} while I work on the writing. When the document is finalized, compile and download everything with pyg, change the line to usepackage[frozencache=true,cachedir=.]{minted}, include the pig files in the arXiv upload.

PS: If you use Overleaf, then you can find these folders by clicking the "Logs and output files" button next to compile button.

Answered by ytutow on June 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP