0

This problem is very straight forward: When I use PDFLaTeX in Texmaker 5.1.3 when I have not checked the box "Use a 'build' subdirectory for output files", the output to the following tex code is as one would expect, with the minted code showing on the document:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[cache=false, newfloat]{minted}
\begin{document}
begin code
\begin{minted}{python}
  def test:
    pass
\end{minted}
end code
\end{document}

Output:

pdf file with code

But when I check the box checkbox, the pdf ignores the code section altogether:

no code

The command of PDFLaTeX defined in the configuration of Texmaker is:

pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex

Any idea on how to solve this? I don't like having generated files sitting around next to my main doc so unchecking the option is not a viable answer.

1 Answer 1

0

So the problem has nothing to do with Texmaker. If you use the flag -output-directory=build for PDFLaTeX, the problem will continue. The solution I found in this answer is to specify your build folder directly on the minted package:

\usepackage[outputdir=build]{minted}

The minted package specification has an explanation for this:

The -output-directory and -aux-directory (MiKTeX) command-line options for Latex cause problems for minted, because the minted temporary files are saved in , but minted still looks for them in the document root directory. There is no way to access the value of the command-line option so that minted can automatically look in the right place. But it is possible to allow the output directory to be specified manually as a package option.

0

You must log in to answer this question.

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