From c1f0d03307650f7f9294d0733eacc3ed3dd2cc69 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 9 Oct 2020 20:20:05 +0000 Subject: latex (9oct20) git-svn-id: svn://tug.org/texlive/trunk@56606 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/base/ltclass.dtx | 30 +++++++- Master/texmf-dist/source/latex/base/ltfiles.dtx | 6 +- Master/texmf-dist/source/latex/base/ltfssini.dtx | 17 ++--- Master/texmf-dist/source/latex/base/lthooks.dtx | 93 +++++++++++++++++++++--- Master/texmf-dist/source/latex/base/ltvers.dtx | 2 +- Master/texmf-dist/source/latex/base/ltxdoc.dtx | 9 ++- 6 files changed, 130 insertions(+), 27 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/base/ltclass.dtx b/Master/texmf-dist/source/latex/base/ltclass.dtx index bc6500541e5..e771044e666 100644 --- a/Master/texmf-dist/source/latex/base/ltclass.dtx +++ b/Master/texmf-dist/source/latex/base/ltclass.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltclass.dtx} - [2020/10/01 v1.3r LaTeX Kernel (Class & Package Interface)] + [2020/10/08 v1.3s LaTeX Kernel (Class & Package Interface)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltclass.dtx} @@ -561,6 +561,7 @@ % |#4| Rest of the stack. % \changes{v1.3l}{2020/06/05}{Added \cs{@expl@push@filename@@} % and \cs{@expl@push@filename@aux@@}} +% \changes{v1.3s}{2020/10/08}{Added missing 2020/02/02 \cs{IncludeInRelease}} % \begin{macrocode} % %<*2ekernel|latexrelease> @@ -586,6 +587,27 @@ \@currnamestack}% \@expl@push@filename@aux@@} %\EndIncludeInRelease +% \end{macrocode} +% +% The following version of \cs{@pushfilename} didn't formally exist in +% this file, but in the 2020/02/02 release, \pkg{expl3} was preloaded +% and it patched \cs{@pushfilename} (and \cs{@popfilename}) by adding +% some hooks in there. But rolling back to 2020/02/02, \pkg{expl3} +% doesn't patch these macros again, so rolling back has to take those +% hooks into account. Same goes for \cs{@popfilename}. +% \begin{macrocode} +% +%\IncludeInRelease{2020/02/02}{\@pushfilename}% +% {Add \@expl@push@filename@@}% +%\def\@pushfilename{% +% \@expl@push@filename@@ +% \xdef\@currnamestack{% +% {\@currname}% +% {\@currext}% +% {\the\catcode`\@}% +% \@currnamestack}% +% \@expl@push@filename@aux@@} +%\EndIncludeInRelease % %\IncludeInRelease{0000/00/00}{\@pushfilename}% % {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% @@ -613,6 +635,12 @@ \@expl@pop@filename@@} %\EndIncludeInRelease % +%\IncludeInRelease{2020/02/02}{\@popfilename}% +% {Add \@expl@push@filename@@}% +%\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil +% \@expl@pop@filename@@} +%\EndIncludeInRelease +% %\IncludeInRelease{0000/00/00}{\@popfilename}% % {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% %\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil} diff --git a/Master/texmf-dist/source/latex/base/ltfiles.dtx b/Master/texmf-dist/source/latex/base/ltfiles.dtx index 835f600e323..99be77c8449 100644 --- a/Master/texmf-dist/source/latex/base/ltfiles.dtx +++ b/Master/texmf-dist/source/latex/base/ltfiles.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltfiles.dtx} - [2020/08/21 v1.2i LaTeX Kernel (File Handling)] + [2020/10/04 v1.2j LaTeX Kernel (File Handling)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltfiles.dtx} @@ -824,11 +824,13 @@ % {\@include}{Spaces in file names and hooks}% % \end{macrocode} % +% \changes{v1.2j}{2020/10/04}{Quotes around the aux file name removed, +% they are not needed and upset BibTeX (gh/400)} % \begin{macrocode} \def\@include#1 {% \clearpage \if@filesw - \immediate\write\@mainaux{\string\@input{"#1.aux"}}% + \immediate\write\@mainaux{\string\@input{#1.aux}}% \fi \@tempswatrue \if@partsw diff --git a/Master/texmf-dist/source/latex/base/ltfssini.dtx b/Master/texmf-dist/source/latex/base/ltfssini.dtx index 10f3dc5863b..fbea725c1df 100644 --- a/Master/texmf-dist/source/latex/base/ltfssini.dtx +++ b/Master/texmf-dist/source/latex/base/ltfssini.dtx @@ -36,7 +36,7 @@ % % \ProvidesFile{ltfssini.dtx} - [2020/09/30 v3.2d LaTeX Kernel (NFSS Initialisation)] + [2020/10/08 v3.2e LaTeX Kernel (NFSS Initialisation)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -1070,17 +1070,23 @@ % \begin{macro}{\@rmfamilyhook} % \begin{macro}{\@sffamilyhook} % \begin{macro}{\@ttfamilyhook} +% \begin{macro}{\@defaultfamilyhook} +% \changes{v3.1h}{2020/02/10}{Add \cs{@defaultfamilyhook} to \cs{normalfont} (gh/269)} % These four hooks have legacy versions used in 2020/02/02 so we % should support them until they aren't any longer used. +% +% By default the hooks do nothing. % \begin{macrocode} \let\@rmfamilyhook\@empty \let\@sffamilyhook\@empty \let\@ttfamilyhook\@empty -\let\@defaulfamilyhook\@empty +\let\@defaultfamilyhook\@empty %FMi sort out % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% % % \begin{macrocode} % @@ -1787,13 +1793,6 @@ % \end{macro} % % -% \begin{macro}{\@defaultfamilyhook} -% By default the hooks do nothing. -% \changes{v3.1h}{2020/02/10}{Add \cs{@defaultfamilyhook} to \cs{normalfont} (gh/269)} -% \begin{macrocode} -\let\@defaultfamilyhook\@empty %FMi sort out -% \end{macrocode} -% \end{macro} % % \begin{macrocode} % diff --git a/Master/texmf-dist/source/latex/base/lthooks.dtx b/Master/texmf-dist/source/latex/base/lthooks.dtx index cb48570a0d8..a5953cc25dd 100644 --- a/Master/texmf-dist/source/latex/base/lthooks.dtx +++ b/Master/texmf-dist/source/latex/base/lthooks.dtx @@ -31,8 +31,8 @@ %%% From File: lthooks.dtx % % \begin{macrocode} -\def\lthooksversion{v1.0b} -\def\lthooksdate{2020/09/21} +\def\lthooksversion{v1.0d} +\def\lthooksdate{2020/10/09} % \end{macrocode} % %<*driver> @@ -256,6 +256,11 @@ % is used in a package/class, then the current % package/class name is used, otherwise \hook{top-level} is used. % +% If the code for that \meta{label} wasn't yet added to the +% \meta{hook}, an order is set so that when some code attempts to add +% that label, the removal order takes action and the code is not +% added. +% % If the optional argument is \texttt{*}, then all code chunks are % removed. This is rather dangerous as it drops code from other % packages one may not know about! @@ -648,10 +653,72 @@ % % \cs{LogHook} prints the information to the |.log| file, and % \cs{ShowHook} prints them to the terminal/command window and starts -% \TeX's prompt (only if \cs{errorstopmode}) to wait for user action. +% \TeX's prompt (only in \cs{errorstopmode}) to wait for user action. % % The \meta{hook} can be specified using the dot-syntax to denote % the current package name. See section~\ref{sec:default-label}. +% +%^^A % Code for the listing below: +%^^A \NewHook{example-hook} +%^^A \AddToHook{example-hook}[foo]{[code from package 'foo']} +%^^A \AddToHook{example-hook}[bar]{[from package 'bar']} +%^^A \AddToHook{example-hook}[baz]{[package 'baz' is here]} +%^^A \AddToHookNext{example-hook}{[one-time code]} +%^^A \DeclareHookRule{example-hook}{baz}{before}{foo} +%^^A \DeclareDefaultHookRule{bar}{after}{baz} +%^^A \ShowHook{example-hook} +% +% \def\theFancyVerbLine{\textcolor[gray]{0.5}{%^^A +% \sffamily\tiny\arabic{FancyVerbLine}}} +% +% \bigskip +% Suppose a hook \texttt{example-hook} whose output of +% \cs{ShowHook}|{example-hook}| is: +% \begin{verbatim}[numbers=left] +% -> The hook 'example-hook': +% > Code chunks: +% > foo -> [code from package 'foo'] +% > bar -> [from package 'bar'] +% > baz -> [package 'baz' is here] +% > Extra code for next invocation: +% > -> [one-time code] +% > Rules: +% > foo|baz with relation > +% > baz|bar with default relation < +% > Execution order (after applying rules): +% > bar, baz, foo. +% \end{verbatim} +% +% In the listing above, lines~3 to~5 show the three code chunks added +% to the hook and their respective labels in the format +% \begin{quote} +% \quad \meta{label}\verb| -> |\meta{code} +% \end{quote} +% +% Line~7 shows the code chunk for the next execution of the hook in +% the format +% \begin{quote} +% \quad \verb|-> |\meta{next-code} +% \end{quote} +% This code will be used and disappear at the next +% \verb|\UseHook{example-hook}|, in contrast to the chunks mentioned +% earlier, which can only be removed from that hook by doing +% \verb|\RemoveFromHook{|\meta{label}|}[example-hook]|. +% +% Lines~9 and~10 show the rules declared that affect this hook in the +% format +% \begin{quote} +% \quad \meta{label-1}\verb+|+\meta{label-2}| with |%^^A +% \meta{\texttt{default}?}| relation |\meta{relation} +% \end{quote} +% which means that the \meta{relation} applies to \meta{label-1} and +% \meta{label-2}, in that order, as detailed in \cs{DeclareHookRule}. +% If the relation is \texttt{default} it means that that rule applies +% to \meta{label-1} and \meta{label-2} in \emph{all} hooks, (unless +% overrided by a non-default relation). +% +% Finally, line~12 lists the labels in the hook after sorting; +% that is, in the order they will be executed when the hook is used. % \end{function} % % @@ -3964,19 +4031,21 @@ % may be used in packages without rollback functionality. So we % just make them do nothing which may or may not work depending on % the code usage. +% \changes{v1.0d}{2020/10/04}{Definition \cs{AddToHookNext} was supposed +% to be for \cs{AddToHook} vize versa (gh/401)} % \begin{macrocode} % %\EndIncludeInRelease %\IncludeInRelease{0000/00/00}% % {\NewHook}{The hook management}% % -%\def \NewHook#1{} -%\def \NewReversedHook#1{} -%\def \NewMirroredHookPair#1#2{} +%\def\NewHook#1{} +%\def\NewReversedHook#1{} +%\def\NewMirroredHookPair#1#2{} % -%\long\def \AddToHook#1#2{} +%\long\def\AddToHookNext#1#2{} % -%\def \AddToHookNext#1{\@gobble@AddToHook@args} +%\def\AddToHook#1{\@gobble@AddToHook@args} %\providecommand\@gobble@AddToHook@args[2][]{} % %\def\RemoveFromHook#1{\@gobble@RemoveFromHook@arg} @@ -3988,17 +4057,17 @@ %\let \DebugHooksOn \@empty %\let \DebugHooksOff\@empty % -%\def \DeclareHookRul#1#2#3#4{} +%\def \DeclareHookRule #1#2#3#4{} %\def \DeclareDefaultHookRule #1#2#3{} -%\def \ClearHookRule#1#2#3{} +%\def \ClearHookRule #1#2#3{} % \end{macrocode} % If the hook management is not provided we make the test for existence % false and the test for empty true in the hope that this is most % of the time reasonable. If not a package would need to guard % against running in an old kernel. % \begin{macrocode} -%\def \IfHookExistTF #1#2#3{#3} -%\def \IfHookEmptyTF #1#2#3{#2} +%\long\def \IfHookExistsTF #1#2#3{#3} +%\long\def \IfHookEmptyTF #1#2#3{#2} % %\EndIncludeInRelease % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/base/ltvers.dtx b/Master/texmf-dist/source/latex/base/ltvers.dtx index 2813670115d..fcd722b0e88 100644 --- a/Master/texmf-dist/source/latex/base/ltvers.dtx +++ b/Master/texmf-dist/source/latex/base/ltvers.dtx @@ -115,7 +115,7 @@ {2020-10-01} % %<*2ekernel> -\def\patch@level{0} +\def\patch@level{1} % \end{macrocode} % % \begin{macro}{\development@branch@name} diff --git a/Master/texmf-dist/source/latex/base/ltxdoc.dtx b/Master/texmf-dist/source/latex/base/ltxdoc.dtx index 696af32ab15..0c7130c3717 100644 --- a/Master/texmf-dist/source/latex/base/ltxdoc.dtx +++ b/Master/texmf-dist/source/latex/base/ltxdoc.dtx @@ -30,7 +30,7 @@ % %\NeedsTeXFormat{LaTeX2e} %\ProvidesClass{ltxdoc} -% [2020/08/21 v2.1a Standard LaTeX documentation class] +% [2020/10/04 v2.1b Standard LaTeX documentation class] % %<*driver> \documentclass{ltxdoc} @@ -443,7 +443,12 @@ \expandafter\@docinclude\expandafter{\@curr@file} \fi} \def\@docinclude#1 {\clearpage -\if@filesw \immediate\write\@mainaux{\string\@input{"#1.aux"}}\fi +% \end{macrocode} +% +% \changes{v2.1bj}{2020/10/04}{Quotes around the aux file name removed, +% they are no longer needed and upset BibTeX (gh/400)} +% \begin{macrocode} +\if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi \@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for \@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi \if@tempswa \let\@auxout\@partaux \if@filesw -- cgit v1.2.3