From 0525ef25305c7f48ef158ac19f68bae09c664d60 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 8 Jun 2022 20:41:20 +0000 Subject: latex2e (8jun22) git-svn-id: svn://tug.org/texlive/trunk@63514 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/amsmath/amsbsy.dtx | 2 +- Master/texmf-dist/source/latex/amsmath/amsbsy.ins | 2 +- Master/texmf-dist/source/latex/amsmath/amscd.dtx | 4 +- Master/texmf-dist/source/latex/amsmath/amscd.ins | 4 +- Master/texmf-dist/source/latex/amsmath/amsgen.dtx | 4 +- Master/texmf-dist/source/latex/amsmath/amsgen.ins | 2 +- Master/texmf-dist/source/latex/amsmath/amsmath.dtx | 155 ++++++++++++++------- Master/texmf-dist/source/latex/amsmath/amsmath.ins | 4 +- Master/texmf-dist/source/latex/amsmath/amsopn.dtx | 96 +++++++------ Master/texmf-dist/source/latex/amsmath/amsopn.ins | 4 +- Master/texmf-dist/source/latex/amsmath/amstext.dtx | 4 +- Master/texmf-dist/source/latex/amsmath/amstext.ins | 4 +- Master/texmf-dist/source/latex/amsmath/amsxtra.dtx | 4 +- Master/texmf-dist/source/latex/amsmath/amsxtra.ins | 4 +- 14 files changed, 182 insertions(+), 111 deletions(-) (limited to 'Master/texmf-dist/source/latex/amsmath') diff --git a/Master/texmf-dist/source/latex/amsmath/amsbsy.dtx b/Master/texmf-dist/source/latex/amsmath/amsbsy.dtx index 8557c6534a4..d94bf9a72f9 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsbsy.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amsbsy.dtx @@ -81,7 +81,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \[ % \pmb{\infty} = \boldsymbol{\infty} \quad ? % \] -% \StopEventually{} +% \MaybeStop{} % % Standard package info. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/amsmath/amsbsy.ins b/Master/texmf-dist/source/latex/amsmath/amsbsy.ins index 91946086223..c35a72dad65 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsbsy.ins +++ b/Master/texmf-dist/source/latex/amsmath/amsbsy.ins @@ -26,7 +26,7 @@ \preamble Copyright (C) 1995, 1999 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/source/latex/amsmath/amscd.dtx b/Master/texmf-dist/source/latex/amsmath/amscd.dtx index f3528dd7c1b..1ed5be6b677 100644 --- a/Master/texmf-dist/source/latex/amsmath/amscd.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amscd.dtx @@ -2,7 +2,7 @@ % \iffalse meta-comment % % Copyright (C) 1995, 1999 American Mathematical Society. -% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -97,7 +97,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \end{CD}\end{equation} % \end{verbatim} % -% \StopEventually{} +% \MaybeStop{} % % Standard package info. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/amsmath/amscd.ins b/Master/texmf-dist/source/latex/amsmath/amscd.ins index 30b2f281777..5ecf0515837 100644 --- a/Master/texmf-dist/source/latex/amsmath/amscd.ins +++ b/Master/texmf-dist/source/latex/amsmath/amscd.ins @@ -1,6 +1,6 @@ %% %% Copyright (C) 2010 American Mathematical Society. -%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -25,7 +25,7 @@ \preamble Copyright (C) 1995, 1999 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/source/latex/amsmath/amsgen.dtx b/Master/texmf-dist/source/latex/amsmath/amsgen.dtx index 10ac58b18ed..0493940071c 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsgen.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amsgen.dtx @@ -2,7 +2,7 @@ % \iffalse meta-comment % % Copyright (C) 1995, 1999 American Mathematical Society. -% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -49,7 +49,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % distribution. Some of these might eventually make it into the \latex/ % kernel. % -% \StopEventually{} +% \MaybeStop{} % % Standard package info. % Using \cs{ProvidesFile} rather than \cs{ProvidesPackage} because diff --git a/Master/texmf-dist/source/latex/amsmath/amsgen.ins b/Master/texmf-dist/source/latex/amsmath/amsgen.ins index aacb6e0c393..7d845e61cfa 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsgen.ins +++ b/Master/texmf-dist/source/latex/amsmath/amsgen.ins @@ -25,7 +25,7 @@ \preamble Copyright (C) 1995, 1999 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/source/latex/amsmath/amsmath.dtx b/Master/texmf-dist/source/latex/amsmath/amsmath.dtx index a5cf333e797..34d17b65f00 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsmath.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amsmath.dtx @@ -2,7 +2,7 @@ % \iffalse meta-comment % % Copyright (C) 1995, 2000, 2013 American Mathematical Society. -% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -68,7 +68,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % provided here is found in the AMSmath Users' Guide, % \fn{amsldoc.tex}. % -% \StopEventually{} +% \MaybeStop{} % % Standard file identification. % \begin{macrocode} @@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \end{macrocode} % % \begin{macrocode} -\ProvidesPackage{amsmath}[2021/10/15 v2.17l AMS math features] +\ProvidesPackage{amsmath}[2022/04/08 v2.17n AMS math features] % \end{macrocode} % % \section{Catcode defenses} @@ -615,7 +615,8 @@ Foreign command \@backslashchar#1;\MessageBreak % abbreviations for some commonly needed mathstyle overrides. To % conserve csnames we avoid making \cn{dfrac} and \cn{tfrac} robust % (\cn{genfrac} is itself robust). -% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} for luatex (moved patch from lualatex-math)} +% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} for luatex (moved patch from lualatex-math)} +% \changes{v2.17n}{2022/04/08}{Make fraction commands robust (gh/123)} % \begin{macrocode} % \ifx\directlua\@undefined @@ -623,8 +624,8 @@ Foreign command \@backslashchar#1;\MessageBreak \else \DeclareRobustCommand{\frac}[2]{{\Ustack{\begingroup#1\endgroup\@@over#2}}} \fi -\newcommand{\dfrac}{\genfrac{}{}{}0} -\newcommand{\tfrac}{\genfrac{}{}{}1} +\DeclareRobustCommand{\dfrac}{\genfrac{}{}{}0} +\DeclareRobustCommand{\tfrac}{\genfrac{}{}{}1} % \end{macrocode} % The \cn{binom} command for binomial notation works like \cn{frac} % and has similar variants. Note that we do not use \cs{z@} in @@ -632,10 +633,11 @@ Foreign command \@backslashchar#1;\MessageBreak % like \cn{binom}, and so the \cs{z@} with the potentially % problematic \qc{\@} character would become visible when writing one % of those commands to a \fn{.toc} file. +% \changes{v2.17n}{2022/04/08}{Make binom commands robust (gh/123)} % \begin{macrocode} \DeclareRobustCommand{\binom}{\genfrac()\z@{}} -\newcommand{\dbinom}{\genfrac(){0pt}0} -\newcommand{\tbinom}{\genfrac(){0pt}1} +\DeclareRobustCommand{\dbinom}{\genfrac(){0pt}0} +\DeclareRobustCommand{\tbinom}{\genfrac(){0pt}1} % \end{macrocode} % % \begin{macro}{\genfrac} @@ -938,8 +940,9 @@ Foreign command \@backslashchar#1;\MessageBreak % an equation or piece of an equation. (Not including the equation % number.) This isn't trivial for end-users to do it properly % with \cs{fbox} so we provide a command for them. +% \changes{v2.17n}{2022/04/08}{Make \cs{boxed} command robust (gh/123)} % \begin{macrocode} -\newcommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}} +\DeclareRobustCommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}} % \end{macrocode} % \end{macro} % @@ -980,8 +983,9 @@ Foreign command \@backslashchar#1;\MessageBreak % small space on the left, larger space on the right. The \qc{\:} % character by itself is treated as a \cs{mathrel} i.e. large, equal % spacing on both sides. +% \changes{v2.17n}{2022/04/08}{Make \cs{colon} command robust (gh/123)} % \begin{macrocode} -\renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript +\DeclareRobustCommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript \mkern-\thinmuskip{:}\mskip6muplus1mu\relax} % \end{macrocode} % \end{macro} @@ -1386,10 +1390,10 @@ Foreign command \@backslashchar#1;\MessageBreak {{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}% {{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}} % -\ams@newcommand{\iint}{\DOTSI\protect\MultiIntegral{2}} -\ams@newcommand{\iiint}{\DOTSI\protect\MultiIntegral{3}} -\ams@newcommand{\iiiint}{\DOTSI\protect\MultiIntegral{4}} -\newcommand{\idotsint}{\DOTSI\protect\MultiIntegral{0}} +\ams@newcommand{\iint}{\DOTSI\MultiIntegral{2}} +\ams@newcommand{\iiint}{\DOTSI\MultiIntegral{3}} +\ams@newcommand{\iiiint}{\DOTSI\MultiIntegral{4}} +\newcommand{\idotsint}{\DOTSI\MultiIntegral{0}} % \end{macrocode} % \end{macro} % \end{macro} @@ -1403,8 +1407,9 @@ Foreign command \@backslashchar#1;\MessageBreak % the left-hand space a bit to make the subscript visually centered. % % \verb'#1' is the multiplicity. +% \changes{v2.17n}{2022/04/08}{Make \cs{MultiIntegral} command robust (gh/123)} % \begin{macrocode} -\newcommand{\MultiIntegral}[1]{% +\DeclareRobustCommand{\MultiIntegral}[1]{% \edef\ints@c{\noexpand\intop \ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi \ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi @@ -1582,11 +1587,12 @@ Foreign command \@backslashchar#1;\MessageBreak % the \latex/ kernel; the macro |\n@space| is then superfluous (since % it is only used once) and should be removed to avoid wasting hash % table space unnecessarily. +% \changes{v2.17n}{2022/04/08}{Make biggg commands robust (gh/123)} % \begin{macrocode} -\renewcommand{\big}{\bBigg@\@ne} -\renewcommand{\Big}{\bBigg@{1.5}} -\renewcommand{\bigg}{\bBigg@\tw@} -\renewcommand{\Bigg}{\bBigg@{2.5}} +\DeclareRobustCommand{\big}{\bBigg@\@ne} +\DeclareRobustCommand{\Big}{\bBigg@{1.5}} +\DeclareRobustCommand{\bigg}{\bBigg@\tw@} +\DeclareRobustCommand{\Bigg}{\bBigg@{2.5}} % \end{macrocode} % \end{macro} % \end{macro} @@ -1666,6 +1672,17 @@ Foreign command \@backslashchar#1;\MessageBreak {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ \hbox{\,\normalfont....}\vss}}}} % \end{macrocode} +% +% We make the commands robust only at the end of the preamble as +% \pkg{amsmath} interacts with \pkg{stix} (which should also move +% to robust commands). +% \changes{v2.17n}{2022/04/08}{Make dddot commands robust (gh/123)} +% \begin{macrocode} +\AtBeginDocument{% + \MakeRobust\dddot + \MakeRobust\ddddot + } +% \end{macrocode} % \end{macro} % \end{macro} % @@ -2087,14 +2104,16 @@ Foreign command \@backslashchar#1;\MessageBreak % \begin{macro}{\mod} % The commands \cn{bmod}, \cn{pmod}, \cn{pod}, \cn{mod} aren't % currently robust. [mjd, 1994/09/05] +% Now they are +% \changes{v2.17n}{2022/04/08}{Make mod commands robust (gh/123)} % \begin{macrocode} -\renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin +\DeclareRobustCommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin {\operator@font mod}\penalty900 \mkern5mu\nonscript\mskip-\medmuskip} -\newcommand{\pod}[1]{\allowbreak +\DeclareRobustCommand{\pod}[1]{\allowbreak \if@display\mkern18mu\else\mkern8mu\fi(#1)} -\renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}} -\newcommand{\mod}[1]{\allowbreak\if@display\mkern18mu +\DeclareRobustCommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}} +\DeclareRobustCommand{\mod}[1]{\allowbreak\if@display\mkern18mu \else\mkern12mu\fi{\operator@font mod}\,\,#1} % \end{macrocode} % \end{macro} @@ -2109,8 +2128,9 @@ Foreign command \@backslashchar#1;\MessageBreak % fraction rules to line up. The \cs{strut} keeps the numerator of % a subsidiary cfrac from coming too close to the fraction rule above % it. +% \changes{v2.17n}{2022/04/08}{Make \cs{cfrac} command robust (gh/123)} % \begin{macrocode} -\newcommand{\cfrac}[3][c]{{\displaystyle\frac{% +\DeclareRobustCommand{\cfrac}[3][c]{{\displaystyle\frac{% \strut\ifx r#1\hfill\fi#2\ifx l#1\hfill\fi}{#3}}% \kern-\nulldelimiterspace} % \end{macrocode} @@ -2123,13 +2143,15 @@ Foreign command \@backslashchar#1;\MessageBreak % naturally accept limits. \cs{binrel@@} uses information collected % by \cs{binrel@} to make the resulting construction be of type % mathrel or mathbin if the base symbol is either of those types. +% \changes{v2.17n}{2022/04/08}{Make \cs{overset}, \cs{underset} and +% \cs{overunderset} commands robust (gh/123)} % \begin{macrocode} -\newcommand{\overset}[2]{\binrel@{#2}% +\DeclareRobustCommand{\overset}[2]{\binrel@{#2}% \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}} % \end{macrocode} % % \begin{macrocode} -\newcommand{\underset}[2]{\binrel@{#2}% +\DeclareRobustCommand{\underset}[2]{\binrel@{#2}% \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}} % \end{macrocode} % \end{macro} @@ -2141,7 +2163,7 @@ Foreign command \@backslashchar#1;\MessageBreak % something that is sometimes needed. % \changes{v2.17c}{2019/04/01}{New command \cs{overunderset}} % \begin{macrocode} -\newcommand{\overunderset}[3]{\binrel@{#3}% +\DeclareRobustCommand{\overunderset}[3]{\binrel@{#3}% \binrel@@{\mathop{\kern\z@#3}\limits^{#1}_{#2}}} % \end{macrocode} % \end{macro} @@ -2157,8 +2179,9 @@ Foreign command \@backslashchar#1;\MessageBreak % have to read and measure the top and bottom limits and use % mathchoice to always get the right mathstyle for each piece, % etc., etc. +% \changes{v2.17n}{2022/04/08}{Make \cs{sideset} command robust (gh/123)} % \begin{macrocode} -\newcommand{\sideset}[3]{% +\DeclareRobustCommand{\sideset}[3]{% \@mathmeasure\z@\displaystyle{#3}% % \end{macrocode} % Use a global box assignment here since the depth override is @@ -2182,9 +2205,10 @@ Foreign command \@backslashchar#1;\MessageBreak % denoting the part of the formula to be smashed. % \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{smash} % if necessary (github/49)} +% \changes{v2.17n}{2022/04/08}{Make \cs{smash} command robust (gh/123)} % \begin{macrocode} \ifx\leavevmode@ifvmode\@undefined -\renewcommand{\smash}[1][tb]{% +\DeclareRobustCommand{\smash}[1][tb]{% \def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}% \edef\finsm@sh{\csname mb@#1\endcsname\z@\z@\box\z@}% \ifmmode \@xp\mathpalette\@xp\mathsm@sh @@ -2192,7 +2216,7 @@ Foreign command \@backslashchar#1;\MessageBreak \fi } \else -\renewcommand{\smash}[1][tb]{% +\DeclareRobustCommand{\smash}[1][tb]{% \def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}% \edef\finsm@sh{\csname mb@#1\endcsname\z@\z@ \leavevmode@ifvmode\box\z@}% \ifmmode \@xp\mathpalette\@xp\mathsm@sh @@ -2240,9 +2264,10 @@ Foreign command \@backslashchar#1;\MessageBreak % % \begin{macro}{\relbar} % \begin{macro}{\Relbar} +% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)} % \begin{macrocode} -\ams@def\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}} -\ams@def\Relbar{\mathrel\std@equal} +\ams@DeclareRobustCommand\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}} +\ams@DeclareRobustCommand\Relbar{\mathrel\std@equal} % \end{macrocode} % \end{macro} % \end{macro} @@ -2272,6 +2297,17 @@ Foreign command \@backslashchar#1;\MessageBreak \ams@newcommand{\overleftrightarrow}{% \mathpalette{\overarrow@\leftrightarrowfill@}} % \end{macrocode} +% Again we delay making commands robut for \pkg{stix}. +% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)} +% \begin{macrocode} +\AtBeginDocument{% + \expandafter\let\csname overleftarrow \endcsname\@undefined + \expandafter\let\csname overrightarrow \endcsname\@undefined + \MakeRobust\overrightarrow + \MakeRobust\overleftarrow + \MakeRobust\overleftrightarrow + } +% \end{macrocode} % % \begin{macrocode} \def\underarrow@#1#2#3{% @@ -2285,8 +2321,19 @@ Foreign command \@backslashchar#1;\MessageBreak \mathpalette{\underarrow@\leftrightarrowfill@}} % \end{macrocode} % +% +% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)} % \begin{macrocode} -%\newcommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} +\AtBeginDocument{% + \MakeRobust\underrightarrow + \MakeRobust\underleftarrow + \MakeRobust\underleftrightarrow + } +% \end{macrocode} +% +% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)} +% \begin{macrocode} +%\DeclareRobustCommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} \def\ext@arrow#1#2#3#4#5#6#7{% \mathrel{\mathop{% % \end{macrocode} @@ -2315,8 +2362,8 @@ Foreign command \@backslashchar#1;\MessageBreak % sub/superscripts. These commands are robust because they take an % optional argument. % \begin{macrocode} -\newcommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} -\newcommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}} +\DeclareRobustCommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} +\DeclareRobustCommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}} % \end{macrocode} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2406,8 +2453,9 @@ Foreign command \@backslashchar#1;\MessageBreak % \begin{macro}{\substack} % The \cn{substack} command is just an abbreviation for the % most common use of \env{subarray}. +% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)} % \begin{macrocode} -\newcommand{\substack}[1]{\subarray{c}#1\endsubarray} +\DeclareRobustCommand{\substack}[1]{\subarray{c}#1\endsubarray} % \end{macrocode} % \end{macro} % @@ -2630,8 +2678,9 @@ ill-advised in LaTeX.% % numbered within sections. The \LaTeX{} kernel contains a similar command % \cs{counterwithin} (with a slightly extended syntax) that can be used % as a drop-in replacement for \cs{numberwithin}. +% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)} % \begin{macrocode} -\newcommand{\numberwithin}[3][\arabic]{% +\DeclareRobustCommand{\numberwithin}[3][\arabic]{% \@ifundefined{c@#2}{\@nocounterr{#2}}{% \@ifundefined{c@#3}{\@nocnterr{#3}}{% \@addtoreset{#2}{#3}% @@ -2645,8 +2694,9 @@ ill-advised in LaTeX.% % To make references to equation numbers easier, we provide % \cn{eqref}. We almost don't need \cn{textup}, except that % \cs{tagform@} doesn't supply the italic correction. +% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)} % \begin{macrocode} -\newcommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} +\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} % \end{macrocode} % \end{macro} % @@ -2685,8 +2735,9 @@ ill-advised in LaTeX.% % The \cn{allowdisplaybreaks} command. Since this is intended for use % outside displayed formulas (typically in the preamble), it does not % need to use \cs{new@ifnextchar}. +% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)} % \begin{macrocode} -\newcommand{\allowdisplaybreaks}[1][4]{% +\DeclareRobustCommand{\allowdisplaybreaks}[1][4]{% \interdisplaylinepenalty\getdsp@pen{#1}\relax } % \end{macrocode} @@ -2709,8 +2760,9 @@ ill-advised in LaTeX.% % \begin{macro}{\dspbrk@context} % \begin{macro}{\nogood@displaybreak} % For breaks in a certain row of a alignment. +% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)} % \begin{macrocode} -\newcommand{\displaybreak}{\new@ifnextchar[\dspbrk@{\dspbrk@[4]}} +\DeclareRobustCommand{\displaybreak}{\new@ifnextchar[\dspbrk@{\dspbrk@[4]}} \chardef\dspbrk@context=\sixt@@n % \end{macrocode} % @@ -6130,15 +6182,16 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}% % in his \fn{amstex.doc} Spivak indicates those commands should never % be used on a first or last line. Perhaps better to leave the % question open unless/until real-life examples turn up. +% \changes{v2.17m}{2022/02/03}{Make \cs{shoveright} robust (if def is not trival)} % \begin{macrocode} \iftagsleft@ - \def\shoveright#1{% + \protected\def\shoveright#1{% #1% \hfilneg \hskip\multlinegap } \else - \def\shoveright#1{% + \protected\def\shoveright#1{% #1% \hfilneg \iftag@ @@ -6153,12 +6206,14 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}% \fi } \fi - +% \end{macrocode} +% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trival)} +% \begin{macrocode} \if@fleqn \def\shoveleft#1{#1}% \else \iftagsleft@ - \def\shoveleft#1{% + \protected\def\shoveleft#1{% \setboxz@h{$\m@th\displaystyle{}#1$}% \setbox\@ne\hbox{$\m@th\displaystyle#1$}% \hfilneg @@ -6173,17 +6228,23 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}% \hskip\multlinegap \fi \hskip.5\wd\@ne - \hskip-.5\wdz@ +% \end{macrocode} +% \changes{v2.17m}{2022/02/03}{Added missing \cs{relax} for (gh/716)} +% \begin{macrocode} + \hskip-.5\wdz@ \relax #1% } \else - \def\shoveleft#1{% + \protected\def\shoveleft#1{% \setboxz@h{$\m@th\displaystyle{}#1$}% \setbox\@ne\hbox{$\m@th\displaystyle#1$}% \hfilneg \hskip\multlinegap \hskip.5\wd\@ne - \hskip-.5\wdz@ +% \end{macrocode} +% \changes{v2.17m}{2022/02/03}{Added missing \cs{relax} for (gh/716)} +% \begin{macrocode} + \hskip-.5\wdz@ \relax #1% } \fi diff --git a/Master/texmf-dist/source/latex/amsmath/amsmath.ins b/Master/texmf-dist/source/latex/amsmath/amsmath.ins index 1bb73101bb5..82876ffc5df 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsmath.ins +++ b/Master/texmf-dist/source/latex/amsmath/amsmath.ins @@ -1,6 +1,6 @@ %% %% Copyright (C) 2010 American Mathematical Society. -%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -25,7 +25,7 @@ \preamble Copyright (C) 1995, 1999, 2000, 2013 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/source/latex/amsmath/amsopn.dtx b/Master/texmf-dist/source/latex/amsmath/amsopn.dtx index 03df1a116bc..110a5fa8be0 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsopn.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amsopn.dtx @@ -2,7 +2,7 @@ % \iffalse meta-comment % % Copyright (C) 1995, 1999 American Mathematical Society. -% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -52,13 +52,13 @@ Bug reports can be opened (category \texttt{#1}) at\\% % similar to the standard function names \cn{sin}, \cn{lim}, % \cn{max}, etc. % -% \StopEventually{} +% \MaybeStop{} % % Standard file identification. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) [1994/12/01]% LaTeX date must December 1994 or later -\ProvidesPackage{amsopn}[2021/08/26 v2.02 operator names] +\ProvidesPackage{amsopn}[2022/04/08 v2.04 operator names] % \end{macrocode} % % What \cs{nolimits@} does is keep a \cn{limits} typed by the user @@ -151,41 +151,42 @@ Bug reports can be opened (category \texttt{#1}) at\\% \@onlypreamble\@declmathop % \end{macrocode} % +% \changes{v2.04}{2022/04/08}{Make operators \cs{protected} (gh/123)} % \begin{macrocode} -\def\arccos{\qopname\relax o{arccos}} -\def\arcsin{\qopname\relax o{arcsin}} -\def\arctan{\qopname\relax o{arctan}} -\def\arg{\qopname\relax o{arg}} -\def\cos{\qopname\relax o{cos}} -\def\cosh{\qopname\relax o{cosh}} -\def\cot{\qopname\relax o{cot}} -\def\coth{\qopname\relax o{coth}} -\def\csc{\qopname\relax o{csc}} -\def\deg{\qopname\relax o{deg}} -\def\det{\qopname\relax m{det}} -\def\dim{\qopname\relax o{dim}} -\def\exp{\qopname\relax o{exp}} -\def\gcd{\qopname\relax m{gcd}} -\def\hom{\qopname\relax o{hom}} -\def\inf{\qopname\relax m{inf}} -\def\injlim{\qopname\relax m{inj\,lim}} -\def\ker{\qopname\relax o{ker}} -\def\lg{\qopname\relax o{lg}} -\def\lim{\qopname\relax m{lim}} -\def\liminf{\qopname\relax m{lim\,inf}} -\def\limsup{\qopname\relax m{lim\,sup}} -\def\ln{\qopname\relax o{ln}} -\def\log{\qopname\relax o{log}} -\def\max{\qopname\relax m{max}} -\def\min{\qopname\relax m{min}} -\def\Pr{\qopname\relax m{Pr}} -\def\projlim{\qopname\relax m{proj\,lim}} -\def\sec{\qopname\relax o{sec}} -\def\sin{\qopname\relax o{sin}} -\def\sinh{\qopname\relax o{sinh}} -\def\sup{\qopname\relax m{sup}} -\def\tan{\qopname\relax o{tan}} -\def\tanh{\qopname\relax o{tanh}} +\protected\def\arccos{\qopname\relax o{arccos}} +\protected\def\arcsin{\qopname\relax o{arcsin}} +\protected\def\arctan{\qopname\relax o{arctan}} +\protected\def\arg{\qopname\relax o{arg}} +\protected\def\cos{\qopname\relax o{cos}} +\protected\def\cosh{\qopname\relax o{cosh}} +\protected\def\cot{\qopname\relax o{cot}} +\protected\def\coth{\qopname\relax o{coth}} +\protected\def\csc{\qopname\relax o{csc}} +\protected\def\deg{\qopname\relax o{deg}} +\protected\def\det{\qopname\relax m{det}} +\protected\def\dim{\qopname\relax o{dim}} +\protected\def\exp{\qopname\relax o{exp}} +\protected\def\gcd{\qopname\relax m{gcd}} +\protected\def\hom{\qopname\relax o{hom}} +\protected\def\inf{\qopname\relax m{inf}} +\protected\def\injlim{\qopname\relax m{inj\,lim}} +\protected\def\ker{\qopname\relax o{ker}} +\protected\def\lg{\qopname\relax o{lg}} +\protected\def\lim{\qopname\relax m{lim}} +\protected\def\liminf{\qopname\relax m{lim\,inf}} +\protected\def\limsup{\qopname\relax m{lim\,sup}} +\protected\def\ln{\qopname\relax o{ln}} +\protected\def\log{\qopname\relax o{log}} +\protected\def\max{\qopname\relax m{max}} +\protected\def\min{\qopname\relax m{min}} +\protected\def\Pr{\qopname\relax m{Pr}} +\protected\def\projlim{\qopname\relax m{proj\,lim}} +\protected\def\sec{\qopname\relax o{sec}} +\protected\def\sin{\qopname\relax o{sin}} +\protected\def\sinh{\qopname\relax o{sinh}} +\protected\def\sup{\qopname\relax m{sup}} +\protected\def\tan{\qopname\relax o{tan}} +\protected\def\tanh{\qopname\relax o{tanh}} % \end{macrocode} % % \begin{macro}{\operator@font} @@ -198,8 +199,16 @@ Bug reports can be opened (category \texttt{#1}) at\\% % more accessible so that users can call this font for use in special % constructs that are not ordinary operator names but conceptually % related. +% +% \cs{operator@font} is also declared by the \LaTeX{} kernel (for +% at least 14 years), thus defining it here effectively means +% ``resetting it'' to the kernel value, which is counterproductive +% in situations where the user (or a class) has altered its +% definition and at a later point \pkg{amsopn} got added. +% \changes{v2.03}{2022/01/20}{Do not reset \cs{operator@font} it is +% already defined in the LaTeX kernel (gh/734)} % \begin{macrocode} -\def\operator@font{\mathgroup\symoperators} +%\def\operator@font{\mathgroup\symoperators} % commented out in 2.03 \def\operatorfont{\operator@font} % \end{macrocode} % \end{macro} @@ -218,23 +227,24 @@ Bug reports can be opened (category \texttt{#1}) at\\% % vertical spacing may not be optimal in script and scriptscript % sizes. Unfortunately \tex/ provides no easy way to do math mode % vertical spacing that varies with current math style like mu units. +% \changes{v2.04}{2022/04/08}{Make operators \cs{protected} (gh/123)} % \begin{macrocode} -\def\varlim@#1#2{% +\protected\def\varlim@#1#2{% \vtop{\m@th\ialign{##\cr \hfil$#1\operator@font lim$\hfil\cr \noalign{\nointerlineskip\kern1.5\ex@}#2\cr \noalign{\nointerlineskip\kern-\ex@}\cr}}% } -\def\varinjlim{% +\protected\def\varinjlim{% \mathop{\mathpalette\varlim@{\rightarrowfill@\textstyle}}\nmlimits@ } -\def\varprojlim{% +\protected\def\varprojlim{% \mathop{\mathpalette\varlim@{\leftarrowfill@\textstyle}}\nmlimits@ } -\def\varliminf{\mathop{\mathpalette\varliminf@{}}\nmlimits@} +\protected\def\varliminf{\mathop{\mathpalette\varliminf@{}}\nmlimits@} \def\varliminf@#1{\@@underline{\vrule\@depth.2\ex@\@width\z@ \hbox{$#1\m@th\operator@font lim$}}} -\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@} +\protected\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@} \def\varlimsup@#1{\@@overline{\hbox{$#1\m@th\operator@font lim$}}} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/amsmath/amsopn.ins b/Master/texmf-dist/source/latex/amsmath/amsopn.ins index 72c649c3409..8a57404c1ef 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsopn.ins +++ b/Master/texmf-dist/source/latex/amsmath/amsopn.ins @@ -1,6 +1,6 @@ %% %% Copyright (C) 2010 American Mathematical Society. -%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -25,7 +25,7 @@ \preamble Copyright (C) 1995, 1999 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/source/latex/amsmath/amstext.dtx b/Master/texmf-dist/source/latex/amsmath/amstext.dtx index 88cc837f03a..7498040214d 100644 --- a/Master/texmf-dist/source/latex/amsmath/amstext.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amstext.dtx @@ -2,7 +2,7 @@ % \iffalse meta-comment % % Copyright (C) 1995, 1999 American Mathematical Society. -% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -72,7 +72,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % macro called \cs{mathhexbox} so that commands like \cn{dag} % or \cn{P} will change sizes if used in math subscripts. % -% \StopEventually{} +% \MaybeStop{} % Package information. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) diff --git a/Master/texmf-dist/source/latex/amsmath/amstext.ins b/Master/texmf-dist/source/latex/amsmath/amstext.ins index 5578a7e9473..3ba3000eb8c 100644 --- a/Master/texmf-dist/source/latex/amsmath/amstext.ins +++ b/Master/texmf-dist/source/latex/amsmath/amstext.ins @@ -1,6 +1,6 @@ %% %% Copyright (C) 2010 American Mathematical Society. -%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -25,7 +25,7 @@ \preamble Copyright (C) 1995, 1999 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/source/latex/amsmath/amsxtra.dtx b/Master/texmf-dist/source/latex/amsmath/amsxtra.dtx index aaa5fd1a2db..c2bc4bbd26c 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsxtra.dtx +++ b/Master/texmf-dist/source/latex/amsmath/amsxtra.dtx @@ -2,7 +2,7 @@ % \iffalse meta-comment % % Copyright (C) 1995, 1999 American Mathematical Society. -% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -53,7 +53,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % documents using the \pkg{amstex} package these commands are just % wasted overhead. % -% \StopEventually{} +% \MaybeStop{} % % \begin{macrocode} \ProvidesPackage{amsxtra}[1999/11/15 v1.2c AMS extra commands] diff --git a/Master/texmf-dist/source/latex/amsmath/amsxtra.ins b/Master/texmf-dist/source/latex/amsmath/amsxtra.ins index 7eca6e065ad..70f50c6bcb8 100644 --- a/Master/texmf-dist/source/latex/amsmath/amsxtra.ins +++ b/Master/texmf-dist/source/latex/amsmath/amsxtra.ins @@ -1,6 +1,6 @@ %% %% Copyright (C) 2010 American Mathematical Society. -%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -25,7 +25,7 @@ \preamble Copyright (C) 1995, 1999 American Mathematical Society. -Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society. +Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c -- cgit v1.2.3