summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex-dev
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-17 20:01:08 +0000
committerKarl Berry <karl@freefriends.org>2022-07-17 20:01:08 +0000
commitea754d8138c914e69555b2cf181ac05cdbe9b8fd (patch)
treec7c754bff8964c6c52dd71ce1dc790dcd529b3ca /Master/texmf-dist/source/latex-dev
parentaad6090f06fd84391dbcac7f0617d77d510d3a22 (diff)
latex-base-dev (17jul22)
git-svn-id: svn://tug.org/texlive/trunk@63922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex-dev')
-rw-r--r--Master/texmf-dist/source/latex-dev/base/classes.dtx4
-rw-r--r--Master/texmf-dist/source/latex-dev/base/cmfonts.fdd40
-rw-r--r--Master/texmf-dist/source/latex-dev/base/doc.dtx126
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltclass.dtx9
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltfinal.dtx112
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx66
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx17
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltkeys.dtx64
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltvers.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx8
10 files changed, 237 insertions, 211 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/classes.dtx b/Master/texmf-dist/source/latex-dev/base/classes.dtx
index 857cfc799ee..188679d4d94 100644
--- a/Master/texmf-dist/source/latex-dev/base/classes.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/classes.dtx
@@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{classes.drv}
%</driver>
- [2021/10/04 v1.4n
+ [2022/07/02 v1.4n
%<article|report|book> Standard LaTeX document class]
%<10pt|11pt|12pt> Standard LaTeX file (size option)]
% \end{macrocode}
@@ -2538,7 +2538,7 @@
% The macro above uses |\@makechapterhead|\meta{text} to format the
% heading of the chapter.
%
-% We begin by leaving some white space. The we open a group in
+% We begin by leaving some white space. Then we open a group in
% which we have a paragraph indent of 0pt, and in which we have the
% text set ragged right. We also reset the font.
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with
diff --git a/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd b/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd
index f991ee564ee..477085eaeff 100644
--- a/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd
+++ b/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2019
+% Copyright 1993-2022
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
@@ -67,7 +67,7 @@
%<*driver, >
\ProvidesFile{cmfonts.drv}
%</driver, >
- [2019/12/16 v2.5j Standard LaTeX font definitions]
+ [2022/07/10 v2.5l Standard LaTeX font definitions]
%
%<*driver>
\documentclass{ltxdoc}
@@ -261,13 +261,13 @@
% (thanks to Christian Cornelssen)}
% \begin{macrocode}
%<*new|ec>
-%<*!tt>
+%<*!tt&!T1cmss>
\providecommand{\EC@family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
%<ec> <17.28><20.74><24.88><29.86><35.83>genb*#5}{}}
%<!ec> <17.28><20.74><24.88>genb*#5}{}}
-%</!tt>
+%</!tt&!T1cmss>
% \end{macrocode}
% For monospaced fonts, the normal interpolation breaks down below
% 8pt, so scale the 8pt fonts instead.
@@ -282,6 +282,21 @@
%<ec> <35.83>genb*#5}{}}
%<!ec> <9><10><10.95><12><14.4><17.28><20.74><24.88>genb*#5}{}}
%</tt>
+% \end{macrocode}
+% \changes{v2.5l}{2022/07/10}%
+% {Avoid ec ss fonts at design size 5, 6, 7. gh/879}
+% For ec cmss fonts avoid the small design sizes which have incorrect
+% definitions.
+% (Medium weight bolder and wider than bold extended for 5pt and 6pt,
+% 7pt does not have expected contrast. Scale 8pt, matching |fix-cm|).
+% gh/879
+% \begin{macrocode}
+%<*T1cmss>
+\providecommand{\EC@ssfamily}[5]{%
+ \DeclareFontShape{#1}{#2}{#3}{#4}%
+ {<5><6><7><8>#50800%
+ <9><10><10.95><12><14.4><17.28><20.74><24.88><29.86><35.83>genb*#5}{}}
+%</T1cmss>
%</new|ec>
% \end{macrocode}
%
@@ -375,6 +390,8 @@
% \changes{v2.5a}{1997/01/14}
% {EC fonts}
% \changes{v2.5d}{1997/06/02}{bold sc fonts latex/2497}
+% \changes{v2.5k}{2022/06/10}{add support for slanted small caps github/782}
+%
% \begin{macrocode}
%<*ec>
\EC@family{T1}{cmr}{m}{n}{ecrm}
@@ -387,6 +404,9 @@
\EC@family{T1}{cmr}{bx}{sl}{ecbl}
\EC@family{T1}{cmr}{bx}{sc}{ecxc}
\EC@family{T1}{cmr}{m}{ui}{ecui}
+\EC@family{T1}{cmr}{m}{scsl}{ecsc}
+\EC@family{T1}{cmr}{bx}{scsl}{ecoc}
+\EC@family{T1}{cmr}{b}{scsl}{ecoc}
%</ec>
%</T1cmr>
% \end{macrocode}
@@ -489,12 +509,12 @@
% {EC fonts}
% \begin{macrocode}
%<*ec>
-\EC@family{T1}{cmss}{m}{n}{ecss}
-\EC@family{T1}{cmss}{m}{sl}{ecsi}
-\EC@family{T1}{cmss}{m}{it}{ecsi}
-\EC@family{T1}{cmss}{bx}{n}{ecsx}
-\EC@family{T1}{cmss}{bx}{it}{ecso}
-\EC@family{T1}{cmss}{bx}{sl}{ecso}
+\EC@ssfamily{T1}{cmss}{m}{n}{ecss}
+\EC@ssfamily{T1}{cmss}{m}{sl}{ecsi}
+\EC@ssfamily{T1}{cmss}{m}{it}{ecsi}
+\EC@ssfamily{T1}{cmss}{bx}{n}{ecsx}
+\EC@ssfamily{T1}{cmss}{bx}{it}{ecso}
+\EC@ssfamily{T1}{cmss}{bx}{sl}{ecso}
%</ec>
% \end{macrocode}
% The next substitution is very questionable.
diff --git a/Master/texmf-dist/source/latex-dev/base/doc.dtx b/Master/texmf-dist/source/latex-dev/base/doc.dtx
index d6b21744df0..d137038d634 100644
--- a/Master/texmf-dist/source/latex-dev/base/doc.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/doc.dtx
@@ -45,7 +45,7 @@
%<+package>
%<+package>\ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2022/06/08 v3.0j
+%<+package|shortvrb> [2022/07/03 v3.0k
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
@@ -260,8 +260,8 @@
% \begin{abstract}
% Roughly 30 years ago (version 1.0 was dated 1988/05/05) I wrote
% the first version of the \DOC package, a package to provide code
-% documentation for \TeX{} code. Since then it has be used all over
-% the place to document the \LaTeX{} kernel and most of the
+% documentation for \TeX{} code. Since then it has been used all
+% over the place to document the \LaTeX{} kernel and most of the
% packages that are nowadays available. The core code of version 2
% (which is the current version) exists since 1998, i.e., for 20
% years.
@@ -1909,112 +1909,38 @@
% should be altered further.
% \fmi{cleanup replacement of kvoptions}
%
-% \begin{macrocode}
-\ExplSyntaxOn
-% \end{macrocode}
% Some keys are available as options for use in \cs{usepackage} some are
% for the generated item \api's:
-% \fmi{cleanup documentation (and code once the new key interface is there)}
-% \begin{macrocode}
-\newif \ifdoc@noprint
-\newif \ifdoc@noindex
-\newif \ifdoc@hyperref \doc@hyperreftrue
-\newif \ifdoc@multicol \doc@multicoltrue
-\newif \ifdoc@debugshow
-\newif \ifdoc@reportchangedates
-\keys_define:nn {doc}
- {
- noprint .choice:,
- noprint / true .code:n = { \legacy_if_set_true:n { doc@noprint } },
- noprint / false .code:n = { \legacy_if_set_false:n { doc@noprint } },
- noprint .default:n = { true },
- noindex .choice:,
- noindex / true .code:n = { \legacy_if_set_true:n { doc@noindex } },
- noindex / false .code:n = { \legacy_if_set_false:n { doc@noindex } },
- noindex .default:n = { true },
- hyperref .choice:,
- 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 },
-% \end{macrocode}
+% \changes{v3.0k}{2022/06/22}{Use \cs{DeclareKeys}}
% \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 },
- multicol .choice:,
- multicol / true .code:n = { \legacy_if_set_true:n { doc@multicol } },
- multicol / false .code:n = { \legacy_if_set_false:n { doc@multicol } },
- multicol .default:n = { true },
- nomulticol .choice:,
- nomulticol / true .code:n = { \legacy_if_set_false:n { doc@multicol } },
- nomulticol / false .code:n = { \legacy_if_set_true:n { doc@multicol } },
-% \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 } },
- debugshow .default:n = { true },
- reportchangedates .choice:,
- reportchangedates / true .code:n = { \legacy_if_set_true:n { doc@reportchangedates } },
- reportchangedates / false .code:n = { \legacy_if_set_false:n { doc@reportchangedates } },
- reportchangedates .default:n = { true },
- }
-% \end{macrocode}
-% This one is for \cs{usepackage} and \cs{NewDocElement}:
-% \begin{macrocode}
-\newif \ifdoc@toplevel \doc@topleveltrue
-\keys_define:nn {doc}
+\DeclareKeys
{
- toplevel .choice:,
- toplevel / true .code:n = { \legacy_if_set_true:n { doc@toplevel } },
- toplevel / false .code:n = { \legacy_if_set_false:n { doc@toplevel } },
- toplevel .default:n = { true },
- notoplevel .choice:,
- notoplevel / true .code:n = { \legacy_if_set_false:n { doc@toplevel } },
- notoplevel / false .code:n = { \legacy_if_set_true:n { doc@toplevel } },
- notoplevel .default:n = { true }
+ noprint .if = {doc@noprint},
+ noindex .if = {doc@noindex},
+ hyperref .if = {doc@hyperref},
+ nohyperref .ifnot = {doc@hyperref},
+ multicol .if = {doc@multicol},
+ nomulticol .ifnot = {doc@multicol},
+ debugshow .if = {doc@debugshow},
+ reportchangedates .if = {doc@reportchangedates},
+ toplevel .if = {doc@toplevel},
+ notoplevel .ifnot = {doc@toplevel},
+ macrolike .if = {doc@macrolike},
+ envlike .ifnot = {doc@macrolike},
+ idxtype .store = \doc@idxtype,
+ idxgroup .store = \doc@idxgroup,
+ printtype .store = \doc@printtype,
+ outer .if = {doc@outer},
}
% \end{macrocode}
-% These are for \cs{NewDocElement}:
-% \begin{macrocode}
-\newif \ifdoc@macrolike
-\keys_define:nn {doc}
- {
- macrolike .choice:,
- macrolike / true .code:n = { \legacy_if_set_true:n { doc@macrolike } },
- macrolike / false .code:n = { \legacy_if_set_false:n { doc@macrolike } },
- macrolike .default:n = { true },
- envlike .choice:,
- envlike / true .code:n = { \legacy_if_set_false:n { doc@macrolike } },
- envlike / false .code:n = { \legacy_if_set_true:n { doc@macrolike } },
- envlike .default:n = { true }
- }
-
-\keys_define:nn { doc }
- {
- idxtype .tl_set:N = \doc@idxtype,
- idxgroup .tl_set:N = \doc@idxgroup,
- printtype .tl_set:N = \doc@printtype
- }
-% \end{macrocode}
-% And this one only for instances of doc elements in the document, it
-% covers the case where you want to document a macro which is
-% declared to be \cs{outer}. This is not a concept officially
-% supported by \LaTeX{} but there are cases when it gets used.
+%
+% Setting these options to true initially.
% \begin{macrocode}
-\newif\ifdoc@outer
-\keys_define:nn {doc}
- {
- outer .choice:,
- outer / true .code:n = { \legacy_if_set_true:n { doc@outer } },
- outer / false .code:n = { \legacy_if_set_false:n { doc@outer } },
- outer .default:n = { true },
- }
-\ExplSyntaxOff
+\doc@hyperreftrue
+\doc@multicoltrue
+\doc@topleveltrue
% \end{macrocode}
%
% \subsection{Processing the package keys}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
index 20e59353ec0..35c4251fcea 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2022/04/16 v1.5b LaTeX Kernel (Class & Package Interface)]
+ [2022/06/20 v1.5c LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -2150,7 +2150,7 @@
% actions prepend \cs{@currpath} to \cs{@currname} (namely loading,
% as we have to respect the given path).
%
-% A file substituiton isn't followed just yet because at this point
+% A file substitution isn't followed just yet because at this point
% we are parsing user input, so the file is still what the user
% asked for, and not the file actually loaded.
% \begin{macrocode}
@@ -2176,6 +2176,7 @@
\@ifl@aded\@currext\@currname
% \end{macrocode}
% \changes{v1.5b}{2022/03/18}{Switch to \cs{ProcessKeyOptions}}
+% \changes{v1.5c}{2022/06/20}{Pass raw options to \cs{ProcessKeyOptions}}
% In the current preferred approach, a key family name will exist for
% processing using \pkg{ltkeys}. In that case, we replace the previous
% package options with the new ones, then call the key handler.
@@ -2185,7 +2186,9 @@
\@ifundefined{opt@fam@\@currname.\@currext}
{\@onefilewithoptions@clashchk{#2}}
{%
- \@namedef{opt@\@currname.\@currext}{#2}%
+ \expandafter\edef\csname opt@\@currname.\@currext\endcsname
+ {\zap@space#2 \@empty}%
+ \@namedef{@raw@opt@\@currname.\@currext}{#2}%
\expandafter\expandafter\expandafter\ProcessKeyOptions
\expandafter\expandafter\expandafter
[\csname opt@fam@\@currname.\@currext\endcsname]%
diff --git a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
index b1b8ff953be..fafd0c69126 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2022/06/02 v2.2u LaTeX Kernel (Final Settings)]
+ [2022/07/05 v2.2w LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -1063,11 +1063,12 @@
% \end{macrocode}
%
% \begin{macro}{\MakeUppercase}
-% \begin{macro}{\MakeUppercase}
+% \begin{macro}{\MakeLowercase}
+% \begin{macro}{\MakeTitlecase}
% \begin{macro}{\NoCaseChange}
-% \begin{macro}{\@uclclist}
-% \begin{macro}{\@expl@text@lowercase@@n}
-% \begin{macro}{\@expl@text@uppercase@@n}
+% \begin{macro}{\AddToNoCaseChangeList}
+% \begin{macro}{\CaseSwitch}
+% \begin{macro}{\DeclareCaseChangeEquivalent}
% \begin{macro}{\@uclclist}
%
%
@@ -1077,82 +1078,71 @@
% And whilst we're doing things with uc/lc tables, here are two
% commands to upper- and lower-case a string.
%
-% \emph{Note} that this implementation is subject to change! At
-% the moment we're not providing any way to extend the list of
-% uc/lc commands, since finding a good interface is difficult.
-% These commands have some nasty features, such as uppercasing
-% mathematics, environment names, labels, etc. A much better
-% long-term solution is to use all-caps fonts, but these aren't
-% generally available.
%
-% Two wrappers around the L3 case changing functions.
+% \changes{v2.1h}{2019/09/14}{Expand UTF8 chars when case changing (github/177)}
+% \changes{v2.2r}{2022/02/20}
+% {Use \cs{@expl@text@uppercase@@n}, removing local redefinition of \cs{UTF@two@octets@noexpand}}%
+% \changes{v2.2t}{2022/04/21}{Support \cs{noexpand} in argument of \cs{@expl@text@uppercase@@n}}
+% \changes{v2.2v}{2022/06/30}{Just use \cs{text_lowercase:n} without \cs{protectd@edf} gh/881x}%
+% \changes{v2.2w}{2022/07/04}{Introduced \cs{CaseSwitch}, \cs{DeclareCaseChangeEquivalent} and \cs{MakeTitlecase} to support hooking into case changing gh/889}%
+% Wrappers around the L3 case changing functions.
% |\protected| to make them mostly safe as replacements for |uppercase|
% and |\lowercase|.
+%
+% In
+%\begin{verbatim}
+% \markboth{\MakeUppercase\contentsname}
+% {\MakeUppercase\contentsname}
+%\end{verbatim}
+% then the uppercasing is only done to the first letter of the
+% contents name, since the mark expands out to:
+%\begin{verbatim}
+% \mark{\MakeUppercase Table of Contents}
+% {\MakeUppercase Table of Contents}
+%\end{verbatim}
+% In order to get round this, we redefine |\MakeUppercase| and
+% |\MakeLowercase| to grab their argument and brace it.
+%
+% Earlier versions needed to procsss |\@uclclist| in an |\edef|
+% to handle legacy input encodings, but recent (2022) expl3 versions
+% handle non-UTF8 text natively so we simply call the |\text_...case:n|
+% functions.
% \begin{macrocode}
\ExplSyntaxOn
-\protected\def\@expl@text@lowercase@@n{\text_lowercase:n}
-\protected\def\@expl@text@uppercase@@n{\text_uppercase:n}
+\cs_new_protected_nopar:cpn{MakeUppercase~}{\text_uppercase:n}
+\cs_set_nopar:Npx\MakeUppercase#1{\use:c{MakeUppercase~}{#1}}
+\cs_new_protected_nopar:cpn{MakeLowercase~}{\text_lowercase:n}
+\cs_set_nopar:Npx\MakeLowercase#1{\use:c{MakeLowercase~}{#1}}
+\cs_new_protected_nopar:cpn{MakeTitlecase~}{\text_titlecase:n}
+\cs_set_nopar:Npx\MakeTitlecase#1{\use:c{MakeTitlecase~}{#1}}
% \end{macrocode}
%
% \changes{v2.2u}{2022/06/02}{Add \cs{NoCaseChange}}
+% \changes{v2.2u}{2022/06/30}{Add \cs{AddToNoCaseChangeList}}
% |\NoCaseChange| protects its argument from the case change functions.
+%
+% |\AddToNoCaseChangeList| Allows new commands to protect their arguments, eg
+% |AddToNoCaseChangeList{\eqref}| would protect the argument of |\eqref|
+% in the same way as the argument of |\ref|.
% \begin{macrocode}
-\tl_put_right:Nn \l_text_case_exclude_arg_tl { \NoCaseChange }
+\cs_new_protected_nopar:Npn\AddToNoCaseChangeList
+ {\tl_put_right:Nn \l_text_case_exclude_arg_tl}
+\AddToNoCaseChangeList{ \NoCaseChange }
\cs_new_protected:Npn \NoCaseChange #1 {#1}
+\cs_new_eq:NN \CaseSwitch \text_case_switch:nnnn
+\cs_new_eq:NN \DeclareCaseChangeEquivalent
+ \text_declare_case_equivalent:Nn
\ExplSyntaxOff
% \end{macrocode}
%
-% \begin{macrocode}
-\DeclareRobustCommand{\MakeUppercase}[1]{{%
- \def\i{I}\def\j{J}%
- \def\reserved@a##1##2{\let##1##2\reserved@a}%
- \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
-% \end{macrocode}
-% Tell UTF-8 processing to process chars even though we are in an \cs{protected@edef}.
-% \changes{v2.1h}{2019/09/14}{Expand UTF8 chars when case changing (github/177)}
-% \changes{v2.2r}{2022/02/20}
-% {Use \cs{@expl@text@uppercase@@n}, removing local redefinition of \cs{UTF@two@octets@noexpand}}%
-% \changes{v2.2t}{2022/04/21}{Support \cs{noexpand} in argument of \cs{@expl@text@uppercase@@n}}
-% \begin{macrocode}
- \protected@edef\reserved@a{\@expl@text@uppercase@@n{\noexpand\unexpanded{#1}}}%
- \reserved@a
- }}
-\DeclareRobustCommand{\MakeLowercase}[1]{{%
- \def\reserved@a##1##2{\let##2##1\reserved@a}%
- \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
- \protected@edef\reserved@a{\@expl@text@lowercase@@n{\noexpand\unexpanded{#1}}}%
- \reserved@a
- }}
-% \end{macrocode}
-%
% \changes{v2.2q}{2021/09/06}{Correctly upper and lowercase
% \cs{ij} and \cs{IJ} (gh/658)}
% \begin{macrocode}
\def\@uclclist{\oe\OE\o\O\ae\AE
\dh\DH\dj\DJ\l\L\ng\NG\ss\SS\ij\IJ\th\TH}
% \end{macrocode}
-% The above code works, but has the nasty side-effect that if you
-% say something like:
-%\begin{verbatim}
-% \markboth{\MakeUppercase\contentsname}
-% {\MakeUppercase\contentsname}
-%\end{verbatim}
-% then the uppercasing is only done to the first letter of the
-% contents name, since the mark expands out to:
-%\begin{verbatim}
-% \mark{\protect\MakeUppercase Table of Contents}
-% {\protect\MakeUppercase Table of Contents}
-%\end{verbatim}
-% In order to get round this, we redefine |\MakeUppercase| and
-% |\MakeLowercase| to grab their argument and brace it. This is a
-% very low-level hack, and is \emph{not} recommended practice!
-% This is an instance of a general problem that makes it unsafe to
-% grab arguments unbraced, and probably needs a more general
-% solution. For the moment though, this hack will do:
-% \begin{macrocode}
-\protected@edef\MakeUppercase#1{\MakeUppercase{#1}}
-\protected@edef\MakeLowercase#1{\MakeLowercase{#1}}
-% \end{macrocode}
+%
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx b/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx
index d013ec0ecbc..cc43622a4bc 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssbas.dtx}
- [2021/06/09 v3.2j LaTeX Kernel (NFSS Basic Macros)]
+ [2022/07/04 v3.2k LaTeX Kernel (NFSS Basic Macros)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -1127,26 +1127,72 @@
% \end{macro}
%
%
-% \begin{macro}{\frozen@everymath}
+%
+
+%
+% \begin{macro}{\frozen@everydisplay}
% \changes{v2.1a}{1994/01/17}{New math font setup}
% Now we define the behaviour of the frozen hooks: first
% check the math setup then call the user hook.
+%
+% The check code may push tokens after the math formula with
+% \cs{aftergroup} and they would prevent a \verb=$$= from dropping
+% following spaces. We therefore use a switch to be set as the
+% first thing after the group so that following code can determine
+% if there was a display or some inline math (in the latter case
+% we better not drop spaces).
+% After setting the switch we also have to place \cs{ignorespaces}
+% because setting the switch may be the only thing that happens
+% after the display.
+% \changes{v3.2k}{2022/07/04}{Ignore spaces if necessary (gh/886)}
+% The issue with handling of spaces was found in 2022, but it is
+% really a bug fix for the code added in 2021/11.
% \begin{macrocode}
-\frozen@everymath = {\check@mathfonts
- \the\everymath}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2021/11/15}
+%<latexrelease> {\frozen@everydisplay}{Handle spaces after math}%
+%<*2ekernel|latexrelease>
+\frozen@everydisplay = {%
+ \aftergroup\@ignoretrue \aftergroup\ignorespaces
+ \check@mathfonts
+ \the\everydisplay}
% \end{macrocode}
% \end{macro}
-%
-%
-% \begin{macro}{\frozen@everydisplay}
+
+
+% \begin{macro}{\frozen@everymath}
% \changes{v2.1a}{1994/01/17}{New math font setup}
-% Ditto for the display hook.
+% \changes{v3.2k}{2022/07/04}{Ignore spaces if necessary (gh/886)}
+% The frozen code for inline math is similar, except that here we
+% do not want to drop following spaces.
% \begin{macrocode}
-\frozen@everydisplay = {\check@mathfonts
- \the\everydisplay}
+\frozen@everymath = {%
+ \aftergroup\@ignorefalse
+ \check@mathfonts
+ \the\everymath}
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2020/10/01}
+%<latexrelease> {\frozen@everydisplay}{Handle spaces after math}%
+%<latexrelease>
+%<latexrelease>\frozen@everydisplay = {\check@mathfonts
+%<latexrelease> \the\everydisplay}
+%<latexrelease>\frozen@everymath = {\check@mathfonts
+%<latexrelease> \the\everymath}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
% \changes{v3.0q}{1996/07/27}{\cs{if@inmath} switch removed}
%
% \begin{macro}{\curr@math@size}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx b/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx
index 65bc40803e9..dd9f12f802c 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2021/10/15 v3.0y LaTeX Kernel (NFSS Declarative Interface)]
+ [2022/07/04 v3.0z LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -602,8 +602,8 @@
% math mode, so we use some recursive \cs{group_insert_after:N} for this
% before we execute \cs{mv@\meta{version}@reset}.
% \begin{macrocode}
- \group_insert_after:N \__nfss_init_mv_freeze:N \exp_after:wN
- \group_insert_after:N \cs:w mv@#1@reset \cs_end:
+ \group_insert_after:N \__nfss_init_mv_freeze:N
+ \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end:
% \end{macrocode}
% The \cs{check@mathfonts} is called at the very beginning of each
% math formula, so it is a good way to hook in the resetting.
@@ -650,6 +650,17 @@
% \begin{macrocode}
\@font@info{No~ math~ alphabet~ change~ to~ frozen~ version~ #1}
}
+% \end{macrocode}
+% If this is executed after a math display, we may have to arrange
+% for ignoring spaces, because they are now hidden if
+% the tokens from above intervene. This is signaled by the 2e
+% switch \texttt{@ignore} which is set in \cs{frozen@everymath} and
+% \cs{frozen@everydisplay}.
+%
+% This is all 2e code so we use that syntax.
+% \changes{v3.0z}{2022/07/04}{Ignore spaces if necessary (gh/886)}
+% \begin{macrocode}
+ \if@ignore \ignorespaces \fi
}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx b/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx
index c6dfa5f6ddb..df671d4259f 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}
- [2022/06/16 v1.0g LaTeX Kernel (Kevyal options)]
+ [2022/07/05 v1.0i LaTeX Kernel (Kevyal options)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{ltkeys.dtx}
@@ -72,6 +72,7 @@
% \begin{itemize}
% \item \texttt{.code} --- execute arbitrary code
% \item \texttt{.if} --- sets a \TeX{} \cs{if...} switch
+% \item \texttt{.ifnot} --- sets an inverted \TeX{} \cs{if...} switch
% \item \texttt{.store} --- stores a value in a macro
% \item \texttt{.usage} -- defines whether the option can be given only
% when loading (\texttt{load}), in the preamble (\texttt{preamble}) or
@@ -152,11 +153,13 @@
%
% \subsection{Key properties}
%
-% \begin{macro}{.code, .if, .store, .usage}
+% \begin{macro}{.code, .if, .ifnot, .store, .usage}
% \changes{v1.0b}{2022/02/05}
% {Create properties in \texttt{ltlkeys}}
% \changes{v1.0c}{2022/02/07}
% {Correct \texttt.{.code} property}
+% \changes{v1.0i}{2022/06/22}
+% {Add \texttt.{.notif} property}
% \begin{macrocode}
\group_begin:
\cs_set_protected:Npn \@@_tmp:nn #1#2
@@ -170,6 +173,7 @@
\@@_tmp:nn
{ code:n } { code }
{ legacy_if_set:n } { if }
+ { legacy_if_set_inverse:n } { ifnot }
{ tl_set:N } { store }
{ usage:n } { usage }
{ \q_recursion_tail } { }
@@ -205,6 +209,7 @@
% \begin{macro}{\@@_options_aux:n}
% \changes{v1.0b}{2022/01/15}
% {Clear option list in end-of-package hook}
+% \changes{v1.0i}{2022/07/05}{Support \cs{CurrentOption}}
% \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
@@ -239,7 +244,8 @@
{ \keys_define:nn {#1} { unknown .undefine: } }
}
\bool_set_true:N \l_@@_options_loading_bool
- \keys_set:nV {#1} \l_@@_options_clist
+ \clist_map_variable:NNn \l_@@_options_clist \CurrentOption
+ { \keys_set:nV {#1} \CurrentOption }
\bool_set_false:N \l_@@_options_loading_bool
\AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: }
\@@_option_end:
@@ -258,6 +264,7 @@
%
% \begin{macro}{\@@_options_global:n}
% \changes{v1.0f}{2022/03/18}{Simplify to always cover global options}
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
% Global (class) options are handled differently for \LaTeXe{} packages
% and classes. Hence this function is essentially a check on the current
% file type. The initial test is needed as \LaTeXe{} allows variables to
@@ -266,7 +273,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_options_global:n #1
{
- \cs_if_eq:NNF \@classoptionslist \scan_stop:
+ \cs_if_eq:NNF \@raw@classoptionslist \scan_stop:
{
\cs_if_eq:NNTF \@currext \@clsextension
{ \@@_options_class:n {#1} }
@@ -278,8 +285,11 @@
%
% \begin{macro}{\@@_options_class:n}
% \changes{v1.0g}{2022/06/16}{Better handling of option removal}
-% \begin{macro}{\@@_options_remove:nnn}
-% \changes{v1.0g}{2022/06/16}{New function}
+% \changes{v1.0h}{2022/06/19}{Further work on handling of option removal}
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
+% \begin{macro}{\@@_options_class:nnn}
+% \changes{v1.0h}{2022/06/20}{New function}
+% \changes{v1.0i}{2022/07/05}{Correct naming of raw class options storage}
% For classes, each option (stripped of any content after |=|)
% is checked for existence as a key. If found, the option is added to
% the combined list for processing. On the other hand, unused options
@@ -289,36 +299,44 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_options_class:n #1
{
- \cs_if_free:cF { opt@ \@currname . \@currext }
+ \cs_if_free:cF { @raw@opt@ \@currname . \@currext }
{
\keys_if_exist:nnTF {#1} { unknown }
{
\clist_put_right:Nv \l_@@_options_clist
- { opt@ \@currname . \@currext }
+ { @raw@opt@ \@currname . \@currext }
}
{
- \clist_map_inline:cn { opt@ \@currname . \@currext }
+ \clist_map_inline:cn { @raw@opt@ \@currname . \@currext }
{
- \@@_options_remove:enn
+ \exp_args:Ne \@@_options_class:nnn
{ \@@_remove_equals:n {##1} }
{##1} {#1}
}
}
}
}
-\cs_new_protected:Npn \@@_options_remove:nnn #1#2#3
+\cs_new_protected:Npn \@@_options_class:nnn #1#2#3
{
\keys_if_exist:nnTF {#3} {#1}
{ \clist_put_right:Nn \l_@@_options_clist {#2} }
- { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ {
+ \str_if_eq:eeF
+ { \exp_not:v { @raw@opt@ \@currname . \@currext } }
+ { \exp_not:V \@raw@classoptionslist }
+ { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ }
}
-\cs_generate_variant:Nn \@@_options_remove:nnn { e }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@@_options_package:n}
% \changes{v1.0g}{2022/06/16}{Better handling of option removal}
+% \changes{v1.0h}{2022/06/19}{Further work on handling of option removal}
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
+% \begin{macro}{\@@_options_package:nnn}
+% \changes{v1.0h}{2022/06/19}{New function}
% For global options when processing a package, the tasks are slightly
% different from those for a class. The check is the same, but here
% there is nothing to do if the option is not applicable. Each valid
@@ -326,18 +344,28 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_options_package:n #1
{
- \clist_map_inline:Nn \@classoptionslist
+ \clist_map_inline:Nn \@raw@classoptionslist
{
- \@@_options_remove:enn
+ \exp_args:Ne \@@_options_package:nnn
{ \@@_remove_equals:n {##1} }
{##1} {#1}
}
}
+\cs_new_protected:Npn \@@_options_package:nnn #1#2#3
+ {
+ \keys_if_exist:nnT {#3} {#1}
+ {
+ \clist_put_right:Nn \l_@@_options_clist {#2}
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ }
+ }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_options_local:}
-% If local options are found, the are added to the processing list.
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
+% If local options are found, they are added to the processing list.
% \LaTeXe{} stores options for each file in a macro which may or may not
% exist, hence the need to use \cs{cs_if_exist:c}.
% \begin{macrocode}
@@ -345,10 +373,10 @@
{
\cs_if_eq:NNF \@currext \@clsextension
{
- \cs_if_exist:cT { opt@ \@currname . \@currext }
+ \cs_if_exist:cT { @raw@opt@ \@currname . \@currext }
{
\clist_put_right:Nv \l_@@_options_clist
- { opt@ \@currname . \@currext }
+ { @raw@opt@ \@currname . \@currext }
}
}
}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
index cd228e62b4c..024d1078400 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{-0}
+\def\patch@level{-1}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
diff --git a/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx b/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx
index f68c45ee360..46c324c5900 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2022/06/14 v2.1g Standard LaTeX documentation class]
+%<class> [2022/06/22 v2.1h Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -294,10 +294,12 @@
% \changes{v2.0k}{1994/05/21}{New definition, so \cmd\{ works.}
% \begin{macro}{\cs}
% \changes{v2.0d}{1994/03/17}{Add \cs{cs}}
+% \changes{v2.1h}{2022/06/22}{Update \cs{cmd} definition to work with new \cs{cs}}
% \begin{macrocode}
-\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+%\DeclareRobustCommand\cs[1]... % defined later
+%\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}} % can't use with new \cs
+\def\cmd#1{\texttt{\char`\\\expandafter\cmd@to@cs\string#1}}
\def\cmd@to@cs#1#2{\char\number`#2\relax}
-%\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} % already part of doc.sty
% \end{macrocode}
% \end{macro}
% \end{macro}