minted icon indicating copy to clipboard operation
minted copied to clipboard

arXiv processing fails

Open AmitMY opened this issue 4 months ago • 3 comments

Following from https://github.com/gpoore/minted/issues/113

My acl_latex.tex file has

\usepackage[frozencache,cachedir=minted-cache]{minted}

I then run the following script that should build my arxiv upload:

# Use finalizecache so that minted builds the cache
sed -i '' 's/\\usepackage\[frozencache,cachedir=minted-cache\]{minted}/\\usepackage[cachedir=minted-cache]{minted}/' acl_latex.tex

# Build with pdflatex in a container
PDFLATEX=(docker run --platform linux/amd64 --rm -i \
  --user="$(id -u):$(id -g)" --net=none -v "$PWD":/data sotetsuk/pdflatex)

# Build the document
"${PDFLATEX[@]}" pdflatex -interaction=nonstopmode -shell-escape acl_latex.tex
# Run bibtex to process bibliography
"${PDFLATEX[@]}" bibtex acl_latex
# Two more runs of pdflatex to resolve references
"${PDFLATEX[@]}" pdflatex -interaction=nonstopmode -shell-escape acl_latex.tex
"${PDFLATEX[@]}" pdflatex -interaction=nonstopmode -shell-escape acl_latex.tex

# Use frozencache so that arxiv doesn't try to rebuild the cache
sed -i '' 's/\\usepackage\[cachedir=minted-cache\]{minted}/\\usepackage[frozencache,cachedir=minted-cache]{minted}/' acl_latex.tex


# Create the arXiv bundle
rm -f arxiv.zip
zip -r arxiv.zip ./*
echo $(pwd)/arxiv.zip

But arXiv errors:

Errors for acl_latex.tex:
Shell escape (1 total)
Shell escape feature is not enabled such that we are unable to convert your .eps files. Convert your .eps files to .pdf before compiling.


Lower level TeX Errors (5 total)
Package minted Error: Missing definition for highlighting style "default" (minted executable is unavailable or disabled); attempting to substitute fallback style..
./acl_latex.tex:131: Package minted Error: Missing definition for highlighting style "default" (minted executable is unavailable or disabled); attempting to substitute fallback style.
Please refer to details in the log.

Package minted Error: Cannot highlight code (minted executable is unavailable or disabled); attempting to typeset without highlighting..
./acl_latex.tex:131: Package minted Error: Cannot highlight code (minted executable is unavailable or disabled); attempting to typeset without highlighting.
Please refer to details in the log.

Package minted Error: Cannot highlight code (minted executable is unavailable or disabled); attempting to typeset without highlighting..
./acl_latex.tex:194: Package minted Error: Cannot highlight code (minted executable is unavailable or disabled); attempting to typeset without highlighting.
Please refer to details in the log.

**Note: finalizecache is no longer supported, that's why I don't use it

Here's the resulting zipfile: arxiv.zip

AmitMY avatar Oct 15 '25 07:10 AmitMY

I tried adding these to my .zip file:

for f in minted.sty minted1.sty minted2.sty; do
  wget -O "$f" "https://raw.githubusercontent.com/gpoore/minted/refs/heads/main/latex/minted/$f"
done

But the error is identical.

I tried adding my local files

for f in minted.sty minted1.sty; do
  docker run --platform linux/amd64 --rm -i --net=none sotetsuk/pdflatex \
    bash -lc "cat \$(kpsewhich $f)" > "$f"
done

And now got other errors

Errors for acl_latex.tex:
Lower level TeX Errors (3 total)
Package xkeyval Error: `frozencache' undefined in families `minted'..
./minted.sty:68: Package xkeyval Error: `frozencache' undefined in families `minted'.
Please refer to details in the log.

Package minted Error: You must invoke LaTeX with the -shell-escape flag..
./acl_latex.tex:38: Package minted Error: You must invoke LaTeX with the -shell-escape flag.
Please refer to details in the log.

Package minted Error: You must have `pygmentize' installed to use this package..
./acl_latex.tex:69: Package minted Error: You must have `pygmentize' installed to use this package.
Please refer to details in the log.

Shell escape (1 total)
Shell escape feature is not enabled such that we are unable to convert your .eps files. Convert your .eps files to .pdf before compiling.

AmitMY avatar Oct 17 '25 07:10 AmitMY

Following https://info.arxiv.org/help/submit_tex.html#minted-and-other-frozen-cache-packages

correctly will work (make sure all the files under _minted are uploaded and not deleted).

HaoZeke avatar Nov 14 '25 21:11 HaoZeke

Having the same error even minted compiled locally with _minted folder. Have to swtich to texlive 2023 for submission unfortunately.

wtdcode avatar Dec 02 '25 15:12 wtdcode