diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-05 21:26:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-05 21:26:43 +0000 |
commit | 89ff43d793f14242a96bd0c24e56daa29804e0d0 (patch) | |
tree | 8c71641d85fb4aa83f694771ab5df2ac1908d227 /Master/texmf-dist/source/latex-dev | |
parent | 0e33ca376dc3608120a8432ca8967d60e3c14407 (diff) |
latex-base-dev (5feb22)
git-svn-id: svn://tug.org/texlive/trunk@61902 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex-dev')
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/doc.dtx | 17 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltboxes.dtx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/lthooks.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltkeys.dtx | 33 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltplain.dtx | 145 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltvers.dtx | 2 |
6 files changed, 180 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/doc.dtx b/Master/texmf-dist/source/latex-dev/base/doc.dtx index e6b0e2cf92b..7c602327efb 100644 --- a/Master/texmf-dist/source/latex-dev/base/doc.dtx +++ b/Master/texmf-dist/source/latex-dev/base/doc.dtx @@ -43,12 +43,9 @@ %<+package> {doc-2021-06-01.sty} %<+package>\DeclareCurrentRelease{v3}{2022-06-01} %<+package> -%<*package> -%<-beta>\ProvidesPackage{doc} -%<+beta>\ProvidesPackage{doc-v3beta} -%</package> +%<+package>\ProvidesPackage{doc} %<+shortvrb>\ProvidesPackage{shortvrb} -%<+package|shortvrb> [2022/06/01 v3.0g +%<+package|shortvrb> [2022/06/01 v3.0h %<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)] %\catcode`\<=12 % @@ -1939,7 +1936,10 @@ hyperref / true .code:n = { \legacy_if_set_true:n { doc@hyperref } }, hyperref / false .code:n = { \legacy_if_set_false:n { doc@hyperref } }, hyperref .default:n = { true }, - hyperref .choice:, +% \end{macrocode} +% \changes{v3.0h}{2022/06/01}{fix choice key name (gh/750)} +% \begin{macrocode} + nohyperref .choice:, nohyperref / true .code:n = { \legacy_if_set_false:n { doc@hyperref } }, nohyperref / false .code:n = { \legacy_if_set_true:n { doc@hyperref } }, nohyperref .default:n = { true }, @@ -1950,7 +1950,10 @@ nomulticol .choice:, nomulticol / true .code:n = { \legacy_if_set_false:n { doc@multicol } }, nomulticol / false .code:n = { \legacy_if_set_true:n { doc@multicol } }, - multicol .default:n = { true }, +% \end{macrocode} +% \changes{v3.0h}{2022/06/01}{fix default key name (gh/750)} +% \begin{macrocode} + nomulticol .default:n = { true }, debugshow .choice:, debugshow / true .code:n = { \legacy_if_set_true:n { doc@debugshow } }, debugshow / false .code:n = { \legacy_if_set_false:n { doc@debugshow } }, diff --git a/Master/texmf-dist/source/latex-dev/base/ltboxes.dtx b/Master/texmf-dist/source/latex-dev/base/ltboxes.dtx index 380be09b1f2..43db541b988 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltboxes.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltboxes.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltboxes.dtx} - [2021/10/14 v1.4c LaTeX Kernel (Box Commands)] + [2022/01/31 v1.4c LaTeX Kernel (Box Commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltboxes.dtx} @@ -987,7 +987,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\parboxrestore} +% \begin{macro}{\@parboxrestore} % Restore various paragraph parameters, and also |\\|. % \begin{macrocode} \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr} diff --git a/Master/texmf-dist/source/latex-dev/base/lthooks.dtx b/Master/texmf-dist/source/latex-dev/base/lthooks.dtx index e07658fa88d..97edc2461a8 100644 --- a/Master/texmf-dist/source/latex-dev/base/lthooks.dtx +++ b/Master/texmf-dist/source/latex-dev/base/lthooks.dtx @@ -1404,7 +1404,7 @@ % hook management (by adding various rules to ensure the % appropriate ordering with respect to other code added by % packages). However, this makes every document unnecessary -% slow, because there has to be sorting even through the result is +% slow, because there has to be sorting even though the result is % predetermined. Furthermore it forces package writers to % unnecessarily add such rules if they add further code to the hook % (or break \LaTeX{}). diff --git a/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx b/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx index 3c58585de92..0ff3d9cfa38 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltkeys.dtx} - [2021/11/30 v1.0a LaTeX Kernel (Kevyal options)] + [2022/02/04 v1.0b LaTeX Kernel (Kevyal options)] % \iffalse \documentclass{l3doc} \GetFileInfo{ltkeys.dtx} @@ -70,6 +70,7 @@ % % The basic properties provided here are % \begin{itemize} +% \item \texttt{.code} --- execute arbitrary code % \item \texttt{.if} --- sets a \TeX{} \cs{if...} switch % \item \texttt{.store} --- stores a value in a macro % \item \texttt{.usage} -- defines whether the option can be given only @@ -149,6 +150,32 @@ \ExplSyntaxOn % \end{macrocode} % +% \subsection{Key properties} +% +% \begin{macro}{.code, .if, .store, .usage} +% \begin{macrocode} +\group_begin: + \cs_set_protected:Npn \@@_tmp:nn #1#2 + { + \quark_if_recursion_tail_stop:n {#1} + \cs_new_eq:cc + { \c_@@_props_root_str . #2 } + { \c_@@_props_root_str . #1 } + \@@_tmp:nn + } + \@@_tmp:nn + { code } { code } + { legacy_if_set:n } { if } + { tl_set:N } { store } + { usage:n } { usage } + { \q_recursion_tail } { } + \q_recursion_stop +\group_end: +% \end{macrocode} +% \end{macro} +% +% \subsection{Main mechanism} +% % \begin{macrocode} \cs_generate_variant:Nn \clist_put_right:Nn { Nv } % \end{macrocode} @@ -170,6 +197,8 @@ % \end{variable} % % \begin{macro}{\@@_options:Nn, \@@_options:NV} +% \changes{v1.0b}{2022/01/15} +% {Clear option list in end-of-package hook} % \begin{macro}{\@@_options_end:} % The main function calls functions to collect up the global and local % options into \cs{l_@@_options_clist} before calling the @@ -204,7 +233,7 @@ \bool_set_true:N \l_@@_options_loading_bool \keys_set:nV {#2} \l_@@_options_clist \bool_set_false:N \l_@@_options_loading_bool - \cs_set_eq:NN \@unprocessedoptions \scan_stop: + \AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: } \@@_option_end: \@@_options_loaded:n {#2} } diff --git a/Master/texmf-dist/source/latex-dev/base/ltplain.dtx b/Master/texmf-dist/source/latex-dev/base/ltplain.dtx index c6f295ef6b0..ee1cf0a1613 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltplain.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltplain.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltplain.dtx} - [2021/07/16 v2.3g LaTeX Kernel (Plain TeX)] + [2022/01/25 v2.3h LaTeX Kernel (Plain TeX)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltplain.dtx} @@ -1186,18 +1186,143 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\obeylines} -% \begin{macro}{\obeyspaces} -% In |\obeylines|, we say |\let^^M=\par| instead of |\def^^M{\par}| -% since this allows, for example, |\let\par=\cr \obeylines \halign{...| +% \begin{macro}{\obeylines,\obeyspaces} +% In |\obeylines|, we say |\let^^M=\obeyedline| instead of |\def^^M{\obeyedline}| +% since this allows, for example, +% |\let\obeyedline=\cr \obeylines \halign{...|. +% +% This is essentially a plain \TeX{} trick and in its original +% version where you had to use to use |\let\par=\cr| not really a +% safe idea in \LaTeX. If anybody used this trick +% this now breaks (and one needs to use \cs{obeyedline} instead). +% \changes{v2.3h}{2022/01/25}{Provide redirection to support special +% use cases (gh/367)} +% \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2022/06/01}{\obeylines}% +%<latexrelease> {Add a redirection to obeylines and obeyspaces}% +% \end{macrocode} +% If the active |^^M| escapes, e.g. into a \cs{write} (which is +% effectively in a different context) we don't want the definition +% from \cs{obeylines} but rather a simple \cs{par} (in fact even +% the primitive one, not the \LaTeX{} version \cs{para\_end:} which +% is only defined later. +% +% \begin{macrocode} +\begingroup +\catcode`\^^M=\active % these lines must end with % + \gdef\obeylines{\catcode`\^^M\active% + \let^^M\obeyedline% +% \end{macrocode} +% +% The next line ending the definition is rather curious and it took +% me awhile to understand why rollback fails. The problem is the +% following: if \texttt{latexrelease} is used, then blocks of +% \cs{IncludeInRelease} \dots\ \cs{EndIncludeInRelease} are +% bypassed at high speed by grabbing each as a delimited +% argument. However, in that case |^^M| is seen not as code but as +% line ending characters and in that mode \TeX{} discards +% everything from that point onwards to the real end of the line so +% it works like a comment --- pretty strange really (and I think +% due to the fact the the original pascal compiler could have some +% garbage showing up after the normal line ending character. Thus +% we really have to make sure that any closing braces is not one +% the same line as an |^^M|, because otherwise it would get dropped +% and we end with unbalanced braces and never see the +% \cs{EndIncludeInRelease} --- weird. In other places it doesn't +% matter because we aren't using the incomplete result. % \begin{macrocode} -{\catcode`\^^M=\active % these lines must end with % - \gdef\obeylines{\catcode`\^^M\active \let^^M\par}% - \global\let^^M\par} % this is in case ^^M appears in a \write -\def\obeyspaces{\catcode`\ \active} -{\obeyspaces\global\let =\space} + }% + \global\let^^M\par % this is in case ^^M appears in a \write +\endgroup +% \end{macrocode} +% +% \begin{macro}{\obeyedline} +% The \cs{obeyedline} expands by default to +% \cs{par} with whatever definition \cs{par} has when it is +% executed. It can, however, be +% redefined (before calling \cs{obeylines}!) to achieve some +% special effects. If you want to alter is definition when already +% in the scope of \cs{obeylines}, it has no effect (because +% \cs{let} is used above). +% In that case simply make another call to \cs{obeylines} +% immediately. As you are in a restricted scope all that happens is +% that your redefinition is applied. +% +% For the default definition we have to use \cs{def} not \cs{let} +% because the meaning of \cs{par} can change and we want to use the +% one that is current when \cs{obeylines} act. +% +% There is a small subtlety here: in an \cs{edef} the active |^^M| stayed +% put (because it was equal to to the primitive \cs{par}), now +% \cs{obeyedline} expands and you get what it contains, i.e., in that +% case \cs{par}, into the \cs{edef} or \cs{mark} unless we use +% \cs{protected} on it. +% \begin{macrocode} +\protected\gdef\obeyedline{\par} % \end{macrocode} % \end{macro} +% +% \begin{macro}{\obeyedspace} +% The definition of \cs{obeyspaces} is changed in the same way and +% now executes \cs{obeyedspace} for each active space. +% \begin{macrocode} +\global\let\obeyedspace\space +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\begingroup +\catcode`\ =\active% +\gdef\obeyspaces{\catcode`\ \active\let =\obeyedspace}% +% \end{macrocode} +% An active space elsewhere generates \cs{space} by default +% (for example in a \cs{write}). +% \begin{macrocode} +\global\let =\space% +\endgroup +% \end{macrocode} +% +% \begin{macrocode} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}{\obeylines}% +%<latexrelease> {Add a redirection to obeylines and obeyspaces}% +%<latexrelease> +% \end{macrocode} +% From 2019 onwards the commands are made robust (somewhat later in +% the kernel sources). So if we roll back they are robust, so when +% redefining them we have get rid of the robust payload +% first. Otherwise that is seen by the later rollback below, which +% then installs a fragile version of the new definition on top of +% the one we roll back to here, sigh. \cs{kernel@make@fragile} also +% changes its definition (later own) so this is done directly. +% \begin{macrocode} +%<latexrelease>\expandafter\let\csname obeylines \endcsname\@undefined +%<latexrelease>\expandafter\let\csname obeyspace \endcsname\@undefined +%<latexrelease> +%<latexrelease>\begingroup +%<latexrelease>\catcode`\^^M=\active % these lines must end with % +%<latexrelease> \gdef\obeylines{\catcode`\^^M\active \let^^M\par % +% \end{macrocode} +% Closing brace on a separate line (see comment above). +% \begin{macrocode} +%<latexrelease> }% +% \end{macrocode} +% Another pitfall: if we do a rollback \cs{par} is no longer the +% primitive, so the roll back definition needs \cs{let} to what is +% new the primitive. +% \begin{macrocode} +%<latexrelease> \global\let^^M\RawParEnd % this is in case ^^M appears in a \write +%<latexrelease>\endgroup +%<latexrelease>\def\obeyspaces{\catcode`\ \active} +%<latexrelease> +%<latexrelease>\let\obeyedline\@undefined +%<latexrelease>\let\obeyedspace\@undefined +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} % \end{macro} % % \begin{macro}{\loop} diff --git a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx index 451b9f51a15..0bf753f210b 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx @@ -115,7 +115,7 @@ {2022-06-01} %</2ekernel|latexrelease> %<*2ekernel> -\def\patch@level{-1} +\def\patch@level{-2} % \end{macrocode} % % \begin{macro}{\development@branch@name} |