summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex-dev/base
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-12-03 20:59:29 +0000
committerKarl Berry <karl@freefriends.org>2022-12-03 20:59:29 +0000
commit7a13d37503ca9d59e636a91a54338591e1e255a5 (patch)
treec9e8db5cf3ebd16fd6129b8af27c74480fceb854 /Master/texmf-dist/source/latex-dev/base
parent4e6b6563d55b107fca068e76b243e07311f4400e (diff)
latex-base-dev (3dec22)
git-svn-id: svn://tug.org/texlive/trunk@65180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base')
-rw-r--r--Master/texmf-dist/source/latex-dev/base/doc.dtx244
-rw-r--r--Master/texmf-dist/source/latex-dev/base/latexrelease.dtx11
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltclass.dtx23
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltcmd.dtx46
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltdefns.dtx226
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltfinal.dtx34
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx10
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltshipout.dtx51
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltspace.dtx16
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltvers.dtx31
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx11
11 files changed, 526 insertions, 177 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/doc.dtx b/Master/texmf-dist/source/latex-dev/base/doc.dtx
index d137038d634..a2c95694aee 100644
--- a/Master/texmf-dist/source/latex-dev/base/doc.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/doc.dtx
@@ -45,7 +45,7 @@
%<+package>
%<+package>\ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2022/07/03 v3.0k
+%<+package|shortvrb> [2022/11/13 v3.0m
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
@@ -82,6 +82,8 @@
% \changes{v1.9a}{1993/12/02}{Upgrade for LaTeX2e}
% \changes{v1.9d}{1993/12/20}{Protected changes entry.}
% \changes{v1.0p}{1994/05/21}{Use new error commands}
+% \changes{v3.0m}{2022/11/13}{Redefinitions of \cs{verb} removed as
+% no longer needed (gh/953)}
%
%
% \hyphenation{make-index}
@@ -1208,7 +1210,7 @@
% not to exceed this limit when describing the change. The actual
% entry consists of the \meta{version}, the |\actualchar|, the current
% macro name, a colon, the |\levelchar|, and, finally, the \meta{text}.
-% The result is a glossaryentry for the \meta{version}, with the name of
+% The result is a glossary entry for the \meta{version}, with the name of
% the current macro as subitem. Outside the |macro| environment, the
% text |\generalname| is used instead of the macro name. When
% referring to macros in change descriptions it is conventional to use
@@ -1216,6 +1218,13 @@
% and using up valuable characters in the entry with old \prg{makeindex}
% versions.
%
+% Note that in the history listing, the entry is shown with the page number
+% that corresponds to its place in the source, e.g., general changes put at the
+% very beginning of the file will show up with page number ``1'', change entries
+% placed elsewhere might have different numbers (not necessarily always
+% very useful unless you are careful).
+%
+%
% \changes{v1.7a}{1992/02/26}{Description of \cs{RecordChanges} etc.
% added
% to interface section.} \DescribeInterfaceMacro\RecordChanges To cause the
@@ -1824,8 +1833,8 @@
% July 1989.
% \bibitem{art:docstrip} \textsc{Frank Mittelbach, Denys Duchier and
% Johannes Braams}.
-% \newblock \texttt{docstrip.dtx} (to appear).
-% \newblock The file is part of the DOC package.
+% \newblock \texttt{docstrip.dtx}.
+% \newblock The file is part of core \LaTeX{}.
% \bibitem{book:Raspe} \textsc{R. E. Raspe} (*1737, \dag 1797).
% \newblock Baron Münchhausens narrative of his marvelous
% travels and campaigns in Russia.
@@ -2686,12 +2695,16 @@
% first lines are copied literally from \texttt{latex.tex}.
% \changes{v1.7i}{1992/07/12}{Added \cs{@@par} to clear possible
% \cs{parshape}.}
+% \changes{v3.0m}{2022/11/13}{Redefinitions of \cs{@verbatim} changed
+% to match the kernel definition (gh/953)}
% \begin{macrocode}
-\def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
- \leftskip\@totalleftmargin\rightskip\z@
- \parindent\z@\parfillskip\@flushglue\parskip\z@
- \@@par
- \@tempswafalse
+\def\@verbatim{\trivlist \item\relax
+ \if@minipage\else\vskip\parskip\fi
+ \leftskip\@totalleftmargin\rightskip\z@
+ \parindent\z@\parfillskip\@flushglue\parskip\z@
+ \language\l@nohyphenation
+ \@@par
+ \@tempswafalse
% \end{macrocode}
% |\@verbatim| sets |^^M|, the end of line character, to
% be equal to |\par|. This control sequence is redefined
@@ -2699,8 +2712,13 @@
% \changes{v1.7c}{1992/03/24}{Added \cs{interlinepenalty} to
% \cs{par} from verbatim.sty}
% \begin{macrocode}
- \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
- \penalty\interlinepenalty
+ \def\par{%
+ \if@tempswa
+ \leavevmode \null \@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi
% \end{macrocode}
% We add a control sequence |\check@percent| to the definition
% of |\par| whose task it is to check for a percent character.
@@ -2713,9 +2731,10 @@
% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX verbatim,
% which handles more ligatures.}
% \begin{macrocode}
- \obeylines
- \let\do\do@noligs \verbatim@nolig@list
- \let\do\@makeother \dospecials}
+ \let\do\@makeother \dospecials
+ \obeylines \verbatim@font \@noligs
+ \everypar \expandafter{\the\everypar \unpenalty}%
+}
% \end{macrocode}
% \end{macro}
%
@@ -2744,83 +2763,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{imacro}{\verb}
-% \changes{v1.7a}{1992/02/27}{Now warns about newlines (from
-% newdoc with `@noligs added).}
-% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX \cs{verb}}
-% We re-define |\verb| to check for newlines in its argument since a
-% missing delimiter is difficult to detect in \DOC{} source.
-% The code is the same as in \texttt{latex.tex} of September 19, 1993.
-% Perhaps there should be a font-changing
-% hook rather than just using |\ttfamily|, but if so it probably should be
-% different from |\MacroFont| since that normally includes |\small|
-% and would look wrong inline.
-% \changes{v1.7a}{1992/02/28}{Added math mode check (from verbatim.sty)}
-% \begin{macrocode}
-\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup \let\do\do@noligs \verbatim@nolig@list
- \ttfamily \verb@eol@error \let\do\@makeother \dospecials
- \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
-% \end{macrocode}
-% \end{imacro}
-%
-% \begin{macro}{\verb@balance@group}
-% \begin{macro}{\verb@egroup}
-% \begin{macro}{\verb@eol@error}
-% \changes{v1.8b}{1993/09/21}{Renamed \cs{verb@err} to
-% \cs{verb@eol@error}, as in new LaTeX verbatim.}
-% \begin{macrocode}
-\let\verb@balance@group\@empty
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\begingroup
- \obeylines%
- \gdef\verb@eol@error{\obeylines%
- \def^^M{\verb@egroup\@latex@error{%
- \noexpand\verb command ended by end of line}\@ehc}}%
-\endgroup
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@sverb}
-% \changes{v1.7a}{1992/02/27}{Added for \cs{verb} change.}
-% \changes{v1.7a}{1992/02/28}{Now same as in verbatim.sty.}
-% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX verbatim,
-% which has better error trapping.}
-% See \cite{art:verbatim} for commentary.
-% \changes{v2.1j}{2019/11/03}{Use the kernel definition, no change needed (gh/205)}
-% \begin{macrocode}
-%\def\@sverb#1{%
-% \catcode`#1\active \lccode`\~`#1%
-% \gdef\verb@balance@group{\verb@egroup
-% \@latex@error{Illegal use of \noexpand\verb command}\@ehc}%
-% \aftergroup\verb@balance@group
-% \lowercase{\let~\verb@egroup}}
-% \end{macrocode}
-% \end{macro}
-%
%
-% \begin{macro}{\verbatim@nolig@list}
-% \begin{macro}{\do@noligs}
-% These macros replace the old |\@noligs| mechanism by an
-% extensible version to allow more ligatures to be added.
-% \begin{macrocode}
-\def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
-\def\do@noligs#1{%
- \catcode`#1\active
- \begingroup
- \lccode`\~=`#1\relax
- \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% In the early versions of the package it also redefined \cs{verb}
+% because that didn't include the useful test for \enquote{newline} in
+% the verbatim text. This is nowadays part of \LaTeX{} so we do not
+% redefine it any longer (the original code is still kept in the file
+% after \cs{endinput} to keep the long history intact).
%
% \begin{tcounter}{\macro@cnt}
% \label{page:macro} The \env{macro} environment is implemented as
@@ -3147,9 +3095,6 @@
%
% \begin{macro}{\short@macro}
%
-% \fmi{this needs cleaning up too, the results in the index are
-% currently wrong for cases like `\cs{ }' and the like.}
-%
% \changes{v1.5c}{1989/04/27}{Corrected bad bug by putting the
% scan@allowedfalse macro before printing
% the argument.}
@@ -3164,17 +3109,14 @@
% done by the |\ifnot@excluded| macro which assumes that the
% macro name is saved in |\macro@namepart|. The character
% mustn't be stored with a special category code or exclusion from
-% the index won't work, so we employ the case-changing trick used
-% elsewhere. Since the argument might be an active character,
-% |\string| is used to normalize it.
+% the index won't work, so we we use \cs{string} to normalize it
+% the same way it is done in \cs{DoNotIndex}, i.e. everything ends up catcode 12
+% except for the space character.
% \changes{v2.0e}{1998/12/28}{Correctly use the case-changing trick.}
+% \changes{v3.0l}{2022/11/03}{No longer using the case-changing trick.}
% \begin{macrocode}
-\begingroup
-\catcode`\&=12
-\gdef\short@macro#1{\begingroup
- \uccode`\&=\expandafter`\string#1%
- \uppercase{\def\x{\def\macro@namepart{&}}}%
- \expandafter\endgroup\x
+\def\short@macro#1{%
+ \edef\macro@namepart{\string#1}%
% \end{macrocode}
% Any indexing is then delegated to
% |\maybe@index@short@macro|. Depending on the actual character seen,
@@ -3197,7 +3139,6 @@
% cross-referencing is globally disabled.
% \begin{macrocode}
\scan@allowedtrue }
-\endgroup
% \end{macrocode}
% \end{macro}
%
@@ -3441,7 +3382,6 @@
\def \ShowIndexingState {
\__doc_trace:x{Show~ doc~ indexing~ state:}
\seq_show:N \l__doc_donotindex_seq
-% \tl_analysis_show:N\l__doc_donotindex_seq
\prop_show:N \g__doc_idxtype_prop
}
% \end{macrocode}
@@ -3637,10 +3577,12 @@
% \begin{macro}{\maybe@index@short@macro}
% \begin{macro}{\__doc_maybe_index_short:o}
% Single character macros are handled similarly but there the
-% indexing is done by \cs{SpecialShortIndex}.
+% indexing is done by \cs{SpecialShortIndex} and it is simpler
+% because we know that the argument contains a string token not letters.
+% \changes{v3.0l}{2022/11/03}{We know the argument expands to a single string token}
% \begin{macrocode}
\cs_new:Npn \__doc_maybe_index_short:o #1 {
- \exp_args:Nf \__doc_maybe_index_aux:nN { \tl_to_str:o {#1} }
+ \exp_args:No \__doc_maybe_index_aux:nN #1
\SpecialShortIndex
}
\cs_set_eq:NN \maybe@index@short@macro \__doc_maybe_index_short:o
@@ -3715,7 +3657,12 @@
{\cs_to_str:N \^^M } {\def\reserved@a{ \string \space \actualchar }
\def\reserved@b { \space }
\let\reserved@c \@empty }
- { } {\def\reserved@a{ \string \space \actualchar }
+% \end{macrocode}
+% With the fix for
+% \verb*=\ = we now have to look for a real space to handle that command sequence.
+% \changes{v3.0l}{2022/11/03}{look for the right token}
+% \begin{macrocode}
+ { ~ } {\def\reserved@a{ \string \space \actualchar }
\def\reserved@b { \space }
\let\reserved@c \@empty }
{\c_left_brace_str} { \def\reserved@a{ \bgroup \actualchar }
@@ -6256,6 +6203,89 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+% \section{Code no longer used}
+%
+% \begin{imacro}{\verb}
+% \changes{v1.7a}{1992/02/27}{Now warns about newlines (from
+% newdoc with `@noligs added).}
+% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX \cs{verb}}
+% We re-define |\verb| to check for newlines in its argument since a
+% missing delimiter is difficult to detect in \DOC{} source.
+% The code is the same as in \texttt{latex.tex} of September 19, 1993.
+% Perhaps there should be a font-changing
+% hook rather than just using |\ttfamily|, but if so it probably should be
+% different from |\MacroFont| since that normally includes |\small|
+% and would look wrong inline.
+% \changes{v1.7a}{1992/02/28}{Added math mode check (from verbatim.sty)}
+% \begin{macrocode}
+%\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+% \bgroup \let\do\do@noligs \verbatim@nolig@list
+% \ttfamily \verb@eol@error \let\do\@makeother \dospecials
+% \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
+% \end{macrocode}
+% \end{imacro}
+%
+% \begin{macro}{\verb@balance@group}
+% \begin{macro}{\verb@egroup}
+% \begin{macro}{\verb@eol@error}
+% \changes{v1.8b}{1993/09/21}{Renamed \cs{verb@err} to
+% \cs{verb@eol@error}, as in new LaTeX verbatim.}
+% \begin{macrocode}
+%\let\verb@balance@group\@empty
+% \end{macrocode}
+%
+% \begin{macrocode}
+%\def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%\begingroup
+% \obeylines%
+% \gdef\verb@eol@error{\obeylines%
+% \def^^M{\verb@egroup\@latex@error{%
+% \noexpand\verb command ended by end of line}\@ehc}}%
+%\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@sverb}
+% \changes{v1.7a}{1992/02/27}{Added for \cs{verb} change.}
+% \changes{v1.7a}{1992/02/28}{Now same as in verbatim.sty.}
+% \changes{v1.8b}{1993/09/21}{Changed to conform to new LaTeX verbatim,
+% which has better error trapping.}
+% See \cite{art:verbatim} for commentary.
+% \changes{v2.1j}{2019/11/03}{Use the kernel definition, no change needed (gh/205)}
+% \begin{macrocode}
+%\def\@sverb#1{%
+% \catcode`#1\active \lccode`\~`#1%
+% \gdef\verb@balance@group{\verb@egroup
+% \@latex@error{Illegal use of \noexpand\verb command}\@ehc}%
+% \aftergroup\verb@balance@group
+% \lowercase{\let~\verb@egroup}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\verbatim@nolig@list}
+% \begin{macro}{\do@noligs}
+% These macros replace the old |\@noligs| mechanism by an
+% extensible version to allow more ligatures to be added.
+% \begin{macrocode}
+%\def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
+%\def\do@noligs#1{%
+% \catcode`#1\active
+% \begingroup
+% \lccode`\~`#1\relax
+% \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
^^A Needed for emacs
^^A
diff --git a/Master/texmf-dist/source/latex-dev/base/latexrelease.dtx b/Master/texmf-dist/source/latex-dev/base/latexrelease.dtx
index 294007553d3..132a2548e44 100644
--- a/Master/texmf-dist/source/latex-dev/base/latexrelease.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/latexrelease.dtx
@@ -40,7 +40,7 @@
%<*latexrelease>
% \fi
% \ProvidesFile{latexrelease.dtx}
- [2022/02/28 v1.0o LaTeX release emulation and tests
+ [2022/11/14 v1.0p LaTeX release emulation and tests
(including releases up to \latexreleaseversion)]
% \iffalse
%</latexrelease>
@@ -746,8 +746,12 @@ of this package available from CTAN}
%
% Finally, redirect the error thrown by \cs{NewHook} to nowhere so it
% can be safely reused (the hook isn't redeclared if it already exists).
+% The same happens for \cs{NewMarkClass}.
+% \changes{v1.0p}{2022/11/14}
+% {Silence \cs{NewMarkClass} in rollback (gh/955)}
% \begin{macrocode}
\msg_redirect_name:nnn { hooks } { exists } { none }
+\msg_redirect_name:nnn { mark } { class-already-defined }{ none }
% \end{macrocode}
%
% Now a one-off for |ltcmd.dtx|: we need to make \cs{NewDocumentCommand}
@@ -799,9 +803,12 @@ of this package available from CTAN}
\tl_clear:N \l_@@_restores_tl
% \end{macrocode}
%
-% And restore the hook error message.
+% And restore the silenced error messages.
+% \changes{v1.0p}{2022/11/14}
+% {Unsilence \cs{NewMarkClass} error message after rollback (gh/955)}
% \begin{macrocode}
\msg_redirect_name:nnn { hooks } { exists } { }
+\msg_redirect_name:nnn { mark } { class-already-defined } { }
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
index a525b6f573e..63c42f6cd07 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2022/10/22 v1.5e LaTeX Kernel (Class & Package Interface)]
+ [2022/11/16 v1.5f LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -2813,6 +2813,7 @@
% unknown option.
% \changes{v1.3h}{2020/01/28}{Allow spaces in option string and display
% only unknown options not the whole option list (gh/256)}
+% \changes{v1.5f}{2022/11/16}{Introduce key 'nowarn' on filecontents (gh/958)}
% \begin{macrocode}
\def\filec@ntents@opt[#1]{%
\edef\@fortmp{\zap@space#1 \@empty}%
@@ -2821,7 +2822,7 @@
\csname filec@ntents@\reserved@a\endcsname
\else
\@latex@error{Unknown filecontents option \reserved@a}%
- {Valid options are force (or overwrite), nosearch, noheader}%
+ {Valid options are force (or overwrite), nosearch, noheader, nowarn}%
\fi}%
\filec@ntents
}
@@ -2849,6 +2850,18 @@
\let\filec@ntents@checkdir\@empty
\def\filec@ntents@where{exists on the system}
% \end{macrocode}
+% Option \texttt{nowarn} does not show any warning on the terminal
+% but still writes it to the \texttt{.log}.
+% \changes{v1.5f}{2022/11/16}{Introduce key 'nowarn' on filecontents (gh/958)}
+% \begin{macrocode}
+\def\filec@ntents@nowarn{%
+ \let\filec@ntents@warning\@latex@note@no@line
+}
+% \end{macrocode}
+% By default we show terminal warnings.
+% \begin{macrocode}
+\let\filec@ntents@warning\@latex@warning@no@line
+% \end{macrocode}
%
% \begin{macrocode}
\begingroup%
@@ -2925,6 +2938,8 @@
% on the terminal.
% \changes{v1.3g}{2020/01/27}{Fix typo in error message}
% \changes{v1.3j}{2020/02/20}{Fix missing quotes around file name (gh/284)}
+% \changes{v1.5f}{2022/11/16}{Introduce key 'nowarn' on filecontents (gh/958)}
+% \changes{v1.5f}{2022/11/16}{Do not show "current dir" in message (gh/917)}
% \begin{macrocode}
\ch@ck7\reserved@c\write\relax%
\if@filesw% % Foul ... trying to overwrite \jobname!
@@ -2932,8 +2947,8 @@
write to the file you are reading from!\MessageBreak%
Data is written to screen instead.}%
\else%
- \@latex@warning@no@line%
- {Writing or overwriting file `\@currdir\@curr@file'}%
+ \filec@ntents@warning%
+ {Writing or overwriting file `\@curr@file'}%
\immediate\openout\reserved@c\q@curr@file\relax%
\fi%
\fi%
diff --git a/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx b/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
index 14d6756f5c2..30a1908c473 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
@@ -34,8 +34,8 @@
%%% From File: ltcmd.dtx
%
% \begin{macrocode}
-\def\ltcmdversion{v1.1a}
-\def\ltcmddate{2022-08-16}
+\def\ltcmdversion{v1.1b}
+\def\ltcmddate{2022-11-29}
% \end{macrocode}
%
%<*driver>
@@ -2401,21 +2401,28 @@
% \@@_show_command:NnNNwN,
% \@@_show_expandable:N,
% \@@_show_expandable:NnNNNNnN,
-% \@@_show_command_aux:nNNn,
+% \@@_show_command_aux:NnNNn,
% \@@_show_environment:N,
+% \@@_show:x,
% }
% These commands just expand the command once to reveal its innards,
% then pass the type of command, the control sequence, the signature,
-% and the code macro to \cs{@@_show_command_aux:nNNn}.
+% and the code macro to \cs{@@_show_command_aux:NnNNn}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_show_command:N #1
{ \exp_after:wN \@@_show_command:NnNNwN #1 \q_@@ #1 }
\cs_new_protected:Npn \@@_show_command:NnNNwN #1 #2 #3 #4 #5 \q_@@ #6
- { \@@_show_command_aux:nNNn { document~command } #6 #4 {#2} }
+ {
+ \@@_show_command_aux:NnNNn \tl_show:x
+ { document~command } #6 #4 {#2}
+ }
\cs_new_protected:Npn \@@_show_expandable:N #1
{ \exp_after:wN \@@_show_expandable:NnNNNNnN #1 #1 }
\cs_new_protected:Npn \@@_show_expandable:NnNNNNnN #1 #2 #3 #4 #5 #6 #7 #8
- { \@@_show_command_aux:nNNn { expandable~document~command } #8 #5 {#2} }
+ {
+ \@@_show_command_aux:NnNNn \tl_show:x
+ { expandable~document~command } #8 #5 {#2}
+ }
% \end{macrocode}
%
% Now just print everything in the required format. The auxiliary
@@ -2423,27 +2430,31 @@
% \cs{l_@@_tmpa_tl}, so we ust use that here:
% \changes{v1.0j}{2021/13/31}
% {Make \cs{ShowCommand} stop for interaction}
+% \changes{v1.1b}{2022/11/30}
+% {Don't stop for the \cs{begin} part of an environment}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_show_command_aux:nNNn #1 #2 #3 #4
+\cs_new_protected:Npn \@@_show_command_aux:NnNNn #1 #2 #3 #4 #5
{
- \@@_split_signature:n {#4}
- \tl_show:x
+ \@@_split_signature:n {#5}
+ #1
{
- \token_to_str:N #2 = #1: \iow_newline:
+ \token_to_str:N #3 = #2: \iow_newline:
\tl_use:N \l_@@_tmpa_tl
- -> \cs_replacement_spec:N #3
+ -> \cs_replacement_spec:N #4
}
}
% \end{macrocode}
%
% We can reuse most of the above to show an environment, except that
% we need to ensure that the proper \cs[no-index]{environment~\ldots}
-% are passed to \cs{@@_show_command_aux:nNNn}. Additionally, when
+% are passed to \cs{@@_show_command_aux:NnNNn}. Additionally, when
% |\ShowCommand\foo| is used (if |foo| is an environment), we show
% |\endfoo| as well, and when |\ShowCommand\endfoo| is used, change
% that to |\ShowCommand\foo| and do the same.
% \changes{v1.0j}{2021/13/31}
% {Make \cs{ShowCommand} stop for interaction}
+% \changes{v1.1b}{2022/11/30}
+% {Don't stop for the \cs{begin} part of an environment}
% \begin{macrocode}
\cs_new_protected:Npn \@@_show_environment:N #1
{
@@ -2459,12 +2470,14 @@
{
\use:x
{
- \@@_show_command_aux:nNNn { document~environment }
+ \@@_show_command_aux:NnNNn \@@_show:x { document~environment }
{ \exp_not:N \begin {#3} }
\exp_not:c { environment~ #3 ~ code }
{#2}
}
}
+\cs_new_protected:Npn \@@_show:x #1
+ { \iow_term:x { > ~ #1 . \iow_newline: } }
\cs_new_protected:Npn \@@_show_environment_end:N #1
{
\exp_args:NNx \@@_check_end:Nn \l_@@_tmpa_tl { \cs_to_str:N #1 }
@@ -2473,10 +2486,15 @@
% \end{macrocode}
%
% And, of course, add \cs{__kernel_cmd_if_xparse:NTF} and
-% \cs{@@_show:N} to \cs{@showcommandlisthook}:
+% \cs{@@_show:N} to \cs{@showcommandlisthook} and to
+% \cs{@showenvironmentlisthook} (\cs{@@_show:N} takes care of the
+% environment case as well, so both entries are identical):
+% \changes{v1.1b}{2022-11-29}{Add \cs{@showenvironmentlisthook}}
% \begin{macrocode}
\tl_gput_right:Nn \@showcommandlisthook
{ { \__kernel_cmd_if_xparse:NTF \@@_show:N } }
+\tl_gput_right:Nn \@showenvironmentlisthook
+ { { \__kernel_cmd_if_xparse:NTF \@@_show:N } }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx b/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
index bd820e7cf21..c604bd96206 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltdefns.dtx}
- [2022/05/22 v1.5r LaTeX Kernel (definition commands)]
+ [2022/11/24 v1.5s LaTeX Kernel (definition commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltdefns.dtx}
@@ -784,7 +784,9 @@
% not take arguments. (but may contain |\par|s)
%
% Make sure that an attempt to define a `graf' or `group' environment
-% fails.
+% fails by temporarily letting the undefined \verb=\...= (begin code) to
+% the definition of \verb=\end...= and as a result we get an error if that
+% has a definition.
% \begin{macrocode}
\long\def\@newenv#1#2#3#4{%
\@ifundefined{#1}%
@@ -1641,6 +1643,7 @@
% \end{macrocode}
%
% \begin{macro}{\declare@commandcopy}
+% \begin{macro}{\declare@commandcopy@do}
% Start by checking if the command is already defined. The proper action is
% taken by each specific command above. If all's good, then
% \cs{robust@command@act} is called with the proper arguments as described
@@ -1650,11 +1653,14 @@
\long\def\declare@commandcopy#1#2#3#4{%
\edef\reserved@a{\@expl@cs@to@str@@N#3}%
\@ifundefined\reserved@a{#1}{#2}%
- {\robust@command@act
- \@declarecommandcopylisthook#4%
- \declare@commandcopy@let{#3#4}}}
+ {\declare@commandcopy@do{#3}{#4}}}
+\long\def\declare@commandcopy@do#1#2{%
+ \robust@command@act
+ \@declarecommandcopylisthook#2%
+ \declare@commandcopy@let{#1#2}}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@declarecommandcopylisthook}
% The initial definition of \cs{@declarecommandcopylisthook} contains the
@@ -1694,6 +1700,64 @@
% \end{macro}
%
%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2023-06-01}{\DeclareEnvironmentCopy}
+%<latexrelease> {Add \NewEnvironmentCopy, \RenewEnvironmentCopy, and \DeclareEnvironmentCopy}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macro}{\NewEnvironmentCopy}
+% \begin{macro}{\RenewEnvironmentCopy}
+% \begin{macro}{\DeclareEnvironmentCopy}
+% If \verb=\#1= or \verb=\end#1= already exist one gets an error
+% message talking about the problematical command (not the
+% environment).
+% The remainder of the \LaTeX{} run is probably badly
+% broken and it is unlikely that continuing it gives
+% reasonable results.
+% \changes{v1.5s}{2022/11/24}{Add \cs{NewEnvironmentCopy},
+% \cs{RenewEnvironmentCopy}, and \cs{DeclareEnvironmentCopy} (gh/963)}
+% \begin{macrocode}
+\def\NewEnvironmentCopy{%
+ \declare@environmentcopy
+ {\@firstofone}%
+ {\@firstoftwo\@notdefinable}}
+\def\RenewEnvironmentCopy{%
+ \declare@environmentcopy
+ {\@latex@error{Environment \reserved@a\space undefined}\@ehc
+ \@firstofone}%
+ {\@firstofone}}
+\def\DeclareEnvironmentCopy{%
+ \declare@environmentcopy
+ {\@firstofone}%
+ {\@firstofone}}
+\long\def\declare@environmentcopy#1#2#3#4{%
+ \edef\reserved@a{\@ifundefined{#3}{end#3}{#3}}%
+ \@ifundefined\reserved@a
+ {\def\reserved@a{#3}#1}%
+ {\def\reserved@a{#3}#2}%
+ {\ExpandArgs{cc}\declare@commandcopy@do{#3}{#4}%
+ \ExpandArgs{cc}\declare@commandcopy@do{end#3}{end#4}}}
+% \end{macrocode}
+%
+% Now the rollback code.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\DeclareEnvironmentCopy}
+%<latexrelease> {Undefine \NewEnvironmentCopy, \RenewEnvironmentCopy, and \DeclareEnvironmentCopy}%
+%<latexrelease>\let\NewEnvironmentCopy\@undefined
+%<latexrelease>\let\RenewEnvironmentCopy\@undefined
+%<latexrelease>\let\DeclareEnvironmentCopy\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
% \subsubsection{Showing robust commands}
%
% \begin{macro}{\ShowCommand}
@@ -1747,7 +1811,6 @@
% \end{macrocode}
% \end{macro}
%
-%
% \begin{macrocode}
%</2ekernel>
%<latexrelease>\IncludeInRelease{2020-10-01}{\@if@DeclareRobustCommand}
@@ -1836,6 +1899,7 @@
%
% \begin{macro}{\@show@DeclareRobustCommand}
% \begin{macro}{\show@kernel@robust@command}
+% \begin{macro}{\@show@macro}
% Showing the command is pretty simple. This command prints the top-level
% expansion as \TeX's \cs{show} would, but with |robust macro:| rather than
% just |macro:|, then a blank line and then \cs{show} the inner command.
@@ -1863,12 +1927,14 @@
\robust@command@chk@safe#1%
{\@if@newcommand#1%
{\@show@newcommand}%
- {\show}}%
- {\show}%
+ {\@show@macro}}%
+ {\@show@macro}%
#1}
+\let\@show@macro\show
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \end{macro}
%
@@ -1931,7 +1997,7 @@
\typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
\expandafter\@show@newcommand@aux
\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
- \expandafter{#1}}
+ \expandafter{#1}\@show@tokens}
% \end{macrocode}
%
% For a macro defined with, say, |\newcommand\foo[1][opt]{bar}|, it will
@@ -1946,20 +2012,28 @@
% \end{verbatim}
% If the command was defined with \cs{DeclareRobustCommand}, then another pair
% of lines show the top-level expansion \verb*|\protect \foo |.
-%
-% The extra gymnastics with \cs{showtokens} ensures that \cs{showtokens}
-% itself, and the internals of this macro aren't showed in the context lines.
% \begin{macrocode}
-\long\def\@show@newcommand@aux#1#2{%
+\long\def\@show@newcommand@aux#1#2#3{%
\typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}%
- \edef\reserved@a{%
- default \string##1=\expandafter\detokenize\@gobblethree#2.^^J%
- \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}%
- \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}}
+ #3{default \string##1=\expandafter\detokenize\@gobblethree#2.^^J%
+ \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@show@tokens}
+% This macro prints the contents of the token list (macro) |#1| using
+% \cs{showtokens}. The \cs{expandafter} gymnastics ensures that
+% \cs{showtokens} itself, and the internals of this macro aren't
+% showed in the context lines.
+% \begin{macrocode}
+\long\def\@show@tokens#1{%
+ \edef\reserved@a{#1}%
+ \showtokens\expandafter
+ \expandafter\expandafter{\expandafter\reserved@a}}
+% \end{macrocode}
+% \end{macro}
+%
% Now the rollback code.
% \begin{macrocode}
%</2ekernel|latexrelease>
@@ -1985,6 +2059,124 @@
% \end{macro}
%
%
+% \subsubsection{Showing environments}
+%
+% \begin{macro}{\ShowEnvironment}
+% \changes{v1.5s}{2022/11/24}{Added \cs{ShowEnvironment}}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2023-06-01}{\ShowEnvironment}
+%<latexrelease> {Add \ShowEnvironment}%
+%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \cs{ShowEnvironment} is quite similar to \cs{ShowCommand}. We will
+% pass the environment \meta{env} around as the macro
+% \cs[no-index]{env}, because \cs{robust@command@act} expects a single
+% token.
+% \begin{macrocode}
+\def\ShowEnvironment#1{%
+ \expandafter\@show@environment\csname #1\endcsname}
+\long\def\@show@environment#1{%
+ \robust@command@act
+ \@showenvironmentlisthook#1%
+ \@show@normalenv#1}
+% \end{macrocode}
+%
+% \begin{macro}{\@showenvironmentlisthook}
+% This is similar to \cs{@showcommandlisthook}, but uses the dedicated
+% versions for environments.
+% \begin{macrocode}
+\def\@showenvironmentlisthook{%
+ {\@if@DeclareRobustCommand \@show@DeclareRobustCommand@env}%
+ {\@if@newcommand \@show@newcommand@env}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@show@newcommand@env}
+% \begin{macro}{\@show@DeclareRobustCommand@env}
+% These are similar to the command versions below, except they say
+% \enquote{environment} and call \cs{@show@environment@end} to print
+% the \cs{end} part.
+% \begin{macrocode}
+\long\def\@show@newcommand@env#1{%
+ \@show@environment@begin#1%
+ \expandafter\@show@newcommand@aux
+ \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \expandafter{#1}\@show@typeout
+ \@show@environment@end#1}
+\long\def\@show@DeclareRobustCommand@env#1{%
+ \@show@environment@begin#1%
+ \begingroup
+ \let\@show@tokens\@show@typeout
+ \let\@show@macro\@show@nonstop
+ \expandafter\show@kernel@robust@command
+ \csname\@expl@cs@to@str@@N#1 \endcsname
+ \endgroup
+ \@show@environment@end#1}
+\long\def\@show@environment@begin#1{%
+ \typeout{> \string\begin{\@expl@cs@to@str@@N#1}=environment:}%
+ \typeout{\@expl@cs@argument@spec@@N#1->%
+ \@expl@cs@replacement@spec@@N#1.^^J}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@show@normalenv}
+% \begin{macro}{\@show@environment@end}
+% A \enquote{normal} environment is straightforward.
+% \cs{@show@environment@end} needs to check if the \cs{end} part is
+% defined and show it accordingly, otherwise the output would show
+% gibberish.
+% \begin{macrocode}
+\long\def\@show@normalenv#1{%
+ \@show@environment@begin#1%
+ \@show@environment@end#1}
+\long\def\@show@environment@end#1{%
+ \expandafter\@show@environment@end@aux
+ \csname end\@expl@cs@to@str@@N#1\endcsname#1}
+\long\def\@show@environment@end@aux#1#2{%
+ \@show@tokens{\string\end{\@expl@cs@to@str@@N#2}%
+ \ifx\relax#1=undefined%
+ \else:^^J\@expl@cs@argument@spec@@N#1->%
+ \@expl@cs@replacement@spec@@N#1%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@show@nonstop}
+% \begin{macro}{\@show@typeout}
+% And here some auxiliaries:
+% \begin{description}
+% \item[\cs{@show@nonstop}] same output as \cs{show}, but doesn't
+% stop for interaction;
+% \item[\cs{@show@typeout}] same output as \cs{showtokens}, but
+% doesn't stop for interaction.
+% \end{description}
+% \begin{macrocode}
+\def\@show@nonstop#1{%
+ \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:^^J%
+ \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1.}}
+\def\@show@typeout#1{\typeout{> #1.^^J}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Now the rollback code.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000-00-00}{\ShowEnvironment}
+%<latexrelease> {Undefine \ShowEnvironment}%
+%<latexrelease>\let\ShowEnvironment\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{Internal defining commands}
%
% These commands are used internally to define other \LaTeX{}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
index 7f4bef3bcc1..a19ffa83052 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2022/10/26 v2.2x LaTeX Kernel (Final Settings)]
+ [2022/11/30 v2.2y LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -1151,9 +1151,7 @@
\cs_set_protected:Npn \reserved@a #1
{
\cs_generate_variant:cn { text_ \str_lowercase:n {#1} case:nn } { V }
- \cs_new_protected:cpx { Make#1case \c_space_tl \c_space_tl \c_space_tl } [##1] ##2
- { \exp_not:N \@@text@case@aux { \str_lowercase:n {#1} } {##1} {##2} }
- \ExpandArgs { cnx } \NewExpandableDocumentCommand
+ \ExpandArgs { cnx } \NewExpandableDocumentCommand
{ Make#1case }
{ O{} +m }
{ \exp_not:c { Make#1case \c_space_tl \c_space_tl \c_space_tl } [####1] {####2} }
@@ -1162,6 +1160,34 @@
\reserved@a { Lower }
\reserved@a { Title }
% \end{macrocode}
+% \changes{v2.2y}{2022/11/30}{Set \cs{oe}/\cs{OE} equal to act as a marker for \pkg{babel}}
+% Currently, \pkg{babel} uses the equivalence of \cs{oe} and \cs{OE} to force casing of
+% some material, most notably in \cs{today}. To enable that to work, we have to set those
+% commands equal even though the current case changing code does not work using this
+% approach.
+% \begin{macrocode}
+\cs_new_protected:cpn { MakeLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {
+ \let \kernel@saved@OE \OE
+ \let \OE \oe
+ \@@text@case@aux { lower } {#1} {#2}
+ \let \OE \kernel@saved@OE
+ }
+\cs_new_protected:cpn { MakeUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {
+ \let \kernel@saved@oe \oe
+ \let \oe \OE
+ \@@text@case@aux { upper } {#1} {#2}
+ \let \oe \kernel@saved@oe
+ }
+\cs_new_protected:cpn { MakeTitlecase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {
+ \let \kernel@saved@oe \oe
+ \let \oe \OE
+ \@@text@case@aux { title } {#1} {#2}
+ \let \oe \kernel@saved@oe
+ }
+% \end{macrocode}
%
% \changes{v2.2u}{2022/06/02}{Add \cs{NoCaseChange}}
% \changes{v2.2u}{2022/06/30}{Add \cs{AddToNoCaseChangeList}}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx b/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx
index b7b2bf5e312..69a7ac69634 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2021/06/05 v1.1z LaTeX Kernel (Misc. Environments)]
+ [2022/11/06 v1.2a LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -270,9 +270,17 @@
% This is one of the few places where we already add data and rules
% to a hook already in the kernel.
% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
+% \changes{v1.2a}{2022/11/06}{Repeat release info at the end (gh/944)}
% \begin{macrocode}
\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
+\AddToHook{enddocument/info}[kernel/release]{%
+ \let\show@release@info\wlog
+ \show@release@info{ ***********}%
+ \the\LaTeXReleaseInfo
+ \show@release@info{ ***********}}
+
+\DeclareHookRule{enddocument/info}{kernel/release}{before}{kernel/filelist}
\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx b/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx
index ae29c1acade..7aa07f754ba 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx
@@ -32,8 +32,8 @@
%%% From File: ltshipout.dtx
%
% \begin{macrocode}
-\providecommand\ltshipoutversion{v1.0m}
-\providecommand\ltshipoutdate{2022/08/26}
+\providecommand\ltshipoutversion{v1.0n}
+\providecommand\ltshipoutdate{2022/11/08}
% \end{macrocode}
%
%<*driver>
@@ -75,7 +75,7 @@
% \providecommand\pkg[1]{\texttt{#1}}
%
%
-% \title{The \texttt{ltshipout} package\thanks{This package has version
+% \title{The \texttt{ltshipout} documentation\thanks{This file has version
% \ltshipoutversion\ dated \ltshipoutdate, \copyright\ \LaTeX\
% Project.}}
%
@@ -241,6 +241,18 @@
% But being placed after the main box content it will be typeset
% later and thus overprints it (i.e., is in the foreground).
%
+% \item[\hook{shipout}]
+% This hook is executed after foreground and/or background
+% material has been added, i.e., just in front of the actual
+% shipout operation. Its purpose is to allow manipulation of the
+% finalized box (stored in \cs{ShipoutBox}) with the extra
+% material also in place (which is not yet the case in
+% \hook{shipout/before}).
+%
+% It cannot be used to cancel the shipout operation via
+% \cs{DiscardShipoutBox} (that has
+% to happen in \hook{shipout/before}, if desired!
+%
%
% \item[\hook{shipout/firstpage}]
%
@@ -296,7 +308,7 @@
% actual shipout. It is even run if there was a
% \cs{DiscardShipoutBox} request in the document.
%
-% The other hooks (except \hook{shipout/after}) are added inside
+% The other hooks (except \hook{shipout} and \hook{shipout/after}) are added inside
% hboxes to the box being shipped out in the following order:
% \begin{center}
% \begin{tabular}{ll}
@@ -307,9 +319,13 @@
% \hook{shipout/lastpage} & only on the last page \\
% \end{tabular}
% \end{center}
-% If any of the hooks has no code then that particular no box is
+% If any of the hooks has no code then the corresponding box is
% added at that point.
%
+% Once the (page) box has got the above extra content it can
+% again be manipulated using the \hook{shipout} hook and then
+% is shipped out for real.
+%
% Once the (page) box has been shipped out the \hook{shipout/after}
% hook is called (while you are still inside the output routine). It
% is not called if the shipout box was discarded.
@@ -381,13 +397,16 @@
%
% \fmi{Once we have a new mark mechanism available we can improve
% on that and make sure that the declaration applies to the page
-% that contains it.}
+% that contains it --- not done (yet)}
+%
+% \cs{DiscardShipoutBox} cannot be used in any of the \hook{shipout/...}
+% hooks other than \hook{shipout/before}.
% \end{function}
%
% In the \pkg{atbegshi} package there are a number of additional
% commands for use inside the \hook{shipout/before} hook. They
% should normally not be needed any more as one can instead simply
-% add code to the hooks \hook{shipout/before},
+% add code to the hooks \hook{shipout/before}, \hook{shipout},
% \hook{shipout/background} or
% \hook{shipout/foreground}.\footnote{If that assumption turns out to
% be wrong it would be trivial to change them to public functions
@@ -401,7 +420,9 @@
%
% \begin{variable}{pre_shipout_filter}
% Under Lua\TeX{} the \texttt{pre\_shipout\_filter} Lua callback is
-% provided which gets called immediately before the shipout primitive gets invoked.
+% provided which gets called directly after the
+% \hook{shipout} hook, immediately before the shipout
+% primitive gets invoked.
% The signature is
% \begin{verbatim}
% function(<node> head)
@@ -1014,15 +1035,20 @@
\_@@_add_foreground_box:n
{ \UseHook{shipout/lastpage}
\@kernel@after@shipout@lastpage }
- \bool_gset_true:N \g_@@_lastpage_handled_bool
% \end{macrocode}
% We record that we have handled the \hook{shipout/lastpage} hook
% but only if we really did.
% \changes{v1.0m}{2022/05/08}{Handle case where shipout/lastpage is
% run too early (gh/813)}
% \begin{macrocode}
+ \bool_gset_true:N \g_@@_lastpage_handled_bool
}
}
+% \end{macrocode}
+%
+% \changes{v1.0n}{2022/11/08}{Add shipout hook (gh/920)}
+% \begin{macrocode}
+ \hook_use:n {shipout}
\@@_finalize_box:
% \end{macrocode}
% Finally we run the actual \TeX{} primitive for shipout. As that will
@@ -1116,13 +1142,14 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{shipout/before,shipout/after,
+% \begin{macro}{shipout/before,shipout,shipout/after,
% shipout/foreground,shipout/background,
-% shipout/firstpage,
-% shipout/lastpage}
+% shipout/firstpage,shipout/lastpage}
% Declaring all hooks for the shipout code.
+% \changes{v1.0n}{2022/11/08}{Add shipout hook (gh/920)}
% \begin{macrocode}
\hook_new:n{shipout/before}
+\hook_new:n{shipout}
\hook_new:n{shipout/after}
\hook_new:n{shipout/foreground}
\hook_new:n{shipout/background}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltspace.dtx b/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
index feb82730ece..30bda278fbf 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2020/05/06 v1.3n LaTeX Kernel (spacing)]
+ [2022/11/28 v1.3o LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -438,12 +438,13 @@
% \cs{setlength}. This way the \texttt{calc} package can operate on
% the argument value.
% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \changes{v1.3o}{2022/11/28}{Support calc syntax without a group (gh/967)}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\@vspace@calcify}{Add calc support}%
-\def\@vspace@calcify#1{\begingroup\setlength\skip@{#1}\vskip\skip@\endgroup}
+\def\@vspace@calcify#1{\setlength\sp@ce@skip{#1}\vskip\sp@ce@skip}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
@@ -1261,12 +1262,21 @@
% {(RmS) Removed superfluous \cs{leavevmode} in \cs{@hspace} and
% \cs{@hspacer}, as suggested by CAR.}
% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \changes{v1.3o}{2022/11/28}{Support calc syntax correctly (gh/967)}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\@hspace}{Support calc with \hspace}%
-\def\@hspace#1{\begingroup\setlength\skip@{#1}\hskip\skip@\endgroup}
+% \end{macrocode}
+% We use a private register to calculate the space (if \pkg{calc} is used). Previously
+% we used a group but that results in
+% \cs{everypar} etc.\ being executed inside the group if the \cs{hspace} starts a paragraph.
+% This is a bug fix so
+% we do not provide rollback to the incorrect intermediate version.
+% \begin{macrocode}
+\newskip\sp@ce@skip
+\def\@hspace#1{\setlength\sp@ce@skip{#1}\hskip\sp@ce@skip}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
index a170ce98e10..eae29f0f014 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
- [2022/02/28 v1.1i LaTeX Kernel (Version Info)]
+ [2022/11/06 v1.1j LaTeX Kernel (Version Info)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltvers.dtx}
@@ -112,10 +112,10 @@
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<*2ekernel|latexrelease>
- {2023-05-01}
+ {2023-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{-0}
+\def\patch@level{-1}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
@@ -178,20 +178,33 @@
% by a loader (\texttt{.ini} file)}
% \changes{v1.0v}{2015/08/23}{Allow negative patchlevel for pre-release}
% \changes{v1.1e}{2020/01/31}{Allow for upcoming format as pre-release 0}
+% \changes{v1.1j}{2022/11/06}{Repeat release info at the end (gh/944)}
+%
+% We store release info in the toks \cs{LaTeXReleaseInfo} to be
+% used in \cs{everyjob} but also when \verb=\end{document}= is
+% executed.
+% Instead of using \cs{typeout} we use \cs{show@release@info} so
+% that we can write to the log only by changing that to \cs{wlog}.
+% \begin{macrocode}
+\newtoks\LaTeXReleaseInfo
+\everyjob\expandafter{\the\everyjob\the\LaTeXReleaseInfo}
+\let\show@release@info\typeout
+% \end{macrocode}
+%
% \begin{macrocode}
\ifnum0\ifnum\patch@level=0 \ifx\development@branch@name\@empty 1\fi\fi>0 %
- \everyjob\expandafter{\the\everyjob
- \typeout{\fmtname\space <\fmtversion>}}
+ \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo
+ \show@release@info{\fmtname\space <\fmtversion>}}
\immediate
\write16{\fmtname \space<\fmtversion>}
\else\ifnum\patch@level>0
- \everyjob\expandafter{\the\everyjob
- \typeout{\fmtname\space <\fmtversion> patch level \patch@level}}
+ \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo
+ \show@release@info{\fmtname\space <\fmtversion> patch level \patch@level}}
\immediate
\write16{\fmtname\space <\fmtversion> patch level \patch@level}
\else
- \everyjob\expandafter{\the\everyjob
- \typeout{\fmtname\space <\fmtversion>
+ \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo
+ \show@release@info{\fmtname\space <\fmtversion>
pre-release-\number-\patch@level\space
\ifx\development@branch@name\@undefined \else
\ifx\development@branch@name\@empty \else
diff --git a/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx b/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx
index 46c324c5900..6863349be3d 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2022/06/22 v2.1h Standard LaTeX documentation class]
+%<class> [2022/06/22 v2.1i Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -633,12 +633,15 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%
% \changes{v2.1f}{2022/06/03}{define \cs{pkg} and other commands}
% \changes{v2.1f}{2022/06/03}{allow \_ in macro names}
-% Some feaures from l3doc.cls
+% Some features from l3doc.cls
% \changes{v2.1g}{2022/06/14}{define \cs{pkg} but delay until begin document}
+% \changes{v2.1i}{2022/11/28}{Revert 2.1f and not use \cs{detokenize} for now (gh/962)}
+% Eventually, \cs{cs} should get the definition from \pkg{l3doc} but for now we
+% revert to the simple one from \pkg{doc}.
% \begin{macrocode}
-\DeclareRobustCommand\cs[1]{\texttt{\bslash\detokenize{#1}}}%
+%\DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}% -- def in doc.sty
\AtBeginDocument{%
- \renewcommand\PrintMacroName[1]{\MacroFont\detokenize{#1}}%
+% \renewcommand\PrintMacroName[1]{\MacroFont\string #1\ }% -- def in doc.sty
% \end{macrocode}
% We provide those delated in case somebody has loaded \texttt{csquotes}
% or makes some definitions in the preamble.