3

I use WinShell with PDFLatex on Windows 7. I managed to install Pygmentize and compile the minimum example without errors:

\documentclass{article}

\usepackage{minted}

\begin{document}

inline: \mint{python}|import this|

\begin{minted}{c}
int main() {
    printf("hello, world");
    return 0;
}
\end{minted}

\end{document}

However, the output is strange. It shows tex code in the document, which is nicely formatted as if it was Python code:

result

Any idea how this could happen? Please comment, if more information is needed.

Update

I compile via WinShell, my PDFLatex command line looks like this:

"C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe" -shell-escape -aux-directory=./.aux -interaction=nonstopmode -synctex=-1 "%s.tex"
5

The problem is that MiKTeX's -aux-directory option doesn't work with minted's use of pygmentize. Apparently, this option causes problems with packages that use external programs. See https://code.google.com/p/minted/issues/detail?id=37.

|improve this answer|||||
  • Removing the -aux-directory option solved the problem. Thanks a lot! – Fabian Schmengler Mar 14 '13 at 7:49
  • As far as I’m concerned this is a bug in MikTeX: packages have simply no way of getting the path to the aux directory so Pygments is working on the wrong directory. – Konrad Rudolph Mar 17 '13 at 19:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.