summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/linenoamsmath
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/texmf-dist/tex/latex/linenoamsmath
parent1b0dbf4559f4c1b8f9b9ecd96ddd700138c53bce (diff)
linenoamsmath (29sep21)
git-svn-id: svn://tug.org/texlive/trunk@60655 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/linenoamsmath')
-rw-r--r--Master/texmf-dist/tex/latex/linenoamsmath/linenoamsmath.sty76
1 files changed, 76 insertions, 0 deletions
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'.