I am building out-of-source so my build command looks like this

pdflatex -shell-escape --halt-on-error -output-directory="/tmp/build" book.tex

I have been using minted for syntax highlighting


This much was working fine, but when I tried to introduce \begin{minted}{c}...\end{minted} I got this error:

! Package minted Error: Missing Pygments output; \inputminted was
probably given a file that does not exist--otherwise, you may need 
the outputdir package option, or may be using an incompatible build tool.

This problem has been solved, I applied the fix to my document


now the document compiles apparently correctly, but the minted cache doesn't seem to be used -- compilation is very slow because all the minted code snippets are being recompiled from scratch each time

How can I have outputdir specified and keep the cache in use?

Here's a full MWE

int main ();

Compiled with

mkdir /tmp/xxx && pdflatex -shell-escape --halt-on-error -output-directory="/tmp/xxx" mwe.tex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.