summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-30 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2022-01-30 03:00:53 +0000
commit7ee4987532f1c1d25e5a2683ae21b7c298d103b5 (patch)
tree1276be1a24746987c860b5730e708194234c4a10 /macros
parent2df1fd0d0099108f6d3d3e58dce35a3d2e185d4f (diff)
CTAN sync 202201300300
Diffstat (limited to 'macros')
-rw-r--r--macros/generic/expkv-def/README.md2
-rw-r--r--macros/generic/expkv-def/expkv-def.dtx319
-rw-r--r--macros/generic/expkv-def/expkv-def.pdfbin410977 -> 424547 bytes
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.pdfbin100619 -> 108754 bytes
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.tex64
-rw-r--r--macros/latex/contrib/crefthe/crefthe.sty170
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx6
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin575298 -> 575448 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex63
-rw-r--r--macros/latex/contrib/elements/README14
-rw-r--r--macros/latex/contrib/elements/elements-manual.pdf (renamed from macros/latex/contrib/elements/elements_en.pdf)bin409567 -> 411587 bytes
-rw-r--r--macros/latex/contrib/elements/elements-manual.tex (renamed from macros/latex/contrib/elements/elements_en.tex)15
-rw-r--r--macros/latex/contrib/elements/elements.sty35
-rw-r--r--macros/latex/contrib/elements/elements_names_brazil.def2
-rw-r--r--macros/latex/contrib/elements/elements_names_english.def2
-rw-r--r--macros/latex/contrib/elements/elements_names_french.def2
-rw-r--r--macros/latex/contrib/elements/elements_names_german.def2
-rw-r--r--macros/latex/contrib/elements/elements_names_portuges.def2
-rw-r--r--macros/latex/contrib/elements/elements_names_spanish.def2
-rw-r--r--macros/latex/contrib/erw-l3/README.md3
-rw-r--r--macros/latex/contrib/erw-l3/erw-l3.dtx2514
-rw-r--r--macros/latex/contrib/erw-l3/erw-l3.ins64
-rw-r--r--macros/latex/contrib/erw-l3/erw-l3.pdfbin678206 -> 497726 bytes
-rw-r--r--macros/latex/contrib/fnpct/README6
-rw-r--r--macros/latex/contrib/fnpct/fnpct-manual.cls8
-rw-r--r--macros/latex/contrib/fnpct/fnpct-manual.pdfbin489527 -> 489507 bytes
-rw-r--r--macros/latex/contrib/fnpct/fnpct-manual.tex7
-rw-r--r--macros/latex/contrib/fnpct/fnpct.sty23
-rw-r--r--macros/latex/contrib/jmlr/CHANGES25
-rw-r--r--macros/latex/contrib/jmlr/INSTALL62
-rw-r--r--macros/latex/contrib/jmlr/README58
-rw-r--r--macros/latex/contrib/jmlr/example-teximage.tex (renamed from macros/latex/contrib/jmlr/sample-papers/images/teximage.tex)0
-rw-r--r--macros/latex/contrib/jmlr/jmlr.dtx415
-rw-r--r--macros/latex/contrib/jmlr/jmlr.ins4
-rw-r--r--macros/latex/contrib/jmlr/jmlr.pdfbin632452 -> 633161 bytes
-rwxr-xr-xmacros/latex/contrib/jmlr/makejmlrbook1321
-rw-r--r--macros/latex/contrib/jmlr/pmlr-sample.bib (renamed from macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib)0
-rw-r--r--macros/latex/contrib/jmlr/pmlr-sample.pdfbin0 -> 346341 bytes
-rw-r--r--macros/latex/contrib/jmlr/pmlr-sample.tex (renamed from macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex)135
-rw-r--r--macros/latex/contrib/jmlr/sample-books/bookLogo-gray.pngbin2456 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-books/bookLogo.pngbin2241 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdfbin317288 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex247
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex98
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib19
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex65
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib19
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex56
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib19
-rw-r--r--macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex53
-rw-r--r--macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdfbin415534 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex79
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/images/circle-gray.pngbin1416 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/images/circle.jpgbin6743 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.pngbin3902 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/images/nodes.pngbin6295 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/images/square-gray.pngbin157 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/images/square.pngbin157 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib19
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdfbin311674 -> 0 bytes
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex837
-rw-r--r--macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdfbin324230 -> 0 bytes
-rw-r--r--macros/latex/contrib/pdfpages/pdfpages.dtx18
-rw-r--r--macros/latex/contrib/pdfpages/pdfpages.pdfbin298716 -> 301209 bytes
64 files changed, 1870 insertions, 5004 deletions
diff --git a/macros/generic/expkv-def/README.md b/macros/generic/expkv-def/README.md
index 3b4417a2cb..79a69057e4 100644
--- a/macros/generic/expkv-def/README.md
+++ b/macros/generic/expkv-def/README.md
@@ -1,7 +1,7 @@
-------------------------------------------------------------------------------
# expkv-def -- a key-defining frontend for expkv
-Version 2021-09-20 v0.8c
+Version 2022-01-29 v0.9
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
diff --git a/macros/generic/expkv-def/expkv-def.dtx b/macros/generic/expkv-def/expkv-def.dtx
index c9d6ebe5b7..059c7dda01 100644
--- a/macros/generic/expkv-def/expkv-def.dtx
+++ b/macros/generic/expkv-def/expkv-def.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: expkv-def.dtx Copyright (C) 2020-2021 Jonathan P. Spratte
+% File: expkv-def.dtx Copyright (C) 2020-2022 Jonathan P. Spratte
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this license or
@@ -27,7 +27,7 @@ Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
--------------------------------------------------------------
-Copyright (C) 2020-2021 Jonathan P. Spratte
+Copyright (C) 2020-2022 Jonathan P. Spratte
This work may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this license or
@@ -623,14 +623,15 @@ and the derived files expkv-def.pdf
% instead.
% \end{function}
%
-% \begin{function}{toks,gtoks,apptoks,gapptoks}
+% \begin{function}{toks,gtoks,apptoks,gapptoks,pretoks,gpretoks}
% \begin{syntax}
% toks \key\ = \meta{cs} \prefixes2212
% \end{syntax}
% The \meta{cs} should be a single control sequence, such as |\foo|.
% Store \val\ inside of a toks-register. The |g| variants use |\global|, the
-% |app| variants append \val\ to the contents of that register. If \meta{cs}
-% is not yet defined it will be initialised with |\newtoks|.
+% |app| variants append \val\ to the contents of that register, the |pre|
+% variants will prepend \val. If \meta{cs} is not yet defined it will be
+% initialised with |\newtoks|.
% \end{function}
%
% \begin{function}{box,gbox}
@@ -706,6 +707,49 @@ and the derived files expkv-def.pdf
% interface to remove certain choices.
% \end{function}
%
+% \begin{function}{choice-store}
+% \begin{syntax}
+% choice-store \key\ = \meta{cs}\{\val, \ldots\} \prefixes2223
+% \end{syntax}
+% This is defines a special type of |choice| key that'll store the given
+% choice inside the macro \meta{cs} (so \meta{cs} should be a single control
+% sequence name such as |\foo|). Since storing inside a macro can't be done
+% expandably every choice-code is |\protected|, you might define the
+% |choice-store| key itself as |protected| as well if you want. Since the
+% definition of each choice is predefined with this key type the choice list
+% should just be a comma separated list of valid choices.
+% \end{function}
+% This means that the following |choice| and |choice-store| keys are equivalent
+% at use time:
+% \begin{lstlisting}
+% \newcommand*\mya{}
+% \ekvdefinekeys{example}
+% {
+% choice key1 = {a=\def\mya{a}, b=\def\mya{b}, c=\def\mya{c}}
+% ,choice-store key2 = \mya{a,b,c}
+% }
+% \end{lstlisting}
+%
+% \begin{function}{choice-enum}
+% \begin{syntax}
+% choice-enum \key\ = \meta{cs}\{\val, \ldots\} \prefixes2223
+% \end{syntax}
+% This is similar to |choice-store|, the differences are: \meta{cs} should be
+% a count-register or is initialised as such if the \meta{cs} is undefined
+% (via |\newcount|); instead of the value the position of the value in the
+% given list is stored in this register (zero-based).
+% \end{function}
+% This means that the following |choice| and |choice-enum| keys are equivalent
+% at use time:
+% \begin{lstlisting}
+% \newcount\myb
+% \ekvdefinekeys{example}
+% {
+% choice key1 = {a={\myb=0 }, b={\myb=1 }, c={\myb=2 }}
+% ,choice-enum key2 = \myb{a,b,c}
+% }
+% \end{lstlisting}
+%
% \begin{function}{unknown-choice}
% \begin{syntax}
% unknown-choice \key\ = \marg{definition} \prefixes2323
@@ -956,8 +1000,8 @@ and the derived files expkv-def.pdf
% \begin{macro}{\ekvdVersion,\ekvdDate}
% We're on our first input, so lets store the version and date in a macro.
% \begin{macrocode}
-\def\ekvdVersion{0.8c}
-\def\ekvdDate{2021-09-20}
+\def\ekvdVersion{0.9}
+\def\ekvdDate{2022-01-29}
% \end{macrocode}
% \end{macro}
%
@@ -978,19 +1022,35 @@ and the derived files expkv-def.pdf
% defining. But we don't need it to ever store information long-term after
% \expkvd\ was initialized.
%
+% \begin{macro}[internal]{\ekvd@ifprimitive}
+% \begin{macrocode}
+\protected\long\def\ekvd@ifprimitive#1%
+ {%
+ \begingroup
+ \edef\ekvd@tmpa{\string #1}%
+ \edef\ekvd@tmpb{\meaning#1}%
+ \expandafter
+ \endgroup
+ \ifx\ekvd@tmpa\ekvd@tmpb
+ \ekv@fi@firstoftwo
+ \fi
+ \@secondoftwo
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[internal]
-% {\ekvd@long,\ekvd@prot,\ekvd@clear@prefixes,\ekvd@empty,\ekvd@ifalso}
+% {\ekvd@long,\ekvd@prot,\ekvd@clear@prefixes,\ekvd@ifalso}
% \expkvd\ will use |\ekvd@long|, |\ekvd@prot|, and |\ekvd@ifalso| to store
% whether a key should be defined as |\long| or |\protected| or adds an action
% to an existing key, and we have to clear them for every new key. By default
% |long| and |protected| will just be empty, |ifalso| will be
% |\@secondoftwo|, and |ifnew| will just use its third argument.
% \begin{macrocode}
-\def\ekvd@empty{}
\protected\def\ekvd@clear@prefixes
{%
- \let\ekvd@long\ekvd@empty
- \let\ekvd@prot\ekvd@empty
+ \let\ekvd@long\ekv@empty
+ \let\ekvd@prot\ekv@empty
\let\ekvd@ifalso\@secondoftwo
\long\def\ekvd@ifnew##1##2##3{##3}%
}
@@ -1031,7 +1091,7 @@ and the derived files expkv-def.pdf
\protected\long\def\ekvd@handle#1\ekvd@stop#2%
{%
\ekvd@clear@prefixes
- \edef\ekvd@cur{\detokenize{#1}}%
+ \def\ekvd@cur{#1}%
\ekvd@ifspace{#1}%
{\ekvd@prefix\ekv@mark#1\ekv@stop{#2}}%
\ekvd@err@missing@type
@@ -1409,11 +1469,11 @@ and the derived files expkv-def.pdf
\ekvd@ifalso
{%
\let\ekvd@prot\protected
- \ekvd@add@val{#2}{#1\setbox#3\hbox{\begingroup##1\endgroup}}{}%
+ \ekvd@add@val{#2}{#1\setbox#3=\hbox{\begingroup##1\endgroup}}{}%
}%
{%
\protected\ekvd@long\ekvdef\ekvd@set{#2}%
- {#1\setbox#3\hbox{\begingroup##1\endgroup}}%
+ {#1\setbox#3=\hbox{\begingroup##1\endgroup}}%
}%
}%
}%
@@ -1436,9 +1496,9 @@ and the derived files expkv-def.pdf
\ekvd@ifalso
{%
\let\ekvd@prot\protected
- \ekvd@add@val{#2}{#1#3{##1}}{}%
+ \ekvd@add@val{#2}{#1#3={##1}}{}%
}%
- {\protected\ekvd@long\ekvdef\ekvd@set{#2}{#1#3{##1}}}%
+ {\protected\ekvd@long\ekvdef\ekvd@set{#2}{#1#3={##1}}}%
}%
}%
}
@@ -1447,31 +1507,86 @@ and the derived files expkv-def.pdf
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\ekvd@type@apptoks,\ekvd@t@apptoks,\ekvd@t@gapptoks}
+% \begin{macro}[internal]{\ekvd@type@preapptoks,\ekvd@t@apptoks,\ekvd@t@gapptoks}
% Just like |toks|, but expand the current contents of the |toks| register to
% append the new contents.
% \begin{macrocode}
-\protected\def\ekvd@type@apptoks#1#2#3%
+\ekvd@ifprimitive\toksapp
{%
- \ekvd@ifnew{}{#2}%
+ \protected\def\ekvd@type@preapptoks#1#2#3%
{%
- \ekvd@assert@filledarg{#3}%
+ \ekvd@ifnew{}{#2}%
{%
- \ekvd@newreg#3{toks}%
- \ekvd@ifalso
+ \ekvd@assert@filledarg{#3}%
{%
- \let\ekvd@prot\protected
- \ekvd@add@val{#2}{#1#3\expandafter{\the#3##1}}{}%
+ \ekvd@newreg#3{toks}%
+ \ekvd@ifalso
+ {%
+ \let\ekvd@prot\protected
+ \ekvd@add@val{#2}{#1#3{##1}}{}%
+ }%
+ {\protected\ekvd@long\ekvdef\ekvd@set{#2}{#1#3{##1}}}%
}%
+ }%
+ }
+ \protected\def\ekvd@t@apptoks{\ekvd@type@preapptoks\toksapp}
+ \protected\def\ekvd@t@gapptoks{\ekvd@type@preapptoks\gtoksapp}
+ \protected\def\ekvd@t@pretoks{\ekvd@type@preapptoks\tokspre}
+ \protected\def\ekvd@t@gpretoks{\ekvd@type@preapptoks\gtokspre}
+ }
+ {%
+ \protected\def\ekvd@type@apptoks#1#2#3%
+ {%
+ \ekvd@ifnew{}{#2}%
+ {%
+ \ekvd@assert@filledarg{#3}%
{%
- \protected\ekvd@long\ekvdef\ekvd@set{#2}%
- {#1#3\expandafter{\the#3##1}}%
+ \ekvd@newreg#3{toks}%
+ \ekvd@ifalso
+ {%
+ \let\ekvd@prot\protected
+ \ekvd@add@val{#2}{#1#3=\expandafter{\the#3##1}}{}%
+ }%
+ {%
+ \protected\ekvd@long\ekvdef\ekvd@set{#2}%
+ {#1#3=\expandafter{\the#3##1}}%
+ }%
}%
}%
- }%
+ }
+ \protected\def\ekvd@t@apptoks{\ekvd@type@apptoks{}}
+ \protected\def\ekvd@t@gapptoks{\ekvd@type@apptoks\global}
+ \newtoks\ekvd@toks
+ \protected\def\ekvd@type@pretoks#1#2#3%
+ {%
+ \ekvd@ifnew{}{#2}%
+ {%
+ \ekvd@assert@filledarg{#3}%
+ {%
+ \ekvd@newreg#3{toks}%
+ \ekvd@ifalso
+ {%
+ \let\ekvd@prot\protected
+ \ekvd@add@val{#2}%
+ {%
+ \ekvd@toks={##1}%
+ #1#3=\expandafter{\the\expandafter\ekvd@toks\the#3}%
+ }%
+ {}%
+ }%
+ {%
+ \protected\ekvd@long\ekvdef\ekvd@set{#2}%
+ {%
+ \ekvd@toks={##1}%
+ #1#3=\expandafter{\the\expandafter\ekvd@toks\the#3}%
+ }%
+ }%
+ }%
+ }%
+ }
+ \protected\def\ekvd@t@pretoks{\ekvd@type@pretoks{}}
+ \protected\def\ekvd@t@gpretoks{\ekvd@type@pretoks\global}
}
-\protected\def\ekvd@t@apptoks{\ekvd@type@apptoks{}}
-\protected\def\ekvd@t@gapptoks{\ekvd@type@apptoks\global}
% \end{macrocode}
% \end{macro}
%
@@ -1525,7 +1640,7 @@ and the derived files expkv-def.pdf
{%
\ekvd@assert@filledarg{#4}%
{%
- \ekvd@newlet#4\ekvd@empty
+ \ekvd@newlet#4\ekv@empty
\ekvd@ifalso
{%
\let\ekvd@prot\protected
@@ -1615,10 +1730,12 @@ and the derived files expkv-def.pdf
%
% \begin{macro}[internal]
% {
-% \ekvd@type@choice,\ekvd@populate@choice,\ekvd@populate@choice@,
-% \ekvd@populate@choice@noarg,\ekvd@choice@prefix,\ekvd@choice@prefix@,
+% \ekvd@type@choice,
+% \ekvd@populate@choice,\ekvd@populate@choice@,\ekvd@populate@choice@noarg,
+% \ekvd@choice@prefix,\ekvd@choice@prefix@,\ekvd@choice@prefix@done,
% \ekvd@choice@p@protected,\ekvd@choice@p@protect,
-% \ekvd@choice@p@long,\ekvd@choice@p@long@,\ekvd@t@choice
+% \ekvd@choice@p@long,\ekvd@choice@p@long@,
+% \ekvd@t@choice
% }
% The |choice| type is by far the most complex type, as we have to run a
% sub-parser on the choice-definition list, which should support the |@p@| type
@@ -1629,8 +1746,13 @@ and the derived files expkv-def.pdf
\protected\def\ekvd@type@choice#1%
{%
\ekvd@assert@not@long
- \ekvd@prot\edef\ekvd@tmp##1%
- {\ekv@unexpanded{\ekvd@h@choice}{\ekvd@choice@name\ekvd@set{#1}{##1}}}%
+ \ekv@expargtwice{\ekvd@prot\def\ekvd@tmp##1}%
+ {%
+ \expandafter\expandafter\expandafter
+ \ekvd@h@choice
+ \expandafter\expandafter\expandafter
+ {\expandafter\ekvd@choice@name\expandafter{\ekvd@set}{#1}{##1}}%
+ }%
\ekvd@ifalso
{%
\ekvd@assert@val{#1}%
@@ -1672,36 +1794,35 @@ and the derived files expkv-def.pdf
\protected\long\def\ekvd@populate@choice@#1#2%
{%
\ekvd@clear@prefixes
- \expandafter\ekvd@assert@arg@msg\expandafter{\ekvd@cur : #1}%
+ \ekvd@ifspace{#1}%
+ {\ekvd@choice@prefix{\ekv@mark#1}\ekv@mark#1\ekv@stop}%
{%
- \ekvd@ifspace{#1}%
- {\ekvd@choice@prefix\ekv@mark#1\ekv@stop}%
- {%
- \expandafter\def
- \csname\ekvd@choice@name\ekvd@set\ekvd@set@choice{#1}\endcsname
- }%
- {#2}%
+ \expandafter\edef
+ \csname\ekvd@choice@name\ekvd@set\ekvd@set@choice{#1}\endcsname
}%
+ {\unexpanded{#2}}%
}
-\protected\def\ekvd@choice@prefix#1
+\protected\def\ekvd@choice@prefix#1#2
{%
- \ekv@strip{#1}\ekvd@choice@prefix@\ekv@mark
+ \ekv@strip{#2}{\ekvd@choice@prefix@{#1}}\ekv@mark
}
-\protected\def\ekvd@choice@prefix@#1#2\ekv@stop
+\protected\def\ekvd@choice@prefix@#1#2#3\ekv@stop
{%
- \ekv@ifdefined{ekvd@choice@p@#1}%
+ \ekv@ifdefined{ekvd@choice@p@#2}%
{%
- \csname ekvd@choice@p@#1\endcsname
- \ekvd@ifspace{#2}%
- {\ekvd@choice@prefix#2\ekv@stop}%
- {%
- \ekvd@prot\expandafter\def
- \csname
- \ekv@strip{#2}{\ekvd@choice@name\ekvd@set\ekvd@set@choice}%
- \endcsname
- }%
+ \csname ekvd@choice@p@#2\endcsname
+ \ekvd@ifspace{#3}%
+ {\ekvd@choice@prefix{#3}#3\ekv@stop}%
+ {\ekvd@choice@prefix@done{#3}}%
}%
- {\ekvd@err@undefined@prefix{#1}\@gobble}%
+ {\ekvd@choice@prefix@done{#1}}%
+ }
+\protected\def\ekvd@choice@prefix@done#1%
+ {%
+ \ekvd@prot\expandafter\edef
+ \csname
+ \ekv@strip{#1}{\ekvd@choice@name\ekvd@set\ekvd@set@choice}%
+ \endcsname
}
\protected\def\ekvd@choice@p@protected{\let\ekvd@prot\protected}
\let\ekvd@choice@p@protect\ekvd@choice@p@protected
@@ -1736,6 +1857,82 @@ and the derived files expkv-def.pdf
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[internal]{\ekvd@t@choice-store,\ekvd@t@choice-enum}
+% These two types define a special kind of |choice| key and are quite similar,
+% the only difference is what the different choices do (hence they use a
+% shared initialisation which differs in the chosen |populate| step).
+% \begin{macrocode}
+\protected\long\expandafter\def\csname ekvd@t@choice-store\endcsname
+ {\ekvd@type@choicespecial\ekvd@populate@choicestore}
+\protected\long\expandafter\def\csname ekvd@t@choice-enum\endcsname
+ {\ekvd@type@choicespecial\ekvd@populate@choiceenum}
+% \end{macrocode}
+% \begin{macro}[internal]{\ekvd@type@choicespecial}
+% Initialise similar to a |choice| key. The difference is that we require two
+% arguments (which we assert), a macro to store things in, and a |csv|-list
+% containing the allowed values. |#1| is the |populate| macro according to the
+% type used.
+% \begin{macrocode}
+\protected\long\def\ekvd@type@choicespecial#1#2#3%
+ {%
+ \ekvd@ifnew{}{#2}%
+ {%
+ \ekvd@assert@twoargs{#3}%
+ {%
+ \ekvd@type@choice{#2}%
+ \def\ekvd@set@choice{#2}%
+ #1#3%
+ }%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[internal]
+% {\ekvd@populate@choicestore,\ekvd@populate@choicestore@}
+% We initialise the storing macro if it doesn't yet exist, and then we loop
+% over the value list. The |\edef|s with |\unexpanded| are both necessary to
+% be able to store macro parameter tokens (the outer protects at define time,
+% the inner at use time).
+% \begin{macrocode}
+\protected\long\def\ekvd@populate@choicestore#1%
+ {%
+ \ekvd@newlet#1\ekv@empty
+ \ekvcsvloop{\ekvd@populate@choicestore@#1}%
+ }
+\protected\long\def\ekvd@populate@choicestore@#1#2%
+ {%
+ \protected\expandafter\edef
+ \csname\ekvd@choice@name\ekvd@set\ekvd@set@choice{#2}\endcsname
+ {\unexpanded{\edef#1{\unexpanded{#2}}}}%
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[internal]
+% {\ekvd@populate@choiceenum,\ekvd@populate@choiceenum@}
+% This is similar to the population of a |choice-store| type, but instead of
+% storing the values in a macro this initialises a count and stores the
+% position of the value in the list inside that count (zero-indexed). The
+% space is necessary to terminate the number scanning, which is the reason we
+% use |\@firstofone| (so that the space after the macro name isn't gobbled by
+% \TeX).
+% \begin{macrocode}
+\protected\long\def\ekvd@populate@choiceenum#1%
+ {%
+ \ekvd@newreg#1{count}%
+ \def\ekvd@tmp{0}%
+ \ekvcsvloop{\ekvd@populate@choiceenum@#1}%
+ }
+\protected\long\def\ekvd@populate@choiceenum@#1#2%
+ {%
+ \protected\expandafter\edef
+ \csname\ekvd@choice@name\ekvd@set\ekvd@set@choice{#2}\endcsname
+ {#1=\@firstofone{\ekvd@tmp} }%
+ \edef\ekvd@tmp{\the\numexpr\ekvd@tmp+1\relax}%
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}[internal]{\ekvd@t@unknown-choice}
% \begin{macrocode}
\protected\long\expandafter\def\csname ekvd@t@unknown-choice\endcsname#1#2%
@@ -2043,7 +2240,7 @@ and the derived files expkv-def.pdf
\protected\def\ekvd@assert@noval@#1%
{%
\expandafter\ekvd@extract@args\meaning#1\ekvd@stop
- \unless\ifx\ekvd@extracted@args\ekvd@empty
+ \unless\ifx\ekvd@extracted@args\ekv@empty
\ekvd@err@unsupported@arg
\fi
\@firstofone
@@ -2243,7 +2440,7 @@ and the derived files expkv-def.pdf
% \begin{macrocode}
\def\ekvd@err@choice@invalid#1%
{%
- \ekvd@err@choice@invalid@#1\ekv@stop
+ \ekvd@err@choice@invalid@#1%
}
\begingroup
\catcode40=8
@@ -2251,13 +2448,13 @@ and the derived files expkv-def.pdf
\@firstofone{\endgroup
\def\ekvd@choice@name#1#2#3%
{%
- ekvd#1(#2)#3%
+ ekvd#1(#2)\detokenize{#3}%
}
\def\ekvd@unknown@choice@name#1#2%
{%
ekvd:u:#1(#2)%
}
-\def\ekvd@err@choice@invalid@ ekvd#1(#2)#3\ekv@stop%
+\def\ekvd@err@choice@invalid@ ekvd#1(#2)\detokenize#3%
{%
\ekv@ifdefined{\ekvd@unknown@choice@name{#1}{#2}}%
{\csname\ekvd@unknown@choice@name{#1}{#2}\endcsname{#3}}%
diff --git a/macros/generic/expkv-def/expkv-def.pdf b/macros/generic/expkv-def/expkv-def.pdf
index 800ae3dae3..ea5678d280 100644
--- a/macros/generic/expkv-def/expkv-def.pdf
+++ b/macros/generic/expkv-def/expkv-def.pdf
Binary files differ
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.pdf b/macros/latex/contrib/crefthe/crefthe-doc.pdf
index 81cf05a712..10ac58da25 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.pdf
+++ b/macros/latex/contrib/crefthe/crefthe-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.tex b/macros/latex/contrib/crefthe/crefthe-doc.tex
index 95293acf31..736f44876b 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.tex
+++ b/macros/latex/contrib/crefthe/crefthe-doc.tex
@@ -31,7 +31,10 @@
\lstset{moretexcs=%
{
cref,crefname,
- crefthe,ccref,crefthemark,
+ Cref,Crefname,
+ crefformat,
+ crefthe,crefthename,crefthemark,
+ Crefthe,Crefthename,
selectlanguage,
}
}
@@ -86,8 +89,8 @@
\title{\crefthepackage{} - cross referencing with proper definite articles}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\crefthepackage{} 2021/11/05}}
-\date{November 2021, in Paris}
+\thanks{Corresponding to: \texttt{\crefthepackage{} 2022/01/29}}
+\date{January 2022, in Paris}
\maketitle
@@ -147,6 +150,16 @@ Simply load the package with:
\subsection[How to use it]{How to use it\,?}
+Before everything, you need to define the names, which can be done with \lstinline|\crefthename|. Its syntax is similar to \lstinline|\crefname|, but now you can specify the definite articles, for example:
+
+\begin{code}
+\crefthename{theorem}[le]{théorème}[les]{théorèmes}
+\end{code}
+
+% \begin{tip}
+% The \lstinline|\crefthename|s should be placed in your preamble.
+% \end{tip}
+
Then you can use the command \lstinline|\crefthe| as follows:
\begin{itemize}
\item \lstinline|\crefthe[|\meta{prep}\lstinline|]{|\meta{labels}\lstinline|}|
@@ -162,13 +175,13 @@ Then you can use the command \lstinline|\crefthe| as follows:
\begin{tip}
There is also a stared version \lstinline|\crefthe*| for generating the same referencing text but without creating hyperlinks.
\end{tip}
-
-However, before using it, you should first define the \lstinline|\crefname|s carefully. The definite article in \lstinline|\crefname|s needs to be marked manually using \lstinline|\crefthemark|, for example:
-\begin{code}
-\crefname{theorem}{\crefthemark{le} théorème}
- {\crefthemark{les} théorèmes}
-\end{code}
+% However, before using it, you should first define the \lstinline|\crefname|s carefully. The definite article in \lstinline|\crefname|s needs to be marked manually using \lstinline|\crefthemark|, for example:
+
+% \begin{code}
+% \crefname{theorem}{\crefthemark{le} théorème}
+% {\crefthemark{les} théorèmes}
+% \end{code}
\section{Example}
@@ -176,10 +189,8 @@ However, before using it, you should first define the \lstinline|\crefname|s car
Let us come back to the example at the beginning, now you can do this:
\begin{code}
-\crefname{theorem}{\crefthemark{le} théorème}
- {\crefthemark{les} théorèmes}
-\crefname{proposition}{\crefthemark{la} proposition}
- {\crefthemark{les} propositions}
+\crefthename{theorem}[le]{théorème}[les]{théorèmes}
+\crefthename{proposition}[la]{proposition}[les]{propositions}
\end{code}
And the sentence shall be written as:
@@ -196,12 +207,35 @@ which would result in (provided that you have done \lstinline|\selectlanguage{fr
Voilà !
+\section{Regarding the cases}
+
+The commands also have correspoding uppercased version: \lstinline|\Crefthename| and \lstinline|\Crefthe|, similar to \textsf{cleveref}'s \lstinline|\Crefname| and \lstinline|\Cref|, reserved for use at the beginning of a sentence. \lstinline|\Crefthe| can handle case changing automatically: for example, with \lstinline|\Crefthe[À]{thm1,thm2,prop3}|, you will get something like
+
+\begin{demo}
+ \textbf{Aux} théorèmes 1 et 2 et \textbf{à la} proposition 3
+\end{demo}
+
+Of course you will have to define the \lstinline|\Crefthename|s separately, for example as:
+
+\begin{code}
+\Crefthename{theorem}[Le]{théorème}[Les]{théorèmes}
+\Crefthename{proposition}[La]{proposition}[Les]{propositions}
+\end{code}
+
+\section{Relationship with \textsf{cleveref}}
+
+\crefthepackage{} loads \textsf{cleveref} automatically and pass all the options to it. All its commands, used without optional arguments, degenerate to those in \textsf{cleveref}. For example, \lstinline|\crefthe{...}| is the same as \lstinline|\cref{...}|, and \lstinline|\crefthename| is the same as \lstinline|\crefname| if the definite articles are not specified. That said, you can safely use the command \lstinline|\crefthe| everywhere in your document without causing extra trouble.
+
+\section{For multi-language documents}
+
+To place hyperlinks at the right place, \lstinline|\crefthename| touches the corresponding \lstinline|\crefformat| internally, which makes it language-dependent. If you are writing multi-language documents, you may like to consider putting \lstinline|\crefthename| inside your language configuration so as to reset it each time you select a new language.
\section{Known issues}
\begin{itemize}
- \item \crefthepackage{} currently only works for French, Italian, Portuguese (both European and Brazilian) and Spanish, certainly more would be added to this list.
+ \item \crefthepackage{} currently only works for French, Italian, Portuguese (European and Brazilian) and Spanish, certainly more would be added to this list.
\item The current mechanism does not work for German. However, the author has planed to adopt a more refined approach in later versions in order to support the various situations in German.
- \item In case that the initial letter of \meta{prep} is capitalized, \crefthepackage{} cannot yet handle the case changes automatically. However, this should be a rare occurrence.
+ \item For now, the automatic case changing mechanism only works properly under Unicode based engines. If you are using pdf\LaTeX{} or typing accented letters with text commands, \lstinline|\Crefthe| will not work as expected.
+ % \item In case that the initial letter of \meta{prep} is capitalized, \crefthepackage{} cannot yet handle the case changes automatically. However, this should be a rare occurrence.
\item The names of theorem-like environments are not provided --- for the moment you need to define them all by yourself. However, users are encouraged to use the \ProjLib{} toolkit, which already handles everything for you.
\end{itemize}
diff --git a/macros/latex/contrib/crefthe/crefthe.sty b/macros/latex/contrib/crefthe/crefthe.sty
index 366b681f72..ad752f87b5 100644
--- a/macros/latex/contrib/crefthe/crefthe.sty
+++ b/macros/latex/contrib/crefthe/crefthe.sty
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2021 by Jinwen XU
+%% Copyright (C) 2021-2022 by Jinwen XU
%% -------------------------------
%%
%% This file may be distributed and/or modified under the conditions of
@@ -12,13 +12,27 @@
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage
{crefthe}
- {2021/11/05}
+ {2022/01/29}
{}
{Cross referencing with proper definite articles}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{cleveref}}
+\ProcessOptions\relax
\RequirePackage{cleveref}
\tl_gset:Nn \g_crefthe_prepf_tl {}
\tl_gset:Nn \g_crefthe_prep_tl {}
+\tl_gset:Nn \g_crefthe_sep_tl {}
+\cs_new:Nn \crefthe_case:n {#1}
+\cs_new:Nn \crefthe_nochange:n {#1}
+\cs_new:Nn \crefthe_atbegindocument:n {#1}
+
+\cs_new:Nn \crefthe_set_status_atbegindocument: {
+ \cs_if_eq:NNTF \@onlypreamble \@notprerr {
+ \cs_gset_eq:NN \crefthe_atbegindocument:n \crefthe_nochange:n
+ }{
+ \cs_gset_eq:NN \crefthe_atbegindocument:n \AtBeginDocument
+ }
+}
\NewDocumentCommand{\crefthe}{st-t+O{}m}{
\IfBooleanTF{ #2 }{
@@ -37,11 +51,70 @@
\tl_gset:Nn \g_crefthe_prep_tl {}
}
+\NewDocumentCommand{\Crefthe}{st-t+O{}m}{
+ \cs_gset_eq:NN \crefthe_case:n \text_titlecase:n
+ \IfBooleanTF{ #2 }{
+ \tl_gset:Nn \g_crefthe_prepf_tl { #4 }
+ }{
+ \IfBooleanTF{ #3 }{
+ \tl_gset:Nn \g_crefthe_prep_tl { #4 }
+ }{
+ \str_case_e:nn { \crefthe_prep_mode:nn } {
+ { - } { \tl_gset:Nn \g_crefthe_prepf_tl { #4 } }
+ { + } { \tl_gset:Nn \g_crefthe_prep_tl { #4 } }
+ }
+ }
+ }
+ \IfBooleanTF{ #1 } { \Cref*{#5} } { \Cref{#5} }
+ \tl_gset:Nn \g_crefthe_prep_tl {}
+}
+
+\NewDocumentCommand{\crefthename}{mO{}mO{}m}{
+ \str_if_eq:eeTF {#2} {} {
+ \crefname{#1}{#3}{#5}
+ \cs_set:cn {cref_#1_format:nnn} {##2#3~##1##3}
+ \cs_set:cn {cref_#1_format_first:nnn} {##2#5~##1##3}
+ }{
+ \crefname{#1}{\crefthemark{#2} \g_crefthe_sep_tl #3}{\crefthemark{#4} \g_crefthe_sep_tl #5}
+ \cs_set:cn {cref_#1_format:nnn} {\crefthemark{#2} \g_crefthe_sep_tl ##2#3~##1##3}
+ \cs_set:cn {cref_#1_format_first:nnn} {\crefthemark{#4} \g_crefthe_sep_tl ##2#5~##1##3}
+ }
+ \crefthe_set_status_atbegindocument:
+ \crefthe_atbegindocument:n {
+ \cs_set_eq:cc {cref@#1@format} {cref_#1_format:nnn}
+ \cs_set_eq:cc {cref@#1@format@first} {cref_#1_format_first:nnn}
+ }
+}
+
+\NewDocumentCommand{\Crefthename}{mO{}mO{}m}{
+ \str_if_eq:eeTF {#2} {} {
+ \Crefname{#1}{#3}{#5}
+ \cs_set:cn {Cref_#1_format:nnn} {##2#3~##1##3}
+ \cs_set:cn {Cref_#1_format_first:nnn} {##2#5~##1##3}
+ }{
+ \Crefname{#1}{\crefthemark{#2} \g_crefthe_sep_tl #3}{\crefthemark{#4} \g_crefthe_sep_tl #5}
+ \cs_set:cn {Cref_#1_format:nnn} {\crefthemark{#2} \g_crefthe_sep_tl ##2#3~##1##3}
+ \cs_set:cn {Cref_#1_format_first:nnn} {\crefthemark{#4} \g_crefthe_sep_tl ##2#5~##1##3}
+ }
+ \crefthe_set_status_atbegindocument:
+ \crefthe_atbegindocument:n {
+ \cs_set_eq:cc {Cref@#1@format} {Cref_#1_format:nnn}
+ \cs_set_eq:cc {Cref@#1@format@first} {Cref_#1_format_first:nnn}
+ }
+}
+
\NewDocumentCommand{\crefthemark}{m}{
- \crefthe_contraction:nn { \tl_use:N \g_crefthe_prep_tl }{
- \crefthe_contraction:nn { \tl_use:N \g_crefthe_prepf_tl }{#1}
+ \crefthe_contraction:nn { \crefthe_case:n \g_crefthe_prep_tl }{
+ \crefthe_contraction:nn { \crefthe_case:n \g_crefthe_prepf_tl }{#1}
}
\tl_gset:Nn \g_crefthe_prepf_tl {}
+ \tl_gset:Nx \g_crefthe_prep_tl { \text_lowercase:n \g_crefthe_prep_tl }
+ \str_case_e:nnF {\str_tail:n {#1}} {
+ {'} { \tl_gset:Nn \g_crefthe_sep_tl {} }
+ }
+ { \tl_gset:Nn \g_crefthe_sep_tl {~} }
+ \cs_gset_eq:NN \crefthe_case:n \crefthe_nochange:n
+ % \cs_gset_eq:NN \crefthe_case:n \text_lowercase:n
}
\cs_set:Npn \crefthe_prep_mode:nn {
@@ -60,19 +133,19 @@
\str_case_e:nn { \languagename }
{
{french}{
- \str_case_e:nnF {#1~#2} {
+ \str_case_e:nnF {#1~\text_lowercase:n{#2}} {
{à~le} {au}
- {à~la} {à~la}
- {à~l'} {à~l'}
{à~les} {aux}
{de~le} {du}
- {de~la} {de~la}
- {de~l'} {de~l'}
{de~les} {des}
- }{#1~#2}
+ {À~le} {Au}
+ {À~les} {Aux}
+ {De~le} {Du}
+ {De~les} {Des}
+ }{#1~\text_lowercase:n{#2}}
}
{italian}{
- \str_case_e:nnF {#1~#2} {
+ \str_case_e:nnF {#1~\text_lowercase:n{#2}} {
{a~il} {al}
{a~lo} {allo}
{a~l'} {all'}
@@ -108,10 +181,45 @@
{su~i} {sui}
{su~gli} {sugli}
{su~le} {sulle}
- }{#1~#2}
+ {A~il} {Al}
+ {A~lo} {Allo}
+ {A~l'} {All'}
+ {A~la} {Alla}
+ {Di~il} {Del}
+ {Di~lo} {Dello}
+ {Di~l'} {Dell'}
+ {Di~la} {Della}
+ {Da~il} {Dal}
+ {Da~lo} {Dallo}
+ {Da~l'} {Dall'}
+ {Da~la} {Dalla}
+ {In~il} {Nel}
+ {In~lo} {Nello}
+ {In~l'} {Nell'}
+ {In~la} {Nella}
+ {Su~il} {Sul}
+ {Su~lo} {Sullo}
+ {Su~l'} {Sull'}
+ {Su~la} {Sulla}
+ {A~i} {Ai}
+ {A~gli} {Agli}
+ {A~le} {Alle}
+ {Di~i} {Dei}
+ {Di~gli} {Degli}
+ {Di~le} {Delle}
+ {Da~i} {Dai}
+ {Da~gli} {Dagli}
+ {Da~le} {Dalle}
+ {In~i} {Nei}
+ {In~gli} {Negli}
+ {In~le} {Nelle}
+ {Su~i} {Sui}
+ {Su~gli} {Sugli}
+ {Su~le} {Sulle}
+ }{#1~\text_lowercase:n{#2}}
}
{portuguese}{
- \str_case_e:nnF {#1~#2} {
+ \str_case_e:nnF {#1~\text_lowercase:n{#2}} {
{a~o} {ao}
{a~a} {à}
{a~os} {aos}
@@ -124,10 +232,22 @@
{em~a} {na}
{em~os} {nos}
{em~as} {nas}
- }{#1~#2}
+ {A~o} {Ao}
+ {A~a} {À}
+ {A~os} {Aos}
+ {A~as} {Às}
+ {De~o} {Do}
+ {De~a} {Da}
+ {De~os} {Dos}
+ {De~as} {Das}
+ {Em~o} {No}
+ {Em~a} {Na}
+ {Em~os} {Nos}
+ {Em~as} {Nas}
+ }{#1~\text_lowercase:n{#2}}
}
{brazilian}{
- \str_case_e:nnF {#1~#2} {
+ \str_case_e:nnF {#1~\text_lowercase:n{#2}} {
{a~o} {ao}
{a~a} {à}
{a~os} {aos}
@@ -140,13 +260,27 @@
{em~a} {na}
{em~os} {nos}
{em~as} {nas}
- }{#1~#2}
+ {A~o} {Ao}
+ {A~a} {À}
+ {A~os} {Aos}
+ {A~as} {Às}
+ {De~o} {Do}
+ {De~a} {Da}
+ {De~os} {Dos}
+ {De~as} {Das}
+ {Em~o} {No}
+ {Em~a} {Na}
+ {Em~os} {Nos}
+ {Em~as} {Nas}
+ }{#1~\text_lowercase:n{#2}}
}
{spanish}{
- \str_case_e:nnF {#1~#2} {
+ \str_case_e:nnF {#1~\text_lowercase:n{#2}} {
{a~el} {al}
{de~el} {del}
- }{#1~#2}
+ {A~el} {Al}
+ {De~el} {Del}
+ }{#1~\text_lowercase:n{#2}}
}
}
}
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 81156d1337..96361bc5d9 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/01/28}{1.54}
+\ProvidesExplClass{easybook}{2022/01/28}{1.55}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -305,7 +305,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/01/28}{1.54}
+\ProvidesExplPackage{easybase}{2022/01/28}{1.55}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2343,7 +2343,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/28}{1.54}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/28}{1.55}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index bd4402b691..17a61f687d 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index f6323022a7..2660944146 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,7 +21,7 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.54,
+ version = v1.55,
date = 2022/01/28,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
@@ -33,7 +33,7 @@
},
arg-format = \normalfont\small\itshape,
abstract-format = \small,
- module-sep = \,$\Rightarrow$\,,
+ module-sep = \,\raisebox{-1pt}{\ding{224}}\,,
title-format = \huge\sffamily
}
\KOMAoptions{headsepline = 0.5pt,numbers = noenddot}
@@ -64,6 +64,7 @@
\cnltx@isvalue
\IfBooleanTF{#2}{#4}{\splitmarg{#4}}
}
+ \cnltx@checkdefault{\hfill\newline}
}
% Traversal output parameters
\newcommand{\splitmeta}[2][\code{,}]
@@ -85,13 +86,17 @@
\newcommand{\spemmeta}{\splitmeta[\code{|}]}
\newsplitarg[\spemmeta]{\spemcoarg}{[}{]}
\newcommand{\harg}{\textcolor{argument}{\code{-}}}
-% Default value adds a flag to distinguish options
-\RenewDocumentCommand{\Default}{st-m}
+% A tag that distinguishes the options for different paths
+\NewDocumentCommand{\dtag}{O{\ding{73}}}
{
- \null\hfill
- \llap{\code{#3}\IfBooleanT{#1}{*}}
- \IfBooleanF{#2}{\newline}
+ \begingroup
+ \reversemarginpar
+ \marginnote{\hfill\llap{#1}}
+ \endgroup
+ \cnltx@checkdefault{\hfill\newline}
}
+% Use a separate module margin marker to prevent overlap
+\newcommand{\smodule}{\cnltx@module@text{}}
\newcommand{\noitemsep}{\setlength{\itemsep}{0ex}}
\newcommand{\insertblr}[2]
{
@@ -224,9 +229,9 @@
\section{文档类选项}
\label{sec:document class options}
-文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见\ref{subsec:basic usage} 的例子。默认值后带有星号的选项表示文档类与宏包都适用,否则只可用于文档类。除了下面列举的选项以外,还支持标准和 C\TeX 文档类的选项。
+文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见\ref{subsec:basic usage} 的例子。选项前带有 \ding{73} 符号表示文档类与宏包都适用,否则只可用于文档类。除了下面列举的选项以外,还支持标准和 C\TeX 文档类的选项。
\begin{options}
- \opt{draft}\Default*{}
+ \opt{draft}\dtag
开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见\ref{subsec:box}。
\opt{newline}
部分和章标题的样式为另起一行,符合一般英文书籍的习惯。
@@ -234,13 +239,13 @@
文档主题方案选项 \option{scheme} 扩展了 C\TeX 文档类中同名选项原有的作用范围,选项值 \code{plain} 可使各类标题变为英文形式。包括章节标题、图表标题和定理名等。
\opt{enmode}
同时开启 \option{newline} 和 \keyis-{scheme}{plain} 选项以符合英文原生风格。
- \keychoice{paper}{a4paper,b5paper,c5paper,letterpaper,other paper}\Default*{a4paper}
+ \keychoice{paper}{a4paper,b5paper,c5paper,letterpaper,other paper}\dtag\Default{a4paper}
文档页面尺寸选项将参数交给 \pkg*{geometry} 宏包处理,可使用它支持的所有标准纸张规格。
\keyval-{config}{配置文件列表}
载入用户配置的文件名列表,文件列表以花括号包裹并以英文逗号分隔。文件名应包含如 \code{tex}、\code{def} 或 \code{cfg} 等扩展名。若配置文件不在当前文件夹则文件名需要包含路径。
- \keybool{floatpage}\Default*{false}
+ \keybool{floatpage}\dtag\Default{false}
开启这个选项后浮动环境 \env*{table} 和 \env*{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
- \keybool{theorem}\Default*{true}
+ \keybool{theorem}\dtag\Default{true}
是否提供定理功能支持。选项开启时定理样式模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
\end{options}
@@ -287,11 +292,11 @@
\subsection{\textsf{article} 模式}
\begin{options}
- \keychoice{class}{book,article}\Default*{book}
+ \keychoice{class}{book,article}\dtag\Default{book}
使用 \cls*{easybook} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \code{article} 会变为 \code{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令。此时\ref{sec:document command} 中目录命令的 \option{chapter} 选项会失效,将以 \code{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。
- \opt{book}\Default*{}
+ \opt{book}\dtag
开启 \cls*{book} 书籍模式,与 \keyis*-{class}{book} 等效。
- \opt{article}\Default*{}
+ \opt{article}\dtag
开启 \cls*{article} 文章模式,与 \keyis*-{class}{article} 等效。
\end{options}
@@ -334,7 +339,7 @@
使当前目录没有 \code{chapter} 或 \code{section} 级别的标题,仅输出目录原始内容。
\keyval-{multoc}{整数}\Default{2}
与 \module*{style} 模块的 \option{multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同类型目录的排版栏数。\meta{整数} 为目录栏数,不指定栏数值则默认为双栏。
- \kvsplit{title}{中文目录标题,英文目录标题}\newline
+ \kvsplit{title}{中文目录标题,英文目录标题}
用于更改目录的标题。标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入文档主目录 \cs*{tableofcontents}\parg{} 命令。
\keychoice{bilist}{mix,new}\Default{new}
确定文档主目录中双语标题列表的输出排列方式。选项 \code{mix} 使每个英文标题条目在中文目录中跟随对应的中文标题输出,\code{new} 则新建一个英文目录输出英文标题。
@@ -667,7 +672,7 @@
定理环境前的间距,使用 \pkg*{tcolorbox} 的盒子环境包装后被覆盖。
\keyval-{spacebelow}{弹性长度}
定理环境后的间距,使用 \pkg*{tcolorbox} 的盒子环境包装后被覆盖。
- \kvsplit-{notebraces}{\marg{左括号}\marg{右括号}}\newline
+ \kvsplit-{notebraces}{\marg{左括号}\marg{右括号}}
设置定理题注两边的括号,两个必选参数分别代表左括号和右括号。
\keyval-{headformat}{标题排列}
定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中命令 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。
@@ -691,12 +696,12 @@
\label{subsec:page margins}
模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
\begin{options}\noitemsep
- \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default-{0pt}
- \keyval-{footruleskip}{页脚线间距}\Default-{3.5pt}
+ \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*{0pt}
+ \keyval-{footruleskip}{页脚线间距}\Default*{3.5pt}
\kvsplit*{hdivide}{左边距,页面文本宽度,右边距}
\kvsplit*{hmargin}{左边距,右边距}
\keyval*-{textheight}{页面文本高度}\default{}
- \keybool*{nofoot}\Default-{false}
+ \keybool*{nofoot}\Default*{false}
\begin{ctexexam}
\ebgeoset
{
@@ -857,7 +862,7 @@
同时设定默认脚注标记 \option{fnmate-form} 和自定义脚注标记 \option{fncust-form} 的格式。两种脚注标记匹配上标格式 \option*{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。标记格式选项含有字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注标记。
\keyval-{fnpara-form}{格式代码}
脚注内容的格式,在此设置字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注内容。
- \kvsplit{fntext-code}{前代码,后代码}\newline
+ \kvsplit{fntext-code}{前代码,后代码}
可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码,也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,一般用于在脚注内容标记与脚注首行间插入一点距离,或与脚注正文标记的格式稍有不同。
\begin{ctexexam}
\ebhdrset
@@ -870,19 +875,19 @@
\subsection{目录样式}
\label{subsec:catalog style}
-模块 \module*{tocset} 将使用 \pkg*{titletoc} 宏包处理目录样式。模块或扩展包括了 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 二级路径,而使用 \module*{list} 路径可以统一设置图片、表格和代码目录的样式。默认值后带有星号的选项支持所有相应\textbf{标题级别}的路径,其它选项则处于 \module*{tocset} 路径下。目前支持标准的论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
+模块 \module*{tocset} 将使用 \pkg*{titletoc} 宏包处理目录样式。模块或扩展包括了 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 二级路径,而使用 \module*{list} 路径可以统一设置图片、表格和代码目录的样式。选项前带有 \ding{73} 符号表示支持所有相应\textbf{标题级别}的路径,其它选项则处于 \module*{tocset} 路径下。目前支持标准的论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
\begin{options}
- \keyval-{tocformat}{条目格式}\Module{tocset}\Default*{}
+ \keyval-{tocformat}{条目格式}\dtag\smodule{tocset}
目录中各级别条目的格式,可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。
- \keyval-{tocformat+}{条目格式}\Default*{}
+ \keyval-{tocformat+}{条目格式}\dtag
与 \option{tocformat} 用法一样,只是在已有的格式命令后附加代码。
- \keyval-{tocindent}{刚性长度}\Default*{}
+ \keyval-{tocindent}{刚性长度}\dtag
各级别目录中的标题左边缩进距离,通常标题级别越低缩进越大。
- \keyval-{tocrule}{目录引导线命令}\Default*{}
+ \keyval-{tocrule}{目录引导线命令}\dtag
引导线选项 \option{tocrule} 中一般可以使用基于 \cs*{xleaders} 命令的 \cs{tocrule} 绘制引导线。
- \keyval-{tocafter}{距离命令}\Default*{\cs*{hspace}\Marg{1em}}
+ \keyval-{tocafter}{距离命令}\dtag\Default{\cs*{hspace}\Marg{1em}}
在各级别目录中标签与标题间的代码,默认为插入 \code{1em} 横向距离。
- \keyval-{tocline}{目录中的标题}\Default*{}
+ \keyval-{tocline}{目录中的标题}\dtag
这个选项扩展了图片、表格或代码加入目录的题注。选项中参数 \code{\#1} 代表相应题注编号 \cs*{the}\meta{计数器} 的值,参数 \code{\#2} 代表相应题注内容。
\begin{ctexexam}[labelref = exam:list command usage]
\ctexset
@@ -1252,7 +1257,7 @@
\item 增加定义脚注正文和内容标记格式的命令 \cs{defupfntmark} 和 \cs{defdownfntmark}。
\item 新增文档主目录中双语标题列表的输出排列方式选项 \option{bilist}。
\end{version}
- \begin{version}[v = 1.54,date = 2022/01/28]
+ \begin{version}[v = 1.55,date = 2022/01/28]
\added
\item 新增文类选项 \option{theorem} 用于提供定理功能支持。
\deprecated
diff --git a/macros/latex/contrib/elements/README b/macros/latex/contrib/elements/README
index abb5ea1ab7..2ad23f1bf3 100644
--- a/macros/latex/contrib/elements/README
+++ b/macros/latex/contrib/elements/README
@@ -1,22 +1,22 @@
--------------------------------------------------------------------------
-the ELEMENTS package v0.3 2019/10/14
+the ELEMENTS package v0.4 2022/01/29
retrieve different properties of chemical elements
--------------------------------------------------------------------------
Clemens Niederberger
-Web: https://github.com/cgnieder/elements/
-E-Mail: contact@mychemistry.eu
+Web: https://github.com/cgnieder/elemens
+E-Mail: clemens@cnltx.de
--------------------------------------------------------------------------
-Copyright 2011--2019 Clemens Niederberger
+Copyright 2011--2022 Clemens Niederberger
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
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.
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
This work has the LPPL maintenance status `maintained'.
diff --git a/macros/latex/contrib/elements/elements_en.pdf b/macros/latex/contrib/elements/elements-manual.pdf
index e48823fe7b..6e24fb2401 100644
--- a/macros/latex/contrib/elements/elements_en.pdf
+++ b/macros/latex/contrib/elements/elements-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/elements/elements_en.tex b/macros/latex/contrib/elements/elements-manual.tex
index 5867f1bf23..69ba25184b 100644
--- a/macros/latex/contrib/elements/elements_en.tex
+++ b/macros/latex/contrib/elements/elements-manual.tex
@@ -9,18 +9,18 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: http://www.mychemistry.eu/forums/forum/elements/
-% E-Mail: contact@mychemistry.eu
+% Web: https://github.com/cgnieder/elemens
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
-% Copyright 2011--2019 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% 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.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -30,13 +30,12 @@
% feel free to contact me.
% --------------------------------------------------------------------------
\documentclass[load-preamble+]{cnltx-doc}
-\usepackage[utf8]{inputenc}
\usepackage{elements}
\setcnltx{
package = elements ,
authors = Clemens Niederberger ,
- email = contact@mychemistry.eu ,
+ email = clemens@cnltx.de ,
url = https://github.com/cgnieder/elements ,
add-cmds = {
atomicnumber,
diff --git a/macros/latex/contrib/elements/elements.sty b/macros/latex/contrib/elements/elements.sty
index f5e8acc2a8..22fab8c772 100644
--- a/macros/latex/contrib/elements/elements.sty
+++ b/macros/latex/contrib/elements/elements.sty
@@ -5,18 +5,18 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: https://github.com/cgnieder/elements/
-% E-Mail: contact@mychemistry.eu
+% Web: https://github.com/cgnieder/elemens
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
-% Copyright 2011--2019 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% 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.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -25,8 +25,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\newcommand*\@elements@date{2019/10/14}
-\newcommand*\@elements@version{v0.3}
+\newcommand*\@elements@date{2022/01/29}
+\newcommand*\@elements@version{v0.4}
\newcommand*\@elements@description{properties of chemical elements}
\ProvidesPackage{elements}[%
@@ -57,7 +57,7 @@
}
\@elements@tmpa
-% chack for following !:
+% check for following !:
\newrobustcmd*\@elements@ifbang[1]{\@ifnextchar!{\@firstoftwo{#1}}}
% --------------------------------------------------------------------------
@@ -255,20 +255,23 @@
}
\newrobustcmd*\@elements@getelconf[1]{%
- \forcsvlist{\@elements@getelconf@aux}{#1}%
+ \@elements@getelconf@aux#1,\q@stop
}
-\newrobustcmd*\@elements@getelconf@aux[1]{%
+\protected\def\@elements@getelconf@aux#1,#2\q@stop{%
\stepcounter{@elements@shell@number}%
\setcounter{@elements@orbital@type}{0}%
\@elements@parse@elconf#1+\q@stop
+ \ifblank{#2}{}{\@elements@getelconf@aux#2\q@stop}%
}
\protected\def\@elements@parse@elconf#1+#2\q@stop{%
- \eappto\@elements@current@elconf{\arabic{@elements@shell@number}}%
- \eappto\@elements@current@elconf
- {\expandonce{\csname @elements@angmom@\arabic{@elements@orbital@type}\endcsname}}%
- \appto\@elements@current@elconf{^{#1}}%
+ \ifblank{#1}{}{%
+ \eappto\@elements@current@elconf{\arabic{@elements@shell@number}}%
+ \eappto\@elements@current@elconf
+ {\expandonce{\csname @elements@angmom@\arabic{@elements@orbital@type}\endcsname}}%
+ \appto\@elements@current@elconf{^{#1}}%
+ }%
\stepcounter{@elements@orbital@type}%
\ifblank{#2}
{}
@@ -316,7 +319,7 @@
}
% ==========================================================================
-% define the elements properties for elements 1 -- 112
+% define the elements properties for elements 1 -- 118
%
% declare atom symbols:
\DeclareAtomSymbol{1}{H}
diff --git a/macros/latex/contrib/elements/elements_names_brazil.def b/macros/latex/contrib/elements/elements_names_brazil.def
index a74b5185c4..9aef1d14b0 100644
--- a/macros/latex/contrib/elements/elements_names_brazil.def
+++ b/macros/latex/contrib/elements/elements_names_brazil.def
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/elements/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2015--2019 Clemens Niederberger
+% Copyright 2015--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/elements/elements_names_english.def b/macros/latex/contrib/elements/elements_names_english.def
index 1d9270b345..6ec82c2bfb 100644
--- a/macros/latex/contrib/elements/elements_names_english.def
+++ b/macros/latex/contrib/elements/elements_names_english.def
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/elements/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2011--2019 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/elements/elements_names_french.def b/macros/latex/contrib/elements/elements_names_french.def
index fb7a7775a8..9e8e6f5758 100644
--- a/macros/latex/contrib/elements/elements_names_french.def
+++ b/macros/latex/contrib/elements/elements_names_french.def
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/elements/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2011--2019 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/elements/elements_names_german.def b/macros/latex/contrib/elements/elements_names_german.def
index 924f2a9dc3..72d754079c 100644
--- a/macros/latex/contrib/elements/elements_names_german.def
+++ b/macros/latex/contrib/elements/elements_names_german.def
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/elements/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2011--2019 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/elements/elements_names_portuges.def b/macros/latex/contrib/elements/elements_names_portuges.def
index 0e111439ca..3db13de9de 100644
--- a/macros/latex/contrib/elements/elements_names_portuges.def
+++ b/macros/latex/contrib/elements/elements_names_portuges.def
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/elements/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2015--2019 Clemens Niederberger
+% Copyright 2015--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/elements/elements_names_spanish.def b/macros/latex/contrib/elements/elements_names_spanish.def
index efc0773539..190815fbbb 100644
--- a/macros/latex/contrib/elements/elements_names_spanish.def
+++ b/macros/latex/contrib/elements/elements_names_spanish.def
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/elements/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2011--2019 Clemens Niederberger
+% Copyright 2011--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/erw-l3/README.md b/macros/latex/contrib/erw-l3/README.md
index 5facff0f19..ecfdf1f0b7 100644
--- a/macros/latex/contrib/erw-l3/README.md
+++ b/macros/latex/contrib/erw-l3/README.md
@@ -1,7 +1,6 @@
-----------------------------------------------------------------
-##### erw-l3 --- Utilities for LaTeX3 programming
+##### erw-l3 --- Utilities based on LaTeX3, such as 'merge sort'
- Source repository: https://github.com/rogard/erw-l3
- Released under the LaTeX Project Public License v1.3c or later
- See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
diff --git a/macros/latex/contrib/erw-l3/erw-l3.dtx b/macros/latex/contrib/erw-l3/erw-l3.dtx
index eb504d5bbb..ab8f1bf0c1 100644
--- a/macros/latex/contrib/erw-l3/erw-l3.dtx
+++ b/macros/latex/contrib/erw-l3/erw-l3.dtx
@@ -5,12 +5,11 @@
%</internal>
%<*readme>
-----------------------------------------------------------------
-##### erw-l3 --- Utilities for LaTeX3 programming
+##### erw-l3 --- Utilities based on LaTeX3, such as 'merge sort'
- Source repository: https://github.com/rogard/erw-l3
- Released under the LaTeX Project Public License v1.3c or later
- See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
%</readme>
%<*internal>
\fi
@@ -24,8 +23,8 @@
\keepsilent
\askforoverwritefalse
\preamble
-----------------------------------------------------------------------------
-erw-l3 --- Utilities for LaTeX3 programming
+-----------------------------------------------------------------------------
+erw-l3 --- Utilities based on LaTeX3, such as 'merge sort'
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------------------
@@ -33,7 +32,7 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2018-2020 by Erwann Rogard
+Copyright (C) 2020-2022 by Erwann Rogard
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License (LPPL), either
@@ -68,141 +67,78 @@ erw-l3.sty, and erw-l3.pdf.
\expandafter\endgroup
\fi
%</internal>
-%<package> \NeedsTeXFormat{LaTeX2e}[2020/02/02]
-%<package> \RequirePackage{etoolbox}[2019/09/21]
-%<package> \RequirePackage{l3keys2e}[2020/03/06]
-%<package> \RequirePackage{xparse}[2020/03/06]
+%<package> \NeedsTeXFormat{LaTeX2e}[2021-06-01]
+%<package> \RequirePackage{xparse, l3keys2e, xtemplate}[2021-06-01]
%<package> \ProvidesExplPackage
-%<package> {erw-l3} % Package name
-%<package> {2020/06/04} % Release date
-%<package> {3.1} % Release version
-%<package> {erw-l3 --- Utilities for LaTeX3 programming } % Description
-%
+%<package> {erw-l3} % Package name
+%<package> {2022-01-28} % Release date
+%<package> {4.2} % Release version
+%<package> {erw-l3 --- Utilities based on LaTeX3, such as 'merge sort' } % Description
%<*driver>
-\RequirePackage{fvextra}%^^A\NB{done}{Warning:csquotes should be loaded after fvextra->nope}
-\documentclass[full]{l3doc}
-\listfiles
-\usepackage[english]{babel}
-\AtBeginDocument{\selectlanguage{english}}
-\usepackage{bookmark}
-\usepackage[T1]{fontenc}
-\usepackage{erw-l3}
-\usepackage{microtype}
-\usepackage{nolbreaks}
-\usepackage{tabto}
-\usepackage{tcolorbox}
-\tcbuselibrary{listings, breakable}
-\usepackage{xparse}
-\usepackage{hyperref}
+\documentclass%^^A[show-notes]
+% ^^A[draft]
+{l3doc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
-% ^^A\AtEndDocument { \PrintChanges \PrintIndex }
-\makeatletter
-\newcommand*{\docsetnameref}{\def\@currentlabelname}%https://tex.stackexchange.com/questions/537751
-\makeatother
+% ^^A \listfiles
+\usepackage{amsmath, bookmark, enumitem, mathtools, microtype, tcolorbox, xparse}
+\usepackage[french, german, english]{babel}
+\usepackage[T1]{fontenc}
+\usepackage[bibencoding=auto, backend=biber, sorting=ynt]{biblatex}
+\begin{filecontents*}{\jobname.bib}
+@manual{interface3,
+ title = {The \LaTeX3 interfaces},
+ author = {The \LaTeX3 Project Team},
+ year = {2019},
+ note = {\url{https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/l3kernel/expl3.pdf}},
+ annote = {} }
+\end{filecontents*}
+\addbibresource{\jobname.bib}
\ExplSyntaxOn
-\tl_gset:Nn \partname {Part}
-\newenvironment{docabstract}[1]%https://latex.org/forum/viewtopic.php?t=12156
-{\renewcommand{\abstractname}{#1}\begin{abstract}}
- {\end{abstract}}
-\cs_new:Nn \__erw_docu:n{\MakeUppercase #1}
-\ProvideDocumentCommand\DocPhantomSection{smmm}
-{
- \leavevmode
- \refstepcounter{#2}
- \IfBooleanT{#1}
- {
- \addcontentsline{toc}{#2}{\protect\numberline{\use:c{the#2}}#3}
- }
- \docsetnameref{#3}
- \label{#4}
-}
-\providecommand\docU[1]{\exp_args:Nx \__erw_docu:n{#1}}
-\ExplSyntaxOff
+% ^^A *** Sectioning
+\tl_gset:Nn \partname {Part}%^^A allows to test w/o babel
+% ^^A *** Msg
+\msg_new:nnn{__erw-l3_doc}{unknown}{~#1:#2~unknown}
+% ^^A *** Expressions
+\ProvideDocumentCommand{\docrule}{}{\texttt{$\rightarrow$}}
+\ProvideDocumentCommand{\docpipe}{}{\textbar}
+% ^^A *** L3 package
+\ProvideDocumentCommand{\docparam}{m}{\texttt{\#}\meta{#1}}
+% ^^A *** Lists
+\newlist{arab-inl}{enumerate*}{1}
+\setlist[arab-inl]{label=\arabic*)}
+\newlist{colon-inl}{itemize*}{1}
+\setlist[colon-inl]
+{ %^^Abefore=\noindent,
+ label={},
+ itemjoin={{; }},
+ after={{.}}}
+\newlist{descr}{description}{2}
+\setlist[descr]{nosep, align=right, itemindent=0pt, font=\sffamily\tiny}
% ^^A Sort--->
-\providecommand\docarg[1]{\texttt{#1}} % fun[param] (macro) vs fun[arg] (eval)
-\providecommand\docargnoval{\c_novalue_tl}
-\providecommand\docassign[2]{#1~$\leftarrow$~#2}
-\providecommand\docccept[1]{\textit{#1}}
-\providecommand\doccceptargspec{arg~spec}
-\providecommand\doccceptbool{boolean}
-\providecommand\doccceptcont{container}
-\providecommand\doccceptclist{clist}
-\providecommand\doccceptcode{code}
-\providecommand\doccceptcsname{cs name}
-\providecommand\doccceptcsorcode{cs~or~code}
-\providecommand\doccceptcs{cs}
-\providecommand\doccceptempty{empty}
-\providecommand\doccceptgroup{local~group}
-\providecommand\doccceptint{integer}
-\providecommand\doccceptitems{items}
-\providecommand\doccceptkey{key}
-\providecommand\doccceptkvl{keyval~list}
-\providecommand\doccceptopt{option}
-\providecommand\doccceptpath{path}
-\providecommand\doccceptplaceh{placeholder}
-\providecommand\doccceptpre{preamble}
-\providecommand\doccceptprop{prop}
-\providecommand\doccceptsep{separators}
-\providecommand\doccceptseq{seq}
-\providecommand\docccepttlvar{tl~var}
-\providecommand\docccepttl{token~list}
-\providecommand\docccepttok{token}
-\providecommand\doccceptval{val}
-\providecommand\docconv[1]{convention~\autoref{conv:#1}}
-\providecommand\docdefaultfor{default~for~}
-\providecommand\docenvdoc{\env{document}}
-\providecommand\doceval[1]{\texttt{\char`\{}#1\texttt{\char`\}}}
-\providecommand\docexpand[2]{#1~$\rightarrow$~#2}
-\providecommand\docfillblank{\begin{minipage}[t]{\linewidth}\end{minipage}}
-\providecommand\docissuedont{Don't: }
-\providecommand\docissuedo{Do: }
-\providecommand\docissuesymp{Symptom: }
-\providecommand\doclist[1]{Listing~\ref{listing:#1}}
-\providecommand\docnb{\noindent\textbf{NB}:~}
-\providecommand\docoptd[1]{\texttt{\textless}#1\texttt{\textgreater}}
-\providecommand\docopte[2]{\texttt{#1}\doceval{#2}}
-\providecommand\docopto[1]{\texttt{[}#1\texttt{]}}
-\providecommand\docpipe{\textbar}
-\providecommand\doccs[1]{\texttt{\textbackslash{}#1}}
-\providecommand\docreflist[1]{Listing~\ref{listing:#1}}
-\providecommand\docsee{See:~}
-\providecommand\docstep[1]{step~\ref{step:#1}}
-\providecommand\doctip{\noindent\textbf{Tip}:~}
-\providecommand\docvers[2]{v#1.#2}
-\providecommand\docwarn{\noindent\textbf{Warning}:~}
-\providecommand\docxparsed[1][~argument]{`d'-type~#1}
-\providecommand\docxparsee[1][~argument]{`e'-type~#1}
-\providecommand\docxparsem[1][~argument]{`m'-type~#1}
-\providecommand\docxparseo[1][~argument]{`o'-type~#1}
-\providecommand\pkgkey{key$_{i}$}
-\providecommand\pkgobj[1]{object identified by #1}
-\providecommand\pkgoptex{\docarg{Expans}}
-\providecommand\pkgoptfi{\docarg{File}}
-\providecommand\pkgoptin{\docarg{Inner}}
-\providecommand\pkgoptions{kvl0}
-\providecommand\pkgoptou{\docarg{Outer}}
-\providecommand\pkgoptpad{\docarg{Default}}%default
-\providecommand\pkgoptpa{\docarg{Param}}
-\providecommand\pkgoptse{\docarg{Separ}}
-\providecommand\pkgoptwr{\docarg{Write}}
-\providecommand\pkgparap{\texttt{+}}%append
-\providecommand\pkgparex{\texttt{*}}%expand
-\providecommand\pkgparhe{tl$_{1}$}%head
-\providecommand\pkgparin{code$_{1}$}%inner
-\providecommand\pkgparkvlnxt{kvl$_{2}$}
-\providecommand\pkgparkvl{kvl$_{1}$}
-\providecommand\pkgparou{code$_{2}$}%outer
-\providecommand\pkgparpa{tl$_{2}$}%param
-\providecommand\pkgparsiii{tl$_{5}$}
-\providecommand\pkgparsii{tl$_{4}$}
-\providecommand\pkgparsi{tl$_{3}$}
-\providecommand\pkgpars{\Arg{\pkgparsi}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\Arg{\pkgparsiii}}%separ
-\providecommand\pkgparta{tl$_{6}$}%tail
-\providecommand\pkgsep[1]{\Arg{#1}}
-\providecommand\pkgval{val$_{i}$}
+\ProvideDocumentCommand{\docdescrf}{m}{{\sffamily\bfseries\tiny{}#1}}
+\ProvideDocumentCommand{\docfillblank}{}{\begin{minipage}[t]{\linewidth}\end{minipage}}
% ^^A Sort<---
+\ExplSyntaxOff
+% ^^A *** listing
+\tcbuselibrary{listings, breakable}
+\newtcblisting[auto counter]
+{listing}[2][]{
+ noparskip,
+ breakable,
+ colback=white,
+ colframe=black,
+ opacitybacktitle=.8,%
+ fonttitle=\bfseries,
+ title={Listing~\thetcbcounter. #1},
+ arc=0pt,
+ outer arc=0pt,
+ boxrule=1pt,
+ listing and text,
+ #2}
+\usepackage{erw-l3}
+\usepackage{hyperref} %^^A comes last
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -210,1578 +146,828 @@ erw-l3.sty, and erw-l3.pdf.
% \fi
%
% \GetFileInfo{\jobname.sty}
-% \begin{documentation}
-% \title{The \pkg{erw-l3} package \thanks{^^A
-% This file describes version \fileversion, last revised \filedate.^^A
+% \title{The \pkg{erw-l3} package\thanks{^^A
+% This file describes version \fileversion, last revised \filedate.^^A
% }^^A
% }
-% \author{Erwann Rogard\thanks{firstname dot lastname AusTria gmail dot com}}
-%
-% \date{Released \filedate}
-%
-% \maketitle
-% \begingroup
-% \selectlanguage{english}
-% \begin{docabstract}{Abstract}
-% Utilities for \LaTeX3 programming\cite{interface3}.
-% \end{docabstract}
-% \endgroup
-%
-% \tableofcontents
-%
-% \part{Usage}\label{part:usage}
-% ^^A \VerbatimFootnotes
-%
-% \DocPhantomSection*{section}{Loading the package}{usage:load}
-% \begin{function}{\usepackage}
-% \begin{syntax}
-% \cs{usepackage}\doceval{\pkg{\jobname}}
-% \end{syntax}
-% \begin{description}
-% \item[Requirement]\docfillblank
-% \begin{enumerate}
-% \item \file{\jobname.sty} and its dependencies are in the path of the \LaTeX~engine. See \autoref{part:other}, \autoref{other:support}.
-% \item Goes in the~\docccept{\doccceptpre}
-% \end{enumerate}
-% \end{description}
-% \end{function}
-%
-% \section{\textsf{cs}}\label{usage:cs}
-% \begin{function}{\erw_cs_compose:NnN}
-% \begin{syntax}
-% \cs{erw_cs_compose:NnN}\meta{\doccceptcs}\Arg{\doccceptitems}\meta{\docccepttlvar}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_cs_identity:n}
-% \begin{syntax}
-% \cs{erw_cs_identity:n}\Arg{arg}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_cs_set_inline:Nn, \erw_cs_set_inline:cn, \erw_cs_gset_inline:Nn, \erw_cs_set_inline:cn}
-% \begin{syntax}
-% \cs{erw_cs_set_inline:Nn}\meta{\doccceptcs}\Arg{\doccceptcode}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{csint}}
-% \begin{function}{\erw_csint:nn}
-% \begin{syntax}
-% \cs{erw_csint:nn}\Arg{\doccceptint}\Arg{arg}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_csint_name:n}
-% \begin{syntax}
-% \cs{erw_csint_name:n}\Arg{\doccceptint}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_csint_names_braced:, \erw_csint_names_braced:n, \erw_csint_names_braced:nnn}
-% \end{function}
-% \begin{function}{\erw_csint_new:n}
-% \begin{syntax}
-% \cs{erw_csint_new:n}\Arg{\doccceptint}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_csint_reset:}
-% \begin{syntax}
-% \cs{erw_csint_reset:}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{int}} \label{usage:int}
-% \begin{function}{\erw_int_range:n, \erw_int_range:nn}
-% \begin{syntax}
-% \cs{erw_int_range:n}\Arg{\doccceptint}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{keys}} \label{usage:keys}
-% \begin{function}{\erw_keyval_parse:NNNn}
-% \begin{syntax}
-% \cs{erw_keyval_parse:NNNn} \meta{\doccceptcont}\meta{\doccceptcs_1}\meta{\doccceptcs_2}\doceval{\doceval{\meta\docccepttl_1}\dots}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_keyval_error:Nn, \erw_keyval_error:Nnn}
-% \begin{syntax}
-% \cs{erw_keyval_error:Nn}\meta{\docccepttok}\Arg{\doccceptkvl}\\
-% \cs{erw_keyval_error:Nnn}\meta{\docccepttok}\Arg{\doccceptclist}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{lambda}} \label{usage:lambda}
-% \begin{function}{\erw_lambda:nnn}
-% \begin{syntax}
-% \cs{erw_lambda:nnn}\meta{\docccepttok}\Arg{\doccceptargspec}\Arg{\doccceptcode}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{option}}\label{usage:option}
-% \begin{function}{\erw_option:n}
-% \begin{syntax}
-% \cs{erw_option:n}\Arg{\doccceptkvl}
-% \end{syntax}
-% \end{function}
-%
-% \DescribeOption{tl / fold_set_par}
-% \DescribeOption{tl / fold_apply_par}
-% \DescribeOption{sys / timestamp_delim}
-%
-% \section{\textsf{prop}}\label{usage:prop}
-% All functions that modify a \meta{\doccceptprop} first create it if not exist.
-%
-% \begin{function}{\erw_prop_keyval_parse:NNNn}
-% \begin{syntax}
-% \cs{erw_prop_keyval_parse:NNNn}\meta{\doccceptprop}\meta{\doccceptcs_1}\meta{\doccceptcs_2}\Arg{\doccceptkvl}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_prop_map_item:NNN}
-% \begin{syntax}
-% \cs{erw_prop_map_item:NNN}\meta{\doccceptcs}\meta{\doccceptprop_1}\meta{\doccceptprop_2}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_prop_to_clist:Nn}
-% \begin{syntax}
-% \cs{erw_prop_to_clist:Nn}\meta{\doccceptprop}\doceval{\meta{\doccceptkey_1},\dots}
-% \end{syntax}
-% \end{function}
-%
-%
-% \section{\textsf{seq}}\label{usage:seq}
-% All functions that modify a \meta{\doccceptseq} first create it if not exists.
-% \begin{function}{\erw_seq_fold:NN,\erw_seq_fold:cN}
-% \begin{syntax}
-% \cs{erw_seq_fold:NN}\Arg{\Arg{\doccceptcs_1}\dots}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_seq_put_right_clist:Nn, \erw_seq_put_right_clist:cn}
-% \begin{syntax}
-% \cs{erw_seq_put_right_clist:Nn}\meta{\doccceptseq}\Arg{\doccceptclist}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_seq_put_right_prop:NNn}
-% \begin{syntax}
-% \cs{erw_seq_put_right_prop:NNn}\meta{\doccceptseq}\meta{\doccceptprop}\Arg{\doccceptclist}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_seq_use:Nn}
-% \begin{syntax}
-% \cs{erw_seq_use:Nn}\meta{\doccceptseq}\Arg{\doccceptitems}
-% \end{syntax}
-% \begin{description}
-% \item[Also see] \cite[Section 8 of \pkg{l3seq}]{interface3}
-% \item[Semantics] \cs{seq_use:Nnnn}\meta{\doccceptseq}\nameref{usage:tl:sep}\Arg{\doccceptitems}
-% \end{description}
-% \end{function}
-%
-% \section{\textsf{sys}}\label{usage:sys}
-% \begin{function}{\erw_sys_jobnametimestamp:nn,\erw_sys_jobnametimestamp:}
-% \begin{syntax}
-% \cs{erw_sys_jobnametimestamp:nn}\doceval{date\docpipe{}time\docpipe{}datetime}\doceval{10\docpipe{}16}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_sys_timestamp:nn,\erw_sys_timestamp:}
-% \begin{syntax}
-% \cs{erw_sys_timestamp:nn}\doceval{date\docpipe{}time\docpipe{}datetime}\doceval{10\docpipe{}16}
-% \end{syntax}
-% \begin{description}
-% \item[Semantics] Timestamp in base 10 or 16
-% \end{description}
-% \end{function}
-% \begin{function}{\erw_sys_timestamp_delimiter:}
-% \begin{syntax}
-% \cs{erw_sys_timestamp_delimiter:}
-% \end{syntax}
-% \end{function}
-%
-% \section{\textsf{tl}}
-% All functions that modify a \meta{\docccepttl} first create it if not exist.
-% \begin{function}{\erw_tl_append_item:nn}
-% \begin{syntax}
-% \cs{erw_tl_append_item:nn}\Arg{arg list}\Arg{arg}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_fold:NN, \erw_tl_fold:cN}
-% \begin{syntax}
-% \cs{erw_tl_fold:NN}\meta{\doccceptcs}\meta{\docccepttlvar}
-% \end{syntax}
-% \end{function}
-% \DocPhantomSection{subsection}{\cs{erw_tl_gset_function:n}}{usage:tl:function}
-% \begin{function}{\erw_tl_gset_function:N, \erw_tl_gset_function:n}
-% \begin{syntax}
-% \cs{erw_tl_gset_function:n}\Arg{\doccceptcode}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_join:nn, \erw_tl_join:nnn, \erw_tl_join:nnnn, \erw_tl_join:nnnnn}
-% \begin{syntax}
-% \cs{erw_tl_join:nn}\Arg{\docccepttl_{1}}\Arg{\docccepttl_{2}}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_last_item:n}
-% \begin{syntax}
-% \cs{erw_tl_last_item:n}\Arg{\docccepttl}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_map:n, \erw_tl_map:Nn}
-% \begin{syntax}
-% \cs{erw_tl_map:n}\Arg{\doccceptitems}
-% \end{syntax}
-% \begin{description}
-% \item[Semantics] Maps over \meta{\doccceptitems} using the internal function set by \nameref{usage:tl:function}
-% \end{description}
-% \end{function}
-% \begin{function}{\erw_tl_map_inline:nn }
-% \begin{syntax}
-% \cs{erw_tl_map_inline:nn}\Arg{\doccceptcode}\Arg{\doccceptitems}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_map_thread:Nn}
-% \begin{syntax}
-% \cs{erw_tl_math_thread:Nn}\meta{\doccceptcs}\doceval{\meta{\doccceptitems}}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_map_thread_at:Nnn}
-% \begin{syntax}
-% \cs{erw_tl_math_thread_at:Nnn}\Arg{\doccceptint{}}\Arg{\docccepttl}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_repeat:nn}
-% \begin{syntax}
-% \cs{erw_tl_repeat:nn}\Arg{\doccceptint{}}\Arg{\docccepttl}
-% \end{syntax}
-% \end{function}
-% \begin{function}{\erw_tl_split:nnn, \erw_tl_split:nn}
-% \begin{syntax}
-% \cs{erw_tl_split:nn}\Arg{\doccceptitems}\Arg{delimiter}
-% \end{syntax}
-% \end{function}
-% \DocPhantomSection{subsection}{\cs{erw_tl_separators:n}}{usage:tl:sep}
-% \begin{function}{\erw_tl_separators:n}
-% \begin{syntax}
-% \cs{erw_tl_separators:n}\Arg{\doccceptitems}
-% \end{syntax}
-% \begin{description}
-% \item[Semantics] According to the count of \meta{\doccceptitems}:
-% \begin{enumerate}[label=\emph{\arabic*)}]
-% \item \Arg{\docccepttl_1}\Arg{\docccepttl_1}\Arg{\docccepttl_1}
-% \item \Arg{\docccepttl_1}\Arg{\docccepttl_2}\Arg{\docccepttl_1\docccepttl_2}
-% \item \Arg{\docccepttl_1}\Arg{\docccepttl_2}\Arg{\docccepttl_3}
-% \end{enumerate}
-% \end{description}
-% \end{function}
-% \clearpage
+% \begin{documentation}
+% \maketitle
+% \begin{abstract}
+% Utilities based on \LaTeX3\cite{interface3}, such as \cs{erw_merge_sort:nNn}.
+% \end{abstract}
+% \tableofcontents
+% \part{Usage}
+% \section{\textsf{boilerplate}}
+% \begin{function}{\erw_keys_set:n,\erw_keys_set:nn}
+% \cs{erw_keys_set:n}\Arg{keyval list}
+% \end{function}
+% \begin{function}[EXP]
+% {\erw_identity:n,
+% \erw_int_incr:n,
+% \erw_swap:nn,
+% \erw_swap:ne,
+% \erw_name_signature_cs:N}
+% \end{function}
+% \section{\textsf{quark}}
+% \begin{function}
+% {\erw_all_q:w,
+% \erw_remove_first_q:w,
+% \erw_first_q:w,
+% \erw_remove_last_q:w,
+% \erw_last_q:w}
+% \begin{syntax}
+% \cs{erw_remove_last_q:w}\meta{tokenlist} \cs[no-index]{q_recursion_tail}\cs[no-index]{q_recursion_stop}
+% \end{syntax}
+% \end{function}
+% \section{\textsf{predicate}}
+% \begin{function}{new_compare_p}
+% \cs{erw_keys_set:n}|{ new_compare_p = |\Arg{name}\Arg{signature}\Arg{predicate}| }|
+% \begin{descr}
+% \item[Instance]\docfillblank
+% \begin{descr}
+% \item[erw_compare_p:nNnNn]
+% \item[erw_int_incr_p:nn]
+% \end{descr}
+% \end{descr}
+% \end{function}
+% \section{\textsf{op's on lists}}
+% \begin{function}
+% {\erw_remove_first:n,
+% \erw_remove_last:n,
+% \erw_first:n,
+% \erw_last:n,
+% \erw_adjacent_insert:nn,
+% \erw_adjacent_insert:en}
+% \end{function}
+% \section{\textsf{algo}}
+% \begin{function}
+% {\erw_split_even:n,
+% \erw_split_even:e,
+% \erw_merge_sort:nNn,
+% \thread_sort:nnNn,
+% \erw_filter_uniq:nn,
+% \erw_filter_uniq:n
+% }
+% \begin{syntax}
+% \cs{erw_thread_sort:nnNn}\Arg{first sorted list}\Arg{second sorted list}\Arg{compare predicate name}|<|\docpipe|>|
+% \cs{erw_merge_sort:nNn}\Arg{compare predicate name}|<|\docpipe|>|\Arg{unsorted list}
+% \cs{erw_filter_uniq:nn}\Arg{compare predicate}\Arg{tokenlist}
+% \cs{erw_filter_uniq:n}\Arg{ascending intergers}
+% \end{syntax}
+% \end{function}
+% \section{\textsf{code}}
+% \begin{function}{\erw_parameter:n,
+% \erw_parameter:nn,\argument:nn,}
+% \begin{syntax}
+% \cs{erw_parameter:n}\Arg{arity}
+% \cs{erw_parameter:nn}\Arg{start pos}\Arg{arity}
+% \cs{erw_argument:nn}\Arg{start pos}\Arg{signature}
+% \end{syntax}
+% \end{function}
%
-% \part{Listing}\label{part:listing}
-%
-% \newtcblisting[auto counter]
-% {listing}[2][]{
-% noparskip,
-% breakable,
-% colback=white,
-% colframe=black,
-% opacitybacktitle=.8,%
-% fonttitle=\bfseries,
-% title={Listing~\thetcbcounter. #1},
-% arc=0pt,
-% outer arc=0pt,
-% boxrule=1pt,
-% listing and text,
-% #2}
-%
-% \section{\textsf{constants}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:const}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:const, listing and text}
- \ExplSyntaxOn
- \seq_const_from_clist:Nn \foo_seq{ A, B, C }
- \prop_const_from_keyval:Nn \foo_prop{ A = a, B = b, C = c }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{cs}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:cs:compose}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:cs:compose, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn \__foo:n { f(#1) }
- \cs_set:Nn \__bar:n { g[#1] }
- \cs_set:Nn \__baz:n { h\{#1\} }
- \tl_set:Nn \l_tmpa_tl{ X }
- \erw_cs_compose:NnN \erw_tl_fold:NN{ {\__baz:n}{\__bar:n}{\__foo:n} }\l_tmpa_tl
- \tl_use:N \l_tmpa_tl
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:cs:compose:c}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:cs:compose:c, listing and text}
- \ExplSyntaxOn
- \tl_map_function:nN { {f(#1)} {g[#1]} {h\{#1\}} }\erw_csint_new:n
- \tl_set:Nn \l_tmpa_tl{X}
- \exp_args:NNx
- \erw_cs_compose:NnN \erw_tl_fold:cN
- {\erw_csint_names_braced:nnn{ 1 }{ 1 }{ 3 }}
- \l_tmpa_tl
- \tl_use:N \l_tmpa_tl
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{csint}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:csint}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:csint, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn\__foo:n{ f(#1) }
- \cs_set:Nn\__baz:n{ h\{#1\} }
- \tl_map_function:nN { {\__foo:n} {g[#1]} {\__baz:n} }\erw_csint_new:n
- \erw_csint:nn{1}{X},\
- \erw_csint:nn{2}{X},\
- \erw_csint:nn{3}{X}.
- \erw_csint_reset:
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{int}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:int:range}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:int:range, listing and text}
- \ExplSyntaxOn
- \erw_int_range:nn{ 2 }{ 5 }\\
- \erw_int_range:n{ 5 }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{lambda}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:lambda}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:lambda, listing and text}
- \ExplSyntaxOn
- \tl_set:Nn \l_tmpa_tl
- {
- \erw_lambda:nnn \DeclareDocumentCommand{ m }{ Hello,~#1! }
- }
- \l_tmpa_tl{ world }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{prop}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:prop:map}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:prop:map, listing and text}
- \ExplSyntaxOn
- \erw_prop_map_item:NNN \prop_put:Nnx \baz_prop \foo_prop
- \prop_if_exist:NTF\baz_prop{T}{F}\\
- \prop_item:Nn \baz_prop{ A }
- ,\prop_item:Nn \baz_prop{ B }
- ,\prop_item:Nn \baz_prop{ C }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:prop:put:keyval}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:prop:put:keyval, listing and text}
- \ExplSyntaxOn
- \erw_prop_keyval_parse:NNNn
- \foo_prop
- \erw_keyval_error:Nn
- \prop_put:Nnn{ X = x, Y = y, Z = z}
- \prop_item:Nn \foo_prop{ X }
- ,\prop_item:Nn \foo_prop{ Y }
- ,\prop_item:Nn \foo_prop{ Z }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}{\ref{listing:prop:clist}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:prop:clist, listing and text}
- \ExplSyntaxOn
- \erw_prop_to_clist:Nn \foo_prop{ A, B, C }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{seq}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:seq:fold}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:seq:fold, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn \__foo:n { f(#1) }
- \cs_set:Nn \__bar:n { g[#1] }
- \cs_set:Nn \__baz:n { h\{#1\} }
- \seq_new:N \l_tmp_seq
- \seq_put_right:Nn \l_tmp_seq{X}
- \erw_cs_compose:NnN \erw_seq_fold:NN{ {\__baz:n}{\__bar:n}{\__foo:n} }\l_tmp_seq
- \seq_item:Nn \l_tmp_seq{ 1 }\\
- \seq_item:Nn \l_tmp_seq{ 2 }\\
- \seq_item:Nn \l_tmp_seq{ 3 }\\
- \seq_item:Nn \l_tmp_seq{ 4 }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:seq:fold:c}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:seq:fold:c, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn \__foo:n { f(#1) }
- \cs_set:Nn \__bar:n { g[#1] }
- \cs_set:Nn \__baz:n { h\{#1\} }
- \seq_put_right:Nn \l_tmpa_seq{X}
- \erw_cs_compose:NnN \erw_seq_fold:cN{ {__baz:n}{__bar:n}{__foo:n} }\l_tmpa_seq
- \seq_item:Nn \l_tmpa_seq{ 1 }\\
- \seq_item:Nn \l_tmpa_seq{ 2 }\\
- \seq_item:Nn \l_tmpa_seq{ 3 }\\
- \seq_item:Nn \l_tmpa_seq{ 4 }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:seq:prop}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:seq:prop, listing and text}
- \ExplSyntaxOn
- \erw_seq_put_right_prop:NNn \bar_seq\foo_prop{ A, B, C }
- \seq_use:Nn\bar_seq{,}
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:seq:use}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:seq:use, listing and text}
- \ExplSyntaxOn
- \seq_put_right:Nn\l_tmpa_seq{ A }
- \seq_put_right:Nn\l_tmpa_seq{ B }
- \erw_seq_use:Nn \l_tmpa_seq{ {~and~} }\\
- \erw_seq_use:Nn \l_tmpa_seq{ {,\ }{~and~} }\\
- \erw_seq_use:Nn \l_tmpa_seq{ {~and~}{,\ }{,~and~} }\\[1em]
- \seq_put_right:Nn\l_tmpa_seq{ C }
- \erw_seq_use:Nn \l_tmpa_seq{ {~and~} }\\
- \erw_seq_use:Nn \l_tmpa_seq{ {,\ }{and~} }\\
- \erw_seq_use:Nn \l_tmpa_seq{ {~and~}{,\ }{,~and~} }\\
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{sys}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:sys:alone}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:sys:alone, listing and text}
- \ExplSyntaxOn
- \noindent\erw_sys_timestamp:nn{date}{10}{-}
- \noindent\erw_sys_timestamp:nn{time}{10}\\
- \noindent\erw_sys_timestamp:nn{datetime}{10}\\
- \erw_sys_timestamp:nn{date}{16}{\%}
- \erw_sys_timestamp:nn{time}{16}\\
- \erw_option:n{ sys / timestamp_delim = {\%} }
- \erw_sys_timestamp:nn{datetime}{16}\\
- \erw_sys_jobnametimestamp:
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:sys:iow}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:sys:iow, listing and text}
- \ExplSyntaxOn
- \erw_option:n{ sys / timestamp_delim = \c_empty_tl }
- \iow_new:N \foo_iow
- \tl_set:Nx \foo_dec { \erw_sys_timestamp:nn{datetime}{10} }
- \tl_set:Nx \foo_hex { \erw_sys_timestamp: }
- \iow_open:Nn \foo_iow{ \foo_hex }
- \iow_now:Nn\foo_iow{ Hello,\ world! }
- \iow_close:N \foo_iow
- D:\foo_dec\\
- \file_timestamp:n{ \foo_hex }\\
- \file_input:n{ \foo_hex }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \section{\textsf{tl}}
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:tl:fold}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:tl:fold, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn \__foo:n { f(#1) }
- \tl_set:Nn \l_tmpa_tl{ X }
- \erw_tl_fold:NN\__foo:n\l_tmpa_tl
- \l_tmpa_tl\\
- \cs_set:Nn \__bar:n { g[#1] }
- \erw_tl_fold:cN {__bar:n}\l_tmpa_tl
- \l_tmpa_tl
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:tl:repeat}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:tl:repeat, listing and text}
- \ExplSyntaxOn
- \erw_tl_repeat:nn{ 3 }{ x }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:tl:split}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:tl:split, listing and text}
- \ExplSyntaxOn
- \erw_tl_split:nn{ {a} {b} {c} }{ == }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:tl:map}.}
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:tl:map, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn \__foo:n { (#1) }
- \erw_tl_map:Nn \__foo:n{ {a}{b}{c} }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:tl:map:thread}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:tl:map:thread, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn \__foo:n { (#1) }
- \erw_tl_map_thread:Nn \__foo:n
- {
- { {a}{b}{c}{d}{e}{f} }
- }\\
- \cs_set:Nn\__foo:nn { (#1+#2) }
- \erw_tl_map_thread:Nn \__foo:nn
- {
- { {a}{b}{c}{d}{e}{f} }
- { {A}{B}{C}{D}{E}{F} }
- }\\
- \cs_set:Nn \__foo:nnn { (#1+#2+#3) }
- \erw_tl_map_thread:Nn \__foo:nnn
- {
- { {a}{b}{c}{d}{e}{f} }
- { {A}{B}{C}{D}{E}{F} }
- { {k}{l}{m}{n}{o}{p} }
- }\\
- \cs_set:Nn \__foo:nnnn { (#1+#2+#3+#4) }
- \erw_tl_map_thread:Nn \__foo:nnnn
- {
- { {a}{b}{c}{d}{e}{f} }
- { {A}{B}{C}{D}{E}{F} }
- { {k}{l}{m}{n}{o}{p} }
- { {K}{L}{M}{N}{O}{P} }
- }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-% \phantomsection\addcontentsline{toc}{subsection}
-% {\ref{listing:tl:map:thread:at}. }
-% \iffalse
-%<*guardlisting>
-% \fi
-\begin{listing}[]
- {label=listing:tl:map:thread:at, listing and text}
- \ExplSyntaxOn
- \cs_set:Nn\__foo:nn { (#1+#2) }
- \erw_tl_map_thread_at:Nnn \__foo:nn{ 2 }
- {
- { {a}{b}{c}{d}{e}{f} }
- { {A}{B}{C}{D}{E}{F} }
- }
- \ExplSyntaxOff
-\end{listing}
-% \iffalse
-%</guardlisting>
-% \fi
-%
-% \clearpage
-% \part{Other}\label{part:other}
-%
-% \section{Acknowledgment}\label{other:acknowl}
-%
-% This work has benefited from Q\&A's from the \LaTeX community\cite{user-erw}. \nameref{usage:lambda} originally appeared in \cite{a-188053}.
-%
-% \section{Install}\label{other:install}
-% \begin{enumerate}[label=\emph{\arabic*)}]
-% \item Compile \file{\jobname.dtx} (under Unix, \texttt{\$tex timestamp.dtx})
-% \item Put the generated \file{\jobname.sty} in the search path of the \LaTeX engine
-% \end{enumerate}
-%
+% \part{Other}
+% \section{Bibliograhy}
+% \printbibliography[heading=none]
% \section{Support}\label{other:support}
%
-% This package is available from \url{https://www.ctan.org/pkg/\jobname} and \url{https://github.com/rogard/\jobname}.
-%
-% \subsection{Platform}
-% \begin{enumerate}[label=\emph{\roman*)}]
-% \item
-% ^^A uname -a
-% \begin{Verbatim}[breaklines=true]
-% Linux laptop 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
-% \end{Verbatim}
-% \label{plat:lin}
-% \end{enumerate}
-%
-% \subsection{Engine}
-% \begin{enumerate}[label=\emph{\alph*)}]
-% \item
-% \begin{Verbatim}[breaklines=true]
-% pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019)
-% \end{Verbatim}
-% \label{eng:tlxviiii:pdf}
-% \item
-% \begin{Verbatim}[breaklines=true]
-% pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020)
-% \end{Verbatim}
-% \label{eng:tlxx:pdf}
-% \item
-% \begin{Verbatim}[breaklines=true]
-% LuaHBTeX, Version 1.12.0 (TeX Live 2020)
-% \end{Verbatim}
-% \label{eng:tlxx:lua}
-% \item
-% \begin{Verbatim}[breaklines=true]
-% XeTeX 3.14159265-2.6-0.999992 (TeX Live 2020)
-% \end{Verbatim}
-% \label{eng:tlxx:xe}
-% \end{enumerate}
-%
-% \subsection{Results}
-%
-% \begin{enumerate}[label=\emph{\arabic*)}]
-% \item \pkg{\jobname} \docvers{2}{0} compiles satisfactorily on platform \ref{plat:lin} and engines \ref{eng:tlxx:pdf}, \ref{eng:tlxx:lua}, and \ref{eng:tlxx:xe}
-% \end{enumerate}
-%
-% \DocPhantomSection*{section}{References}{other:bib}
-% \begin{thebibliography}{1}
-% \bibitem{interface3} The \LaTeX3 Project Team {\em The \LaTeX3 interfaces}, 2019,
-% \url{http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/l3kernel/interface3.pdf}
-% \bibitem{l3build} The \LaTeX3 Project Team {\em The \pkg{l3build} package}, 2020,
-% \url{http://mirror.utexas.edu/ctan/macros/latex/contrib/l3build/l3build.pdf}
-% \bibitem{a-188053} \href{https://tex.stackexchange.com/users/17423/sean-allred}{@{}sean-allred}'s answer to
-% ``How to create lambda expressions?'', \url{https://tex.stackexchange.com/a/188053/112708}
-% \bibitem{user-erw} \url{https://tex.stackexchange.com/users/112708/erwann?tab=questions}
-% \end{thebibliography}
-%
-% \section{To do}
-%
-% \begin{enumerate}[label=\emph{\alph*)}]
-% \item Regression testing using \cite[Section 3.2—Specifying expectations]{l3build}. \label{todo:regtest}
-% \end{enumerate}
-% Also see:
-% \begin{enumerate}[label=\emph{\alph*)}]
-% \setcounter{enumi}{1}
-% \item \env{NOTE} or \cs{NB} tagged \texttt{abandon\docpipe{}done\docpipe{}todo} inside \jobname|.dtx|
-% \end{enumerate}
-%
-% \changes{\docvers{1}{1}}{2018/05/23}{Brought all the modules under one file; renamed \pkg{l3erw} to \pkg{erw-l3};}
-% \changes{\docvers{1}{1}}{2018/05/23}{\cs{numbrdcsnew} changed to \cs{newnumbrdcs} and made 'disambiguable'}
-% \changes{\docvers{1}{1}}{2018/05/23}{\pkg{disambig}/backend: changes to the key, added \cs{ProcessPackageKeysOption};}
-% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_items_to}}
-% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_last_item}}
-% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_repeat}}
-% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{erw_split}}
-% \changes{\docvers{1}{2}}{2018/06/21}{Add: \cs{map_thread}}
-% \changes{\docvers{1}{2}}{2018/06/21}{Front end cmds no longer generated with module \pkg{disambig}; Option of the same name deleted;}
-% \changes{\docvers{1}{2}}{2018/06/21}{Rearrange: the doc to clearly separate frontend from backend}
-% \changes{\docvers{1}{2}}{2018/06/21}{Modify: \cs{erw_compose}, order in which functions composed ($g\circ f$ means $f$ comes before $g$)}
-% \changes{\docvers{1}{2}}{2018/06/21}{\pkg{disambig}: pushed the code inside \cs{keys_define};}
-% \changes{\docvers{1}{2}}{2018/06/21}{\pkg{disambig}: \cs{disambignewcmd} no longer takes a token name as arg, rather a token.}
-% \changes{\docvers{1}{3}}{2018/06/22}{Replace: versioning, should have been 0.1.2}
-% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_accum}}
-% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_int_range}}
-% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_is_matrix} (to check arg of \cs{erw_tl_map_thread:Nn})}
-% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_merge}}
-% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_set_map_inline}}
-% \changes{\docvers{1}{4}}{2018/06/22}{Add: \cs{erw_set_map}}
-% \changes{\docvers{1}{4}}{2018/06/22}{Remove: \doccs{erw_items_to} (redundant with \cs{tl_range:nnn})}
-% \changes{\docvers{1}{5}}{2019/12/12}{Modify: source repository}
-% \changes{\docvers{1}{5}}{2019/12/12}{Rearrange: frontend/backend sections}
-% \changes{\docvers{1}{5}}{2019/12/12}{Remove: \pkg{disambig}}
-% \changes{\docvers{1}{5}}{2019/12/12}{Split Section Preliminaries into Conventions and Requirement.}
-% \changes{\docvers{1}{6}}{2020/02/05}{Fix: critical bug preventing \pkg{erw-l3} from working without explicit inclusion of \pkg{expl3}}
-% \changes{\docvers{1}{7}}{2020/04/24}{Add: \nameref{impl:option}}
-% \changes{\docvers{1}{7}}{2020/04/24}{Add: \nameref{impl:sys}}
-% \changes{\docvers{1}{7}}{2020/04/24}{Move: \cs{erw_fold_apply_par:n}}
-% \changes{\docvers{1}{7}}{2020/04/24}{Move: \cs{erw_fold_set_par:n}}
-% \changes{\docvers{1}{7}}{2020/04/24}{(deleted)}
-% \changes{\docvers{1}{7}}{2020/04/24}{Remove: \doccs{numbrdcsnew}, \doccs{numbrdcs}}
-% \changes{\docvers{1}{7}}{2020/04/24}{Rename: variables with suffix |tl| get 'private mode' prexif in pl. of |\__erw| }
-% \changes{\docvers{1}{7}}{2020/04/24}{Rename: |csnum| to |csint| }
-% \changes{\docvers{1}{7}}{2020/04/24}{Rename: |numbrd_cs| to |csnum| }
-% \changes{\docvers{1}{7}}{2020/04/24}{Replace: listing's implem with that of \pkg{tocloft}}
-% \changes{\docvers{1}{7}}{2020/04/24}{Replace: vers. numb. from 3 to 2 digits}
-% \changes{\docvers{1}{8}}{2020/04/24}{Add: \env{function} for all frontend functions.}
-% \changes{\docvers{1}{8}}{2020/04/30}{Remove: \doccs{erw_cs_set_eq:NN} and variants}
-% \changes{\docvers{1}{8}}{2020/04/30}{Remove: \doccs{erw_is_matrix:n} (predicate must be expandable)}
-% \changes{\docvers{1}{8}}{2020/04/30}{Rename: all cs prefixes to agree with heading under which they come, e.g. \cs{erw_identity:n} by \cs{erw_cs_identity:n} }
-% \changes{\docvers{1}{8}}{2020/04/30}{(deleted)}
-% \changes{\docvers{1}{8}}{2020/04/30}{Replace: \cs{erw_seq_fold:NN} by \cs{erw_oper_fold_seq:NN} and likewise for variants}
-% \changes{\docvers{1}{8}}{2020/04/30}{(deleted)}
-% \changes{\docvers{1}{9}}{2020/05/01}{Add: \cs{erw_sys_timestamp_delimiter:}}
-% \changes{\docvers{1}{9}}{2020/05/01}{Add: \cs{erw_tl_join:nn} and variants}
-% \changes{\docvers{1}{9}}{2020/05/01}{Rename: \cs{erw_append_arg:nn} to \cs{erw_tl_append_item:nn}}
-% \changes{\docvers{1}{9}}{2020/05/01}{Rename: \cs{erw_oper_gset_function:N} to \cs{erw_tl_gset_function:N} (and variants)}
-% \changes{\docvers{1}{9}}{2020/05/01}{Rename: prefix |timestamp| by |sys|}
-% \changes{\docvers{2}{0}}{2020/05/01}{Add: \cs{erw_jobnametimestamp:nn} and variants}
-% \changes{\docvers{2}{0}}{2020/05/01}{Remove: \doccs{merge:nn} (redundant with \cs{erw_join:nn})}
-% \changes{\docvers{2}{0}}{2020/05/01}{Rename: \docvers{0}{0} to \docvers{1}{0}, etc.}
-% \changes{\docvers{2}{1}}{2020/05/09}{Add: \cs{erw_prop_to_clist:Nn}, \cs{erw_prop_put:NN}, and \cs{erw_prop_put:Nnn}}
-% \changes{\docvers{2}{1}}{2020/05/09}{Add: \cs{erw_seq_from_clist:Nn}, \cs{erw_seq_from_prop:NNn}, and \cs{erw_seq_put_right:Nn}}
-% \changes{\docvers{2}{1}}{2020/05/09}{(delete)}
-% \changes{\docvers{2}{1}}{2020/05/09}{Replace: \cs{erw_seq_fold:NN} by \cs{__erw_seq_fold:NN}}
-% \changes{\docvers{2}{2}}{2020/05/18}{Add: \cs{erw_seq_use:Nn}}
-% \changes{\docvers{2}{2}}{2020/05/18}{Add: \cs{erw_tl_separators:n}}
-% \changes{\docvers{2}{3}}{2020/05/20}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{csnset}}
-% \changes{\docvers{2}{3}}{2020/05/20}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{keyval/\dots}}
-% \changes{\docvers{2}{3}}{2020/05/20}{Fix: 'mark as private code' (hiherto unnoticed)}
-% \changes{\docvers{2}{3}}{2020/05/20}{Modify: behavior of \cs{erw_seq_use:Nn}}
-% \changes{\docvers{2}{3}}{2020/05/20}{Move: all \cs{msg_new:Nnnn} statements under same heading}
-% \changes{\docvers{2}{4}}{2020/05/21}{Add: \cs{erw_lambda:nnn}}
-% \changes{\docvers{2}{5}}{2020/05/22}{Add: \cs{erw_prop_put_keyval:Nn}}
-% \changes{\docvers{2}{6}}{2020/05/22}{Add: \cs{erw_keyval_parse:NNNn}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_cs_error:nn}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_cs_error:n}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_prop_keyval_parse:NNNn}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{erw_prop_map_item:NNN} }
-% \changes{\docvers{2}{6}}{2020/05/23}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{varnset}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \doccs{erw_cs_apply}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \doccs{erw_prop_put:NN} }
-% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \doccs{erw_prop_put_keyval:Nn} }
-% \changes{\docvers{2}{6}}{2020/05/23}{Remove: \cs{msg_new:nnn}, module \texttt{erw}, messages: \texttt{keyval/\dots}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Rename: \textsf{basics} to \nameref{usage:cs}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Replace: \cs{erw_seq_from_clist} by \cs{erw_seq_put_right_clist}}
-% \changes{\docvers{2}{6}}{2020/05/23}{Replace: \cs{erw_seq_from_prop} by \cs{erw_seq_put_right_prop}}
-% \changes{\docvers{2}{7}}{2020/05/23}{Remove: \doccs{erw_cs_error:n} }
-% \changes{\docvers{2}{7}}{2020/05/23}{Remove: \doccs{erw_cs_error:nn} }
-% \changes{\docvers{2}{7}}{2020/05/23}{Add: \cs{erw_keyval_error:Nn} }
-% \changes{\docvers{2}{7}}{2020/05/23}{Add: \cs{erw_keyval_error:Nnn} }
-% \changes{\docvers{2}{8}}{2020/05/24}{Add: \cs{msg_new:nnn}\doceval{erw}\doceval{notset}}
-% \changes{\docvers{2}{8}}{2020/05/24}{Remove: \cs{msg_new:nnn}\doceval{erw}\doceval{csnset}}
-% \changes{\docvers{2}{8}}{2020/05/24}{Remove: \cs{msg_new:nnn}\doceval{erw}\doceval{varnset}}
-% \changes{\docvers{2}{9}}{2020/05/27}{Add: \cs{erw_seq_fold:NN}, \cs{erw_seq_fold:cN}}
-% \changes{\docvers{2}{9}}{2020/05/27}{Add: \cs{erw_cs_compose:NnN}}
-% \changes{\docvers{2}{9}}{2020/05/27}{Remove: \doccs{erw_seq_compose:nN},\doccs{erw_seq_compose_c:nN},\doccs{erw_seq_compose_vers:nN}}
-% \changes{\docvers{2}{9}}{2020/05/27}{Remove:
-% \doccs{erw_tl_compose:nN},
-% \doccs{erw_tl_compose:Nnn},
-% \doccs{erw_tl_compose:nn},
-% \doccs{erw_tl_compose_c:nN},
-% \doccs{erw_tl_compose_c:nn},
-% \doccs{erw_tl_compose_vers:nN},
-% \doccs{erw_tl_compose_vers:nn}
-% }
-% \changes{\docvers{2}{9}}{2020/05/27}{Rename: \texttt{oper / fold_set_par} to \texttt{tl / fold_set_par} }
-% \changes{\docvers{2}{9}}{2020/05/27}{Rename: \texttt{oper / fold_apply_par} to \texttt{tl / fold_apply_par} }
-% \changes{\docvers{3}{0}}{2020/06/03}{Fix: warning \pkg{csquotes}+\pkg{fvextra} }
-% \changes{\docvers{3}{1}}{2020/06/04}{Miscellaneous}
-% \PrintChanges
-% \PrintIndex
-% \clearpage
+% This package is available from \url{https://github.com/rogard/erw-l3}.
+% \changes{v4.0}{2022/01/27}
+%{Replacing 3.2 altogether (not used by any packages but mine that have been updated accordingly}
+% \changes{v4.1}{2022/01/27}
+% {Removed commented portion labeled trash (thread), code_analyze, erw_compare_recurse_p:nnN[N], and keyval, as not used.}
+% \changes{v4.2}{2022/01.28}
+% {Removed \cs[no-index]{__erw_keyval_dispatch_build:nn}}
% \StopEventually{
-% ^^A \PrintChanges
-% ^^A \PrintIndex
+% \clearpage
+% \PrintChanges
+% \PrintIndex %^^A https://tex.stackexchange.com/q/610349/112708
% }
-% \end{documentation}
-% \begin{implementation}
-% \part{Implementation}\label{part:impl}
-%
-% \section{Opening}
+%^^A%
+% \end{documentation}
+% \begin{implementation}
+% \part{Implementation}\label{part:impl}
% \begin{macrocode}
%<*package>
%<@@=erw>
% \ExplSyntaxOn
% \end{macrocode}
-% \section{\textsf{cs}}
-% \label{impl:cs}
-% \subsection{backend}
-% \begin{macrocode}
-\cs_new:Nn \@@_cs_name:N
-{
- \exp_last_unbraced:Nf \use_i:nnn {\cs_split_function:N #1}
-}
-% \end{macrocode}
-% \subsection{frontend}\label{basics:frontend}
-% \begin{macro}{\erw_cs_compose:NnN}
-% \begin{macrocode}
-\cs_new:Nn \erw_cs_compose:NnN
-{
- \erw_cs_set_inline:Nn \g@@_tl_function:n
- {
- #1{##1}#3
- }
- \exp_args:Nf\erw_tl_map:n
- {
- \tl_reverse:n{#2}
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_cs_identity:n}
-% \begin{macrocode}
-\cs_set:Npn \erw_cs_identity:n #1{#1}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_cs_set_inline:Nn, \erw_cs_gset_inline:Nn}
-% \begin{macrocode}
-\cs_new_protected:Nn \erw_cs_set_inline:Nn
-{
- \cs_set:Npn #1 ##1{#2}
-}
-\cs_generate_variant:Nn \erw_cs_set_inline:Nn {cn}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_cs_gset_inline:Nn}
-% \begin{macrocode}
-\cs_new:Nn \erw_cs_gset_inline:Nn
-{
- \cs_gset:Npn #1 ##1{#2}
-}
-\cs_generate_variant:Nn \erw_cs_gset_inline:Nn {cn}
-% \end{macrocode}
-% \end{macro}
-% \section{\textsf{csint}}
-% \label{impl:csint}
-% \subsection{backend}
-% \begin{macrocode}
-\int_new:N \g@@_csint_int
-\cs_new:Nn \@@_csint_name: {\erw_csint_name:n{\g@@_csint_int}}
-% \end{macrocode}
-% \subsection{frontend}
-% \begin{macro}{\erw_csint:nn}
-% \begin{macrocode}
-\cs_new:Nn \erw_csint:nn
-{
- \exp_args:No \use:c{\erw_csint_name:n{#1}}{#2}
-}
-% \end{macrocode}
-% \end{macro}
-%^^A% \begin{macro}{\erw_csint_list:nnn}%^^A TODO
-%^^A% \begin{macrocode}
-%^^A\cs_new:Nn \erw_csint_list:nnn
-%^^A{
-%^^A \int_step_inline:nnnn { #1 }{ #2 }{ #3 }
-%^^A {
-%^^A { \exp_args:No \use:c{\erw_csint_name:n{##1}} }
-%^^A }
-%^^A}
-%^^A% \end{macrocode}
-%^^A% \end{macro}
-% \begin{macro}{\erw_csint_name:n}
-% \begin{macrocode}
-\cs_new:Nn \erw_csint_name:n {@@_csint_\int_to_alph:n{#1}:n}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_csint_new:n}
-% \begin{macrocode}
-\cs_new_protected:Nn \erw_csint_new:n
-{
- \int_incr:N \g@@_csint_int
- \exp_args:No
- \erw_cs_set_inline:cn{\@@_csint_name:}
- {
- \token_if_cs:NTF
- {#1}
- {#1{##1}}
- {#1}
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_csint_names_braced:nnn,\erw_csint_names_braced:n,\erw_csint_names_braced:}
-% \begin{macrocode}
-\cs_new:Nn \erw_csint_names_braced:nnn
-{
- \int_step_function:nnnN { #1 }{ #2 }{ #3 } \erw_csint_names_braced:n
- % TODO \tl_range_braced:nnn?
-}
-\cs_new:Nn \erw_csint_names_braced:n {{\erw_csint_name:n{#1}}}
-\cs_new:Nn \erw_csint_names_braced:
-{
- \erw_csint_names_braced:nnn{1}{1}{\g@@_csint_int}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_csint_reset:}
-% \begin{macrocode}
-\cs_new_protected:Nn \erw_csint_reset:
-{
- \int_zero:N \g@@_csint_int
- \tl_set:Nn \@@_csint_ext_tl{}%^^A TODO remove?
-}
-% \end{macrocode}
-% \end{macro}
-% \section{\textsf{int}}
-% \label{impl:int}
-% \subsection{backend}
-% \begin{macrocode}
-\cs_set:Npn \@@_int_range:nnn #1 #2 #3
-{
- \int_compare:nNnTF
- {
- \int_eval:n{#2+1}
- }>{#3}
- {
- {#1}
- }
- {
- \@@_int_range:nnn
- {
- \exp_args:Nx\erw_tl_append_item:nn{#1}
- {
- \int_eval:n{#2+1}
- }
- }
- {\int_eval:n{#2+1}}
+% \section{\textsf{kernel}}
+% \begin{macrocode}
+\cs_generate_variant:Nn\int_compare_p:nNn{eNe}
+\cs_generate_variant:Nn\int_eval:n{e}
+\cs_generate_variant:Nn\prg_new_conditional:Nnn{c}
+\cs_generate_variant:Nn\prg_replicate:nn{e}
+\cs_generate_variant:Nn\regex_gset:Nn{c}
+\cs_generate_variant:Nn\regex_log:N{c}
+\cs_generate_variant:Nn\regex_match:NnTF{c}
+\cs_generate_variant:Nn\tl_to_str:n{e}
+\cs_generate_variant:Nn\prop_put:Nnn{Nne}
+% \end{macrocode}
+% \section{\textsf{boilerplate}}
+% \begin{macrocode}
+\msg_new:nnnn{@@}{text}{text~is~not~loaded}{load~amsmath}
+\cs_new:Npn \@@_text:n #1
+{\cs_if_exist:NTF\text{\text{#1}}{\msg_error:nn{@@}{text}}}
+\cs_new:Npn\@@_empty:w #1 \q_recursion_stop {\c_empty_tl}
+\cs_new_protected:Nn\erw_keys_set:n{ \keys_set:nn{@@}{#1} }
+\cs_new_protected:Nn\erw_keys_set:nn{ \keys_set:nn{@@ / #1}{#2} }
+\cs_generate_variant:Nn\erw_apply:Nw{c}
+\cs_new:Npn \erw_identity:n#1{#1}
+\cs_new:Npn \erw_int_incr:n#1{\int_eval:n{#1+1}}
+\cs_new:Npn \erw_swap:nn#1#2{#2#1}
+\cs_generate_variant:Nn \erw_swap:nn{e}
+\cs_new:Npn \erw_name_signature_cs:N #1
+{ \exp_last_unbraced:Ne
+ \@@_name_signature_cs:nnn{\cs_split_function:N#1}}
+\cs_new:Nn \@@_name_signature_cs:nnn{{#1}{#2}}
+% \end{macrocode}
+% \section{\textsf{quark}}
+% \begin{macrocode}
+\msg_new:nnn{erw}{quark-only-tail}
+{requires~tail;~got~'#1';~\msg_line_context:}
+\cs_new:Npn
+\erw_all_q:w
+#1
+\q_recursion_stop
+{%
+ \erw_remove_last_q:w#1\q_recursion_stop
+ \erw_last_q:w#1\q_recursion_stop
+}
+\cs_new:Npn
+\erw_remove_first_q:w
+#1 % <tokenlist ending with recursion tail>
+\q_recursion_stop
+{\quark_if_recursion_tail_stop:n{#1}
+ \@@_remove_first_q:nw#1\q_recursion_stop}
+\cs_new:Npn
+\@@_remove_first_q:nw
+#1 % <head>
+#2 % <rest>
+\q_recursion_stop
+{\erw_remove_last_q:w#2\q_recursion_stop
+ \erw_last_q:w#2\q_recursion_stop}
+\cs_new:Npn
+\erw_first_q:w
+#1
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop:n{#1}
+ \@@_first_q:enw{ \tl_if_head_is_group_p:n{#1}}#1\q_recursion_stop }
+\cs_new:Npn
+\@@_first_q:nnw
+#1 % <head is group>
+#2 % <head>
+#3 % <rest>
+\q_recursion_stop
+{%
+ \bool_if:nTF{#1}{{#2}}{#2}
+}
+\cs_generate_variant:Nn\@@_first_q:nnw{e}
+\cs_new:Npn
+\erw_remove_last_q:w #1 \q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop:n{#1}
+ \@@_remove_last_q:ew{\tl_if_head_is_group_p:n{#1}}#1\q_recursion_stop }
+\cs_new:Npn
+\@@_remove_last_q:nw
+#1 % <head is group>
+#2 % <tokenlist>
+\q_recursion_stop
+{ \@@_remove_last_q:nnw{#1}#2\q_recursion_stop }
+\cs_generate_variant:Nn\@@_remove_last_q:nw{e}
+\cs_new:Npn
+\@@_remove_last_q:nnw
+#1 % <head is group>
+#2 % <head>
+#3 % <rest>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop:n{#3}
+ \bool_if:nTF{#1}{{#2}}{#2}
+ \@@_remove_last_q:ew {\tl_if_head_is_group_p:n{#3}} #3 \q_recursion_stop
+}
+\cs_generate_variant:Nn\@@_remove_last_q:nnw{e}
+\cs_new:Npn
+\erw_last_q:w #1 \q_recursion_stop
+{\quark_if_recursion_tail_stop:n{#1}
+ \@@_last_q:ew{\tl_if_head_is_group_p:n{#1}}#1\q_recursion_stop}
+\cs_new:Npn
+\@@_last_q:nw
+#1 % <head is group>
+#2 % <tokenlist>
+\q_recursion_stop
+{ \@@_last_q:nnw{#1}#2\q_recursion_stop }
+\cs_generate_variant:Nn\@@_last_q:nw{e}
+\cs_new:Npn
+\@@_last_q:nnw
+#1 % <head is group>
+#2 % <head>
+#3 % <rest>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop_do:nn{#3}{ \bool_if:nTF{#1}{{#2}}{#2} }
+ \@@_last_q:ew {\tl_if_head_is_group_p:n{#3}} #3 \q_recursion_stop
+}
+\cs_generate_variant:Nn\@@_last_q:nnw{e}
+% \end{macrocode}
+% \section{\textsf{predicate}}
+% \begin{macrocode}
+\msg_new:nnn{@@}{predicate-empty}
+{empty~expression~in~predicate}
+\prg_new_conditional:Npnn
+\erw_and_tl:nn
+#1 % <predicate expression>
+#2 % <tokens>
+{p}
+{%^^A
+ \@@_and_tl:nw {#1}#2 \q_recursion_tail\q_recursion_stop
+}
+\cs_new:Npn
+\@@_and_tl:nw
+#1 % <predicate expression>
+#2 % <value>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop_do:nn{#2}
+ { \prg_return_true: }
+ \@@_and_tl:nnw
+ {#1} % <predicate expression>
+ #2 % <value>
+ \q_recursion_stop
+}
+\cs_new:Npn
+\@@_and_tl:nnw
+#1 % <predicate expression>
+#2 % <value>
+#3 % <rest>
+\q_recursion_stop
+{%
+ \bool_if:nTF
+ {#1{#2}}
+ {\@@_and_tl:nw{#1}#3\q_recursion_stop}
+ { \prg_return_false: }
+}
+\cs_new:Npn \@@_new_compare_p:nnn
+#1 % <name>
+#2 % <signature>
+#3 % <code>
+{%
+ \prg_new_conditional:cnn{#1:#2}
+ {p}
+ {%
+ \bool_if:nTF
{#3}
+ {\prg_return_true:}
+ {\prg_return_false:}
}
}
-% \end{macrocode}
-% \subsection{frontend}
-% \begin{macro}{\erw_int_range:nn, \erw_int_range:n }
-% \begin{macrocode}
-\cs_new:Nn \erw_int_range:nn
-{
- \@@_int_range:nnn {{#1}}{#1}{#2}
-}
-\cs_new:Nn \erw_int_range:n
-{
- \@@_int_range:nnn {}{0}{#1}
-% ^^A Alt to:
-% ^^A \int_step_inline:nn {#1}{##1}
-}
-% \end{macrocode}
-% \end{macro}
-% \section{\textsf{keys}}
-% \subsection{frontend}
-% \begin{macro}{\erw_keyval_error:Nn,\erw_keyval_error:Nnn}
-% \begin{macrocode}
-\cs_new:Nn \erw_keyval_error:Nn{\msg_error:nnnnn{@@}{keyval/n}{\erw_keyval_error:Nn}{#1}{#2}}
-\cs_new:Nn \erw_keyval_error:Nnn{\msg_error:nnnnnn{@@}{keyval/nn}{\erw_keyval_error:Nnn}{#1}{#2}{#3}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_keyval_parse:NNNn}
-% \begin{macrocode}
-\cs_new_protected:Nn\erw_keyval_parse:NNNn
-{
- \cs_set_protected:Nn \@@_keyval_function:n {#2 #1{##1}}
- \cs_set_protected:Nn \@@_keyval_function:nn {#3 #1{##1}{##2}}
- \keyval_parse:NNn
- \@@_keyval_function:n
- \@@_keyval_function:nn
- {#4}
-}
-% \end{macrocode}
-% \end{macro}
-% \section{\texttt{lambda}}
-% \begin{macro}{\erw_lambda:nnn}
-% \begin{macrocode}
-\cs_new_protected:Npn \erw_lambda:nnn #1 #2 #3
-{
- \exp_args:NNx
- #1 \@@_lambda_expression
- {#2}
- {#3}
- \@@_lambda_expression
-}
-% \end{macrocode}
-% \end{macro}
-% \section{\textsf{msg}}
-% \label{impl:msg}
-% \subsection{backend}
-% \begin{macrocode}
-\msg_new:nnn{@@}{generic}{#1}
-\msg_new:nnn{@@}{keyval/nn}{#1#2{#3}{#4};~encountered~key=val~where~only~key~required}
-\msg_new:nnn{@@}{keyval/n}{#1#2{#3};~encountered~key~~where~only~key=val~required}
-\msg_new:nnn{@@}{separ}{#1~expects~1~to~3~items,~#2}
-\msg_new:nnn{@@}{timestamp / base}{Calling~#1,~arg~must~be~'dec|hex'}
-\msg_new:nnn{@@}{timestamp / period}{Calling~#1,~arg~must~be~'date|time|datetime'}
-% \end{macrocode}
-% \subsection{frontend}
-% \begin{macrocode}
-\msg_new:nnn{erw}{notset}{#1~not~set}
-% \end{macrocode}
-% \section{\textsf{prop}}
-% \subsection{backend}
-% \begin{macrocode}
-\cs_new_protected:Nn \@@_prop_map_item:NNN
-{
- \cs_set_protected:Nn \@@_function:nn
- {
- #1 #2 {##1}{##2}
- }
- \prop_map_function:NN #3 \@@_function:nn
-}
-% \end{macrocode}
-% \subsection{frontend}
-% \begin{macro}{\erw_prop_to_clist:Nn}
-% \begin{macrocode}
-\cs_new_protected:Nn \erw_prop_to_clist:Nn
-{
- \cs_set:Nn \@@_keyval_function:n {,\prop_item:Nn#1{##1}}
- \exp_args:Nf
- \tl_tail:n
- {
- \keyval_parse:NNn
- \@@_keyval_function:n
- \erw_keyval_error:Nnn
- {#2}
- }
-}
-\cs_generate_variant:Nn \erw_prop_to_clist:Nn { c }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_prop_map_item:NNN}
-% \begin{macrocode}
-\cs_new_protected:Nn \erw_prop_map_item:NNN
-{
- \prop_if_exist:NTF #2
- {\@@_prop_map_item:NNN #1#2#3}
- {
- \prop_new:N #2
- \erw_prop_map_item:NNN #1#2#3
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\erw_prop_keyval_parse:NNNn}
-% \begin{macrocode}
-\cs_new_protected:Nn\erw_prop_keyval_parse:NNNn
-{
- \prop_if_exist:NTF#1
- {\erw_keyval_parse:NNNn #1#2#3{#4}}
- {
- \prop_new:N #1
- \erw_prop_keyval_parse:NNNn#1#2#3{#4}
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \section{\textsf{oper}}
-% \label{impl:oper}
-% \subsection{backend}
-% \subsection{frontend}
-% \begin{macrocode}
-\keys_define:nn{@@}
-{
- tl/fold_set_par.tl_gset:N = \g@@_tl_fold_set_par_tl,
- tl/fold_set_par.value_required:n = true,
- tl/fold_set_par.default:n = {Nf},
- tl/fold_set_par.initial:n = {Nf},
- tl/fold_apply_par.tl_gset:N = \g@@_tl_fold_apply_par_tl,
- tl/fold_apply_par.value_required:n = true,
- tl/fold_apply_par.default:n = {Nf},
- tl/fold_apply_par.initial:n = {Nf}
-}
-% \end{macrocode}
-% \section{option}
-% \label{impl:option}
-% \begin{macrocode}
-\cs_new_protected:Nn\erw_option:n
-{
- \keys_set:nn{@@}{#1}
-}
-% \end{macrocode}
-% \section{\textsf{seq}}
-% \label{impl:seq}
-% \subsection{backend}
-% \begin{macrocode}
-\tl_new:N \g@@_seq_fold_item_tl
-\cs_new_protected:Nn\@@_seq_put_right_clist:Nn
-{
- \cs_set_protected:Nn \@@_function:n
- {
- \seq_put_right:Nn #1{##1}
+\keys_define:nn{ @@ }
+{
+ new_compare_p.code:n = {\@@_new_compare_p:nnn#1}
+}
+\erw_keys_set:n
+{%
+ new_compare_p =
+ {erw_compare} % <name>
+ {nNnNn}
+ { \@@_compare:eecN{ #2{#3} }{ #2{#5} }{ #1:nNn }#4 }
+}
+\cs_new:Npn
+\@@_compare:nnNN
+#1 % <first>
+#2 % <second>
+#3 % <predicate>
+#4 % <operator>
+{ #3{ #1 }#4{ #2 } }
+\cs_generate_variant:Nn\@@_compare:nnNN{eec}
+\erw_keys_set:n
+{%
+ new_compare_p =
+ {erw_int_incr}
+ {nn}
+ {\exp_args:Ne
+ \int_compare_p:nNn{ \int_eval:n{#1+1} } = {#2} }
+}
+% \end{macrocode}
+% \section{\textsf{keyval}}
+% \begin{macrocode}
+\cs_new:Npn\@@_keyval_key:w #1 = #2 \q_recursion_stop{#1}
+\cs_new:Npn\@@_keyval_value:w #1 = #2 \q_recursion_stop{#2}
+\cs_new:Npn \erw_keyval_key:n#1{\@@_keyval_key:w #1 \q_recursion_stop}
+\cs_new:Npn \erw_keyval_value:n#1{\@@_keyval_value:w #1 \q_recursion_stop}
+\cs_new:Npn \erw_keyval:nn#1#2{ #1 = #2 }
+\erw_keys_set:n
+{
+ new_compare_p = {erw_key_compare}
+ {nNn}{ \erw_compare_p:nNnNn
+ {int_compare_p}\erw_keyval_key:n{#1}#2{#3} },
+ new_compare_p = {erw_key_compare}
+ {n}{ \erw_compare_recurse_p:nnNN{#1}
+ {int_compare_p}\erw_keyval_key:n< }
+}
+% \end{macrocode}
+% \section{\textsf{op's on list}}
+% \begin{macrocode}
+\cs_new:Npn
+\erw_remove_first:n
+#1 % <tokenlist>
+{\erw_remove_first_q:w#1\q_recursion_tail\q_recursion_stop}
+\cs_generate_variant:Nn\erw_remove_first:n{e}
+\cs_new:Npn
+\erw_remove_last:n
+#1 % <tokenlist>
+{\erw_remove_last_q:w#1\q_recursion_tail\q_recursion_stop}
+\cs_generate_variant:Nn\erw_remove_last:n{e}
+\cs_new:Npn
+\erw_first:n
+#1
+{\erw_first_q:w#1\q_recursion_tail\q_recursion_stop}
+\cs_generate_variant:Nn\erw_first:n{e}
+\cs_new:Npn
+\erw_last:n
+#1 % <tokenlist>
+{\erw_last_q:w#1\q_recursion_tail\q_recursion_stop}
+\cs_generate_variant:Nn\erw_last:n{e}
+\cs_new:Npn
+\erw_adjacent_insert:nn
+#1 % <list>
+#2 % <separator>
+{%
+ \erw_first:n{#1}
+ \erw_swap:en
+ { \erw_remove_first:n{#1} }
+ {%
+ \@@_adjacent_insert:nw
+ {#2} % <separator>
}
- \keyval_parse:NNn
- \@@_function:n
- \erw_keyval_keyonly:nn
- {#2}
-}
-\cs_generate_variant:Nn \@@_seq_put_right_clist:Nn { c }
-\cs_new_protected:Nn\@@_seq_put_right_prop:NNn
-{
- \@@_seq_put_right_clist:Nn #1
- {\erw_prop_to_clist:Nn #2 {#3}}
-}
-\cs_generate_variant:Nn \@@_seq_put_right_prop:NNn { cc }
-% \end{macrocode}
-% \subsection{frontend}
-% ^^A TODO see if can replace compose with just oper
-% \begin{macrocode}
-\cs_new_protected:Nn\erw_seq_put_right_clist:Nn
-{
- \seq_if_exist:NTF#1
- {\@@_seq_put_right_clist:Nn#1{#2}}
- {\seq_new:N#1\erw_seq_put_right_clist:Nn#1{#2}}
-}
-\cs_generate_variant:Nn \erw_seq_put_right_clist:Nn { c }
-\cs_new_protected:Nn\erw_seq_put_right_prop:NNn
-{
- \seq_if_exist:NTF#1
- {\@@_seq_put_right_prop:NNn#1#2{#3}}
- {\seq_new:N#1\erw_seq_put_right_prop:NNn#1#2{#3}}
-}
-\cs_generate_variant:Nn \erw_seq_put_right_prop:NNn { cc }
-\cs_new_protected:Nn \erw_seq_fold:NN
-{
- \seq_get_right:NN #2 \g@@_seq_fold_item_tl
- \erw_tl_fold:NN #1 \g@@_seq_fold_item_tl
- \seq_put_right:No #2 {\g@@_seq_fold_item_tl}
-}
-\cs_generate_variant:Nn \erw_seq_fold:NN {cN}
-\cs_new:Nn \erw_seq_use:Nn
-{
- \exp_last_unbraced:NNf
- \seq_use:Nnnn #1
- \erw_tl_separators:n{#2}
-}
-% \end{macrocode}
-% \section{\textsf{sys}}
-% \label{impl:sys}
-% \subsection{backend}
-% \begin{macrocode}
-% \end{macrocode}
-% \begin{macro}{\@@_sys_date:N, \@@_sys_date_dec:, \@@_sys_date_hex:}
-% \begin{macrocode}
-\cs_new:Nn \@@_sys_date_dec:
-{
- \int_eval:n
- {
- \c_sys_year_int * 10000
- +\c_sys_month_int * 100
- +\c_sys_day_int * 1
+ \q_recursion_tail
+ \q_recursion_stop
+}
+\cs_generate_variant:Nn\erw_adjacent_insert:nn{e}
+\cs_new:Npn
+\@@_adjacent_insert:nw
+#1 % <separator>
+#2 % <rest>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop:n{#2}
+ \@@_adjacent_insert:new {#1}{\tl_if_head_is_group_p:n{#2}}#2 \q_recursion_stop
+}
+\cs_new:Npn
+\@@_adjacent_insert:nnw
+#1 % <separator>
+#2 % <head is group>
+#3 % <head>
+#4 % <rest>
+\q_recursion_stop
+{%
+ #1\bool_if:nTF{#2}{{#3}}{#3}
+ \@@_adjacent_insert:nw{#1}#4\q_recursion_stop
+}
+\cs_generate_variant:Nn\@@_adjacent_insert:nnw{ne}
+% \end{macrocode}
+% \begin{macrocode}
+\cs_new:Npn
+\erw_clist_tl:nn
+#1 % <bool>
+#2 % <list>
+{ \erw_clist_tl:nnw {#1} #2 \q_recursion_tail\q_recursion_stop }
+\cs_new:Npn
+\erw_clist_tl:nnw #1 #2\q_recursion_stop
+{\quark_if_recursion_tail_stop:n{#2}
+ \erw_clist_tl:nenw {#1}
+ {\tl_if_head_is_group_p:n{#2}} #2 \q_recursion_stop}
+\cs_generate_variant:Nn\erw_clist_tl:nnw{ne}
+\cs_new:Npn
+\erw_clist_tl:nnnw
+#1 % <bool>
+#2 % <head is group>
+#3 % <head>
+#4 % <rest>
+\q_recursion_stop
+{
+ \quark_if_recursion_tail_stop_do:nn{#4}
+ {%
+ \bool_if:nTF
+ {\bool_lazy_and_p:nn{#1}{#2}}
+ {{#3}}{#3}
}
-}
-\cs_new:Nn \@@_sys_date:N{\int_to_hex:n{\@@_sys_date_dec:}}
-\cs_new:Nn \@@_sys_date_hex:{\int_to_hex:n{\@@_sys_date_dec:}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_sys_time_dec:, \@@_sys_time_hex}
-% \begin{macrocode}
-\cs_new:Nn \@@_sys_time_dec:
-{
- \int_eval:n
- {
- \c_sys_hour_int * 100
- +\c_sys_minute_int * 1
+ \bool_if:nTF{\bool_lazy_and_p:nn{#1}{#2}}
+ {{#3}}{#3},
+ \erw_clist_tl:nnw {#1} #4 \q_recursion_stop
+}
+\cs_generate_variant:Nn\erw_clist_tl:nnnw{ne}
+\prg_new_conditional:Npnn
+\erw_if_in_clist:nn
+#1 % <value>
+#2 % <clist>
+{p}
+{ \@@_clist_if_in:nw {#1} #2, \q_recursion_tail \q_recursion_stop }
+\cs_new:Npn
+\@@_clist_if_in:nw #1 #2 \q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop:n{#2}
+ \@@_clist_if_in:nnw {#1} #2 \q_recursion_stop
+}
+\cs_new:Nn
+\@@_clist_if_in:nn
+{\@@_clist_if_in:nw{#1} #2 \q_recursion_stop}
+\cs_new:Npn
+\@@_clist_if_in:nnw #1 #2, #3 \q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop_do:nn{#3}
+ {%
+ \str_if_eq:nnTF{#1}{#2}
+ {\prg_return_true:}{\prg_return_false:}
}
-}
-\cs_new:Nn\@@_sys_time_hex:{\int_to_hex:n{\@@_sys_time_dec:}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_sys_datetime_base:n, \@@_sys_datetime_dec:n, \@@_sys_datetime_join:nn, \@@_sys_datetime_hex:n, \@@_sys_datetime_period:n }
-% \begin{macrocode}
-\cs_new:Nn\@@_sys_datetime_base:n
-{
- \int_case:nnTF{#1}
- {
- {10}{dec}
- {16}{hex}
+ \str_if_eq:nnTF{#1}{#2}
+ {\prg_return_true:}
+ {\@@_clist_if_in:nw {#1} #3 \q_recursion_stop}
+ \@@_empty:w\q_recursion_stop
+}
+% \end{macrocode}
+% \section{\textsf{algo}}
+% \subsection{\textsf{split}}
+% \begin{macrocode}
+\cs_new:Npn
+\erw_split_even:n
+#1 % <tokenlist>
+{%
+ \tl_if_empty:nF{#1}
+ {%
+ \exp_last_unbraced:Ne
+ \@@_split_even:nnnw
+ {%
+ {\@@_split_even_threshold:n{#1}} % <count>
+ {\tl_if_head_is_group_p:n{#1}} % <head is group>
+ }
+ #1 % <tokenlist>
+ \q_recursion_tail
+ \q_recursion_stop
}
- {\c_empty_tl}
- {\msg_error:nnn{@@}{timestamp / base}{\@@_sys_datetime_base:n{#1}}}
}
-\cs_new:Nn\@@_sys_datetime_join:nn{\erw_tl_join:nnn{#1}{\g@@_sys_timestamp_delim_str}{#2}}
-\cs_new:Nn\@@_sys_datetime_period:n
-{
- \str_case:nnTF{#1}
- {
- {date}{date}
- {time}{time}
- {datetime}{datetime}
+\cs_generate_variant:Nn\erw_split_even:n{e}
+\cs_new:Npn
+\@@_split_even_threshold:n
+#1 % <tokenlist>
+{\exp_args:Ne
+ \int_div_round:nn{\tl_count:n{#1}}{2}}
+\cs_new:Npn
+\@@_split_even:nnnw
+#1 % <threshold>
+#2 % <head is group>
+#3 % <head>
+#4 % <rest>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop_do:nn{#4}
+ { { \bool_if:nTF{#2}{{#3}}{#3} }{} }
+ \exp_last_unbraced:Ne
+ \@@_split_even:nnnnw
+ {%
+ {1} % <left size>
+ { \tl_if_head_is_group_p:n{#4} }
+ {#1} % <threshold count>
+ { \bool_if:nTF{#2}{{#3}}{#3} } % <left list>
}
- {\c_empty_tl}
- {\msg_error:nnn{@@}{ timestamp / period }{\@@_sys_datetime_period:n{#1}}}
-}
-\cs_new:Nn\@@_sys_datetime_dec: {\@@_sys_datetime_join:nn{\@@_sys_date_dec:}{\@@_sys_time_dec:}}
-\cs_new:Nn\@@_sys_datetime_hex: {\@@_sys_datetime_join:nn{\@@_sys_date_hex:}{\@@_sys_time_hex:}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_sys_jobnametimestamp_prefix:}
-% \begin{macrocode}
-\cs_new:Nn\@@_sys_jobnametimestamp_prefix:
-{
- \erw_tl_join:nn
- {\c_sys_jobname_str}
- {\g@@_sys_timestamp_delim_str}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_sys_jobnametimestamp:n, \@@_sys_jobnametimestamp:}
-% \begin{macrocode}
-\cs_new:Nn\@@_sys_jobnametimestamp:nn
-{
- \erw_tl_join:nn
- {\@@_sys_jobnametimestamp_prefix:}
- {\erw_sys_timestamp:nn{#1}{#2}}
-}
-\cs_new:Nn\@@_sys_jobnametimestamp:
-{
- \erw_tl_join:nn
- {\@@_sys_jobnametimestamp_prefix:}
- {\erw_sys_timestamp:}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_sys_timestamp:nn}
-% \begin{macrocode}
-\cs_new:Nn\@@_sys_timestamp:nn
-{
- \exp_args:No
- \use:c{@@_sys_\@@_sys_datetime_period:n{#1}_\@@_sys_datetime_base:n{#2}:}
-}
-\cs_new_protected:Nn \@@_sys_set_delim:nn
-{
- \use:c{tl_gset:N#1}
- \g@@_sys_timestamp_delim_str{#2}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\keys_define:nn{@@}
-{
- sys / timestamp_delim .code:n =
- {
- \exp_last_unbraced:No
- \@@_sys_set_delim:nn{n}{#1}
- },
- sys / timestamp_delim .value_required:n = true,
- sys / timestamp_delim .default:n = {-},
- sys / timestamp_delim .initial:n = {-}
-}
-% \subsection{frontend}
-% \begin{macrocode}
-\cs_new:Nn\erw_sys_jobnametimestamp:nn{\@@_sys_jobnametimestamp:nn{#1}{#2}}
-\cs_new:Nn\erw_sys_jobnametimestamp:{\@@_sys_jobnametimestamp:}
-\cs_new:Nn\erw_sys_timestamp_delimiter:
-{
- \use:N \g@@_sys_timestamp_delim_str
-}
-\cs_new:Nn\erw_sys_timestamp:nn
-{
- \@@_sys_timestamp:nn{#1}{#2}
-}
-\cs_new:Nn\erw_sys_timestamp:
-{
- \@@_sys_timestamp:nn{datetime}{16}
-}
-% \end{macrocode}
-% \section{\textsf{tl}}
-% \label{impl:tl}
-% \subsection{backend}
-% \begin{macrocode}
-\tl_new:N \g@@_tl_compose_tl
-% \end{macrocode}
-% \begin{macro}{\g@@_tl_function:n}
-% \begin{macrocode}
-\cs_new_protected:Nn \g@@_tl_function:n
-{
- \msg_error:nnn
- {erw}
- {notset}
- {\g@@_tl_function:n}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_tl_map:nn}
-% \begin{macrocode}
-\cs_set_protected:Nn \@@_tl_map:nn
-{
- \quark_if_recursion_tail_stop:n{#1}
- \g@@_tl_function:n{#1} \@@_tl_map:nn{#2}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_tl_map_thread_at:Nnn, \@@_tl_map_thread_at:Nnnn, \@@_tl_map_thread_at:Nnnnn, \@@_tl_map_thread_at:Nnnnnn}
-% \begin{macrocode}
-\cs_set_protected:Nn \@@_tl_map_thread_at:Nnn
-{
- #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
-}
-\cs_set_protected:Nn \@@_tl_map_thread_at:Nnnn
-{
- #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
-}
-\cs_set_protected:Nn \@@_tl_map_thread_at:Nnnnn
-{
- #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
- {\exp_args:Nf\tl_item:nn {#5} {#2} }
-}
-\cs_set_protected:Nn \@@_tl_map_thread_at:Nnnnnn
-{
- #1
- {\exp_args:Nf\tl_item:nn {#3} {#2} }
- {\exp_args:Nf\tl_item:nn {#4} {#2} }
- {\exp_args:Nf\tl_item:nn {#5} {#2} }
- {\exp_args:Nf\tl_item:nn {#6} {#2} }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\@@_tl_separators:nn}
-% \begin{arguments}
-% \item \meta{ int }
-% \item \meta{ items }
-% \end{arguments}
-% \begin{macrocode}
-\cs_new:Nn \@@_tl_separators:nn
-{
- \int_case:nnTF {#1}
- {
- {1}
- { \prg_replicate:nn{ 3 }{#2} }
- {2}
+ #4 % <right list>
+ \q_recursion_stop
+}
+\cs_new:Npn
+\@@_split_even:nnnnw
+#1 % <left size>
+#2 % <right head is group>
+#3 % <threshold count>
+#4 % <left list>
+#5 % <right head>
+#6 % <right rest>
+\q_recursion_stop
+{%
+ \bool_if:nTF
+ { \int_compare_p:nNn {#1}<{#3} }
+ {%
+ \exp_last_unbraced:Ne
+ \@@_split_even:nnnnw
{
- { \use_ii:nn #2 }
- { \use_i:nn #2 }
- { \use_i:nn #2 \use_ii:nn #2 }
+ { \int_eval:n{#1+1} } % <left size>
+ { \tl_if_head_is_group_p:n{#6} } % <right head is group>
+ {#3} % <threshold count>
+ {#4\bool_if:nTF{#2}{{#5}}{#5}} % <left list>
}
- {3}{#2}
+ #6
+ \q_recursion_stop
}
- { \c_empty_tl }
- {
- \msg_error:nnnn { @@ }
- { separ }
- { \@@_tl_separators:nn }
- {#2}
+ {%
+ {#4}
+ {%
+ \bool_if:nTF{#2}{{#5}}{#5}
+ \erw_remove_last_q:w#6\q_recursion_stop\erw_last_q:w#6\q_recursion_stop}
}
}
-\cs_generate_variant:Nn \@@_tl_separators:nn { e }
% \end{macrocode}
-% \end{macro}
-% \subsection{frontend}
-% ^^A TODO see if can replace compose with just oper
+% \subsection{\textsf{thread sort}}
% \begin{macrocode}
-\cs_new:Nn \erw_tl_append_item:nn
-{
- {#1{#2}}
-}
-\cs_new:Nn \erw_tl_fold:NN
-{
- \use:c{tl_set:\g@@_tl_fold_set_par_tl}
- #2
- {
- \use:c{exp_args:\g@@_tl_fold_apply_par_tl}{#1}{#2}
- }
-}
-\cs_generate_variant:Nn \erw_tl_fold:NN {cN}
-\cs_new:Nn \erw_tl_gset_function:N
-{
- \erw_cs_gset_eq:NN \g@@_tl_function:n #1
-}
-\cs_new:Nn \erw_tl_gset_function:n
-{
- \erw_cs_gset_inline:Nn \g@@_tl_function:n {#1}
-}
-\cs_new:Nn \erw_tl_last_item:n
-{
- \exp_args:Nof \tl_item:nn
+\cs_new:Npn
+\erw_thread_sort:nnNn
+#1 % <first sorted list>
+#2 % <second sorted list>
+#3 % <compare predicate name>
+#4 % <compare operator>
+{%
+ \@@_thread_sort:nNnnn
+ {#3} % <compare predicate name>
+ #4 % <compare operator>
+ {\c_empty_tl} % <accum>
{#1}
- {
- \tl_count:n{#1}
- }
-}
-% \end{macrocode}
-% \begin{macro}{\erw_tl_join:nn, \erw_tl_join:nnn, \erw_tl_join:nnnn, \erw_tl_join:nnnnn}
-% \begin{macrocode}
-\cs_new:Nn \erw_tl_join:nn{#1#2}
-\cs_new:Nn \erw_tl_join:nnn{#1#2#3}
-\cs_new:Nn \erw_tl_join:nnnn{#1#2#3#4}
-\cs_new:Nn \erw_tl_join:nnnnn{#1#2#3#4#5}
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\cs_new_protected:Nn \erw_tl_map:n
-{
- \@@_tl_map:nn#1\q_recursion_tail\q_recursion_stop\q_recursion_tail\q_recursion_stop
-}
-\cs_new_protected:Nn \erw_tl_map:Nn
-{
- \cs_set_eq:NN \g@@_tl_function:n #1
- \erw_tl_map:n{#2}
-}
-\cs_new_protected:Nn \erw_tl_map_inline:nn
-{
- \erw_cs_set_inline:Nn \g@@_tl_function:n {#1}
- \erw_tl_map:n{#2}
-}
-\cs_new:Nn \erw_tl_repeat:nn
-{
- \int_step_inline:nnnn{1}{1}{#1}{#2}
-}
-\cs_new:Nn \erw_tl_split:nnn
-{
- \tl_head:n{#1}
- \use:c{exp_args:#3} \tl_map_inline:nn
- {
- \tl_tail:n
- {
- #1
- }
- }{#2##1}
-}
-\cs_new:Nn \erw_tl_split:nn
-{
- \erw_tl_split:nnn{#1}{#2}{Nf}
+ {#2}
}
-\cs_new_protected:Nn \erw_tl_map_thread_at:Nnn
-{
- \exp_args:Nf\int_case:nnTF
- {
- \tl_count:n{#3}
- }
- {
- {1}{ \@@_tl_map_thread_at:Nnn #1{#2}#3 }
- {2}{ \@@_tl_map_thread_at:Nnnn #1{#2}#3 }
- {3}{ \@@_tl_map_thread_at:Nnnnn #1{#2}#3 }
- {4}{ \@@_tl_map_thread_at:Nnnnnn #1{#2}#3 }
- }
- {
- % Do nothing
+\cs_generate_variant:Nn\erw_thread_sort:nnNn{ee}
+\cs_new:Npn
+\@@_thread_sort:nNnnn
+#1 % <compare predicate name>
+#2 % <compare operator>
+#3 % <sorted>
+#4 % <first>
+#5 % <second>
+{%
+ \@@_thread_sort:nNnww
+ {#1} % <compare predicate name>
+ {#2} % <compare operator>
+ {#3} % <sorted>
+ #4 \q_recursion_tail% <first>
+ \q_stop
+ #5 \q_recursion_tail% <second>
+ \q_recursion_stop
+}
+\cs_generate_variant:Nn\@@_thread_sort:nNnnn{nNeee}
+\cs_new:Npn
+\@@_thread_sort:nNnww
+#1 % <compare predicate name>
+#2 % <compare operator>
+#3 % <sorted>
+#4 % <first>
+\q_stop
+#5 % <second>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop_do:nn{#4}
+ { #3 \erw_all_q:w #5 \q_recursion_stop }
+ \quark_if_recursion_tail_stop_do:nn{#5}
+ { #3 \erw_all_q:w #4 \q_recursion_stop }
+ \@@_thread_sort:nNneeww
+ {#1}#2{#3}
+ { \tl_if_head_is_group_p:n{#4} }
+ { \tl_if_head_is_group_p:n{#5} }
+ #4\q_stop
+ #5\q_recursion_stop
+}
+\cs_new:Npn
+\@@_thread_sort:nNnnnww
+#1 % <compare predicate name>
+#2 % <compare operator>
+#3 % <sorted>
+#4 % <head is begin>
+#5 % <head is begin>
+#6 % <first head>
+#7 % <first rest>
+\q_stop
+#8 % <second head>
+#9 % <second rest>
+\q_recursion_stop
+{%
+ \bool_if:nTF
+ { \use:c{#1:nNn}{#6}#2{#8} }
+ {%
+ \@@_thread_sort:nNeee
+ {#1}
+ #2
+ {#3\bool_if:nTF{#4}{{#6}}{#6}}
+ {\erw_all_q:w#7\q_recursion_stop}
+ {\bool_if:nTF{#5}{{#8}}{#8}\erw_all_q:w#9\q_recursion_stop}
}
- {
- \msg_error:nnn{@@}
- {generic}
- {erw_tl_map_thread_at:~count~of~#3~not~withing~1~to~4}
+ {%
+ \@@_thread_sort:nNeee
+ {#1}
+ #2
+ {#3\bool_if:nTF{#5}{{#8}}{#8}}
+ {\bool_if:nTF{#4}{{#6}}{#6}\erw_all_q:w#7\q_recursion_stop}
+ {\erw_all_q:w#9\q_recursion_stop}
}
}
-\cs_new_protected:Nn \erw_tl_map_thread:Nn
-{
- \int_step_inline:nn
- {
- \exp_args:Nf \tl_count:n{ \tl_head:n{#2} }
- }
- {
- \erw_tl_map_thread_at:Nnn #1 {##1} {#2}
+\cs_generate_variant:Nn\@@_thread_sort:nNnnnww{nNnee}
+% \end{macrocode}
+% \subsection{\textsf{merge sort}}
+% \begin{macrocode}
+\cs_new:Npn
+\erw_merge_sort:nNn
+#1 % <compare predicate name>
+#2 % <compare operator>
+#3 % <unsorted list>
+{%
+ \tl_if_empty:nF{#3}
+ {%
+ \@@_sort_merge:enNw
+ {\tl_if_head_is_group_p:n{#3}} % <head is group>
+ {#1} % <compare predicate name>
+ #2 % <compare operator>
+ #3 % <unsorted list>
+ \q_recursion_tail
+ \q_recursion_stop
}
}
-\cs_new:Nn \erw_tl_separators:n
-{
- \@@_tl_separators:en{ \tl_count:n{#1} }{#1}
-}
+\cs_generate_variant:Nn\erw_merge_sort:nNn{nNe}
+\cs_new:Npn
+\@@_sort_merge:nnNw
+#1 % <head is group>
+#2 % <compare predicate name>
+#3 % <compare operator>
+#4 % <unsorted list head>
+#5 % <unsorted list rest>
+\q_recursion_stop
+{%
+ \quark_if_recursion_tail_stop_do:nn{#5}
+ { \bool_if:nTF{#1}{{#4}}{#4} }
+ \exp_last_unbraced:Ne
+ \@@_sort_merge:nnnN
+ {%
+ \erw_split_even:e
+ {%
+ \bool_if:nTF{#1}{{#4}}{#4}
+ \erw_all_q:w#5\q_recursion_stop
+ }
+ } % {<first sorted list>}{<second sorted list>}
+ {#2} % <compare predicate name>
+ #3 % <compare operator>
+ \@@_empty:w \q_recursion_stop
+}
+\cs_generate_variant:Nn\@@_sort_merge:nnNw{e}
+\cs_new:Npn
+\@@_sort_merge:nnnN
+#1 % <left unsorted list>
+#2 % <right unsorted list>
+#3 % <compare predicate name>
+#4 % <compare operator>
+{%
+ \erw_thread_sort:eeNn
+ {%
+ \@@_sort_merge:enNw
+ {\tl_if_head_is_group_p:n{#1}}
+ {#3} % <compare predicate name>
+ #4 % <compare operator>
+ #1 % <unsorted list>
+ \q_recursion_tail
+ \q_recursion_stop
+ } % <first sorted list>
+ {%
+ \@@_sort_merge:enNw
+ {\tl_if_head_is_group_p:n{#2}}
+ {#3} % <compare predicate name>
+ #4 % <compare operator>
+ #2 % <unsorted list>
+ \q_recursion_tail
+ \q_recursion_stop
+ } % <second sorted list>
+ {#3} % <compare predicate name>
+ #4 % <operator>
+}
+% \end{macrocode}
+% \subsection{\textsf{filter}}
+% \begin{macrocode}
+\msg_new:nnn{@@}{tokenlist-incr}
+{expecting~an~ascending~tokenlist~got~#1~followed~by~#2}
+\cs_new:Npn
+\@@_filter_uniq:nnw
+#1 % <compare predicate>
+#2 % <greatest>
+#3 % <tokenlist>
+\q_recursion_stop
+{ %
+ \quark_if_recursion_tail_stop:n{#3}
+ \@@_filter_uniq_aux:nnw{#1}{#2}#3\q_recursion_stop}
+\cs_new:Npn
+\@@_filter_uniq_aux:nw
+#1 % <compare predicate>
+#2 % <tokenlist head>
+#3 % <tokenlist rest>
+\q_recursion_stop
+{%
+ {#2}
+ \@@_filter_uniq:nnw
+ {#1} % <compare predicate>
+ {#2} #3 % <tokenlist>
+ \q_recursion_stop }
+\cs_new:Npn
+\@@_filter_uniq_aux:nnw
+#1 % <compare predicate>
+#2 % <last>
+#3 % <head token>
+#4 % <rest token>
+\q_recursion_stop
+{ %
+ \bool_if:nTF{\use:c{#1:nNn}{#3}<{#2}}
+ {\msg_error:nnnn{@@}{tokenlist-incr}{#2}{#3}}
+ {%
+ \bool_if:nF
+ {\use:c{#1:nNn}{#3}={#2}}
+% ^^A {{#3}}
+{\tl_if_single_token:nTF{#3}{#3}{{#3}}}
+}
+\quark_if_recursion_tail_stop:n{#4}
+% ^^A \@@_filter_uniq:nnw{#1}{#3}#4\q_recursion_stop }
+\@@_filter_uniq:nnw{#1}{#3}#4\q_recursion_stop }
+\cs_new:Npn
+\@@_filter_uniq:nw
+#1 % <compare predicate>
+#2 % <tokenlist>
+{%
+ \quark_if_recursion_tail_stop_do:nn{#2}{\c_empty_tl}
+ \@@_filter_uniq_aux:nw {#1}#2 \q_recursion_stop}
+\cs_new:Npn
+\erw_filter_uniq:nn
+#1 % <compare predicate>
+#2 % <tokenlist>
+{%
+ \@@_filter_uniq_aux:nw
+ {#1} % <compare predicate>
+ #2
+ \q_recursion_tail % <head token>
+ \q_recursion_stop}
+\cs_new:Npn
+\erw_filter_uniq:n
+#1 % <ascending integers>
+{ \erw_filter_uniq:nn{int_compare_p}{#1} }
+\cs_generate_variant:Nn\erw_filter_uniq:nn{ne}
% \end{macrocode}
-% \section{Closing}
-% \label{impl:closing}
-%
+% \section{\textsf{code}}
% \begin{macrocode}
+\keys_define:nn{@@}
+{ clist_map_inline.code:n = \@@_map_inline_clist:nnn#1 }
+\cs_new_protected:Npn
+\@@_map_inline_clist:nnn
+#1 % <clist>
+#2 % <signature>
+#3 % <code>
+{
+ \cs_new_protected:cn
+ {@@_do:#2}{#3}
+ \clist_map_inline:nn
+ {#1}
+ {\use:c{@@_do:#2}##1}
+}
+\cs_new:Npn
+\erw_parameter:n
+#1 %^^A <arity>
+{## #1}
+\cs_new:Npn
+\@@_parameter_aux:nn
+#1 % <finish>
+#2 % <start>
+{ \int_step_function:nnN {#2}{#1}\erw_parameter:n}
+\cs_new:Npn
+\erw_parameter:nn
+#1 % <start>
+#2 % <count>
+{%
+ \exp_args:Ne
+ \@@_parameter_aux:nn
+ {\int_eval:n{#1+#2-1}}{#1}}
+\cs_new:Npn
+\erw_argument:nn
+#1 % <position>
+#2 % <signature>
+{\@@_argument:nw{#1}#2\q_recursion_tail\q_recursion_stop}
+\cs_new:Npn
+\@@_argument_unit:nn
+#1 % <position>
+#2 % <n|N>
+{\use:c{@@_argument_#2:w} #1 \q_recursion_stop}
+\cs_new:Npn\@@_argument_n:w #1 \q_recursion_stop{{## #1}}
+\cs_new:Npn\@@_argument_N:w #1 \q_recursion_stop{## #1}
+\cs_new:Npn
+\@@_argument:nw
+#1 % <position>
+#2 % <signature list>
+\q_recursion_stop
+{ \quark_if_recursion_tail_stop:n{#2}
+ \@@_argument:nnw{#1}#2\q_recursion_stop }
+\cs_new:Npn
+\@@_argument:nnw
+#1 % <position>
+#2 % <n|N>
+#3 % <signature rest>
+\q_recursion_stop
+{%
+ \@@_argument_unit:nn{#1}{#2}
+ \exp_args:Ne
+ \@@_argument:nw
+ {\erw_int_incr:n{#1}}#3\q_recursion_stop }
+% \end{macrocode}
+% ^^A ---
+% \begin{macrocode}
+\ProcessKeysOptions{@@}
\ExplSyntaxOff
%</package>
% \end{macrocode}
-%
% \end{implementation}
-% ^^A% \iffalse
-% ^^A%</package>
-% ^^A% \fi
% \Finale
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/erw-l3/erw-l3.ins b/macros/latex/contrib/erw-l3/erw-l3.ins
new file mode 100644
index 0000000000..7aca104ccb
--- /dev/null
+++ b/macros/latex/contrib/erw-l3/erw-l3.ins
@@ -0,0 +1,64 @@
+%%
+%% This is file `erw-l3.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% erw-l3.dtx (with options: `install')
+%% -----------------------------------------------------------------------------
+%% erw-l3 --- Utilities based on LaTeX3, such as 'merge sort'
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ----------------------------------------------------------------------------
+%%
+\input l3docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+-----------------------------------------------------------------------------
+erw-l3 --- Utilities based on LaTeX3, such as 'merge sort'
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------------------
+
+\endpreamble
+\postamble
+
+Copyright (C) 2020-2022 by Erwann Rogard
+
+This work 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:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
+Erwann Rogard.
+
+This work consists of the file erw-l3.dtx and the derived files:
+erw-l3.sty, and erw-l3.pdf.
+
+\endpostamble
+\generate{
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+ \endbatchfile
+%%
+%% Copyright (C) 2020-2022 by Erwann Rogard
+%%
+%% This work 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:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Erwann Rogard.
+%%
+%% This work consists of the file erw-l3.dtx and the derived files:
+%% erw-l3.sty, and erw-l3.pdf.
+%%
+%%
+%% End of file `erw-l3.ins'.
diff --git a/macros/latex/contrib/erw-l3/erw-l3.pdf b/macros/latex/contrib/erw-l3/erw-l3.pdf
index e8178b0dc4..21a2839d58 100644
--- a/macros/latex/contrib/erw-l3/erw-l3.pdf
+++ b/macros/latex/contrib/erw-l3/erw-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/fnpct/README b/macros/latex/contrib/fnpct/README
index 61706ffbec..a867454221 100644
--- a/macros/latex/contrib/fnpct/README
+++ b/macros/latex/contrib/fnpct/README
@@ -1,12 +1,12 @@
--------------------------------------------------------------------------
-the FNPCT package v1.0a 2022/01/04
+the FNPCT package v1.0b 2022/01/29
- footnote kerning
+ footnotes' interaction with punctuation
--------------------------------------------------------------------------
Clemens Niederberger
Web: https://github.com/cgnieder/fnpct/
-E-Mail: contact@mychemistry.eu
+E-Mail: clemens@cnltx.de
--------------------------------------------------------------------------
Copyright 2012--2022 Clemens Niederberger
diff --git a/macros/latex/contrib/fnpct/fnpct-manual.cls b/macros/latex/contrib/fnpct/fnpct-manual.cls
index 66c97d8cdb..6b3aa77698 100644
--- a/macros/latex/contrib/fnpct/fnpct-manual.cls
+++ b/macros/latex/contrib/fnpct/fnpct-manual.cls
@@ -1,12 +1,12 @@
% --------------------------------------------------------------------------
% the FNPCT package
%
-% footnote kerning
+% footnotes' interaction with punctuation
%
% --------------------------------------------------------------------------
% Clemens Niederberger
% Web: https://github.com/cgnieder/fnpct/
-% E-Mail: contact@mychemistry.eu
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
% Copyright 2012--2022 Clemens Niederberger
%
@@ -30,9 +30,9 @@
\setcnltx{
package = {fnpct} ,
- info = {Footnote kerning and multiple footnotes} ,
+ info = {footnotes' interaction with punctuation} ,
authors = Clemens Niederberger ,
- email = contact@mychemistry.eu ,
+ email = clemens@cnltx.de ,
url = https://github.com/cgnieder/fnpct/ ,
abstract = {%
The \fnpct\ package basically does two things to footnotes: if footnote
diff --git a/macros/latex/contrib/fnpct/fnpct-manual.pdf b/macros/latex/contrib/fnpct/fnpct-manual.pdf
index 9648cd87ec..9f60e1b59a 100644
--- a/macros/latex/contrib/fnpct/fnpct-manual.pdf
+++ b/macros/latex/contrib/fnpct/fnpct-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/fnpct/fnpct-manual.tex b/macros/latex/contrib/fnpct/fnpct-manual.tex
index c72a9a779c..ceebe632fc 100644
--- a/macros/latex/contrib/fnpct/fnpct-manual.tex
+++ b/macros/latex/contrib/fnpct/fnpct-manual.tex
@@ -5,12 +5,12 @@
% --------------------------------------------------------------------------
% the FNPCT package
%
-% footnote kerning
+% footnotes' interaction with punctuation
%
% --------------------------------------------------------------------------
% Clemens Niederberger
% Web: https://github.com/cgnieder/fnpct/
-% E-Mail: contact@mychemistry.eu
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
% Copyright 2012--2022 Clemens Niederberger
%
@@ -609,7 +609,6 @@ itself.
\end{document}
TODO:
-- memoir, \mutfootsep
+- memoir, \multfootsep
- \thanks
-- French
- nested notes and \AdaptText\footnotetext{om}{\IfNoValueTF{#1}{#NOTE{#2}}{#NOTE[#1]{#2}}}
diff --git a/macros/latex/contrib/fnpct/fnpct.sty b/macros/latex/contrib/fnpct/fnpct.sty
index 16a81850ba..9236dcfdde 100644
--- a/macros/latex/contrib/fnpct/fnpct.sty
+++ b/macros/latex/contrib/fnpct/fnpct.sty
@@ -1,12 +1,12 @@
% --------------------------------------------------------------------------
% the FNPCT package
%
-% footnote kerning
+% footnotes' interaction with punctuation
%
% --------------------------------------------------------------------------
% Clemens Niederberger
% Web: https://github.com/cgnieder/fnpct/
-% E-Mail: contact@mychemistry.eu
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
% Copyright 2012--2022 Clemens Niederberger
%
@@ -27,10 +27,10 @@
\DeclareHookRule {begindocument} {fnpct} {after} {hyperref}
-\tl_const:Nn \c_fnpct_date_tl {2022/01/04}
+\tl_const:Nn \c_fnpct_date_tl {2022/01/29}
\tl_const:Nn \c_fnpct_version_major_number_tl {1}
\tl_const:Nn \c_fnpct_version_minor_number_tl {0}
-\tl_const:Nn \c_fnpct_version_subrelease_tl {a}
+\tl_const:Nn \c_fnpct_version_subrelease_tl {b}
\tl_const:Nx \c_fnpct_version_number_tl
{
\c_fnpct_version_major_number_tl .
@@ -41,7 +41,7 @@
\c_fnpct_version_number_tl
\c_fnpct_version_subrelease_tl
}
-\tl_const:Nn \c_fnpct_info_tl {footnote~ kerning}
+\tl_const:Nn \c_fnpct_info_tl {footnotes'~ interaction~ with~ punctuation}
\ProvidesExplPackage
{fnpct}
@@ -748,17 +748,7 @@
\fnpct_if_switched:T
{
\fnpct_if_class:nT {punctuation}
- {
- \bool_set_false:N \l__fnpct_collection_bool
- \fnpct_foreach_action:nn {punctuation}
- {
- \fnpct_if_action:nT {##1}
- {
- \fnpct_skip_nobreak:c {l__fnpct_before_##1_dim}
- \fnpct_action_break:
- }
- }
- }
+ { \bool_set_false:N \l__fnpct_collection_bool }
\bool_set_false:N \l__fnpct_end_collection_bool
\bool_set_false:N \l__fnpct_switched_bool
}
@@ -1405,3 +1395,4 @@ tablefootnote
* drop support of \innernote (maybe re-implement it in
future versions, depending on user feedback)
2022/01/04 v1.0a - correct file hooks
+2022/01/29 v1.0b - remove erroneously inserted horizontal skip
diff --git a/macros/latex/contrib/jmlr/CHANGES b/macros/latex/contrib/jmlr/CHANGES
index 998cc1ce7a..1d90c73ef7 100644
--- a/macros/latex/contrib/jmlr/CHANGES
+++ b/macros/latex/contrib/jmlr/CHANGES
@@ -1,3 +1,28 @@
+v1.29 (2022-01-29):
+
+ * jmlr.cls:
+
+ - added cleveref option
+
+ - fixed draft option
+
+ - bug fix #168: Float-only last pages not counted for page numbering
+ https://www.dickimaw-books.com/bugtracker.php?key=168
+
+ * jmlrutils.sty:
+
+ - added cleveref option
+
+ - added \jmlralgorule
+
+ - added \jmlrminsubcaptionwidth
+
+ * jmlrbook.cls:
+
+ - obsoleted (https://www.dickimaw-books.com/faq.php?itemlabel=latex20201009)
+ Production editors will need to set the first page number
+ of each article manually.
+
v1.28 (2020-09-21):
* jmlr.cls:
diff --git a/macros/latex/contrib/jmlr/INSTALL b/macros/latex/contrib/jmlr/INSTALL
deleted file mode 100644
index 4dbbc8f15b..0000000000
--- a/macros/latex/contrib/jmlr/INSTALL
+++ /dev/null
@@ -1,62 +0,0 @@
-INSTALLATION
-
-*Installation is best performed using your TeX package manager.*
-These are instructions for manual installation if for some reason a
-package manager can't be used.
-
-If you have downloaded the jmlr bundle using the TeX Directory
-Structure (TDS), that is you have downloaded the archive
-jmlr.tds.zip containing doc, tex and source directories, you need to
-follow the "Installing from TDS" instructions below.
-
-If you have downloaded the following files:
-
-jmlr.dtx
-jmlr.ins
-
-You need to follow the "Installing from DTX and INS" instructions
-below.
-
-INSTALLING FROM TDS
-===================
-
-Files in tex and doc directories should go in the corresponding
-TEXMF directories (for example, /usr/share/texmf-local/ or
-C:\localtexmf\).
-
-*Remember to refresh TeX's database*
-
-Example (on UNIX like systems):
-
-unzip jmlr.tds.zip -d ~/texmf/
-texhash ~/texmf/
-
-INSTALLING FROM DTX AND INS
-===========================
-
-Run LaTeX on jmlr.ins to generate jmlr.cls and jmlrbook.cls:
-
-latex jmlr.ins
-
-To create the documentation (jmlr.pdf):
-
-pdflatex jmlr.dtx
-makeindex -s gind.ist jmlr.idx
-makeindex -s gglo.ist -o jmlr.gls jmlr.glo
-pdflatex jmlr.dtx
-pdflatex jmlr.dtx
-
-If TEXMF denotes the base directory of your local TeX installation (e.g.
-/usr/share/texmf-local/ or C:\localtexmf\) then create the following
-directories (if they don't already exist):
-
-TEXMF/doc/latex/jmlr
-TEXMF/tex/latex/jmlr
-
-Move the documentation to TEXMF/doc/latex/jmlr/
-
-Move jmlrutils.sty, jmlr.cls and jmlrbook.cls to TEXMF/tex/latex/jmlr/
-
-*Remember to refresh TeX's database*
-
-
diff --git a/macros/latex/contrib/jmlr/README b/macros/latex/contrib/jmlr/README
index e9a52cdccf..87601eb934 100644
--- a/macros/latex/contrib/jmlr/README
+++ b/macros/latex/contrib/jmlr/README
@@ -1,4 +1,4 @@
-LaTeX Class : jmlr bundle v1.28 (2020-09-21)
+LaTeX Class : jmlr bundle v1.29 (2022-01-29)
Author : Nicola L. C. Talbot
dickimaw-books.com/contact
@@ -9,7 +9,7 @@ This material is subject to the LaTeX Project Public License.
See http://www.ctan.org/license/lppl1.3
for the details of that license.
-Copyright 2006-2020 Nicola Talbot
+Copyright 2006-2022 Nicola Talbot
DESCRIPTION
@@ -17,40 +17,30 @@ This bundle provides:
* jmlr class (article authors)
* jmlrutils package (supplementary package automatically loaded by jmlr.cls)
- * jmlrbook class (for production editors)
+ * jmlrbook class (for production editors, now obsolete)
-The jmlr class is a LaTeX class for articles for the Journal of
-Machine Learning Research (JMLR) or the Proceedings of Machine
-Learning Research (PMLR) formerly JMLR Workshop and Conference
-Proceedings (JMLR W&CP). It is designed as a replacement for both
-jmlr2e.sty and jmlrwcp2e.sty.
+The jmlr class was designed primarily for the Journal of
+Machine Learning Research Workshop and Conference Proceedings
+(JMLR W&CP) based on the jmlrwcp2e package to make it easier for
+production editors to combine articles into a single book.
+
+JMLR W&CP has been renamed Proceedings of Machine Learning Research
+(PMLR). Please use class option 'pmlr' for new articles.
+
+If you want to submit an article to the Journal of Machine Learning
+Research (JMLR), please follow their guidelines instead.
The jmlrutils package is automatically loaded by the jmlr class, but
may be used with other classes. (You may need to additionally load
graphicx and algorithm2e, which jmlr.cls does automatically.)
-The jmlrbook class is a LaTeX class that can be used to combine
-articles written using the jmlr class into a book. The jmlrbook
-class uses the combine class and the hyperref package to produce
-either a colour hyperlinked book for on-line viewing or a greyscale
-nonhyperlinked book for printing. Production editors can use the
-makejmlrbookgui application
-(http://www.dickimaw-books.com/software/makejmlrbookgui/) to
-generate the proceedings. The makejmlrbook Perl script is deprecated
-and will be removed in future releases.
-
-**
- jmlrbook.cls is quite fragile as it has to patch third party
- internal code in order to make combine.cls work with hyperref.sty
- There's no guarantee that it will work with newer versions of
- combine.cls or hyperref.sty or new LaTeX kernel releases.
-**
-
-INSTALLATION
-
-Installation is best performed using your TeX package manager.
-See INSTALL file for manual installation instructions if you are unable to
-use the package manager.
+The jmlrbook class no longer works since it relies on another class
+that has stopped working following modifications to the LaTeX kernel
+in 2020. Production editors will now need to manually set the first
+page number for each article. If a printed book is required, all
+articles can be combined using pdfpages instead.
+
+This doesn't affect article authors who can continue to use jmlr.cls.
REQUIREMENTS
@@ -76,11 +66,5 @@ jmlrbook class requirements:
xkeyval
combnat
setspace
- currfile or fink
-
-RELATED SOFTWARE:
-
-http://www.dickimaw-books.com/software/makejmlrbookgui/
-
-Author's home page: http://www.dickimaw-books.com/
+ currfile
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/teximage.tex b/macros/latex/contrib/jmlr/example-teximage.tex
index 9fdc0d1382..9fdc0d1382 100644
--- a/macros/latex/contrib/jmlr/sample-papers/images/teximage.tex
+++ b/macros/latex/contrib/jmlr/example-teximage.tex
diff --git a/macros/latex/contrib/jmlr/jmlr.dtx b/macros/latex/contrib/jmlr/jmlr.dtx
index 14215e52a9..3471406f92 100644
--- a/macros/latex/contrib/jmlr/jmlr.dtx
+++ b/macros/latex/contrib/jmlr/jmlr.dtx
@@ -1,14 +1,14 @@
%\iffalse
% jmlr.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -section "chapter"
-% -doc "jmlr-manual.tex"
% -author "Nicola Talbot"
+% -doc "jmlr-manual.tex"
+% -section "chapter"
% -src "jmlrutils.sty\Z=>jmlrutils.sty"
% -src "jmlr.cls\Z=>jmlr.cls"
-% -src "jmlrbook.cls\Z=>jmlrbook.cls"
+% -src "(jmlrbook.*\.cls)\Z=>\1"
% jmlr
-% Created on 2020/9/21 16:27
+% Created on 2022/1/29 14:54
%\fi
%\iffalse
%<*package>
@@ -31,11 +31,11 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2020 Nicola Talbot, all rights reserved.
+% Copyright (C) 2022 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
-\documentclass[report]{nlctdoc}
+\documentclass[report,widecs]{nlctdoc}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
@@ -45,14 +45,13 @@
bookmarks,
hyperindex=false,
pdfauthor={Nicola L.C. Talbot},
- pdftitle={jmlr: Classes for the Journal of Machine
-Learning Research (JMLR) and Proceedings of Machine Learning
+ pdftitle={Articles for Proceedings of Machine Learning
Research (PMLR)},
- pdfkeywords={LaTeX,jmlr}]{hyperref}
+ pdfkeywords={pmlr,jmlr wcp,jmlr}]{hyperref}
\doxitem{Option}{option}{package options}
-\CheckSum{5265}
+\CheckSum{5415}
\newcommand*{\appopt}[1]{\texttt{-{}-#1}}
@@ -64,47 +63,39 @@ Research (PMLR)},
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{\LaTeXe\ Classes for the Journal of Machine
-%Learning Research (JMLR) and
-%Proceedings of Machine Learning Research (PMLR)}
+% \title{Articles for Proceedings of Machine Learning Research (PMLR)
+%formerly Journal of Machine Learning Research Workshop and
+%Conference Proceedings (JMLR W\&CP)}
% \author{Nicola L. C. Talbot\\[10pt]
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2020-09-21 (version 1.28)}
+% \date{2022-01-29 (version 1.29)}
% \maketitle
%\tableofcontents
%
%\chapter{Introduction}
%
-%The \clsfmt{jmlr} class is for articles that need to be formatted
-%according to the Journal of Machine Learning Research style. This
-%class is based on the \sty{jmlr2e} and \sty{jmlrwcp2e} packages
-%but has been adapted to enable it to work better with the
-%\cls{combine} class to collate the articles into a book.
-%\sectionref{sec:jmlr} describes how to use the \clsfmt{jmlr} class.
-%Note that JMLR W\&CP (JMLR: Workshop and Conference Proceedings)
-%has been renamed PMLR (Proceedings of Machine Learning
-%Research). Articles for new proceedings should use the \clsopt{pmlr}
-%class option.
-%
-%The \clsfmt{jmlrbook} class is for combining articles that use the
-%\clsfmt{jmlr} class into a
-%book. The \clsfmt{jmlrbook} class uses \cls{combine} and \sty{hyperref}, which are
-%troublesome enough on their own but together are quite fragile. The
-%\clsfmt{jmlrbook} class redefines some internals to get
-%\clsfmt{combine} and \clsfmt{hyperref} to work together but some
-%packages (e.g.\ \sty{subfig} and \sty{pdfpages}) are likely to mess
-%everything up and cause errors. This is why the guidelines to
-%authors are fairly stringent and why the \clsfmt{jmlr} class will give an
-%error message if certain packages are loaded.\footnote{Currently
-%\clsfmt{jmlr} will check if \sty{subfig}, \sty{pdfpages},
-%\sty{geometry}, \sty{psfig}, \sty{epsfig}, \sty{theorem},
-%\sty{tabularx}, \sty{amsthm} and \sty{ntheorem} are loaded and will throw an error.
-%If other packages are found to be a problem, they will be added to
-%the list.} The \clsfmt{jmlrbook} class works best with PDF\LaTeX\ so
-%authors should ensure that their articles can compile with
-%PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the
-%\clsfmt{jmlrbook} class.
+%The \clsfmt{jmlr} class was designed primarily for the Journal of
+%Machine Learning Research Workshop and Conference Proceedings (JMLR
+%W\&CP) based on the \sty{jmlrwcp2e} package to make it easier for
+%production editors to combine articles into a single book.
+%
+%The \clsopt{nowcp} option implements the \sty{jmlr2e} style to make it
+%easier to include reprints from JMLR articles. If you are an author
+%wanting to submit an article to the JMLR, please see their
+%guidelines and use their official package.
+%
+%Since the creation of this class, the JMLR W\&CP has changed its name to
+%the Proceedings of Machine Learning Research (PMLR). Articles
+%submitted to the PMLR should use the \clsopt{pmlr} option. Reprints of
+%old JMLR W\&CP articles should use the \clsopt{wcp} option.
+%
+%The \clsfmt{jmlrbook} class was provided to combine articles that
+%use the \clsfmt{jmlr} class into a book. The \cls{combine} class
+%internally used by \clsfmt{jmlrbook} has stopped work following
+%changes to the \LaTeX\ kernel in 2020. This means that the
+%\clsfmt{jmlrbook} class is now deprecated. This only affects
+%production editors not article authors.
%
%As from v1.24, some non-class dependent commands and environments
%have been moved to a new package \sty{jmlrutils} (see
@@ -132,26 +123,6 @@ Research (PMLR)},
%\documentclass{jmlr}
%\end{verbatim}
%
-%There is a Java application called \app{makejmlrbookgui} that can
-%compile all the individual papers from the book and generate the
-%bib file for the proceedings (according to the PMLR specifications). It can also
-%create a grey nonhyperlinked PDF/X compliant print version of the
-%book. The application can be downloaded from
-%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} where
-%there is also a
-%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting
-%section}.
-%
-%The Perl script \app{makejmlrbook} is now deprecated and will be
-%removed in future releases. It has been superseded by
-%\app{makejmlrbookgui}. Note that PMLR (formerly JMLR W\&CP) has new
-%format guidelines that are followed by new versions of
-%\app{makejmlrbookgui} but not by the Perl script \app{makejmlrbook},
-%so that script is no longer documented or supported.
-%The PMLR submission requirements for production editors are now much simpler
-%and can be followed without the assistance of \cls{jmlrbook} or
-%\app{makejmlrbookgui}.
-%
%\section{Required Packages}
%
%The \clsfmt{jmlr} class is based on the \cls{article} class and loads
@@ -162,28 +133,22 @@ Research (PMLR)},
%Note that unlike the \sty{jmlr2e} and \sty{jmlrwcp2e} packages,
%this class file does not load the obsolete \sty{epsfig} package.
%
-%The \clsfmt{jmlrbook} class additionally loads the \cls{combine} class
-%and the following packages: \sty{combnat}, \sty{setspace} and \sty{fink}.
-%
-%The \app{makejmlrbookgui} application requires Java and \TeX.
-%(GhostScript is also required for the print-ready version of the
-%book.)
-%
%\chapter{Guidelines for Article Authors}
%\label{sec:jmlr}
%
-%Article authors should use the \clsfmt{jmlr} class. This class
-%comes with example files \texttt{jmlr-sample.tex} and
-%\texttt{jmlrwcp-sample.tex}, which can be used as templates.
+%Article authors should use the \clsfmt{jmlr} class with the
+%\clsopt{pmlr} option. This class
+%comes with the example file \texttt{pmlr-sample.tex}, which can be used as
+%a template.
%
%The following class options are available:
%\begin{description}
-%\item[\clsopt{nowcp}]The article is for the Journal of Machine
-%Learning Research (default).
%\item[\clsopt{pmlr}] The article is for the Proceedings of Machine
-%Learning Research (PMLR).
+%Learning Research (PMLR).
%\item[\clsopt{wcp}] The article is for JMLR Workshop and Conference
%Proceedings (JMLR W\&CP).
+%\item[\clsopt{nowcp}] The article is for the Journal of Machine
+%Learning Research (default).
%
%\item[\clsopt{twocolumn}] Use two-column style. The title and author
%information will span both columns through the use of the optional
@@ -202,6 +167,12 @@ Research (PMLR)},
%\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment,
%\ics{floatconts} puts the caption at the bottom.
%
+%\item[\clsopt{cleveref}] This option is passed to \sty{jmlrutils}
+%(see \sectionref{sec:jmlrutils}).
+%
+%\item[\clsopt{nocleveref}] This option is passed to \sty{jmlrutils}
+%(see \sectionref{sec:jmlrutils}).
+%
%\end{description}
%
%\section{Title Information}
@@ -317,6 +288,12 @@ Research (PMLR)},
%institute}}}
%\end{verbatim}
%
+%\begin{important}
+%Ensure no space occurs before \cs{nametag} otherwise the surname
+%will be interpreted as an empty string because the space is used to
+%separate the forenames from the surname.
+%\end{important}
+%
%\begin{definition}[\DescribeMacro{\Email}]
%\cs{Email}\marg{author's email}
%\end{definition}
@@ -516,6 +493,18 @@ Research (PMLR)},
%environments listed in \sectionref{sec:theorems}. (Default.)
%\item[\pkgopt{notheorems}] Don't define the theorem commands and
%environments.
+%
+%\item[\pkgopt{cleveref}] Loads \sty{aliascnt} and \sty{cleveref}
+%and defines the theorem environments with aliased counters. Note
+%that this option is largely redundant with \pkgopt{notheorems}. When
+%\sty{jmlrutils} is loaded implicitly by \cls{jmlr}, this option will
+%also ensure that \sty{hyperref} is loaded before \sty{cleveref}. If
+%\sty{jmlrutils} is loaded without \cls{jmlr} then \sty{hyperref}
+%won't be loaded unless \ics{jmlrprehyperref} is defined.
+%
+%\item[\pkgopt{nocleveref}] Don't load \sty{aliascnt} and
+%\sty{cleveref} (default).
+%
%\item[\pkgopt{subfloats}] Define the sub-figure and sub-table
%commands listed in \sectionref{sec:subfloats}. (Default.)
%\item[\pkgopt{nosubfloats}] Don't define the sub-figure and
@@ -639,6 +628,20 @@ Research (PMLR)},
%class, you can prevent \styfmt{jmlrutils} from defining these
%commands with the \pkgopt{nosubfloats} package option.
%
+%Sub-float captions that are wider than the corresponding sub-float content
+%are placed inside a \cs{parbox} set to the width of the sub-float
+%content. This allows long captions to line wrap in a mini-paragraph
+%below the sub-float. However, if the sub-float is very narrow, this
+%can lead to badly-broken sub-captions that generate overfull or
+%underfull hbox warnings. You can specify a minimum width for
+%sub-float captions by setting the following length:
+%\begin{definition}[\DescribeMacro{\jmlrminsubcaptionwidth}]
+%\cs{jmlrminsubcaptionwidth}
+%\end{definition}
+%The default value is 0pt. The value should be set with
+%\cs{setlength}. The assignment can be localised by placing it within
+%a group or environment.
+%
%\begin{definition}[\DescribeMacro{\subfigure}]
%\cs{subfigure}\oarg{title}\oarg{valign}\marg{contents}
%\end{definition}
@@ -1104,11 +1107,16 @@ Research (PMLR)},
%\section{Color vs Grayscale}
%\label{sec:color}
%
-%It's helpful if authors supply grayscale versions of their
-%articles in the event that the article is to be incorporated into
-%a black and white printed book. With external PDF, PNG or JPG
-%graphic files, you just need to supply a grayscale version of the
-%file. For example, if the file is called \texttt{myimage.png},
+%If the proceedings are to be incorporated into a black and white
+%printed book, it can be helpful if authors supply grayscale versions
+%of their image files. This section can be ignored if your article
+%will only be available online.
+%
+%With external PDF, PNG or JPG graphic files, the grayscale version
+%should be named with \texttt{-gray} added to the basename (before
+%the image file extension).
+%
+%For example, if the file is called \texttt{myimage.png},
%then the gray version should be \texttt{myimage-gray.png} or
%\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't
%need to modify your code. The \clsfmt{jmlr} class checks for
@@ -1178,25 +1186,19 @@ Research (PMLR)},
%\chapter{Guidelines for Production Editors}
%\label{sec:jmlrbook}
%
-%The \clsfmt{jmlrbook} class can be used to combine articles that use
-%the \clsfmt{jmlr} document class into a book. The following sample
-%files are provided: \texttt{paper1/paper1.tex},
-%\texttt{paper2/paper2.tex}, \texttt{paper3/paper3.tex},
-%\texttt{jmlr-sample.tex}, \texttt{jmlrwcp-sample.tex},
-%\texttt{jmlrbook-sample.tex} and \texttt{proceedings-sample.tex}.
-%All but the last two are articles using the \clsfmt{jmlr} class. The
-%last two (\texttt{jmlrbook-sample.tex} and
-%\texttt{proceedings-sample.tex}) uses the \clsfmt{jmlrbook} class
-%file to combine the articles into a book. Note that no modifications
-%are needed to the files using the \clsfmt{jmlr} class when they are
-%imported into the book. They can either be compiled as stand-alone
-%articles or with the entire book.
-%
-%Before you compile the book, make sure that all the articles
-%compile as stand-alone documents (and run Bib\TeX\ where
-%necessary). You can use the \app{makejmlrbookgui} application to compile
-%the book. See
-%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} for details.
+%The \clsfmt{jmlrbook} class is now obsolete as it has stopped
+%working following changes to the \LaTeX\ kernel in 2020. The class
+%is described here for archival purposes.
+%
+%To prepare articles for PMLR, you will need to manually set the
+%first page number using:
+%\begin{definition}[\DescribeMacro\firstpageno]
+%\cs{firstpageno}\marg{n}
+%\end{definition}
+%
+%Please follow the
+%\href{https://proceedings.mlr.press/spec.html}{PMLR specifications}.
+%
%
%\section{\clsfmt{jmlrbook} Class Options}
%\begin{description}
@@ -1731,12 +1733,6 @@ Research (PMLR)},
%\clsfmt{jmlrbook} won't find the graphics if the imported articles
%aren't in the same directory as the book.
%
-%The \app{makejmlrbookgui} application provides some diagnostic
-%tools, which can help detect some common problems. It's manual also
-%has a
-%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting
-%section}.
-%
%\StopEventually{\clearpage\phantomsection
% \PrintChanges
% \PrintIndex
@@ -1754,7 +1750,7 @@ Research (PMLR)},
%Non-class dependent code. This package is automatically loaded by
%\cls{jmlr} but may be used with other classes.
% \begin{macrocode}
-\ProvidesPackage{jmlrutils}[2020/09/21 v1.28 (NLCT)]
+\ProvidesPackage{jmlrutils}[2022/01/29 v1.29 (NLCT)]
% \end{macrocode}
% Package options:
%\begin{macro}{\ifjmlrutilsmaths}
@@ -1768,6 +1764,11 @@ Research (PMLR)},
\DeclareOption{maths}{\jmlrutilsmathstrue}
\DeclareOption{nomaths}{\jmlrutilsmathsfalse}
% \end{macrocode}
+% Provide US synonyms
+% \begin{macrocode}
+\DeclareOption{math}{\jmlrutilsmathstrue}
+\DeclareOption{nomath}{\jmlrutilsmathsfalse}
+% \end{macrocode}
%
%\begin{macro}{\ifjmlrutilstheorems}
%Determine if the theorem environments should be provided.
@@ -1781,6 +1782,19 @@ Research (PMLR)},
\DeclareOption{notheorems}{\jmlrutilstheoremsfalse}
% \end{macrocode}
%
+%\begin{macro}{\ifjmlrcleveref}
+%\changes{1.29}{2022-01-29}{new}
+%Determine whether or not to load \sty{cleveref}.
+% \begin{macrocode}
+\newif\ifjmlrcleveref
+\jmlrclevereffalse
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
+\DeclareOption{cleveref}{\jmlrclevereftrue}
+\DeclareOption{nocleveref}{\jmlrclevereffalse}
+% \end{macrocode}
+%
%\begin{macro}{\ifjmlrutilssubfloats}
%Determine if the sub-floats should be provided.
% \begin{macrocode}
@@ -1806,6 +1820,26 @@ Research (PMLR)},
\RequirePackage{amsmath}
\fi
% \end{macrocode}
+%Check if \sty{cleveref} is required. If it is and \sty{hyperref} is
+%also required (which it is if \styfmt{jmlrutils} is being loaded by
+%\cls{jmlr}) then \sty{hyperref} needs to be loaded before
+%\sty{cleveref}.
+% \begin{macrocode}
+\ifjmlrcleveref
+ \ifdef\jmlrprehyperref
+ {
+ \jmlrprehyperref
+ \@ifundefined{@pre@hyperref}{}{\@pre@hyperref\undef\@pre@hyperref}
+ \RequirePackage{hyperref}
+ \let\jmlrprehyperref\relax
+ \@ifundefined{@post@hyperref}{}{\@post@hyperref\undef\@post@hyperref}
+ }
+ {}
+ \RequirePackage{aliascnt}
+ \RequirePackage{cleveref}
+\fi
+% \end{macrocode}
+%
% The conditional \cs{iftablecaptiontop} will already have been
% defined by the \cls{jmlr} class, so only needs to be defined
% if not already done.
@@ -2017,20 +2051,31 @@ Research (PMLR)},
%the \sty{algorithm2e} package will have to be explicitly loaded.
%\begin{macro}{\algocfconts}
%\changes{1.09}{2010/12/01}{new}
+%\changes{1.29}{2022-01-29}{remove use of algorithm2e internal commands}
%Command used by \cs{floatconts} to display the caption contents.
% \begin{macrocode}
\newcommand{\algocfconts}[3]{%
- \@algocf@pre@ruled
- #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt%
- #3\@algocf@pre@ruled
+ \jmlralgorule\par\smallskip
+ #2\label{#1}% caption and label
+ \jmlralgorule\par\smallskip
+ #3% algorithm content
+ \jmlralgorule
}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\jmlralgorule}
+%\changes{1.29}{2022-01-29}{new}
+% \begin{macrocode}
+\newcommand{\jmlralgorule}{\kern2pt\hrule height.8pt depth0pt\kern2pt}
+% \end{macrocode}
+%\end{macro}
+%
% The \env{algorithm} environment should float like a figure or table.
% It should use the same counter as the \env{algorithm2e} environment.
%\changes{1.09}{2010/12/01}{caption set up so that it doesn't use a
%box}
+%\changes{1.29}{2022-01-29}{replaced \cs{hsize} with \cs{linewidth}}
% \begin{macrocode}
\newenvironment{algorithm}[1][htbp]%
{%
@@ -2041,7 +2086,7 @@ Research (PMLR)},
\begin{algocf}[#1]%
\renewcommand\@makecaption[2]{%
\hskip\AlCapHSkip
- \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}%
+ \parbox[t]{\dimexpr\linewidth-\AlCapHSkip}{\algocf@captiontext{##1}{##2}}%
}%
}%
{%
@@ -2211,6 +2256,13 @@ Research (PMLR)},
\newsavebox\@subfloatcontsbox
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\jmlrminsubcaptionwidth}
+%Minimum sub-caption width.
+%\changes{1.29}{2022-01-29}{new}
+% \begin{macrocode}
+ \newlength\jmlrminsubcaptionwidth
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\subfigure}
% \begin{macrocode}
\newcommand*{\subfigure}[1][]{%
@@ -2221,6 +2273,7 @@ Research (PMLR)},
% \end{macrocode}
%\changes{1.09}{2010/12/01}{Added check to determine whether the
%subfigure caption is wider than the subfigure}
+%\changes{1.29}{2022-01-29}{added \cs{jmlrminsubcaptionwidth} comparison}
% \begin{macrocode}
\newcommand*{\@subfigure}[2][b]{%
\advance\c@figure by 1\relax
@@ -2236,8 +2289,18 @@ Research (PMLR)},
\ifdim\@tempdimb>\@tempdima
\settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}%
\addtolength{\@tempdima}{-\@tempdimb}%
- \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
- \parbox[t]{\@tempdima}{\@subfigcap}}%
+ \ifdim\@tempdima>\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\@tempdima}{\@subfigcap}}%
+ \else
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subfigcap}}%
+ \fi
+ \else
+ \ifdim\@tempdimb<\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subfigcap}}%
+ \fi
\fi
\begin{tabular}[#1]{@{}c@{}}%
\usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox
@@ -2354,6 +2417,7 @@ Research (PMLR)},
% \end{macrocode}
%\changes{1.09}{2010/12/01}{Added check to determine whether the
%subtable caption is wider than the subtable}
+%\changes{1.29}{2022-01-29}{added \cs{jmlrminsubcaptionwidth} comparison}
% \begin{macrocode}
\newcommand*{\@subtable}[2][t]{%
\refstepcounter{subtable}%
@@ -2368,8 +2432,18 @@ Research (PMLR)},
\ifdim\@tempdimb>\@tempdima
\settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}%
\addtolength{\@tempdima}{-\@tempdimb}%
- \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
- \parbox[t]{\@tempdima}{\@subtabcap}}%
+ \ifdim\@tempdima>\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\@tempdima}{\@subtabcap}}%
+ \else
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subtabcap}}%
+ \fi
+ \else
+ \ifdim\@tempdimb<\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subtabcap}}%
+ \fi
\fi
\begin{tabular}[#1]{@{}c@{}}%
\usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox
@@ -2699,37 +2773,86 @@ Research (PMLR)},
%\end{environment}
%\begin{environment}{lemma}
% \begin{macrocode}
- \newtheorem{lemma}[theorem]{Lemma}
+ \ifjmlrcleveref
+ \newaliascnt{lemma}{theorem}
+ \newtheorem{lemma}[theorem]{Lemma}
+ \aliascntresetthe{lemma}
+ \crefname{lemma}{lemma}{lemmas}
+ \else
+ \newtheorem{lemma}[theorem]{Lemma}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{proposition}
% \begin{macrocode}
- \newtheorem{proposition}[theorem]{Proposition}
+ \ifjmlrcleveref
+ \newaliascnt{proposition}{theorem}
+ \newtheorem{proposition}[proposition]{Proposition}
+ \aliascntresetthe{proposition}
+ \crefname{proposition}{proposition}{propositions}
+ \else
+ \newtheorem{proposition}[theorem]{Proposition}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{remark}
% \begin{macrocode}
- \newtheorem{remark}[theorem]{Remark}
+ \ifjmlrcleveref
+ \newaliascnt{remark}{theorem}
+ \newtheorem{remark}[remark]{Remark}
+ \aliascntresetthe{remark}
+ \crefname{remark}{remark}{remarks}
+ \else
+ \newtheorem{remark}[theorem]{Remark}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{corollary}
% \begin{macrocode}
- \newtheorem{corollary}[theorem]{Corollary}
+ \ifjmlrcleveref
+ \newaliascnt{corollary}{theorem}
+ \newtheorem{corollary}[corollary]{Corollary}
+ \aliascntresetthe{corollary}
+ \crefname{corollary}{corollary}{corollaries}
+ \else
+ \newtheorem{corollary}[theorem]{Corollary}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{definition}
% \begin{macrocode}
- \newtheorem{definition}[theorem]{Definition}
+ \ifjmlrcleveref
+ \newaliascnt{definition}{theorem}
+ \newtheorem{definition}[definition]{Definition}
+ \aliascntresetthe{definition}
+ \crefname{definition}{definition}{definitions}
+ \else
+ \newtheorem{definition}[theorem]{Definition}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{conjecture}
% \begin{macrocode}
- \newtheorem{conjecture}[theorem]{Conjecture}
+ \ifjmlrcleveref
+ \newaliascnt{conjecture}{theorem}
+ \newtheorem{conjecture}[conjecture]{Conjecture}
+ \aliascntresetthe{conjecture}
+ \crefname{conjecture}{conjecture}{conjectures}
+ \else
+ \newtheorem{conjecture}[theorem]{Conjecture}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{axiom}
% \begin{macrocode}
- \newtheorem{axiom}[theorem]{Axiom}
+ \ifjmlrcleveref
+ \newaliascnt{axiom}{theorem}
+ \newtheorem{axiom}[axiom]{axiom}
+ \aliascntresetthe{axiom}
+ \crefname{axiom}{axiom}{axioms}
+ \else
+ \newtheorem{axiom}[theorem]{Axiom}
+ \fi
% \end{macrocode}
%\end{environment}
% End of theorem definitions.
@@ -2754,7 +2877,7 @@ Research (PMLR)},
% Declare class and required TeX format:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jmlr}[2020/09/21 v1.28 (NLCT) Journal of Machine Learning Research]
+\ProvidesClass{jmlr}[2022/01/29 v1.29 (NLCT) Journal of Machine Learning Research]
% \end{macrocode}
%\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of
%jmlrbook}
@@ -2802,13 +2925,13 @@ Research (PMLR)},
%\begin{option}{draft}
%\changes{1.18}{2013-10-17}{new}
% \begin{macrocode}
-\DeclareOptionX{draft}{\setlength\overfullrule{5pt}}
+\DeclareOptionX{draft}{\PassOptionsToClass{\CurrentOption}{article}}
% \end{macrocode}
%\end{option}
%\begin{option}{final}
%\changes{1.18}{2013-10-17}{new}
% \begin{macrocode}
-\DeclareOptionX{final}{\setlength\overfullrule{0pt}}
+\DeclareOptionX{final}{\PassOptionsToClass{\CurrentOption}{article}}
% \end{macrocode}
%\end{option}
% Can't load \sty{jmlrutils} here but need the \cs{iftablecaptiontop}
@@ -2941,6 +3064,11 @@ Research (PMLR)},
% \begin{macrocode}
\DeclareOptionX{pmlr}{\jmlrpmlr}
% \end{macrocode}
+%Pass cleveref option to jmlrutils
+%\changes{1.29}{2022-01-29}{added cleveref option}
+% \begin{macrocode}
+\DeclareOptionX{cleveref}{\PassOptionsToPackage{cleveref}{jmlrutils}}
+% \end{macrocode}
%\begin{option}{oneside}
%\changes{1.22}{2015/04/11}{new}
% \begin{macrocode}
@@ -3020,6 +3148,12 @@ Research (PMLR)},
% \begin{macrocode}
\AtEndDocument{\@jmlrenddoc}
% \end{macrocode}
+%\changes{1.29}{2022-01-29}{added \sty{placeins}}
+% Need \sty{placeins} to add float barrier at the end of the
+% article.
+% \begin{macrocode}
+\RequirePackage{placeins}
+% \end{macrocode}
% Required packages:
% \begin{macrocode}
\RequirePackage{amsmath}
@@ -3771,8 +3905,10 @@ Keywords:} \ignorespaces}%
% Label end page.
%\begin{macro}{\@jmlrenddoc}
% Label end page
+%\changes{1.29}{2022-01-29}{added float barrier}
% \begin{macrocode}
\newcommand*{\@jmlrenddoc}{%
+ \FloatBarrier
\phantomsection
\protected@edef\@currentlabelname{end of \@shorttitle}%
\label{jmlrend}\null
@@ -4688,6 +4824,14 @@ Keywords:} \ignorespaces}%
%\end{macro}
% Check for packages that are known to cause problems when
% combining articles into a book.
+% Since \cls{jmlrbook} is now deprecated some errors can be
+% converted to warnings, which are suppressed by default.
+%\begin{macro}{\@jmlr@check@warn}
+%\changes{1.29}{2022-01-29}{new}
+% \begin{macrocode}
+\newcommand*{\@jmlr@check@warn}[1]{}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\@jmlr@check@packages}
% \begin{macrocode}
\newcommand*{\@jmlr@check@packages}{%
@@ -4702,13 +4846,13 @@ Keywords:} \ignorespaces}%
Please use \string\includegraphics\space to include images
instead}{}}{}%
\@ifpackageloaded{subfig}{%
- \ClassError{jmlr}{Package `subfig' detected.\MessageBreak
+ \@jmlr@check@warn{Package `subfig' detected.\MessageBreak
This will cause a conflict if the article is incorporated
\MessageBreak
into a book using jmlbook.cls.
\MessageBreak
Please use \string\subfigure\space and
- \string\subtable\space instead}{}}{}%
+ \string\subtable\space instead}}{}%
\@ifpackageloaded{theorem}{%
\ClassError{jmlr}{Package `theorem' detected.\MessageBreak
This can cause a conflict with other packages used by jmlr}{}}{}%
@@ -4718,10 +4862,12 @@ Keywords:} \ignorespaces}%
\@ifpackageloaded{amsthm}{%
\ClassError{jmlr}{Package `amsthm' detected.\MessageBreak
This package conflicts with the jmlr class}{}}{}%
- \@ifpackageloaded{pdfpages}{Package `pdfpages' detected.\MessageBreak
- This can cause a problem for jmlrbook}{}%
- \@ifpackageloaded{geometry}{Package `geometry' detected.\MessageBreak
- This can cause a problem for jmlrbook}{}%
+ \@ifpackageloaded{pdfpages}%
+ {\@jmlr@check@warn{Package `pdfpages' detected.\MessageBreak
+ This can cause a problem for jmlrbook}}{}%
+ \@ifpackageloaded{geometry}%
+ {\@jmlr@check@warn{Package `geometry' detected.\MessageBreak
+ This can cause a problem for jmlrbook}}{}%
\@ifpackageloaded{tabularx}{%
\ClassError{jmlr}{Package `tabularx' detected.\MessageBreak
This will break footnote links}{}}{}%
@@ -4740,8 +4886,6 @@ Keywords:} \ignorespaces}%
%\end{macro}
%\begin{macro}{\jmlrSuppressPackageChecks}
% Don't check for potentially problematic packages.
-% (If I find this in any paper sent to me for inclusion in a book,
-% it will annoy me.)
% \begin{macrocode}
\newcommand*{\jmlrSuppressPackageChecks}{%
\let\@jmlr@check@packages\relax
@@ -4889,7 +5033,7 @@ Keywords:} \ignorespaces}%
% \end{macrocode}
% Declare class:
% \begin{macrocode}
-\ProvidesClass{jmlrbook}[2020/09/21 v1.28 (NLCT) JMLR Book Style]
+\ProvidesClass{jmlrbook}[2022/01/29 v1.29 (NLCT) JMLR Book Style]
% \end{macrocode}
% Need \sty{xkeyval} package to have key=value class options
% \begin{macrocode}
@@ -4929,8 +5073,7 @@ Keywords:} \ignorespaces}%
% \end{macrocode}
% \sty{fink} version too old.
% \begin{macrocode}
- \ClassWarning{jmlrbook}{Install `currfile' package or update
- `fink' package}
+ \ClassWarning{jmlrbook}{`currfile' package required}
}
}
% \end{macrocode}
diff --git a/macros/latex/contrib/jmlr/jmlr.ins b/macros/latex/contrib/jmlr/jmlr.ins
index 108c83e582..65df06fe53 100644
--- a/macros/latex/contrib/jmlr/jmlr.ins
+++ b/macros/latex/contrib/jmlr/jmlr.ins
@@ -1,10 +1,10 @@
-% jmlr.ins generated using makedtx version 1.2 2020/9/21 16:27
+% jmlr.ins generated using makedtx version 1.2 2022/1/29 14:54
\input docstrip
\preamble
jmlr.dtx
- Copyright 2020 Nicola Talbot
+ Copyright 2022 Nicola Talbot
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/jmlr/jmlr.pdf b/macros/latex/contrib/jmlr/jmlr.pdf
index 98ad5b636e..8c14221763 100644
--- a/macros/latex/contrib/jmlr/jmlr.pdf
+++ b/macros/latex/contrib/jmlr/jmlr.pdf
Binary files differ
diff --git a/macros/latex/contrib/jmlr/makejmlrbook b/macros/latex/contrib/jmlr/makejmlrbook
deleted file mode 100755
index 544943fc75..0000000000
--- a/macros/latex/contrib/jmlr/makejmlrbook
+++ /dev/null
@@ -1,1321 +0,0 @@
-#!/usr/bin/env perl
-# File : makejmlrbook
-# Author : Nicola L C Talbot
-# Date : 22nd March 2010
-# Last Modified : 21st September 2020
-# Version : 0.33
-# Description : Given the name of a document using the
-# jmlrbook class file, this script runs
-# pdflatex (and possibly bibtex) on the
-# imported articles and the main document.
-# http://www.dickimaw-books.com/
-#
-# This file is distributed as part of the jmlr LaTeX bundle.
-#
-# *****
-# This script is now obsolete and will be removed in later
-# distributions. Use MakeJmlrBookGUI instead:
-# https://www.dickimaw-books.com/software/makejmlrbookgui
-# *****
-#
-# Copyright (c) 2006-2020 Nicola L.C. Talbot
-# 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 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 Nicola Talbot.
-
-use Getopt::Long;
-use File::Basename;
-use File::Copy;
-use Cwd;
-use strict;
-
-my $version = "0.33 (2020-09-21)";
-
-my $eol = "\n";
-my $dd = '/';
-
-if ($^O eq 'MSWin32')
-{
- $eol = "\r\n";
- $dd = "\\";
-}
-
-my $showversion = 0;
-my $showhelp = 0;
-my $quiet = 0;
-my $batchtex = 0;
-my $online = 1;
-my $print = 1;
-my $html = 1;
-my $latexapp = 'pdflatex';
-my $bibtexapp = 'bibtex';
-my $latexopts = '';
-my $bibtexopts = '';
-my $format = 'pdf';
-my $logourl = '';
-my $extractpreface = 0; # v0.3 added
-# execute system calls (--noexecute will just list the system calls
-# without executing them)
-my $execute = 1; # v0.31 added
-
-my $appname = basename($0);
-
-warn <<__END_OBSOLETE_WARN;
-Warning: $appname is now obsolete and will be removed in later
-distributions. Use MakeJmlrBookGUI instead:
-https://www.dickimaw-books.com/software/makejmlrbookgui
-
-__END_OBSOLETE_WARN
-
-unless(&GetOptions(
- "online!" => \$online,
- "print!" => \$print,
- "html!" => \$html,
- "extractpreface!" => \$extractpreface,
- "logourl=s" => \$logourl,
- "format=s" => \$format,
- "latexapp=s" => \$latexapp,
- "bibtexapp=s" => \$bibtexapp,
- "latexopts=s" => \$latexopts,
- "bibtexopts=s" => \$bibtexopts,
- "quieter!" => \$quiet,
- "batchtex!" => \$batchtex,
- "execute!" => \$execute,
- "version" => \$showversion,
- "help" => \$showhelp))
-{
- die "Use --help for help\n";
-}
-
-if ($showhelp)
-{
- die "$appname version $version Copyright (c) 2010 Nicola L C Talbot\n",
- "Distributed under the LaTeX Project Public License.\n\n",
- "Syntax: $appname [options] <filename>\n\n",
- "<filename> should be the name of the master document for a LaTeX \n",
- "file that uses the jmlrbook class. The .tex extension may be\n",
- "omitted.\n\n",
- "Basic options:\n",
- "--online\t\tGenerate the color on-line version (default)\n",
- "--noonline\t\tDon't generate the color on-line version\n",
- "--print\t\t\tGenerate the grayscale print version (default)\n",
- "--noprint\t\tDon't generate the grayscale print version\n",
- "--html\t\t\tGenerate the HTML version (default)\n",
- "--nohtml\t\tDon't generate the HTML version\n",
- "--extractpreface\tParse document for preface environment\n",
- "--noextractpreface\tDon't parse document for preface environment\n",
- "--logourl <url>\tMake the logo on the HTML index page link to <url>\n",
- "--batchtex\t\tRun TeX in batch mode\n",
- "--nobatchtex\t\tDon't run TeX in batch mode\n",
- "--quieter\t\tReduce messages to stdout and run TeX in batch mode\n",
- "--noquieter\t\tDon't reduce messages to stdout\n",
- "--execute\t\tExecute system calls (default)\n",
- "--noexecute\t\tDon't execute system calls, just list the\n",
- "\t\t\tcommands.\n",
- "--version\t\tDisplay version number and exit\n",
- "--help\t\t\tDisplay help message and exit\n",
- "\nAdvanced options:\n",
- "--latexapp <name>\tApplication used to call LaTeX\n",
- "\t\t\t(Defaults to 'pdflatex')\n",
- "--format <string>\tOutput format (default: 'pdf')\n",
- "--bibtexapp <name>\tApplication used to call BibTeX\n",
- "\t\t\t(Defaults to 'bibtex')\n",
- "--latexopt <string>\tOptions to pass to LaTeX\n",
- "--bibtexopt <string>\tOptions to pass to BibTeX\n";
-}
-
-if ($showversion)
-{
- die "$appname version $version copyright (c) 2010 Nicola L C Talbot\n",
- "Distributed under the LaTeX Project Public License.\n";
-}
-
-unless ($#ARGV == 0)
-{
- die "$appname: missing filename\n",
- "use --help for help\n";
-}
-
-if ($quiet or $batchtex)
-{
- $latexopts = '-interaction=batchmode '.$latexopts;
-}
-
-if ($quiet)
-{
- $bibtexopts = '-terse '.$bibtexopts;
-}
-
-my ($main_name, $main_path, $main_suffix)
- = fileparse($ARGV[0], '\.(tex|ltx)');
-
-$main_suffix = '.tex' unless $main_suffix;
-
-my $org_dir = cwd();
-
-&chdirordie($main_path);
-
-my $mainaux = "$main_name.aux";
-
-# If the aux file doesn't exist or the aux file is older than
-# the main file, run latex
-
-if (not -e $mainaux or (-M $mainaux > -M "$main_name$main_suffix"))
-{
- &latex($main_name);
-}
-
-my $main_bibdata = 0;
-my @imports = ();
-my %pagerefs = ();
-my $preface_data; # v0.3 new
-my @preface_editors = ();
-
-# Parse aux file
-
-&parsemainaux($mainaux);
-
-# Replace any instances of \articlepagesref
-
-foreach my $import (@imports)
-{
- my $label = $import->{'label'};
-
- my $pages = $pagerefs{$label}->{'start'}.'--'
- . $pagerefs{$label}->{'end'};
-
- $import->{'author'}=~s/\\articlepagesref\s*\{$label\}/$pages/;
-}
-
-if ($html)
-{
- # If the html files need to be created, make the directory
- # html-src, if it doesn't already exist
-
- unless (-d 'html-src')
- {
- &mkdirordie('html-src');
- }
-
- unless (-d 'html')
- {
- &mkdirordie('html');
- }
-
- if ($extractpreface) # v0.3 new
- {
- # If the preface needs to be extract, make a directory for it if
- # it doesn't already exist
-
- my $prefdir = &fname("html-src", $preface_data->{'OutFile'});
-
- unless (-d $prefdir)
- {
- &mkdirordie($prefdir);
- }
-
- my $prefbase = &fname($prefdir, $preface_data->{'OutFile'});
-
- &createprefacefile($prefdir, $prefbase);
-
- # Create the cfg file
-
- &createjmlrcfg("html-src", $preface_data->{'OutFile'});
-
- &chdirordie($prefdir);
-
- &latex($preface_data->{'OutFile'});
- &htlatex($preface_data->{'OutFile'}, 'jmlr');
-
- &chdirordie($org_dir, $main_path);
-
- # Check the appropriate subdirectory is in html directory
-
- my $outname = &fname('html', $preface_data->{'OutFile'});
-
- unless (-d $outname)
- {
- &mkdirordie($outname);
- }
-
- # Copy pdf file
-
- &copyordie("$prefbase.$format",
- &fname($outname, "$preface_data->{OutFile}.$format"));
-
- # Copy html file
-
- &copyhtml($preface_data->{'OutFile'}, $preface_data->{'OutFile'});
- }
-}
-
-# Iterate through each imported article
-
-foreach my $import (@imports)
-{
- my $label = $import->{'label'};
- my $importbase = &fname($import->{'path'}, $import->{'name'});
-
- # Check the aux file of this article
-
- my $aux = "$importbase.aux";
-
- # The aux file should exist because running LaTeX on the
- # main file will create the aux file.
-
- my $bibdata = 0;
-
- if (open AUX, $aux)
- {
- &message("Reading '$aux'...\n");
-
- while (<AUX>)
- {
- if (/\\bibdata\b/)
- {
- $bibdata = 1;
- }
- }
-
- close AUX;
- }
- elsif (not $execute)
- {
- warn "Can't open '$aux' - skipping\n";
- }
- else
- {
- die "$appname: Can't open '$aux' $!\n";
- }
-
- # Do we need a bibtex run?
-
- if ($bibdata)
- {
- my $log = "$importbase.log";
-
- # If the log file doesn't exist, run LaTeX
-
- unless (-e $log)
- {
- &chdirordie($import->{'path'});
-
- &latex($import->{'name'});
-
- &chdirordie($org_dir, $main_path);
- }
-
- open LOGFD, $log or die "$appname: Can't open '$log' $!\n";
-
- &message("Reading '$log'...\n");
-
- my $runbibtex = 0;
-
- while (<LOGFD>)
- {
- if (/There were undefined citations\./)
- {
- # Run bibtex and latex
- $runbibtex = 1;
-
- last;
- }
- }
-
- close LOGFD;
-
- if ($runbibtex)
- {
- &chdirordie($import->{'path'});
-
- &bibtex($import->{'name'});
- &latex($import->{'name'});
-
- &chdirordie($org_dir, $main_path);
- }
- }
-
- if ($html)
- {
- # If html is required, we also need pdf versions of the
- # individual articles.
-
- # v0.2 run latex even if pdf file exists to ensure start page
- # number is correct.
-
- &chdirordie($import->{'path'});
-
- &latexstartpage($import->{'name'}, $pagerefs{$label}->{'start'});
-
- &chdirordie($org_dir, $main_path);
-
- # Do we need a rerun?
-
- if (&needs_rerun($importbase))
- {
- &chdirordie($import->{'path'});
-
- &latexstartpage($import->{'name'}, $pagerefs{$label}->{'start'});
-
- &chdirordie($org_dir,$main_path);
- }
-
- my $importdir = $import->{'path'};
-
- if ($importdir = '.')
- {
- $importdir = $import->{'name'};
- }
-
- # Check the appropriate subdirectory is in html-src
-
- my $name = &fname('html-src', $importdir);
-
- unless (-d $name)
- {
- &mkdirordie($name);
- }
-
- my $text = '';
-
- # Read the LaTeX file and store everything up to
- # the end of the abstract
-
- my $tex = "$importbase.tex";
-
- my $absfile = &fname("html-src", $importdir,
- $import->{'name'}.'.tex');
-
- if ($execute)
- {
- open TEX, $tex or die "$appname: Can't open '$tex': $!\n";
-
- while (<TEX>)
- {
- # This doesn't handle complicated cases, such as
- # the author using \abstract ... \endabstract
- # or commenting out the abstract with conditionals
- if (/^([^%]*)\\end\{abstract\}/)
- {
- $text .= $&;
- last;
- }
-
- $text .= $_;
- }
-
- close TEX;
-
- # Add the 'html' class option:
- unless ($text=~
- s/^([^%]*)\\documentclass\s*\[(.*)\]/$1\\documentclass[$2,html]/m)
- {
- $text=~s/^([^%]*)\\documentclass\s*/$1\\documentclass[html]/m;
- }
-
- my $aux = "$importbase.aux";
-
- $aux=~s/\\/\//g if ($dd eq '\\');
-
- my $prebegindoc = '\\hypersetup{draft}' . $eol
- . '\\makeatletter' . $eol
- . "\\input{../../$aux}" . $eol
- . '\\makeatother'
- . $eol;
-
- my $begindoc = '';
-
- # Set the authors
- if (defined($import->{'author'}))
- {
- my $author = $import->{'author'};
-
- $author=~s/^([^;]*);/\\textbf{\\emph{$1};}/;
-
- $begindoc .= "\\jmlrauthors{$author}";
- }
-
- # Add content div
-
- # v0.31 modified \footnote to set the footnote text as in-line
- # parenthesis.
-
- $text=~s/^([^%\n\r\f]*)\\begin\{document\}/
- $prebegindoc$&$begindoc
- \\HCode{<div id="content">}
- \\renewcommand{\\footnote}[2][]{ (\#2)}%$eol
- /mx;
-
- # Create file containing the abstract
-
- open ABSFD,">$absfile"
- or die "$appname: Can't create '$absfile': $!\n";
-
- print ABSFD "\\batchmode", $eol if ($batchtex or $quiet);
-
- my $texpath = $import->{path};
-
- $texpath=~s/\\/\//g if ($dd eq '\\');
-
- print ABSFD
- "\\makeatletter",$eol,
- "\\def\\input\@path{{../../$texpath/}}$eol",
- "\\makeatother",$eol,
- $text, $eol,
- "\\HCode{", &htmltimestamp, "}", $eol,
- "\\HCode{</div>}", $eol,
- &htmlmenu, # v0.3 added by Olivier Chapelle
- "\\end{document}",$eol;
-
- close ABSFD;
- }
- else
- {
- &messagecall("Skipping creation of '$absfile'\n");
- }
-
- # Create the cfg file
-
- &createjmlrcfg("html-src", $importdir);
-
- # Run htlatex
-
- # Change directory
- &chdirordie("html-src", $importdir);
-
- &htlatex($import->{'name'}, 'jmlr');
-
- # Go back to main directory
-
- &chdirordie($org_dir, $main_path);
-
- # Copy the html file to the html directory, but rename
- # the css file to jmlr.css
-
- &copyhtml($importdir, $import->{'name'});
-
- # Check the appropriate subdirectory is in html directory
-
- my $outname = &fname('html', $importdir);
-
- unless (-d $outname)
- {
- &mkdirordie($outname);
- }
-
- # Copy pdf file
-
- &copyordie("$importbase.$format",
- &fname($outname, "$import->{name}.$format"));
- }
-}
-
-# do we need to run bibtex on the main document?
-
-if ($main_bibdata)
-{
- &bibtex($main_name);
-}
-
-if ($online)
-{
- &latexonline($main_name);
-
- # do we need a rerun?
-
- if (&needs_rerun($main_name))
- {
- &message("Rerun required\n");
- &latexonline($main_name);
-
- # check again
-
- if (&needs_rerun($main_name))
- {
- &message("Rerun required\n");
- &latexonline($main_name);
- }
- }
-}
-
-if ($print)
-{
- &latexprint($main_name);
-
- # do we need a rerun?
-
- if (&needs_rerun($main_name))
- {
- &message("Rerun required\n");
- &latexprint($main_name);
-
- # check again
-
- if (&needs_rerun($main_name))
- {
- &message("Rerun required\n");
- &latexprint($main_name);
- }
- }
-}
-
-if ($html and $execute)
-{
- # Make the index file
-
- my $indexfile = &fname('html-src', "index");
-
- my $preamble = '';
-
- open OUTFD, ">$indexfile.tex"
- or die "Can't open '$indexfile.tex': $!\n";
-
- open INFD, "$main_name.tex"
- or die "Can't open '$main_name.tex': $!\n";
-
- print OUTFD "\\batchmode", $eol if ($batchtex or $quiet);
-
- print OUTFD
- "\\makeatletter",$eol,
- "\\def\\input\@path{{../}}$eol",
- "\\makeatother",$eol,
- "\\def\\jmlrgrayscale{0}",$eol;
-
- while (<INFD>)
- {
- unless
- (s/^([^%]*)\\documentclass\s*\[([^\]]*)\]/
- $1\\documentclass[$2,html]/x)
- {
- s/^([^%]*)\\documentclass\s*/$&\[html\]/;
- }
-
- s/^([^%]*)\\begin\{document\}/
- \\hypersetup{draft}$eol$&\\HCode{<div id="content">}/x;
-
- if (/^([^%]*)\\maketitle/)
- {
- $preamble .= join('', $1, "\\maketitle", $eol);
- last;
- }
-
- $preamble .= $_;
- }
-
- close INFD;
-
- # Find the book logo
- if ($preamble
- =~/\\logo\s*(?:\[[^\]]*\])?\s*\{(%\s*\n)?\\includegraphics\s*(\[[^\]]*\])?\{([^}]*)\}\}/m)
- {
- my $texpath = $3;
- my $orgtexpath = $texpath;
- $texpath=~s/\//\\/g if ($dd eq "\\");
-
- my $ext = '';
-
- if (-e $texpath)
- {
- &copyordie($texpath, 'html');
-
- &copyordie($texpath, 'html-src');
- }
- elsif (-e "$texpath.png")
- {
- &copyordie("$texpath.png", 'html');
-
- &copyordie("$texpath.png", 'html-src');
-
- $ext = '.png';
- }
- elsif (-e "$texpath.jpg")
- {
- &copyordie("$texpath.jpg", 'html');
- &copyordie("$texpath.jpg", 'html-src');
-
- $ext = '.jpg';
- }
- elsif (-e "$texpath.gif")
- {
- &copyordie("$texpath.gif", 'html');
-
- &copyordie("$texpath.gif", 'html-src');
-
- $ext = '.gif';
- }
-
- my $img = basename($texpath);
-
- if ($logourl)
- {
- $preamble=~s/
- \\includegraphics(\[[^\]]*\])?\{$orgtexpath\}/
- \\href{$logourl}{\\includegraphics${1}{$img$ext}}/mgx;
- }
- else
- {
- $preamble=~s/
- \\includegraphics(\[[^\]]*\])?\{$orgtexpath\}/
- \\includegraphics${1}{$img$ext}/mgx;
- }
- }
-
- print OUTFD $preamble, $eol;
-
- # Parse TOC
-
- my $toc = "$main_name.toc";
-
- # Add link to preface if required
-
- if ($extractpreface)
- {
- print OUTFD
- "\\begin{description}\\item[\\normalfont \\prefacename]", $eol;
-
- print OUTFD "\\textbf{\\emph{\\jmlrabbrnamelist{{",
- join('},{', @preface_editors),
- "}}};} ",
- '\\csname @jmlrabbrvproceedings\\endcsname\\space',
- '\\csname @jmlrvolume\\endcsname:',
- $preface_data->{'Start'};
-
- unless ($preface_data->{'Start'} eq $preface_data->{'End'})
- {
- print OUTFD '--', $preface_data->{'End'};
- }
-
- print OUTFD ', \\csname @jmlryear\\endcsname\\newline', $eol;
-
- my $name = $preface_data->{'OutFile'};
-
- print OUTFD "[\\HCode{<a href=\"$name.html\">html</a>}] ",
- "[\\HCode{<a href=\"$name/$name.pdf\">pdf</a>}]",
- $eol;
-
- print OUTFD "\\end{description}$eol";
- }
-
- open TOC, $toc or die "Can't open '$toc': $!\n";
-
- my $idx = 0;
-
- while (<TOC>)
- {
- if (/^\\tocpart\s*\{(.*)\}\s*$/)
- {
- print OUTFD "\\begin{center}\\bfseries $1\\end{center}$eol";
- }
- elsif (/\\contentsline\s*\{papertitle\}\{(.*)\}\{[^{}]*\}\{[^{}]*\}\s*$/)
- {
- # v0.3 Changed by Olivier Chapelle to use description
- # environment instead of paragraph break
- print OUTFD "\\begin{description}\\item[\\normalfont $1]$eol";
- }
- elsif (/\\contentsline\s*\{chapterauthor\}\{(.*)\}\{[^{}]*\}\{[^{}]*\}\s*$/)
- {
- my $details = $1;
- $details=~s/([^;]*);/\\textbf{\\emph{$1};}/;
-
- my $label = $imports[$idx]->{'label'};
- my $pages = $pagerefs{$label}->{'start'}.'--'
- . $pagerefs{$label}->{'end'};
-
- $details=~s/\\articlepagesref\s*\{$label\}/$pages/;
-
- # v0.3 Changed by Olivier Chapelle to use newline instead of par
- print OUTFD "$details\\newline$eol";
-
- my $name = $imports[$idx]->{'name'};
-
- print OUTFD "[\\HCode{<a href=\"$name.html\">abs</a>}] ",
- "[\\HCode{<a href=\"$name/$name.pdf\">pdf</a>}]",
- $eol;
-
- # v0.3 Changed by Olivier Chapelle to end description
- print OUTFD "\\end{description}$eol";
-
- $idx++;
- }
- }
-
- close TOC;
-
- # version 0.2 added time stamp
-
- print OUTFD "\\HCode{", &htmltimestamp, "}$eol";
-
- print OUTFD &htmlmenu; # v0.3 Added by Olivier Chapelle
-
- print OUTFD "\\HCode{</div>}\\end{document}$eol";
-
- close OUTFD;
-
- # Go into html-src directory and run htlatex
-
- &chdirordie('html-src');
-
- &htlatex("index", 'xhtml');
-
- &chdirordie('..');
-
- # Copy to html directory
-
- my $inname = &fname('html-src', 'index.html');
- my $outname = &fname('html', 'index.html');
-
- open INFD, $inname or die "Can't open '$inname': $!\n";
-
- open OUTFD, ">$outname" or die "Can't open '$outname': $!\n";
-
- while (<INFD>)
- {
- s/href="index.css"/href="jmlr.css"/;
-
- print OUTFD;
- }
-
- close OUTFD;
-
- close INFD;
-
- # v0.2 new:
- # Copy any images generated by htlatex to html/
-
- my @imagefiles = glob(&fname('html-src', "index*.png"));
-
- foreach my $imagefile (@imagefiles)
- {
- copy($imagefile, 'html');
- }
-}
-elsif ($html)
-{
- &messagecall("chdir 'html-src'\n");
- &htlatex("index", 'xhtml');
-}
-
-# Return to original directory
-chdir $org_dir;
-
-# Subroutines
-
-sub message{ print @_ unless ($quiet) }
-
-sub messagecall{ print @_ if (not $quiet or not $execute) }
-
-sub systemcall{
- my $cmd = shift;
-
- &messagecall($cmd, "\n");
-
- my $code = 0;
-
- $code = system($cmd) if ($execute);
-
- $code;
-}
-
-sub latex{
- my $file = shift;
-
- my $code = &systemcall(join(' ', $latexapp, $latexopts, "\"$file\""));
-
- if ($code)
- {
- die "**LaTeX run failed with exit code $code.**\n",
- "Check '$file.log' for details\n";
- }
-}
-
-# v0.2 new
-sub latexstartpage{
- my $file = shift;
- my $page = shift;
-
- my $code = &systemcall(join(' ', $latexapp, $latexopts,
- "\"\\def\\startpage{$page}\\input{$file}\""));
-
- if ($code)
- {
- die "**LaTeX run failed with exit code $code.**\n",
- "Check '$file.log' for details\n";
- }
-}
-
-sub copyordie{
- my ($org, $dest) = @_;
-
- &messagecall("copy '$org' to '$dest'\n");
-
- if ($execute)
- {
- copy($org, $dest) or die "Can't copy '$org' to '$dest': $!\n";
- }
-}
-
-sub latexonline{
- my $file = shift;
-
- my $code = &systemcall(join(' ', $latexapp, $latexopts,
- "\"\\def\\jmlrgrayscale{0}\\input{$file}\""));
-
- if ($code)
- {
- die "**LaTeX run failed with exit code $code.**\n",
- "Check '$file.log' for details\n";
- }
-
- &copyordie("$file.$format", "$file-online.$format");
-}
-
-sub latexprint{
- my $file = shift;
-
- my $code = &systemcall(join(' ', $latexapp, $latexopts,
- "\"\\def\\jmlrgrayscale{1}\\input{$file}\""));
-
- if ($code)
- {
- die "**LaTeX run failed with exit code $code.**\n",
- "Check '$file.log' for details\n";
- }
-
- &copyordie("$file.$format", "$file-print.$format");
-}
-
-sub bibtex{
- my $file = shift;
-
- my $code = &systemcall(
- join(' ', $bibtexapp, $bibtexopts, "\"$file\""));
-
- if ($code)
- {
- die "**BibTeX run failed with exit code $code.**\n",
- "Check '$file.blg' for details\n";
- }
-}
-
-sub needs_rerun{
- my $file = shift;
- my $rerun = 0;
-
- unless ($execute)
- {
- &messagecall("Skipping rerun check for '$file'\n");
- return 0;
- }
-
- # Scan log file for rerun message
-
- my $log = "$file.log";
-
- # If there's no log file a run is needed
- open LOGFD, $log or return 1;
-
- while (<LOGFD>)
- {
- if (/Rerun to get cross-references right\./)
- {
- $rerun = 1;
- last;
- }
- }
-
- close LOGFD;
-
- return $rerun;
-}
-
-sub fname{ join($dd, @_) }
-
-# v0.3 new
-sub chdirordie{
- my $dirname = &fname(@_);
-
- &messagecall("chdir '$dirname'\n");
-
- unless (chdir $dirname)
- {
- if ($execute)
- {
- die "$appname: Can't change directory to $dirname: $!\n";
- }
- else
- {
- warn "(Can't change directory to '$dirname')\n";
- }
- }
-}
-
-# v0.31 new
-sub mkdirordie{
- my $dirname = &fname(@_);
-
- &messagecall("mkdir '$dirname'\n");
-
- unless (mkdir $dirname)
- {
- if ($execute)
- {
- die "$appname: Can't create directory '$dirname': $!\n";
- }
- else
- {
- warn "(Can't create directory '$dirname')\n";
- }
- }
-}
-
-# v0.2 new
-sub htmltimestamp{
- my $timestamp = localtime;
-
- return "<hr><center>Page last modified on $timestamp.</center>";
-}
-
-# v0.3 Added by Olivier Chapelle
-sub htmlmenu{
- return '
-\\HCode{<div id="fixed"><br>}
-\\HCode{<a align="right" href="http://www.jmlr.org" target=_top><img align="right" class="jmlr" src="http://jmlr.csail.mit.edu/jmlr.jpg" border="0"></a>}
-\\HCode{<p><br><br>}
-\\HCode{<p align="right"> <A href="http://www.jmlr.org/"> Home Page </A>}
-\\HCode{<p align="right"> <A href="/papers"> Papers </A>}
-\\HCode{<p align="right"> <A href="/author-info.html"> Submissions </A>}
-\\HCode{<p align="right"> <A href="/news.html"> News </A>}
-\\HCode{<p align="right"> <A href="/scope.html"> Scope </A>}
-\\HCode{<p align="right"> <A href="/editorial-board.html"> Editorial Board </A>}
-\\HCode{<p align="right"> <A href="/announcements.html"> Announcements </A>}
-\\HCode{<p align="right"> <A href="/proceedings"> Proceedings </A>}
-\\HCode{<p align="right"> <A href="/mloss">Open Source Software</A>}
-\\HCode{<p align="right"> <A href="/search-jmlr.html"> Search </A>}
-\\HCode{<p align="right"> <A href="/manudb"> Login </A></p>}
-\\HCode{<br><br>}
-\\HCode{<p align="right"> <A href="http://jmlr.csail.mit.edu/jmlr.xml">}
-\\HCode{<img src="http://jmlr.csail.mit.edu/RSS.gif" class="rss" alt="RSS Feed">}
-\\HCode{</A>}
-\\HCode{</div>}
-'
-}
-
-# v0.3 new
-sub htlatex{
- my ($filename, $cfg) = @_;
-
- # unicode-related options suggested by Olivier Chapelle
-
- # v0.31 added latex options in 5th parameter
-
- my $code = &systemcall(join(' ', 'htlatex',
- "\"$filename\"",
- "\"$cfg,uni-html4\"",
- "\" -cunihtf -utf8\"",
- '""',
- "\" $latexopts\""
- ));
-
- if ($code)
- {
- die "$appname: htlatex failed with exit code $code.\n";
- }
-}
-
-#v0.3 new
-sub createjmlrcfg{
- my $cfg = &fname(@_, "jmlr.cfg");
-
- unless ($execute)
- {
- &messagecall("Skipping creation of '$cfg'\n");
- return;
- }
-
- open CFG, ">$cfg" or die "$appname: Can't create '$cfg': $!\n";
-
-print CFG <<END_CFG;
-\\Preamble{html}
-\\begin{document}
-\\Css{div.maketitle {text-align:left;}}
-\\Css{h2.titleHead {text-align:left;}}
-\\Css{. {font-family:verdana,helvetica,sans-serif}}
-\\Css{a {text-decoration:none;color:\\#3030a0}}
-\\Css{.cmbx-10x-x-109{ font-weight: bold;}}
-\\Css{.cmbxti-10x-x-109{ font-weight: bold; font-style: italic;}}
-\\Css{\\#fixed {position:absolute; top:0; left:0; width:8em;
-height:100\\%;}}
-\\Css{\\#content {margin-top:1em; margin-left:10em;
-margin-right:0.5em;}}
-\\Css{img.jmlr {width: 7em;}}
-\\Css{img.rss {width: 2em;}}
-\\EndPreamble
-END_CFG
-
-# v0.3 Last four \Css lines above added by Olivier Chapelle
- close CFG;
-}
-
-#v0.3 new
-# copy html from html-src/$dir/ to html/ and rename css file
-sub copyhtml{
- my ($dir, $name) = @_;
-
- my $infile = &fname("html-src", $dir, "$name.html");
-
- my $outfile = &fname("html", "$name.html");
-
- unless ($execute)
- {
- &messagecall("Copy '$infile' to '$outfile'\n");
- return;
- }
-
- open INFD, $infile or die "Can't open '$infile': $!\n";
-
- open OUTFD, ">$outfile" or die "Can't open '$outfile': $!\n";
-
- while (<INFD>)
- {
- s/href="$name\.css"/href="jmlr.css"/;
-
- print OUTFD;
- }
-
- close OUTFD;
-
- close INFD;
-
- # Copy css file
-
- &copyordie("html-src/$dir/$name.css", "html/jmlr.css");
-}
-
-sub parsemainaux{
- my $mainaux = shift;
-
- &message("Reading '$mainaux'...\n");
-
- unless (open AUX, "$mainaux")
- {
- if ($execute)
- {
- die "$appname: Can't open '$mainaux' $!\n";
- }
- else
- {
- warn "(Can't open '$mainaux' - skipping)\n";
- return;
- }
- }
-
- while (<AUX>)
- {
- if (/\\bibdata\b/)
- {
- $main_bibdata = 1;
- }
- elsif (/\\\@jmlr\@import\{(.*)\}\{(.*)\}\{(.*)\}/)
- {
- my $import =
- {
- label => $1,
- path => $2,
- name => $3
- };
-
- $import->{'name'} =~s/\.(tex|ltx)\Z//;
-
- push @imports, $import;
- }
- elsif (/\\contentsline\s*\{chapterauthor\}\{(.*)\}\{\}\{\}}\s*$/
- and $#imports > -1)
- {
- $imports[$#imports]->{'author'} = $1;
- }
- elsif (/^\\newlabel\s*\{([^\}]*)jmlrstart\}\{\{([^\}]*)\}\{([^\}]*)\}/)
- {
- my $label = $1;
-
- $pagerefs{$label}->{'start'} = $3;
- }
- elsif (/^\\newlabel\s*\{([^\}]*)jmlrend\}\{\{([^\}]*)\}\{([^\}]*)\}/)
- {
- my $label = $1;
-
- $pagerefs{$label}->{'end'} = $3;
- }
- elsif ($extractpreface) # v0.3 new
- {
- if (/^\\\@prefacestart\{([^\}]*)\}\{(\d*)\}/)
- {
- $preface_data->{'Start'} = $1;
- $preface_data->{'StartArabic'} = $2;
- }
- elsif (/^\\\@prefaceend\{([^\}]*)\}/)
- {
- $preface_data->{'End'} = $1;
- }
- elsif (/^\\\@prefacefile\{([^\}]*)\}\{([^\}]*)\}/)
- {
- $preface_data->{'File'} = $1;
- $preface_data->{'OutFile'} = $2;
- }
- elsif (/^\\\@prefaceeditor\{(.*)\}/)
- {
- my $name = $1;
- $name=~s/\\\\.*//;
- push @preface_editors, $name;
- }
- }
- }
-
- # if preface is to be extracted, has the require data been found?
-
- if ($extractpreface)
- {
- unless ($preface_data->{'File'})
- {
- warn "$appname: Can't find preface information in aux file.\n",
- "Have you used the preface environment?\n";
-
- $extractpreface = 0;
- }
- }
-
- close AUX;
-}
-
-sub createprefacefile{
- my ($prefdir, $prefbase) = @_;
-
- my $prefout = "$prefbase.tex";
-
- &messagecall("Create preface file '$prefout'\n");
-
- return unless ($execute);
-
- # Open preface output file
-
- open PREFOUT, ">$prefout"
- or die "$appname: Can't open '$prefout': $!\n";
-
- print PREFOUT "\\batchmode", $eol if ($batchtex or $quiet);
- print PREFOUT "\\makeatletter", $eol;
- print PREFOUT "\\def\\input\@path{{../../}}", $eol;
- print PREFOUT "\\makeatother", $eol;
-
- # Get the book's preamble
-
- my $filename = "$main_name$main_suffix";
-
- open BOOK, $filename
- or die "$appname: Can't open '$filename': $!\n";
-
- while (<BOOK>)
- {
- if (/\\documentclass/)
- {
- unless (s/^([^%]*)\\documentclass\s*\[(.*)\]/$1\\documentclass[$2,html]/m)
- {
- s/^([^%]*)\\documentclass\s*/$1\\documentclass[html]/m;
- }
-
- print PREFOUT;
- }
- elsif (/^\\begin{document}/)
- {
- if ($preface_data->{'Start'}=~/^[clxvi]+$/)
- {
- print PREFOUT "\\pagenumbering{roman}%", $eol;
- }
- elsif ($preface_data->{'Start'}=~/^[CLXVI]+$/)
- {
- print PREFOUT "\\pagenumbering{Roman}%", $eol;
- }
-
- print PREFOUT
- "\\setcounter{page}{",
- $preface_data->{'StartArabic'},
- "}%", $eol;
-
- # \hypersetup{draft} is used to suppress links.
- # (Only a partial document so internal links may be
- # dead. Also prevents unwanted tag before the DOCTYPE
- # line in the HTML file.)
-
- print PREFOUT
- "\\hypersetup{draft}", $eol,
- '\\makeatletter',
- "\\\@openrightfalse\\input{../../$main_name.aux}",
- '\\makeatother', $eol;
-
- print PREFOUT
- "\\providecommand{\\HCode}[1]{}", $eol,
- "\\title{\\prefacename}", $eol,
- "\\begin{document}", $eol,
- "\\HCode{<div id=\"content\">}", $eol;
-
- last;
- }
- else
- {
- print PREFOUT;
- }
- }
-
- close BOOK;
-
- # Preface file name will have '/' as directory divider
-
- my $preffile = $preface_data->{'File'};
-
- if ($dd eq "\\")
- {
- $preffile=~s/\//\\/g;
- }
-
- open PREFIN, $preffile
- or die "$appname: Can't open '$preffile': $!\n";
-
- my $scanning = 0;
-
- while (<PREFIN>)
- {
- # This is fairly primitive and works best when the begin
- # and end of the environment are on their own line.
-
- if (/\\begin\{preface\}/)
- {
- print PREFOUT;
- $scanning = 1;
- }
- elsif ($scanning)
- {
- print PREFOUT;
-
- last if /\\end\{preface\}/;
- }
- }
-
- close PREFIN;
-
- print PREFOUT
- "\\HCode{", &htmltimestamp, "}", $eol,
- "\\HCode{</div>}", $eol,
- &htmlmenu,
- "\\end{document}", $eol;
-
- close PREFOUT;
-
-}
-
-1;
diff --git a/macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib b/macros/latex/contrib/jmlr/pmlr-sample.bib
index ddc24c6662..ddc24c6662 100644
--- a/macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib
+++ b/macros/latex/contrib/jmlr/pmlr-sample.bib
diff --git a/macros/latex/contrib/jmlr/pmlr-sample.pdf b/macros/latex/contrib/jmlr/pmlr-sample.pdf
new file mode 100644
index 0000000000..65f05536a0
--- /dev/null
+++ b/macros/latex/contrib/jmlr/pmlr-sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex b/macros/latex/contrib/jmlr/pmlr-sample.tex
index 470e2d9215..165fa2510a 100644
--- a/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex
+++ b/macros/latex/contrib/jmlr/pmlr-sample.tex
@@ -1,6 +1,4 @@
- %\documentclass[wcp,gray]{jmlr} % test grayscale version
- %\documentclass[wcp]{jmlr}% former name JMLR W\&CP
-\documentclass[pmlr]{jmlr}% new name PMLR (Proceedings of Machine Learning)
+\documentclass[pmlr]{jmlr}% new name PMLR (Proceedings of Machine Learning Research)
% The following packages will be automatically loaded:
% amsmath, amssymb, natbib, graphicx, url, algorithm2e
@@ -37,12 +35,18 @@
A Line Break\titletag{\thanks{sample footnote}}}
% Use \Name{Author Name} to specify the name.
+
+ % Spaces are used to separate forenames from the surname so that
+ % the surnames can be picked up for the page header and copyright footer.
+
% If the surname contains spaces, enclose the surname
% in braces, e.g. \Name{John {Smith Jones}} similarly
% if the name has a "von" part, e.g \Name{Jane {de Winter}}.
% If the first letter in the forenames is a diacritic
% enclose the diacritic in braces, e.g. \Name{{\'E}louise Smith}
+ % *** Make sure there's no spurious space before \nametag ***
+
% Two authors with the same address
\author{\Name{Author Name1\nametag{\thanks{with a note}}} \Email{abc@sample.com}\and
\Name{Author Name2} \Email{xyz@sample.com}\\
@@ -92,7 +96,7 @@ List of keywords
\label{sec:intro}
This is a sample article that uses the \textsf{jmlr} class with
-the \texttt{wcp} class option. Please follow the guidelines in
+the \texttt{pmlr} class option. Please follow the guidelines in
this sample document as it can help to reduce complications when
combining the articles into a book. Please avoid using obsolete
commands, such as \verb|\rm|, and obsolete packages, such as
@@ -158,10 +162,10 @@ Referencing tables: \tableref{tab:operatornames} or
\tableref{tab:operatornames,tab:example} or
\tableref{tab:operatornames,tab:example,tab:example-booktabs}.
-Referencing figures: \figureref{fig:nodes} or
-\figureref{fig:nodes,fig:teximage} or
-\figureref{fig:nodes,fig:teximage,fig:subfigex} or
-\figureref{fig:circle,fig:square}.
+Referencing figures: \figureref{fig:image} or
+\figureref{fig:image,fig:teximage} or
+\figureref{fig:image,fig:teximage,fig:subfigex} or
+\figureref{fig:image-a,fig:image-b}.
Referencing algorithms: \algorithmref{alg:gauss} or
\algorithmref{alg:gauss,alg:moore} or
@@ -375,7 +379,7 @@ siunitx} or \url{http://www.ctan.org/pkg/siunitx}}.
\floatconts
{tab:example-siunitx}
{\caption{A Table With Numbers Aligned on the Decimal Point}}
- {\begin{tabular}{lS[tabformat=3.5]}
+ {\begin{tabular}{lS}
\bfseries Dataset & {\bfseries Result}\\
Data1 & 0.12345\\
Data2 & 10.6789\\
@@ -406,15 +410,15 @@ caption and center the image. Use \verb|\includegraphics|
for external graphics files but omit the file extension. Do not
use \verb|\epsfig| or \verb|\psfig|. If you want to scale the
image, it's better to use a fraction of the line width rather
-than an explicit length. For example, see \figureref{fig:nodes}.
+than an explicit length. For example, see \figureref{fig:image}.
\begin{figure}[htbp]
% Caption and label go in the first argument and the figure contents
% go in the second argument
\floatconts
- {fig:nodes}
+ {fig:image}
{\caption{Example Image}}
- {\includegraphics[width=0.5\linewidth]{images/nodes}}
+ {\includegraphics[width=0.5\linewidth]{example-image}}
\end{figure}
If your image is made up of \LaTeX\ code (for example, commands
@@ -427,18 +431,19 @@ For example, see \figureref{fig:teximage}.
\floatconts
{fig:teximage}
{\caption{Image Created Using \LaTeX\ Code}}
- {\includeteximage[angle=45]{images/teximage}}
+ {\includeteximage[angle=45]{example-teximage}}
\end{figure}
If the figure is too wide to fit on the page, you can use the
\texttt{sidewaysfigure} environment defined in the
\textsf{rotating} package.
-Don't use \verb|\graphicspath|. If the images are contained in
-a subdirectory, specify this when you include the image, for
-example \verb|\includegraphics{figures/mypic}|.
+It's best not to use \verb|\graphicspath| with the \textsf{jmlr} class
+as it can cause problems with the production editing process. If the
+images are contained in a subdirectory, specify this when you
+include the image, for example \verb|\includegraphics{figures/mypic}|.
-\subsubsection{Sub-Figures}
+\subsection{Sub-Figures}
\label{sec:subfigures}
Sub-figures can be created using \verb|\subfigure|, which is
@@ -447,20 +452,20 @@ you to provide a subcaption. The label should be placed in the
mandatory argument of \verb|\subfigure|. You can reference the
entire figure, for example \figureref{fig:subfigex}, or you can
reference part of the figure using \verb|\figureref|, for example
-\figureref{fig:circle}. Alternatively you can reference the
+\figureref{fig:image-a}. Alternatively you can reference the
subfigure using \verb|\subfigref|, for example
-\subfigref{fig:circle,fig:square} in \figureref{fig:subfigex}.
+\subfigref{fig:image-a,fig:image-b} in \figureref{fig:subfigex}.
\begin{figure}[htbp]
\floatconts
{fig:subfigex}
{\caption{An Example With Sub-Figures.}}
{%
- \subfigure[A Circle]{\label{fig:circle}%
- \includegraphics[width=0.2\linewidth]{images/circle}}%
+ \subfigure[Image A]{\label{fig:image-a}%
+ \includegraphics[width=0.2\linewidth]{example-image-a}}%
\qquad
- \subfigure[A Square]{\label{fig:square}%
- \includegraphics[width=0.2\linewidth]{images/square}}
+ \subfigure[Image B]{\label{fig:image-b}%
+ \includegraphics[width=0.25\linewidth]{example-image-b}}
}
\end{figure}
@@ -468,20 +473,42 @@ By default, the sub-figures are aligned on the baseline.
This can be changed using the second optional argument
of \verb|\subfigure|. This may be \texttt{t} (top), \texttt{c}
(centered) or \texttt{b} (bottom). For example, the subfigures
-\subfigref{fig:circle2,fig:square2} in \figureref{fig:subfigex2}
+\subfigref{fig:image-a2,fig:image-b2} in \figureref{fig:subfigex2}
both have \verb|[c]| as the second optional argument.
\begin{figure}[htbp]
\floatconts
{fig:subfigex2}
- {\caption{Another Example With Sub-Figures.}}
+ {\caption{Another Example With Sub-Figures (with a Cramped
+ Sub-Caption).}}
{%
- \subfigure[A Small Circle][c]{\label{fig:circle2}%
- \includegraphics[width=0.1\linewidth]{images/circle}}%
+ \subfigure[Image A][c]{\label{fig:image-a2}%
+ \includegraphics[width=0.1\linewidth]{example-image-a}}%
\qquad
- \subfigure[A Square][c]{\label{fig:square2}%
- \includegraphics[width=0.2\linewidth]{images/square}}
- }
+ \subfigure[Image B][c]{\label{fig:image-b2}%
+ \includegraphics[width=0.3\linewidth]{example-image-b}}
+ }%
+\end{figure}
+
+Note that a very narrow sub-float will leave little space for the
+sub-caption, which will likely cause Underfull/Overfull hbox warnings.
+
+You can set the length \verb|\jmlrminsubcaptionwidth| to indicate
+the minimum width to be made available for the sub-captions, as in
+\figureref{fig:subfigex3}.
+
+\begin{figure}[htbp]
+\floatconts
+ {fig:subfigex3}
+ {\caption{Another Example With Sub-Figures (with a Less Cramped
+ Sub-Caption).}}
+ {\setlength{\jmlrminsubcaptionwidth}{0.2\linewidth}%
+ \subfigure[Image A][c]{\label{fig:image-a3}%
+ \includegraphics[width=0.1\linewidth]{example-image-a}}%
+ \qquad
+ \subfigure[Image B][c]{\label{fig:image-b3}%
+ \includegraphics[width=0.2\linewidth]{example-image-b}}
+ }%
\end{figure}
\subsection{Sub-Tables}
@@ -577,9 +604,6 @@ float like figures and tables.
}
\end{algorithm}
-You can use \verb|\caption| and \verb|\label| without using
-\verb|\floatconts| (as in \algorithmref{alg:moore}).
-
If you'd rather have the same numbering throughout the algorithm
but still want the convenient indentation of nested
\texttt{enumerate} environments, you can use the
@@ -587,7 +611,10 @@ but still want the convenient indentation of nested
class. For example, see \algorithmref{alg:moore}.
\begin{algorithm}
-\caption{Moore's Shortest Path}\label{alg:moore}
+\floatconts
+{alg:moore}% label
+{\caption{Moore's Shortest Path}}%caption
+{% main float content
Given a connected graph $G$, where the length of each edge is 1:
\begin{enumerate*}
\item Set the label of vertex $s$ to 0
@@ -606,6 +633,7 @@ Given a connected graph $G$, where the length of each edge is 1:
\end{enumerate*}
\end{enumerate*}
\end{enumerate*}
+}
\end{algorithm}
Pseudo code can be displayed using the \texttt{algorithm2e}
@@ -716,49 +744,12 @@ This is an axiom.
This is an example.
\end{example}
-\section{Color vs Grayscale}
-\label{sec:color}
-
-It's helpful if authors supply grayscale versions of their
-images in the event that the article is to be incorporated into
-a black and white printed book. With external PDF, PNG or JPG
-graphic files, you just need to supply a grayscale version of the
-file. For example, if the file is called \texttt{myimage.png},
-then the gray version should be \texttt{myimage-gray.png} or
-\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't
-need to modify your code. The \textsf{jmlr} class checks for
-the existence of the grayscale version if it is print mode
-(provided you have used \verb|\includegraphics| and haven't
-specified the file extension).
-
-You can use \verb|\ifprint| to determine which mode you are in.
-For example, in \figureref{fig:nodes}, the
-\ifprint{dark gray}{purple} ellipse represents an input and the
-\ifprint{light gray}{yellow} ellipse represents an output.
-Another example: {\ifprint{\bfseries}{\color{red}}important text!}
-
-You can use the class option \texttt{gray} to see how the
-document will appear in gray scale mode. \textcolor{blue}{Colored
-text} will automatically be converted to gray scale.
-
-The \textsf{jmlr} class loads the \textsf{xcolor}
-package, so you can also define your own colors. For example:
-\ifprint
- {\definecolor{myred}{gray}{0.5}}%
- {\definecolor{myred}{rgb}{0.5,0,0}}%
-\textcolor{myred}{XYZ}.
-
-The \textsf{xcolor} class is loaded with the \texttt{x11names}
-option, so you can use any of the x11 predefined colors (listed
-in the \textsf{xcolor} documentation\footnote{either
-\texttt{texdoc xcolor} or \url{http://www.ctan.org/pkg/xcolor}}).
-
\section{Citations and Bibliography}
\label{sec:cite}
The \textsf{jmlr} class automatically loads \textsf{natbib}.
This sample file has the citations defined in the accompanying
-BibTeX file \texttt{jmlr-sample.bib}. For a parenthetical
+BibTeX file \texttt{pmlr-sample.bib}. For a parenthetical
citation use \verb|\citep|. For example
\citep{guyon-elisseeff-03}. For a textual citation use
\verb|\citet|. For example \citet{guyon2007causalreport}.
diff --git a/macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png b/macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png
deleted file mode 100644
index 3baf8157e9..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-books/bookLogo.png b/macros/latex/contrib/jmlr/sample-books/bookLogo.png
deleted file mode 100644
index e9ae63dacf..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/bookLogo.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf b/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf
deleted file mode 100644
index 6bfdf86a8f..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex b/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex
deleted file mode 100644
index 465bca51f7..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex
+++ /dev/null
@@ -1,247 +0,0 @@
- % Define \jmlrprehyperref to load packages before hyperref is
- % loaded
-\def\jmlrprehyperref{%
- % Packages used by imported articles:
- \usepackage{lipsum}
- \usepackage{booktabs}
- \usepackage{siunitx}
-}
-\documentclass[wcp,7x10]{jmlrbook}% on-line color version, 7inx10in
- %\documentclass[wcp,gray,7x10]{jmlrbook}% print version, 7inx10in
-
- % Load last
- \ifprint{}{\usepackage{bookmark}}
-
- % Title is added to the PDF properties. Optional argument
- % is used instead, if present.
- %\title[Short Title]{Big Long Title}
-\title{A Sample Book}
-
-\author[Anne Editor et al.]{Anne Editor, Anne Other Editor and Nicola Talbot}
-
- % change the arguments, as appropriate, in the following:
-\volume{1}
-\subtitle{Making a Book from JMLR Articles}
-\logo{\includegraphics{bookLogo}}
-\team{The Sample Book Team}
-
-\productioneditor{Nicola Talbot}
-
-\begin{document}
-\maketitle
-
-\frontmatter
-
-\chapter{Foreword}
-
-This is an example book that combines multiple articles. Each
-article uses the \textsf{jmlr} class file. \emph{The articles
-should not need to be edited in order to combine them using this
-class file.}\footnote{Unless the authors have done something
-weird or have used problematic packages.} In particular, you
-don't need to delete \verb|\documentclass|,
-\verb|\begin{document}| and \verb|\end{document}|. The articles
-should be able to compile on their own or as part of this book.
-
-In the preamble of the book, you need to include the packages
-that the articles include, but you don't need to include
-any packages that are automatically loaded by the \textsf{jmlr}
-class (\textsf{amsmath}, \textsf{amssymb}, \textsf{natbib},
-\textsf{graphicx}, \textsf{url}, \textsf{xcolor} and
-\textsf{algorithm2e}). You also don't need to include the
-\textsf{hyperref} and \textsf{combnat} packages as they are
-automatically loaded by \textsf{jmlrbook}. For example, some of the
-articles imported in this book use the \textsf{lipsum} package,
-so that package needs to be included in the preamble of the
-book.
-
-Commands defined in the imported articles will be local to that
-article unless \verb|\gdef| or \verb|\global| has been used. This
-means that if more than one article has defined the same command,
-there shouldn't be a conflict unless the command has been defined
-globally. For example, \texttt{paper1/paper1.tex} and
-\texttt{paper2/paper2.tex} both define \verb|\samplecommand|, but
-since \verb|\newcommand| has been used, rather than \verb|\gdef|,
-there's no conflict. However, a problem will occur if the same
-command is also defined in this document before either of those
-files are imported.
-
-Many packages must be loaded before \textsf{hyperref}. If these
-packages haven't been loaded by \textsf{jmlr}, you will need
-to specify them using \textsf{jmlrbook}'s \verb|\jmlrprehyperref|
-hook. For example, to load the packages ``foo'' and ``bar'':
-\begin{verbatim}
-\def\jmlrprehyperref{\usepackage{foo}\usepackage{bar}}
-\documentclass{jmlrbook}
-\end{verbatim}
-or:
-\begin{verbatim}
-\def\jmlrprehyperref{\usepackage{foo,bar}}
-\documentclass{jmlrbook}
-\end{verbatim}
-
-
-The imported papers need to be placed inside the
-\texttt{jmlrpapers} environment. Papers that have already
-been published should be included using \verb|\importpubpaper|
-and papers that haven't been published elsewhere should be
-imported using \verb|\importarticle|. Both commands have an
-optional argument that specifies the prefix to use in the labels
-within the imported article. If omitted, the article's file
-name is used.
-
-Both articles and the book may have appendices and parts created.
-Parts are created using \verb|\part|\{\emph{title}\}. Switch
-to appendices using \verb|\appendix| and then use \verb|\chapter|
-(for the book) or \verb|\section| (in imported articles).
-
-Cross-referencing other parts of the book is done using the
-usual \verb|\label| and \verb|\ref| mechanism. The \textsf{jmlr}
-class additional provides convenience commands such as
-\verb|\sectionref| and \verb|\figureref|. Unlike \verb|\ref|,
-these commands may take a comma-separated list of labels as the
-argument.
-
-The \textsf{jmlrbook} additionally provides \verb|\chapterref|
-(which can take a comma-separated list of labels) and commands
-to reference imported articles (which take a single label
-as the argument): \verb|\articlepageref| (the starting page of
-the article), \verb|\articlepagesref| (the page range for the
-article), \verb|\articletitleref| (the short title for the
-article) and \verb|\articleauthorref| (the article's author).
-
-You may also cross-reference parts of the imported articles,
-but you need to prefix the label with the label supplied
-in the optional argument of \verb|\importpubpaper| or
-\verb|\importarticle|. (If omitted, this is given by
-directory/file name.)
-
-For example, the first appendix in this book is
-\appendixref{apd:first}, but the first appendix in
-``\articletitleref{paper1/paper1}'' by
-\articleauthorref{paper1/paper1}
-(pp.~\articlepagesref{paper1/paper1}) is
-\appendixref{paper1/paper1apd:first}.
-Here's a reference to a couple of tables in
-\articletitleref{paper1/paper1}:
-\tableref{paper1/paper1tab:sample,paper1/paper1tab:sample2}.
-
-The author of a foreword (or other chapter) can sign off using
-the \texttt{authorsignoff} environment. Each author should be
-specified using \verb|\Author|.
-
-\begin{authorsignoff}
-\Author{Nicola Talbot\\
-University of East Anglia}
-\end{authorsignoff}
-
-\begin{preface}
-The preface environment should be used for the preface if you want
-makejmlrbook to extract the preface and turn it into a standalone
-document.
-
-The editorial team can sign off at the end of the preface using
-the \texttt{signoff} environment. This has two arguments: the
-optional argument is a name for the editorial team (defaults to
-``The Editorial Team'') and the mandatory argument is the date.
-Within the environment, use \verb|\Editor| for each editor.
-
-\begin{signoff}{March 2010}
-% First editor:
-\Editor{Nicola Talbot\\
-University of East Anglia\\
-\mailto{N.Talbot@uea.ac.uk}}
-% Second editor:
-\Editor{Anne Editor\\
-University of Nowhere\\
-\mailto{ae@sample.com}}
-\end{signoff}
-
-\end{preface}
-
-\tableofcontents
-
-\mainmatter
-
-\part{First Part of the Book}
-
-\chapter{Introduction}
-
-This is an introduction to the book.
-
-\section{Sample Section}
-
-This is a section in the introduction.
-
-\subsection{Sample Sub-Section}
-
-This is a sub-section.
-
-\subsubsection{Sample Sub-Sub-Section}
-
-This is a sub-sub-section.
-
-\paragraph{Sample Sub-Sub-Sub-Section}
-
-This is a sub-sub-sub-section.
-
-\subparagraph{Sample Sub-Sub-Sub-Sub-Section}
-
-This is a sub-sub-sub-sub-section.
-
-% Add a part to the TOC but don't print anything
-\addtocpart{Papers Published in JMLR W\&CP}
-
-\begin{jmlrpapers}
- % Prepublished papers are imported using:
- % \importpubpaper[label]{dir}{file}{pages}
- % pages refers to the page range in the original publication
- % which doesn't necessarily correspond to the page numbers in
- % this book.
- \importpubpaper{paper1}{paper1}{23--45}
-
- \importpubpaper{paper2}{paper2}{63--70}
-
-\end{jmlrpapers}
-
-% Add a part to the TOC but don't print anything
-\addtocpart{Unpublished Papers}
-
-\begin{jmlrpapers}
- % Unpublished papers are imported using:
- % \importarticle[label]{dir}{file}
- \importarticle{paper3}{paper3}
-
- \importarticle{paper4}{paper4}
-\end{jmlrpapers}
-
-\appendix
-
-\part{First Part of Appendices}\label{pt:apd1}
-
-\chapter*{Introduction}
-
-This is an introduction to \partref{pt:apd1}.
-
-\chapter{First Appendix}
-\label{apd:first}
-
-This is an appendix.
-
-\chapter{Second Appendix}
-\label{apd:second}
-
-This is another appendix.
-
-\lipsum
-
-\part{Second Part of Appendices}
-
-\chapter{An Appendix}
-\label{apd:third}
-
-This is an appendix in another part.
-
-\lipsum
-
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex b/macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex
deleted file mode 100644
index bab6242527..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex
+++ /dev/null
@@ -1,98 +0,0 @@
-% This file is public domain
-
-\documentclass[wcp]{jmlr}
-
-\usepackage{lipsum}% Provides dummy text for this example
-
-\newcommand{\samplecommand}{\emph{A sample command}}
-
-\jmlrvolume{42}
-\jmlryear{2010}
-\jmlrworkshop{Workshop on Causality}
-
-\title[Article 1]{First Sample Article}
-
-\author{\Name{Jane Doe}\Email{jd@sample.com}\and
-\Name{John {Smith Jones}}\Email{jsj@sample.com}\\
-\addr{University of No Where}}
-
-\editor{Anne Editor}
-
-\begin{document}
-\maketitle
-
-\begin{abstract}
-This abstract has a citation \citep{guyon-elisseeff-03}.
-\lipsum[1]
-\end{abstract}
-\begin{keywords}
-Sample
-\end{keywords}
-
-\section{Introduction}
-
-This is a sample article. \sectionref{sec:method} discusses
-the method used. \equationref{eq:emc2} is an interesting
-equation. The results are discussed in \sectionref{sec:results}
-and some other stuff is in \appendixref{apd:first}.\footnote{Here's
-a footnote.}
-\samplecommand.
-
-\lipsum
-
-\section{Method}\label{sec:method}
-
-\lipsum
-
-\begin{equation}\label{eq:emc2}
-E = mc^2
-\end{equation}
-
-A network is shown in Figure~\ref{fig:network}.
-
-\begin{figure}[htbp]
- \floatconts
- {fig:network}%
- {\caption{A Network}}%
- {\includegraphics{images/network}}%
-\end{figure}
-
-\section{Results}\label{sec:results}
-
-\begin{table}[htbp]
-\floatconts
- {tab:sample}
- {\caption{A Sample Table}}
- {%
- \begin{tabular}{cc}
- A & B\\
- 1 & 2
- \end{tabular}
- }%
-\end{table}
-
-\begin{table}[htbp]
-\floatconts
- {tab:sample2}
- {\caption{Another Sample Table}}
- {%
- \begin{tabular}{cc}
- A & B\\
- 1 & 2
- \end{tabular}
- }%
-\end{table}
-
-\lipsum
-
-Here are some citations:
-\citet{guyon-elisseeff-03,guyon2007causalreport}.\footnote{And
-here's another footnote.}
-
-\bibliography{paper1}
-
-\appendix
-\section{First Appendix}\label{apd:first}
-
-\lipsum
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib b/macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib
deleted file mode 100644
index ddc24c6662..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib
+++ /dev/null
@@ -1,19 +0,0 @@
-@article{guyon-elisseeff-03,
- title = "An Introduction to Variable and Feature Selection",
- author = "I. Guyon and A. Elisseeff",
- journal = "JMLR",
- volume = "3",
- month = MAR,
- pages = "1157-1182",
- year = 2003
-}
-
-@techreport{guyon2007causalreport,
- author = {I. Guyon and C. Aliferis and A. Elisseeff},
- title = {Causal Feature Selection},
- institution = {Clopinet},
- year = 2007,
- type = {Technical Report },
- source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}}
-}
-
diff --git a/macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex b/macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex
deleted file mode 100644
index 9a03081eb3..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex
+++ /dev/null
@@ -1,65 +0,0 @@
-% This file is public domain
-
-\documentclass[wcp]{jmlr}
-
-\usepackage{lipsum}% Provides dummy text for this example
-
-\newcommand{\samplecommand}{\textbf{A sample command}}
-
-\jmlrvolume{42}
-\jmlryear{2010}
-\jmlrworkshop{Workshop on Causality}
-
-\title[Article 2]{Second Sample Article}
-
-\author{\Name{Bob {de Winter}}\Email{bdw@sample.com}\\
-\Name{{\'E}louise Mary Finchley}\Email{emf@sample.com}\\
-\Name{Jack Mark Jones}\Email{jmj@sample.com}\\
-\addr{University of No Where}}
-
-\editor{Anne Other Editor}
-
-\begin{document}
-\maketitle
-
-\begin{abstract}
-\lipsum[1]
-\end{abstract}
-\begin{keywords}
-Sample
-\end{keywords}
-
-\section{Introduction}
-
-This is a sample article. \sectionref{sec:method} discusses
-the method used. \equationref{eq:emc2} is an interesting
-equation. The results are discussed in \sectionref{sec:results}
-and some other stuff is in \appendixref{apd:first}.\footnote{Here's
-a footnote.}
-\samplecommand.
-
-\lipsum
-
-\section{Method}\label{sec:method}
-
-\lipsum
-
-\begin{equation}\label{eq:emc2}
-E = mc^2
-\end{equation}
-
-\section{Results}\label{sec:results}
-
-\lipsum
-
-Here are some citations:
-\citet{guyon-elisseeff-03,guyon2007causalreport}.\footnote{Here's
-another footnote.}
-
-\bibliography{paper2}
-
-\appendix
-\section{First Appendix}\label{apd:first}
-
-\lipsum
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib b/macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib
deleted file mode 100644
index ddc24c6662..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib
+++ /dev/null
@@ -1,19 +0,0 @@
-@article{guyon-elisseeff-03,
- title = "An Introduction to Variable and Feature Selection",
- author = "I. Guyon and A. Elisseeff",
- journal = "JMLR",
- volume = "3",
- month = MAR,
- pages = "1157-1182",
- year = 2003
-}
-
-@techreport{guyon2007causalreport,
- author = {I. Guyon and C. Aliferis and A. Elisseeff},
- title = {Causal Feature Selection},
- institution = {Clopinet},
- year = 2007,
- type = {Technical Report },
- source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}}
-}
-
diff --git a/macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex b/macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex
deleted file mode 100644
index 7b4680ef2d..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex
+++ /dev/null
@@ -1,56 +0,0 @@
-% This file is public domain
-
-\documentclass[wcp]{jmlr}
-
-\usepackage{lipsum}% Provides dummy text for this example
-
-\title[Article 3]{Third Sample Article}
-
-\author{\Name{John Smith}\Email{js@sample.com}\\
-\addr{University of No Where}}
-
-\editor{Anne Editor}
-
-\begin{document}
-\maketitle
-
-\begin{abstract}
-\lipsum[1]
-\end{abstract}
-\begin{keywords}
-Sample
-\end{keywords}
-
-\section{Introduction}
-
-This is a sample article. \sectionref{sec:method} discusses
-the method used. \equationref{eq:emc2} is an interesting
-equation. The results are discussed in \sectionref{sec:results}
-and some other stuff is in \appendixref{apd:first}.\footnote{Here's
-a footnote.}
-
-\lipsum
-
-\section{Method}\label{sec:method}
-
-\lipsum
-
-\begin{equation}\label{eq:emc2}
-E = mc^2
-\end{equation}
-
-\section{Results}\label{sec:results}
-
-\lipsum
-
-Here are some citations:
-\citet{guyon-elisseeff-03,guyon2007causalreport}.\footnote{Here's
-another footnote.}
-
-\bibliography{paper3}
-
-\appendix
-\section{First Appendix}\label{apd:first}
-
-\lipsum
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib b/macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib
deleted file mode 100644
index ddc24c6662..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib
+++ /dev/null
@@ -1,19 +0,0 @@
-@article{guyon-elisseeff-03,
- title = "An Introduction to Variable and Feature Selection",
- author = "I. Guyon and A. Elisseeff",
- journal = "JMLR",
- volume = "3",
- month = MAR,
- pages = "1157-1182",
- year = 2003
-}
-
-@techreport{guyon2007causalreport,
- author = {I. Guyon and C. Aliferis and A. Elisseeff},
- title = {Causal Feature Selection},
- institution = {Clopinet},
- year = 2007,
- type = {Technical Report },
- source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}}
-}
-
diff --git a/macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex b/macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex
deleted file mode 100644
index f37498c6c5..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex
+++ /dev/null
@@ -1,53 +0,0 @@
-% This file is public domain
-
-\documentclass[wcp]{jmlr}
-
-\usepackage{lipsum}% Provides dummy text for this example
-
-\title[Article 4]{Fourth Sample Article}
-
-\author{\Name{Mary-Jane {de Beer}}\Email{mjdb@sample.com}\\
-\addr{University of No Where}}
-
-\editor{Anne Editor}
-
-\begin{document}
-\maketitle
-
-\begin{abstract}
-\lipsum[1]
-\end{abstract}
-\begin{keywords}
-Sample
-\end{keywords}
-
-\section{Introduction}
-
-This is a sample article. \sectionref{sec:method} discusses
-the method used. \equationref{eq:emc2} is an interesting
-equation. The results are discussed in \sectionref{sec:results}
-and some other stuff is in \appendixref{apd:first}.
-
-\lipsum
-
-\section{Method}\label{sec:method}
-
-\lipsum
-
-\begin{equation}\label{eq:emc2}
-E = mc^2
-\end{equation}
-
-\section{Results}\label{sec:results}
-
-\lipsum
-
-Here are some citations: \citet{guyon-elisseeff-03,guyon2007causalreport}.
-
-\bibliography{paper4}
-
-\appendix
-\section{First Appendix}\label{apd:first}
-
-\lipsum
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf b/macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf
deleted file mode 100644
index b9a74dc749..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex b/macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex
deleted file mode 100644
index 86655f09e8..0000000000
--- a/macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex
+++ /dev/null
@@ -1,79 +0,0 @@
- % Most packages need to be loaded before hyperref
- % so put them in the definition of \jmlrprehyperref
-
-\def\jmlrprehyperref{%
- % Packages used by imported articles:
- \usepackage{lipsum}
-}
-
-%\documentclass[wcp,gray]{jmlrbook}
-\documentclass[wcp]{jmlrbook}
-
-\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
-
-\ifprint{}{\usepackage{bookmark}}% load last
-
- % Title is added to the PDF properties. Optional argument
- % is used instead, if present.
- %\title[Short Title]{Big Long Title}
-\title{Sample Proceedings}
-
-\author[Anne Editor et al.]{Anne Editor, Anne Other Editor and Nicola Talbot}
-
-\subtitle{\thejmlrworkshop}
-
-\jmlrvolume{42}
-\jmlryear{2010}
-\jmlrworkshop{Workshop on Causality}
-\jmlrlocation{Somewhere}
-
-\logo{\includegraphics{bookLogo}}
-
-\begin{document}
-\maketitle
-
-\frontmatter
-
-\chapter{Foreword}
-
-This is the foreword.
-
-\begin{authorsignoff}
-\Author{Nicola Talbot\\
-University of East Anglia}
-\end{authorsignoff}
-
-\begin{preface}
-
-This is the preface.
-
-\begin{signoff}{March 2010}
- % First editor:
-\Editor{Anne Editor\\
-University of Nowhere\\
-\mailto{ae@sample.com}}
- % Second editor:
-\Editor{Anne Other Editor\\
-University of Nowhere\\
-\mailto{aoe@sample.com}}
-\end{signoff}
-
-\end{preface}
-
-\tableofcontents
-
-\mainmatter
-
-\begin{jmlrpapers}
- \addtocpart{Introduction}
- % syntax: \importpaper[label]{directory}{filename}
- \importpaper{paper1}{paper1}
- \addtocpart{First Topic}
- \importpaper{paper2}{paper2}
- \importpaper{paper3}{paper3}
- \addtocpart{Second Topic}
- \importpaper{paper4}{paper4}
-\end{jmlrpapers}
-
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png b/macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png
deleted file mode 100644
index e636646538..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/circle.jpg b/macros/latex/contrib/jmlr/sample-papers/images/circle.jpg
deleted file mode 100644
index 365deb2e1f..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/images/circle.jpg
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png b/macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png
deleted file mode 100644
index e4af05acda..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/nodes.png b/macros/latex/contrib/jmlr/sample-papers/images/nodes.png
deleted file mode 100644
index a4e79c2506..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/images/nodes.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/square-gray.png b/macros/latex/contrib/jmlr/sample-papers/images/square-gray.png
deleted file mode 100644
index b150e66354..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/images/square-gray.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/images/square.png b/macros/latex/contrib/jmlr/sample-papers/images/square.png
deleted file mode 100644
index 8844e85816..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/images/square.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib
deleted file mode 100644
index ddc24c6662..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib
+++ /dev/null
@@ -1,19 +0,0 @@
-@article{guyon-elisseeff-03,
- title = "An Introduction to Variable and Feature Selection",
- author = "I. Guyon and A. Elisseeff",
- journal = "JMLR",
- volume = "3",
- month = MAR,
- pages = "1157-1182",
- year = 2003
-}
-
-@techreport{guyon2007causalreport,
- author = {I. Guyon and C. Aliferis and A. Elisseeff},
- title = {Causal Feature Selection},
- institution = {Clopinet},
- year = 2007,
- type = {Technical Report },
- source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}}
-}
-
diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf
deleted file mode 100644
index 31d153a4b6..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex
deleted file mode 100644
index 4dda4f434e..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex
+++ /dev/null
@@ -1,837 +0,0 @@
- % use the "wcp" class option for workshop and conference
- % proceedings
- %\documentclass[gray]{jmlr} % test grayscale version
- \documentclass[tablecaption=bottom]{jmlr}% journal article
- %\documentclass[tablecaption=bottom,wcp]{jmlr} % W&CP article
-
- % The following packages will be automatically loaded:
- % amsmath, amssymb, natbib, graphicx, url, algorithm2e
-
- %\usepackage{rotating}% for sideways figures and tables
- %\usepackage{longtable}% for long tables
-
- % The booktabs package is used by this sample document
- % (it provides \toprule, \midrule and \bottomrule).
- % Remove the next line if you don't require it.
-\usepackage{booktabs}
- % The siunitx package is used by this sample document
- % to align numbers in a column by their decimal point.
- % Remove the next line if you don't require it.
-\usepackage[load-configurations=version-1]{siunitx} % newer version
- %\usepackage{siunitx}
-
- % The following command is just for this sample document:
-\newcommand{\cs}[1]{\texttt{\char`\\#1}}% remove this in your real article
-
- % Define an unnumbered theorem just for this sample document for
- % illustrative purposes:
-\theorembodyfont{\upshape}
-\theoremheaderfont{\scshape}
-\theorempostheader{:}
-\theoremsep{\newline}
-\newtheorem*{note}{Note}
-
- % change the arguments, as appropriate, in the following:
-\jmlrvolume{1}
-\jmlryear{2010}
-\jmlrsubmitted{submission date}
-\jmlrpublished{publication date}
-\jmlrworkshop{workshop title} % W&CP title
-
- % The optional argument of \title is used in the header
-\title[Short Title]{Full Title of Article\titlebreak This Title Has
-A Line Break}
-
- % Anything in the title that should appear in the main title but
- % not in the article's header or the volume's table of
- % contents should be placed inside \titletag{}
-
- %\title{Title of the Article\titletag{\thanks{Some footnote}}}
-
-
- % Use \Name{Author Name} to specify the name.
- % If the surname contains spaces, enclose the surname
- % in braces, e.g. \Name{John {Smith Jones}} similarly
- % if the name has a "von" part, e.g \Name{Jane {de Winter}}.
- % If the first letter in the forenames is a diacritic
- % enclose the diacritic in braces, e.g. \Name{{\'E}louise Smith}
-
- % \thanks must come after \Name{...} not inside the argument for
- % example \Name{John Smith}\nametag{\thanks{A note}} NOT \Name{John
- % Smith\thanks{A note}}
-
- % Anything in the name that should appear in the title but not in the
- % article's header or footer or in the volume's
- % table of contents should be placed inside \nametag{}
-
- % Two authors with the same address
- \author{\Name{Author Name1\nametag{\thanks{A note}}} \Email{abc@sample.com}\and
- \Name{Author Name2} \Email{xyz@sample.com}\\
- \addr Address}
-
- % Three or more authors with the same address:
- % \author{\Name{Author Name1} \Email{an1@sample.com}\\
- % \Name{Author Name2} \Email{an2@sample.com}\\
- % \Name{Author Name3} \Email{an3@sample.com}\\
- % \Name{Author Name4} \Email{an4@sample.com}\\
- % \Name{Author Name5} \Email{an5@sample.com}\\
- % \Name{Author Name6} \Email{an6@sample.com}\\
- % \Name{Author Name7} \Email{an7@sample.com}\\
- % \Name{Author Name8} \Email{an8@sample.com}\\
- % \Name{Author Name9} \Email{an9@sample.com}\\
- % \Name{Author Name10} \Email{an10@sample.com}\\
- % \Name{Author Name11} \Email{an11@sample.com}\\
- % \Name{Author Name12} \Email{an12@sample.com}\\
- % \Name{Author Name13} \Email{an13@sample.com}\\
- % \Name{Author Name14} \Email{an14@sample.com}\\
- % \addr Address}
-
-
- % Authors with different addresses:
- % \author{\Name{Author Name1} \Email{abc@sample.com}\\
- % \addr Address 1
- % \AND
- % \Name{Author Name2} \Email{xyz@sample.com}\\
- % \addr Address 2
- %}
-
-\editor{Editor's name}
- %\editors{Editor One and Editor Two}% for multiple editors
-
-\begin{document}
-
-\maketitle
-
-\begin{abstract}
-This is the abstract for this article.
-\end{abstract}
-\begin{keywords}
-List of keywords
-\end{keywords}
-
-\section{Introduction}
-\label{sec:intro}
-
-This is a sample article that uses the \textsf{jmlr} class with
-the \texttt{wcp} class option. Please follow the guidelines in
-this sample document as it can help to reduce complications when
-combining the articles into a book. Please avoid using obsolete
-commands, such as \verb|\rm|, and obsolete packages, such as
-\textsf{epsfig}.\footnote{See
-\url{http://www.ctan.org/pkg/l2tabu}} Some packages that are known
-to cause problems for the production editing process are checked for
-by the \textsf{jmlr} class and will generate an error.
-
-Please also ensure that your document will compile with PDF\LaTeX.
-If you have an error message that's puzzling you, first check for it
-at the UK TUG FAQ
-\url{https://texfaq.org/FAQ-man-latex}. If
-that doesn't help, create a minimal working example (see
-\url{https://www.dickimaw-books.com/latex/minexample/}) and post
-to somewhere like \TeX\ on StackExchange
-(\url{https://tex.stackexchange.com/}) or the \LaTeX\ Community Forum
-(\url{https://latex.org/forum/}).
-
-\begin{note}
-This is an numbered theorem-like environment that was defined in
-this document's preamble.
-\end{note}
-
-\subsection{Sub-sections}
-
-Sub-sections are produced using \verb|\subsection|.
-
-\subsubsection{Sub-sub-sections}
-
-Sub-sub-sections are produced using \verb|\subsubsection|.
-
-\paragraph{Sub-sub-sub-sections}
-
-Sub-sub-sub-sections are produced using \verb|\paragraph|.
-These are unnumbered with a running head.
-
-\subparagraph{Sub-sub-sub-sub-sections}
-
-Sub-sub-sub-sub-sections are produced using \verb|\subparagraph|.
-These are unnumbered with a running head.
-
-\section{Cross-Referencing}
-
-Always use \verb|\label| and \verb|\ref| (or one of the commands
-described below) when cross-referencing. For example, the next
-section is Section~\ref{sec:math} but you can also refer to it using
-\sectionref{sec:math}. The \textsf{jmlr} class
-provides some convenient cross-referencing commands:
-\verb|\sectionref|, \verb|\equationref|, \verb|\tableref|,
-\verb|\figureref|, \verb|\algorithmref|, \verb|\theoremref|,
-\verb|\lemmaref|, \verb|\remarkref|, \verb|\corollaryref|,
-\verb|\definitionref|, \verb|\conjectureref|, \verb|\axiomref|,
-\verb|\exampleref| and \verb|\appendixref|. The argument of these
-commands may either be a single label or a comma-separated list
-of labels. Examples:
-
-Referencing sections: \sectionref{sec:math} or
-\sectionref{sec:intro,sec:math} or
-\sectionref{sec:intro,sec:math,sec:tables,sec:figures}.
-
-Referencing equations: \equationref{eq:trigrule} or
-\equationref{eq:trigrule,eq:df} or
-\equationref{eq:trigrule,eq:f,eq:df,eq:y}.
-
-Referencing tables: \tableref{tab:operatornames} or
-\tableref{tab:operatornames,tab:example} or
-\tableref{tab:operatornames,tab:example,tab:example-booktabs}.
-
-Referencing figures: \figureref{fig:nodes} or
-\figureref{fig:nodes,fig:teximage} or
-\figureref{fig:nodes,fig:teximage,fig:subfigex} or
-\figureref{fig:circle,fig:square}.
-
-Referencing algorithms: \algorithmref{alg:gauss} or
-\algorithmref{alg:gauss,alg:moore} or
-\algorithmref{alg:gauss,alg:moore,alg:net}.
-
-Referencing theorem-like environments: \theoremref{thm:eigenpow},
-\lemmaref{lem:sample}, \remarkref{rem:sample},
-\corollaryref{cor:sample}, \definitionref{def:sample},
-\conjectureref{con:sample}, \axiomref{ax:sample} and
-\exampleref{ex:sample}.
-
-Referencing appendices: \appendixref{apd:first} or
-\appendixref{apd:first,apd:second}.
-
-\section{Equations}
-\label{sec:math}
-
-The \textsf{jmlr} class loads the \textsf{amsmath} package, so
-you can use any of the commands and environments defined there.
-(See the \textsf{amsmath} documentation for further
-details.\footnote{Either \texttt{texdoc amsmath} or
-\url{http://www.ctan.org/pkg/amsmath}})
-
-Unnumbered single-lined equations should be displayed using
-\verb|\[| and \verb|\]|. For example:
-\[E = m c^2\]
-or you can use the \texttt{displaymath} environment:
-\begin{displaymath}
-E = m c^2
-\end{displaymath}
-Numbered single-line equations should be displayed using the
-\texttt{equation} environment. For example:
-\begin{equation}\label{eq:trigrule}
-\cos^2\theta + \sin^2\theta \equiv 1
-\end{equation}
-This can be referenced using \verb|\label| and \verb|\equationref|.
-For example, \equationref{eq:trigrule}.
-
-Multi-lined numbered equations should be displayed using the
-\texttt{align} environment.\footnote{For reasons why you
-shouldn't use the obsolete \texttt{eqnarray} environment, see
-Lars Madsen, \emph{Avoid eqnarray!} TUGboat 33(1):21--25, 2012.} For example:
-\begin{align}
-f(x) &= x^2 + x\label{eq:f}\\
-f'(x) &= 2x + 1\label{eq:df}
-\end{align}
-Unnumbered multi-lined equations can be displayed using the
-\texttt{align*} environment. For example:
-\begin{align*}
-f(x) &= (x+1)(x-1)\\
-&= x^2 - 1
-\end{align*}
-If you want to mix numbered with unnumbered lines use the
-\texttt{align} environment and suppress unwanted line numbers with
-\verb|\nonumber|. For example:
-\begin{align}
-y &= x^2 + 3x - 2x + 1\nonumber\\
-&= x^2 + x + 1\label{eq:y}
-\end{align}
-An equation that is too long to fit on a single line can be
-displayed using the \texttt{split} environment.
-Text can be embedded in an equation using \verb|\text| or
-\verb|\intertext| (as used in \theoremref{thm:eigenpow}).
-See the \textsf{amsmath} documentation for further details.
-
-\subsection{Operator Names}
-\label{sec:op}
-
-Predefined operator names are listed in \tableref{tab:operatornames}.
-For additional operators, either use \verb|\operatorname|,
-for example $\operatorname{var}(X)$ or declare it with
-\verb|\DeclareMathOperator|, for example
-\begin{verbatim}
-\DeclareMathOperator{\var}{var}
-\end{verbatim}
-and then use this new command. If you want limits that go above and
-below the operator (like \verb|\sum|) use the starred versions
-(\verb|\operatorname*| or \verb|\DeclareMathOperator*|).
-
-\begin{table*}[htbp]
-\floatconts
- {tab:operatornames}%
- {\caption{Predefined Operator Names (taken from
- \textsf{amsmath} documentation)}}%
- {%
-\begin{tabular}{rlrlrlrl}
-\cs{arccos} & $\arccos$ & \cs{deg} & $\deg$ & \cs{lg} & $\lg$ & \cs{projlim} & $\projlim$ \\
-\cs{arcsin} & $\arcsin$ & \cs{det} & $\det$ & \cs{lim} & $\lim$ & \cs{sec} & $\sec$ \\
-\cs{arctan} & $\arctan$ & \cs{dim} & $\dim$ & \cs{liminf} & $\liminf$ & \cs{sin} & $\sin$ \\
-\cs{arg} & $\arg$ & \cs{exp} & $\exp$ & \cs{limsup} & $\limsup$ & \cs{sinh} & $\sinh$ \\
-\cs{cos} & $\cos$ & \cs{gcd} & $\gcd$ & \cs{ln} & $\ln$ & \cs{sup} & $\sup$ \\
-\cs{cosh} & $\cosh$ & \cs{hom} & $\hom$ & \cs{log} & $\log$ & \cs{tan} & $\tan$ \\
-\cs{cot} & $\cot$ & \cs{inf} & $\inf$ & \cs{max} & $\max$ & \cs{tanh} & $\tanh$ \\
-\cs{coth} & $\coth$ & \cs{injlim} & $\injlim$ & \cs{min} & $\min$ \\
-\cs{csc} & $\csc$ & \cs{ker} & $\ker$ & \cs{Pr} & $\Pr$
-\end{tabular}\par
-\begin{tabular}{rlrl}
-\cs{varlimsup} & $\varlimsup$
-& \cs{varinjlim} & $\varinjlim$\\
-\cs{varliminf} & $\varliminf$
-& \cs{varprojlim} & $\varprojlim$
-\end{tabular}
-}
-\end{table*}
-
-\section{Vectors and Sets}
-\label{sec:vec}
-
-Vectors should be typeset using \cs{vec}. For example $\vec{x}$.
-(The original version of \cs{vec} can also be accessed using
-\cs{orgvec}, for example $\orgvec{x}$.)
-The \textsf{jmlr} class also provides \cs{set} to typeset a
-set. For example $\set{S}$.
-
-\section{Floats}
-\label{sec:floats}
-
-Floats, such as figures, tables and algorithms, are moving
-objects and are supposed to float to the nearest convenient
-location. Please don't force them to go in a particular place. In
-general it's best to use the \texttt{htbp} specifier and don't
-put the figure or table in the middle of a paragraph (that is
-make sure there's a paragraph break above and below the float).
-Floats are supposed to have a little extra space above and below
-them to make them stand out from the rest of the text. This extra
-spacing is put in automatically and shouldn't need modifying.
-
-If your article will later be reprinted in the Challenges for
-Machine Learning, please be aware that the CiML books use a
-different paper size, so if you want to resize any images use a
-scale relative to the line width (\verb|\linewidth|), text width
-(\verb|\textwidth|) or text height (\verb|\textheight|).
-
-To ensure consistency, please \emph{don't} try changing the format of the caption by doing
-something like:
-\begin{verbatim}
-\caption{\textit{A Sample Caption.}}
-\end{verbatim}
-or
-\begin{verbatim}
-\caption{\em A Sample Caption.}
-\end{verbatim}
-You can, of course, change the font for individual words or
-phrases, for example:
-\begin{verbatim}
-\caption{A Sample Caption With Some \emph{Emphasized Words}.}
-\end{verbatim}
-
-\subsection{Tables}
-\label{sec:tables}
-
-Tables should go in the \texttt{table} environment. Within this
-environment use \verb|\floatconts| (defined by \textsf{jmlr})
-to set the caption correctly and center the table contents.
-The location of the caption depends on the \verb|tablecaption|
-setting in the document class options.
-
-\begin{table}[htbp]
- % The first argument is the label.
- % The caption goes in the second argument, and the table contents
- % go in the third argument.
-\floatconts
- {tab:example}%
- {\caption{An Example Table}}%
- {\begin{tabular}{ll}
- \bfseries Dataset & \bfseries Result\\
- Data1 & 0.12345\\
- Data2 & 0.67890\\
- Data3 & 0.54321\\
- Data4 & 0.09876
- \end{tabular}}
-\end{table}
-
-If you want horizontal rules you can use the \textsf{booktabs}
-package which provides the commands \verb|\toprule|,
-\verb|\midrule| and \verb|\bottomrule|. For example, see
-\tableref{tab:example-booktabs}.
-
-\begin{table}[hbtp]
-\floatconts
- {tab:example-booktabs}
- {\caption{A Table With Horizontal Lines}}
- {\begin{tabular}{ll}
- \toprule
- \bfseries Dataset & \bfseries Result\\
- \midrule
- Data1 & 0.12345\\
- Data2 & 0.67890\\
- Data3 & 0.54321\\
- Data4 & 0.09876\\
- \bottomrule
- \end{tabular}}
-\end{table}
-
-If you really want vertical lines as well, you can't use the
-\textsf{booktabs} commands as there'll be some unwanted gaps.
-Instead you can use \LaTeX's \verb|\hline|, but the rows may
-appear a bit cramped. You can add extra space above or below a
-row using \verb|\abovestrut| and \verb|\belowstrut|. For example,
-see \tableref{tab:example-hline}. However, you might want to read
-the \textsf{booktabs} documentation regarding the use of vertical
-lines.
-
-\begin{table}[htbp]
-\floatconts
- {tab:example-hline}
- {\caption{A Table With Horizontal and Vertical Lines}}%
- {%
- \begin{tabular}{|l|l|}
- \hline
- \abovestrut{2.2ex}\bfseries Dataset & \bfseries Result\\\hline
- \abovestrut{2.2ex}Data1 & 0.12345\\
- Data2 & 0.67890\\
- Data3 & 0.54321\\
- \belowstrut{0.2ex}Data4 & 0.09876\\\hline
- \end{tabular}
- }
-\end{table}
-
-If you want to align numbers on their decimal point, you can
-use the \textsf{siunitx} package. For example, see
-\tableref{tab:example-siunitx}. For further details see the
-\textsf{siunitx} documentation\footnote{Either \texttt{texdoc
-siunitx} or \url{http://www.ctan.org/pkg/siunitx}}.
-
-\begin{table}[htbp]
-\floatconts
- {tab:example-siunitx}
- {\caption{A Table With Numbers Aligned on the Decimal Point}}
- {\begin{tabular}{lS[tabformat=3.5]}
- \bfseries Dataset & {\bfseries Result}\\
- Data1 & 0.12345\\
- Data2 & 10.6789\\
- Data3 & 50.543\\
- Data4 & 200.09876
- \end{tabular}}
-\end{table}
-
-If the table is too wide, you can adjust the inter-column
-spacing by changing the value of \verb|\tabcolsep|. For
-example:
-\begin{verbatim}
-\setlength{\tabcolsep}{3pt}
-\end{verbatim}
-If the table is very wide but not very long, you can use the
-\texttt{sidewaystable} environment defined in the
-\textsf{rotating} package (so use \verb|\usepackage{rotating}|).
-If the table is too long to fit on a page, you can use the
-\texttt{longtable} environment defined in the \textsf{longtable}
-package (so use \verb|\usepackage{longtable}|).
-
-\subsection{Figures}
-\label{sec:figures}
-
-Figures should go in the \texttt{figure} environment. Within this
-environment, use \verb|\floatconts| to correctly position the
-caption and center the image. Use \verb|\includegraphics|
-for external graphics files but omit the file extension. Do not
-use \verb|\epsfig| or \verb|\psfig|. If you want to scale the
-image, it's better to use a fraction of the line width rather
-than an explicit length. For example, see \figureref{fig:nodes}.
-
-\begin{figure}[htbp]
- % Caption and label go in the first argument and the figure contents
- % go in the second argument
-\floatconts
- {fig:nodes}
- {\caption{Example Image}}
- {\includegraphics[width=0.5\linewidth]{images/nodes}}
-\end{figure}
-
-If your image is made up of \LaTeX\ code (for example, commands
-provided by the \textsf{pgf} package) you can include it using
-\cs{includeteximage} (defined by the \textsf{jmlr} class). This
-can be scaled and rotated in the same way as \cs{includegraphics}.
-For example, see \figureref{fig:teximage}.
-
-\begin{figure}[htbp]
-\floatconts
- {fig:teximage}
- {\caption{Image Created Using \LaTeX\ Code}}
- {\includeteximage[angle=45]{images/teximage}}
-\end{figure}
-
-If the figure is too wide to fit on the page, you can use the
-\texttt{sidewaysfigure} environment defined in the
-\textsf{rotating} package.
-
-Don't use \verb|\graphicspath|.\footnote{This is specific to the
-\textsf{jmlr} class, not a general recommendation. The main file
-that generates the proceedings or the CiML book is typically in a
-different directory to the imported articles, so it modifies the
-graphics path when it imports an article.} If the images
-are contained in a subdirectory, specify this when you include the image, for
-example \verb|\includegraphics{figures/mypic}|.
-
-\subsubsection{Sub-Figures}
-\label{sec:subfigures}
-
-Sub-figures can be created using \verb|\subfigure|, which is
-defined by the \textsf{jmlr} class. The optional argument allows
-you to provide a subcaption. The label should be placed in the
-mandatory argument of \verb|\subfigure|. You can reference the
-entire figure, for example \figureref{fig:subfigex}, or you can
-reference part of the figure using \verb|\figureref|, for example
-\figureref{fig:circle}. Alternatively you can reference the
-subfigure using \verb|\subfigref|, for example
-\subfigref{fig:circle,fig:square} in \figureref{fig:subfigex}.
-
-\begin{figure}[htbp]
-\floatconts
- {fig:subfigex}
- {\caption{An Example With Sub-Figures.}}
- {%
- \subfigure[A Circle]{\label{fig:circle}%
- \includegraphics[width=0.2\linewidth]{images/circle}}%
- \qquad
- \subfigure[A Square]{\label{fig:square}%
- \includegraphics[width=0.2\linewidth]{images/square}}
- }
-\end{figure}
-
-By default, the sub-figures are aligned on the baseline.
-This can be changed using the second optional argument
-of \verb|\subfigure|. This may be \texttt{t} (top), \texttt{c}
-(centered) or \texttt{b} (bottom). For example, the subfigures
-\subfigref{fig:circle2,fig:square2} in \figureref{fig:subfigex2}
-both have \verb|[c]| as the second optional argument.
-
-\begin{figure}[htbp]
-\floatconts
- {fig:subfigex2}
- {\caption{Another Example With Sub-Figures.}}
- {%
- \subfigure[A Small Circle][c]{\label{fig:circle2}%
- \includegraphics[width=0.1\linewidth]{images/circle}}%
- \qquad
- \subfigure[A Square][c]{\label{fig:square2}%
- \includegraphics[width=0.2\linewidth]{images/square}}
- }
-\end{figure}
-
-\subsection{Sub-Tables}
-\label{sec:subtables}
-There is an analogous command \verb|\subtable| for sub-tables.
-It has the same syntax as \verb|\subfigure| described above.
-You can reference the table using \verb|\tableref|, for example
-\tableref{tab:subtabex} or you can reference part of the table,
-for example \tableref{tab:ab}. Alternatively you can reference the
-subtable using \verb|\subtabref|, for example
-\subtabref{tab:ab,tab:cd} in \tableref{tab:subtabex}.
-
-\begin{table}[htbp]
-\floatconts
- {tab:subtabex}
- {\caption{An Example With Sub-Tables}}
- {%
- \subtable{%
- \label{tab:ab}%
- \begin{tabular}{cc}
- \bfseries A & \bfseries B\\
- 1 & 2
- \end{tabular}
- }\qquad
- \subtable{%
- \label{tab:cd}%
- \begin{tabular}{cc}
- \bfseries C & \bfseries D\\
- 3 & 4\\
- 5 & 6
- \end{tabular}
- }
- }
-\end{table}
-
-By default, the sub-tables are aligned on the top.
-This can be changed using the second optional argument
-of \verb|\subtable|. This may be \texttt{t} (top), \texttt{c}
-(centered) or \texttt{b} (bottom). For example, the sub-tables
-\subtabref{tab:ab2,tab:cd2} in \tableref{tab:subtabex2}
-both have \verb|[c]| as the second optional argument.
-
-\begin{table}[htbp]
-\floatconts
- {tab:subtabex2}
- {\caption{Another Example With Sub-Tables}}
- {%
- \subtable[][c]{%
- \label{tab:ab2}%
- \begin{tabular}{cc}
- \bfseries A & \bfseries B\\
- 1 & 2
- \end{tabular}
- }\qquad
- \subtable[][c]{%
- \label{tab:cd2}%
- \begin{tabular}{cc}
- \bfseries C & \bfseries D\\
- 3 & 4\\
- 5 & 6
- \end{tabular}
- }
- }
-\end{table}
-
-\subsection{Algorithms}
-\label{sec:algorithms}
-
-Enumerated textual algorithms can be displayed using the
-\texttt{algorithm} environment. Within this environment, use
-\verb|\caption| to set the caption and you can use an
-\texttt{enumerate} or nested \texttt{enumerate} environments.
-For example, see \algorithmref{alg:gauss}. Note that algorithms
-float like figures and tables.
-
-\begin{algorithm}[htbp]
-\floatconts
- {alg:gauss}%
- {\caption{The Gauss-Seidel Algorithm}}%
-{%
-\begin{enumerate}
- \item For $k=1$ to maximum number of iterations
- \begin{enumerate}
- \item For $i=1$ to $n$
- \begin{enumerate}
- \item $x_i^{(k)} =
- \frac{b_i - \sum_{j=1}^{i-1}a_{ij}x_j^{(k)}
- - \sum_{j=i+1}^{n}a_{ij}x_j^{(k-1)}}{a_{ii}}$
- \item If $\|\vec{x}^{(k)}-\vec{x}^{(k-1)} < \epsilon\|$,
- where $\epsilon$ is a specified stopping criteria, stop.
- \end{enumerate}
- \end{enumerate}
-\end{enumerate}
-}%
-\end{algorithm}
-
-If you'd rather have the same numbering throughout the algorithm
-but still want the convenient indentation of nested
-\texttt{enumerate} environments, you can use the
-\texttt{enumerate*} environment provided by the \textsf{jmlr}
-class. For example, see \algorithmref{alg:moore}.
-
-\begin{algorithm}
-\floatconts
- {alg:moore}%
- {\caption{Moore's Shortest Path}}%
-{%
-Given a connected graph $G$, where the length of each edge is 1:
-\begin{enumerate*}
- \item Set the label of vertex $s$ to 0
- \item Set $i=0$
- \begin{enumerate*}
- \item \label{step:locate}Locate all unlabelled vertices
- adjacent to a vertex labelled $i$ and label them $i+1$
- \item If vertex $t$ has been labelled,
- \begin{enumerate*}
- \item[] the shortest path can be found by backtracking, and
- the length is given by the label of $t$.
- \end{enumerate*}
- otherwise
- \begin{enumerate*}
- \item[] increment $i$ and return to step~\ref{step:locate}
- \end{enumerate*}
- \end{enumerate*}
-\end{enumerate*}
-}%
-\end{algorithm}
-
-Pseudo code can be displayed using the \texttt{algorithm2e}
-environment. This is defined by the \textsf{algorithm2e} package
-(which is automatically loaded) so check the \textsf{algorithm2e}
-documentation for further details.\footnote{Either \texttt{texdoc
-algorithm2e} or \url{http://www.ctan.org/pkg/algorithm2e}}
-For an example, see \algorithmref{alg:net}.
-
-\begin{algorithm2e}
-\caption{Computing Net Activation}
-\label{alg:net}
- % older versions of algorithm2e have \dontprintsemicolon instead
- % of the following:
- %\DontPrintSemicolon
- % older versions of algorithm2e have \linesnumbered instead of the
- % following:
- %\LinesNumbered
-\KwIn{$x_1, \ldots, x_n, w_1, \ldots, w_n$}
-\KwOut{$y$, the net activation}
-$y\leftarrow 0$\;
-\For{$i\leftarrow 1$ \KwTo $n$}{
- $y \leftarrow y + w_i*x_i$\;
-}
-\end{algorithm2e}
-
-\section{Description Lists}
-
-The \textsf{jmlr} class also provides a description-like
-environment called \texttt{altdescription}. This has an
-argument that should be the widest label in the list. Compare:
-\begin{description}
-\item[add] A method that adds two variables.
-\item[differentiate] A method that differentiates a function.
-\end{description}
-with
-\begin{altdescription}{differentiate}
-\item[add] A method that adds two variables.
-\item[differentiate] A method that differentiates a function.
-\end{altdescription}
-
-\section{Theorems, Lemmas etc}
-\label{sec:theorems}
-
-The following theorem-like environments are predefined by
-the \textsf{jmlr} class: \texttt{theorem}, \texttt{example},
-\texttt{lemma}, \texttt{proposition}, \texttt{remark},
-\texttt{corollary}, \texttt{definition}, \texttt{conjecture}
-and \texttt{axiom}. You can use the \texttt{proof} environment
-to display the proof if need be, as in \theoremref{thm:eigenpow}.
-
-\begin{theorem}[Eigenvalue Powers]\label{thm:eigenpow}
-If $\lambda$ is an eigenvalue of $\vec{B}$ with eigenvector
-$\vec{\xi}$, then $\lambda^n$ is an eigenvalue of $\vec{B}^n$
-with eigenvector $\vec{\xi}$.
-\begin{proof}
-Let $\lambda$ be an eigenvalue of $\vec{B}$ with eigenvector
-$\xi$, then
-\begin{align*}
-\vec{B}\vec{\xi} &= \lambda\vec{\xi}
-\intertext{premultiply by $\vec{B}$:}
-\vec{B}\vec{B}\vec{\xi} &= \vec{B}\lambda\vec{\xi}\\
-\Rightarrow \vec{B}^2\vec{\xi} &= \lambda\vec{B}\vec{\xi}\\
-&= \lambda\lambda\vec{\xi}\qquad
-\text{since }\vec{B}\vec{\xi}=\lambda\vec{\xi}\\
-&= \lambda^2\vec{\xi}
-\end{align*}
-Therefore true for $n=2$. Now assume true for $n=k$:
-\begin{align*}
-\vec{B}^k\vec{\xi} &= \lambda^k\vec{\xi}
-\intertext{premultiply by $\vec{B}$:}
-\vec{B}\vec{B}^k\vec{\xi} &= \vec{B}\lambda^k\vec{\xi}\\
-\Rightarrow \vec{B}^{k+1}\vec{\xi} &= \lambda^k\vec{B}\vec{\xi}\\
-&= \lambda^k\lambda\vec{\xi}\qquad
-\text{since }\vec{B}\vec{\xi}=\lambda\vec{\xi}\\
-&= \lambda^{k+1}\vec{\xi}
-\end{align*}
-Therefore true for $n=k+1$. Therefore, by induction, true for all
-$n$.
-\end{proof}
-\end{theorem}
-
-\begin{lemma}[A Sample Lemma]\label{lem:sample}
-This is a lemma.
-\end{lemma}
-
-\begin{remark}[A Sample Remark]\label{rem:sample}
-This is a remark.
-\end{remark}
-
-\begin{corollary}[A Sample Corollary]\label{cor:sample}
-This is a corollary.
-\end{corollary}
-
-\begin{definition}[A Sample Definition]\label{def:sample}
-This is a definition.
-\end{definition}
-
-\begin{conjecture}[A Sample Conjecture]\label{con:sample}
-This is a conjecture.
-\end{conjecture}
-
-\begin{axiom}[A Sample Axiom]\label{ax:sample}
-This is an axiom.
-\end{axiom}
-
-\begin{example}[An Example]\label{ex:sample}
-This is an example.
-\end{example}
-
-\section{Color vs Grayscale}
-\label{sec:color}
-
-It's helpful if authors supply grayscale versions of their
-images in the event that the article is to be incorporated into
-a black and white printed book. With external PDF, PNG or JPG
-graphic files, you just need to supply a grayscale version of the
-file. For example, if the file is called \texttt{myimage.png},
-then the gray version should be \texttt{myimage-gray.png} or
-\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't
-need to modify your code. The \textsf{jmlr} class checks for
-the existence of the grayscale version if it is print mode
-(provided you have used \verb|\includegraphics| and haven't
-specified the file extension).
-
-You can use \verb|\ifprint| to determine which mode you are in.
-For example, in \figureref{fig:nodes}, the
-\ifprint{dark gray}{purple} ellipse represents an input and the
-\ifprint{light gray}{yellow} ellipse represents an output.
-Another example: {\ifprint{\bfseries}{\color{red}}important text!}
-
-You can use the class option \texttt{gray} to see how the
-document will appear in gray scale mode. \textcolor{blue}{Colored
-text} will automatically be converted to gray scale in print mode.
-
-The \textsf{jmlr} class loads the \textsf{xcolor}
-package, so you can also define your own colors. For example:
-\ifprint
- {\definecolor{myred}{gray}{0.5}}%
- {\definecolor{myred}{rgb}{0.5,0,0}}%
-\textcolor{myred}{XYZ}.
-
-The \textsf{xcolor} class is loaded with the \texttt{x11names}
-option, so you can use any of the x11 predefined colors (listed
-in the \textsf{xcolor} documentation\footnote{either
-\texttt{texdoc xcolor} or \url{http://www.ctan.org/pkg/xcolor}}).
-
-\section{Citations and Bibliography}
-\label{sec:cite}
-
-The \textsf{jmlr} class automatically loads \textsf{natbib}
-and automatically sets the bibliography style, so you don't need to
-use \verb|\bibliographystyle|.
-This sample file has the citations defined in the accompanying
-BibTeX file \texttt{jmlr-sample.bib}. For a parenthetical
-citation use \verb|\citep|. For example
-\citep{guyon-elisseeff-03}. For a textual citation use
-\verb|\citet|. For example \citet{guyon2007causalreport}.
-Both commands may take a comma-separated list, for example
-\citet{guyon-elisseeff-03,guyon2007causalreport}.
-
-These commands have optional arguments and have a starred
-version. See the \textsf{natbib} documentation for further
-details.\footnote{Either \texttt{texdoc natbib} or
-\url{http://www.ctan.org/pkg/natbib}}
-
-The bibliography is displayed using \verb|\bibliography|.
-
-\acks{Acknowledgements go here.}
-
-\bibliography{jmlr-sample}
-
-\appendix
-
-\section{First Appendix}\label{apd:first}
-
-This is the first appendix.
-
-\section{Second Appendix}\label{apd:second}
-
-This is the second appendix.
-
-\end{document}
diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf b/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf
deleted file mode 100644
index 8600d8176e..0000000000
--- a/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/pdfpages/pdfpages.dtx b/macros/latex/contrib/pdfpages/pdfpages.dtx
index 10188c05a9..2deaa46206 100644
--- a/macros/latex/contrib/pdfpages/pdfpages.dtx
+++ b/macros/latex/contrib/pdfpages/pdfpages.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%<*(package,pppdftexdef,ppluatexdef,ppvtexdef,ppxetexdef,ppdvipsdef,ppdvipdfmxdef,ppnulldef)>
-%% Copyright (C) 2001-2021 Andreas MATTHIAS
+%% Copyright (C) 2001-2022 Andreas MATTHIAS
%%
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
@@ -27,12 +27,12 @@
%<*dtx>
\makeatletter
%</dtx>
-\def\AM@fileversion{v0.5t}
+\def\AM@fileversion{v0.5u}
\def\AM@Git@Date@process$#1: #2 #3${\AM@Git@Date@process@i#2\END}
\def\AM@Git@Date@process@i#1-#2-#3\END{\def\AM@Git@Date{#1/#2/#3}}
\def\AM@Git@SHA@process$#1: #2${\def\AM@Git@SHA{#2}}
-\AM@Git@Date@process$Date: 2021-03-06 23:19:52 +0100 $
-\AM@Git@SHA@process$SHA-1: 591720c980385429528b3bf2256f2d4f7c2c55e9 $
+\AM@Git@Date@process$Date: 2022-01-29 16:59:20 +0100 $
+\AM@Git@SHA@process$SHA-1: 7a5d1a24653fdc93c11ca1043f6d77a403446d92 $
%</!(example1,example2,example3,installer)>
%
%
@@ -84,7 +84,7 @@
%
% \GetFileInfo{pdfpages.dtx}
%
-% \CheckSum{5076}
+% \CheckSum{5077}
%
% \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
@@ -2974,7 +2974,7 @@
\AM@addtotoc@hook
\edef\AM@temp{{\AM@toc@section}{\AM@toc@level}%
{\z@}{\z@}{\z@}{}[\the\AM@toc@title]{}}%
- \edef\AM@tempi{\noexpand\csname @\AM@toc@section\noexpand\endcsname%
+ \edef\AM@tempi{\leavevmode\noexpand\csname @\AM@toc@section\noexpand\endcsname%
[\the\AM@toc@title]{}}%
\@ifundefined{@\AM@toc@section}
{\expandafter\@sect\AM@temp
@@ -4845,6 +4845,12 @@
% \item Page rotation: Use new pdfmanagement macros if they are
% available, and fallback to pdflscape if they are not available.
% \end{itemize}
+%
+% \subsection*{2022/01/29 v0.5u}
+% \begin{itemize}
+% \item Adding |\leavevmode| before |\@chapter|,... in |addtotoc|.
+% Bug fix for \url{https://tex.stackexchange.com/questions/631514/}.
+% \end{itemize}
% \Finale
%
% \iffalse
diff --git a/macros/latex/contrib/pdfpages/pdfpages.pdf b/macros/latex/contrib/pdfpages/pdfpages.pdf
index df6493f4d5..1fea4ad0c1 100644
--- a/macros/latex/contrib/pdfpages/pdfpages.pdf
+++ b/macros/latex/contrib/pdfpages/pdfpages.pdf
Binary files differ