texlive[60655] Master: linenoamsmath (29sep21)

commits+karl at tug.org commits+karl at tug.org
Wed Sep 29 22:08:58 CEST 2021


Revision: 60655
          http://tug.org/svn/texlive?view=revision&revision=60655
Author:   karl
Date:     2021-09-29 22:08:58 +0200 (Wed, 29 Sep 2021)
Log Message:
-----------
linenoamsmath (29sep21)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/linenoamsmath/
    trunk/Master/texmf-dist/doc/latex/linenoamsmath/README
    trunk/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf
    trunk/Master/texmf-dist/source/latex/linenoamsmath/
    trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx
    trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins
    trunk/Master/texmf-dist/tex/latex/linenoamsmath/
    trunk/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty
    trunk/Master/tlpkg/tlpsrc/linenoamsmath.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/linenoamsmath/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/linenoamsmath/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/linenoamsmath/README	2021-09-29 20:08:58 UTC (rev 60655)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/linenoamsmath/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf	2021-09-29 20:08:07 UTC (rev 60654)
+++ trunk/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf	2021-09-29 20:08:58 UTC (rev 60655)

Property changes on: trunk/Master/texmf-dist/doc/latex/linenoamsmath/linenoamsmath.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx	2021-09-29 20:08:58 UTC (rev 60655)
@@ -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 at cr@| to add |\linenoamsmath at ams@eqpen| to |\@eqpen|,
+%   then setting |\linenoamsmath at ams@eqpen| to |\interdisplaylinepenalty|,
+%   preserves line numbers when equations are separated using the |\\*| line
+%   break instead of |\\|.
+%
+% \end{itemize}
+%    \begin{macrocode}
+\newcommand*\linenoamsmath at patch[1]{%
+  \cspreto{#1}{\linenomath}%
+  \cspreto{#1*}{\linenomath}%
+  \csappto{end#1}{\endlinenomath}%
+  \csappto{end#1*}{\endlinenomath}%
+}
+\newcount\linenoamsmath at ams@eqpen
+\cspreto{math at cr@}{\global\@eqpen\numexpr\@eqpen+\linenoamsmath at ams@eqpen\relax}
+\newcommand*\linenoamsmath at patch@ams[1]{%
+  \cspreto{#1}{%
+    \linenomath%
+    \postdisplaypenalty=0%
+    \global\linenoamsmath at ams@eqpen\interdisplaylinepenalty%
+  }%
+  \cspreto{#1*}{%
+    \linenomath%
+    \postdisplaypenalty=0%
+    \global\linenoamsmath at ams@eqpen\interdisplaylinepenalty%
+  }%
+  \csappto{end#1}{%
+    \global\linenoamsmath at ams@eqpen\z@%
+    \endlinenomath%
+  }%
+  \csappto{end#1*}{%
+    \global\linenoamsmath at ams@eqpen\z@%
+    \endlinenomath%
+  }%
+}
+\linenoamsmath at patch{equation}
+\linenoamsmath at patch@ams{multline}
+\linenoamsmath at patch@ams{gather}
+\linenoamsmath at patch@ams{align}
+\linenoamsmath at patch@ams{alignat}
+\linenoamsmath at 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 at ams@eqpen| to zero while in this macro to
+%   avoid creating extra line numbers.
+%
+% \end{itemize}
+%    \begin{macrocode}
+\let\linenoamsmath at ams@mmeasure\mmeasure@
+\def\mmeasure@#1{%
+  \global\linenoamsmath at ams@eqpen\z@%
+  \begingroup%
+  \interdisplaylinepenalty=0%
+  \linenoamsmath at ams@mmeasure{#1\\}%
+  \endgroup%
+  \global\linenoamsmath at ams@eqpen\interdisplaylinepenalty%
+}
+%    \end{macrocode}
+%
+% \PrintChanges
+% \Finale
+\endinput
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: t
+% End:


Property changes on: trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/linenoamsmath/linenoamsmath.ins	2021-09-29 20:08:58 UTC (rev 60655)
@@ -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

Added: trunk/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty	2021-09-29 20:08:58 UTC (rev 60655)
@@ -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 at patch[1]{%
+  \cspreto{#1}{\linenomath}%
+  \cspreto{#1*}{\linenomath}%
+  \csappto{end#1}{\endlinenomath}%
+  \csappto{end#1*}{\endlinenomath}%
+}
+\newcount\linenoamsmath at ams@eqpen
+\cspreto{math at cr@}{\global\@eqpen\numexpr\@eqpen+\linenoamsmath at ams@eqpen\relax}
+\newcommand*\linenoamsmath at patch@ams[1]{%
+  \cspreto{#1}{%
+    \linenomath%
+    \postdisplaypenalty=0%
+    \global\linenoamsmath at ams@eqpen\interdisplaylinepenalty%
+  }%
+  \cspreto{#1*}{%
+    \linenomath%
+    \postdisplaypenalty=0%
+    \global\linenoamsmath at ams@eqpen\interdisplaylinepenalty%
+  }%
+  \csappto{end#1}{%
+    \global\linenoamsmath at ams@eqpen\z@%
+    \endlinenomath%
+  }%
+  \csappto{end#1*}{%
+    \global\linenoamsmath at ams@eqpen\z@%
+    \endlinenomath%
+  }%
+}
+\linenoamsmath at patch{equation}
+\linenoamsmath at patch@ams{multline}
+\linenoamsmath at patch@ams{gather}
+\linenoamsmath at patch@ams{align}
+\linenoamsmath at patch@ams{alignat}
+\linenoamsmath at patch@ams{flalign}
+\let\linenoamsmath at ams@mmeasure\mmeasure@
+\def\mmeasure@#1{%
+  \global\linenoamsmath at ams@eqpen\z@%
+  \begingroup%
+  \interdisplaylinepenalty=0%
+  \linenoamsmath at ams@mmeasure{#1\\}%
+  \endgroup%
+  \global\linenoamsmath at ams@eqpen\interdisplaylinepenalty%
+}
+\endinput
+%%
+%% End of file `linenoamsmath.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-09-29 20:08:07 UTC (rev 60654)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-09-29 20:08:58 UTC (rev 60655)
@@ -466,7 +466,7 @@
     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

Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2021-09-29 20:08:07 UTC (rev 60654)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2021-09-29 20:08:58 UTC (rev 60655)
@@ -117,6 +117,7 @@
 depend kvmap
 depend letterswitharrows
 depend lie-hasse
+depend linenoamsmath
 depend logicproof
 depend longdivision
 depend lpform

Added: trunk/Master/tlpkg/tlpsrc/linenoamsmath.tlpsrc
===================================================================


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