summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/ltclass.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/base/ltclass.dtx')
-rw-r--r--macros/latex-dev/base/ltclass.dtx38
1 files changed, 30 insertions, 8 deletions
diff --git a/macros/latex-dev/base/ltclass.dtx b/macros/latex-dev/base/ltclass.dtx
index bb52148508..c6c0495fca 100644
--- a/macros/latex-dev/base/ltclass.dtx
+++ b/macros/latex-dev/base/ltclass.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2023
+% Copyright (C) 1993-2024
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2023/04/14 v1.5h LaTeX Kernel (Class & Package Interface)]
+ [2024/02/14 v1.5i LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -390,7 +390,7 @@
% package files.)
%
% |\DeclareOption*{\PassOptionsToPackage{\CurrentOption}|^^A
-% |{|\meta{pkg-name}|}|\\
+% |{|\meta{pkg-name}|}}|\\
% Handle the current option by passing it on to the package
% \meta{pkg-name}, which will presumably be loaded via
% |\RequirePackage| later in the file. This is useful for building
@@ -1950,12 +1950,34 @@
% \end{macro}
%
% \begin{macro}{\@fileswithoptions}
+% \changes{v1.5i}{2024/01/30}{Test group level}
% The common part of |\documentclass| and |\usepackage|.
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2024/06/01}%
+%<latexrelease> {\@fileswithoptions}{Check Group}%
+%<*2ekernel|latexrelease>
\def\@fileswithoptions#1{%
+ \ifnum\currentgrouplevel>\z@
+ \@latex@error
+ {Loading a class or package in a group}%
+ {Classes and packages should only be loaded at the top level}%
+ \fi
\@ifnextchar[%]
{\@fileswith@ptions#1}%
{\@fileswith@ptions#1[]}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@fileswithoptions}{Check Group}%
+%<latexrelease>\def\@fileswithoptions#1{%
+%<latexrelease> \@ifnextchar[%]
+%<latexrelease> {\@fileswith@ptions#1}%
+%<latexrelease> {\@fileswith@ptions#1[]}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \begin{macrocode}
\@onlypreamble\@fileswithoptions
% \end{macrocode}
%
@@ -2624,8 +2646,8 @@
%
% Allow code to be saved to be executed at specific later times.
%
-% Save things in macros, I considered using toks registers, (and
-% |\addto@hook| from the NFSS code, that would require stacking the
+% Here we save things in macros. I considered using toks registers (and
+% |\addto@hook| from the NFSS code), but that would require stacking the
% contents in the case of required packages, so just generate a new
% macro for each package.
% \begin{macro}{\@begindocumenthook}
@@ -2997,7 +3019,7 @@
\let\do\@makeother\dospecials%
% \end{macrocode}
% If there are active characters in the upper half (e.g., from
-% \texttt{inputenc} there would be confusion so we render everything
+% \texttt{inputenc}) there would be confusion so we render everything
% harmless.
% \changes{v1.2f}{2018/03/27}
% {Use full file name for old release}
@@ -3585,7 +3607,7 @@
% and therefore we can now test its value. If the value is zero we
% assume that the remaining argument string represents a version
% and change |\pkgcls@targetdate| and set |\pkgcls@targetlabel| to
-% the version name (after stripping off the trailing \texttt{=}.
+% the version name (after stripping off the trailing \texttt{=}).
% \begin{macrocode}
\ifnum \pkgcls@targetdate=\z@
\pkgcls@targetdate\@ne
@@ -3695,7 +3717,7 @@
% late, but if there wasn't one (i.e., if current release is the
% oldest that exists) we use it as the best choice. However in
% that case something is wrong (as there shouldn't be a rollback to
-% a date where a package used doesn't yet exists. So we make a
+% a date when a package used didn't yet exists). So we make a
% complained to the user.
% \begin{macrocode}
\ifx\pkgcls@candidate\@empty