7

I just installed the minted package to type prettier code in my university reports, I'm trying it out but I keep getting the same messages when compiling:

This is the source:

\documentclass{report}
\usepackage{minted}
\begin{document}
\begin{minted}{c}
  int i,j,k,n;
\end{minted}
\end{document}

I compile it with:

pdflatex --shell-escape source.tex

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
 \write18 enabled.
entering extended mode
(./source.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, spanish, galician, catalan, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo)) (./minted.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
<2008/02/07> (tvz)) (/usr/share/texmf/tex/latex/xcolor/xcolor.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))
(/usr/share/texmf-texlive/tex/latex/float/float.sty)
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/tools/calc.sty) (./ifplatform.sty))
! Undefined control sequence.
\minted.sty-h@@k ...elax  \ifnum \pdf@shellescape 
                                                  =1\relax \else \PackageErr...
l.3 

? ! Missing number, treated as zero.
<to be read again> 
                   =
l.3 

? 
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.

See the minted package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.3 

? /usr/bin/pygmentize
(./source.aux) (/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (./source.pyg) (./source.out.pyg) [1{/var/lib/texmf/fonts/map/pdftex/updmap/p
dftex.map}] (./source.aux) )</usr/share/texmf-texlive/fonts/type1/public/amsfon
ts/cm/cmr10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10
.pfb>
Output written on source.pdf (1 page, 18733 bytes).
Transcript written on source.log.

The output looks as expected but why does all of these messages appear?

3
  • Works fine for me... Looks like something is wrong with either catcodes for = or perhgaps the ifthen package... Have a look in your source.log file for any extra info.
    – codebeard
    Aug 8, 2012 at 4:53
  • 1
    Beware that you are using an outdated TeXLive (from your log: This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)). I recommend to install the newest version (see How to install vanilla TeXLive on Debian or Ubuntu). Aug 8, 2012 at 5:55
  • When I posted the question I was starting to install the 2012 version just in case that was the problem :)
    – cherry
    Aug 8, 2012 at 16:43

1 Answer 1

6

Command \pdf@shellescape is defined in package pdftexcmds (part of bundle oberdiek), if the TeX compiler supports the status query of the write18/shell escape feature.

Therefore just add \usepackage{pdftexcmds} before \usepackage{minted}.

1
  • The package author of minted is notified and he wants to make a new revision of the Google Code version soon. Aug 8, 2012 at 10:26

You must log in to answer this question.

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