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.dtx80
1 files changed, 42 insertions, 38 deletions
diff --git a/macros/latex-dev/base/ltclass.dtx b/macros/latex-dev/base/ltclass.dtx
index e14fb1ef40..9e7668e88e 100644
--- a/macros/latex-dev/base/ltclass.dtx
+++ b/macros/latex-dev/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2020/01/05 v1.3f LaTeX Kernel (Class & Package Interface)]
+ [2020/01/28 v1.3h LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -156,7 +156,7 @@
% some comments about how it was produced.
%
% The environment can also be called with an optional argument which is
-% used to alter some of its behavior: option \texttt{force} or
+% used to alter some of its behavior: option \texttt{force} or
% \texttt{overwrite} will allow for overwriting existing files,
% option \texttt{nosearch} will only check the current directory
% when looking if the file exists. This can be useful if you want to
@@ -172,10 +172,10 @@
% A possible use case for using it inside the document body is if you
% want to reuse some text several times in the document you could then
% write it and later use \cs{input} to retrieve it where needed.
-%
+%
%
% The begin and end tags should each be on a
-% line by itself.
+% line by itself.
%
% \subsection{Option processing}
%
@@ -362,7 +362,7 @@
%
% |\DeclareOption*{\PassOptionsToPackage{\CurrentOption}|^^A
% |{|\meta{pkg-name}|}|\\
-% Handle the the current option by passing it on to the package
+% 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
% `extension' packages, that perhaps handle a couple of new options,
@@ -671,7 +671,7 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
+%
% \begin{macrocode}
\@onlypreamble\@ifl@t@r
% \end{macrocode}
@@ -847,11 +847,11 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
+%
% \begin{macrocode}
\@onlypreamble\@pr@videpackage
% \end{macrocode}
-%
+%
%
%
% \begin{macro}{\ProvidesClass}
@@ -975,7 +975,7 @@
% \end{macro}
%
% \begin{macro}{\default@ds}
-% The default default option code.
+% The default option code.
% Set by |\@onefilewithoptions| to either |\OptionNotUsed| for
% classes, or |\@unknownoptionerror| for packages. This may be reset
% in either case with |\DeclareOption*|.
@@ -1406,8 +1406,8 @@
% \begin{macrocode}
\def\reserved@b##1,{%
% \end{macrocode}
-% If |#1| is |\@nnil| we have reached the end of the list
-% (older version used |\@nil| here but |\@nil| is undefined so |\ifx|
+% If |#1| is |\@nnil| we have reached the end of the list
+% (older version used |\@nil| here but |\@nil| is undefined so |\ifx|
% equal to all undefined commands)
% \begin{macrocode}
\ifx\@nnil##1\relax\else
@@ -1802,13 +1802,16 @@
% To handle the optional argument we execute for each option the
% command \cs{filec@ntents@OPTION} if it exist or complain about
% 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)}
% \begin{macrocode}
\def\filec@ntents@opt[#1]{%
- \@for\@tempa:=#1\do{%
- \ifcsname filec@ntents@\@tempa\endcsname
- \csname filec@ntents@\@tempa\endcsname
+ \edef\@fortmp{\zap@space#1 \@empty}%
+ \@for\@reserveda:=\@fortmp\do{%
+ \ifcsname filec@ntents@\@reserveda\endcsname
+ \csname filec@ntents@\@reserveda\endcsname
\else
- \@latex@error{Unknown filecontents option #1}%
+ \@latex@error{Unknown filecontents option \@reserveda}%
{Valid options are force (or overwrite), nosearch, noheader}%
\fi}%
\filec@ntents
@@ -1837,7 +1840,7 @@
\let\filec@ntents@checkdir\@empty
\def\filec@ntents@where{exists on the system}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\begingroup%
\@tempcnta=1
@@ -1890,7 +1893,7 @@
% by mistake overwriting the input file (\cs{jobname}). Of course,
% this only works for input files ending in \texttt{.tex}. If a
% different extension is used there is no way to see that we are
-% overwriting outselves!
+% overwriting ourselves!
% \begin{macrocode}
\edef\reserved@a{#1}%
\edef\reserved@a{\detokenize\expandafter{\reserved@a}}%
@@ -1906,12 +1909,13 @@
% \end{macrocode}
% We allocate a write channel but we open it only if it is
% (hopefully) safe. If not opened that means we are going to write
-% on the terminal.
+% on the terminal.
+% \changes{v1.3g}{2020/01/27}{Fix typo in error message}
% \begin{macrocode}
\ch@ck7\reserved@c\write\relax%
\if@filesw% % Foul ... trying to overwrite \jobname!
\@latex@error{Trying to overwrite `\jobname.tex'}{You can't %
- write to the file you a reading from!\MessageBreak%
+ write to the file you are reading from!\MessageBreak%
Data is written to screen instead.}%
\else%
\@latex@warning@no@line%
@@ -1921,7 +1925,7 @@
\fi%
\fi%
% \end{macrocode}
-% Closing the \cs{@inputcheck} is done here ot avoid having to do
+% Closing the \cs{@inputcheck} is done here to avoid having to do
% this in each branch.
% \begin{macrocode}
\closein\@inputcheck%
@@ -2145,7 +2149,7 @@
% \section{Package/class rollback mechanism}
%
%
-%
+%
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexreleasefirst>
@@ -2169,7 +2173,7 @@
% \begin{macro}{\requestedLaTeXdate}
% The macro (!) |\requestedLaTeXdate| holds the globally requested
% rollback date (via \texttt{latexrelease}) or zero if no such
-% request was made.
+% request was made.
% \begin{macrocode}
\def\requestedLaTeXdate{0}
% \end{macrocode}
@@ -2244,7 +2248,7 @@
\ifx\load@onefilewithoptions\@undefined
\let\load@onefilewithoptions\@onefilewithoptions
% \end{macrocode}
-%
+%
% \begin{macrocode}
\def\@onefilewithoptions#1[#2][#3]#4{%
% \end{macrocode}
@@ -2295,7 +2299,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
%
% \begin{macro}{\pkgcls@parse@date@arg}
% The |\pkgcls@parse@date@arg| command parses the second optional
@@ -2329,8 +2333,8 @@
% So in summary we have:
% \begin{flushleft}
% \hspace*{-1in}\begin{tabular}{ccccc@{}}
-% Input & & \cs{pkgcls@targetdate}
-% & \cs{pkgcls@targetlabel}
+% Input & & \cs{pkgcls@targetdate}
+% & \cs{pkgcls@targetlabel}
% & \cs{pkgcls@mindate}\\[3pt]
% \meta{empty} & $\to$ & \meta{global-rollbackdate-as-number}
% & \meta{empty} & \meta{empty}
@@ -2341,7 +2345,7 @@
% \texttt{=}\meta{date} & $\to$ & \meta{date-as-number}
% & \meta{empty} & \meta{empty}
% \\
-% \texttt{=}\meta{version}& $\to$ & \texttt{1}
+% \texttt{=}\meta{version}& $\to$ & \texttt{1}
% & \meta{version} & \meta{empty}
% \\
% \meta{other} & $\to$ & \meta{global-rollbackdate-as-number}
@@ -2351,7 +2355,7 @@
% \end{flushleft}
% where \meta{global-rollbackdate-as-number} is a date request given
% via \texttt{latexrelease} or if there wasn't one \texttt{0}.
-%
+%
% \begin{macrocode}
\def\pkgcls@parse@date@arg #1{%
% \end{macrocode}
@@ -2373,7 +2377,7 @@
\fi
}
% \end{macrocode}
-% The actual parsing work then happens in |\pkgcls@parse@date@arg@|:
+% The actual parsing work then happens in |\pkgcls@parse@date@arg@|:
% \begin{macrocode}
\def\pkgcls@parse@date@arg@#1=#2\@nil{%
% \end{macrocode}
@@ -2411,7 +2415,7 @@
\else
% \end{macrocode}
% If |#1| was not empty then there wasn't a \texttt{=} character in
-% first position so we we are dealing either with a ``minimum
+% first position so we are dealing either with a ``minimum
% date'' or with some incorrect data. We assume the former and make
% the following assignments (the first one finishing the assignment
% of |\pkgcls@targetdate|):
@@ -2429,9 +2433,9 @@
% \begin{macrocode}
\ifnum \pkgcls@targetdate > \z@
\ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate
- \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak
+ \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak
A minimal date of #1 has been specified for
- \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak
+ \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak
But this is in conflict
with a rollback request to \requestedpatchdate}
\fi
@@ -2439,7 +2443,7 @@
\fi
}
% \end{macrocode}
-% Strip off te trailing \texttt{=} and assign the version name to
+% Strip off the trailing \texttt{=} and assign the version name to
% |\pkgcls@targetlabel|.
% \begin{macrocode}
\def\pkgcls@parse@date@arg@version#1={%
@@ -2531,7 +2535,7 @@
\pkgcls@debug{New candidate: #3}%
%</tracerollback>
\fi
- \else
+ \else
% \end{macrocode}
% If we end up in this branch we have a named version request. So
% we check if |\pkgcls@targetlabel| matches the current name and if
@@ -2607,7 +2611,7 @@
date
\ifnum\requestedLaTeXdate=\pkgcls@targetdate
\requestedpatchdate
- \else
+ \else
\expandafter\@gobble\pkgcls@arg
\fi.\MessageBreak
% \end{macrocode}
@@ -2617,7 +2621,7 @@
% \begin{macrocode}
Best approximation is
\else
- version '\pkgcls@targetlabel'.\MessageBreak
+ version '\pkgcls@targetlabel'.\MessageBreak
This corresponds to
\fi
\ifx\@nil#2\@nil
@@ -2636,11 +2640,11 @@
%
% A similar error is given if global rollback date and min-date on
% a specific package conflict with each other, but that case is
-% happens only once so it is is inlined.
+% happens only once so it is inlined.
% \begin{macrocode}
\def\pkgcls@rollbackdate@error#1{%
\@latex@error{Suspicious rollback date given}%
- {The \@cls@pkg\space'\@currname' claims that it
+ {The \@cls@pkg\space'\@currname' claims that it
came into existence on #1 which\MessageBreak
is after your requested rollback date --- so
something is wrong here.\MessageBreak