From de0fb15550a55ba5685a755fec7326e21a79fccd Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 13 Sep 2023 03:01:35 +0000 Subject: CTAN sync 202309130301 --- macros/latex/contrib/hyperxmp/hyperxmp.dtx | 40 ++++- macros/latex/contrib/hyperxmp/hyperxmp.pdf | Bin 1272020 -> 1289541 bytes macros/latex/contrib/minted/DEPENDS.txt | 15 ++ macros/latex/contrib/minted/minted.dtx | 183 ++++++++++++++------- macros/latex/contrib/minted/minted.pdf | Bin 859601 -> 871382 bytes macros/latex/contrib/mitthesis/MIT-Thesis.pdf | Bin 514295 -> 491030 bytes .../mitthesis/MIT-thesis-template/MIT-Thesis.tex | 4 +- .../fontsets/mitthesis-defaultfonts.tex | 3 +- .../fontsets/mitthesis-fira-newtxsf.tex | 4 +- .../fontsets/mitthesis-heros-stix2.tex | 2 +- .../fontsets/mitthesis-libertine.tex | 5 +- .../fontsets/mitthesis-lucida.tex | 2 +- .../fontsets/mitthesis-newtx-sans-text.tex | 2 +- .../fontsets/mitthesis-newtx.tex | 2 +- .../fontsets/mitthesis-stix2.tex | 2 +- .../fontsets/mitthesis-termes-stix2.tex | 2 +- .../fontsets/mitthesis-termes.tex | 2 +- .../mitthesis/MIT-thesis-template/mydesign.tex | 2 +- macros/latex/contrib/mitthesis/README.md | 10 +- .../mitthesis/mitthesis-doc/mitthesis-doc.pdf | Bin 92436 -> 92640 bytes .../mitthesis/mitthesis-doc/mitthesis-doc.tex | 25 +-- macros/latex/contrib/mitthesis/mitthesis.cls | 25 +-- macros/latex/contrib/se2thesis/CHANGELOG.md | 14 ++ macros/latex/contrib/se2thesis/README.md | 9 + macros/latex/contrib/se2thesis/se2colors.dtx | 6 +- macros/latex/contrib/se2thesis/se2fonts.dtx | 38 ++--- macros/latex/contrib/se2thesis/se2packages.dtx | 7 +- .../se2thesis/se2thesis-master-thesis-example.pdf | Bin 1101766 -> 1101796 bytes macros/latex/contrib/se2thesis/se2thesis.dtx | 44 ++--- macros/latex/contrib/se2thesis/se2thesis.pdf | Bin 383798 -> 328749 bytes macros/latex/contrib/se2thesis/se2thesis.tex | 9 +- macros/latex/required/babel/base/README.md | 24 +-- macros/latex/required/babel/base/babel-code.pdf | Bin 632983 -> 634915 bytes macros/latex/required/babel/base/babel.dtx | 78 +++++++-- macros/latex/required/babel/base/babel.ins | 2 +- macros/latex/required/babel/base/babel.pdf | Bin 406368 -> 407370 bytes macros/latex/required/babel/base/bbcompat.dtx | 2 +- 37 files changed, 354 insertions(+), 209 deletions(-) create mode 100644 macros/latex/contrib/minted/DEPENDS.txt (limited to 'macros/latex') diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.dtx b/macros/latex/contrib/hyperxmp/hyperxmp.dtx index ea0d533429..9be837cf2a 100644 --- a/macros/latex/contrib/hyperxmp/hyperxmp.dtx +++ b/macros/latex/contrib/hyperxmp/hyperxmp.dtx @@ -22,7 +22,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{hyperxmp} %<*package> - [2022/10/16 v5.11 Store hyperref metadata in XMP format] + [2023/09/10 v5.12 Store hyperref metadata in XMP format] % % %<*driver> @@ -131,7 +131,7 @@ % % \fi % -% \CheckSum{2844} +% \CheckSum{2848} % % \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 @@ -653,10 +653,10 @@ % \pkgname{hyperxmp} works by postprocessing some of the package options % honored by \pkgname{hyperref}. To use \pkgname{hyperxmp}, merely put % a |\usepackage{hyperxmp}| in your document's preamble. That line can -% appear anywhere before the \pkgname{hyperref} \acro{PDF} options are -% specified (i.e.,~with either |\usepackage[|\dots|]{hyperref}| or -% |\hypersetup{|\dots|}|). \pkgname{hyperxmp} will construct its -% \acro{XMP} data using the following \pkgname{hyperref} options: +% appear anywhere \emph{after} the |\usepackage{hyperref}| but +% \emph{before} \pkgname{hyperref}'s \acro{PDF} options are specified +% with |\hypersetup|. \pkgname{hyperxmp} will construct its \acro{XMP} +% data using the following \pkgname{hyperref} options: % % \begin{multicols}{3} % \raggedcolumns @@ -1060,8 +1060,8 @@ % \begin{verbatim} % \documentclass{article} % \usepackage[utf8]{inputenc} -% \usepackage{hyperxmp} % \usepackage[unicode]{hyperref} +% \usepackage{hyperxmp} % % \title{% % On a heuristic viewpoint concerning the production and @@ -2641,6 +2641,32 @@ sub mycmd { % same thing. This is required in case \pkgname{hyperref} is loaded % before \pkgname{hyperxmp}. % +% \changes{v5.12}{2023/09/10}{Require that \pkgname{hyperref} be loaded +% before \pkgname{hyperxmp}} +% \begin{center} +% \fbox{% +% \begin{minipage}{0.75\linewidth} +% \paragraph{New in v5.12} +% \pkgname{hyperref} must be loaded \emph{before} \pkgname{hyperxmp}. +% This is because recent changes in \pkgname{hyperref} and the +% \LaTeX\ kernel prevent \pkgname{hyperxmp} from hooking into +% \pkgname{hyperref}'s internals if \pkgname{hyperref} is loaded +% first. +% \end{minipage}% +% } +% \end{center} +% +% \begin{macrocode} +\@ifpackageloaded{hyperref}{% +}{% + \PackageError{hyperxmp}% + {hyperref must be loaded before hyperxmp}% + {Recent versions of hyperref and the LaTeX kernel inhibit\MessageBreak + hyperxmp's ability to hook into hyperref's internals unless\MessageBreak + hyperref is loaded first.} +} +% \end{macrocode} +% % \begin{macro}{\hyxmp@pdfauthor} % \begin{macro}{\hyxmp@pdfkeywords} % Prepare to store the name of the author and a list of keywords. diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.pdf b/macros/latex/contrib/hyperxmp/hyperxmp.pdf index 2374394e6b..2664608ae6 100644 Binary files a/macros/latex/contrib/hyperxmp/hyperxmp.pdf and b/macros/latex/contrib/hyperxmp/hyperxmp.pdf differ diff --git a/macros/latex/contrib/minted/DEPENDS.txt b/macros/latex/contrib/minted/DEPENDS.txt new file mode 100644 index 0000000000..5c39ebf2e9 --- /dev/null +++ b/macros/latex/contrib/minted/DEPENDS.txt @@ -0,0 +1,15 @@ +catchfile +etoolbox +float +framed +fvextra +ifplatform +ifthen +keyval +kvoptions +lineno +newfloat +pdftexcmds +shellesc +xcolor +xstring diff --git a/macros/latex/contrib/minted/minted.dtx b/macros/latex/contrib/minted/minted.dtx index 6ff75d9069..b326c9baee 100644 --- a/macros/latex/contrib/minted/minted.dtx +++ b/macros/latex/contrib/minted/minted.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2013-2022 by Geoffrey M. Poore +% Copyright (C) 2013-2023 by Geoffrey M. Poore % Copyright (C) 2010-2011 by Konrad Rudolph % --------------------------------------------------------------------------- % This work may be distributed and/or modified under the @@ -31,7 +31,7 @@ %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{minted} %<*package> - [2022/12/12 v2.7 Yet another Pygments shim for LaTeX] + [2023/09/12 v2.8 Yet another Pygments shim for LaTeX] % %<*driver> \documentclass{ltxdoc} @@ -50,6 +50,7 @@ \usepackage{textcomp} \usepackage[cache, langlinenos]{minted} +\usepackage{calc} \usepackage{environ} \usepackage{graphicx} \usepackage{multicol} @@ -208,7 +209,7 @@ % % \fi % -% \CheckSum{2548} +% \CheckSum{2565} % % \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 @@ -229,6 +230,19 @@ % % % +% \begin{changelog}{v2.8}{2023/09/12} +% \item Under non-Windows operating systems, detect executables with \Verb{command -v} rather than \Verb{which} to provide better cross-platform support (\#345). +% \item Added new package option \Verb{inputlanglinenos}. This extends the existing \Verb{langlinenos} to cover \Verb{\inputminted} as well (\#361). +% \item Improved and updated Pygments documentation (\#339). +% \item Improved \Verb{\mintinline} documentation to address packages that redefine \Verb{\section} (\#368). +% \item Added support for \texpkg{fvextra} options \texttt{breakafterinrun} and \texttt{breakbeforeinrun} (\#358). In \texpkg{fvextra} version 1.5, \texttt{breakaftergroup} and \texttt{breakbeforegroup} were renamed to \texttt{breakafterinrun} and \texttt{breakbeforeinrun} to avoid naming ambiguity with new options. The old options \texttt{breakaftergroup} and \texttt{breakbeforegroup} are no longer supported. +% \item Added \texttt{DEPENDS.txt} (\#331). +% \item Removed unnecessary dependency on \texpkg{calc} package (\#313). +% \item Added documentation in FAQ about copy and paste limitations (\#302). +% \item Added note on \texttt{text} lexer to documentation (\#274). +% \end{changelog} +% +% % \begin{changelog}{v2.7}{2022/12/12} % \item Reimplemented \texttt{\string\mintinline} to use \texttt{fvextra}'s argument reading and processing macros, and to use \texttt{fvextra}'s \texttt{\string\Verb} internally. \texttt{\string\mintinline} now works with all line breaking options supported by \texttt{fvextra}'s \texttt{\string\Verb}, including \texttt{breakanywhere} (\#329, \#340). It now gives better results when used inside other commands, since it uses \texttt{fvextra}'s retokenization macros. It is now compatible with \texttt{hyperref} for PDF strings such as bookmarks. % \item Reimplemented \texttt{\string\newmintinline} based on new \texttt{\string\mintinline}. @@ -463,9 +477,12 @@ % \noindent\texpkg{minted} is a package that facilitates expressive syntax highlighting % using the powerful \app{Pygments} library. The package also provides options to % customize the highlighted source code output. +% +% \vspace{0.5in} +% \noindent\textbf{Development status:} \pkg{minted} version 3.0 is now under development, thanks to a \href{https://tug.org/tc/devfund/grants.html}{\TeX\ Development Fund grant} from the \href{https://tug.org/}{\TeX\ Users Group}. This will bring a new Python executable that replaces |pygmentize|. The new executable will be compatible with restricted shell escape, so no more |-shell-escape| with associated security vulnerabilities. The new executable will also make it possible to extend \pkg{minted} using Python, not just \LaTeX\ macros. This will bring official support for custom lexers, allow including snippets of external files based on regular expressions, and make possible a number of other improvements and bugfixes. For compatibility purposes, the final version of \pkg{minted} v2.x will be released as the compatibility package \pkg{minted2}. Initial beta versions of minted v3.0 are expected by early 2024. A final minted v3.x release including all planned features is expected before the end of summer 2024. % \end{abstract} % -% \vspace{2in} +% \vspace{0.5in} % % \subsection*{License} % \href{http://www.latex-project.org/lppl.txt}{LaTeX Project Public License (LPPL)} version 1.3. @@ -684,6 +701,8 @@ % Optionally, the environment accepts a number of options in |key=value| notation, which are described % in more detail below. % +% To use \texpkg{minted} with a language that is not supported by Pygments, or simply to disable highlighting, set the language to |text|: |\begin{minted}{text}|. +% % % \DescribeMacro{\mint} % For a single line of source code, you can alternatively use a shorthand notation: @@ -711,7 +730,9 @@ % % The syntax is \cmd\mintinline\oarg{options}\marg{language}\meta{delim}\meta{code}\meta{delim}. The delimiters can be a single repeated character, just like for \cmd{\verb}. They can also be a pair of curly braces, |{}|. Curly braces are required when \cmd{\mintinline} is used in a movable argument, such as in a \cmd{\section}. % -% \cmd{\mintinline} has been carefully crafted so that in most cases it will function correctly when used inside other commands. The main exception is when the code contains the percent \texttt{\%} or hash \texttt{\#} characters, or unmatched curly braces. For example, \cmd{\mintinline} works in \cmd{\footnote} and \cmd{\section}! The code typesetting for \cmd{\mintinline} is based on \texpkg{fvextra}'s \cmd{\Verb}. See the \href{https://github.com/gpoore/fvextra/}{\texpkg{fvextra} documentation on \cmd{\Verb}} for details about functionality and limitations. +% Unlike \cmd{\verb}, \cmd{\mintinline} can usually be used inside other commands. The main exception is when the code contains the percent \texttt{\%} or hash \texttt{\#} characters, or unmatched curly braces. For example, \cmd{\mintinline} typically works in \cmd{\footnote} and \cmd{\section}! Note that some document classes or packages, such as \texpkg{memoir}, redefine \cmd{\section} or have options that modify it in ways that are incompatible with \cmd{\mintinline}. If you use \cmd{\mintinline} inside \cmd{\section} or otherwise in a movable argument, you should experiment to make sure it is compatible with your document configuration. You may also want to consider \texpkg{fvextra}'s \cmd{\Verb} or \cmd{\EscVerb} as an alternative. +% +% The code typesetting for \cmd{\mintinline} is based on \texpkg{fvextra}'s \cmd{\Verb}. See the \href{https://github.com/gpoore/fvextra/}{\texpkg{fvextra} documentation on \cmd{\Verb}} for additional details about functionality and limitations. % % \DescribeMacro{\inputminted} % Finally, there's the |\inputminted| command to read and format whole files. @@ -729,7 +750,7 @@ % % The full syntax is \cmd\usemintedstyle\oarg{language}\marg{style}. The style may be set for the document as a whole (no language specified), or only for a particular language. Note that the style may also be set via \cmd\setminted\ and via the optional argument for each command and environment.\footnote{Version 2.0 added the optional language argument and removed the restriction that the command be used in the preamble.} % -% To get a list of all available stylesheets, see the online demo at the \href{http://pygments.org/demo/}{Pygments website} or execute the following command on the command line: +% Highlighting styles with examples can be viewed online at \href{https://pygments.org/styles/}{pygments.org/styles}. It is possible to preview your code with different styles using the online demo at \href{http://pygments.org/demo/}{pygments.org/demo}. Available styles can also be listed by executing the following command on the command line: % % \begin{Verbatim}[gobble=3,commandchars=\\\{\}] % \$ pygmentize -L styles @@ -742,7 +763,7 @@ % % \subsection{Supported languages} % -% \app{Pygments} supports over 300 different programming languages, template languages, and other markup languages. To see an exhaustive list of the currently supported languages, use the command +% \app{Pygments} supports hundreds of different programming languages, template languages, and other markup languages. To see an exhaustive list of the currently supported languages, use the command % % \begin{Verbatim}[gobble=3,commandchars=\\\{\}] % \$ pygmentize -L lexers @@ -889,6 +910,12 @@ % This is the opposite of |draft|; it is equivalent to |draft=false|. Again, note that |draft| and |final| settings are typically inherited from the document class. % % +% \DescribeMacro{inputlanglinenos=\meta{boolean} (default:~false)} +% This enables |langlinenos| and causes it to apply to |\inputminted| (and custom commands based on it) in addition to |minted| environments and |\mint| commands (and custom environments/commands based on them). +% +% The regular |langlinenos| option treats all code within a document's |.tex| files as having one set of line numbering per language, and then treats each inputted source file as having its own separate numbering. |inputlanglinenos| defines a single numbering per language, regardless of where code originates. +% +% % \DescribeMacro{kpsewhich=\meta{boolean} (default:~false)} % This option uses |kpsewhich| to locate files that are to be highlighted. Some build tools such as |texi2pdf| function by modifying |TEXINPUTS|; in some cases, users may customize |TEXINPUTS| as well. The |kpsewhich| option allows \texpkg{minted} to work with such configurations. % @@ -898,6 +925,8 @@ % % % \DescribeMacro{langlinenos=\meta{boolean} (default:~false)} +% This allows all |minted| environments and |\mint| commands (and custom environments/commands based on them) for a given language to share line numbering when |firstnumber=last|, so that each subsequent command/environment has line numbering that continues from the previous one. This does not apply to |\inputminted| (and custom commands based on it); see the package option |inputlanglinenos| for that. +% % \texpkg{minted} uses the \texpkg{fancyvrb} package behind the scenes for the code typesetting. \texpkg{fancyvrb} provides an option |firstnumber| that allows the starting line number of an environment to be specified. For convenience, there is an option |firstnumber=last| that allows line numbering to pick up where it left off. The |langlinenos| option makes |firstnumber| work for each language individually with all |minted| and |\mint| usages. For example, consider the code and output below. % % \begin{VerbatimOut}[gobble=1]{minted.doc.out} @@ -1033,12 +1062,55 @@ % Give the |<| and |>| characters their normal text meanings when used with |escapeinside| and |texcomments|, so that \texpkg{beamer} overlays of the form |\only<1>{...}| will work. % % +% \item[bgcolor (string) (\meta{none})] +% Background color of the listing. Be aware that this option has several limitations (described below); see ``Framing alternatives'' below for more powerful alternatives. +% +% The value of this option must \emph{not} be a color command. Instead, it must be a color \emph{name}, given as a string, of a previously-defined color: +% +% \begin{example} +% \definecolor{bg}{rgb}{0.95,0.95,0.95} +% \begin{minted}[bgcolor=bg]{php} +% +% \end{minted} +% \end{example} +% +% This option puts \texttt{minted} environments and \texttt{\string\mint} commands in a \texttt{snugshade*} environment from the \texpkg{framed} package, which supports breaks across pages. (Prior to \texpkg{minted} 2.2, a \texttt{minipage} was used, which prevented page breaks and gave undesirable spacing from surrounding text.) Be aware that if \texttt{bgcolor} is used with \texttt{breaklines=true}, and a line break occurs just before a page break, then text may extend below the colored background in some instances. It is best to use a more advanced framing package in those cases; see ``Framing alternatives'' below. +% +% This option puts \texttt{\string\mintinline} inside a \texttt{\string\colorbox}, which \textbf{does not allow line breaks}. If you want to use \texttt{\string\setminted} to set background colors, and only want background colors on \texttt{minted} and \texttt{\string\mint}, you may use \texttt{\string\setmintedinline\{bgcolor=\{\}\}} to turn off the coloring for inline commands. +% +% ~ +% +% \textbf{Framing alternatives} +% +% If you want more reliable and advanced options for background colors and framing, you should consider a more advanced framing package such as \texpkg{mdframed} or \texpkg{tcolorbox}. It is easy to add framing to \texpkg{minted} commands and environments using the \texpkg{etoolbox} package, which is automatically loaded by \texpkg{minted}. For example, using \texpkg{mdframed}: +%\begin{Verbatim} +%\BeforeBeginEnvironment{minted}{\begin{mdframed}} +%\AfterEndEnvironment{minted}{\end{mdframed}} +%\end{Verbatim} +% Some framing packages also provide built-in commands for such purposes. For example, \texpkg{mdframed} provides a \texttt{\string\surroundwithmdframed} command, which could be used to add a frame to all \texttt{minted} environments: +%\begin{Verbatim} +%\surroundwithmdframed{minted} +%\end{Verbatim} +% \texpkg{tcolorbox} even provides a built-in framing environment with \texpkg{minted} support. Simply use \texttt{\string\tcbuselibrary\{minted\}} in the preamble, and then put code within a \texttt{tcblisting} environment: +%\begin{Verbatim} +%\begin{tcblisting}{, +% minted language=, +% minted style=