11

I am having problem when I use the -output-directory option while I am using minted. It does not move the .out.pyg and .pyg file to the output directory and it gives me an error. enter image description here

I there any solution to order minted to put the auxilary files in the output directory not in root folder? MWE:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{minted}
\begin{document}
\begin{minted}{c}
  const double pi = 3.1415926535
\end{minted}
\end{document}
3

2 Answers 2

10

David Carlisle suggests the following in this answer:

You need \usepackage[outputdir=build]{minted} to tell minted where the files went.

This works perfectly for me.

6

I post this as an answer. It is not a complete answer, but it works.

If you have main.tex for example as your main file, an intermediate main.pyg is created in the root folder (despite having -output-directory switch) that will be deleted finally but is needed to properly typeset the source code. The solution is to make a shortcut to the main.pyg file and place it inside your -output-directory folder. The shortcut name should be main.pyg as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .