texlive[41483] Master/texmf-dist: minted (16jun16)
commits+karl at tug.org
commits+karl at tug.org
Sat Jun 18 17:50:36 CEST 2016
Revision: 41483
http://tug.org/svn/texlive?view=revision&revision=41483
Author: karl
Date: 2016-06-18 17:50:36 +0200 (Sat, 18 Jun 2016)
Log Message:
-----------
minted (16jun16)
Modified Paths:
--------------
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
Modified: trunk/Master/texmf-dist/doc/latex/minted/minted.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/minted/minted.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/minted/minted.dtx 2016-06-18 15:50:23 UTC (rev 41482)
+++ trunk/Master/texmf-dist/source/latex/minted/minted.dtx 2016-06-18 15:50:36 UTC (rev 41483)
@@ -31,7 +31,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{minted}
%<*package>
- [2016/06/08 v2.2 Yet another Pygments shim for LaTeX]
+ [2016/06/15 v2.2.1 Yet another Pygments shim for LaTeX]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -170,7 +170,7 @@
%</driver>
% \fi
%
-% \CheckSum{3835}
+% \CheckSum{3853}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -191,12 +191,18 @@
%
%
%
+% \begin{changelog}{v2.2.1}{2016/06/15}
+% \item The \texttt{shellesc} package is loaded before \texttt{ifplatform} and other packages that might invoke \texttt{\string\write18} (\#112).
+% \item When caching is enabled, XeTeX uses the new \texttt{\string\mdfivesum} macro from TeX Live 2016 to hash cache content, rather than using \texttt{\string\ShellEscape} with Python to perform hashing.
+% \end{changelog}
+%
+%
% \begin{changelog}{v2.2}{2016/06/08}
% \item All uses of \texttt{\string\ShellEscape} (\texttt{\string\write18}) no longer wrap file names and paths with double quotes. This allows a cache directory to be specified relative to a user's home directory, for example, \texttt{\string~/minted\_cache}. \texttt{cachedir} and \texttt{outputdir} paths containing spaces will now require explicit quoting of the parts of the paths that contain spaces, since \texttt{minted} no longer supplies quoting. See the updated documentation for examples (\#89).
% \item Added \texttt{breakbefore}, \texttt{breakbeforegroup}, \texttt{breakbeforesymbolpre}, and \texttt{breakbeforesymbolpost}. These parallel \texttt{breakafter*}. It is possible to use \texttt{breakbefore} and \texttt{breakafter} for the same character, so long as \texttt{breakbeforegroup} and \texttt{breakaftergroup} have the same setting (\#117).
% \item Added package options \texttt{finalizecache} and \texttt{frozencache}. These allow the cache to be prepared for (\texttt{finalizecache}) and then used (\texttt{frozencache}) in an environment in which \texttt{-shell-escape}, Python, and/or Pygments are not available. Note that this only works if \texttt{minted} content does not need to be modified, and if no settings that depend on Pygments or Python need to be changed (\#113).
% \item Style names containing hyphens and underscores (\texttt{paraiso-light}, \texttt{paraiso-dark}, \texttt{algol\_nu}) now work (\#111).
-% \item The \texttt{shellesc} package is now loaded, when available, for compatibility with \texttt{luatex} 0.87+ (TeX Live 2016+, etc.). \texttt{\string\ShellEscape} is now used everywhere instead of \texttt{\string\immediate\string\write18}. If \texttt{shellesc} is not available, then a \texttt{\string\ShellEscape} macro is created. When \texttt{shellesc} is loaded, there is a check for versions before v0.01c to patch a bug in v0.01b (present in TeX Live 2015) (\#112).
+% \item The \texttt{shellesc} package is now loaded, when available, for compatibility with LuaTeX 0.87+ (TeX Live 2016+, etc.). \texttt{\string\ShellEscape} is now used everywhere instead of \texttt{\string\immediate\string\write18}. If \texttt{shellesc} is not available, then a \texttt{\string\ShellEscape} macro is created. When \texttt{shellesc} is loaded, there is a check for versions before v0.01c to patch a bug in v0.01b (present in TeX Live 2015) (\#112).
% \item The \texttt{bgcolor} option now uses the \texttt{snugshade*} environment from the \texttt{framed} package, so \texttt{bgcolor} is now compatible with page breaks. When \texttt{bgcolor} is in use, immediately preceding text will no longer push the \texttt{minted} environment into the margin, and there is now adequate spacing from surrounding text (\#121).
% \item Added missing support for \texttt{fancyvrb}'s \texttt{labelposition} (\#102).
% \item Improved fix for TikZ externalization, thanks to Patrick Vogt (\#73).
@@ -747,7 +753,7 @@
% \DescribeMacro{finalizecache=\meta{boolean} (default: false)}
% In some cases, it may be desirable to use \pkg{minted} in an environment in which |-shell-escape| is not allowed. A document might be submitted to a publisher or preprint server or used with an online service that does not support |-shell-escape|. This is possible as long as \pkg{minted} content does not need to be modified.
%
-% Compiling with the |finalizecache| option prepares the cache for use in an environment without |-shell-escape|.\footnote{Ordinarily, cache files are named using an MD5 hash of highlighting settings and highlighted text. \texttt{finalizecache} renames cache files using a \texttt{listing<number>.pygtex} scheme. This makes it simpler to match up document content and cache files, and is also necessary for the \texttt{XeTeX} engine since it lacks the built-in MD5 capabilities that \texttt{pdfTeX} and \texttt{LuaTeX} have.} Once this has been done, the |finalizecache| option may be swapped for the |frozencache| option, which will then use the frozen (static) cache in the future, without needing |-shell-escape|.
+% Compiling with the |finalizecache| option prepares the cache for use in an environment without |-shell-escape|.\footnote{Ordinarily, cache files are named using an MD5 hash of highlighting settings and highlighted text. \texttt{finalizecache} renames cache files using a \texttt{listing<number>.pygtex} scheme. This makes it simpler to match up document content and cache files, and is also necessary for the XeTeX engine since prior to TeX Live 2016 it lacked the built-in MD5 capabilities that pdfTeX and LuaTeX have.} Once this has been done, the |finalizecache| option may be swapped for the |frozencache| option, which will then use the frozen (static) cache in the future, without needing |-shell-escape|.
%
%
% \DescribeMacro{frozencache=\meta{boolean} (default: false)}
@@ -1432,7 +1438,7 @@
%
%
% \subsection{Required packages}
-% Load required packages. For compatibility reasons, most old functionality should be supported with the original set of packages. More recently added packages, such as |etoolbox| and |xstring|, should only be used for new features when possible.
+% Load required packages. For compatibility reasons, most old functionality should be supported with the original set of packages. More recently added packages, such as |etoolbox| and |xstring|, should only be used for new features when possible. |shellesc| must be loaded before any packages that invoke |\write18|, since it is possible that they haven't yet been patched to work with LuaTeX 0.87+.
% \begin{macrocode}
\RequirePackage{keyval}
\RequirePackage{kvoptions}
@@ -1440,6 +1446,12 @@
\RequirePackage{float}
\RequirePackage{ifthen}
\RequirePackage{calc}
+\IfFileExists{shellesc.sty}
+ {\RequirePackage{shellesc}
+ \@ifpackagelater{shellesc}{2016/04/29}
+ {}
+ {\protected\def\ShellEscape{\immediate\write18 }}}
+ {\protected\def\ShellEscape{\immediate\write18 }}
\RequirePackage{ifplatform}
\RequirePackage{pdftexcmds}
\RequirePackage{etoolbox}
@@ -1446,12 +1458,6 @@
\RequirePackage{xstring}
\RequirePackage{lineno}
\RequirePackage{framed}
-\IfFileExists{shellesc.sty}
- {\RequirePackage{shellesc}
- \@ifpackagelater{shellesc}{2016/04/29}
- {}
- {\protected\def\ShellEscape{\immediate\write18 }}}
- {\protected\def\ShellEscape{\immediate\write18 }}
% \end{macrocode}
%
% Make sure that either |color| or |xcolor| is loaded by the beginning of the document.
@@ -3505,34 +3511,42 @@
{\edef\minted at hash{\pdf at filemdfivesum{#1}%
\pdf at mdfivesum{\minted at cmd}}}%
\else
- \immediate\openout\minted at code\minted at jobname.mintedcmd\relax
- \immediate\write\minted at code{\minted at cmd}%
- \ifthenelse{\equal{\minted at get@opt{autogobble}{false}}{true}}%
- {\immediate\write\minted at code{autogobble}}{}%
- \immediate\closeout\minted at code
- \edef\minted at argone@esc{#1}%
- \StrSubstitute{\minted at argone@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at argone@esc]%
- \StrSubstitute{\minted at argone@esc}{"}{\@backslashchar"}[\minted at argone@esc]%
- \edef\minted at tmpfname@esc{\minted at outputdir\minted at jobname}%
- \StrSubstitute{\minted at tmpfname@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at tmpfname@esc]%
- \StrSubstitute{\minted at tmpfname@esc}{"}{\@backslashchar"}[\minted at tmpfname@esc]%
- %Cheating a little here by using ASCII codes to write `{` and `}`
- %in the Python code
- \def\minted at hashcmd{%
- \detokenize{python -c "import hashlib; import os;
- hasher = hashlib.sha1();
- f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedcmd\detokenize{\")), \"rb\");
- hasher.update(f.read());
- f.close();
- f = open(os.path.expanduser(os.path.expandvars(\"}\minted at argone@esc\detokenize{\")), \"rb\");
- hasher.update(f.read());
- f.close();
- f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedmd5\detokenize{\")), \"w\");
- macro = \"\\edef\\minted at hash\" + chr(123) + hasher.hexdigest() + chr(125) + \"\";
- f.write(\"\\makeatletter\" + macro + \"\\makeatother\\endinput\n\");
- f.close();"}}%
- \ShellEscape{\minted at hashcmd}%
- \minted at input{\minted at outputdir\minted at jobname.mintedmd5}%
+ \ifx\mdfivesum\minted at undefined
+ \immediate\openout\minted at code\minted at jobname.mintedcmd\relax
+ \immediate\write\minted at code{\minted at cmd}%
+ \ifthenelse{\equal{\minted at get@opt{autogobble}{false}}{true}}%
+ {\immediate\write\minted at code{autogobble}}{}%
+ \immediate\closeout\minted at code
+ \edef\minted at argone@esc{#1}%
+ \StrSubstitute{\minted at argone@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at argone@esc]%
+ \StrSubstitute{\minted at argone@esc}{"}{\@backslashchar"}[\minted at argone@esc]%
+ \edef\minted at tmpfname@esc{\minted at outputdir\minted at jobname}%
+ \StrSubstitute{\minted at tmpfname@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at tmpfname@esc]%
+ \StrSubstitute{\minted at tmpfname@esc}{"}{\@backslashchar"}[\minted at tmpfname@esc]%
+ %Cheating a little here by using ASCII codes to write `{` and `}`
+ %in the Python code
+ \def\minted at hashcmd{%
+ \detokenize{python -c "import hashlib; import os;
+ hasher = hashlib.sha1();
+ f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedcmd\detokenize{\")), \"rb\");
+ hasher.update(f.read());
+ f.close();
+ f = open(os.path.expanduser(os.path.expandvars(\"}\minted at argone@esc\detokenize{\")), \"rb\");
+ hasher.update(f.read());
+ f.close();
+ f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedmd5\detokenize{\")), \"w\");
+ macro = \"\\edef\\minted at hash\" + chr(123) + hasher.hexdigest() + chr(125) + \"\";
+ f.write(\"\\makeatletter\" + macro + \"\\makeatother\\endinput\n\");
+ f.close();"}}%
+ \ShellEscape{\minted at hashcmd}%
+ \minted at input{\minted at outputdir\minted at jobname.mintedmd5}%
+ \else
+ \ifthenelse{\equal{\minted at get@opt{autogobble}{false}}{true}}%
+ {\edef\minted at hash{\mdfivesum file {#1}%
+ \mdfivesum{\minted at cmd autogobble}}}%
+ {\edef\minted at hash{\mdfivesum file {#1}%
+ \mdfivesum{\minted at cmd}}}%
+ \fi
\fi
\edef\minted at infile{\minted at cachedir/\minted at hash.pygtex}%
\IfFileExists{\minted at infile}{}{%
Modified: trunk/Master/texmf-dist/tex/latex/minted/minted.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/minted/minted.sty 2016-06-18 15:50:23 UTC (rev 41482)
+++ trunk/Master/texmf-dist/tex/latex/minted/minted.sty 2016-06-18 15:50:36 UTC (rev 41483)
@@ -27,7 +27,7 @@
%% and the derived file minted.sty.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{minted}
- [2016/06/08 v2.2 Yet another Pygments shim for LaTeX]
+ [2016/06/15 v2.2.1 Yet another Pygments shim for LaTeX]
\RequirePackage{keyval}
\RequirePackage{kvoptions}
\RequirePackage{fancyvrb}
@@ -34,6 +34,12 @@
\RequirePackage{float}
\RequirePackage{ifthen}
\RequirePackage{calc}
+\IfFileExists{shellesc.sty}
+ {\RequirePackage{shellesc}
+ \@ifpackagelater{shellesc}{2016/04/29}
+ {}
+ {\protected\def\ShellEscape{\immediate\write18 }}}
+ {\protected\def\ShellEscape{\immediate\write18 }}
\RequirePackage{ifplatform}
\RequirePackage{pdftexcmds}
\RequirePackage{etoolbox}
@@ -40,12 +46,6 @@
\RequirePackage{xstring}
\RequirePackage{lineno}
\RequirePackage{framed}
-\IfFileExists{shellesc.sty}
- {\RequirePackage{shellesc}
- \@ifpackagelater{shellesc}{2016/04/29}
- {}
- {\protected\def\ShellEscape{\immediate\write18 }}}
- {\protected\def\ShellEscape{\immediate\write18 }}
\AtBeginDocument{%
\@ifpackageloaded{color}{}{%
\@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}}%
@@ -1217,34 +1217,42 @@
{\edef\minted at hash{\pdf at filemdfivesum{#1}%
\pdf at mdfivesum{\minted at cmd}}}%
\else
- \immediate\openout\minted at code\minted at jobname.mintedcmd\relax
- \immediate\write\minted at code{\minted at cmd}%
- \ifthenelse{\equal{\minted at get@opt{autogobble}{false}}{true}}%
- {\immediate\write\minted at code{autogobble}}{}%
- \immediate\closeout\minted at code
- \edef\minted at argone@esc{#1}%
- \StrSubstitute{\minted at argone@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at argone@esc]%
- \StrSubstitute{\minted at argone@esc}{"}{\@backslashchar"}[\minted at argone@esc]%
- \edef\minted at tmpfname@esc{\minted at outputdir\minted at jobname}%
- \StrSubstitute{\minted at tmpfname@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at tmpfname@esc]%
- \StrSubstitute{\minted at tmpfname@esc}{"}{\@backslashchar"}[\minted at tmpfname@esc]%
- %Cheating a little here by using ASCII codes to write `{` and `}`
- %in the Python code
- \def\minted at hashcmd{%
- \detokenize{python -c "import hashlib; import os;
- hasher = hashlib.sha1();
- f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedcmd\detokenize{\")), \"rb\");
- hasher.update(f.read());
- f.close();
- f = open(os.path.expanduser(os.path.expandvars(\"}\minted at argone@esc\detokenize{\")), \"rb\");
- hasher.update(f.read());
- f.close();
- f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedmd5\detokenize{\")), \"w\");
- macro = \"\\edef\\minted at hash\" + chr(123) + hasher.hexdigest() + chr(125) + \"\";
- f.write(\"\\makeatletter\" + macro + \"\\makeatother\\endinput\n\");
- f.close();"}}%
- \ShellEscape{\minted at hashcmd}%
- \minted at input{\minted at outputdir\minted at jobname.mintedmd5}%
+ \ifx\mdfivesum\minted at undefined
+ \immediate\openout\minted at code\minted at jobname.mintedcmd\relax
+ \immediate\write\minted at code{\minted at cmd}%
+ \ifthenelse{\equal{\minted at get@opt{autogobble}{false}}{true}}%
+ {\immediate\write\minted at code{autogobble}}{}%
+ \immediate\closeout\minted at code
+ \edef\minted at argone@esc{#1}%
+ \StrSubstitute{\minted at argone@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at argone@esc]%
+ \StrSubstitute{\minted at argone@esc}{"}{\@backslashchar"}[\minted at argone@esc]%
+ \edef\minted at tmpfname@esc{\minted at outputdir\minted at jobname}%
+ \StrSubstitute{\minted at tmpfname@esc}{\@backslashchar}{\@backslashchar\@backslashchar}[\minted at tmpfname@esc]%
+ \StrSubstitute{\minted at tmpfname@esc}{"}{\@backslashchar"}[\minted at tmpfname@esc]%
+ %Cheating a little here by using ASCII codes to write `{` and `}`
+ %in the Python code
+ \def\minted at hashcmd{%
+ \detokenize{python -c "import hashlib; import os;
+ hasher = hashlib.sha1();
+ f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedcmd\detokenize{\")), \"rb\");
+ hasher.update(f.read());
+ f.close();
+ f = open(os.path.expanduser(os.path.expandvars(\"}\minted at argone@esc\detokenize{\")), \"rb\");
+ hasher.update(f.read());
+ f.close();
+ f = open(os.path.expanduser(os.path.expandvars(\"}\minted at tmpfname@esc.mintedmd5\detokenize{\")), \"w\");
+ macro = \"\\edef\\minted at hash\" + chr(123) + hasher.hexdigest() + chr(125) + \"\";
+ f.write(\"\\makeatletter\" + macro + \"\\makeatother\\endinput\n\");
+ f.close();"}}%
+ \ShellEscape{\minted at hashcmd}%
+ \minted at input{\minted at outputdir\minted at jobname.mintedmd5}%
+ \else
+ \ifthenelse{\equal{\minted at get@opt{autogobble}{false}}{true}}%
+ {\edef\minted at hash{\mdfivesum file {#1}%
+ \mdfivesum{\minted at cmd autogobble}}}%
+ {\edef\minted at hash{\mdfivesum file {#1}%
+ \mdfivesum{\minted at cmd}}}%
+ \fi
\fi
\edef\minted at infile{\minted at cachedir/\minted at hash.pygtex}%
\IfFileExists{\minted at infile}{}{%
More information about the tex-live-commits
mailing list