texlive[74905] Master/texmf-dist: eqnlines (10apr25)

commits+karl at tug.org commits+karl at tug.org
Thu Apr 10 22:07:05 CEST 2025


Revision: 74905
          https://tug.org/svn/texlive?view=revision&revision=74905
Author:   karl
Date:     2025-04-10 22:07:04 +0200 (Thu, 10 Apr 2025)
Log Message:
-----------
eqnlines (10apr25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/eqnlines/README.txt
    trunk/Master/texmf-dist/doc/latex/eqnlines/eqnlines.pdf
    trunk/Master/texmf-dist/source/latex/eqnlines/eqnlines.dtx
    trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines-dev.sty
    trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines.sty

Modified: trunk/Master/texmf-dist/doc/latex/eqnlines/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/eqnlines/README.txt	2025-04-10 20:06:53 UTC (rev 74904)
+++ trunk/Master/texmf-dist/doc/latex/eqnlines/README.txt	2025-04-10 20:07:04 UTC (rev 74905)
@@ -1,4 +1,4 @@
-eqnlines v0.7
+eqnlines v0.7.1
 Copyright 2024-2025 Niklas Beisert
 
 Based on the latex package amsmath:

Modified: trunk/Master/texmf-dist/doc/latex/eqnlines/eqnlines.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/eqnlines/eqnlines.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/eqnlines/eqnlines.dtx	2025-04-10 20:06:53 UTC (rev 74904)
+++ trunk/Master/texmf-dist/source/latex/eqnlines/eqnlines.dtx	2025-04-10 20:07:04 UTC (rev 74905)
@@ -23,10 +23,10 @@
 % and the derived files eqnlines.sty.
 %
 %<package|sample>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-%<package&!dev>\ProvidesPackage{eqnlines}[2025/04/03 v0.7 Single- and multi-line equations]
-%<package&dev>\ProvidesPackage{eqnlines-dev}[2025/04/03 v0.7 Single- and multi-line equations (development)]
+%<package&!dev>\ProvidesPackage{eqnlines}[2025/04/09 v0.7.1 Single- and multi-line equations]
+%<package&dev>\ProvidesPackage{eqnlines-dev}[2025/04/09 v0.7.1 Single- and multi-line equations (development)]
 %<*driver>
-\def\thedate#1{2025/04/03}\def\theversion#1{v0.7}
+\def\thedate#1{2025/04/09}\def\theversion#1{v0.7.1}
 \ProvidesFile{eqnlines.dtx}[\thedate{} \theversion{} eqnlines reference manual file]
 \PassOptionsToClass{10pt,a4paper}{article}
 \documentclass{ltxdoc}
@@ -1252,7 +1252,7 @@
 \DescribeKey{punct}
 The package supplies a semi-automatic scheme by which
 equations are terminated by a specific punctuation mark.
-\footnote{Clearly, the implementation of the scheme
+\unskip\footnote{Clearly, the implementation of the scheme
 will takes higher efforts than direct coding.
 Hence, the scheme can be useful in situations
 where equations typically terminate phrases or
@@ -1805,6 +1805,8 @@
                    environments and macros \\
 |amsmathends| & bool & patch \ctanpkg{amsmath} environments
                    with individual endings \\
+|backup| & bool & backup original \ctanpkg{amsmath} environments
+                   as |ams...| \\
 |ang| & bool & provide |\<|\ldots|\>| \\
 |eqref| & bool & provide |\eqref| \\
 \end{tabular}
@@ -1977,9 +1979,9 @@
 The present code is based on \ctanpkg{amsmath} v2.17t (2024/11/05).
 Compatibility with the \ctanpkg{amsmath} package is maintained
 whether \ctanpkg{eqnlines} is loaded before or after \ctanpkg{amsmath}.
-By default, \ctanpkg{eqnlines} will rename
-the math environments of \ctanpkg{amsmath} with a prefix |ams...|
-and overwrite them with its own implementations.
+By default, \ctanpkg{eqnlines} overwrites
+most math environments of \ctanpkg{amsmath} with its own implementations.
+It can also preserve them as |ams...| if needed.
 Alternatively, \ctanpkg{eqnlines} may assign individual names
 to the maths environments and preserve the ones of \ctanpkg{amsmath}.
 The other features provided by \ctanpkg{amsmath}
@@ -2045,11 +2047,11 @@
 when command is less recent.
 %
 \item
-allow amsmath loading after eqnlines when pdf tagging is active
-(cannot put a hook on latex-lab-amsmath)
+simplify |\advance| using |\dimexpr|, |\glueexpr|, |\numexpr|
 %
 \item
-simplify |\advance| using |\dimexpr|, |\glueexpr|, |\numexpr|
+|\intertext| might not collaborate correctly with pdf tagging
+%
 \end{itemize}
 \fi
 
@@ -2067,6 +2069,16 @@
 \fi
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{v0.7.1:} 2025/04/09
+
+\begin{itemize}
+\item
+improvements for pdf tagging
+\item
+backup all available math environments at the start using |backup| switch
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \paragraph{v0.7:} 2025/04/03
 
 \begin{itemize}
@@ -2456,6 +2468,13 @@
 \def\eql at amsmath@let#1#2{\eql at amsmath@undefine#1\let#1#2}
 %    \end{macrocode}
 %
+% \TODO temporary fix for development stages
+%    \begin{macrocode}
+\@ifpackageloaded{amsmath}{}{
+  \DeclareHookRule{package/amsmath/after}
+    {eqnlines}{after}{latex-lab-testphase-math}}
+%    \end{macrocode}
+%
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \subsection{PDF Tagging Support}
 %
@@ -2527,6 +2546,7 @@
     }%
   }
   \def\eql at tagging@end{}
+  \def\eql at tagging@register at env{\math_register_env:n}
   \ExplSyntaxOff
 \else
   \def\eql at tagging@mathsave{}
@@ -2544,6 +2564,7 @@
   \def\eql at tagging@alignright{}
   \def\eql at tagging@start{}
   \def\eql at tagging@end{}
+  \def\eql at tagging@register at env{\@gobble}
 \fi
 %    \end{macrocode}
 %
@@ -4371,9 +4392,11 @@
 % \TODO there seems to be an offset of 1em in predisplaysize
 %   towards actual content, nice.
 % \TODO must not use setlength or setcounter when calc is loaded
+% \TODO do we actually need penalty adjustments
+%   in case of paragraphs above or below?
 %    \begin{macrocode}
 \def\eql at display@close{%
-% \TODO temporary fix
+% \TODO temporary fix for development stages
   \ifdefined\eql at tagging@on
     \ifdefined\dollardollar at begin\else
       \belowdisplayskip-\belowdisplayskip
@@ -4530,7 +4553,7 @@
   \fi
   \prevgraf\count@
   \global\eql at skip@mode at leave@\eql at skip@mode at leave@
-% \TODO temporary fix
+% \TODO temporary fix for development stages
   \ifdefined\eql at tagging@on
     \ifdefined\dollardollar at begin\else
       \belowdisplayskip-\belowdisplayskip
@@ -8636,6 +8659,7 @@
 %    \begin{macrocode}
 \let\eql at provide@opt at equation\eql at true
 \let\eql at provide@opt at amsmathends\eql at true
+\let\eql at provide@opt at backup\eql at false
 \let\eql at provide@opt at amsmath\eql at true
 \let\eql at provide@opt at ang\eql at true
 \let\eql at provide@opt at eqref\eql at true
@@ -8645,6 +8669,9 @@
 \eql at define@key{setup}{amsmathends}[true]{%
   \eql at error@packageoption{#2}%
   \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at amsmathends}
+\eql at define@key{setup}{backup}[true]{%
+  \eql at error@packageoption{#2}%
+  \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at backup}
 \eql at define@key{setup}{amsmath}[true]{%
   \eql at error@packageoption{#2}%
   \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at amsmath}
@@ -8907,14 +8934,93 @@
 %
 % \TODO describe
 %    \begin{macrocode}
-\def\eql at provide@env#1#2{%
+\def\eql at backup@env at amsmath#1{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{ams#1}{#1}%
+    \eql at provide@moveenv{ams#1*}{#1*}%
+  }%
+}
+%    \end{macrocode}
+%
+% \TODO describe
+%    \begin{macrocode}
+\def\eql at backup@env at equation{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{amsequation}{equation}%
+    \eql at tagging@register at env{amsequation}%
+    \eql at provide@moveenv{amsequation*}{equation*}%
+    \eql at tagging@register at env{amsequation*}%
+  }%
+  \AddToHook{package/hyperref/after}{%
+    \@ifpackageloaded{amsmath}{}{%
+      \let\latexequation\H at equation
+      \let\endlatexequation\H at endequation
+      \eql at tagging@register at env{latexequation}%
+      \eql at provide@moveenv{hyperrefequation}{equation}%
+      \eql at tagging@register at env{hyperrefequation}%
+    }%
+  }%
+  \@ifpackageloaded{amsmath}{}{\@ifpackageloaded{hyperref}{}{%
+    \eql at provide@moveenv{latexequation}{equation}%
+    \eql at tagging@register at env{latexequation}%
+  }}%
+}
+%    \end{macrocode}
+%
+% \TODO describe
+%    \begin{macrocode}
+\def\eql at backup@env at multlined{%
+  \AddToHook{package/mathtools/after}{%
+    \eql at provide@moveenv{amsmultlined}{multlined}%
+  }%
+}
+%    \end{macrocode}
+%
+% \TODO describe
+%    \begin{macrocode}
+\def\eql at backup@env at subequations{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{amssubequations}{subequations}%
+  }%
+  \AddToHook{package/hyperref/after}{%
+    \AddToHook{cmd/amssubequations/before}%
+    {%
+      \stepcounter{equation}%
+      \protected at edef\theHparentequation{\theHequation}%
+      \addtocounter{equation}{-1}%
+    }%
+    \AddToHook{cmd/amssubequations/after}%
+    {%
+      \def\theHequation{\theHparentequation\alph{equation}}%
+      \ignorespaces
+    }%
+  }%
+}
+%    \end{macrocode}
+%
+% \TODO describe
+%    \begin{macrocode}
+\def\eql at backup@env{%
+  \eql at backup@env at equation
+  \eql at backup@env at amsmath{gather}
+  \eql at backup@env at amsmath{multline}
+  \eql at backup@env at amsmath{align}
+  \eql at backup@env at amsmath{flalign}
+  \eql at backup@env at amsmath{aligned}
+  \eql at backup@env at amsmath{gathered}
+  \eql at backup@env at multlined
+  \eql at backup@env at subequations
+}
+%    \end{macrocode}
+%
+% \TODO describe
+%    \begin{macrocode}
+\def\eql at provide@env at amsmath#1#2{%
   \eql at provide@onlyonce{#1}{#2}%
   \ifdefined\eql at tmp
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql@#1}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{ams#1}{#1}%
-      \eql at provide@moveenv{ams#1*}{#1*}%
       \eql at provide@moveenv{#1}{eql@#1}%
       \eql at provide@moveenv{#1*}{eql@#1*}%
     }%
@@ -8938,22 +9044,14 @@
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql at equation}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{amsequation}{equation}%
-      \eql at provide@moveenv{amsequation*}{equation*}%
       \eql at provide@moveenv{equation}{eql at equation}%
       \eql at provide@moveenv{equation*}{eql at equation*}%
     }%
     \AddToHook{package/hyperref/after}{%
       \@ifpackageloaded{amsmath}{}{%
-        \let\latexequation\H at equation
-        \let\endlatexequation\H at endequation
-        \eql at provide@moveenv{hyperrefequation}{equation}%
         \eql at provide@moveenv{equation}{eql at equation}%
       }%
     }%
-    \@ifpackageloaded{amsmath}{}{\@ifpackageloaded{hyperref}{}{%
-      \eql at provide@moveenv{latexequation}{equation}%
-    }}%
     \eql at provide@moveenv{equation}{eql at equation}%
     \eql at provide@moveenv{equation*}{eql at equation*}%
     \eql at amsmath@before{\eql at provide@undefineenv{equation*}}%
@@ -8975,7 +9073,6 @@
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql at multlined}%
   \else
     \AddToHook{package/mathtools/after}{%
-      \eql at provide@moveenv{amsmultlined}{multlined}%
       \eql at provide@moveenv{multlined}{eql at multlined}%
     }%
     \eql at provide@moveenv{multlined}{eql at multlined}%
@@ -8994,7 +9091,6 @@
       \expandafter{\eql at tmp}{eql at subequations}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{amssubequations}{subequations}%
       \eql at provide@moveenv{subequations}{eql at subequations}%
     }%
     \AddToHook{package/hyperref/after}{%
@@ -9002,17 +9098,6 @@
       \AddToHook{cmd/subequations/after}[hyperref]{}%
       \RemoveFromHook{cmd/subequations/before}[hyperref]%
       \RemoveFromHook{cmd/subequations/after}[hyperref]%
-      \AddToHook{cmd/amssubequations/before}%
-      {%
-        \stepcounter{equation}%
-        \protected at edef\theHparentequation{\theHequation}%
-        \addtocounter{equation}{-1}%
-      }%
-      \AddToHook{cmd/amssubequations/after}%
-      {%
-        \def\theHequation{\theHparentequation\alph{equation}}%
-        \ignorespaces
-      }%
       \AddToHook{begindocument/end}{%
         \eql at provide@moveenv{subequations}{eql at subequations}%
       }%
@@ -9052,12 +9137,12 @@
 % \TODO describe
 %    \begin{macrocode}
 \eql at define@key{provide}{equation}[]{\eql at provide@env at equation{#1}}
-\eql at define@key{provide}{gather}[]{\eql at provide@env{gather}{#1}}
-\eql at define@key{provide}{multline}[]{\eql at provide@env{multline}{#1}}
-\eql at define@key{provide}{align}[]{\eql at provide@env{align}{#1}}
-\eql at define@key{provide}{flalign}[]{\eql at provide@env{flalign}{#1}}
-\eql at define@key{provide}{aligned}[]{\eql at provide@env{aligned}{#1}}
-\eql at define@key{provide}{gathered}[]{\eql at provide@env{gathered}{#1}}
+\eql at define@key{provide}{gather}[]{\eql at provide@env at amsmath{gather}{#1}}
+\eql at define@key{provide}{multline}[]{\eql at provide@env at amsmath{multline}{#1}}
+\eql at define@key{provide}{align}[]{\eql at provide@env at amsmath{align}{#1}}
+\eql at define@key{provide}{flalign}[]{\eql at provide@env at amsmath{flalign}{#1}}
+\eql at define@key{provide}{aligned}[]{\eql at provide@env at amsmath{aligned}{#1}}
+\eql at define@key{provide}{gathered}[]{\eql at provide@env at amsmath{gathered}{#1}}
 \eql at define@key{provide}{multlined}[]{\eql at provide@env at multlined{#1}}
 \eql at define@key{provide}{subequations}[]{\eql at provide@env at subequations{#1}}
 \eql at define@key{provide}{sqr}[]{\eql at provide@sqr}
@@ -9159,6 +9244,17 @@
 \fi
 %    \end{macrocode}
 %
+% Make the ending statements for \ctanpkg{amsmath} environments independent
+% if desired, so that they may be overwritten individually:
+%    \begin{macrocode}
+\ifdefined\eql at provide@opt at amsmathends\eql at amsmath@fixends\fi
+%    \end{macrocode}
+%
+% \TODO describe
+%    \begin{macrocode}
+\ifdefined\eql at provide@opt at backup\eql at backup@env\fi
+%    \end{macrocode}
+%
 % Provide native \LaTeX{} environment |equation|
 % and symbolic shortcut |\[...\]| if desired:
 %    \begin{macrocode}
@@ -9165,12 +9261,6 @@
 \ifdefined\eql at provide@opt at equation\eqnlinesprovide{equation,sqr}\fi
 %    \end{macrocode}
 %
-% Make the ending statements for \ctanpkg{amsmath} environments independent
-% if desired, so that they may be overwritten individually:
-%    \begin{macrocode}
-\ifdefined\eql at provide@opt at amsmathends\eql at amsmath@fixends\fi
-%    \end{macrocode}
-%
 % Provide \ctanpkg{amsmath} equation environments if desired:
 %    \begin{macrocode}
 \ifdefined\eql at provide@opt at amsmath

Modified: trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines-dev.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines-dev.sty	2025-04-10 20:06:53 UTC (rev 74904)
+++ trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines-dev.sty	2025-04-10 20:07:04 UTC (rev 74905)
@@ -21,7 +21,7 @@
 %% version 2008 or later.
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesPackage{eqnlines-dev}[2025/04/03 v0.7 Single- and multi-line equations (development)]
+\ProvidesPackage{eqnlines-dev}[2025/04/09 v0.7.1 Single- and multi-line equations (development)]
 \def\eql at dev#1{\PackageInfo{eqnlines-dev}{#1}}
 \def\eql at dev@start#1{\eql at dev{starting \string#1}}
 \def\eql at dev@enter#1{\eql at dev{entering \string#1}}
@@ -119,6 +119,9 @@
   \@ifpackageloaded{amsmath}{}{\AddToHook{package/amsmath/before}{#1}}}
 \def\eql at amsmath@undefine#1{\eql at amsmath@before{\let#1\@undefined}}
 \def\eql at amsmath@let#1#2{\eql at amsmath@undefine#1\let#1#2}
+\@ifpackageloaded{amsmath}{}{
+  \DeclareHookRule{package/amsmath/after}
+    {eqnlines}{after}{latex-lab-testphase-math}}
 \let\eql at tagging@on\eql at false
 \IfFormatAtLeastTF{2025-06-01}{%
   \csname tag_if_active:T\endcsname{\let\eql at tagging@on\eql at true}}{}
@@ -163,6 +166,7 @@
     }%
   }
   \def\eql at tagging@end{}
+  \def\eql at tagging@register at env{\math_register_env:n}
   \ExplSyntaxOff
 \else
   \def\eql at tagging@mathsave{}
@@ -180,6 +184,7 @@
   \def\eql at tagging@alignright{}
   \def\eql at tagging@start{}
   \def\eql at tagging@end{}
+  \def\eql at tagging@register at env{\@gobble}
 \fi
 \let\eql at tagsleft\eql at false
 \let\eql at layoutleft\eql at false
@@ -3951,6 +3956,7 @@
     {{eqnlines}{\eql at defaults@eqnlines}}}}
 \let\eql at provide@opt at equation\eql at true
 \let\eql at provide@opt at amsmathends\eql at true
+\let\eql at provide@opt at backup\eql at false
 \let\eql at provide@opt at amsmath\eql at true
 \let\eql at provide@opt at ang\eql at true
 \let\eql at provide@opt at eqref\eql at true
@@ -3960,6 +3966,9 @@
 \eql at define@key{setup}{amsmathends}[true]{%
   \eql at error@packageoption{#2}%
   \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at amsmathends}
+\eql at define@key{setup}{backup}[true]{%
+  \eql at error@packageoption{#2}%
+  \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at backup}
 \eql at define@key{setup}{amsmath}[true]{%
   \eql at error@packageoption{#2}%
   \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at amsmath}
@@ -4172,14 +4181,73 @@
     \eql at amsmath@endfix{alignedat}{aligned}%
   }
 }
-\def\eql at provide@env#1#2{%
+\def\eql at backup@env at amsmath#1{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{ams#1}{#1}%
+    \eql at provide@moveenv{ams#1*}{#1*}%
+  }%
+}
+\def\eql at backup@env at equation{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{amsequation}{equation}%
+    \eql at tagging@register at env{amsequation}%
+    \eql at provide@moveenv{amsequation*}{equation*}%
+    \eql at tagging@register at env{amsequation*}%
+  }%
+  \AddToHook{package/hyperref/after}{%
+    \@ifpackageloaded{amsmath}{}{%
+      \let\latexequation\H at equation
+      \let\endlatexequation\H at endequation
+      \eql at tagging@register at env{latexequation}%
+      \eql at provide@moveenv{hyperrefequation}{equation}%
+      \eql at tagging@register at env{hyperrefequation}%
+    }%
+  }%
+  \@ifpackageloaded{amsmath}{}{\@ifpackageloaded{hyperref}{}{%
+    \eql at provide@moveenv{latexequation}{equation}%
+    \eql at tagging@register at env{latexequation}%
+  }}%
+}
+\def\eql at backup@env at multlined{%
+  \AddToHook{package/mathtools/after}{%
+    \eql at provide@moveenv{amsmultlined}{multlined}%
+  }%
+}
+\def\eql at backup@env at subequations{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{amssubequations}{subequations}%
+  }%
+  \AddToHook{package/hyperref/after}{%
+    \AddToHook{cmd/amssubequations/before}%
+    {%
+      \stepcounter{equation}%
+      \protected at edef\theHparentequation{\theHequation}%
+      \addtocounter{equation}{-1}%
+    }%
+    \AddToHook{cmd/amssubequations/after}%
+    {%
+      \def\theHequation{\theHparentequation\alph{equation}}%
+      \ignorespaces
+    }%
+  }%
+}
+\def\eql at backup@env{%
+  \eql at backup@env at equation
+  \eql at backup@env at amsmath{gather}
+  \eql at backup@env at amsmath{multline}
+  \eql at backup@env at amsmath{align}
+  \eql at backup@env at amsmath{flalign}
+  \eql at backup@env at amsmath{aligned}
+  \eql at backup@env at amsmath{gathered}
+  \eql at backup@env at multlined
+  \eql at backup@env at subequations
+}
+\def\eql at provide@env at amsmath#1#2{%
   \eql at provide@onlyonce{#1}{#2}%
   \ifdefined\eql at tmp
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql@#1}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{ams#1}{#1}%
-      \eql at provide@moveenv{ams#1*}{#1*}%
       \eql at provide@moveenv{#1}{eql@#1}%
       \eql at provide@moveenv{#1*}{eql@#1*}%
     }%
@@ -4199,22 +4267,14 @@
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql at equation}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{amsequation}{equation}%
-      \eql at provide@moveenv{amsequation*}{equation*}%
       \eql at provide@moveenv{equation}{eql at equation}%
       \eql at provide@moveenv{equation*}{eql at equation*}%
     }%
     \AddToHook{package/hyperref/after}{%
       \@ifpackageloaded{amsmath}{}{%
-        \let\latexequation\H at equation
-        \let\endlatexequation\H at endequation
-        \eql at provide@moveenv{hyperrefequation}{equation}%
         \eql at provide@moveenv{equation}{eql at equation}%
       }%
     }%
-    \@ifpackageloaded{amsmath}{}{\@ifpackageloaded{hyperref}{}{%
-      \eql at provide@moveenv{latexequation}{equation}%
-    }}%
     \eql at provide@moveenv{equation}{eql at equation}%
     \eql at provide@moveenv{equation*}{eql at equation*}%
     \eql at amsmath@before{\eql at provide@undefineenv{equation*}}%
@@ -4232,7 +4292,6 @@
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql at multlined}%
   \else
     \AddToHook{package/mathtools/after}{%
-      \eql at provide@moveenv{amsmultlined}{multlined}%
       \eql at provide@moveenv{multlined}{eql at multlined}%
     }%
     \eql at provide@moveenv{multlined}{eql at multlined}%
@@ -4247,7 +4306,6 @@
       \expandafter{\eql at tmp}{eql at subequations}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{amssubequations}{subequations}%
       \eql at provide@moveenv{subequations}{eql at subequations}%
     }%
     \AddToHook{package/hyperref/after}{%
@@ -4255,17 +4313,6 @@
       \AddToHook{cmd/subequations/after}[hyperref]{}%
       \RemoveFromHook{cmd/subequations/before}[hyperref]%
       \RemoveFromHook{cmd/subequations/after}[hyperref]%
-      \AddToHook{cmd/amssubequations/before}%
-      {%
-        \stepcounter{equation}%
-        \protected at edef\theHparentequation{\theHequation}%
-        \addtocounter{equation}{-1}%
-      }%
-      \AddToHook{cmd/amssubequations/after}%
-      {%
-        \def\theHequation{\theHparentequation\alph{equation}}%
-        \ignorespaces
-      }%
       \AddToHook{begindocument/end}{%
         \eql at provide@moveenv{subequations}{eql at subequations}%
       }%
@@ -4293,12 +4340,12 @@
   \let\>\eql at equations@ang at close
 }
 \eql at define@key{provide}{equation}[]{\eql at provide@env at equation{#1}}
-\eql at define@key{provide}{gather}[]{\eql at provide@env{gather}{#1}}
-\eql at define@key{provide}{multline}[]{\eql at provide@env{multline}{#1}}
-\eql at define@key{provide}{align}[]{\eql at provide@env{align}{#1}}
-\eql at define@key{provide}{flalign}[]{\eql at provide@env{flalign}{#1}}
-\eql at define@key{provide}{aligned}[]{\eql at provide@env{aligned}{#1}}
-\eql at define@key{provide}{gathered}[]{\eql at provide@env{gathered}{#1}}
+\eql at define@key{provide}{gather}[]{\eql at provide@env at amsmath{gather}{#1}}
+\eql at define@key{provide}{multline}[]{\eql at provide@env at amsmath{multline}{#1}}
+\eql at define@key{provide}{align}[]{\eql at provide@env at amsmath{align}{#1}}
+\eql at define@key{provide}{flalign}[]{\eql at provide@env at amsmath{flalign}{#1}}
+\eql at define@key{provide}{aligned}[]{\eql at provide@env at amsmath{aligned}{#1}}
+\eql at define@key{provide}{gathered}[]{\eql at provide@env at amsmath{gathered}{#1}}
 \eql at define@key{provide}{multlined}[]{\eql at provide@env at multlined{#1}}
 \eql at define@key{provide}{subequations}[]{\eql at provide@env at subequations{#1}}
 \eql at define@key{provide}{sqr}[]{\eql at provide@sqr}
@@ -4346,8 +4393,9 @@
     \fi
   }
 \fi
+\ifdefined\eql at provide@opt at amsmathends\eql at amsmath@fixends\fi
+\ifdefined\eql at provide@opt at backup\eql at backup@env\fi
 \ifdefined\eql at provide@opt at equation\eqnlinesprovide{equation,sqr}\fi
-\ifdefined\eql at provide@opt at amsmathends\eql at amsmath@fixends\fi
 \ifdefined\eql at provide@opt at amsmath
   \eqnlinesprovide{%
     multline,gather,align,flalign,%

Modified: trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines.sty	2025-04-10 20:06:53 UTC (rev 74904)
+++ trunk/Master/texmf-dist/tex/latex/eqnlines/eqnlines.sty	2025-04-10 20:07:04 UTC (rev 74905)
@@ -21,7 +21,7 @@
 %% version 2008 or later.
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesPackage{eqnlines}[2025/04/03 v0.7 Single- and multi-line equations]
+\ProvidesPackage{eqnlines}[2025/04/09 v0.7.1 Single- and multi-line equations]
 \let\eql at false\@undefined
 \let\eql at true\@empty
 \ifdefined\dollardollar at begin
@@ -112,6 +112,9 @@
   \@ifpackageloaded{amsmath}{}{\AddToHook{package/amsmath/before}{#1}}}
 \def\eql at amsmath@undefine#1{\eql at amsmath@before{\let#1\@undefined}}
 \def\eql at amsmath@let#1#2{\eql at amsmath@undefine#1\let#1#2}
+\@ifpackageloaded{amsmath}{}{
+  \DeclareHookRule{package/amsmath/after}
+    {eqnlines}{after}{latex-lab-testphase-math}}
 \let\eql at tagging@on\eql at false
 \IfFormatAtLeastTF{2025-06-01}{%
   \csname tag_if_active:T\endcsname{\let\eql at tagging@on\eql at true}}{}
@@ -156,6 +159,7 @@
     }%
   }
   \def\eql at tagging@end{}
+  \def\eql at tagging@register at env{\math_register_env:n}
   \ExplSyntaxOff
 \else
   \def\eql at tagging@mathsave{}
@@ -173,6 +177,7 @@
   \def\eql at tagging@alignright{}
   \def\eql at tagging@start{}
   \def\eql at tagging@end{}
+  \def\eql at tagging@register at env{\@gobble}
 \fi
 \let\eql at tagsleft\eql at false
 \let\eql at layoutleft\eql at false
@@ -3913,6 +3918,7 @@
     {{eqnlines}{\eql at defaults@eqnlines}}}}
 \let\eql at provide@opt at equation\eql at true
 \let\eql at provide@opt at amsmathends\eql at true
+\let\eql at provide@opt at backup\eql at false
 \let\eql at provide@opt at amsmath\eql at true
 \let\eql at provide@opt at ang\eql at true
 \let\eql at provide@opt at eqref\eql at true
@@ -3922,6 +3928,9 @@
 \eql at define@key{setup}{amsmathends}[true]{%
   \eql at error@packageoption{#2}%
   \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at amsmathends}
+\eql at define@key{setup}{backup}[true]{%
+  \eql at error@packageoption{#2}%
+  \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at backup}
 \eql at define@key{setup}{amsmath}[true]{%
   \eql at error@packageoption{#2}%
   \eql at decide@bool{#3}{#2}{#1}\eql at provide@opt at amsmath}
@@ -4134,14 +4143,73 @@
     \eql at amsmath@endfix{alignedat}{aligned}%
   }
 }
-\def\eql at provide@env#1#2{%
+\def\eql at backup@env at amsmath#1{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{ams#1}{#1}%
+    \eql at provide@moveenv{ams#1*}{#1*}%
+  }%
+}
+\def\eql at backup@env at equation{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{amsequation}{equation}%
+    \eql at tagging@register at env{amsequation}%
+    \eql at provide@moveenv{amsequation*}{equation*}%
+    \eql at tagging@register at env{amsequation*}%
+  }%
+  \AddToHook{package/hyperref/after}{%
+    \@ifpackageloaded{amsmath}{}{%
+      \let\latexequation\H at equation
+      \let\endlatexequation\H at endequation
+      \eql at tagging@register at env{latexequation}%
+      \eql at provide@moveenv{hyperrefequation}{equation}%
+      \eql at tagging@register at env{hyperrefequation}%
+    }%
+  }%
+  \@ifpackageloaded{amsmath}{}{\@ifpackageloaded{hyperref}{}{%
+    \eql at provide@moveenv{latexequation}{equation}%
+    \eql at tagging@register at env{latexequation}%
+  }}%
+}
+\def\eql at backup@env at multlined{%
+  \AddToHook{package/mathtools/after}{%
+    \eql at provide@moveenv{amsmultlined}{multlined}%
+  }%
+}
+\def\eql at backup@env at subequations{%
+  \eql at amsmath@after{%
+    \eql at provide@moveenv{amssubequations}{subequations}%
+  }%
+  \AddToHook{package/hyperref/after}{%
+    \AddToHook{cmd/amssubequations/before}%
+    {%
+      \stepcounter{equation}%
+      \protected at edef\theHparentequation{\theHequation}%
+      \addtocounter{equation}{-1}%
+    }%
+    \AddToHook{cmd/amssubequations/after}%
+    {%
+      \def\theHequation{\theHparentequation\alph{equation}}%
+      \ignorespaces
+    }%
+  }%
+}
+\def\eql at backup@env{%
+  \eql at backup@env at equation
+  \eql at backup@env at amsmath{gather}
+  \eql at backup@env at amsmath{multline}
+  \eql at backup@env at amsmath{align}
+  \eql at backup@env at amsmath{flalign}
+  \eql at backup@env at amsmath{aligned}
+  \eql at backup@env at amsmath{gathered}
+  \eql at backup@env at multlined
+  \eql at backup@env at subequations
+}
+\def\eql at provide@env at amsmath#1#2{%
   \eql at provide@onlyonce{#1}{#2}%
   \ifdefined\eql at tmp
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql@#1}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{ams#1}{#1}%
-      \eql at provide@moveenv{ams#1*}{#1*}%
       \eql at provide@moveenv{#1}{eql@#1}%
       \eql at provide@moveenv{#1*}{eql@#1*}%
     }%
@@ -4161,22 +4229,14 @@
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql at equation}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{amsequation}{equation}%
-      \eql at provide@moveenv{amsequation*}{equation*}%
       \eql at provide@moveenv{equation}{eql at equation}%
       \eql at provide@moveenv{equation*}{eql at equation*}%
     }%
     \AddToHook{package/hyperref/after}{%
       \@ifpackageloaded{amsmath}{}{%
-        \let\latexequation\H at equation
-        \let\endlatexequation\H at endequation
-        \eql at provide@moveenv{hyperrefequation}{equation}%
         \eql at provide@moveenv{equation}{eql at equation}%
       }%
     }%
-    \@ifpackageloaded{amsmath}{}{\@ifpackageloaded{hyperref}{}{%
-      \eql at provide@moveenv{latexequation}{equation}%
-    }}%
     \eql at provide@moveenv{equation}{eql at equation}%
     \eql at provide@moveenv{equation*}{eql at equation*}%
     \eql at amsmath@before{\eql at provide@undefineenv{equation*}}%
@@ -4194,7 +4254,6 @@
     \expandafter\eql at provide@moveenv\expandafter{\eql at tmp}{eql at multlined}%
   \else
     \AddToHook{package/mathtools/after}{%
-      \eql at provide@moveenv{amsmultlined}{multlined}%
       \eql at provide@moveenv{multlined}{eql at multlined}%
     }%
     \eql at provide@moveenv{multlined}{eql at multlined}%
@@ -4209,7 +4268,6 @@
       \expandafter{\eql at tmp}{eql at subequations}%
   \else
     \eql at amsmath@after{%
-      \eql at provide@moveenv{amssubequations}{subequations}%
       \eql at provide@moveenv{subequations}{eql at subequations}%
     }%
     \AddToHook{package/hyperref/after}{%
@@ -4217,17 +4275,6 @@
       \AddToHook{cmd/subequations/after}[hyperref]{}%
       \RemoveFromHook{cmd/subequations/before}[hyperref]%
       \RemoveFromHook{cmd/subequations/after}[hyperref]%
-      \AddToHook{cmd/amssubequations/before}%
-      {%
-        \stepcounter{equation}%
-        \protected at edef\theHparentequation{\theHequation}%
-        \addtocounter{equation}{-1}%
-      }%
-      \AddToHook{cmd/amssubequations/after}%
-      {%
-        \def\theHequation{\theHparentequation\alph{equation}}%
-        \ignorespaces
-      }%
       \AddToHook{begindocument/end}{%
         \eql at provide@moveenv{subequations}{eql at subequations}%
       }%
@@ -4255,12 +4302,12 @@
   \let\>\eql at equations@ang at close
 }
 \eql at define@key{provide}{equation}[]{\eql at provide@env at equation{#1}}
-\eql at define@key{provide}{gather}[]{\eql at provide@env{gather}{#1}}
-\eql at define@key{provide}{multline}[]{\eql at provide@env{multline}{#1}}
-\eql at define@key{provide}{align}[]{\eql at provide@env{align}{#1}}
-\eql at define@key{provide}{flalign}[]{\eql at provide@env{flalign}{#1}}
-\eql at define@key{provide}{aligned}[]{\eql at provide@env{aligned}{#1}}
-\eql at define@key{provide}{gathered}[]{\eql at provide@env{gathered}{#1}}
+\eql at define@key{provide}{gather}[]{\eql at provide@env at amsmath{gather}{#1}}
+\eql at define@key{provide}{multline}[]{\eql at provide@env at amsmath{multline}{#1}}
+\eql at define@key{provide}{align}[]{\eql at provide@env at amsmath{align}{#1}}
+\eql at define@key{provide}{flalign}[]{\eql at provide@env at amsmath{flalign}{#1}}
+\eql at define@key{provide}{aligned}[]{\eql at provide@env at amsmath{aligned}{#1}}
+\eql at define@key{provide}{gathered}[]{\eql at provide@env at amsmath{gathered}{#1}}
 \eql at define@key{provide}{multlined}[]{\eql at provide@env at multlined{#1}}
 \eql at define@key{provide}{subequations}[]{\eql at provide@env at subequations{#1}}
 \eql at define@key{provide}{sqr}[]{\eql at provide@sqr}
@@ -4306,8 +4353,9 @@
     \fi
   }
 \fi
+\ifdefined\eql at provide@opt at amsmathends\eql at amsmath@fixends\fi
+\ifdefined\eql at provide@opt at backup\eql at backup@env\fi
 \ifdefined\eql at provide@opt at equation\eqnlinesprovide{equation,sqr}\fi
-\ifdefined\eql at provide@opt at amsmathends\eql at amsmath@fixends\fi
 \ifdefined\eql at provide@opt at amsmath
   \eqnlinesprovide{%
     multline,gather,align,flalign,%



More information about the tex-live-commits mailing list.