summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/ltvers.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-05 03:02:17 +0000
committerNorbert Preining <norbert@preining.info>2021-05-05 03:02:17 +0000
commit75db33dc347ec9cfbaa2f3ec538a2697351f571b (patch)
tree0ea6d721f8478ed9ae95c93330c94aa8fcfd30b8 /macros/latex-dev/base/ltvers.dtx
parent342f2e1be699f5ec70b5b1c35d9cd59798d37304 (diff)
CTAN sync 202105050302
Diffstat (limited to 'macros/latex-dev/base/ltvers.dtx')
-rw-r--r--macros/latex-dev/base/ltvers.dtx121
1 files changed, 112 insertions, 9 deletions
diff --git a/macros/latex-dev/base/ltvers.dtx b/macros/latex-dev/base/ltvers.dtx
index 26eaee9890..fe50d75a8f 100644
--- a/macros/latex-dev/base/ltvers.dtx
+++ b/macros/latex-dev/base/ltvers.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
- [2021/01/15 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>
- {2021-05-01}
+ {2021-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{-2}
+\def\patch@level{-3}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
@@ -214,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}
@@ -224,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>
@@ -237,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|
@@ -261,9 +287,9 @@
% 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
@@ -282,6 +308,9 @@
\@includeinreleasefalse
\else
\PackageError{latexrelease}{mis-matched EndIncludeInRelease}{}%
+\fi
+\if@skipping@module
+ \expandafter\new@module@skip
\fi}
% \end{macrocode}
%
@@ -296,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