texlive[72888] Master/texmf-dist: minted (18nov24)

commits+karl at tug.org commits+karl at tug.org
Mon Nov 18 22:06:02 CET 2024


Revision: 72888
          https://tug.org/svn/texlive?view=revision&revision=72888
Author:   karl
Date:     2024-11-18 22:06:02 +0100 (Mon, 18 Nov 2024)
Log Message:
-----------
minted (18nov24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md
    trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
    trunk/Master/texmf-dist/doc/latex/minted/minted.pdf
    trunk/Master/texmf-dist/source/latex/minted/minted.dtx
    trunk/Master/texmf-dist/tex/latex/minted/minted.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl

Removed Paths:
-------------
    trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.0-py3-none-any.whl

Modified: trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md	2024-11-18 21:05:44 UTC (rev 72887)
+++ trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md	2024-11-18 21:06:02 UTC (rev 72888)
@@ -2,6 +2,13 @@
 
 
 
+## v0.3.1 (2024-11-12)
+
+*  Fixed a bug in config detection that caused an error when a data file from
+   LaTeX cannot be located.
+
+
+
 ## v0.3.0 (2024-10-29)
 
 *  Added support for new keywords options (#416):  `extrakeywords`,

Modified: trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md	2024-11-18 21:05:44 UTC (rev 72887)
+++ trunk/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md	2024-11-18 21:06:02 UTC (rev 72888)
@@ -1,6 +1,17 @@
 # Changelog — minted LaTeX package
 
 
+## v3.4.0 (2024/11/17)
+
+*  Replaced temp counter with a macro to prevent issues with commands
+   and environments such as `\text` from `amsmath` that modify counter
+   behavior (#423).
+
+*  When `highlightmode` causes all code to be highlighted at once, duplicate
+   highlighting is now detected and skipped.
+
+
+
 ## v3.3.0 (2024/11/10)
 
 *  Fixed a bug from v3.2.0 that caused errors with unrestricted shell escape

Modified: trunk/Master/texmf-dist/doc/latex/minted/minted.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.0-py3-none-any.whl
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl
===================================================================
--- trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl	2024-11-18 21:05:44 UTC (rev 72887)
+++ trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl	2024-11-18 21:06:02 UTC (rev 72888)

Property changes on: trunk/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/minted/minted.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/minted/minted.dtx	2024-11-18 21:05:44 UTC (rev 72887)
+++ trunk/Master/texmf-dist/source/latex/minted/minted.dtx	2024-11-18 21:06:02 UTC (rev 72888)
@@ -27,7 +27,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{minted}
 %<*package>
-    [2024/11/10 v3.3.0 Yet another Pygments shim for LaTeX]
+    [2024/11/17 v3.4.0 Yet another Pygments shim for LaTeX]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -2220,10 +2220,10 @@
 % \end{macro}
 %
 %
-% \begin{macro}{minted at tmpcnt}
-% Temp counter.
+% \begin{macro}{\minted at tempindex}
+% Temp index for looping.
 %    \begin{macrocode}
-\newcounter{minted at tmpcnt}
+\def\minted at tempindex{0}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -2287,31 +2287,31 @@
 % Create macros used in determining whether a given character is part of a specified set of characters.
 %    \begin{macrocode}
 % [0-9]
-\setcounter{minted at tmpcnt}{48}
-\loop\unless\ifnum\value{minted at tmpcnt}>57\relax
-  \expandafter\let\csname minted at isnum\arabic{minted at tmpcnt}\endcsname\relax
-  \expandafter\let\csname minted at isalphanum\arabic{minted at tmpcnt}\endcsname\relax
+\def\minted at tempindex{48}
+\loop\unless\ifnum\minted at tempindex>57\relax
+  \expandafter\let\csname minted at isnum\minted at tempindex\endcsname\relax
+  \expandafter\let\csname minted at isalphanum\minted at tempindex\endcsname\relax
   \expandafter\let
-    \csname minted at isalphanumhyphenunderscore\arabic{minted at tmpcnt}\endcsname\relax
-  \stepcounter{minted at tmpcnt}
+    \csname minted at isalphanumhyphenunderscore\minted at tempindex\endcsname\relax
+  \edef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}
 \repeat
 % [A-Z]
-\setcounter{minted at tmpcnt}{65}
-\loop\unless\ifnum\value{minted at tmpcnt}>90\relax
-  \expandafter\let\csname minted at isalpha\arabic{minted at tmpcnt}\endcsname\relax
-  \expandafter\let\csname minted at isalphanum\arabic{minted at tmpcnt}\endcsname\relax
+\def\minted at tempindex{65}
+\loop\unless\ifnum\minted at tempindex>90\relax
+  \expandafter\let\csname minted at isalpha\minted at tempindex\endcsname\relax
+  \expandafter\let\csname minted at isalphanum\minted at tempindex\endcsname\relax
   \expandafter\let
-    \csname minted at isalphanumhyphenunderscore\arabic{minted at tmpcnt}\endcsname\relax
-  \stepcounter{minted at tmpcnt}
+    \csname minted at isalphanumhyphenunderscore\minted at tempindex\endcsname\relax
+  \edef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}
 \repeat
 % [a-z]
-\setcounter{minted at tmpcnt}{97}
-\loop\unless\ifnum\value{minted at tmpcnt}>122\relax
-  \expandafter\let\csname minted at isalpha\arabic{minted at tmpcnt}\endcsname\relax
-  \expandafter\let\csname minted at isalphanum\arabic{minted at tmpcnt}\endcsname\relax
+\def\minted at tempindex{97}
+\loop\unless\ifnum\minted at tempindex>122\relax
+  \expandafter\let\csname minted at isalpha\minted at tempindex\endcsname\relax
+  \expandafter\let\csname minted at isalphanum\minted at tempindex\endcsname\relax
   \expandafter\let
-    \csname minted at isalphanumhyphenunderscore\arabic{minted at tmpcnt}\endcsname\relax
-  \stepcounter{minted at tmpcnt}
+    \csname minted at isalphanumhyphenunderscore\minted at tempindex\endcsname\relax
+  \edef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}
 \repeat
 % [-]
 \expandafter\let\csname minted at isalphanumhyphenunderscore45\endcsname\relax
@@ -3406,13 +3406,13 @@
   \pydatawritekey{cachefiles}%
   \pydatawritemlvaluestart
   \pydatawritemlvalueline{[}%
-  \setcounter{minted at tmpcnt}{1}%
-  \loop\unless\ifnum\value{minted at tmpcnt}>\minted at numcachefiles\relax
+  \gdef\minted at tempindex{1}%
+  \loop\unless\ifnum\minted at tempindex>\minted at numcachefiles\relax
     \expandafter\minted at savecachelist@writecachefile\expandafter{%
-      \csname minted at cachefile\arabic{minted at tmpcnt}\endcsname}%
+      \csname minted at cachefile\minted at tempindex\endcsname}%
     \expandafter\global\expandafter
-      \let\csname minted at cachefile\arabic{minted at tmpcnt}\endcsname\minted at undefined
-    \stepcounter{minted at tmpcnt}%
+      \let\csname minted at cachefile\minted at tempindex\endcsname\minted at undefined
+    \xdef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}%
   \repeat
   \pydatawritemlvalueline{]}%
   \pydatawritemlvalueend
@@ -3765,12 +3765,12 @@
   \pydatabufferkeyvalue{command}{highlight}%
   \pydatabufferkey{code}%
   \pydatabuffermlvaluestart
-  \setcounter{minted at tmpcnt}{1}%
-  \loop\unless\ifnum\value{minted at tmpcnt}>\minted at tmpcodebufferlength\relax
+  \gdef\minted at tempindex{1}%
+  \loop\unless\ifnum\minted at tempindex>\minted at tmpcodebufferlength\relax
     \expandafter\let\expandafter
-      \minted at tmp\csname minted at tmpcodebufferline\arabic{minted at tmpcnt}\endcsname
+      \minted at tmp\csname minted at tmpcodebufferline\minted at tempindex\endcsname
     \expandafter\pydatabuffermlvalueline\expandafter{\minted at tmp}%
-    \stepcounter{minted at tmpcnt}%
+    \xdef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}%
   \repeat
   \pydatabuffermlvalueend
   \minted at highlight@i}
@@ -3814,8 +3814,19 @@
         \input{\minted at highlightfilepath}}%
       \minted at addcachefilename{\minted at highlightfilename}}%
      {\ifbool{minted at canexec}%
-       {\minted at iffasthighlightmode@buffertempfile
-        \minted at highlight@create}%
+       {\ifbool{minted at fasthighlightmode}%
+         {\ifcsname minted at processedfilename@\minted at highlightfilename\endcsname
+            \expandafter\@firstoftwo
+          \else
+            \expandafter\@secondoftwo
+          \fi
+           {\minted at insertplaceholder}%
+           {\expandafter\global\expandafter\let
+              \csname minted at processedfilename@\minted at highlightfilename\endcsname\relax
+            \minted at iffasthighlightmode@buffertempfile
+            \minted at highlight@create}}%
+         {\minted at iffasthighlightmode@buffertempfile
+          \minted at highlight@create}}%
        {\minted at error{Cannot highlight code (minted executable is unavailable or
           disabled); attempting to typeset without highlighting}%
         \minted at highlight@fallback}}}%
@@ -3985,12 +3996,12 @@
 \def\minted at iffasthighlightmode@buffertempfile at v{%
   \pydatabufferkey{code}%
   \pydatabuffermlvaluestart
-  \setcounter{minted at tmpcnt}{1}%
-  \loop\unless\ifnum\value{minted at tmpcnt}>\minted at tmpcodebufferlength\relax
+  \gdef\minted at tempindex{1}%
+  \loop\unless\ifnum\minted at tempindex>\minted at tmpcodebufferlength\relax
     \expandafter\let\expandafter
-      \minted at tmp\csname minted at tmpcodebufferline\arabic{minted at tmpcnt}\endcsname
+      \minted at tmp\csname minted at tmpcodebufferline\minted at tempindex\endcsname
     \expandafter\pydatabuffermlvalueline\expandafter{\minted at tmp}%
-    \stepcounter{minted at tmpcnt}%
+    \xdef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}%
   \repeat
   \pydatabuffermlvalueend
   \VerbatimClearBuffer[buffername=minted at tmpcodebuffer]}

Modified: trunk/Master/texmf-dist/tex/latex/minted/minted.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/minted/minted.sty	2024-11-18 21:05:44 UTC (rev 72887)
+++ trunk/Master/texmf-dist/tex/latex/minted/minted.sty	2024-11-18 21:06:02 UTC (rev 72888)
@@ -26,7 +26,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{minted}
-    [2024/11/10 v3.3.0 Yet another Pygments shim for LaTeX]
+    [2024/11/17 v3.4.0 Yet another Pygments shim for LaTeX]
 \RequirePackage{catchfile}
 \RequirePackage{etoolbox}
 \RequirePackage{fvextra}[2024/10/16]
@@ -289,7 +289,7 @@
   \fi
 \fi
 \def\minted at styleprefix{PYG}
-\newcounter{minted at tmpcnt}
+\def\minted at tempindex{0}
 \def\minted at forcsvlist#1#2{%
   \if\relax\detokenize\expandafter{\@gobble#2}\relax
     \expandafter\minted at forcsvlist@exp
@@ -315,29 +315,29 @@
   \catcode`\@=11\relax
   #1%
   \catcode`\@=\minted at tmpatcat\relax}
-\setcounter{minted at tmpcnt}{48}
-\loop\unless\ifnum\value{minted at tmpcnt}>57\relax
-  \expandafter\let\csname minted at isnum\arabic{minted at tmpcnt}\endcsname\relax
-  \expandafter\let\csname minted at isalphanum\arabic{minted at tmpcnt}\endcsname\relax
+\def\minted at tempindex{48}
+\loop\unless\ifnum\minted at tempindex>57\relax
+  \expandafter\let\csname minted at isnum\minted at tempindex\endcsname\relax
+  \expandafter\let\csname minted at isalphanum\minted at tempindex\endcsname\relax
   \expandafter\let
-    \csname minted at isalphanumhyphenunderscore\arabic{minted at tmpcnt}\endcsname\relax
-  \stepcounter{minted at tmpcnt}
+    \csname minted at isalphanumhyphenunderscore\minted at tempindex\endcsname\relax
+  \edef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}
 \repeat
-\setcounter{minted at tmpcnt}{65}
-\loop\unless\ifnum\value{minted at tmpcnt}>90\relax
-  \expandafter\let\csname minted at isalpha\arabic{minted at tmpcnt}\endcsname\relax
-  \expandafter\let\csname minted at isalphanum\arabic{minted at tmpcnt}\endcsname\relax
+\def\minted at tempindex{65}
+\loop\unless\ifnum\minted at tempindex>90\relax
+  \expandafter\let\csname minted at isalpha\minted at tempindex\endcsname\relax
+  \expandafter\let\csname minted at isalphanum\minted at tempindex\endcsname\relax
   \expandafter\let
-    \csname minted at isalphanumhyphenunderscore\arabic{minted at tmpcnt}\endcsname\relax
-  \stepcounter{minted at tmpcnt}
+    \csname minted at isalphanumhyphenunderscore\minted at tempindex\endcsname\relax
+  \edef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}
 \repeat
-\setcounter{minted at tmpcnt}{97}
-\loop\unless\ifnum\value{minted at tmpcnt}>122\relax
-  \expandafter\let\csname minted at isalpha\arabic{minted at tmpcnt}\endcsname\relax
-  \expandafter\let\csname minted at isalphanum\arabic{minted at tmpcnt}\endcsname\relax
+\def\minted at tempindex{97}
+\loop\unless\ifnum\minted at tempindex>122\relax
+  \expandafter\let\csname minted at isalpha\minted at tempindex\endcsname\relax
+  \expandafter\let\csname minted at isalphanum\minted at tempindex\endcsname\relax
   \expandafter\let
-    \csname minted at isalphanumhyphenunderscore\arabic{minted at tmpcnt}\endcsname\relax
-  \stepcounter{minted at tmpcnt}
+    \csname minted at isalphanumhyphenunderscore\minted at tempindex\endcsname\relax
+  \edef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}
 \repeat
 \expandafter\let\csname minted at isalphanumhyphenunderscore45\endcsname\relax
 \expandafter\let\csname minted at isalphanumhyphenunderscore95\endcsname\relax
@@ -1133,13 +1133,13 @@
   \pydatawritekey{cachefiles}%
   \pydatawritemlvaluestart
   \pydatawritemlvalueline{[}%
-  \setcounter{minted at tmpcnt}{1}%
-  \loop\unless\ifnum\value{minted at tmpcnt}>\minted at numcachefiles\relax
+  \gdef\minted at tempindex{1}%
+  \loop\unless\ifnum\minted at tempindex>\minted at numcachefiles\relax
     \expandafter\minted at savecachelist@writecachefile\expandafter{%
-      \csname minted at cachefile\arabic{minted at tmpcnt}\endcsname}%
+      \csname minted at cachefile\minted at tempindex\endcsname}%
     \expandafter\global\expandafter
-      \let\csname minted at cachefile\arabic{minted at tmpcnt}\endcsname\minted at undefined
-    \stepcounter{minted at tmpcnt}%
+      \let\csname minted at cachefile\minted at tempindex\endcsname\minted at undefined
+    \xdef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}%
   \repeat
   \pydatawritemlvalueline{]}%
   \pydatawritemlvalueend
@@ -1394,12 +1394,12 @@
   \pydatabufferkeyvalue{command}{highlight}%
   \pydatabufferkey{code}%
   \pydatabuffermlvaluestart
-  \setcounter{minted at tmpcnt}{1}%
-  \loop\unless\ifnum\value{minted at tmpcnt}>\minted at tmpcodebufferlength\relax
+  \gdef\minted at tempindex{1}%
+  \loop\unless\ifnum\minted at tempindex>\minted at tmpcodebufferlength\relax
     \expandafter\let\expandafter
-      \minted at tmp\csname minted at tmpcodebufferline\arabic{minted at tmpcnt}\endcsname
+      \minted at tmp\csname minted at tmpcodebufferline\minted at tempindex\endcsname
     \expandafter\pydatabuffermlvalueline\expandafter{\minted at tmp}%
-    \stepcounter{minted at tmpcnt}%
+    \xdef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}%
   \repeat
   \pydatabuffermlvalueend
   \minted at highlight@i}
@@ -1443,8 +1443,19 @@
         \input{\minted at highlightfilepath}}%
       \minted at addcachefilename{\minted at highlightfilename}}%
      {\ifbool{minted at canexec}%
-       {\minted at iffasthighlightmode@buffertempfile
-        \minted at highlight@create}%
+       {\ifbool{minted at fasthighlightmode}%
+         {\ifcsname minted at processedfilename@\minted at highlightfilename\endcsname
+            \expandafter\@firstoftwo
+          \else
+            \expandafter\@secondoftwo
+          \fi
+           {\minted at insertplaceholder}%
+           {\expandafter\global\expandafter\let
+              \csname minted at processedfilename@\minted at highlightfilename\endcsname\relax
+            \minted at iffasthighlightmode@buffertempfile
+            \minted at highlight@create}}%
+         {\minted at iffasthighlightmode@buffertempfile
+          \minted at highlight@create}}%
        {\minted at error{Cannot highlight code (minted executable is unavailable or
           disabled); attempting to typeset without highlighting}%
         \minted at highlight@fallback}}}%
@@ -1603,12 +1614,12 @@
 \def\minted at iffasthighlightmode@buffertempfile at v{%
   \pydatabufferkey{code}%
   \pydatabuffermlvaluestart
-  \setcounter{minted at tmpcnt}{1}%
-  \loop\unless\ifnum\value{minted at tmpcnt}>\minted at tmpcodebufferlength\relax
+  \gdef\minted at tempindex{1}%
+  \loop\unless\ifnum\minted at tempindex>\minted at tmpcodebufferlength\relax
     \expandafter\let\expandafter
-      \minted at tmp\csname minted at tmpcodebufferline\arabic{minted at tmpcnt}\endcsname
+      \minted at tmp\csname minted at tmpcodebufferline\minted at tempindex\endcsname
     \expandafter\pydatabuffermlvalueline\expandafter{\minted at tmp}%
-    \stepcounter{minted at tmpcnt}%
+    \xdef\minted at tempindex{\the\numexpr\minted at tempindex+1\relax}%
   \repeat
   \pydatabuffermlvalueend
   \VerbatimClearBuffer[buffername=minted at tmpcodebuffer]}



More information about the tex-live-commits mailing list.