summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-29 20:08:58 +0000
committerKarl Berry <karl@freefriends.org>2021-09-29 20:08:58 +0000
commit16d9963d74e8c07921882db74621f1ec0c757626 (patch)
tree4a769e711a69ef746ea5a89c749df376939c519d /Master
parent1b0dbf4559f4c1b8f9b9ecd96ddd700138c53bce (diff)
linenoamsmath (29sep21)
git-svn-id: svn://tug.org/texlive/trunk@60655 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/linenoamsmath/README15
-rw-r--r--Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdfbin0 -> 224791 bytes
-rw-r--r--Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx583
-rw-r--r--Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins26
-rw-r--r--Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty76
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/linenoamsmath.tlpsrc0
8 files changed, 702 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/linenoamsmath/README b/Master/texmf-dist/doc/latex/linenoamsmath/README
new file mode 100644
index 00000000000..7e3cef33bd9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/linenoamsmath/README
@@ -0,0 +1,15 @@
+linenoamsmath -- Make the `amsmath' package work with the `lineno' package
+
+Karl Wette, 2021/09/29
+
+This package patches the `amsmath' package to work with the `lineno'
+package. The code I've used is largely based on the posts at
+https://tex.stackexchange.com/a/461192 and
+https://tex.stackexchange.com/a/443201; credit is due to their author.
+In addition I've made a few refinements to handle some corner cases.
+
+This work is licensed under the LaTeX Project Public License 1.3 or
+any later version.
+
+History:
+* v1.0 (2021/09/29) Initial version
diff --git a/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf b/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf
new file mode 100644
index 00000000000..c150b242e9a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx b/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx
new file mode 100644
index 00000000000..09c5bb66e57
--- /dev/null
+++ b/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx
@@ -0,0 +1,583 @@
+% \iffalse meta-comment
+%
+% linenoamsmath.dtx
+% Copyright 2021 Karl Wette
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Karl Wette.
+%
+% This work consists of the files linenoamsmath.dtx and
+% linenoamsmath.ins and the derived file linenoamsmath.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{linenoamsmath.dtx}
+%</driver>
+%<*package>
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{linenoamsmath}
+ [2021/09/29 v1.0 Make the amsmath package work with the lineno package]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[leqno]{amsmath}
+\usepackage[mathlines]{linenoamsmath}[2021/09/29]
+\usepackage{lipsum}
+\usepackage{hyperref}
+\RecordChanges
+\begin{document}
+\DocInput{linenoamsmath.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{74}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \changes{v1.0}{2021/09/29}{Initial version}
+%
+% \GetFileInfo{linenoamsmath.sty}
+%
+% \title{The \textsf{linenoamsmath} package\thanks{This document
+% corresponds to \textsf{linenoamsmath}~\fileversion, dated \filedate.}}
+% \author{Karl Wette}
+%
+% \maketitle
+%
+% This package patches the
+% \textsf{amsmath}\footnote{\url{https://ctan.org/pkg/amsmath}} package to work
+% with the \textsf{lineno}\footnote{\url{https://ctan.org/pkg/lineno}}
+% package. The code I've used is largely based on the posts at
+% \url{https://tex.stackexchange.com/a/461192} and
+% \url{https://tex.stackexchange.com/a/443201}; credit is due to their author.
+% In addition I've made a few refinements to handle some corner cases.
+%
+% \section{Usage}
+%
+% Just include the package; it will automatically include \textsf{amsmath} and \textsf{lineno}:
+% \begin{verse}
+% |\usepackage{linenoamsmath}| \\
+% ... \\
+% |\linenumbers| \\
+% ... Text with line numbers ... \\
+% |\begin{align}| \\
+% ... Equations without line numbers ... \\
+% |\end{align}|
+% \end{verse}
+% All options to this package are passed through to \textsf{lineno},
+% so e.g.\ if you want to add line numbers to equations you can specity the
+% |[mathlines]| option:
+% \begin{verse}
+% |\usepackage[mathlines]{linenoamsmath}| \\
+% ... \\
+% |\linenumbers| \\
+% ... Text with line numbers ... \\
+% |\begin{align}| \\
+% ... Equations with line numbers ... \\
+% |\end{align}|
+% \end{verse}
+% If you need to pass options to \textsf{amsmath}, you can include it manually first:
+% \begin{verse}
+% |\usepackage[...]{amsmath}| \\
+% |\usepackage[mathlines]{linenoamsmath}|
+% \end{verse}
+%
+% \section{Demonstration}
+%
+% This section demonstrates that, with this package, line numbers are correctly
+% formatted when using \textsf{amsmath} math environments.
+%
+% \newcounter{lipsumparagraph}
+% \newcommand{\nextlipsum}{\stepcounter{lipsumparagraph}\lipsum[\thelipsumparagraph][1-4]}
+% \newcommand{\crs}{\qquad\qquad\texttt{[\textbackslash\textbackslash{}*]}\\*}
+%
+% \linenumbers
+%
+% \subsection{Normal text}
+%
+% \nextlipsum
+%
+% \subsection{\texttt{equation}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{equation}
+% E = m c^2 \,.
+% \end{equation}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{equation}
+% E = m c^2 \,.
+% \end{equation}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{equation*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{equation*}
+% E = m c^2 \,.
+% \end{equation*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{equation*}
+% E = m c^2 \,.
+% \end{equation*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{\textbackslash[\ldots\textbackslash]}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \[
+% E = m c^2 \,.
+% \]
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \[
+% E = m c^2 \,.
+% \]
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{multline}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline}
+% \nextlipsum
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \\
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \\
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{multline*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline*}
+% \nextlipsum
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \crs
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \\
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{gather}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{gather}
+% E = m c^2 \,.
+% \end{gather}
+% \nextlipsum
+% \begin{gather}
+% E = m c^2 \,, \\
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather}
+% E = m c^2 \,.
+% \end{gather}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather}
+% E = m c^2 \,, \\
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{gather*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{gather*}
+% E = m c^2 \,.
+% \end{gather*}
+% \nextlipsum
+% \begin{gather*}
+% E = m c^2 \,, \crs
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather*}
+% E = m c^2 \,.
+% \end{gather*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather*}
+% E = m c^2 \,, \\
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{align}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align}
+% \nextlipsum
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{align*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align*}
+% \nextlipsum
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \crs
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{alignat}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat}
+% \nextlipsum
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{alignat*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat*}
+% \nextlipsum
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \crs
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{flalign}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign}
+% \nextlipsum
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{flalign*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign*}
+% \nextlipsum
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \crs
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \nolinenumbers
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% All options to this package are passed through to \textsf{lineno}.
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}}
+\ProcessOptions\relax
+% \end{macrocode}
+% Include \textsf{amsmath} and \textsf{lineno}.
+% \begin{macrocode}
+\RequirePackage{amsmath}
+\RequirePackage{lineno}
+% \end{macrocode}
+% Needs \textsf{etoolbox} for patching macros.
+% \begin{macrocode}
+\RequirePackage{etoolbox}
+% \end{macrocode}
+% Patch math environments:
+% \begin{itemize}
+%
+% \item Setting |\postdisplaypenalty=0| removes extra line numbers from
+% \textsf{amsmath} math environments.
+%
+% \item Patching |\math@cr@| to add |\linenoamsmath@ams@eqpen| to |\@eqpen|,
+% then setting |\linenoamsmath@ams@eqpen| to |\interdisplaylinepenalty|,
+% preserves line numbers when equations are separated using the |\\*| line
+% break instead of |\\|.
+%
+% \end{itemize}
+% \begin{macrocode}
+\newcommand*\linenoamsmath@patch[1]{%
+ \cspreto{#1}{\linenomath}%
+ \cspreto{#1*}{\linenomath}%
+ \csappto{end#1}{\endlinenomath}%
+ \csappto{end#1*}{\endlinenomath}%
+}
+\newcount\linenoamsmath@ams@eqpen
+\cspreto{math@cr@}{\global\@eqpen\numexpr\@eqpen+\linenoamsmath@ams@eqpen\relax}
+\newcommand*\linenoamsmath@patch@ams[1]{%
+ \cspreto{#1}{%
+ \linenomath%
+ \postdisplaypenalty=0%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+ }%
+ \cspreto{#1*}{%
+ \linenomath%
+ \postdisplaypenalty=0%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+ }%
+ \csappto{end#1}{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \endlinenomath%
+ }%
+ \csappto{end#1*}{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \endlinenomath%
+ }%
+}
+\linenoamsmath@patch{equation}
+\linenoamsmath@patch@ams{multline}
+\linenoamsmath@patch@ams{gather}
+\linenoamsmath@patch@ams{align}
+\linenoamsmath@patch@ams{alignat}
+\linenoamsmath@patch@ams{flalign}
+% \end{macrocode}
+% Patch |\mmeasure@| which is used internally by |multline|:
+% \begin{itemize}
+%
+% \item Setting |\interdisplaylinepenalty=0| removes an extra line number from
+% the beginning of a multi-line |multline| where line numbers in equations are
+% turned on.
+%
+% \item Adding |\\| to the end of the argument of |\mmeasure@| removes an extra
+% line number from the beginning of a single-line |multline| where line
+% numbers in equations are turned off.
+%
+% \item Need to set |\linenoamsmath@ams@eqpen| to zero while in this macro to
+% avoid creating extra line numbers.
+%
+% \end{itemize}
+% \begin{macrocode}
+\let\linenoamsmath@ams@mmeasure\mmeasure@
+\def\mmeasure@#1{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \begingroup%
+ \interdisplaylinepenalty=0%
+ \linenoamsmath@ams@mmeasure{#1\\}%
+ \endgroup%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+}
+% \end{macrocode}
+%
+% \PrintChanges
+% \Finale
+\endinput
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: t
+% End:
diff --git a/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins b/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins
new file mode 100644
index 00000000000..0bf4ed10b1e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins
@@ -0,0 +1,26 @@
+% linenoamsmath.ins
+% Copyright 2021 Karl Wette
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Karl Wette.
+%
+% This work consists of the files linenoamsmath.dtx and
+% linenoamsmath.ins and the derived file linenoamsmath.sty.
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/linenoamsmath}
+
+\generate{\file{linenoamsmath.sty}{\from{linenoamsmath.dtx}{package}}}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty b/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty
new file mode 100644
index 00000000000..5915e6c0237
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty
@@ -0,0 +1,76 @@
+%%
+%% This is file `linenoamsmath.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% linenoamsmath.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from linenoamsmath.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file linenoamsmath.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{linenoamsmath}
+ [2021/09/29 v1.0 Make the amsmath package work with the lineno package]
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}}
+\ProcessOptions\relax
+\RequirePackage{amsmath}
+\RequirePackage{lineno}
+\RequirePackage{etoolbox}
+\newcommand*\linenoamsmath@patch[1]{%
+ \cspreto{#1}{\linenomath}%
+ \cspreto{#1*}{\linenomath}%
+ \csappto{end#1}{\endlinenomath}%
+ \csappto{end#1*}{\endlinenomath}%
+}
+\newcount\linenoamsmath@ams@eqpen
+\cspreto{math@cr@}{\global\@eqpen\numexpr\@eqpen+\linenoamsmath@ams@eqpen\relax}
+\newcommand*\linenoamsmath@patch@ams[1]{%
+ \cspreto{#1}{%
+ \linenomath%
+ \postdisplaypenalty=0%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+ }%
+ \cspreto{#1*}{%
+ \linenomath%
+ \postdisplaypenalty=0%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+ }%
+ \csappto{end#1}{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \endlinenomath%
+ }%
+ \csappto{end#1*}{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \endlinenomath%
+ }%
+}
+\linenoamsmath@patch{equation}
+\linenoamsmath@patch@ams{multline}
+\linenoamsmath@patch@ams{gather}
+\linenoamsmath@patch@ams{align}
+\linenoamsmath@patch@ams{alignat}
+\linenoamsmath@patch@ams{flalign}
+\let\linenoamsmath@ams@mmeasure\mmeasure@
+\def\mmeasure@#1{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \begingroup%
+ \interdisplaylinepenalty=0%
+ \linenoamsmath@ams@mmeasure{#1\\}%
+ \endgroup%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+}
+\endinput
+%%
+%% End of file `linenoamsmath.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 7a491535a6e..385eabe87d6 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -466,7 +466,7 @@ my @TLP_working = qw(
libertinus-fonts libertinus-otf libertinus-type1 libertinust1math
libgreek librarian librebaskerville librebodoni librecaslon librefranklin
libris lie-hasse light-latex-make lilyglyphs limap limecv linearA linegoal
- lineno ling-macros linguex linguisticspro linop
+ lineno linenoamsmath ling-macros linguex linguisticspro linop
lion-msc lipsum lisp-on-tex
listbib listing listings listings-ext listingsutf8 listlbls listliketab
listofitems listofsymbols
diff --git a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
index e14ecc4b17c..603ae4d64e3 100644
--- a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
@@ -117,6 +117,7 @@ depend karnaughmap
depend kvmap
depend letterswitharrows
depend lie-hasse
+depend linenoamsmath
depend logicproof
depend longdivision
depend lpform
diff --git a/Master/tlpkg/tlpsrc/linenoamsmath.tlpsrc b/Master/tlpkg/tlpsrc/linenoamsmath.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/linenoamsmath.tlpsrc