summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/amsmath
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-11-12 23:08:46 +0000
committerKarl Berry <karl@freefriends.org>2021-11-12 23:08:46 +0000
commite80240b5e5bfb83d84a9e6d81e31b0bfb82d637c (patch)
treeb76f4a81a066673810d3b9ee777926d848f414f0 /Master/texmf-dist/source/latex/amsmath
parent0ff2ba12c9b350c0546c2256e398168d325d234a (diff)
2e (12nov21)
git-svn-id: svn://tug.org/texlive/trunk@61041 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/amsmath')
-rw-r--r--Master/texmf-dist/source/latex/amsmath/amsmath.dtx37
-rw-r--r--Master/texmf-dist/source/latex/amsmath/amsopn.dtx6
-rw-r--r--Master/texmf-dist/source/latex/amsmath/amstext.dtx6
3 files changed, 39 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/amsmath/amsmath.dtx b/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
index 88578611019..a5cf333e797 100644
--- a/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
+++ b/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2021/04/20 v2.17j AMS math features]
+\ProvidesPackage{amsmath}[2021/10/15 v2.17l AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -2627,7 +2627,9 @@ ill-advised in LaTeX.%
%
% \begin{macro}{\numberwithin}
% Provide a convenient way to specify that equations should be
-% numbered within sections.
+% 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}.
% \begin{macrocode}
\newcommand{\numberwithin}[3][\arabic]{%
\@ifundefined{c@#2}{\@nocounterr{#2}}{%
@@ -3010,7 +3012,13 @@ ill-advised in LaTeX.%
% the \cs{maketag@@} macro above.
% \begin{macrocode}
\let\df@tag\@empty
-\def\make@df@tag{\@ifstar\make@df@tag@@\make@df@tag@@@}
+\def\make@df@tag{%
+% \end{macrocode}
+% We set \cs{@currentcounter} here so that it applies to both branches.
+%\changes{v2.17l}{2021/10/15}{Explicitly set \cs{@currentcounter} (gh/687)}
+% \begin{macrocode}
+ \def\@currentcounter{equation}%
+ \@ifstar\make@df@tag@@\make@df@tag@@@}
% \end{macrocode}
% \cs{make@df@tag} sets \cs{@currentlabel} and defines
% \cs{df@tag} appropriately.
@@ -6500,8 +6508,17 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\let\mathdisplay@pop\@empty
\def\mathdisplay@@pop{\the\mathdisplay@stack}
% \end{macrocode}
-%
+%\changes{v2.17k}{2021/08/24}{Move the counter inside the equation and guard
+% with a mathopen for better compability with hyperref, issue gh/652}
+% As with hyperref incrementing the counter creates a box to raise the anchor
+% it should be in a place where is doesn't affect spacing.
+% Currently the code from hyperref is used to avoid this problem:
+% If fleqn isn't active the counter is set inside the equation and the potential
+% box guarded by a mathopen to avoid side effects on following unary symbols.
+% If fleqn is activated it has to be outside to avoid problems with labels.
+% This solution is temporary and not necessarly the best.
% \begin{macrocode}
+\if@fleqn
\renewenvironment{equation}{%
\incr@eqnum
\mathdisplay@push
@@ -6512,6 +6529,18 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\mathdisplay@pop
\ignorespacesafterend
}
+\else
+\renewenvironment{equation}{%
+ \mathdisplay@push
+ \st@rredfalse \global\@eqnswtrue
+ \mathdisplay{equation}%
+ \incr@eqnum\mathopen{}%
+}{%
+ \endmathdisplay{equation}%
+ \mathdisplay@pop
+ \ignorespacesafterend
+}
+\fi
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/amsmath/amsopn.dtx b/Master/texmf-dist/source/latex/amsmath/amsopn.dtx
index a71c13d6c89..03df1a116bc 100644
--- a/Master/texmf-dist/source/latex/amsmath/amsopn.dtx
+++ b/Master/texmf-dist/source/latex/amsmath/amsopn.dtx
@@ -58,7 +58,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \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}[2016/03/08 v2.02 operator names]
+\ProvidesPackage{amsopn}[2021/08/26 v2.02 operator names]
% \end{macrocode}
%
% What \cs{nolimits@} does is keep a \cn{limits} typed by the user
@@ -72,13 +72,13 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% punctuation characters such as |*-/:'|.
% Because the body of an
% operator name is set in math mode, these few punctuation
-% characters will not come out right (wrong symbol/and or wrong
+% characters will not come out right (wrong symbol and/or wrong
% spacing). The purpose of \cs{newmcodes@} is to make them act like
% their normal text versions.
%
% Where practical, we use decimal numbers to cut down main mem
% usage (\qc{\"} not needed).
-% use |\Umathcodedefnum| with xetex and LuaTeX to avoid problems
+% Use |\Umathcodedefnum| with xetex and LuaTeX to avoid problems
% using |\mathcode| if |-| has already been defined using |\Umathcode|.
% \changes{v2.02}{2016/03/08}{Unicode TeX version of \cs{newmcodes@}}
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/amsmath/amstext.dtx b/Master/texmf-dist/source/latex/amsmath/amstext.dtx
index d6475561fb0..88cc837f03a 100644
--- a/Master/texmf-dist/source/latex/amsmath/amstext.dtx
+++ b/Master/texmf-dist/source/latex/amsmath/amstext.dtx
@@ -77,7 +77,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must be December 1994 or later
-\ProvidesPackage{amstext}[2000/06/29 v2.01 AMS text]
+\ProvidesPackage{amstext}[2021/08/26 v2.01 AMS text]
% \end{macrocode}
%
% \section{The implementation}
@@ -108,7 +108,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% If \cn{text} is encountered inside math mode the macro
% \cs{text@} is called. It has one mandatory argument, the text
% which should be produced. Since we do not know in which math
-% style we are currently in we call \cs{mathchoice} to tyeset
+% style we are currently in we call \cs{mathchoice} to typeset
% our text in all four possible styles.
% \begin{macrocode}
\def\text@#1{{\mathchoice
@@ -277,7 +277,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%\subsection{Applications of \cn{text}}
%
% \begin{macro}{\mathhexbox}
-% We start with an re-definition of the \fn{plain.tex} macro
+% We start with a re-definition of the \fn{plain.tex} macro
% \cs{mathhexbox}. (Although M. Spivak in \amstex/ uses the name
% \cs{mathhexbox@} for this purpose, I [FMi] don't see any reason
% to use a new name since the new definition is superior, has the