gpoore / minted

minted is a LaTeX package that provides syntax highlighting using the Pygments library. Highlighted source code can be customized using fancyvrb.
1.74k stars 126 forks source link

all minted commands print `<MINTED>` in red #402

Closed mbertucci47 closed 2 weeks ago

mbertucci47 commented 2 weeks ago

With the recent repackaging of minted 3.0.0, all minted commands produce <MINTED> in red.

\documentclass{article}

\usepackage{minted}

\begin{document}

\begin{minted}{ruby} 
class Foo
    def init
        pi = Math::PI
        @var = "Pi = #{pi}..."
    end 
end
\end{minted}

\mintinline{ruby}|class Foo|

\mint{ruby}|class Foo|
\end{document}
minted

Looking at the code, this should only happen with placeholder=true. It occurs with or without --shell-escape. I am on windows 10 and have installed latexminted through pip. Version 3.0.0 worked for me before the repackaging yesterday. I hope I'm not missing something obvious. Here's my log:

This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex 2024.9.24)  25 SEP 2024 10:29
entering extended mode
 \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-09-10>
(c:/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2024/02/08 v1.4n Standard LaTeX document class
(c:/texlive/2024/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2024/02/08 v1.4n Standard LaTeX file (size option)
)
\c@part=\count194
\c@section=\count195
\c@subsection=\count196
\c@subsubsection=\count197
\c@paragraph=\count198
\c@subparagraph=\count199
\c@figure=\count266
\c@table=\count267
\abovecaptionskip=\skip49
\belowcaptionskip=\skip50
\bibindent=\dimen141
)
(c:/texlive/2024/texmf-dist/tex/latex/minted/minted.sty
Package: minted 2024/09/22 v3.0.0 Yet another Pygments shim for LaTeX

(c:/texlive/2024/texmf-dist/tex/generic/catchfile/catchfile.sty
Package: catchfile 2019/12/09 v1.8 Catch the contents of a file (HO)

(c:/texlive/2024/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
(c:/texlive/2024/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
)
(c:/texlive/2024/texmf-dist/tex/generic/etexcmds/etexcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)

(c:/texlive/2024/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
)))
(c:/texlive/2024/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count268
)
(c:/texlive/2024/texmf-dist/tex/latex/fvextra/fvextra.sty
Package: fvextra 2024/09/14 v1.8.0 fvextra - extensions and patches for fancyvr
b

(c:/texlive/2024/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Package: fancyvrb 2024/01/20 4.5c verbatim text (tvz,hv)

(c:/texlive/2024/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
\FV@CodeLineNo=\count269
\FV@InFile=\read2
\FV@TabBox=\box52
\c@FancyVerbLine=\count270
\FV@StepNumber=\count271
\FV@OutFile=\write3
)
(c:/texlive/2024/texmf-dist/tex/latex/upquote/upquote.sty
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
tim
)
(c:/texlive/2024/texmf-dist/tex/latex/lineno/lineno.sty
Package: lineno 2023/05/20 line numbers on paragraphs v5.3

(c:/texlive/2024/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)

(c:/texlive/2024/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
))
\linenopenalty=\count272
\output=\toks18
\linenoprevgraf=\count273
\linenumbersep=\dimen142
\linenumberwidth=\dimen143
\c@linenumber=\count274
\c@pagewiselinenumber=\count275
\c@LN@truepage=\count276
\c@internallinenumber=\count277
\c@internallinenumbers=\count278
\quotelinenumbersep=\dimen144
\bframerule=\dimen145
\bframesep=\dimen146
\bframebox=\box53
LaTeX Info: Redefining \\ on input line 3180.
)
\c@FancyVerbWriteLine=\count279
\c@FancyVerbBufferIndex=\count280
\c@FancyVerbBufferLength=\count281
\c@FancyVerbBufferLine=\count282
\c@FV@oldbufferlength=\count283
\c@FV@TrueTabGroupLevel=\count284
\c@FV@TrueTabCounter=\count285
\FV@TabBox@Group=\box54
\FV@TmpLength=\skip51
\c@FV@HighlightLinesStart=\count286
\c@FV@HighlightLinesStop=\count287
\FV@LoopCount=\count288
\FV@NCharsBox=\box55
\FV@BreakIndent=\dimen147
\FV@BreakIndentNChars=\count289
\FV@BreakSymbolSepLeft=\dimen148
\FV@BreakSymbolSepLeftNChars=\count290
\FV@BreakSymbolSepRight=\dimen149
\FV@BreakSymbolSepRightNChars=\count291
\FV@BreakSymbolIndentLeft=\dimen150
\FV@BreakSymbolIndentLeftNChars=\count292
\FV@BreakSymbolIndentRight=\dimen151
\FV@BreakSymbolIndentRightNChars=\count293
\c@FancyVerbLineBreakLast=\count294
\FV@LineBox=\box56
\FV@LineIndentBox=\box57
\c@FV@BreakBufferDepth=\count295
\FV@LineWidth=\dimen152
)
(c:/texlive/2024/texmf-dist/tex/latex/latex2pydata/latex2pydata.sty
Package: latex2pydata 2024/05/16 v0.2.0 latex2pydata - write data to file in Py
thon literal format

(c:/texlive/2024/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
\c@pydata@bufferindex=\count296
\c@pydata@defaultbufferlength=\count297
)
(c:/texlive/2024/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks19
\pgfkeys@temptoks=\toks20

(c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.co
de.tex
\pgfkeys@tmptoks=\toks21
))) (c:/texlive/2024/texmf-dist/tex/latex/pgfopts/pgfopts.sty
Package: pgfopts 2014/07/10 v2.1a LaTeX package options with pgfkeys
\pgfopts@list@add@a@toks=\toks22
\pgfopts@list@add@b@toks=\toks23
)
(c:/texlive/2024/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2023/07/08 v1.0d unified shell escape interface for LaTeX
Package shellesc Info: Unrestricted shell escape enabled on input line 75.
)
(c:/texlive/2024/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count298
\float@exts=\toks24
\float@box=\box58
\@float@everytoks=\toks25
\@floatcapt=\box59
)
\c@minted@tmpcnt=\count299
\c@minted@tmpcodebufferlength=\count300
\c@minted@numcachefiles=\count301
\c@minted@FancyVerbLineTemp=\count302
\@float@every@listing=\toks26
\c@listing=\count303
)
(c:/texlive/2024/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2023/11/15 v3.01 LaTeX color extensions (UK)

(c:/texlive/2024/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 274.

(c:/texlive/2024/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2024/04/13 v1.2c Graphics/color driver for pdftex
)
(c:/texlive/2024/texmf-dist/tex/latex/graphics/mathcolor.ltx)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1350.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1354.
Package xcolor Info: Model `RGB' extended on input line 1366.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1368.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1370.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1371.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1372.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1373.
)
(c:/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2024-05-08 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count304
\l__pdf_internal_box=\box60
)
(./test.aux)
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
 (c:/texlive/2024/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count305
\scratchdimen=\dimen153
\scratchbox=\box61
\nofMPsegments=\count306
\nofMParguments=\count307
\everyMPshowfont=\toks27
\MPscratchCnt=\count308
\MPscratchDim=\dimen154
\MPnumerator=\count309
\makeMPintoPDFobject=\count310
\everyMPtoPDFconversion=\toks28
)
\pydata@fh@_098F6BCD4621D373CADE4E832627B4F6.data.minted=\write4
\openout4 = `_098F6BCD4621D373CADE4E832627B4F6.data.minted'.

runsystem(latexminted config  --timestamp 20240925102910 098F6BCD4621D373CADE4E
832627B4F6)...executed.

 (./_098F6BCD4621D373CADE4E832627B4F6.config.minted)
runsystem(latexminted cleanfile _098F6BCD4621D373CADE4E832627B4F6.config.minted
)...executed.

(c:/Users/saint/Documents/texmf-local/tex/latex/keytheorems/doc/_minted/default
.style.minted)
\c@minted@tmpdatabufferlength=\count311
\openout4 = `_098F6BCD4621D373CADE4E832627B4F6.data.minted'.

LaTeX Font Info:    Font shape `OT1/cmtt/bx/n' in size <10> not available
(Font)              Font shape `OT1/cmtt/m/n' tried instead on input line 15.

[1

{c:/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux)
 ***********
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-09-10>
 ***********
runsystem(latexminted batch  --timestamp 20240925102910 098F6BCD4621D373CADE4E8
32627B4F6)...executed.

 ) 
Here is how much of TeX's memory you used:
 6431 strings out of 473578
 150532 string characters out of 5732236
 638358 words of memory out of 5000000
 29293 multiletter control sequences out of 15000+600000
 558237 words of font info for 37 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 85i,5n,93p,347b,378s stack positions out of 10000i,1000n,20000p,200000b,200000s
<c:/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texl
ive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on test.pdf (1 page, 18690 bytes).
PDF statistics:
 18 PDF objects out of 1000 (max. 8388607)
 10 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)
mbertucci47 commented 2 weeks ago

Hmm, I see minted is picking up something in my texmf-local,

(c:/Users/saint/Documents/texmf-local/tex/latex/keytheorems/doc/_minted/default
.style.minted)

That's odd. But still, deleting it did not fix the issue.

gpoore commented 2 weeks ago

I think you're probably running into an incompatibility between the beta version of latexminted you installed with pip, and the final latexminted 0.1.0 release. latexminted and all libraries are now correctly bundled for TeX Live, and -shell-escape is no longer required for TeX Live, so you can probably just pip uninstall latexminted and then tlmgr install minted to fix this.

mbertucci47 commented 2 weeks ago

Yes that was it. Thanks for your help!