
Ich verwende Texmaker mit Texlive in Linux Mint 21.3 Cinnamon, um einen Artikel mit Python-Code zu schreiben. Dann habe ich ein Problem:! LaTeX Error: Environment Verbatim undefined in Texlive in Linux Mint
Das Problem ist, dass mein Code auf einem Windows 10-Computer mit MikTex und Texmaker gut funktioniert und auch auf Overleaf keinen Fehler erzeugt.
Hier ist mein MWE:
\documentclass[12pt, a4paper]{article}
\usepackage{tgpagella}
\usepackage{minted}
\newmintinline[pycode]{python}{}
%\renewcommand{\FancyVerbFormatLine}[1]{#1}
\begin{document}
\pycode{pow()} is a function in Python
\end{document}
Hier ist der Fehler auf meinem Computer.
Und hier ist das Ergebnis auf Overleaf:
Hier ist die Protokolldatei auf meinem Computer
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex 2024.1.20) 20 JAN 2024 16:42
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**testcode.tex
(./testcode.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(/usr/share/texmf/tex/latex/tex-gyre/tgpagella.sty
Package: tgpagella 2009/09/27 v1.2 TeX Gyre Pagella as default roman family
(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
)))
(./minted.sty
Package: minted 2023/12/18 v2.9 Yet another Pygments shim for LaTeX
(/usr/share/texlive/texmf-dist/tex/latex/fvextra/fvextra.sty
Package: fvextra 2019/02/04 v1.4 fvextra - extensions and patches for fancyvrb
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2020/11/24 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count193
)
(/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Package: fancyvrb 2021/12/21 4.1b verbatim text (tvz,hv)
\FV@CodeLineNo=\count194
\FV@InFile=\read2
\FV@TabBox=\box50
\c@FancyVerbLine=\count195
\FV@StepNumber=\count196
\FV@OutFile=\write3
)
(/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
tim
)
(/usr/share/texlive/texmf-dist/tex/latex/lineno/lineno.sty
Package: lineno 2005/11/02 line numbers on paragraphs v4.41
\linenopenalty=\count197
\output=\toks17
\linenoprevgraf=\count198
\linenumbersep=\dimen139
\linenumberwidth=\dimen140
\c@linenumber=\count199
\c@pagewiselinenumber=\count266
\c@LN@truepage=\count267
\c@internallinenumber=\count268
\c@internallinenumbers=\count269
\quotelinenumbersep=\dimen141
\bframerule=\dimen142
\bframesep=\dimen143
\bframebox=\box51
LaTeX Info: Redefining \\ on input line 3056.
)
\c@FV@TrueTabGroupLevel=\count270
\c@FV@TrueTabCounter=\count271
\FV@TabBox@Group=\box52
\FV@TmpLength=\skip49
\c@FV@HighlightLinesStart=\count272
\c@FV@HighlightLinesStop=\count273
\FV@LoopCount=\count274
\FV@NCharsBox=\box53
\FV@BreakIndent=\dimen144
\FV@BreakIndentNChars=\count275
\FV@BreakSymbolSepLeft=\dimen145
\FV@BreakSymbolSepLeftNChars=\count276
\FV@BreakSymbolSepRight=\dimen146
\FV@BreakSymbolSepRightNChars=\count277
\FV@BreakSymbolIndentLeft=\dimen147
\FV@BreakSymbolIndentLeftNChars=\count278
\FV@BreakSymbolIndentRight=\dimen148
\FV@BreakSymbolIndentRightNChars=\count279
\c@FancyVerbLineBreakLast=\count280
\FV@LineBox=\box54
\FV@LineIndentBox=\box55
\FV@LineWidth=\dimen149
)
LaTeX Warning: You have requested, on input line 33, version
`2022/11/30' of package fvextra,
but only version
`2019/02/04 v1.4 fvextra - extensions and patches for fancyvrb'
is available.
(/usr/share/texlive/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2019/11/08 v1.0c unified shell escape interface for LaTeX
Package shellesc Info: Unrestricted shell escape enabled on input line 75.
)
(/usr/share/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
Package: ifplatform 2017/10/13 v0.4a Testing for the operating system
(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/generic/catchfile/catchfile.sty
Package: catchfile 2019/12/09 v1.8 Catch the contents of a file (HO)
(/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
))
(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
)
runsystem(uname -s > "testcode.w18")...executed.
(./testcode.w18)
runsystem(rm -- "testcode.w18")...executed.
) (/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.tex
\integerpart=\count281
\decimalpart=\count282
)
Package: xstring 2021/07/21 v1.84 String manipulations (CT)
)
(/usr/share/texlive/texmf-dist/tex/latex/framed/framed.sty
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip50
\fb@frw=\dimen150
\fb@frh=\dimen151
\FrameRule=\dimen152
\FrameSep=\dimen153
)
(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count283
\float@exts=\toks18
\float@box=\box56
\@float@everytoks=\toks19
\@floatcapt=\box57
)
\minted@appexistsfile=\read3
\minted@bgbox=\box58
\minted@code=\write4
\c@minted@FancyVerbLineTemp=\count284
\c@minted@pygmentizecounter=\count285
\@float@every@listing=\toks20
\c@listing=\count286
)
runsystem(mkdir -p _minted-testcode)...executed.
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2021/10/31 v2.13 LaTeX color extensions (UK)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 227.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1352.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1356.
Package xcolor Info: Model `RGB' extended on input line 1368.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1370.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1371.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1372.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1373.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1374.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1375.
)
runsystem(command -v pygmentize && touch testcode.aex)...executed.
runsystem(rm testcode.aex)...executed.
LaTeX Font Info: Trying to load font information for OT1+qpl on input line 5
.
(/usr/share/texmf/tex/latex/tex-gyre/ot1qpl.fd
File: ot1qpl.fd 2009/09/25 v1.2 font definition file for OT1/qpl
)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2022-01-12 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count287
\l__pdf_internal_box=\box59
)
(./testcode.aux)
\openout1 = `testcode.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: ... 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.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count288
\scratchdimen=\dimen154
\scratchbox=\box60
\nofMPsegments=\count289
\nofMParguments=\count290
\everyMPshowfont=\toks21
\MPscratchCnt=\count291
\MPscratchDim=\dimen155
\MPnumerator=\count292
\makeMPintoPDFobject=\count293
\everyMPtoPDFconversion=\toks22
)
\openout4 = `testcode.pyg'.
(./_minted-testcode/default.pygstyle)
(./_minted-testcode/ECBEE7850F6F42A3EE42B2DD166E759B7123E940C453CDFD3D7E37FB6AC
B949A.pygtex
! LaTeX Error: Environment Verbatim undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 \begin{Verbatim}
[commandchars=\\\{\}]
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
LaTeX Font Info: Trying to load font information for OMS+qpl on input line 1
.
LaTeX Font Info: No file OMSqpl.fd. on input line 1.
LaTeX Font Warning: Font shape `OMS/qpl/m/n' undefined
(Font) using `OMS/cmsy/m/n' instead
(Font) for symbol `textbraceleft' on input line 1.
! LaTeX Error: \begin{document} ended by \end{Verbatim}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3 \end{Verbatim}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
) [1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./testcode.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
runsystem(rm testcode.pyg)...executed.
)
Here is how much of TeX's memory you used:
5262 strings out of 479598
101401 string characters out of 5881832
430206 words of memory out of 5000000
23330 multiletter control sequences out of 15000+600000
472755 words of font info for 31 fonts, out of 8000000 for 9000
331 hyphenation exceptions out of 8191
74i,5n,77p,286b,256s stack positions out of 5000i,500n,10000p,200000b,80000s
{/usr/share/texmf/fonts/enc/dvips/tex-gyre/q-rm.enc}</usr/share/texlive/texmf
-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texmf/fonts/type1/p
ublic/tex-gyre/qplr.pfb>
Output written on testcode.pdf (1 page, 60151 bytes).
PDF statistics:
19 PDF objects out of 1000 (max. 8388607)
11 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
Ich habe überprüft, dass die Live-Version von Tex 2021.20220204-1 ist und minted
das Paket installiert wurde.
Es scheint, dass das Latex-System hier irgendwie veraltet ist. Die ignorelexererrors
Option in minted
führt auch zu einem Fehler, und ich muss ihn beheben, indem ich minted.sty manuell in meinen Ordner lege. Das löst mein obiges Problem jedoch nicht.
Also, was ist das Problem und wie kann ich es beheben?