diff options
author | Norbert Preining <norbert@preining.info> | 2023-01-20 03:01:05 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-01-20 03:01:05 +0000 |
commit | 6d3235d032cbed920059ab39370928067056573a (patch) | |
tree | aa934ccc80bd69cc4ca388f418a62fa0140e443b /macros/latex/contrib/lineno | |
parent | c11207d3e9027d6aa4153a2103df58382d41e56e (diff) |
CTAN sync 202301200301
Diffstat (limited to 'macros/latex/contrib/lineno')
18 files changed, 182 insertions, 143 deletions
diff --git a/macros/latex/contrib/lineno/README.md b/macros/latex/contrib/lineno/README.md index b543e53029..3b93f2a019 100644 --- a/macros/latex/contrib/lineno/README.md +++ b/macros/latex/contrib/lineno/README.md @@ -1,4 +1,4 @@ -# lineno.sty v5.0, fnlineno.sty v0.55 +# lineno.sty v5.1, fnlineno.sty v0.55 2022-11-29 @@ -10,7 +10,7 @@ reference mechanism. - Copyright 1995--2003 Stephan I. Böttcher - Copyright 2002--2005 Uwe Lück for versions 4.x and code from former Ednotes - Copyright 2011 Uwe Lück for fnlineno.sty/tex/pdf -- Copyright 2021--2022 Karl Wette for versions 5.x +- Copyright 2021--2023 Karl Wette for versions 5.x The files can be redistributed and/or modified under the terms of the LaTeX Project Public License; either @@ -46,11 +46,9 @@ Authors: For being able to use ALL the new `lineno.sty` options, the following files must be "visible" to (La)TeX ("visible" explained below for beginners): -```lineno.sty, edtable.sty, ednmath0.sty, ltabptch.sty``` - -as above ("Home", note that clicking on "entire directory" suffices); - -`longtable.sty` -- from the standard LaTeX Tools bundle. +- `lineno.sty`, `edtable.sty`, `ednmath0.sty`, `ltabptch.sty` -- as above + ("Home", note that clicking on "entire directory" suffices); +- `longtable.sty` -- from the standard LaTeX Tools bundle. Usage always starts with loading lineno.sty by `\usepackage`. The remaining `.sty` files are loaded automatically on the `lineno.sty` options (and we diff --git a/macros/latex/contrib/lineno/doc/CHANGEs.txt b/macros/latex/contrib/lineno/doc/CHANGEs.txt index db95e5304e..9445d718af 100644 --- a/macros/latex/contrib/lineno/doc/CHANGEs.txt +++ b/macros/latex/contrib/lineno/doc/CHANGEs.txt @@ -1,3 +1,8 @@ +CHANGES for lineno pkg v5.1 2023/01/19: + +1. Patch `amsmath` with \AddToHook if possible. + + CHANGES for lineno pkg v5.0 2022/07/30: 1. Merge in `linenoamsmath' patches. @@ -147,9 +152,7 @@ CHANGE 2005/01/20: We have devised macros for indexing with line numbers, yet we don't take the time to release them officially. -If you are interested, please ask via - - http://contact-ednotes.sty.de.vu +If you are interested, please ask via http://contact-ednotes.sty.de.vu CHANGES for lineno.sty v4.1 2004/10/19: diff --git a/macros/latex/contrib/lineno/doc/COPYING.txt b/macros/latex/contrib/lineno/doc/COPYING.txt index e5742fdb85..7092403941 100644 --- a/macros/latex/contrib/lineno/doc/COPYING.txt +++ b/macros/latex/contrib/lineno/doc/COPYING.txt @@ -5,7 +5,7 @@ % Copyright 1995--2003 Stephan I. Böttcher % Copyright 2002--2005 Uwe Lück for versions 4.x and code from former Ednotes % Copyright 2011 Uwe Lück for fnlineno.sty/tex/pdf -% Copyright 2021--2022 Karl Wette for versions 5.x +% Copyright 2021--2023 Karl Wette for versions 5.x % % The files can be redistributed and/or modified under % the terms of the LaTeX Project Public License; either diff --git a/macros/latex/contrib/lineno/doc/SRCFILEs.txt b/macros/latex/contrib/lineno/doc/SRCFILEs.txt index 71ca2cc217..7e64111f74 100644 --- a/macros/latex/contrib/lineno/doc/SRCFILEs.txt +++ b/macros/latex/contrib/lineno/doc/SRCFILEs.txt @@ -1,10 +1,10 @@ ednmath0.sty 2005/01/10 v0.2b math support for lineno/ednotes (ul) edtable.sty 2005/10/03 v1.3c arrays with lineno + ednotes (ul) fnlineno.sty 2011/01/07 v0.55 numbers to footnote lines (UL) -lineno.sty 2022/07/30 line numbers on paragraphs v5.0 +lineno.sty 2023/01/19 line numbers on paragraphs v5.1 vplref.sty 2005/04/25 v0.2a page-line cross-refs fnlineno.tex 2011/02/14 documenting fnlineno.sty (UL) -lineno.tex 2022/07/30 line numbers on paragraphs v5.0 +lineno.tex 2023/01/19 line numbers on paragraphs v5.1 lnosuppl.tex 2011/02/16 documenting supplementary files ulineno.tex 2001/08/03 lineno.sty users manual linenoamsmathdemo.tex 2021/09/30 Make amsmath work with lineno diff --git a/macros/latex/contrib/lineno/doc/fnlineno.pdf b/macros/latex/contrib/lineno/doc/fnlineno.pdf Binary files differindex d1fa5af387..5fc04fbe98 100644 --- a/macros/latex/contrib/lineno/doc/fnlineno.pdf +++ b/macros/latex/contrib/lineno/doc/fnlineno.pdf diff --git a/macros/latex/contrib/lineno/doc/lineno.pdf b/macros/latex/contrib/lineno/doc/lineno.pdf Binary files differindex e7e96f8f41..31aa52c931 100644 --- a/macros/latex/contrib/lineno/doc/lineno.pdf +++ b/macros/latex/contrib/lineno/doc/lineno.pdf diff --git a/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf b/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf Binary files differindex a60815f470..8ec78a498e 100644 --- a/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf +++ b/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf diff --git a/macros/latex/contrib/lineno/doc/lnosuppl.pdf b/macros/latex/contrib/lineno/doc/lnosuppl.pdf Binary files differindex 41c01581bf..cc6aeaf9a2 100644 --- a/macros/latex/contrib/lineno/doc/lnosuppl.pdf +++ b/macros/latex/contrib/lineno/doc/lnosuppl.pdf diff --git a/macros/latex/contrib/lineno/doc/ulineno.pdf b/macros/latex/contrib/lineno/doc/ulineno.pdf Binary files differindex 709008c75b..e6ba98d6e3 100644 --- a/macros/latex/contrib/lineno/doc/ulineno.pdf +++ b/macros/latex/contrib/lineno/doc/ulineno.pdf diff --git a/macros/latex/contrib/lineno/source/fnlineno.tex b/macros/latex/contrib/lineno/source/fnlineno.tex index 2aa81de8d6..b4e12263a8 100644 --- a/macros/latex/contrib/lineno/source/fnlineno.tex +++ b/macros/latex/contrib/lineno/source/fnlineno.tex @@ -7,7 +7,7 @@ of \textsf{fnlineno.sty} as of \UseDateOf{fnlineno.sty}.}} % \listfiles %% 2010/12/22 { \RequirePackage{makedoc}[2010/12/20] \ProcessLineMessage{} - \MakeJobDoc{19}{\SectionLevelThreeParseInput} %% 2010/12/16 + \MakeJobDoc{17}{\SectionLevelThreeParseInput} %% 2010/12/16 } \documentclass{article}%% TODO paper dimensions!? \input{makedoc.cfg} %% shared formatting settings diff --git a/macros/latex/contrib/lineno/source/lineno.tex b/macros/latex/contrib/lineno/source/lineno.tex index 7e706e6bec..baed81f1b8 100644 --- a/macros/latex/contrib/lineno/source/lineno.tex +++ b/macros/latex/contrib/lineno/source/lineno.tex @@ -1,4 +1,4 @@ -\def\fileversion{v5.0} \def\filedate{2022/07/30} +\def\fileversion{v5.1} \def\filedate{2023/01/19} \title{\texttt{\itshape lineno.sty \ \fileversion\ \filedate @@ -8,9 +8,9 @@ A \LaTeX\ package to attach \unskip}\author{% Stephan I. B\"ottcher \\ Uwe L\"uck +\\ Karl Wette \unskip}\date{% -boettcher@physik.uni-kiel.de -\\ http://contact-ednotes.sty.de.vu +\url{https://github.com/latex-lineno/lineno} \\} \documentclass[a4paper,12pt]{article}%D @@ -103,11 +103,7 @@ changes in documentation. This came about as follows. Since late 2002, Christian Tapp and Uwe L\"uck have employed ~lineno.sty~ for their ~ednotes.sty~, a package supporting -critical editions---cf. -\[\mbox{\tt -http://ednotes.sty.de.vu -\unskip}\] ----while you find ~ednotes.sty~ and surrounding files in +critical editions, while you find ~ednotes.sty~ and surrounding files in CTAN folder \path{macros/latex/contrib/ednotes}. Soon, some weaknesses of ~lineno.sty~ showed up, mainly since @@ -213,13 +209,13 @@ since we need the ~\protected@write~ macro. (New v4.00) And we use ~\newcommand*~ for controlling length of user macro arguments, which has been available since December 1994. +(/New v4.00) \begin{code}\begin{verbatim} \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{lineno} [\filedate\space line numbers on paragraphs \fileversion] \end{verbatim} \end{code} -(/New v4.00) \section{% @@ -2429,14 +2425,14 @@ and (if it is) with which options it is to be called. (/New v4.1) \section{% -Former package extensions +Package extensions \label{s:Xt}\unskip} -The extensions in this section were previously supplied +Some of the extensions in this section were previously supplied in separate ~.sty~ files. \subsection{% -$display math$ +\texttt{displaymath} \unskip}\label{ss:display} (New v4.3) From now on, you no longer need to type the ~{linenomath}~ environment with the ~\[~, ~{equation}~, @@ -2712,52 +2708,75 @@ without special height lines. All lines must be (New v5.0) Patches ~amsmath~ to work with ~lineno~. These patches used to be supplied by the ~linenoamsmath~ package. See ~linenoamsmathdemo.pdf~ for a demonstration. +(/New v5.0) + +(/New v5.1) ~lineno~ tries to use \LaTeX's hook management system to patch +~amsmath~, so that the two packages may be loaded independently. This requires +the October 2020 release of \LaTeX. As a fallback for older releases, ~lineno~ +tests whether ~amsmath~ had already been loaded (by testing for the presence +of the ~gather~ command) and if so applies the patches; otherwise if ~amsmath~ +has not been loaded, no patches are applied, and a warning is issued. +(/New v5.1) \begin{code}\begin{verbatim} \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*}{% +\ifdefined\AddToHook + \def\linenoamsmath@patches#1{\AddToHook{package/amsmath/after}{#1}} +\else + \ifdefined\endgather + \def\linenoamsmath@patches#1{#1} + \else + \PackageWarning{lineno}{% + `amsmath' must be loaded before `lineno' for patches to be applied} + \def\linenoamsmath@patches#1{\relax} + \fi +\fi + +\linenoamsmath@patches{ + \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@% - \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% + \begingroup% + \interdisplaylinepenalty=0% + \linenoamsmath@ams@mmeasure{#1\\}% + \endgroup% + \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty% + } } \end{verbatim} \end{code} diff --git a/macros/latex/contrib/lineno/source/linenoamsmathdemo.tex b/macros/latex/contrib/lineno/source/linenoamsmathdemo.tex index f01f1cc364..571b8230e8 100644 --- a/macros/latex/contrib/lineno/source/linenoamsmathdemo.tex +++ b/macros/latex/contrib/lineno/source/linenoamsmathdemo.tex @@ -17,8 +17,15 @@ \documentclass{ltxdoc} -\usepackage[leqno]{amsmath} -\usepackage[mathlines]{lineno} +\ifdefined\AddToHook + \newcommand{\loadorder}{\textsf{lineno} is loaded first, and then patches \textsf{amsmath} using \texttt{\textbackslash AddToHook}} + \usepackage[mathlines]{lineno} + \usepackage[leqno]{amsmath} +\else + \newcommand{\loadorder}{\textsf{amsmath} is loaded first, and then patched directly by \textsf{lineno}} + \usepackage[leqno]{amsmath} + \usepackage[mathlines]{lineno} +\fi \usepackage{lipsum} \usepackage{hyperref} @@ -39,7 +46,7 @@ cases. \section*{Demonstration} This section demonstrates that, with this package, line numbers are correctly -formatted when using \textsf{amsmath} math environments. +formatted when using \textsf{amsmath} math environments. \loadorder. \newcounter{lipsumparagraph} \newcommand{\nextlipsum}{\stepcounter{lipsumparagraph}\lipsum[\thelipsumparagraph][1-4]} diff --git a/macros/latex/contrib/lineno/source/ulineno.tex b/macros/latex/contrib/lineno/source/ulineno.tex index da4438ff20..9780c46da7 100644 --- a/macros/latex/contrib/lineno/source/ulineno.tex +++ b/macros/latex/contrib/lineno/source/ulineno.tex @@ -1,4 +1,4 @@ -% Copyright 1995--1999 Stephan I. B"ottcher <stephan@nevis1.columbia.edu> +% Copyright 1995--1999 Stephan I. Böttcher % % This program can be redistributed and/or modified under the terms % of the LaTeX Project Public License Distributed from CTAN diff --git a/macros/latex/contrib/lineno/tex/ednmath0.sty b/macros/latex/contrib/lineno/tex/ednmath0.sty index ef9884f30c..074af801f7 100644 --- a/macros/latex/contrib/lineno/tex/ednmath0.sty +++ b/macros/latex/contrib/lineno/tex/ednmath0.sty @@ -1,7 +1,5 @@ %% Macro package `ednmath0.sty' for LaTeX2e, -%% copyright (C) 2004 Uwe L\"uck, -%% http://www.contact-ednotes.sty.de.vu -%% --author-maintained; +%% copyright (C) 2004 Uwe Lück %% math support for `lineno.sty' and `ednotes.sty'. %% \def\fileversion{v0.2b} \def\filedate{2005/01/10} @@ -16,7 +14,7 @@ %% %% Please report bugs, problems, and suggestions via %% -%% http://www.contact-ednotes.sty@web.de +%% https://github.com/latex-lineno/lineno % %% * MAIN FEATURE * % diff --git a/macros/latex/contrib/lineno/tex/edtable.sty b/macros/latex/contrib/lineno/tex/edtable.sty index 3d16a9c722..e7865229b2 100644 --- a/macros/latex/contrib/lineno/tex/edtable.sty +++ b/macros/latex/contrib/lineno/tex/edtable.sty @@ -1,8 +1,8 @@ -%% `edtable.sty'---Uwe L"uck, direction Christian Tapp. +%% `edtable.sty'---Uwe Lück, direction Christian Tapp. %% LaTeX package for tables with line numbers and %% editorial notes. %% -%% Copyright (C) 2003-2005 Uwe L"uck--author-maintained. +%% Copyright (C) 2003-2005 Uwe Lück %% \def\fileversion{1.3c} \def\filedate{2005/10/03} %% @@ -15,7 +15,7 @@ %% %% Please send your comments via %% -%% http://www.contact-ednotes.sty.de.vu +%% https://github.com/latex-lineno/lineno %% %% * USAGE: * % diff --git a/macros/latex/contrib/lineno/tex/fnlineno.sty b/macros/latex/contrib/lineno/tex/fnlineno.sty index 224f4743db..fc4dee6152 100644 --- a/macros/latex/contrib/lineno/tex/fnlineno.sty +++ b/macros/latex/contrib/lineno/tex/fnlineno.sty @@ -2,9 +2,7 @@ \ProvidesPackage{fnlineno}[2011/01/07 v0.55 numbers to footnote lines (UL)] -%% Copyright (C) 2010 Uwe Lueck, -%% http://www.contact-ednotes.sty.de.vu -%% -- author-maintained in the sense of LPPL below -- +%% Copyright (C) 2010 Uwe Lück %% %% This file can be redistributed and/or modified under %% the terms of the LaTeX Project Public License; either @@ -15,7 +13,7 @@ %% %% Please report bugs, problems, and suggestions via %% -%% http://www.contact-ednotes.sty.de.vu +%% https://github.com/latex-lineno/lineno %% %% {\it This work has been supported %% % and is owned %% wrong, owner is RUB -- 2011/02/09 diff --git a/macros/latex/contrib/lineno/tex/lineno.sty b/macros/latex/contrib/lineno/tex/lineno.sty index 1b688e0f4d..c879008a20 100644 --- a/macros/latex/contrib/lineno/tex/lineno.sty +++ b/macros/latex/contrib/lineno/tex/lineno.sty @@ -3,12 +3,11 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. \fi -\def\fileversion{v5.0} \def\filedate{2022/07/30} %VERSION +\def\fileversion{v5.1} \def\filedate{2023/01/19} %VERSION -%%% Copyright 1995--2003 Stephan I. B"ottcher <boettcher@physik.uni-kiel.de>; -%%% Copyright 2002--2005 Uwe L"uck, http://www.contact-ednotes.sty.de.vu -%%% for version 4 and code from former Ednotes bundle -%%% --author-maintained. +%%% Copyright 1995--2003 Stephan I. Böttcher +%%% Copyright 2002--2005 Uwe Lück for versions 4.x and code from former Ednotes +%%% Copyright 2021--2023 Karl Wette for versions 5.x %%% %%% This file can be redistributed and/or modified under %%% the terms of the LaTeX Project Public License; either @@ -29,11 +28,9 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. % \unskip}\author{% % Stephan I. B\"ottcher % \\ Uwe L\"uck +% \\ Karl Wette % \unskip}\date{% -% boettcher@physik.uni-kiel.de -% \\ http://contact-ednotes.sty.de.vu -%% \\ stephan@nevis.columbia.edu -%% \\ Stephan.Boettcher@cern.ch +% \url{https://github.com/latex-lineno/lineno} % \\} % % \documentclass[a4paper,12pt]{article}%D @@ -138,11 +135,7 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. % % Since late 2002, Christian Tapp and Uwe L\"uck have employed % ~lineno.sty~ for their ~ednotes.sty~, a package supporting -% critical editions---cf. -% \[\mbox{\tt -% http://ednotes.sty.de.vu -% \unskip}\] -% ---while you find ~ednotes.sty~ and surrounding files in +% critical editions, while you find ~ednotes.sty~ and surrounding files in % CTAN folder \path{macros/latex/contrib/ednotes}. % % Soon, some weaknesses of ~lineno.sty~ showed up, mainly since @@ -261,13 +254,13 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. % (New v4.00) And we use ~\newcommand*~ for % controlling length of user macro arguments, which has been % available since December 1994. +% (/New v4.00) %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] %% [1994/11/04] \ProvidesPackage{lineno} [\filedate\space line numbers on paragraphs \fileversion] -% (/New v4.00) %% %% History of versions: %% v1.00 1995/03/31 SIB: first release for Petra's interview transcriptions @@ -393,6 +386,7 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. %% \stepcounter{linenumber} (confusion again). %% v4.41 2005/11/02 UL: Raised \CheckCommand*. %% v5.0 2022/07/30 KW: Merge in `linenoamsmath' patches +%% v5.1 2023/01/19 KW: Patch `amsmath` with \AddToHook if possible. %% %% Acknowledgements: %% v3.06: Donald Arseneau, pointed to mparhack.sty. @@ -2604,14 +2598,14 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. % (/New v4.1) % % \section{% -% Former package extensions +% Package extensions % \label{s:Xt}\unskip} % -% The extensions in this section were previously supplied +% Some of the extensions in this section were previously supplied % in separate ~.sty~ files. % % \subsection{% -% $display math$ +% \texttt{displaymath} % \unskip}\label{ss:display} %% (New v4.32) % (New v4.3) From now on, you no longer need to type @@ -2888,52 +2882,75 @@ Macro file lineno.sty for LaTeX: attach line numbers, refer to them. % (New v5.0) Patches ~amsmath~ to work with ~lineno~. These patches used to be % supplied by the ~linenoamsmath~ package. See ~linenoamsmathdemo.pdf~ for a % demonstration. +% (/New v5.0) +% +% (/New v5.1) ~lineno~ tries to use \LaTeX's hook management system to patch +% ~amsmath~, so that the two packages may be loaded independently. This requires +% the October 2020 release of \LaTeX. As a fallback for older releases, ~lineno~ +% tests whether ~amsmath~ had already been loaded (by testing for the presence +% of the ~gather~ command) and if so applies the patches; otherwise if ~amsmath~ +% has not been loaded, no patches are applied, and a warning is issued. +% (/New v5.1) % \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*}{% +\ifdefined\AddToHook + \def\linenoamsmath@patches#1{\AddToHook{package/amsmath/after}{#1}} +\else + \ifdefined\endgather + \def\linenoamsmath@patches#1{#1} + \else + \PackageWarning{lineno}{% + `amsmath' must be loaded before `lineno' for patches to be applied} + \def\linenoamsmath@patches#1{\relax} + \fi +\fi + +\linenoamsmath@patches{ + \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@% - \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% + \begingroup% + \interdisplaylinepenalty=0% + \linenoamsmath@ams@mmeasure{#1\\}% + \endgroup% + \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty% + } } % diff --git a/macros/latex/contrib/lineno/tex/vplref.sty b/macros/latex/contrib/lineno/tex/vplref.sty index bdff9b45b7..3bb2eed322 100644 --- a/macros/latex/contrib/lineno/tex/vplref.sty +++ b/macros/latex/contrib/lineno/tex/vplref.sty @@ -3,8 +3,7 @@ \def\filedate{2005/04/25} \def\fileversion{0.2a} -%% Copyright (C) 2004, 2005 Uwe Lueck, -%% http://contact-ednotes.sty.de.vu --author-maintained +%% Copyright (C) 2004, 2005 Uwe Lück %% -- support of lineno.sty for varioref.sty. %% This file can be redistributed and/or modified under |