summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/minted
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-11-12 03:03:06 +0000
committerNorbert Preining <norbert@preining.info>2024-11-12 03:03:06 +0000
commitd63a87aba38d505e5b1322a0fd3b93549e7cb203 (patch)
treecf5b9fc56c791a7623d3c9dc9139fd00c066df0e /macros/latex/contrib/minted
parenta1ce7e07933cf42e71b2860e4cc32812f372686c (diff)
CTAN sync 202411120303
Diffstat (limited to 'macros/latex/contrib/minted')
-rw-r--r--macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md17
-rw-r--r--macros/latex/contrib/minted/minted.dtx38
-rw-r--r--macros/latex/contrib/minted/minted.pdfbin508855 -> 509330 bytes
3 files changed, 48 insertions, 7 deletions
diff --git a/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md b/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
index 1027d1ae5d..1c0f368754 100644
--- a/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
+++ b/macros/latex/contrib/minted/CHANGELOG_MINTED_LATEX_PACKAGE.md
@@ -1,6 +1,23 @@
# Changelog — minted LaTeX package
+## v3.3.0 (2024/11/10)
+
+* Fixed a bug from v3.2.0 that caused errors with unrestricted shell escape
+ (#420).
+
+* Improved error messages mention the possibility of MiKTeX being used with
+ `-aux-directory` or `-output-directory` without setting a
+ `TEXMF_OUTPUT_DIRECTORY` environment variable (#419).
+
+* Updated documentation on shell escape for TeX Live. The `latexminted`
+ executable has been added to TeX Live's list of trusted executables, so
+ `-shell-escape` is no longer required.
+
+* Added support for `fancyvrb` options `reflabel` and `vspace` (#421).
+
+
+
## v3.2.0 (2024/10/29)
* Fixed compatibility with `\includeonly` by replacing buffer length counters
diff --git a/macros/latex/contrib/minted/minted.dtx b/macros/latex/contrib/minted/minted.dtx
index 32091634ed..5125434020 100644
--- a/macros/latex/contrib/minted/minted.dtx
+++ b/macros/latex/contrib/minted/minted.dtx
@@ -27,7 +27,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{minted}
%<*package>
- [2024/10/29 v3.2.0 Yet another Pygments shim for LaTeX]
+ [2024/11/10 v3.3.0 Yet another Pygments shim for LaTeX]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -463,9 +463,9 @@
%
% The \mintedpkg\ package operates by passing code to the |latexminted| Python executable, which performs syntax highlighting and then returns the highlighted code in \LaTeX\ format.
%
-% Currently, |latexminted| requires special permission to run. \LaTeX\ must be called with the |-shell-escape| option (TeX Live) or the |-enable-write18| option (MiKTeX). Note that using |-shell-escape| or |-enable-write18| allows \LaTeX\ to run potentially arbitrary commands on your system. These should only be used when necessary, with documents from trusted sources.
+% |latexminted| is designed to be compatible with the security requirements for restricted shell escape. For up-to-date installations of TeX Live 2024+, the |-shell-escape| option is no longer required. The |latexminted| Python executable has been added to TeX Live's list of trusted executables.
%
-% |latexminted| is designed to be compatible with the security requirements for restricted shell escape. Once |latexminted| finishes the security review for restricted shell escape executables, it will function automatically without |-shell-escape| or |-enable-write18|, so long as the default restricted shell escape has not been disabled. It is possible to benefit from these enhanced security capabilities immediately and avoid the need for |-shell-escape| or |-enable-write18| by manually designating |latexminted| as a trusted executable.
+% For versions of TeX Live before 2024 and for MiKTeX, |latexminted| requires special permission to run. This can be accomplished by running \LaTeX\ with the |-shell-escape| option (TeX Live) or the |-enable-write18| option (MiKTeX). Note that using |-shell-escape| or |-enable-write18| allows \LaTeX\ to run potentially arbitrary commands on your system. These should only be used when necessary, with documents from trusted sources. An alternative is to manually designate |latexminted| as a trusted executable.
% \begin{itemize}
% \item TeX Live: Copy the variable |shell_escape_commands| from the distribution |texmf.cnf| (something like |<texlive>/<yr>/texmf-dist/web2c/texmf.cnf|) into the user |texmf.cnf| (something like |<texlive>/<yr>/texmf.cnf|), and then add |latexminted| to the |shell_escape_commands| list. The location of the |texmf.cnf| files can be determined by running |kpsewhich -all texmf.cnf|. Note that under Windows, this only works when |latexminted| is installed within a TeX Live installation; it is not compatible with |latexminted| being installed in a Python installation.
% \item MiKTeX: Add a line |AllowedShellCommands[] = latexminted| to the existing list of allowed commands in |miktex.ini|. You may want to modify the user-scoped configuration instead of the system-wide configuration. See the \href{https://docs.miktex.org/manual/miktex.ini.html}{MiKTeX documentation} for more details, particularly |initexmf --edit-config-file| and |initexmf --set-config-value|.
@@ -1412,6 +1412,10 @@
% If line numbers are displayed, they are based on the range of code that is selected; code that is discarded in selecting the range is not considered in calculating line numbers.
%
%
+% \item[reflabel (string) (\meta{none})]
+% \texpkg{fancyvrb} option for creating a label that can be used with |\pageref|.
+%
+%
% \item[resetmargins (boolean) (false)]
% Resets the left margin inside other environments.
% \item[rulecolor (color command) (black)]
@@ -1475,6 +1479,12 @@
% \item[texcl (boolean) (false)]
% Enables \LaTeX{} code inside comments.
% Usage as in package \texpkg{listings}. See the note under \texttt{escapeinside} regarding math and ligatures.
+%
+%
+% \item[vspace (dimension) (\string\topsep)]
+% \texpkg{fancyvrb} option for setting the value of the usual vertical list space.
+%
+%
% \item[texcomments (boolean) (false)]
% Enables \LaTeX{} code inside comments. The newer name for |texcl|. See the note under |escapeinside| regarding math and ligatures.
%
@@ -2569,20 +2579,32 @@
\def\minted@detectconfig@noexecutableorerrlog{%
\global\boolfalse{minted@canexec}%
\ifnum\csname c_sys_shell_escape_int\endcsname=1\relax
- \expandafter\@firstofttwo
+ \expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{\IfFileExists{\MintedErrlogFilename}%
- {\minted@error{minted v3+ executable is not installed or is not added to PATH,
+ {\minted@error{minted v3+ executable is not installed or is not added to PATH;
+ or MiKTeX is being used with \detokenize{-aux-directory} or
+ \detokenize{-output-directory} without setting a
+ \detokenize{TEXMF_OUTPUT_DIRECTORY} environment variable;
or there was an unexpected error (check "\MintedErrlogFilename")}}%
- {\minted@error{minted v3+ executable is not installed or is not added to PATH}}}%
+ {\minted@error{minted v3+ executable is not installed or is not added to PATH;
+ or MiKTeX is being used with \detokenize{-aux-directory} or
+ \detokenize{-output-directory} without setting a
+ \detokenize{TEXMF_OUTPUT_DIRECTORY} environment variable}}}%
{\IfFileExists{\MintedErrlogFilename}%
{\minted@error{minted v3+ executable is not installed, is not added to PATH,
or is not permitted with restricted shell escape;
+ or MiKTeX is being used with \detokenize{-aux-directory} or
+ \detokenize{-output-directory} without setting a
+ \detokenize{TEXMF_OUTPUT_DIRECTORY} environment variable;
or there was an unexpected error (check "\MintedErrlogFilename")}}%
{\minted@error{minted v3+ executable is not installed, is not added to PATH,
- or is not permitted with restricted shell escape}}}}
+ or is not permitted with restricted shell escape;
+ or MiKTeX is being used with \detokenize{-aux-directory} or
+ \detokenize{-output-directory} without setting a
+ \detokenize{TEXMF_OUTPUT_DIRECTORY} environment variable}}}}
\def\minted@detectconfig@ii{%
\ifx\minted@timestamp\minted@config@timestamp
\expandafter\minted@detectconfig@iii
@@ -3166,6 +3188,7 @@
numbers,
numbersep,
obeytabs,
+ reflabel,
resetmargins,
rulecolor,
samepage,
@@ -3179,6 +3202,7 @@
tab,
tabcolor=black,
tabsize,
+ vspace,
xleftmargin,
xrightmargin,
}
diff --git a/macros/latex/contrib/minted/minted.pdf b/macros/latex/contrib/minted/minted.pdf
index 0fc12e6135..a7d07260b8 100644
--- a/macros/latex/contrib/minted/minted.pdf
+++ b/macros/latex/contrib/minted/minted.pdf
Binary files differ