From 75ba721d706ce924641fd8f7715a83809b757812 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 21 Jul 2016 21:18:02 +0000 Subject: minted (21jul16) git-svn-id: svn://tug.org/texlive/trunk@41745 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/minted/minted.dtx | 199 +++-------------------- 1 file changed, 20 insertions(+), 179 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/minted/minted.dtx b/Master/texmf-dist/source/latex/minted/minted.dtx index a98819a41d9..df47ea191cc 100644 --- a/Master/texmf-dist/source/latex/minted/minted.dtx +++ b/Master/texmf-dist/source/latex/minted/minted.dtx @@ -31,7 +31,7 @@ %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{minted} %<*package> - [2016/07/14 v2.3 Yet another Pygments shim for LaTeX] + [2016/07/20 v2.4 Yet another Pygments shim for LaTeX] % %<*driver> \documentclass{ltxdoc} @@ -195,7 +195,7 @@ % % \fi % -% \CheckSum{2928} +% \CheckSum{2542} % % \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 @@ -216,6 +216,12 @@ % % % +% \begin{changelog}{v2.4}{2016/07/20} +% \item Line breaking and all associated options are now completely delegated to \texttt{fvextra}. +% \item Fixed a bug from v2.2 that could cause the first command or environment to vanish when \texttt{caching=false} (related to work on \texttt{\string\MintedPygmentize}). +% \end{changelog} +% +% % \begin{changelog}{v2.3}{2016/07/14} % \item The \texttt{fvextra} package is now required. \texttt{fvextra} extends and patches \texttt{fancyvrb}, and includes improved versions of \texttt{fancyvrb} extensions that were formerly in \texttt{minted}. % \item As part of \texttt{fvextra}, the \texttt{upquote} package is always loaded. \texttt{fvextra} brings the new option \texttt{curlyquotes}, which allows curly single quotation marks instead of the literal backtick and typewriter single quotation mark produced by \texttt{upquote}. This allows the default \texttt{upquote} behavior to be disabled when desired. @@ -2568,8 +2574,9 @@ \minted@def@optfv@switch{samepage} \minted@def@optfv@switch{showtabs} \minted@def@optfv@switch{obeytabs} -% The following are patches currently added onto fancyvrb \minted@def@optfv@switch{breaklines} +\minted@def@optfv@switch{breakbytoken} +\minted@def@optfv@switch{breakbytokenanywhere} \minted@def@optfv{breakindent} \minted@def@optfv@switch{breakautoindent} \minted@def@optfv{breaksymbol} @@ -2596,12 +2603,6 @@ % % Finally, options specific to \pkg{minted}. % -% An option to force |breaklines| to work at the Pygments token level, rather than at the character level. This is useful in keeping things like strings from being split between lines. -% \begin{macrocode} -\minted@def@opt@switch{breakbytoken} -\minted@def@opt@switch{breakbytokenanywhere} -% \end{macrocode} -% % |bgcolor|. The original, |minipage|- and |\colorbox|-based solution was replaced with a |framed|-based solution in version 2.2. A dedicated framing package will often be preferable. % \begin{macrocode} \minted@def@opt{bgcolor} @@ -2740,8 +2741,11 @@ % % \textbf{This macro must always be checked carefully whenever it is modified.} Under no circumstances should |#1| be written to or opened by Python in write mode. When |\inputminted| is used, |#1| will be an external file that is brought in for highlighting, so it must be left intact. % +% At the very beginning, a check is performed to make sure that style macros exist. This must be done before the highlighted content is generated, so that temp file names can be shared without accidental overwriting. Styles are generated here, rather than when a style is set, so that creating the style macros is done as late as possible in case a custom |pygmentize| is in use via |\MintedPygmentize|. +% % \begin{macrocode} \newcommand{\minted@pygmentize}[2][\minted@outputdir\minted@jobname.pyg]{% + \minted@checkstyle{\minted@get@opt{style}{default}}% \stepcounter{minted@pygmentizecounter}% \ifthenelse{\equal{\minted@get@opt{autogobble}{false}}{true}}% {\def\minted@codefile{\minted@outputdir\minted@jobname.pyg}}% @@ -2895,193 +2899,30 @@ % \begin{macro}{\minted@inputpyg} % For increased clarity, the actual |\input| process is separated out into its own macro. % -% A check is performed to make sure that style macros exist. This is done here, rather than when a style is set, so that creating the style macros is done as late as possible in case a custom |pygmentize| is in use via |\MintedPygmentize|. At the last possible moment, |\PYG| is |\let| to |\PYG