I'm having a problem with the minted package. When I try to add line numbering to the minted command, I get the following error:
! Package keyval Error: stepnumber undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
...
l.1 ...,numbers=left,firstnumber=1,stepnumber=1 ]
Minimal example:
\documentclass[12pt]{article}
\usepackage{minted}
\begin{document}
\inputminted[linenos=true]{java}{file_with_code}
\end{document}
Without the lineos=true property, it works fine.
Does someone know how to fix that?
The file_with_code contains just some lines of Java code, which is being highlighted absolutely correctly.
Now when I just ignore the error and press Enter after I get the message in the command line, it proceeds and produced an output with numbered lines (beginning with 2, though).
Here is the log file:
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2011.5.22) 29 MAY 2011 15:35
entering extended mode
**minex.tex
(C:\minimalexample\minex.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, russian, load
ed.
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\size12.clo"
File: size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\minted\minted.sty"
Package: minted 2010/03/16 v1.7 Yet another Pygments shim for LaTeX
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\minted\fancyvrb.sty"
Package: fancyvrb 1996/10/05
Style option: `fancyvrb' v2.0-beta, with DG/SPQR fixes <1996/10/05> (tvz)
\FV@CodeLineNo=\count87
\FV@InFile=\read1
\FV@TabBox=\box26
\c@FancyVerbLine=\count88
\FV@OutFile=\write3
No file fancyvrb.rc.
) ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\graphics\color.sty"
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\00miktex\color.cfg"
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 130.
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2010/02/14 v0.04n Graphics/color for pdfTeX
\Gread@gobject=\count89
))
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\float\float.sty"
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count90
\float@exts=\toks15
\float@box=\box27
\@float@everytoks=\toks16
\@floatcapt=\box28
)
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\ifthen.sty"
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\tools\calc.sty"
Package: calc 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count91
\calc@Bcount=\count92
\calc@Adimen=\dimen103
\calc@Bdimen=\dimen104
\calc@Askip=\skip43
\calc@Bskip=\skip44
LaTeX Info: Redefining \setlength on input line 76.
LaTeX Info: Redefining \addtolength on input line 77.
\calc@Ccount=\count93
\calc@Cskip=\skip45
)
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\minted\ifplatform.sty"
Package: ifplatform 2007/11/18 v0.2 Testing for the operating system
runsystem(echo 'write18-test-2011529935'>"minex.w18")...executed.
\instream=\read2
runsystem(del "minex.w18")...executed.
)
\minted@bgbox=\box29
\minted@code=\write4
\@float@every@listing=\toks17
\c@listing=\count94
)
runsystem(del minex.aex)...executed.
runsystem(for ^%i in (pygmentize.exe pygmentize.bat pygmentize.cmd) do set >min
ex.aex <nul: /p x=^%~$PATH:i>>minex.aex)...executed.
\@appexistsfile=\read3
runsystem(del minex.aex)...executed.
file deleted
No file minex.aux.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
("C:\Program Files (x86)\MiKTeX 2.8\tex\context\base\supp-pdf.tex"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count95
\scratchdimen=\dimen105
\scratchbox=\box30
\nofMPsegments=\count96
\nofMParguments=\count97
\everyMPshowfont=\toks18
\MPscratchCnt=\count98
\MPscratchDim=\dimen106
\MPnumerator=\count99
\everyMPtoPDFconversion=\toks19
)
runsystem(pygmentize -S default -f latex > minex.pyg)...executed.
(C:\minimalexample\minex.pyg)
runsystem(pygmentize -l java -f latex -F tokenmerge -P linenos -P "v
erboptions= " -o minex.out.pyg file_with_code)...executed.
(C:\minimalexample\minex.out.pyg
! Package keyval Error: stepnumber undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
...
l.1 ...,numbers=left,firstnumber=1,stepnumber=1, ]
?
LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <12> not available
(Font) Font shape `OT1/cmtt/m/n' tried instead on input line 2.
)
runsystem(del minex.out.pyg)...executed.
[1
{C:/Users/amaurremi/AppData/Local/MiKTeX/2.8/pdftex/config/pdftex.map}]
(C:\minimalexample\minex.aux) )
Here is how much of TeX's memory you used:
1545 strings out of 495059
21205 string characters out of 3176779
72218 words of memory out of 3000000
4800 multiletter control sequences out of 15000+200000
4408 words of font info for 17 fonts, out of 3000000 for 9000
198 hyphenation exceptions out of 8191
28i,5n,21p,194b,248s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Program Files (x86)/MiKTeX 2.8/fonts/type1/p
ublic/amsfonts/cm/cmr12.pfb><C:/Program Files (x86)/MiKTeX 2.8/fonts/type1/publ
ic/amsfonts/cm/cmr6.pfb><C:/Program Files (x86)/MiKTeX 2.8/fonts/type1/public/a
msfonts/cm/cmtt12.pfb>
Output written on minex.pdf (1 page, 24857 bytes).
PDF statistics:
18 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
file_with_codeand couldn't reproduce your problem. Could you please add to your question the contents of a simplefile_with_codefile allowing us to reproduce the error? Another possibility is that you are using some outdated package(s)... – Gonzalo Medina May 28 '11 at 22:27