summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltvers.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltvers.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltvers.dtx153
1 files changed, 129 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltvers.dtx b/Master/texmf-dist/source/latex/base/ltvers.dtx
index c42a126a31c..af0688b887b 100644
--- a/Master/texmf-dist/source/latex/base/ltvers.dtx
+++ b/Master/texmf-dist/source/latex/base/ltvers.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2020
-% The LaTeX3 Project and any individual authors listed elsewhere
+% Copyright (C) 1993-2021
+% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
- [2020/03/02 v1.1e LaTeX Kernel (Version Info)]
+ [2021/04/16 v1.1g LaTeX Kernel (Version Info)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltvers.dtx}
@@ -112,10 +112,10 @@
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<*2ekernel|latexrelease>
- {2020-10-01}
+ {2021-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{4}
+\def\patch@level{0}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
@@ -125,7 +125,7 @@
% intended to help us internally when we locally install a
% format out of some development branch.
% \begin{macrocode}
-\edef\development@branch@name{}
+\edef\development@branch@name{develop \the\year-\the\month-\the\day}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -181,28 +181,30 @@
% \begin{macrocode}
\ifnum0\ifnum\patch@level=0 \ifx\development@branch@name\@empty 1\fi\fi>0 %
\everyjob\expandafter{\the\everyjob
- \typeout{\fmtname \space<\fmtversion>}}
+ \typeout{\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}}
+ \typeout{\fmtname\space <\fmtversion> patch level \patch@level}}
\immediate
- \write16{\fmtname \space<\fmtversion> patch level \patch@level}
+ \write16{\fmtname\space <\fmtversion> patch level \patch@level}
\else
\everyjob\expandafter{\the\everyjob
- \typeout{\fmtname \space<\fmtversion> pre-release-\number-\patch@level\space
- \ifx\development@branch@name\@undefined \else
- \ifx\development@branch@name\@empty \else
- \space (\development@branch@name\space branch)%
+ \typeout{\fmtname\space <\fmtversion>
+ pre-release-\number-\patch@level\space
+ \ifx\development@branch@name\@undefined \else
+ \ifx\development@branch@name\@empty \else
+ \space (\development@branch@name\space branch)%
\fi
\fi
}}
\immediate
- \write16{\fmtname \space<\fmtversion> pre-release-\number-\patch@level\space
- \ifx\development@branch@name\@undefined \else
- \ifx\development@branch@name\@empty \else
- \space (\development@branch@name\space branch)%
+ \write16{\fmtname\space <\fmtversion>
+ pre-release-\number-\patch@level\space
+ \ifx\development@branch@name\@undefined \else
+ \ifx\development@branch@name\@empty \else
+ \space (\development@branch@name\space branch)%
\fi
\fi
}
@@ -212,6 +214,11 @@
% \end{macrocode}
%
% \begin{macro}{\IncludeInRelease}
+% \begin{macro}{\EndIncludeInRelease}
+% \begin{macro}{\@IncludeInRelease}
+% \begin{macro}{\@IncludeInRele@se}
+% \begin{macro}{\@gobble@IncludeInRelease}
+% \begin{macro}{\@check@IncludeInRelease}
% \changes{v1.0w}{2015/02/21}
% {set \cs{@currname} empty here (in case \cs{IncludeInRelease} input early)}
% \begin{macrocode}
@@ -222,6 +229,7 @@
% \changes{v1.0m}{2015/01/17}{modified with \cs{@currname}}
% \changes{v1.0o}{2015/01/19}{Optional argument}
% \changes{v1.0q}{2015/02/19}{Swap argument order}
+% \changes{v1.1f}{2021/03/18}{Add support for usage in \cs{NewModuleRelease}}
%
% \begin{macrocode}
%<*2ekernel|latexrelease>
@@ -235,9 +243,29 @@
{There is an \string\EndIncludeRelease\space missing}%
\@includeinreleasefalse
\fi
- \kernel@ifnextchar[%
- {\@IncludeInRelease{#1}}
- {\@IncludeInRelease{#1}[#1]}}
+ \ifnum0%
+ \ifx\new@moduledate\@empty\else 1\fi
+ \ifnum \expandafter\@parse@version#1//00\@nil=0 1\fi
+ =11
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\finish@module@release{#1}}%
+ {\kernel@ifnextchar[%
+ {\@IncludeInRelease{#1}}
+ {\@IncludeInRelease{#1}[#1]}}}
+\def\finish@module@release#1#2#3{%
+ \toks@{[#1] #3}%
+ \ifnum\expandafter\@parse@version\new@moduledate//00\@nil
+ >\expandafter\@parse@version\fmtversion//00\@nil
+ \GenericInfo{}{Applying: \the\toks@}%
+ \else
+ \GenericInfo{}{Skipping: \the\toks@}%
+ \expandafter\gobble@finish@module@release
+ \fi}
+\long\def\gobble@finish@module@release#1\EndModuleRelease{%
+ \EndModuleRelease}
% \end{macrocode}
%
% If a specific date has not been specified in |latexrelease|
@@ -255,13 +283,13 @@
% that is actually reapplying what is already in the format, i.e.,
% it is useless and possibly allocating new registers. However, it
% makes the logic simpler so this is the way it is for now. In
-% theory we could always jump overthe first patch because that is
+% theory we could always jump over the first patch because that is
% only really needed for rolling forward. So maybe one day \dots
% \begin{macrocode}
\ifnum\expandafter\@parse@version#1//00\@nil
- >\expandafter\@parse@version\fmtversion//00\@nil
+ >\expandafter\@parse@version\fmtversion//00\@nil
\GenericInfo{}{Skipping: \the\toks@}%
- \expandafter\expandafter\expandafter\@gobble@IncludeInRelease
+ \expandafter\expandafter\expandafter\@gobble@IncludeInRelease
\else
\GenericInfo{}{Applying: \the\toks@}%
\@includeinreleasetrue
@@ -280,6 +308,9 @@
\@includeinreleasefalse
\else
\PackageError{latexrelease}{mis-matched EndIncludeInRelease}{}%
+\fi
+\if@skipping@module
+ \expandafter\new@module@skip
\fi}
% \end{macrocode}
%
@@ -294,13 +325,87 @@
#2#3\@end@check@IncludeInRelease{%
\ifx\@check@IncludeInRelease#2\else
\PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}%
+ \fi
+ \if@skipping@module
+ \expandafter\new@module@skip
\fi}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
+% \subsection{Declaring an all-new module}
+%
+% \begin{macro}{\if@skipping@module}
+% \begin{macro}{\NewModuleRelease}
+% \begin{macro}{\EndModuleRelease}
+% \begin{macro}{\new@module@skip}
+% \begin{macro}{\new@modulename}
+% \begin{macro}{\new@moduledate}
+%
+% When we have a whole new module, we can't roll back to a date where
+% such module exists, otherwise hundreds of \enquote{command already
+% defined} errors will pop up. But we can't skip it altogether
+% either, because the module might have changes we still want applied,
+% so a more detailed cherry-picking of code chunks have to be done.
+%
+% \changes{v1.1f}{2021/03/18}{Added \cs{NewModuleRelease}.}
+% \changes{v1.1g}{2021/04/16}
+% {\cs{NewModuleRelease} with the same arguments as \cs{IncludeInRelease}.}
% \begin{macrocode}
-%</2ekernel|latexrelease>
+\let\if@skipping@module\iffalse
+\def\@skipping@moduletrue{\let\if@skipping@module\iftrue}
+\def\@skipping@modulefalse{\let\if@skipping@module\iffalse}
+\let\new@modulename\@empty
+\let\new@moduledate\@empty
+\def\NewModuleRelease#1#2#3{%
+ \ifx\new@modulename\@empty \else
+ \@latex@error{Nested \noexpand\NewModuleRelease forbidden.}\@ehd \fi
+ \edef\new@moduledate{#1}%
+ \edef\new@modulename{#2}%
+ \GenericInfo{}{BEGIN module: \new@modulename\space (\new@moduledate)}%
+ \GenericInfo{}{ \@spaces\@spaces\@spaces\space#3\@gobble}%
+ \ifnum\sourceLaTeXdate<%
+ \expandafter\@parse@version\new@moduledate//00\@nil\relax
+ \ifnum\expandafter\@parse@version\fmtversion//00\@nil<%
+ \expandafter\@parse@version\new@moduledate//00\@nil\relax
+ \GenericInfo{}{Skipping module \new@modulename}%
+ \expandafter\expandafter
+ \expandafter\gobble@finish@module@release
+ \else
+ \GenericInfo{}{Applying module \new@modulename}
+ \@skipping@modulefalse
+ \fi
+ \else
+ \GenericInfo{}{Skipping module \new@modulename}
+ \@skipping@moduletrue
+ \expandafter\new@module@skip
+ \fi}
+\long\def\new@module@skip#1\IncludeInRelease{\IncludeInRelease}
+\def\EndModuleRelease{%
+ \ifx\new@modulename\@empty
+ \@latex@error{Extra \string\EndModuleRelease.}\@eha
+ \else
+ \GenericInfo{}{END module: \new@modulename\space (\new@moduledate)}%
+ \let\new@modulename\@empty
+ \let\new@moduledate\@empty
+ \@skipping@modulefalse
+ \fi}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
% \Finale
%
\endinput