我正在努力编译这个最小的例子:
\documentclass[12pt]{scrartcl}
\usepackage{minted}
\begin{document}
\begin{minted}{python}
a = 42
\end{minted}
\end{document}
我使用的是 W11、MiKTeX 4.9,所有软件包都是最新的。使用 latex 或 xelatex 编译很顺利,但使用 lualatex 总是失败。
命令:
PS> lualatex.exe -shell-escape -interaction=nonstopmode .\lua_minted.tex
引发的错误:
! Package minted Error: You must have `pygmentize' installed to use this packag
e.
解决此问题通常会询问的其他命令:
PS> pygmentize -V
Pygments version 2.13.0, (c) 2006-2022 by Georg Brandl, Matthäus Chajdas and contributors.
PS> pygmentize.exe -V
Pygments version 2.13.0, (c) 2006-2022 by Georg Brandl, Matthäus Chajdas and contributors.
PS> python --version
Python 3.10.1
PS> python.exe
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
我现在没有线索了,有点绝望。非常感谢所有能帮助我的人。完整的日志文件如下:
This is LuaHBTeX, Version 1.17.0 (MiKTeX 23.5) (format=lualatex 2023.9.16) 16 SEP 2023 15:46
system commands enabled.
**./lua_minted.tex
(./lua_minted.tex
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-08-29>
Lua module: luaotfload 2023-08-31 3.26 Lua based OpenType font support
Lua module: lualibs 2023-07-13 2.76 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2023-07-13 2.76 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "C:/Users/Bob/AppData/Local/MiKTeX/l
uatex-cache/generic/names".
luaotfload | init : Loading fontloader "fontloader-2023-08-19.lua" from kpse-res
olved path "C:/Program Files/MiKTeX/tex/luatex/luaotfload/fontloader-2023-08-19.
lua".
Lua-only attribute luaotfload@noligature = 1
luaotfload | init : Context OpenType loader version 3.133
Inserting `luaotfload.node_processor' in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' in `hpack_filter'.
Inserting `luaotfload.glyph_stream' in `glyph_stream_provider'.
Inserting `luaotfload.define_font' in `define_font'.
Lua-only attribute luaotfload_color_attribute = 2
luaotfload | conf : Root cache directory is "C:/Users/Bob/AppData/Local/MiKTeX/l
uatex-cache/generic/names".
Inserting `luaotfload.harf.strip_prefix' in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' in `find_truetype_file'.
Removing `luaotfload.glyph_stream' from `glyph_stream_provider'.
Inserting `luaotfload.harf.glyphstream' in `glyph_stream_provider'.
Inserting `luaotfload.harf.finalize_vlist' in `post_linebreak_filter'.
Inserting `luaotfload.harf.finalize_hlist' in `hpack_filter'.
Inserting `luaotfload.cleanup_files' in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 3
Inserting `luaotfload.aux.set_sscale_dimens' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.set_font_index' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.patch_cambria_domh' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.fixup_fontdata' in `luaotfload.patch_font_unsafe'.
Inserting `luaotfload.aux.set_capheight' in `luaotfload.patch_font'.
Inserting `luaotfload.aux.set_xheight' in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' in `luaotfload.patch_font'.
Inserting `tracingstacklevels' in `input_level_string'. ("C:/Program Files/MiKT
eX/tex/latex/koma-script/scrartcl.cls"
Document Class: scrartcl 2023/07/07 v3.41 KOMA-Script document class (article)
("C:/Program Files/MiKTeX/tex/latex/koma-script/scrkbase.sty"
Package: scrkbase 2023/07/07 v3.41 KOMA-Script package (KOMA-Script-dependent b
asics and keyval usage)
("C:/Program Files/MiKTeX/tex/latex/koma-script/scrbase.sty"
Package: scrbase 2023/07/07 v3.41 KOMA-Script package (KOMA-Script-independent
basics and keyval usage)
("C:/Program Files/MiKTeX/tex/latex/koma-script/scrlfile.sty"
Package: scrlfile 2023/07/07 v3.41 KOMA-Script package (file load hooks)
("C:/Program Files/MiKTeX/tex/latex/koma-script/scrlfile-hook.sty"
Package: scrlfile-hook 2023/07/07 v3.41 KOMA-Script package (using LaTeX hooks)
("C:/Program Files/MiKTeX/tex/latex/koma-script/scrlogo.sty"
Package: scrlogo 2023/07/07 v3.41 KOMA-Script package (logo)
)))
("C:/Program Files/MiKTeX/tex/latex/graphics/keyval.sty"
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
Applying: [2021/05/01] Usage of raw or classic option list on input line 252.
Already applied: [0000/00/00] Usage of raw or classic option list on input line
368.
))
("C:/Program Files/MiKTeX/tex/latex/koma-script/tocbasic.sty"
Package: tocbasic 2023/07/07 v3.41 KOMA-Script package (handling toc-files)
\scr@dte@tocline@numberwidth=\skip48
\scr@dte@tocline@numbox=\box51
)
Package tocbasic Info: omitting babel extension for `toc'
(tocbasic) because of feature `nobabel' available
(tocbasic) for `toc' on input line 133.
Package scrartcl Info: You've used standard option `12pt'.
(scrartcl) This is correct!
(scrartcl) Internally I'm using `fontsize=12pt'.
(scrartcl) If you'd like to set the option with \KOMAoptions,
(scrartcl) you'd have to use `fontsize=12pt' there
(scrartcl) instead of `12pt', too.
Class scrartcl Info: File `scrsize12pt.clo' used to setup font sizes on input l
ine 2441.
("C:/Program Files/MiKTeX/tex/latex/koma-script/scrsize12pt.clo"
File: scrsize12pt.clo 2023/07/07 v3.41 KOMA-Script font size class option (12pt
)
luaotfload | db : Font names database loaded from C:/Users/Bob/AppData/Local/MiK
TeX/luatex-cache/generic/names/luaotfload-names.luc.gz)
("C:/Program Files/MiKTeX/tex/latex/koma-script/typearea.sty"
Package: typearea 2023/07/07 v3.41 KOMA-Script package (type area)
\ta@bcor=\skip49
\ta@div=\count183
\ta@hblk=\skip50
\ta@vblk=\skip51
\ta@temp=\skip52
\footheight=\skip53
Package typearea Info: These are the values describing the layout:
(typearea) DIV = 12
(typearea) BCOR = 0.0pt
(typearea) \paperwidth = 597.50793pt
(typearea) \textwidth = 448.13095pt
(typearea) DIV departure = -6%
(typearea) \evensidemargin = 2.4185pt
(typearea) \oddsidemargin = 2.4185pt
(typearea) \paperheight = 845.04694pt
(typearea) \textheight = 635.5pt
(typearea) \topmargin = -41.72441pt
(typearea) \headheight = 18.125pt
(typearea) \headsep = 21.75pt
(typearea) \topskip = 12.0pt
(typearea) \footskip = 50.75pt
(typearea) \baselineskip = 14.5pt
(typearea) on input line 1799.
)
\c@part=\count184
\c@section=\count185
\c@subsection=\count186
\c@subsubsection=\count187
\c@paragraph=\count188
\c@subparagraph=\count189
\scr@dte@section@maxnumwidth=\skip54
Class scrartcl Info: using compatibility default `runin=bysign'
(scrartcl) for `\section on input line 5082.
Class scrartcl Info: using compatibility default `afterindent=bysign'
(scrartcl) for `\section on input line 5082.
\scr@dte@part@maxnumwidth=\skip55
Class scrartcl Info: using compatibility default `afterindent=false'
(scrartcl) for `\part on input line 5090.
\scr@dte@subsection@maxnumwidth=\skip56
Class scrartcl Info: using compatibility default `runin=bysign'
(scrartcl) for `\subsection on input line 5100.
Class scrartcl Info: using compatibility default `afterindent=bysign'
(scrartcl) for `\subsection on input line 5100.
\scr@dte@subsubsection@maxnumwidth=\skip57
Class scrartcl Info: using compatibility default `runin=bysign'
(scrartcl) for `\subsubsection on input line 5110.
Class scrartcl Info: using compatibility default `afterindent=bysign'
(scrartcl) for `\subsubsection on input line 5110.
\scr@dte@paragraph@maxnumwidth=\skip58
Class scrartcl Info: using compatibility default `runin=bysign'
(scrartcl) for `\paragraph on input line 5121.
Class scrartcl Info: using compatibility default `afterindent=bysign'
(scrartcl) for `\paragraph on input line 5121.
\scr@dte@subparagraph@maxnumwidth=\skip59
Class scrartcl Info: using compatibility default `runin=bysign'
(scrartcl) for `\subparagraph on input line 5131.
Class scrartcl Info: using compatibility default `afterindent=bysign'
(scrartcl) for `\subparagraph on input line 5131.
\abovecaptionskip=\skip60
\belowcaptionskip=\skip61
\c@pti@nb@sid@b@x=\box52
Package tocbasic Info: omitting babel extension for `lof'
(tocbasic) because of feature `nobabel' available
(tocbasic) for `lof' on input line 6309.
\scr@dte@figure@maxnumwidth=\skip62
\c@figure=\count190
Package tocbasic Info: omitting babel extension for `lot'
(tocbasic) because of feature `nobabel' available
(tocbasic) for `lot' on input line 6325.
\scr@dte@table@maxnumwidth=\skip63
\c@table=\count191
Class scrartcl Info: Redefining `\numberline' on input line 6495.
\bibindent=\dimen139
)
("C:/Program Files/MiKTeX/tex/latex/minted/minted.sty"
Package: minted 2022/12/12 v2.7 Yet another Pygments shim for LaTeX
("C:/Program Files/MiKTeX/tex/latex/kvoptions/kvoptions.sty"
Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)
("C:/Program Files/MiKTeX/tex/generic/ltxcmds/ltxcmds.sty"
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
("C:/Program Files/MiKTeX/tex/latex/kvsetkeys/kvsetkeys.sty"
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
))
("C:/Program Files/MiKTeX/tex/latex/fvextra/fvextra.sty"
Package: fvextra 2022/11/30 v1.5 fvextra - extensions and patches for fancyvrb
("C:/Program Files/MiKTeX/tex/latex/etoolbox/etoolbox.sty"
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count192
)
("C:/Program Files/MiKTeX/tex/latex/fancyvrb/fancyvrb.sty"
Package: fancyvrb 2023/01/19 4.5a verbatim text (tvz,hv)
\FV@CodeLineNo=\count193
\FV@InFile=\read2
\FV@TabBox=\box53
\c@FancyVerbLine=\count194
\FV@StepNumber=\count195
\FV@OutFile=\write3
)
("C:/Program Files/MiKTeX/tex/latex/upquote/upquote.sty"
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
tim
("C:/Program Files/MiKTeX/tex/latex/base/textcomp.sty"
Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
))
("C:/Program Files/MiKTeX/tex/latex/lineno/lineno.sty"
Package: lineno 2023/05/20 line numbers on paragraphs v5.3
\linenopenalty=\count196
\output=\toks18
\linenoprevgraf=\count197
\linenumbersep=\dimen140
\linenumberwidth=\dimen141
\c@linenumber=\count198
\c@pagewiselinenumber=\count199
\c@LN@truepage=\count266
\c@internallinenumber=\count267
\c@internallinenumbers=\count268
\quotelinenumbersep=\dimen142
\bframerule=\dimen143
\bframesep=\dimen144
\bframebox=\box54
LaTeX Info: Redefining \\ on input line 3180.
)
\c@FV@TrueTabGroupLevel=\count269
\c@FV@TrueTabCounter=\count270
\FV@TabBox@Group=\box55
\FV@TmpLength=\skip64
\c@FV@HighlightLinesStart=\count271
\c@FV@HighlightLinesStop=\count272
\FV@LoopCount=\count273
\FV@NCharsBox=\box56
\FV@BreakIndent=\dimen145
\FV@BreakIndentNChars=\count274
\FV@BreakSymbolSepLeft=\dimen146
\FV@BreakSymbolSepLeftNChars=\count275
\FV@BreakSymbolSepRight=\dimen147
\FV@BreakSymbolSepRightNChars=\count276
\FV@BreakSymbolIndentLeft=\dimen148
\FV@BreakSymbolIndentLeftNChars=\count277
\FV@BreakSymbolIndentRight=\dimen149
\FV@BreakSymbolIndentRightNChars=\count278
\c@FancyVerbLineBreakLast=\count279
\FV@LineBox=\box57
\FV@LineIndentBox=\box58
\c@FV@BreakBufferDepth=\count280
\FV@LineWidth=\dimen150
)
("C:/Program Files/MiKTeX/tex/latex/base/ifthen.sty"
Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)
)
("C:/Program Files/MiKTeX/tex/latex/tools/calc.sty"
Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count281
\calc@Bcount=\count282
\calc@Adimen=\dimen151
\calc@Bdimen=\dimen152
\calc@Askip=\skip65
\calc@Bskip=\skip66
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
\calc@Ccount=\count283
\calc@Cskip=\skip67
)
("C:/Program Files/MiKTeX/tex/latex/tools/shellesc.sty"
Package: shellesc 2023/04/15 v1.0d unified shell escape interface for LaTeX
Package shellesc Info: Unrestricted shell escape enabled on input line 75.
)
("C:/Program Files/MiKTeX/tex/latex/ifplatform/ifplatform.sty"
Package: ifplatform 2017/10/13 v0.4a Testing for the operating system
("C:/Program Files/MiKTeX/tex/generic/pdftexcmds/pdftexcmds.sty"
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
("C:/Program Files/MiKTeX/tex/generic/infwarerr/infwarerr.sty"
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
("C:/Program Files/MiKTeX/tex/generic/iftex/iftex.sty"
Package: iftex 2022/02/03 v1.0f TeX engine tests
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
\pdftexcmds@toks=\toks19
)
("C:/Program Files/MiKTeX/tex/generic/catchfile/catchfile.sty"
Package: catchfile 2019/12/09 v1.8 Catch the contents of a file (HO)
("C:/Program Files/MiKTeX/tex/generic/etexcmds/etexcmds.sty"
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
))
("C:/Program Files/MiKTeX/tex/generic/iftex/ifluatex.sty"
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
))
("C:/Program Files/MiKTeX/tex/latex/xstring/xstring.sty"
("C:/Program Files/MiKTeX/tex/generic/xstring/xstring.tex"
\xs_counta=\count284
\xs_countb=\count285
)
Package: xstring 2023/08/22 v1.86 String manipulations (CT)
)
("C:/Program Files/MiKTeX/tex/latex/framed/framed.sty"
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip68
\fb@frw=\dimen153
\fb@frh=\dimen154
\FrameRule=\dimen155
\FrameSep=\dimen156
)
("C:/Program Files/MiKTeX/tex/latex/float/float.sty"
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count286
\float@exts=\toks20
\float@box=\box59
\@float@everytoks=\toks21
\@floatcapt=\box60
)
\minted@appexistsfile=\read3
\minted@bgbox=\box61
\minted@code=\write4
\c@minted@FancyVerbLineTemp=\count287
\c@minted@pygmentizecounter=\count288
\@float@every@listing=\toks22
\c@listing=\count289
)
runsystem(if not exist _minted-lua_minted mkdir _minted-lua_minted)...executed.
("C:/Program Files/MiKTeX/tex/latex/xcolor/xcolor.sty"
Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK)
("C:/Program Files/MiKTeX/tex/latex/graphics-cfg/color.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: luatex.def on input line 227.
("C:/Program Files/MiKTeX/tex/latex/graphics-def/luatex.def"
File: luatex.def 2022/09/22 v1.2d Graphics/color driver for luatex
)
("C:/Program Files/MiKTeX/tex/latex/graphics/mathcolor.ltx")
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1353.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1357.
Package xcolor Info: Model `RGB' extended on input line 1369.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1371.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1372.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1373.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1374.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1375.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1376.
)
runsystem(for ^%i in (pygmentize.exe pygmentize.bat pygmentize.cmd) do set > lua
_minted.aex <nul: /p x=^%~$PATH:i>> lua_minted.aex)...failed.
runsystem(del lua_minted.aex)...executed.
! Package minted Error: You must have `pygmentize' installed to use this packag
e.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
l.5 \begin{document}
Refer to the installation instructions in the minted documentation for more inf
ormation.
("C:/Program Files/MiKTeX/tex/latex/l3backend/l3backend-luatex.def"
File: l3backend-luatex.def 2023-04-19 L3 backend support: PDF output (LuaTeX)
\l__color_backend_stack_int=\count290
Inserting `l3color' in `luaotfload.parse_color'.
\l__pdf_internal_box=\box62
)
(./lua_minted.aux)
\openout1 = lua_minted.aux
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info: Trying to load font information for TS1+cmr on input line 5
.
("C:/Program Files/MiKTeX/tex/latex/base/ts1cmr.fd"
File: ts1cmr.fd 2023/04/13 v2.5m Standard LaTeX font definitions
)
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
Package scrbase Info: activating english \abstractname on input line 5.
Package scrbase Info: activating english \partname on input line 5.
Package scrbase Info: activating english \figurename on input line 5.
Package scrbase Info: activating english \tablename on input line 5.
Package scrbase Info: activating english \contentsname on input line 5.
Package scrbase Info: activating english \listfigurename on input line 5.
Package scrbase Info: activating english \listtablename on input line 5.
Package scrbase Info: activating english \refname on input line 5.
Package scrbase Info: activating english \indexname on input line 5.
("C:/Program Files/MiKTeX/tex/context/base/mkii/supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count291
\scratchdimen=\dimen157
\scratchbox=\box63
\nofMPsegments=\count292
\nofMParguments=\count293
\everyMPshowfont=\toks23
\MPscratchCnt=\count294
\MPscratchDim=\dimen158
\MPnumerator=\count295
\makeMPintoPDFobject=\count296
\everyMPtoPDFconversion=\toks24
)
\openout3 = lua_minted.pyg
(./_minted-lua_minted/default.pygstyle)
(./_minted-lua_minted/0C5D8DDB83D43EDDD51C0BF5A9BE6631BF0BA8B408C609F033F55E02B
868C6D7.pygtex) [1
{C:/Users/Bob/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}] (./lua_minted.
aux)
***********
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-08-29>
***********
runsystem(del lua_minted.pyg)...executed.
)
Here is how much of LuaTeX's memory you used:
8379 strings out of 477259
100000,1977958 words of node,token memory allocated
441 words of node memory still in use:
3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 55 glue_spec,
4 attribute_list, 1 write nodes
avail lists: 1:1,2:60,3:4,4:22,5:27,7:48,9:32,11:3
29542 multiletter control sequences out of 65536+600000
16 fonts using 849519 bytes
108i,7n,101p,10906b,388s stack positions out of 10000i,1000n,20000p,200000b,200000s
<//?/c:/users/bob/appdata/local/microsoft/windows/fonts/deleted/lmroman12-regula
r.otf><//?/c:/users/bob/appdata/local/microsoft/windows/fonts/deleted/lmmono12-r
egular.otf>
Output written on lua_minted.pdf (1 page, 5324 bytes).
PDF statistics: 20 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 131072)
1 words of extra memory for PDF output out of 10000 (max. 100000000)