2

On Debian (testing) with texlive 2017.20170818-1, using "pdflatex --shell-escape mwe.tex" the following MWE does not compile:

\documentclass[a4paper,10pt]{article}
\usepackage{color}
\usepackage{minted}
\usemintedstyle{bw}
\definecolor{bg}{rgb}{0.95,0.95,0.95}
\setminted[text]{breaklines,fontsize=\footnotesize,bgcolor=bg}

\begin{document}
\begin{minted}{text}
  squirrel@t450s:~$ lspci
  00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
  ...
\end{minted}
\end{document}

The error message reads:

....
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]) (./_minted-mwe/default-pyg-prefix.pygstyle) (./_minted-mwe/bw.pygstyle)
! Undefined control sequence.
\minted@colorbg ...\OuterFrameSep }{0pt}\colorlet 
                                                  {shadecolor}{#1}\let \mint...
l.13 \end{minted}

? 

Can anybody reproduce the problem? Is there a workaround? Deleting temporary files created by minted does not help. Versions installed by texlive are:

python-pygments: 2.2.0+dfsg-1
python3-pygments: 2.2.0+dfsg-1

  • Use xcolor instead of color. – Ulrike Fischer Aug 29 '17 at 16:46
  • Thanks, indeed, this solves the problem. It has been working with the color package for several years, so something must have been modified (more or less) recently. I would like to accept the answer, but can't as it is in a comment. – jbroedel Aug 29 '17 at 20:31
2

I can reproduce the error starting with TeXlive2016: From there on minted uses a command (\colorlet) that exists only in xcolor (and not in color), but doesn't load the package if it detects that color has been loaded. The best to get around the error is to load xcolor explicitly.

I suggest also that you make a bug report.

1

Recent versions of minted require xcolor to use the bgcolor option, as a side effect of bgcolor now supporting page breaks. I've fixed this in the development version, so bgcolor will work with the color package starting with the next release (expected to be minted version 2.5.1).

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.