diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-13 21:35:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-13 21:35:18 +0000 |
commit | 07df7cbdd54b0d08935f3c9f90881763e705038e (patch) | |
tree | 195766c19349f38120f83bff80b049e8b67afbc1 /Master/texmf-dist/source/latex-dev/base/ltclass.dtx | |
parent | ce9eb3564e7376e4452732aef5229a8461f52a09 (diff) |
latex-dev (13jan20)
git-svn-id: svn://tug.org/texlive/trunk@53395 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base/ltclass.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltclass.dtx | 72 |
1 files changed, 63 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx index 9dc65d2bb9b..e14fb1ef404 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2019 +% Copyright (C) 1993-2020 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltclass.dtx} - [2019/10/18 v1.3d LaTeX Kernel (Class & Package Interface)] + [2020/01/05 v1.3f LaTeX Kernel (Class & Package Interface)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltclass.dtx} @@ -791,19 +791,69 @@ \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%] \@onlypreamble\ProvidesPackage % \end{macrocode} +% \end{macro} +% +% % +% \begin{macro}{\@pr@videpackage} +% This is the helper command for \cs{ProvidesPackage}. It tries to +% be cautious when handling the identification string in case it +% contains UTF-8 characters. +% \changes{v1.3e}{2019/11/29}{Protect package info text (gh/52)} % \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2020/02/02}% +%<latexrelease> {\@pr@videpackage}{Protection for package info}% \def\@pr@videpackage[#1]{% - \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}% + \expandafter\protected@xdef % <-- protected... + \csname ver@\@currname.\@currext\endcsname{#1}% \ifx\@currext\@clsextension \typeout{Document Class: \@gtempa\space#1}% \else - \wlog{Package: \@gtempa\space#1}% + \protected@wlog{Package: \@gtempa\space#1}% <--- protected \fi} -\@onlypreamble\@pr@videpackage % \end{macrocode} % \end{macro} % +% +% +% \begin{macro}{\protected@wlog} +% This is like plain \TeX's \cs{wlog} but gracefully handles +% protected commands. +% \begin{macrocode} +\long\def\protected@wlog#1{\begingroup + \set@display@protect + \immediate \write \m@ne {#1}\endgroup } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macrocode} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@pr@videpackage}{Protection for package info}% +%<latexrelease> +%<latexrelease>\def\@pr@videpackage[#1]{% +%<latexrelease> \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}% +%<latexrelease> \ifx\@currext\@clsextension +%<latexrelease> \typeout{Document Class: \@gtempa\space#1}% +%<latexrelease> \else +%<latexrelease> \wlog{Package: \@gtempa\space#1}% +%<latexrelease> \fi} +%<latexrelease>\let\protected@wlog\@undefined +%<latexrelease> +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% +% \begin{macrocode} +\@onlypreamble\@pr@videpackage +% \end{macrocode} +% +% +% % \begin{macro}{\ProvidesClass} % Like |\ProvidesPackage|, but for classes. % \begin{macrocode} @@ -1731,6 +1781,7 @@ % filecontents environment file name} % \changes{v1.3b}{2019/08/27}{Make various commands robust} % \changes{v1.3c}{2019/09/11}{Support optional argument for filecontents} +% \changes{v1.3f}{2020/01/05}{Support more write streams in LuaTeX gh/238} % %</2ekernel> %<*2ekernel|latexrelease> @@ -1805,6 +1856,11 @@ \gdef\filec@ntents#1{% \set@curr@file{\filec@ntents@checkdir#1}% \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}% +% \end{macrocode} +% +% Lua\TeX\ has more writes (and 18 is safe here). +% \begin{macrocode} + \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi% \openin\@inputcheck\q@curr@file \space % \ifeof\@inputcheck% \@latex@warning@no@line% @@ -1814,8 +1870,7 @@ % \changes{v1.0y}{1997/10/10} % {\cs{reserved@c} not \cs{verbatim@out} to save a csname} % \begin{macrocode} - \chardef\reserved@c15 % - \ch@ck7\reserved@c\write% + \ch@ck7\reserved@c\write\relax% \immediate\openout\reserved@c\q@curr@file\relax% \else% % \end{macrocode} @@ -1853,8 +1908,7 @@ % (hopefully) safe. If not opened that means we are going to write % on the terminal. % \begin{macrocode} - \chardef\reserved@c15 % - \ch@ck7\reserved@c\write% + \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% |