diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-09 20:19:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-09 20:19:52 +0000 |
commit | bea33e16f382ecf8188f0b613d553f8367f8d0d3 (patch) | |
tree | e88c683b3c53728bc08b661af5d42933f6614549 /Master/texmf-dist/source/latex/base/ltclass.dtx | |
parent | 31c338d4c559ed4bd789902a355068edc3bb9776 (diff) |
latex2e (9jun23)
git-svn-id: svn://tug.org/texlive/trunk@67314 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltclass.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/ltclass.dtx | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltclass.dtx b/Master/texmf-dist/source/latex/base/ltclass.dtx index a525b6f573e..bb521485085 100644 --- a/Master/texmf-dist/source/latex/base/ltclass.dtx +++ b/Master/texmf-dist/source/latex/base/ltclass.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2022 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltclass.dtx} - [2022/10/22 v1.5e LaTeX Kernel (Class & Package Interface)] + [2023/04/14 v1.5h LaTeX Kernel (Class & Package Interface)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltclass.dtx} @@ -324,6 +324,7 @@ % % \DescribeMacro\IfPackageAtLeastTF % \DescribeMacro\IfClassAtLeastTF +% \DescribeMacro\IfFileAtLeastTF % \DescribeMacro\@ifpackagelater % \DescribeMacro\@ifclasslater % \changes{v1.1i}{2013/07/07}{Correctly describe how the date in @@ -890,12 +891,14 @@ % % \begin{macro}{\IfPackageAtLeastTF} % \begin{macro}{\IfClassAtLeastTF} +% \begin{macro}{\IfFileAtLeastTF} % \begin{macro}{\IfFormatAtLeastTF} % |\IfFormatAtLeastTF{YYYY/MM/DD}{|\meta{true % code}|}{|\meta{false code}|}| % Test if the format is later or equal to the given date. % \changes{v1.3k}{2020/04/07}{Macro added; also in rollback (gh/168)} % \changes{v1.4e}{2021/07/19}{Drop \cs{@onlypreamble}} +% \changes{v1.5g}{2023/03/28}{Added \cs{IfFileAtLeastTF} (gh/1015)} % \begin{macrocode} %</2ekernel> %<*2ekernel|latexrelease> @@ -904,6 +907,7 @@ \def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \let\IfPackageAtLeastTF\@ifpackagelater \let\IfClassAtLeastTF\@ifclasslater +\def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} % \end{macrocode} % For rollback pretend it was available since the beginning of dawn. % \begin{macrocode} @@ -914,12 +918,14 @@ %<latexrelease>\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} %<latexrelease>\let\IfPackageAtLeastTF\@ifpackagelater %<latexrelease>\let\IfClassAtLeastTF\@ifclasslater +%<latexrelease>\def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} %<latexrelease>\EndIncludeInRelease %<*2ekernel> % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\@ifl@ter} % \changes{v1.4e}{2021/07/19}{Drop \cs{@onlypreamble}} @@ -2133,13 +2139,28 @@ % {Reset \cs{CurrentOption}} % \changes{v1.3d}{2019/10/18}{Initialize \cs{...-h@@k} only when loading % the package or class (gh/198)} +% \changes{v1.5h}{2023/04/14}{Define \cs{load@onefilewithoptions} when +% in \pkg{latexrelease} (gh/992)} % \begin{macrocode} %</2ekernel> %<*2ekernel|latexrelease> %<latexrelease>\IncludeInRelease{2020/10/01}% %<latexrelease> {\@onefilewithoptions}{Hooks and unused options issue}% +% \end{macrocode} +% +% Here this macro is called \cs{@onefilewithoptions}, but further +% ahead in this file it is renamed to \cs{load@onefilewithoptions}, +% and \cs{@onefilewithoptions} becomes a wrapper around this, used for +% bookkeeping when rolling back. Therefore, when in +% \pkg{latexrelease}, we need to define \cs{load@onefilewithoptions} +% instead, thus the extra guarded \cs{def} line below: +% \begin{macrocode} +%<*2ekernel> \def\@onefilewithoptions#1[#2][#3]#4{% +%</2ekernel> +%<latexrelease>\def\load@onefilewithoptions#1[#2][#3]#4{% % \end{macrocode} +% % We have to sanitise file names, so that something like % \begin{verbatim} % \usepackage{some/local/path/array} @@ -2813,6 +2834,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 +2843,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 +2871,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 +2959,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 +2968,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% |