diff options
author | Karl Berry <karl@freefriends.org> | 2024-11-18 21:06:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-11-18 21:06:02 +0000 |
commit | b074454e11b9d9e904616f4ee70eb391d3e4897e (patch) | |
tree | 70d8b9f313da379a470991826dbc0bbc9aca7de9 /Master/texmf-dist | |
parent | 18d7f8784a380a7b23e4de4f3cdc0dbc11b79ca4 (diff) |
minted (18nov24)
git-svn-id: svn://tug.org/texlive/trunk@72888 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/minted/minted.pdf | bin | 509330 -> 509537 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl (renamed from Master/texmf-dist/scripts/minted/latexminted-0.3.0-py3-none-any.whl) | bin | 33744 -> 33796 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/minted/minted.dtx | 85 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/minted/minted.sty | 81 |
6 files changed, 112 insertions, 72 deletions
diff --git a/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md b/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md index d7dc0229c34..4148b6eeec9 100644 --- a/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md +++ b/Master/texmf-dist/doc/latex/minted/CHANGELOG_LATEXMINTED_PYTHON_PACKAGE.md @@ -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`, diff --git a/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md b/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md index 1c0f368754e..a969bd842e5 100644 --- a/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md +++ b/Master/texmf-dist/doc/latex/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md @@ -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 diff --git a/Master/texmf-dist/doc/latex/minted/minted.pdf b/Master/texmf-dist/doc/latex/minted/minted.pdf Binary files differindex a7d07260b8c..d246807925e 100644 --- a/Master/texmf-dist/doc/latex/minted/minted.pdf +++ b/Master/texmf-dist/doc/latex/minted/minted.pdf diff --git a/Master/texmf-dist/scripts/minted/latexminted-0.3.0-py3-none-any.whl b/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl Binary files differindex 9d0e2a8b59a..1efe7e24dde 100755 --- a/Master/texmf-dist/scripts/minted/latexminted-0.3.0-py3-none-any.whl +++ b/Master/texmf-dist/scripts/minted/latexminted-0.3.1-py3-none-any.whl diff --git a/Master/texmf-dist/source/latex/minted/minted.dtx b/Master/texmf-dist/source/latex/minted/minted.dtx index 5125434020d..c0a36e58f8a 100644 --- a/Master/texmf-dist/source/latex/minted/minted.dtx +++ b/Master/texmf-dist/source/latex/minted/minted.dtx @@ -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@tmpcnt} -% Temp counter. +% \begin{macro}{\minted@tempindex} +% Temp index for looping. % \begin{macrocode} -\newcounter{minted@tmpcnt} +\def\minted@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@tmpcnt}{48} -\loop\unless\ifnum\value{minted@tmpcnt}>57\relax - \expandafter\let\csname minted@isnum\arabic{minted@tmpcnt}\endcsname\relax - \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax +\def\minted@tempindex{48} +\loop\unless\ifnum\minted@tempindex>57\relax + \expandafter\let\csname minted@isnum\minted@tempindex\endcsname\relax + \expandafter\let\csname minted@isalphanum\minted@tempindex\endcsname\relax \expandafter\let - \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax - \stepcounter{minted@tmpcnt} + \csname minted@isalphanumhyphenunderscore\minted@tempindex\endcsname\relax + \edef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax} \repeat % [A-Z] -\setcounter{minted@tmpcnt}{65} -\loop\unless\ifnum\value{minted@tmpcnt}>90\relax - \expandafter\let\csname minted@isalpha\arabic{minted@tmpcnt}\endcsname\relax - \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax +\def\minted@tempindex{65} +\loop\unless\ifnum\minted@tempindex>90\relax + \expandafter\let\csname minted@isalpha\minted@tempindex\endcsname\relax + \expandafter\let\csname minted@isalphanum\minted@tempindex\endcsname\relax \expandafter\let - \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax - \stepcounter{minted@tmpcnt} + \csname minted@isalphanumhyphenunderscore\minted@tempindex\endcsname\relax + \edef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax} \repeat % [a-z] -\setcounter{minted@tmpcnt}{97} -\loop\unless\ifnum\value{minted@tmpcnt}>122\relax - \expandafter\let\csname minted@isalpha\arabic{minted@tmpcnt}\endcsname\relax - \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax +\def\minted@tempindex{97} +\loop\unless\ifnum\minted@tempindex>122\relax + \expandafter\let\csname minted@isalpha\minted@tempindex\endcsname\relax + \expandafter\let\csname minted@isalphanum\minted@tempindex\endcsname\relax \expandafter\let - \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax - \stepcounter{minted@tmpcnt} + \csname minted@isalphanumhyphenunderscore\minted@tempindex\endcsname\relax + \edef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax} \repeat % [-] \expandafter\let\csname minted@isalphanumhyphenunderscore45\endcsname\relax @@ -3406,13 +3406,13 @@ \pydatawritekey{cachefiles}% \pydatawritemlvaluestart \pydatawritemlvalueline{[}% - \setcounter{minted@tmpcnt}{1}% - \loop\unless\ifnum\value{minted@tmpcnt}>\minted@numcachefiles\relax + \gdef\minted@tempindex{1}% + \loop\unless\ifnum\minted@tempindex>\minted@numcachefiles\relax \expandafter\minted@savecachelist@writecachefile\expandafter{% - \csname minted@cachefile\arabic{minted@tmpcnt}\endcsname}% + \csname minted@cachefile\minted@tempindex\endcsname}% \expandafter\global\expandafter - \let\csname minted@cachefile\arabic{minted@tmpcnt}\endcsname\minted@undefined - \stepcounter{minted@tmpcnt}% + \let\csname minted@cachefile\minted@tempindex\endcsname\minted@undefined + \xdef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax}% \repeat \pydatawritemlvalueline{]}% \pydatawritemlvalueend @@ -3765,12 +3765,12 @@ \pydatabufferkeyvalue{command}{highlight}% \pydatabufferkey{code}% \pydatabuffermlvaluestart - \setcounter{minted@tmpcnt}{1}% - \loop\unless\ifnum\value{minted@tmpcnt}>\minted@tmpcodebufferlength\relax + \gdef\minted@tempindex{1}% + \loop\unless\ifnum\minted@tempindex>\minted@tmpcodebufferlength\relax \expandafter\let\expandafter - \minted@tmp\csname minted@tmpcodebufferline\arabic{minted@tmpcnt}\endcsname + \minted@tmp\csname minted@tmpcodebufferline\minted@tempindex\endcsname \expandafter\pydatabuffermlvalueline\expandafter{\minted@tmp}% - \stepcounter{minted@tmpcnt}% + \xdef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax}% \repeat \pydatabuffermlvalueend \minted@highlight@i} @@ -3814,8 +3814,19 @@ \input{\minted@highlightfilepath}}% \minted@addcachefilename{\minted@highlightfilename}}% {\ifbool{minted@canexec}% - {\minted@iffasthighlightmode@buffertempfile - \minted@highlight@create}% + {\ifbool{minted@fasthighlightmode}% + {\ifcsname minted@processedfilename@\minted@highlightfilename\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\minted@insertplaceholder}% + {\expandafter\global\expandafter\let + \csname minted@processedfilename@\minted@highlightfilename\endcsname\relax + \minted@iffasthighlightmode@buffertempfile + \minted@highlight@create}}% + {\minted@iffasthighlightmode@buffertempfile + \minted@highlight@create}}% {\minted@error{Cannot highlight code (minted executable is unavailable or disabled); attempting to typeset without highlighting}% \minted@highlight@fallback}}}% @@ -3985,12 +3996,12 @@ \def\minted@iffasthighlightmode@buffertempfile@v{% \pydatabufferkey{code}% \pydatabuffermlvaluestart - \setcounter{minted@tmpcnt}{1}% - \loop\unless\ifnum\value{minted@tmpcnt}>\minted@tmpcodebufferlength\relax + \gdef\minted@tempindex{1}% + \loop\unless\ifnum\minted@tempindex>\minted@tmpcodebufferlength\relax \expandafter\let\expandafter - \minted@tmp\csname minted@tmpcodebufferline\arabic{minted@tmpcnt}\endcsname + \minted@tmp\csname minted@tmpcodebufferline\minted@tempindex\endcsname \expandafter\pydatabuffermlvalueline\expandafter{\minted@tmp}% - \stepcounter{minted@tmpcnt}% + \xdef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax}% \repeat \pydatabuffermlvalueend \VerbatimClearBuffer[buffername=minted@tmpcodebuffer]} diff --git a/Master/texmf-dist/tex/latex/minted/minted.sty b/Master/texmf-dist/tex/latex/minted/minted.sty index a77cf5a1be4..a04f526015a 100644 --- a/Master/texmf-dist/tex/latex/minted/minted.sty +++ b/Master/texmf-dist/tex/latex/minted/minted.sty @@ -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@styleprefix{PYG} -\newcounter{minted@tmpcnt} +\def\minted@tempindex{0} \def\minted@forcsvlist#1#2{% \if\relax\detokenize\expandafter{\@gobble#2}\relax \expandafter\minted@forcsvlist@exp @@ -315,29 +315,29 @@ \catcode`\@=11\relax #1% \catcode`\@=\minted@tmpatcat\relax} -\setcounter{minted@tmpcnt}{48} -\loop\unless\ifnum\value{minted@tmpcnt}>57\relax - \expandafter\let\csname minted@isnum\arabic{minted@tmpcnt}\endcsname\relax - \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax +\def\minted@tempindex{48} +\loop\unless\ifnum\minted@tempindex>57\relax + \expandafter\let\csname minted@isnum\minted@tempindex\endcsname\relax + \expandafter\let\csname minted@isalphanum\minted@tempindex\endcsname\relax \expandafter\let - \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax - \stepcounter{minted@tmpcnt} + \csname minted@isalphanumhyphenunderscore\minted@tempindex\endcsname\relax + \edef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax} \repeat -\setcounter{minted@tmpcnt}{65} -\loop\unless\ifnum\value{minted@tmpcnt}>90\relax - \expandafter\let\csname minted@isalpha\arabic{minted@tmpcnt}\endcsname\relax - \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax +\def\minted@tempindex{65} +\loop\unless\ifnum\minted@tempindex>90\relax + \expandafter\let\csname minted@isalpha\minted@tempindex\endcsname\relax + \expandafter\let\csname minted@isalphanum\minted@tempindex\endcsname\relax \expandafter\let - \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax - \stepcounter{minted@tmpcnt} + \csname minted@isalphanumhyphenunderscore\minted@tempindex\endcsname\relax + \edef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax} \repeat -\setcounter{minted@tmpcnt}{97} -\loop\unless\ifnum\value{minted@tmpcnt}>122\relax - \expandafter\let\csname minted@isalpha\arabic{minted@tmpcnt}\endcsname\relax - \expandafter\let\csname minted@isalphanum\arabic{minted@tmpcnt}\endcsname\relax +\def\minted@tempindex{97} +\loop\unless\ifnum\minted@tempindex>122\relax + \expandafter\let\csname minted@isalpha\minted@tempindex\endcsname\relax + \expandafter\let\csname minted@isalphanum\minted@tempindex\endcsname\relax \expandafter\let - \csname minted@isalphanumhyphenunderscore\arabic{minted@tmpcnt}\endcsname\relax - \stepcounter{minted@tmpcnt} + \csname minted@isalphanumhyphenunderscore\minted@tempindex\endcsname\relax + \edef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax} \repeat \expandafter\let\csname minted@isalphanumhyphenunderscore45\endcsname\relax \expandafter\let\csname minted@isalphanumhyphenunderscore95\endcsname\relax @@ -1133,13 +1133,13 @@ \pydatawritekey{cachefiles}% \pydatawritemlvaluestart \pydatawritemlvalueline{[}% - \setcounter{minted@tmpcnt}{1}% - \loop\unless\ifnum\value{minted@tmpcnt}>\minted@numcachefiles\relax + \gdef\minted@tempindex{1}% + \loop\unless\ifnum\minted@tempindex>\minted@numcachefiles\relax \expandafter\minted@savecachelist@writecachefile\expandafter{% - \csname minted@cachefile\arabic{minted@tmpcnt}\endcsname}% + \csname minted@cachefile\minted@tempindex\endcsname}% \expandafter\global\expandafter - \let\csname minted@cachefile\arabic{minted@tmpcnt}\endcsname\minted@undefined - \stepcounter{minted@tmpcnt}% + \let\csname minted@cachefile\minted@tempindex\endcsname\minted@undefined + \xdef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax}% \repeat \pydatawritemlvalueline{]}% \pydatawritemlvalueend @@ -1394,12 +1394,12 @@ \pydatabufferkeyvalue{command}{highlight}% \pydatabufferkey{code}% \pydatabuffermlvaluestart - \setcounter{minted@tmpcnt}{1}% - \loop\unless\ifnum\value{minted@tmpcnt}>\minted@tmpcodebufferlength\relax + \gdef\minted@tempindex{1}% + \loop\unless\ifnum\minted@tempindex>\minted@tmpcodebufferlength\relax \expandafter\let\expandafter - \minted@tmp\csname minted@tmpcodebufferline\arabic{minted@tmpcnt}\endcsname + \minted@tmp\csname minted@tmpcodebufferline\minted@tempindex\endcsname \expandafter\pydatabuffermlvalueline\expandafter{\minted@tmp}% - \stepcounter{minted@tmpcnt}% + \xdef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax}% \repeat \pydatabuffermlvalueend \minted@highlight@i} @@ -1443,8 +1443,19 @@ \input{\minted@highlightfilepath}}% \minted@addcachefilename{\minted@highlightfilename}}% {\ifbool{minted@canexec}% - {\minted@iffasthighlightmode@buffertempfile - \minted@highlight@create}% + {\ifbool{minted@fasthighlightmode}% + {\ifcsname minted@processedfilename@\minted@highlightfilename\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\minted@insertplaceholder}% + {\expandafter\global\expandafter\let + \csname minted@processedfilename@\minted@highlightfilename\endcsname\relax + \minted@iffasthighlightmode@buffertempfile + \minted@highlight@create}}% + {\minted@iffasthighlightmode@buffertempfile + \minted@highlight@create}}% {\minted@error{Cannot highlight code (minted executable is unavailable or disabled); attempting to typeset without highlighting}% \minted@highlight@fallback}}}% @@ -1603,12 +1614,12 @@ \def\minted@iffasthighlightmode@buffertempfile@v{% \pydatabufferkey{code}% \pydatabuffermlvaluestart - \setcounter{minted@tmpcnt}{1}% - \loop\unless\ifnum\value{minted@tmpcnt}>\minted@tmpcodebufferlength\relax + \gdef\minted@tempindex{1}% + \loop\unless\ifnum\minted@tempindex>\minted@tmpcodebufferlength\relax \expandafter\let\expandafter - \minted@tmp\csname minted@tmpcodebufferline\arabic{minted@tmpcnt}\endcsname + \minted@tmp\csname minted@tmpcodebufferline\minted@tempindex\endcsname \expandafter\pydatabuffermlvalueline\expandafter{\minted@tmp}% - \stepcounter{minted@tmpcnt}% + \xdef\minted@tempindex{\the\numexpr\minted@tempindex+1\relax}% \repeat \pydatabuffermlvalueend \VerbatimClearBuffer[buffername=minted@tmpcodebuffer]} |