summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-20 03:01:05 +0000
committerNorbert Preining <norbert@preining.info>2023-01-20 03:01:05 +0000
commit6d3235d032cbed920059ab39370928067056573a (patch)
treeaa934ccc80bd69cc4ca388f418a62fa0140e443b /macros/latex/contrib
parentc11207d3e9027d6aa4153a2103df58382d41e56e (diff)
CTAN sync 202301200301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/fancyvrb/Changes1
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdfbin143170 -> 171060 bytes
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex48
-rw-r--r--macros/latex/contrib/fancyvrb/latex/fancyvrb.sty13
-rw-r--r--macros/latex/contrib/lineno/README.md12
-rw-r--r--macros/latex/contrib/lineno/doc/CHANGEs.txt9
-rw-r--r--macros/latex/contrib/lineno/doc/COPYING.txt2
-rw-r--r--macros/latex/contrib/lineno/doc/SRCFILEs.txt4
-rw-r--r--macros/latex/contrib/lineno/doc/fnlineno.pdfbin198366 -> 198683 bytes
-rw-r--r--macros/latex/contrib/lineno/doc/lineno.pdfbin367668 -> 369808 bytes
-rw-r--r--macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdfbin95318 -> 95668 bytes
-rw-r--r--macros/latex/contrib/lineno/doc/lnosuppl.pdfbin161169 -> 161407 bytes
-rw-r--r--macros/latex/contrib/lineno/doc/ulineno.pdfbin127130 -> 127130 bytes
-rw-r--r--macros/latex/contrib/lineno/source/fnlineno.tex2
-rw-r--r--macros/latex/contrib/lineno/source/lineno.tex125
-rw-r--r--macros/latex/contrib/lineno/source/linenoamsmathdemo.tex13
-rw-r--r--macros/latex/contrib/lineno/source/ulineno.tex2
-rw-r--r--macros/latex/contrib/lineno/tex/ednmath0.sty6
-rw-r--r--macros/latex/contrib/lineno/tex/edtable.sty6
-rw-r--r--macros/latex/contrib/lineno/tex/fnlineno.sty6
-rw-r--r--macros/latex/contrib/lineno/tex/lineno.sty135
-rw-r--r--macros/latex/contrib/lineno/tex/vplref.sty3
-rw-r--r--macros/latex/contrib/overarrows/README.md30
-rw-r--r--macros/latex/contrib/overarrows/overarrows.dtx46
-rw-r--r--macros/latex/contrib/overarrows/overarrows.ins32
-rw-r--r--macros/latex/contrib/overarrows/overarrows.pdfbin544643 -> 545759 bytes
-rw-r--r--macros/latex/contrib/runcode/README2
-rw-r--r--macros/latex/contrib/runcode/runcode.pdfbin245634 -> 247080 bytes
-rw-r--r--macros/latex/contrib/runcode/runcode.sty59
-rw-r--r--macros/latex/contrib/runcode/runcode.tex43
30 files changed, 361 insertions, 238 deletions
diff --git a/macros/latex/contrib/fancyvrb/Changes b/macros/latex/contrib/fancyvrb/Changes
index b1d30e7272..542d7326d0 100644
--- a/macros/latex/contrib/fancyvrb/Changes
+++ b/macros/latex/contrib/fancyvrb/Changes
@@ -1,4 +1,5 @@
--- fancyvrb.sty
+4.5a 2023/01/19 - modified documentation (hv)
4.5 2022/06/06 - added \noniterlineskip for frame=lines (hv)
4.4 2022/06/03 - fix for deleted \@penalty command _before_ top rule(hv)
4.3 2022/06/02 - prevent pagebreak after top rule (hv)
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
index 6adf3fd955..76efb4e4f1 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
index 75f426ae81..ec6dbcdfed 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
@@ -1,7 +1,7 @@
\listfiles
\documentclass[twoside]{article}
-\usepackage{libertinus-otf}
-\setmonofont[Scale=MatchLowercase,FakeStretch=0.9]{AnonymousPro-Regular.ttf}
+\usepackage[TT={Scale=MatchLowercase,FakeStretch=0.88}]{lucida-otf}
+\setmonofont[Scale=MatchLowercase,FakeStretch=0.85]{DejaVu Sans Mono}
\newif\ifChangeBar \ChangeBarfalse
\usepackage{fancyvrb}
\usepackage{fancyvrb-ex}
@@ -261,13 +261,22 @@ case...
\item[formatcom (command)]: command to execute before printing verbatim
text
(\emph{Default: empty}).
+ \item[formatcom* (command)]: add definition to an existing one
\end{optlist}
\begin{SideBySideExample}
- \begin{Verbatim}[formatcom=\color{red}]
- First verbatim line.
- Second verbatim line.
- \end{Verbatim}
+\begin{Verbatim}[formatcom=\color{red}]
+First verbatim line.
+Second verbatim line.
+\end{Verbatim}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}
+\fvset{formatcom=\color{red}}
+\begin{Verbatim}[formatcom*=\itshape]
+First verbatim line.
+Second verbatim line.
+\end{Verbatim}
\end{SideBySideExample}
\subsubsection{Changing individual line formatting}
@@ -965,28 +974,47 @@ make reference to some lines of the verbatim environments:
\begin{optlist}
\item[codes (macro)]: to specify \emph{catcode} changes (\emph{Default:
empty}).
+ \item[codes* (macro)]: add to an existing definition.
\end{optlist}
For instance, this allows us to include formatted mathematics in verbatim
text:
-{\fvset{fontsize=\small}
+{\fvset{fontsize=\small}%
\begin{SideBySideExample}
- Z\fvset{fontsize=\normalsize}
- \begin{Verbatim}[commandchars=\\\{\},
+\begin{Verbatim}[commandchars=\\\{\},
codes={\catcode`$=3\catcode`^=7}]
x=1/sqrt(z**2) ! $\frac{1}{\sqrt{z^2}}$
- \end{Verbatim}
+\end{Verbatim}
+\end{SideBySideExample}
+} %$
+
+
+With \verb|codes*| we can add code to an already existing definition of \Verb|codes|:
+
+{\fvset{fontsize=\small}%
+\begin{SideBySideExample}
+\fvset{codes={\catcode`$=3\catcode`^=7}}
+\begin{Verbatim}[commandchars=\\\{\},
+ % _add_ to codes
+ codes*={\color{blue}}]
+x=1/sqrt(z**2) ! $\frac{1}{\sqrt{z^2}}$
+\end{Verbatim}
\end{SideBySideExample}
} %$
+
+
+
+
\subsubsection{Active characters}
\begin{optlist}
\item[defineactive (macro)]: to define the effect of \emph{active}
characters
(\emph{Default: empty}).
+ \item[defineactive* (macro)]: add the definition to an existing one.
\end{optlist}
This allows us to do some devious tricks: see the example in Section
diff --git a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
index d5dce763a5..ad9c0b7bc8 100644
--- a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
+++ b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
@@ -2,7 +2,7 @@
%% This is file `fancyvrb.sty',
%%
%% COPYRIGHT 1992-1999, by Timothy Van Zandt <tvz@zandtwerk.kellogg.nwu.edu>
-%% 2000-2022 ... , by Herbert Voss <hvoss@tug.org>
+%% 2000-2023 ... , by Herbert Voss <hvoss@tug.org>
%%
%% This package may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
@@ -13,8 +13,8 @@
%% verbatim environments and commands and extensive documentation.
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{4.5}
-\def\filedate{2022/06/06}
+\def\fileversion{4.5a}
+\def\filedate{2023/01/19}
\ProvidesPackage{fancyvrb}[\filedate\space \fileversion\space verbatim text (tvz,hv)]
%\message{Style option: `fancyvrb' v\fileversion \space <\filedate> (tvz)}
\csname fancyvrb@loaded\endcsname
@@ -827,7 +827,8 @@
%% DG/SR modification end
\penalty\@M
\FV@SingleFrameSep
- \penalty\@M}
+ \penalty\@M
+}
%% DG/SR modification begin - May. 19, 1998
\define@key{FV}{label}{%
\def\@tempa{#1}%
@@ -868,7 +869,7 @@
\def\FV@SingleFrameLine#1{%
\hbox to\z@{%
\kern\leftmargin
- \ifnum#1=\z@
+ \ifnum#1=\z@% top line?
\let\FV@Label\FV@LabelBegin
\else
\let\FV@Label\FV@LabelEnd
@@ -876,7 +877,7 @@
\ifx\FV@Label\relax
\FancyVerbRuleColor{\vrule \@width\linewidth \@height\FV@FrameRule}%
\else
- \ifnum#1=\z@
+ \ifnum#1=\z@% top line
\setbox\z@\hbox{\strut\enspace\FV@LabelBegin\enspace\strut}%
\else
\setbox\z@\hbox{\strut\enspace\FV@LabelEnd\enspace\strut}%
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
index d1fa5af387..5fc04fbe98 100644
--- a/macros/latex/contrib/lineno/doc/fnlineno.pdf
+++ b/macros/latex/contrib/lineno/doc/fnlineno.pdf
Binary files differ
diff --git a/macros/latex/contrib/lineno/doc/lineno.pdf b/macros/latex/contrib/lineno/doc/lineno.pdf
index e7e96f8f41..31aa52c931 100644
--- a/macros/latex/contrib/lineno/doc/lineno.pdf
+++ b/macros/latex/contrib/lineno/doc/lineno.pdf
Binary files differ
diff --git a/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf b/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf
index a60815f470..8ec78a498e 100644
--- a/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf
+++ b/macros/latex/contrib/lineno/doc/linenoamsmathdemo.pdf
Binary files differ
diff --git a/macros/latex/contrib/lineno/doc/lnosuppl.pdf b/macros/latex/contrib/lineno/doc/lnosuppl.pdf
index 41c01581bf..cc6aeaf9a2 100644
--- a/macros/latex/contrib/lineno/doc/lnosuppl.pdf
+++ b/macros/latex/contrib/lineno/doc/lnosuppl.pdf
Binary files differ
diff --git a/macros/latex/contrib/lineno/doc/ulineno.pdf b/macros/latex/contrib/lineno/doc/ulineno.pdf
index 709008c75b..e6ba98d6e3 100644
--- a/macros/latex/contrib/lineno/doc/ulineno.pdf
+++ b/macros/latex/contrib/lineno/doc/ulineno.pdf
Binary files differ
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
diff --git a/macros/latex/contrib/overarrows/README.md b/macros/latex/contrib/overarrows/README.md
index 1f2ec39a99..f2139d6499 100644
--- a/macros/latex/contrib/overarrows/README.md
+++ b/macros/latex/contrib/overarrows/README.md
@@ -1,5 +1,27 @@
-# overarrows
+# overarrows - Custom extensible arrows over math expressions
+
+## Presentation
+
+A LaTeX package to create custom arrows over math expressions, mainly for
+vectors (but arrows can as well be drawn below). Arrows stretch with content,
+scale with math styles, and have a correct kerning when a subscript follows.
+Some predefined commands are also provided.
+
+## Author
+
+Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr> Université Grenoble-Alpes
+
+## Repository
+
+https://gricad-gitlab.univ-grenoble-alpes.fr/labbeju/latex-packages/-/tree/main/overarrows
+
+## Licence
+
+Copyright (C) 2023 by Julien Labbé
+
+This file may be distributed and/or modified under the conditions of the LaTeX
+Project Public License (LPPL), either version 1.3c of this license or (at your
+option) any later version. The latest version of this license is in the file
+https://www.latex-project.org/lppl.txt
+
-A LaTeX package to create custom arrows over (and under) math expressions,
-mainly for vectors. Arrows stretch with content, scale with math styles, and
-have a correct kerning when a subscript follows.
diff --git a/macros/latex/contrib/overarrows/overarrows.dtx b/macros/latex/contrib/overarrows/overarrows.dtx
index 46cae78cf7..1b3700b3f0 100644
--- a/macros/latex/contrib/overarrows/overarrows.dtx
+++ b/macros/latex/contrib/overarrows/overarrows.dtx
@@ -1,16 +1,11 @@
% \iffalse meta-comment
%
-% Copyright (C) 2022 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr>
+% Copyright (C) 2023 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr>
%
-%
-% This file 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 file may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+% (at your option) any later version. The latest version of this license is in
+% the file https://www.latex-project.org/lppl.txt
%
% \fi
%
@@ -21,7 +16,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{overarrows}
%<*package>
-[2023/01/17 v1.0 Custom extensible arrows over math expressions, mainly for vectors.]
+[2023/01/19 v1.0.1 Custom extensible arrows over math expressions]
%</package>
%
%<*driver>
@@ -93,7 +88,7 @@
%</driver>
% \fi
%
-% \changes{v1.0}{2023/01/17}{Initial version.}
+% \changes{v1.0}{2023/01/18}{Initial version}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -104,9 +99,10 @@
% \maketitle
%
% \begin{abstract}
-% A \LaTeX{} package to create custom arrows over (and under) math
-% expressions, mainly for vectors. Arrows stretch with content, scale with
-% math styles, and have a correct kerning when a subscript follows.
+% A \LaTeX{} package to create custom arrows over math expressions, mainly for
+% vectors (but arrows can as well be drawn below). Arrows stretch with
+% content, scale with math styles, and have a correct kerning when a subscript
+% follows.
%
% \bigskip
%
@@ -2149,6 +2145,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% \subsection{Changelog}
%
% \begin{description}
+% \item[v1.0.1] Bug fix for under* options.
% \item[v1.0] Initial version.
% \end{description}
%
@@ -2219,23 +2216,26 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% Following options are for predefined commands.
%
+% \changes{v1.0.1}{2023/01/19}{Bug fix for under* options}
+%
+%
% \begin{macrocode}
\DeclareOption{overrightarrow}{\ovar@option@overrightarrow@true}
-\DeclareOption{underrightarrow}{\ovar@option@overrightarrow@true}
+\DeclareOption{underrightarrow}{\ovar@option@underrightarrow@true}
\DeclareOption{overleftarrow}{\ovar@option@overleftarrow@true}
-\DeclareOption{underleftarrow}{\ovar@option@overleftarrow@true}
+\DeclareOption{underleftarrow}{\ovar@option@underleftarrow@true}
\DeclareOption{overleftrightarrow}{\ovar@option@overleftrightarrow@true}
-\DeclareOption{underleftrightarrow}{\ovar@option@overleftrightarrow@true}
+\DeclareOption{underleftrightarrow}{\ovar@option@underleftrightarrow@true}
\DeclareOption{overrightharpoonup}{\ovar@option@overrightharpoonup@true}
-\DeclareOption{underrightharpoonup}{\ovar@option@overrightharpoonup@true}
+\DeclareOption{underrightharpoonup}{\ovar@option@underrightharpoonup@true}
\DeclareOption{overrightharpoondown}{\ovar@option@overrightharpoondown@true}
-\DeclareOption{underrightharpoondown}{\ovar@option@overrightharpoondown@true}
+\DeclareOption{underrightharpoondown}{\ovar@option@underrightharpoondown@true}
\DeclareOption{overleftharpoonup}{\ovar@option@overleftharpoonup@true}
-\DeclareOption{underleftharpoonup}{\ovar@option@overleftharpoonup@true}
+\DeclareOption{underleftharpoonup}{\ovar@option@underleftharpoonup@true}
\DeclareOption{overleftharpoondown}{\ovar@option@overleftharpoondown@true}
-\DeclareOption{underleftharpoondown}{\ovar@option@overleftharpoondown@true}
+\DeclareOption{underleftharpoondown}{\ovar@option@underleftharpoondown@true}
\DeclareOption{overbar}{\ovar@option@overbar@true}
-\DeclareOption{underbar}{\ovar@option@overbar@true}
+\DeclareOption{underbar}{\ovar@option@underbar@true}
% \end{macrocode}
%
% Following options are for sets of predefined commands.
diff --git a/macros/latex/contrib/overarrows/overarrows.ins b/macros/latex/contrib/overarrows/overarrows.ins
index 7781c7a81c..d906ef2834 100644
--- a/macros/latex/contrib/overarrows/overarrows.ins
+++ b/macros/latex/contrib/overarrows/overarrows.ins
@@ -1,18 +1,11 @@
%%
-%% Copyright (C) 2022 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr>
+%% Copyright (C) 2023 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr>
%%
-%% This file 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 file may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+%% (at your option) any later version. The latest version of this license is in
+%% the file https://www.latex-project.org/lppl.txt
%%
-%% Note : this file was created from the version 2.1 of the dtxtut tutorial,
-%% maintained by Scott Pakin.
\input docstrip.tex
\keepsilent
@@ -23,17 +16,12 @@
This is a generated file.
-Copyright (C) 2022 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr>
+Copyright (C) 2023 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr>
-This file 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 file may be distributed and/or modified under the conditions of the LaTeX
+Project Public License (LPPL), either version 1.3c of this license or (at your
+option) any later version. The latest version of this license is in the file
+https://www.latex-project.org/lppl.txt
\endpreamble
diff --git a/macros/latex/contrib/overarrows/overarrows.pdf b/macros/latex/contrib/overarrows/overarrows.pdf
index c5db55db01..2b29e7cb45 100644
--- a/macros/latex/contrib/overarrows/overarrows.pdf
+++ b/macros/latex/contrib/overarrows/overarrows.pdf
Binary files differ
diff --git a/macros/latex/contrib/runcode/README b/macros/latex/contrib/runcode/README
index 0aaa36a304..4b75754042 100644
--- a/macros/latex/contrib/runcode/README
+++ b/macros/latex/contrib/runcode/README
@@ -1,4 +1,4 @@
-LaTeX Package: runcode 2022/08/20 v1.7
+LaTeX Package: runcode 2023/01/18 v1.8
----------------------------------------
The runcode package enables the execution of source code (e.g., R,
Julia, Matlab, shell, Python, etc.) and embed the results in the pdf file
diff --git a/macros/latex/contrib/runcode/runcode.pdf b/macros/latex/contrib/runcode/runcode.pdf
index 2c0f0d4db9..405f5a26fd 100644
--- a/macros/latex/contrib/runcode/runcode.pdf
+++ b/macros/latex/contrib/runcode/runcode.pdf
Binary files differ
diff --git a/macros/latex/contrib/runcode/runcode.sty b/macros/latex/contrib/runcode/runcode.sty
index 873fab14c1..ae859085b4 100644
--- a/macros/latex/contrib/runcode/runcode.sty
+++ b/macros/latex/contrib/runcode/runcode.sty
@@ -4,7 +4,7 @@
%
% This package is based on an ongoing work by Haim Bar and HaiYing Wang, and comments and questions are welcome!
-\ProvidesPackage{runcode}[2022/08/20 runcode v1.7]
+\ProvidesPackage{runcode}[2023/01/18 runcode v1.8]
\newif\ifruncode
% Change to \runcodefalse if you want to suspend code execution
@@ -12,9 +12,22 @@
\DeclareOption{run}{\runcodetrue}
\DeclareOption{cache}{\runcodefalse}
+% Choose the package for code typesetting. The default is minted.
+% The other two options are listings and fvextra. For backward compatibility,
+% it is possible to use nominted, in which case fvextra is used.
\newif\ifminted
\mintedtrue
-\DeclareOption{nominted}{\mintedfalse}
+\DeclareOption{nominted}{\mintedfalse}
+\DeclareOption{minted}{\mintedtrue\fvextrafalse\listingsfalse}
+
+\newif\iflistings
+\listingsfalse
+\DeclareOption{listings}{\listingstrue\mintedfalse\fvextrafalse}
+
+\newif\iffvextra
+\fvextrafalse
+\DeclareOption{fvextra}{\fvextratrue\mintedfalse\listingsfalse}
+
\newif\ifreducedspace
\reducedspacefalse
@@ -136,12 +149,18 @@
\usepackage{xparse}
\usepackage{xstring}
-% Use minted if it is loaded; otherwise use fvextra
+% Use minted by default; but the user can change to listings or fvextra.
\ifminted
\usepackage[cache=false]{minted}
\setminted{fontsize=\footnotesize,breaklines=true} % minted default
\else
+\iflistings
+\usepackage{listings}
+\lstset{escapeinside=`',columns=fixed, extendedchars=true, basicstyle=\ttfamily\small, frame = lines}
+\else
\usepackage{fvextra}
+\fvset{fontsize=\footnotesize, breaklines}
+\fi
\fi
\newcommand{\generated}{generated}
@@ -179,7 +198,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \showCode prints the source code, using minted for a pretty layout
+% \showCode prints the source code, using minted or listings for a pretty layout
% Arg #1 is the programming language,
% Arg #2 is the source file name,
% Args #3 and #4 are the first and last line to show (optional).
@@ -194,7 +213,11 @@
\vspace{-\baselineskip}
\fi
\else
- \VerbatimInput[fontsize=\footnotesize,linenos=true,frame=single,breaklines]{#2}
+ \iflistings
+ \lstinputlisting[language=#1]{#2}
+ \else
+ \VerbatimInput{#2}
+ \fi
\fi
}{
\ifminted
@@ -204,7 +227,11 @@
\vspace{-\baselineskip}
\fi
\else
- \VerbatimInput[fontsize=\footnotesize,linenos=true,frame=single,breaklines, firstline=#3, lastline=#4, firstnumber=1]{#2}
+ \iflistings
+ \lstinputlisting[language=#1,firstline=#3, lastline=#4]{#2}
+ \else
+ \VerbatimInput[firstline=#3, lastline=#4, firstnumber=1]{#2}
+ \fi
\fi
}
}{
@@ -261,8 +288,11 @@
{\begin{tcolorbox}
\ifminted\unskip
\inputminted{text}{\tmpname}\unskip
+ \else\iflistings\unskip
+ \lstinputlisting{\tmpname}\unskip
\else\unskip
- \VerbatimInput[fontsize=\footnotesize,breaklines]{\tmpname}\unskip
+ \VerbatimInput{\tmpname}\unskip
+ \fi
\fi
\end{tcolorbox}}
{\unskip\ifstrequal{#2}{inline}
@@ -306,11 +336,14 @@
{\begin{tcolorbox}
\ifminted\unskip
\inputminted{text}{\tmpname.tex}\unskip
+ \else\unskip\iflistings\unskip
+ \lstinputlisting{\tmpname.tex}\unskip
\else\unskip
- \VerbatimInput[fontsize=\footnotesize,breaklines]{\tmpname.tex}\unskip
+ \VerbatimInput{\tmpname.tex}\unskip
+ \fi
\fi
\end{tcolorbox}}
- {\unskip\input{\tmpname.tex}\unskip}}
+ {\unskip{\input{\tmpname.tex}}\unskip}}
{\textcolor{red}{\textbf{Output file \tmpname~ not found}}}}
\NewDocumentCommand{\runR}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","R","#2")'} m m O{}}
@@ -321,7 +354,7 @@
{\runExtCode{#1}{#2}{#3}[#4]}
}
-\NewDocumentCommand{\inlnR}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","R","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;client("./","R","#2")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
+\NewDocumentCommand{\inlnR}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","R","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;rc0="""#2""";rc0=rc0.lstrip("```").rstrip("```");client("./","R",f"```{rc0}```")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
\NewDocumentCommand{\runJulia}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","julia","#2")'} m m O{}}
{
@@ -331,7 +364,7 @@
{\runExtCode{#1}{#2}{#3}[#4]}
}
-\NewDocumentCommand{\inlnJulia}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","julia","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;client("./","julia","#2")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
+\NewDocumentCommand{\inlnJulia}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","julia","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;rc0="""#2""";rc0=rc0.lstrip("```").rstrip("```");client("./","julia",f"```{rc0}```")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
\NewDocumentCommand{\runMatlab}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","matlab","#2")'} m m O{}}
{
@@ -341,7 +374,7 @@
{\runExtCode{#1}{#2}{#3}[#4]}
}
-\NewDocumentCommand{\inlnMatlab}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","matlab","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;client("./","matlab","#2")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
+\NewDocumentCommand{\inlnMatlab}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","matlab","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;rc0="""#2""";rc0=rc0.lstrip("```").rstrip("```");client("./","matlab",f"```{rc0}```")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
\NewDocumentCommand{\runPython}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","python","#2")'} m m O{}}
@@ -352,7 +385,7 @@
{\runExtCode{#1}{#2}{#3}[#4]}
}
-\NewDocumentCommand{\inlnPython}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","python","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;client("./","python","#2")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
+\NewDocumentCommand{\inlnPython}{O{python3 -c 'from talk2stat.talk2stat import client; client("./","python","\tmpname.txt")'} m O{inline}}{\IfBeginWith{#2}{```}{\inln{python3 -c 'from talk2stat.talk2stat import client;rc0="""#2""";rc0=rc0.lstrip("```").rstrip("```");client("./","python",f"```{rc0}```")'}{#2}[#3]}{\inln{#1}{#2}[#3]}}
%%%%%%%%
diff --git a/macros/latex/contrib/runcode/runcode.tex b/macros/latex/contrib/runcode/runcode.tex
index 6fbd691ebc..8751d4234e 100644
--- a/macros/latex/contrib/runcode/runcode.tex
+++ b/macros/latex/contrib/runcode/runcode.tex
@@ -1,4 +1,4 @@
-% LaTeX Package: runcode 2022/08/20 v1.7
+% LaTeX Package: runcode 2023/01/18 v1.8
%
% Copyright (C) 2020-2022 by Haim Bar and HaiYing Wang
%
@@ -49,7 +49,7 @@ package’s github repository, at \url{https://github.com/Ossifragus/runcode}.
\end{abstract}
\section{Installation}
-\label{sec:org7e4c2ed}
+\label{sec:org1037dff}
You can simply put the runcode.sty file in the \LaTeX{} project folder.
The server mode requires the
@@ -65,9 +65,9 @@ compiling a \LaTeX{} document.
\section{Usage}
-\label{sec:org2d22735}
+\label{sec:org325e4fc}
\subsection{Load the package:}
-\label{sec:orgbfab84d}
+\label{sec:orgbccebff}
\begin{minted}[]{latex}
\usepackage[options]{runcode}
\end{minted}
@@ -77,12 +77,16 @@ Available options are:
\begin{itemize}
\item \texttt{cache}: use cached results.
-\item \texttt{julia}: start server for \href{https://julialang.org/}{Julia} (requires
-\href{https://pypi.org/project/talk2stat/}{talk2stat}).
+\item \texttt{fvextra}: use the \href{https://ctan.org/pkg/fvextra}{fvextra} package to show code.
-\item \texttt{matlab}: start server for
-\href{https://www.mathworks.com/products/matlab.html}{MatLab} (requires
-\href{https://pypi.org/project/talk2stat/}{talk2stat}).
+\item \texttt{julia}: start server for \href{https://julialang.org/}{Julia} (requires \href{https://pypi.org/project/talk2stat/}{talk2stat}).
+
+\item \texttt{listings}: use the \href{https://ctan.org/pkg/listings?lang=en}{listings} package to show code.
+
+\item \texttt{matlab}: start server for \href{https://www.mathworks.com/products/matlab.html}{MatLab} (requires \href{https://pypi.org/project/talk2stat/}{talk2stat}).
+
+\item \texttt{minted}: use the \href{https://ctan.org/pkg/minted}{minted} package to show code (requires the \href{https://pygments.org/}{pygments} package).
+This is the default option.
\item \texttt{nominted}: use the \href{https://ctan.org/pkg/fvextra}{fvextra} package
instead of the \href{https://ctan.org/pkg/minted}{minted} package to show
@@ -117,6 +121,14 @@ the code block is controlled through the minted package,
\setminted[R]{linenos, frame=single, bgcolor=lightgray, breaklines=true}
\end{minted}
+Similarly, \href{https://ctan.org/pkg/fvextra}{fvextra} and \href{https://ctan.org/pkg/listings?lang=en}{listings} packages can be customized through the \texttt{\textbackslash{}lstset}
+and \texttt{\textbackslash{}fvset} commands, respectively, e.g.:
+
+\begin{minted}[]{latex}
+\lstset{basicstyle=\large, frame=single}
+\fvset{fontsize=\small, linenos=true, frame=single}
+\end{minted}
+
The outputs from executing codes are displayed in
\href{https://ctan.org/pkg/tcolorbox?lang=en}{tcolorbox}, so the style can
be customized with \texttt{\textbackslash{}tcbset},
@@ -127,7 +139,7 @@ be customized with \texttt{\textbackslash{}tcbset},
\end{minted}
\subsection{Basic commands:}
-\label{sec:org1b11cd1}
+\label{sec:org88340c8}
\begin{itemize}
\item \texttt{\textbackslash{}runExtCode\{Arg1\}\{Arg2\}\{Arg3\}[Arg4]} runs an external code.
@@ -144,9 +156,7 @@ else), use cached results (see more about the cache below).
\end{itemize}
\item \texttt{\textbackslash{}showCode\{Arg1\}\{Arg2\}[Arg3][Arg4]} shows the source code, using
-\href{https://ctan.org/pkg/minted}{minted} for a pretty layout or
-\href{https://ctan.org/pkg/fvextra}{fvextra} (if
-\href{https://pygments.org/}{pygments} is not installed).
+\href{https://ctan.org/pkg/minted}{minted} (requires \href{https://pygments.org/}{pygments}), \href{https://ctan.org/pkg/fvextra}{fvextra}, or \href{https://ctan.org/pkg/listings?lang=en}{listings}.
\begin{itemize}
\item \texttt{Arg1} is the programming language.
@@ -188,7 +198,7 @@ text.
\end{itemize}
\subsection{Language specific shortcuts:}
-\label{sec:org154f922}
+\label{sec:org591e87e}
\href{https://julialang.org/}{Julia}
\begin{itemize}
@@ -314,8 +324,9 @@ a file on the disk and then be called.
\section{Revisions}
-\label{sec:orgf446497}
+\label{sec:orgf884e2e}
\begin{itemize}
+\item v1.8, January 18, 2023, add support to \href{https://ctan.org/pkg/listings?lang=en}{listings.}
\item v1.7, August 20, 2022: changed the tmp/ folder to generated/ in order to
conform with CTAN suggestions; renamed the troubleshooting file.
\item v1.6, August 10, 2022: stop only configured/running servers; a new
@@ -333,7 +344,7 @@ code files, zero bytes in output files.)
\end{itemize}
\section{Contributing}
-\label{sec:org0730899}
+\label{sec:org0dce33b}
We welcome your contributions to this package by opening issues on
GitHub and/or making a pull request. We also appreciate more example
documents written using \texttt{runcode}.