summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-06-18 03:02:56 +0000
committerNorbert Preining <norbert@preining.info>2020-06-18 03:02:56 +0000
commit7a78c3b8b21b6842d27bb48f37197f8c380ccc5e (patch)
treeaaa0da455d5784ca3b21e12a88b6a739bb543e84 /macros
parentda248962ebaf9445ca3c9dde54c05c3baa8715ab (diff)
CTAN sync 202006180302
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/README.md6
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/acrosort.dtx11
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.pdfbin538637 -> 640143 bytes
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.tex25
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/docs/acrosort.pdfbin1461109 -> 265324 bytes
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex21
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/examples/choo/tg-choo.tex (renamed from macros/latex/contrib/aeb_pro/acrosort/examples/choo/create-tg.tex)0
-rw-r--r--macros/latex/contrib/aeb_pro/acrosort/examples/emoji/tg-emoji.tex (renamed from macros/latex/contrib/aeb_pro/acrosort/examples/emoji/create-tg.tex)0
-rw-r--r--macros/latex/contrib/changes/changes.drv4
-rw-r--r--macros/latex/contrib/changes/changes.dtx5
-rw-r--r--macros/latex/contrib/changes/changes.english.pdfbin184119 -> 353819 bytes
-rw-r--r--macros/latex/contrib/changes/changes.english.withcode.pdfbin265818 -> 443839 bytes
-rw-r--r--macros/latex/contrib/changes/changes.ins8
-rw-r--r--macros/latex/contrib/changes/changes.ngerman.pdfbin195534 -> 362269 bytes
-rw-r--r--macros/latex/contrib/changes/pyMergeChanges.py4
-rw-r--r--macros/latex/contrib/changes/userdoc/changes.de.tex3
-rw-r--r--macros/latex/contrib/changes/userdoc/changes.en.tex3
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_listofchanges.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex2
-rw-r--r--macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex2
-rw-r--r--macros/latex/contrib/menucard/README19
-rw-r--r--macros/latex/contrib/menucard/menucard.dtx323
-rw-r--r--macros/latex/contrib/menucard/menucard.ins55
-rw-r--r--macros/latex/contrib/menucard/menucard.pdfbin0 -> 176325 bytes
-rw-r--r--macros/latex/contrib/mlmath/README.md212
-rw-r--r--macros/latex/contrib/mlmath/mlmath.pdfbin0 -> 95727 bytes
-rw-r--r--macros/latex/contrib/mlmath/mlmath.sty622
-rw-r--r--macros/latex/contrib/mlmath/mlmath.tex244
-rw-r--r--macros/latex/contrib/yathesis/CHANGELOG.md12
-rw-r--r--macros/latex/contrib/yathesis/README.md2
-rw-r--r--macros/latex/contrib/yathesis/doc/yathesis-fr.pdfbin6516511 -> 6522425 bytes
-rw-r--r--macros/latex/contrib/yathesis/exemples/specimen/these.pdfbin1245417 -> 1245596 bytes
-rw-r--r--macros/latex/contrib/yathesis/source/yathesis.dtx139
40 files changed, 1639 insertions, 99 deletions
diff --git a/macros/latex/contrib/aeb_pro/acrosort/README.md b/macros/latex/contrib/aeb_pro/acrosort/README.md
index 461e0657b7..7d2533f0c4 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/README.md
+++ b/macros/latex/contrib/aeb_pro/acrosort/README.md
@@ -1,5 +1,5 @@
acrosort --- D. P. Story
-Dated: 2020-06-02
+Dated: 2020-06-17
The AcroSort is a novelty LaTeX package for importing a series
of tiled images of a picture. The tiled images are randomly
@@ -9,7 +9,9 @@ sort.
Images can be tiled using the tile-graphic package, also
available through CTAN.
-What new (2020-06-02): This is a complete rewrite of the
+What's New (2020-06-02): Minor suggested changes by CTAN maintainers
+
+What's New (2020-06-02): This is a complete rewrite of the
package. The package now supports all common PDF creators:
pdflatex, lualatex, xelatex, dvips->distiller. Multiple bubble
sort tiles images are now supported.
diff --git a/macros/latex/contrib/aeb_pro/acrosort/acrosort.dtx b/macros/latex/contrib/aeb_pro/acrosort/acrosort.dtx
index 894ee28258..083deea659 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/acrosort.dtx
+++ b/macros/latex/contrib/aeb_pro/acrosort/acrosort.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{acrosort}
-%<package> [2020/06/02 v1.6 AcroSort (dps)]
+%<package> [2020/06/17 v1.6.1 AcroSort (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -66,6 +66,8 @@
% \MakeShortVerb{|}
% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{web}{Inputting aebdonotindex.def}}
% {\PackageInfo{web}{cannot find aebdonotindex.def}}
+% \DoNotIndex{\DPSIndxList,\g@addto@macro,\divide,\box,\setbox,\x,\y,\z}
+%
% \section{Introduction}
% \pkg{acrosort} is a novelty {\LaTeX} package for embedding a series of tiled
% images of a picture. The tiled images are randomly arranged, then resorted
@@ -83,6 +85,7 @@
% though only one can be sorted at a time.
% \changes{v1.6}{2020/06/02}{Rewrite whole package to support \string\app{pdflatex},
% \string\app{lualatex}, and \string\app{xelatex} workflows.}
+% \changes{v1.6.1}{2020/06/17}{Minor changes to conform to CTAN requirements.}
% \section{Main Code}
% \begin{macrocode}
%<*package>
@@ -191,7 +194,7 @@
% named \texttt{mypic\_01}, \texttt{mypic\_02}, \texttt{mypic\_03}, \dots. It is assumed a single digit
% index has a leading 0. Use the command \DescribeMacro\isPackage
% \cs{isPackage} prior to \cs{asEmbedTiles}.
-% \changes{v1.5}{2020/08/06}{Embed graphics and support for packaged graphics}
+% \changes{v1.5}{2020/05/30}{Embed graphics and support for packaged graphics}
% \begin{macrocode}
\newcount\as@nCnt
\newif\if@isPackaged\@isPackagedfalse
@@ -203,14 +206,14 @@
\def\@Ext{#1}\ifx\@Ext\@empty\def\@Ext{.pdf}\else\def\@Ext{.#1}\fi
\@tempcnta\z@
\let\@embedList\@empty
- \let\DPSIndxList\@gobble
+% \let\DPSIndxList\@gobble
\edef\z{\noexpand\g@addto@macro\noexpand
\asIconObjs{,"#2":\asNumSideShowPics}}\z
\@whilenum \@tempcnta < \asNumSideShowPics \do{%
\as@nCnt\@tempcnta\advance\as@nCnt\@ne
\ifnum\as@nCnt<10\relax\edef\x{0\the\as@nCnt}\else
\edef\x{\the\as@nCnt}\fi
- \edef\z{\noexpand\g@addto@macro\noexpand\DPSIndxList{,"\x"}}\z
+% \edef\z{\noexpand\g@addto@macro\noexpand\DPSIndxList{,"\x"}}\z
\ifxetex\if@isPackaged
\PackageWarning{acrosort}
{There is no support for embedding packaged\MessageBreak
diff --git a/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.pdf b/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.pdf
index d6a8341144..8a3c63b30e 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.pdf
+++ b/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.tex b/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.tex
index 14fb507e1b..3db8c6f150 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.tex
+++ b/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort-man.tex
@@ -36,21 +36,19 @@
email={dpstory@acrotex.net},
subject={Documentation for AcroSort},
talksite={\url{www.acrotex.net}},
- version={1.6}, %2020/06/02 v1.6
-versionLabel={Version},
-%version={2020/06/02},
-version={1.6},
-copyrightyears={2006-\the\year},
-prepared={2020/06/02},
-preparedLabel={Distribution Dated:},
- keywords={Adobe Acrobat, JavaScript, LaTeX, JavaScript, sort, slicing},
+ version={1.6.1},
+ versionLabel={Version},
+ copyrightyears={2006-\the\year},
+ prepared={2020/06/17},
+ preparedLabel={Distribution Dated:},
+ keywords={Adobe Acrobat, JavaScript, LaTeX, JavaScript, bubble sort, tiling},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, D. P. Story},
copyrightInfoURL={http://www.acrotex.net}
}
\nocopyright
\usepackage{acroman}
-\usepackage[active]{srcltx}
+%\usepackage[active]{srcltx}
\def\nhfootnote#1{\begin{NoHyper}\footnote{#1}\end{NoHyper}}
@@ -276,7 +274,7 @@ of \ameta{name}.\normalbaselines
Use \ameta{KV-pairs} to change the appearance of the fields, where
\ameta{KV-pairs} are \pkg{eforms} field key-value pairs. The \ameta{name} argument
(\cs{StartSort} and \cs{ClearSort}) is the name of the graphics to be controlled.
-(\ameta{name} must match up with the \ameta{name} argument of \cs{asEmbedTiles} and
+(\ameta{name} must match up with the \ameta{name} argument of \cs{asEmbedTiles} and
\cs{insertTiles}.) The \ameta{wd} and \ameta{ht} are the width and height of the push button fields.
If a caption is provided, set \ameta{wd} to \texttt{\darg{}} and \pkg{eforms} will automatically
calculate the width based on the value of the \cs{CA} key.
@@ -308,8 +306,8 @@ Some simple examples; assume there is a text field by the name of
f.value="Begin sorting choo";
}
\renewcommand{\customFinishJS}{%
- var f=this.getField("message");
- f.value="Finished sorting choo";
+ var f=this.getField("message");
+ f.value="Finished sorting choo";
}
\end{Verbatim}
@@ -326,7 +324,8 @@ commands they effect. The other command (\cs{customFinishJS}), which is marked a
Use the package \pkg{tile-graphic}\FmtMP{\pkg{tile-graphic} pkg} to tile a
graphics file. In the \texttt{examples} folder there are two demo files, \texttt{as1.tex}
and \texttt{as2.tex}, that use the graphics in the \texttt{emoji} and \texttt{choo} folders.
-In each of the two folders is a file named \texttt{create-tg.tex}. The one in the \texttt{emoji}
+These two folders contain files \texttt{tg-emoji.tex} and \texttt{tg-choo.tex} that were used to produce
+the tiled graphics. The one in the \texttt{emoji}
folder is reproduced
below.\FmtMP[-3\baselineskip]{\texttt{pdfcreator=\mbox{\hskip20pt}\\pdflatex\string|\\lualatex\string|\\xelatex\string|\\distiller}}
\begin{Verbatim}[fontsize=\small]
diff --git a/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort.pdf b/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort.pdf
index b3004a8eba..37113157d6 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort.pdf
+++ b/macros/latex/contrib/aeb_pro/acrosort/docs/acrosort.pdf
Binary files differ
diff --git a/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex b/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex
index 1419c8b297..aef2616d3d 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex
+++ b/macros/latex/contrib/aeb_pro/acrosort/examples/as2.tex
@@ -35,7 +35,8 @@
\parindent0pt
\thispagestyle{empty}
-
+% sortName is the name of the active tiled sort. At the end of a sort
+% if it is the choo sort, we start the emj sort.
\customFinishJS{%
if(sortName=="choo") {
var f=this.getField("message");
@@ -46,27 +47,33 @@
\begin{document}
-The new \textsf{acrosort} allows for multiple sorts of pictures.
+The new \textsf{acrosort} allows for multiple tiled bubble sorts.
+% These apply to both tiled bubble sorts
\appendClearSortJS{this.resetForm("message");}
\appendStopSortJS{this.resetForm("message");}
-
\begin{minipage}[t]{.5\linewidth-5pt}\kern0pt
-\begin{center}
-\insertTiles{choo}{\linewidth}{4}{5}
+\begin{center}\fboxsep1bp\fboxrule2bp
+\fbox{\makebox[0pt][l]{\makebox[\linewidth][c]{The choo tiled sort}}%
+ \insertTiles{choo}{\linewidth}{4}{5}}%
\end{center}
+% the \customStartJS and \appendStartSortJS apply only to choo, since they are in a group (minipage)
\smallskip\customStartJS{var f=this.getField("message"); f.value=("Starting the choo sort");}
+% if Ctrl key is not down, we fool the \customFinishJS by renaming sortName, that way, simply
+% pressing the Press Me button does not activate the emj sort on finish.
\appendStartSortJS{sortName=(event.modifier)?"choo":"";}
\centering\StartSort[\TU{Click to sort the train, press Ctrl-Click to sort both}]{choo}{}{12bp}\quad\StopSort{}{12bp}\quad\ClearSort{choo}{}{12bp}\par\medskip
\end{minipage}\hfill
%
\begin{minipage}[t]{.5\linewidth-5pt}\kern0pt
-\begin{center}
-\insertTiles{emj}{.5\linewidth}{4}{4}
+\begin{center}\fboxsep1bp\fboxrule2bp
+\fbox{\makebox[0pt][l]{\makebox[.5\linewidth]{The emj tiled sort}}%
+ \insertTiles{emj}{.5\linewidth}{4}{4}}
\end{center}
+% the \customStartJS and \appendStartSortJS apply only to emj, since they are in a group (minipage)
\smallskip\customStartJS{var f=this.getField("message"); f.value=("Starting the emj sort");}
\centering\StartSort{emj}{}{12bp}\quad\StopSort{}{12bp}\quad\ClearSort{emj}{}{12bp}
\end{minipage}
diff --git a/macros/latex/contrib/aeb_pro/acrosort/examples/choo/create-tg.tex b/macros/latex/contrib/aeb_pro/acrosort/examples/choo/tg-choo.tex
index c7c5e220b5..c7c5e220b5 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/examples/choo/create-tg.tex
+++ b/macros/latex/contrib/aeb_pro/acrosort/examples/choo/tg-choo.tex
diff --git a/macros/latex/contrib/aeb_pro/acrosort/examples/emoji/create-tg.tex b/macros/latex/contrib/aeb_pro/acrosort/examples/emoji/tg-emoji.tex
index 7ab4175c2d..7ab4175c2d 100644
--- a/macros/latex/contrib/aeb_pro/acrosort/examples/emoji/create-tg.tex
+++ b/macros/latex/contrib/aeb_pro/acrosort/examples/emoji/tg-emoji.tex
diff --git a/macros/latex/contrib/changes/changes.drv b/macros/latex/contrib/changes/changes.drv
index 0ca29f10a1..9b744e7298 100644
--- a/macros/latex/contrib/changes/changes.drv
+++ b/macros/latex/contrib/changes/changes.drv
@@ -260,11 +260,11 @@
% document title
\ifENGLISH
\title{The \chpackage{changes}-package}
- \subtitle{Manual change markup --- version 3.2.1}
+ \subtitle{Manual change markup --- version 3.2.2}
\fi
\ifGERMAN
\title{Das \chpackage{changes}-Paket}
- \subtitle{Manuelle Änderungsmarkierung -- Version 3.2.1}
+ \subtitle{Manuelle Änderungsmarkierung -- Version 3.2.2}
\fi
\author{Ekkart Kleinod}
diff --git a/macros/latex/contrib/changes/changes.dtx b/macros/latex/contrib/changes/changes.dtx
index 0604223858..7a7fba693e 100644
--- a/macros/latex/contrib/changes/changes.dtx
+++ b/macros/latex/contrib/changes/changes.dtx
@@ -61,6 +61,7 @@
% \changes{v3.1.3}{2019/07/21}{bugfix: option clash for ulem and truncate; documentation of known problems and solutions}
% \changes{v3.2.0}{2019/10/28}{Merge changes script (pyMergeChanges): Support nested brackets}
% \changes{v3.2.1}{2019/11/17}{removed obsolete package pdfcolmk}
+% \changes{v3.2.2}{2020/06/16}{Merge changes script (pyMergeChanges): Correctly handle multiple different macros in the same line}
% \GetFileInfo{changes.dtx}
% \RecordChanges
%
@@ -101,8 +102,8 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{changes}
-[2019/11/17 v3.2.1 changes package]
-\typeout{*** changes package 2019/11/17 v3.2.1 ***}
+[2020/06/16 v3.2.2 changes package]
+\typeout{*** changes package 2020/06/16 v3.2.2 ***}
% \end{macrocode}
%
% Package \chpackage{xkeyval} provides options with key-value-pairs.
diff --git a/macros/latex/contrib/changes/changes.english.pdf b/macros/latex/contrib/changes/changes.english.pdf
index d3033ecd1d..028860caa3 100644
--- a/macros/latex/contrib/changes/changes.english.pdf
+++ b/macros/latex/contrib/changes/changes.english.pdf
Binary files differ
diff --git a/macros/latex/contrib/changes/changes.english.withcode.pdf b/macros/latex/contrib/changes/changes.english.withcode.pdf
index 38254d42a2..fbc104e48d 100644
--- a/macros/latex/contrib/changes/changes.english.withcode.pdf
+++ b/macros/latex/contrib/changes/changes.english.withcode.pdf
Binary files differ
diff --git a/macros/latex/contrib/changes/changes.ins b/macros/latex/contrib/changes/changes.ins
index acf9b77468..85d758ab51 100644
--- a/macros/latex/contrib/changes/changes.ins
+++ b/macros/latex/contrib/changes/changes.ins
@@ -1,6 +1,6 @@
%% This file creates the needed files from changes.dtx
%%
-\def\filedate{2019/11/17}
+\def\filedate{2020/06/16}
\def\batchfile{changes.ins}
\input docstrip
@@ -10,7 +10,7 @@
\preamble
changes.dtx
-Copyright 2007-2019 Ekkart Kleinod (ekleinod@edgesoft.de)
+Copyright 2007-2020 Ekkart Kleinod (ekleinod@edgesoft.de)
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -31,7 +31,7 @@ This work consists of the files
source/latex/changes/README
source/latex/changes/userdoc/*.tex
- scripts/changes/delcmdchanges.bash
+ scripts/changes/pyMergeChanges.py
and the derived files
doc/latex/changes/changes.english.pdf
doc/latex/changes/changes.english.withcode.pdf
@@ -45,7 +45,7 @@ and the derived files
\endpreamble
\postamble
-Copyright 2007-2019 Ekkart Kleinod
+Copyright 2007-2020 Ekkart Kleinod
\endpostamble
\generate{
diff --git a/macros/latex/contrib/changes/changes.ngerman.pdf b/macros/latex/contrib/changes/changes.ngerman.pdf
index 037fd7967f..92372fc548 100644
--- a/macros/latex/contrib/changes/changes.ngerman.pdf
+++ b/macros/latex/contrib/changes/changes.ngerman.pdf
Binary files differ
diff --git a/macros/latex/contrib/changes/pyMergeChanges.py b/macros/latex/contrib/changes/pyMergeChanges.py
index 39c8b22007..b93de6f408 100644
--- a/macros/latex/contrib/changes/pyMergeChanges.py
+++ b/macros/latex/contrib/changes/pyMergeChanges.py
@@ -181,6 +181,7 @@ codecs.open(OUTPUTFILE, mode='a', encoding='utf8') as fout:
matchAdded = RE_ADDED.search(lineout, next_pos) # redo matching for updated text
next_pos = 0
+ matchDeleted = RE_DELETED.search(lineout, next_pos) # redo matching for (potentially) updated text
while matchDeleted:
if FLAG_FAST_BREAK:
break
@@ -201,6 +202,7 @@ codecs.open(OUTPUTFILE, mode='a', encoding='utf8') as fout:
matchDeleted = RE_DELETED.search(lineout, next_pos)
next_pos = 0
+ matchReplaced = RE_REPLACED.search(lineout, next_pos) # redo matching for (potentially) updated text
while matchReplaced:
if FLAG_FAST_BREAK:
break
@@ -227,6 +229,7 @@ codecs.open(OUTPUTFILE, mode='a', encoding='utf8') as fout:
matchReplaced = RE_REPLACED.search(lineout, next_pos)
next_pos = 0
+ matchHighlight = RE_HIGHLIGHT.search(lineout, next_pos) # redo matching for (potentially) updated text
while matchHighlight:
if FLAG_FAST_BREAK:
break
@@ -247,6 +250,7 @@ codecs.open(OUTPUTFILE, mode='a', encoding='utf8') as fout:
matchHighlight = RE_HIGHLIGHT.search(lineout, next_pos)
next_pos = 0
+ matchComment = RE_COMMENT.search(lineout, next_pos) # redo matching for (potentially) updated text
while matchComment:
if FLAG_FAST_BREAK:
break
diff --git a/macros/latex/contrib/changes/userdoc/changes.de.tex b/macros/latex/contrib/changes/userdoc/changes.de.tex
index e9c9dd7690..912223f32d 100644
--- a/macros/latex/contrib/changes/userdoc/changes.de.tex
+++ b/macros/latex/contrib/changes/userdoc/changes.de.tex
@@ -948,6 +948,7 @@ Die Autorinnen und Autoren sind in alphabetischer Reihenfolge:
\item Giovannini, Daniele
\item Kleinod, Ekkart
\item Mittelbach, Frank
+ \item Richardson, Alexander
\item Voss, Herbert
\item Wölfel, Philipp
\item Wolter, Steve
@@ -975,7 +976,7 @@ Wenn Sie an geplanten, zukünftigen Änderungen interessiert sind, finden Sie di
\cleardoublepage
\section{Weitergabe, Copyright, Lizenz}
-Copyright 2007-2019 Ekkart Kleinod (\href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de})
+Copyright 2007-2020 Ekkart Kleinod (\href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de})
Dieses Paket darf unter der "`\hologo{LaTeX} Project Public License"' Version~1.3 oder jeder späteren Version weitergegeben und/oder geändert werden.
Die neueste Version dieser Lizenz steht auf \url{http://www.latex-project.org/lppl.txt} Version~1.3 und spätere Versionen sind Teil aller \hologo{LaTeX}-Distributionen ab Version~2005/12/01.
diff --git a/macros/latex/contrib/changes/userdoc/changes.en.tex b/macros/latex/contrib/changes/userdoc/changes.en.tex
index 2e721a02dc..a146dcf8f9 100644
--- a/macros/latex/contrib/changes/userdoc/changes.en.tex
+++ b/macros/latex/contrib/changes/userdoc/changes.en.tex
@@ -954,6 +954,7 @@ The authors are (in alphabetical order):
\item Giovannini, Daniele
\item Kleinod, Ekkart
\item Mittelbach, Frank
+ \item Richardson, Alexander
\item Voss, Herbert
\item Wölfel, Philipp
\item Wolter, Steve
@@ -981,7 +982,7 @@ If you are interested in planned new features, please see
\cleardoublepage
\section{Distribution, Copyright, License}
-Copyright 2007-2019 Ekkart Kleinod (\href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de})
+Copyright 2007-2020 Ekkart Kleinod (\href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de})
This work may be distributed and/or modified under the conditions of the \hologo{LaTeX} Project Public License, either version~1.3 of this license or any later version.
The latest version of this license is in \url{http://www.latex-project.org/lppl.txt} and version~1.3 or later is part of all distributions of \hologo{LaTeX} version 2005/12/01 or later.
diff --git a/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex b/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex
index 28670de33e..2c1bf1e4b5 100644
--- a/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex
@@ -1,5 +1,5 @@
\listofchanges
-\listofchanges[style=list] !\Corresponds! \listofchanges
+\listofchanges[style=list] ~ \listofchanges
\listofchanges[style=summary, title={My Summary}]
\listofchanges[title={List of comments}, show=comment]}
\listofchanges[style=compactsummary, show=added|deleted|replaced, title={Text changes}]}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex
index 32a2415bf3..e89bdf4372 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex
@@ -1,3 +1,3 @@
-\usepackage[addedmarkup=colored]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[addedmarkup=colored]{changes} ~ \usepackage{changes}
\usepackage[addedmarkup=uline]{changes}
\usepackage[addedmarkup=bf]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex
index 4008a8f784..ca023e61ef 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex
@@ -1,3 +1,3 @@
-\usepackage[authormarkup=superscript]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[authormarkup=superscript]{changes} ~ \usepackage{changes}
\usepackage[authormarkup=brackets]{changes}
\usepackage[authormarkup=none]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex
index 9467a99c55..f6cad295da 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex
@@ -1,2 +1,2 @@
-\usepackage[authormarkupposition=right]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[authormarkupposition=right]{changes} ~ \usepackage{changes}
\usepackage[authormarkupposition=left]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex
index 9d07908314..8698dda5a3 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex
@@ -1,2 +1,2 @@
-\usepackage[authormarkuptext=id]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[authormarkuptext=id]{changes} ~ \usepackage{changes}
\usepackage[authormarkuptext=name]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex
index 5d590fa14f..571595b1ee 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex
@@ -1,3 +1,3 @@
-\usepackage[commentmarkup=todo]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[commentmarkup=todo]{changes} ~ \usepackage{changes}
\usepackage[commentmarkup=footnote]{changes}
\usepackage[commentmarkup=uwave]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex
index 474ad61388..096b60ba89 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex
@@ -1,3 +1,3 @@
-\usepackage[deletedmarkup=sout]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[deletedmarkup=sout]{changes} ~ \usepackage{changes}
\usepackage[deletedmarkup=xout]{changes}
\usepackage[deletedmarkup=uwave]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex
index 282d033540..f4b7c1ea0e 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex
@@ -1,2 +1,2 @@
-\usepackage[highlightmarkup=background]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[highlightmarkup=background]{changes} ~ \usepackage{changes}
\usepackage[highlightmarkup=uuline]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex
index 897656139c..59d99829e1 100644
--- a/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex
@@ -1,4 +1,4 @@
-\usepackage[markup=default]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[markup=default]{changes} ~ \usepackage{changes}
\usepackage[markup=underlined]{changes}
\usepackage[markup=bfit]{changes}
\usepackage[markup=nocolor]{changes}
diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex
index 5d6c17eea2..20d23104b2 100644
--- a/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex
+++ b/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex
@@ -1 +1 @@
-\usepackage[draft]{changes} !\Corresponds! \usepackage{changes}
+\usepackage[draft]{changes} ~ \usepackage{changes}
diff --git a/macros/latex/contrib/menucard/README b/macros/latex/contrib/menucard/README
new file mode 100644
index 0000000000..0640731324
--- /dev/null
+++ b/macros/latex/contrib/menucard/README
@@ -0,0 +1,19 @@
+=====================================================================
+
+The menucard package v0.1
+Copyright (C) 2020 Sascha Frank (menucard@sascha-frank.com)
+
+This package is used to set simple menus.
+
+Changes:
+- 2020/06/17 Initial version
+
+=====================================================================
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
diff --git a/macros/latex/contrib/menucard/menucard.dtx b/macros/latex/contrib/menucard/menucard.dtx
new file mode 100644
index 0000000000..da45e9a78f
--- /dev/null
+++ b/macros/latex/contrib/menucard/menucard.dtx
@@ -0,0 +1,323 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2020 by Sascha Frank <menucard@sascha-frank.com>
+% -------------------------------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{menucard.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{menucard}
+%<*package>
+ [2020/06/17 v0.1 menucards ]
+\RequirePackage[x11names]{xcolor}
+\RequirePackage{soul}
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{menucard}[2020/06/17]
+\usepackage{hyperref}
+\usepackage{parskip}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{menucard.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{162}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v0.1}{2020/06/17}{Initial version}
+%
+% \GetFileInfo{menucard.dtx}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+%
+% \title{The \textsf{menucard} package\thanks{This document
+% corresponds to \textsf{menucard}~\fileversion, dated \filedate.}}
+% \author{Sascha Frank \\ \texttt{menucard@sascha-frank.com}}
+%
+% \maketitle
+% \begin{abstract}
+% The reason for this package was that I did not find a package for creating menus.
+% \end{abstract}
+%
+% \section{Introduction}
+% The usepackage is based on the answer of Gonzalo Medina\footnote{See also \href{https://tex.stackexchange.com/questions/38091}{https://tex.stackexchange.com/questions/38091}} to the question about a document class for restaurant menus.\cite{medina}
+%
+%
+% \section{What you need}
+% It requires the usepackages soul and xcolor.
+% \section{Loading}
+% Load the package with: \verb+\usepackage{menucard}+
+%
+% \section{Usage}
+% \DescribeMacro{\ColTextColor}
+% This macro sets the color of the menu heading. Default is Goldenrod3. Change color:
+% \begin{verbatim}
+% \definecolor{plumt}{rgb}{0.56, 0.27, 0.52}
+% \renewcommand{\ColTextColor}{plumt}
+% \end{verbatim}
+%
+% \DescribeMacro{\ColSubTextColor}
+% To set the color for the second heading. By default 50\% opacity of the first color.
+%
+% \DescribeMacro{\zapf}
+% With the command \verb+\zapf+ the font for the numbering can be changed. For example change to sans serif font \verb+\renewcommand{\zapf}{\sffamily}+ or to use normalfont \verb+\renewcommand{\zapf}{}+.
+%
+% \DescribeMacro{\Allergens}
+% To label allergenes and additives.
+% \begin{verbatim}
+% \Allergens{A,B,C}
+% \end{verbatim}
+%
+%
+% \subsection{menugroup}
+% There are three new environments, for each there is an additional star alternative. The variant without a star is intended for the case that the menus are to be numbered consecutively. In the variant with a star, the menus are not numbered consecutively. For this reason there are two different commands to insert entries. One is the command \verb+\Entry+ for the star environments and \verb+\Entrycount+ for the others.
+%
+% The environments Group and Group* have one parameter.
+%
+% \DescribeEnv{Group*}
+% Creates a two-column table over the width of the text, with the first column left-aligned (p-column) and the second column right-aligned.
+%
+% \begin{verbatim}
+% \begin{Group*}{heading}
+% ...
+% \end{Group*}
+% \end{verbatim}
+%
+% \DescribeEnv{Group}
+%Creates a three-column table of the width of the text, with the first two columns left-aligned (p-columns) and the third column right-aligned. The first column is intended for numbering.
+%
+% \begin{verbatim}
+% \begin{Group}{heading}
+% ...
+% \end{Group}
+% \end{verbatim}
+%
+% The following environments have two parameters.
+%
+% \DescribeEnv{menugroup*}
+%Creates a two-column table over the width of the column, where the first two columns are left-aligned (p-column) and the second column is right-aligned. The text size is \verb+\huge+ for the first heading and \verb+\LARGE+ for the second heading. The colors of the heading are Goldenrod3 respectively 50\% of it by default. A horizontal line is drawn after the headings.
+%
+% \begin{verbatim}
+% \begin{menugroup*}{first heading}{second heading}
+% ...
+% \end{menugroup*}
+% \end{verbatim}
+%
+% \DescribeEnv{menugroup}
+%Like menugroup* but with an additional third column for numbering.
+%
+% \begin{verbatim}
+% \begin{menugroup}{first heading}{second heading}
+% ...
+% \end{menugroup}
+% \end{verbatim}
+%
+% \DescribeEnv{menugroupsc*}
+%Like menugroup* only that the headings are set in small caps.
+%
+% \begin{verbatim}
+% \begin{menugroupsc*}{first heading}{second heading}
+% ...
+% \end{menugroupsc*}
+% \end{verbatim}
+%
+% \DescribeEnv{menugroupsc}
+%Like menugroup only that the headings are set in small caps.
+%
+% \begin{verbatim}
+% \begin{menugroupsc}{first heading}{second heading}
+% ...
+% \end{menugroupsc}
+% \end{verbatim}
+%
+% To set the menu entries within the environments the commands \verb+\Entry+ or \verb+\Entrycount+. Within these commands, the command \verb+\Expl+ can be used to insert additional explanations.
+%
+% \DescribeMacro{\Entry}
+% Used within the star environments with \verb+\Entry{left}{right}+ respectively with \verb+\Entry{left, \Expl{more}}{right}+.
+%
+% \DescribeMacro{\Entrycount}
+% Used within the no star environments with \verb+\Entrycount{left}{right}+ respectively with \verb+\Entrycount{left, \Expl{more}}{right}+.
+%
+% \DescribeMacro{\Expl}
+% Can be used within \verb+\Entry+ respectively \verb+\Entrycount+ to write sub entries.
+%
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% Setting color
+% \begin{macro}{\ColTextColor}
+% \begin{macrocode}
+\newcommand{\ColTextColor}{Goldenrod3}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ColSubTextColor}
+% \begin{macrocode}
+\newcommand{\ColSubTextColor}{\ColTextColor!50}
+% \end{macrocode}
+% \end{macro}
+% Text color first heading
+% \begin{macro}{\ColText}
+% \begin{macrocode}
+\newcommand*\ColText[1]{\textcolor{\ColTextColor}{#1}}
+% \end{macrocode}
+% \end{macro}
+% Text color second heading
+% \begin{macro}{\ColSubText}
+% \begin{macrocode}
+\newcommand*\ColSubText[1]{\textcolor{\ColSubTextColor}{#1}}
+% \end{macrocode}
+% \end{macro}
+% Counter
+% \begin{macro}{menucount}
+% \begin{macrocode}
+\newcounter{menucount}
+% \end{macrocode}
+% \end{macro}
+% New font for numbers
+% \begin{macro}{\zapf}
+% \begin{macrocode}
+\newcommand{\zapf}{\fontfamily{pzc}\selectfont}
+% \end{macrocode}
+% \end{macro}
+% Allergens
+% \begin{macro}{\Allergens}
+% \begin{macrocode}
+\newcommand{\Allergens}[1]{\textsuperscript{\tiny\sffamily #1}}
+% \end{macrocode}
+% \end{macro}
+% to format each entry in ENV*
+% \begin{macro}{\Entry}
+% \begin{macrocode}
+\newcommand*\Entry[2]{%
+ \sffamily#1 & #2}
+% \end{macrocode}
+% \end{macro}
+% to format each subentry
+% \begin{macro}{\Expl}
+% \begin{macrocode}
+\newcommand*\Expl[1]{%
+ \hspace*{1em}\footnotesize #1}
+% \end{macrocode}
+% \end{macro}
+% to format each entry in ENV
+% \begin{macro}{\Entrycount}
+% \begin{macrocode}
+\newcommand*\Entrycount[2]{\stepcounter{menucount} %
+ \zapf{\themenucount}\hspace*{1em} & \sffamily#1 & #2 }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{Group*}
+% a tabular* for each food group
+% \begin{macrocode}
+\newenvironment{Group*}[1]{
+ \noindent\begin{tabular*}{\textwidth}{@{}p{.8\linewidth}@{\extracolsep{\fill}}r@{}}
+ {\fontsize{24}{29}\selectfont\ColText{#1}}\\[0.8em]}
+ {\end{tabular*}}
+% \end{macrocode}
+% \end{environment}
+% adding an extra column for counting
+% \begin{environment}{Group}
+% \begin{macrocode}
+\newenvironment{Group}[1]
+ {\noindent\begin{tabular*}{\textwidth}{p{2em}@{}p{.8\linewidth}@{\extracolsep{\fill}}r@{}}
+ \multicolumn{3}{l}{{\fontsize{24}{29}\selectfont\ColText{#1}}}\\[0.8em]}
+ {\end{tabular*}}
+% \end{macrocode}
+%\end{environment}
+% Change width and font size and added two headings
+% \begin{environment}{menugroup*}
+% \begin{macrocode}
+\newenvironment{menugroup*}[2]
+ {
+\noindent\begin{tabular*}{\columnwidth}{@{}p{.8\linewidth}@{\extracolsep{\fill}}r@{}}
+ {\huge\textcolor{\ColTextColor}{#1}\hspace*{0.1em}
+ \LARGE\textcolor{\ColSubTextColor}{#2}}\\[0.2em]
+ \noindent\rule{\columnwidth}{0.4pt} & \\[0.8em]}
+ {\end{tabular*}}
+% \end{macrocode}
+%\end{environment}
+% Adding an extra column for counting
+% \begin{environment}{menugroup}
+% \begin{macrocode}
+\newenvironment{menugroup}[2]
+ {
+\noindent\begin{tabular*}{\columnwidth}{p{2em}@{}p{.8\linewidth}@{\extracolsep{\fill}}r@{}}
+ \multicolumn{3}{l}{\hspace*{-0.5em}{\huge\textcolor{\ColTextColor}{#1}\hspace*{0.1em} \LARGE\textcolor{\ColSubTextColor}{#2}}}\\[0.2em]
+ \noindent\hspace*{-0.55em}\rule{\columnwidth}{0.4pt} & \\[0.8em]}
+ {\end{tabular*}}
+% \end{macrocode}
+% \end{environment}
+% Adding caps for headings
+% \begin{environment}{menugroupsc*}
+% \begin{macrocode}
+\newenvironment{menugroupsc*}[2]
+ {
+\noindent\begin{tabular*}{\columnwidth}{@{}p{.8\linewidth}@{\extracolsep{\fill}}r@{}}
+ {\huge\textcolor{\ColTextColor}{\caps{#1}}\hspace*{0.1em} \LARGE\textcolor{\ColSubTextColor}{\caps{#2}}}\\[0.2em]
+ \noindent\rule{\columnwidth}{0.4pt} & \\[0.8em]}
+ {\end{tabular*}}
+% \end{macrocode}
+%\end{environment}
+% Adding an extra column for counting
+% \begin{environment}{menugroupsc}
+% \begin{macrocode}
+\newenvironment{menugroupsc}[2]
+ {
+\noindent\begin{tabular*}{\columnwidth}{p{2em}@{}p{.8\linewidth}@{\extracolsep{\fill}}r@{}}
+ \multicolumn{3}{l}{\hspace*{-0.5em}{\huge\textcolor{\ColTextColor}{\caps{#1}}\hspace*{0.1em} \LARGE\textcolor{\ColSubTextColor}{\caps{#2}}}}\\[0.2em]
+ \noindent\hspace*{-0.55em}\rule{\columnwidth}{0.4pt} & \\[0.8em]}
+ {\end{tabular*}}
+% \end{macrocode}
+%\end{environment}
+%
+%
+%\begin{thebibliography}{9}
+%\bibitem{medina}{Gonzalo Medina, 2011/12/13, class for a restaurant menu,\\ \href{https://tex.stackexchange.com/questions/38091/document-class-for-a-restaurant-menu}{https://tex.stackexchange.com/questions/38091/document-class-for-a-restaurant-menu}}
+%\end{thebibliography}
+%\bibliographystyle{unsrtdin}
+% \Finale
+\endinput
diff --git a/macros/latex/contrib/menucard/menucard.ins b/macros/latex/contrib/menucard/menucard.ins
new file mode 100644
index 0000000000..d7bbcefaff
--- /dev/null
+++ b/macros/latex/contrib/menucard/menucard.ins
@@ -0,0 +1,55 @@
+%%
+%% Copyright (C) 2020 by Sascha Frank <menucard@sascha-frank.com>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/menucard}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2020 by Sascha Frank <menucard@sascha-frank.com>
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 of this license
+or (at your option) any later version. The latest version of this
+license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{menucard.sty}{\from{menucard.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* menucard.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file menucard.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
diff --git a/macros/latex/contrib/menucard/menucard.pdf b/macros/latex/contrib/menucard/menucard.pdf
new file mode 100644
index 0000000000..3d727d88d4
--- /dev/null
+++ b/macros/latex/contrib/menucard/menucard.pdf
Binary files differ
diff --git a/macros/latex/contrib/mlmath/README.md b/macros/latex/contrib/mlmath/README.md
new file mode 100644
index 0000000000..b0c3f94f16
--- /dev/null
+++ b/macros/latex/contrib/mlmath/README.md
@@ -0,0 +1,212 @@
+# Suggested Notation for Machine Learning
+
+## Authors
+
+- **Beijing Academy of Artificial Intelligence (北京智源人工智能研究院)**
+- **Peking University (北京大学)**
+- **Shanghai Jiao Tong University (上海交通大学)**
+- **[Zhi-qin John Xu (许志钦)](mailto:xuzhiqin@sjtu.edu.cn), [Tao Luo (罗涛)](mailto:luo196@purdue.edu), [Zheng Ma (马征)](mailto:ma531@purdue.edu), [Yaoyu Zhang (张耀宇)](mailto:yaoyu@ias.edu)** - _Initial work_
+
+## Introduction
+
+> This introduces a suggestion of mathematical notation protocol for machine learning.
+
+The field of machine learning is evolving rapidly in recent years. Communication between different researchers and research groups becomes increasingly important. A key challenge for communication arises from inconsistent notation usages among different papers. This proposal suggests a standard for commonly used mathematical notation for machine learning. In this first version, only some notation are mentioned and more notation are left to be done. This proposal will be regularly updated based on the progress of the field. We look forward to more suggestions to improve this proposal in future versions.
+
+## Tabel of Contents
+
+- [Suggested Notation for Machine Learning](#suggested-notation-for-machine-learning)
+ - [Authors](#authors)
+ - [Introduction](#introduction)
+ - [Tabel of Contents](#tabel-of-contents)
+ - [Dataset](#dataset)
+ - [Function](#function)
+ - [Loss function](#loss-function)
+ - [Activation function](#activation-function)
+ - [Two-layer neural network](#two-layer-neural-network)
+ - [General deep neural network](#general-deep-neural-network)
+ - [Complexity](#complexity)
+ - [Training](#training)
+ - [Fourier Frequency](#fourier-frequency)
+ - [Convolution](#convolution)
+ - [Notation table](#notation-table)
+ - [L-layer neural network](#l-layer-neural-network)
+- [Acknowledgements](#acknowledgements)
+
+## Dataset
+
+Dataset $S=\{\mathbf{z}_i\}^n_{i=1}=\{(\mathbf{x}_i,\mathbf{y}_i)\}^n_{i=1}$ is sampled from a distribution $\mathcal{D}$ over a domain $\mathcal{Z}=\mathcal{X}\times\mathcal{Y}$.
+
+- $\mathcal{X}$ is the instances domain (a set)
+- $\mathcal{Y}$ is the label domain (a set)
+- $\mathcal{Z}=\mathcal{X}\times\mathcal{Y}$ is the example domain (a set)
+
+Usually, $\mathcal{X}$ is a subset of $\mathbb{R}^d$ and $\mathcal{Y}$ is a subset of $\mathbb{R}^{d_\text{o}}$, where $d$ is the input dimension, $d_\text{o}$ is the ouput dimension.
+
+$n=\#S$ is the number of samples. Wihout specification, $S$ and $n$ are for the training set.
+
+## Function
+
+A hypothesis space is denoted by $\mathcal{H}$. A hypothesis function is denoted by $f_{\mathbf{\theta}}(\mathbf{x})\in\mathcal{H}$ or $f(\mathbf{x};\mathbf{\theta})$ with $f_{\mathbf{\theta}}:\mathcal{X}\to\mathcal{Y}$.
+
+$\mathbf{\theta}$ denotes the set of parameters of $f_{\mathbf{\theta}}$.
+
+If there exists a target function, it is denoted by $f^*$ or $f^*:\mathcal{X}\to\mathcal{Y}$ satisfying $\mathbf{y}_i=f^*(\mathbf{x}_i)$ for $i=1,\dots,n$.
+
+## Loss function
+
+A loss function, denoted by $\ell:\mathcal{H}\times\mathcal{Z}\to\mathbb{R}_{+}:=[0,+\infty)$ measures the difference between a predicted label and a true label, e.g.,
+
+- $L^2$ loss: $\ell(f_{\mathbf{\theta}},\mathbf{z})=(f_{\mathbf{\theta}}(\mathbf{x})-\mathbf{y})^2$, where $\mathbf{z}=(\mathbf{x},\mathbf{y})$. $\ell(f_{\mathbf{\theta}},\mathbf{z})$ can also be written as $\ell(f_{\mathbf{\theta}},\mathbf{y}))$ for convenience.
+
+Empirical risk or training loss for a set $S=\{(\mathbf{x_i},\mathbf{y_i})\}^n_{i=1}$ is denoted by $L_S(\mathbf{\theta})$ or $L_n(\mathbf{\theta})$ or $R_S(\mathbf{\theta})$ or $R_n(\mathbf{\theta})$,
+
+$$
+ L_S(\mathbf{\theta})=\frac{1}{n}\sum^n_{i=1}\ell(f_{\mathbf{\theta}}(\mathbf{x}_i),\mathbf{y}_i).
+$$
+
+The population risk or expected loss is denoted by $L_{\mathcal{D}}$ or $R_{\mathcal{D}}$,
+
+$$
+ L_{\mathcal{D}}(\mathbf{\theta})=\mathbb{E}_{\mathcal{D}}\ell(f_{\mathbf{\theta}}(\mathbf{x}),\mathbf{y})),
+$$
+
+where $\mathbf{z}=(\mathbf{x},\mathbf{y})$ follows the distribution $\mathcal{D}$.
+
+## Activation function
+
+An activation function is denoted by $\sigma(x)$.
+
+**Example 1**. Some commonly used activation functions are
+
+- $\sigma(x)=\text{ReLU}(x)=\text{max}(0,x)$
+- $\sigma(x)=\text{sigmoid}(x)=\dfrac{1}{1+e^{-x}}$
+- $\sigma(x)=\tanh(x)$
+- $\sigma(x)=\cos x, \sin x$
+
+## Two-layer neural network
+
+The neuron number of the hidden layer is denoted by $m$, The two-layer neural network is
+
+$$
+ f_{\mathbf{\theta}}(\mathbf{x})=\sum^m_{j=1}a_j\sigma(\mathbf{w}_j\cdot\mathbf{x}+b_j),
+$$
+
+where $\sigma$ is the activation function, $\mathbf{w}_j$ is the input weight, $a_j$ is the output weight, $b_j$ is the bias term. We denote the set of parameters by
+
+$$
+ \mathbf{\theta}=(a_1,\ldots,a_m,\mathbf{w}_1,\ldots,\mathbf{w}_m,b_1,\cdots,b_m).
+$$
+
+## General deep neural network
+
+The counting of the layer number excludes the input layer. An $L$-layer neural network is denoted by
+
+$$
+ f_{\mathbf{\theta}}(\mathbf{x})=\mathbf{W}^{[L-1]}\sigma\circ(\mathbf{W}^{[L-2]})\sigma\circ(\cdots(\mathbf{W}^{[1]}\sigma\circ(\mathbf{W}^{[0]}\mathbf{x}+\mathbf{b}^{[0]})+\mathbf{b}^{[1]})\cdots)+\mathbf{b}^{[L-2]})+\mathbf{b}^{[L-1]},
+$$
+
+where $\mathbf{W}^{[l]}\in\mathbb{R}^{m_{l+1}\times m_l}$, $\mathbf{b}^{[l]}=\mathbb{R}^{m_{l+1}}$, $m_0=d_\text{in}=d$, $m_{L}=d_\text{o}$, $\sigma$ is a scalar function and "$\circ$" means entry-wise operation. We denote the set of parameters by
+
+$$
+ \mathbf{\theta}=(\mathbf{W}^{[0]},\mathbf{W}^{[1]},\dots,\mathbf{W}^{[L-1]},\mathbf{b}^{[0]},\mathbf{b}^{[1]},\dots,\mathbf{b}^{[L-1]}).
+$$
+
+This can also be defined recursively,
+
+$$
+ f^{[0]}_{\mathbf{\theta}}(\mathbf{x})=\mathbf{x},
+$$
+
+$$
+ f^{[l]}_{\mathbf{\theta}}(\mathbf{x})=\sigma\circ(\mathbf{W}^{[l-1]}f^{[l-1]}_{\mathbf{\theta}}(\mathbf{x})+\mathbf{b}^{[l-1]}), \quad 1\le l\le L-1,
+$$
+
+$$
+ f_{\mathbf{\theta}}(\mathbf{x})=f^{[L]}_{\mathbf{\theta}}(\mathbf{x})=\mathbf{W}^{[L-1]}f^{[L-1]}_{\mathbf{\theta}}(\mathbf{x})+\mathbf{b}^{[L-1]}, \quad 1\le l\le L-1.
+$$
+
+## Complexity
+
+The VC-dimension of a hypothesis class $\mathcal{H}$ is denoted as VCdim($\mathcal{H}$).
+
+The Rademacher complexity of a hypothesis space $\mathcal{H}$ on a sample set $S$ is denoted by $R(\mathcal{H}\circ S)$ or $\text{Rad}_S(\mathcal{H})$. The complexity $\text{Rad}_S(\mathcal{H})$ is random because of the randomness of $S$. The expectation of the empirical Rademacher complexity over all samples of size $n$ is denoted by
+
+$$
+ \text{Rad}_n(\mathcal{H}) = \mathbb{E}_S\text{Rad}_S(\mathcal{H}).
+$$
+
+## Training
+
+The Gradient Descent is oftern denoted by GD. THe Stochastic Gradient Descent is often denoted by SGD.
+
+A batch set is denoted by $B$ and the batch size is denoted by $|B|$.
+
+The learning rate is denoted by $\eta$.
+
+## Fourier Frequency
+
+The discretized frequency is denoted by $\mathbf{k}$, and the continuous frequency is denoted by $\mathbf{\xi}$.
+
+## Convolution
+
+The convolution operation is denoted by $*$.
+
+## Notation table
+
+| symbol | meaning | Latex | simplied |
+| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------- | ------------------ | --------------------- |
+| $\mathbf{x}$ | input | `\bm{x}` | `\mathbf{x}` |
+| $\mathbf{y}$ | output, label | `\bm{y}` | `\vy` |
+| $d$ | input dimension | `d` | |
+| $d_{\text{o}}$ | output dimension | `d_{\rm o}` | |
+| $n$ | number of samples | `n` |
+| $\mathcal{X}$ | instances domain (a set) | `\mathcal{X}` | `\fX` |
+| $\mathcal{Y}$ | labels domain (a set) | `\mathcal{Y}` | `\fY` |
+| $\mathcal{Z}$ | $=\mathcal{X}\times\mathcal{Y}$ example domain | `\mathcal{Z}` | `\fZ` |
+| $\mathcal{H}$ | hypothesis space (a set) | `\mathcal{H}` | `\mathcal{H}` |
+| $\mathbf{\theta}$ | a set of parameters | `\bm{\theta}` | `\mathbf{\theta}` |
+| $f_{\mathbf{\theta}}: \mathcal{X}\to\mathcal{Y}$ | hypothesis function | `\f_{\bm{\theta}}` | `f_{\mathbf{\theta}}` |
+| $f$ or $f^*: \mathcal{X}\to\mathcal{Y}$ | target function | `f, f^*` |
+| $\ell:\mathcal{H}\times \mathcal{Z}\to \mathbb{R}^+$ | loss function | `\ell` |
+| $\mathcal{D}$ | distribution of $\mathcal{Z}$ | `\mathcal{D}` | `\fD` |
+| $S=\{\mathbf{z}_i\}_{i=1}^n$ | $=\{(\mathbf{x}_i,\mathbf{y}_i)\}_{i=1}^n$ sample set |
+| $L_S(\mathbf{\theta})$, $L_{n}(\mathbf{\theta})$, $R_n(\mathbf{\theta})$, $R_S(\mathbf{\theta})$ | empirical risk or training loss |
+| $L_D(\mathbf{\theta})$ | population risk or expected loss |
+| $\sigma:\mathbb{R}\to\mathbb{R}^+$ | activation function | `\sigma` |
+| $\mathbf{w}_j$ | input weight | `\bm{w}_j` | `\mathbf{w}_j` |
+| $a_j$ | output weight | `a_j` |
+| $b_j$ | bias term | `b_j` |
+| $f_{\mathbf{\theta}}(\mathbf{x})$ or $f(\mathbf{x};\mathbf{\theta})$ | neural network | `f_{\bm{\theta}}` | `f_{\mathbf{\theta}}` |
+| $\sum_{j=1}^{m} a_j \sigma (\mathbf{w}_j\cdot \mathbf{x} + b_j)$ | two-layer neural network |
+| $\text{VCdim}(\mathcal{H}$) | VC-dimension of $\mathcal{H}$ |
+| $\text{Rad}(\mathcal{H}\circ S)$, $\text{Rad}_{S}(\mathcal{H})$ | Rademacher complexity of $\mathcal{H}$ on $S$ |
+| ${\rm Rad}_{n} (\mathcal{H})$ | Rademacher complexity over samples of size $n$ |
+| $\text{GD}$ | gradient descent |
+| $\text{SGD}$ | stochastic gradient descent |
+| $B$ | a batch set | `B` | |
+| $\vert B\vert$ | batch size | `b` | |
+| $\eta$ | learning rate | `\eta` |
+| $\mathbf{k}$ | discretized frequency | `\bm{k}` | `\mathbf{k}` |
+| $\mathbf{\xi}$ | continuous frequency | `\bm{\xi}` | `\mathbf{xi}` | |
+| $*$ | convolution operation | `*` |
+
+## L-layer neural network
+
+| symbol | meaning | Latex | simplied |
+| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------ |
+| $d$ | input dimension | `d` | |
+| $d_{\text{o}}$ | output dimension | `d_{\rm o}` | |
+| $m_l$ | the number of $l$-th layer neuron, $m_0=d$, $m_{L} = d_{\text{o}}$ | `m_l` |
+| $\mathbf{W}^{[l]}$ | the $l$-th layer weight | `\bm{W}^{[l]}` | `\mathbf{W}^{[l]}` |
+| $\mathbf{b}^{[l]}$ | the $l$-th layer bias term | `\bm{b}^{[l]}` | `\mathbf{b}^{[l]}` |
+| $\circ$ | entry-wise operation | `\circ` |
+| $\sigma:\mathbb{R}\to\mathbb{R}^+$ | activation function | `\sigma` |
+| $\mathbf{\theta}$ | $=(\mathbf{W}^{[0]},\ldots,\mathbf{W}^{[L-1]},\mathbf{b}^{[0]},\ldots,\mathbf{b}^{[L-1]})$, parameters | `\bm{\theta}` | `\mathbf{\theta}` |
+| $f_{\mathbf{\theta}}^{[0]}(\mathbf{x})$ | $=\mathbf{x}$ |
+| $f_{\mathbf{\theta}}^{[l]}(\mathbf{x})$ | $=\sigma\circ(\mathbf{W}^{[l-1]} f_{\mathbf{\theta}}^{[l-1]}(\mathbf{x}) + \mathbf{b}^{[l-1]})$, $l$-th layer output |
+| $f_{\mathbf{\theta}}(\mathbf{x})$ | $=f_{\mathbf{\theta}}^{[L]}(\mathbf{x})=\mathbf{W}^{[L-1]} f_{\mathbf{\theta}}^{[L-1]}(\mathbf{x}) + \mathbf{b}^{[L-1]}$, $L$-layer NN |
+
+# Acknowledgements
+
+Chenglong Bao (Tsinghua), Zhengdao Chen (NYU), Bin Dong (Peking), Weinan E (Princeton), Quanquan Gu (UCLA), Kaizhu Huang (XJTLU), Shi Jin (SJTU), Jian Li (Tsinghua), Lei Li (SJTU), Tiejun Li (Peking), Zhenguo Li (Huawei), Zhemin Li (NUDT), Shaobo Lin (XJTU), Ziqi Liu (CSRC), Zichao Long (Peking), Chao Ma (Princeton), Chao Ma (SJTU), Yuheng Ma (WHU), Dengyu Meng (XJTU), Wang Miao (Peking), Pingbing Ming (CAS), Zuoqiang Shi (Tsinghua), Jihong Wang (CSRC), Liwei Wang (Peking), Bican Xia (Peking), Zhouwang Yang (USTC), Haijun Yu (CAS), Yang Yuan (Tsinghua), Cheng Zhang (Peking), Lulu Zhang (SJTU), Jiwei Zhang (WHU), Pingwen Zhang (Peking), Xiaoqun Zhang (SJTU), Chengchao Zhao (CSRC), Zhanxing Zhu (Peking), Chuan Zhou (CAS), Xiang Zhou (cityU).
diff --git a/macros/latex/contrib/mlmath/mlmath.pdf b/macros/latex/contrib/mlmath/mlmath.pdf
new file mode 100644
index 0000000000..21b3d02425
--- /dev/null
+++ b/macros/latex/contrib/mlmath/mlmath.pdf
Binary files differ
diff --git a/macros/latex/contrib/mlmath/mlmath.sty b/macros/latex/contrib/mlmath/mlmath.sty
new file mode 100644
index 0000000000..1faa04de0a
--- /dev/null
+++ b/macros/latex/contrib/mlmath/mlmath.sty
@@ -0,0 +1,622 @@
+%% mlmath.sty
+%% Copyright 2020 by Zheng Ma, Zhiqin Xu, Tao Luo and Yaoyu Zhang
+%
+% This work may be distributed and/or modified under the
+% 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.3c 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 Zheng Ma.
+%
+% This work consists of the main source files mlmath.sty, mlmath.tex, mlmath.md,
+% and the derived documentation mlmath.pdf, README.md as well as the resource
+% files (they are svg file) of README.md under the folder svgs/.
+
+\ProvidesPackage{mlmath}[2020/06/15 v1.0.0 zyboys]
+
+\RequirePackage{amsmath}
+\RequirePackage{amsthm}
+\RequirePackage{amssymb}
+\RequirePackage{bm}
+\RequirePackage{bbm}
+
+
+\newcommand{\mat}[1]{\bm{#1}}
+\renewcommand{\vec}[1]{\bm{#1}}
+\newcommand{\D}{\mathrm{d}}
+\newcommand{\I}{\mathrm{i}}
+\newcommand{\E}{\mathrm{e}}
+\newcommand{\eps}{\varepsilon}
+\newcommand{\sgn}{\mathrm{sgn}}
+\newcommand{\cc}{\mathrm{c.c.}}
+\newcommand{\T}{\intercal}
+\newcommand{\Exp}{\mathbb{E}}
+\newcommand{\Prob}{\mathbb{P}}
+\newcommand*\diff{\mathop{}\!\D}
+\newcommand*\Diff[1]{\mathop{}\!\mathrm{d^#1}}
+\newcommand{\abs}[1]{\lvert#1\rvert}
+\newcommand{\Abs}[1]{\left\lvert#1\right\rvert}
+\newcommand{\norm}[1]{\lVert#1\rVert}
+\newcommand{\Norm}[1]{\left\lVert#1\right\rVert}
+\newcommand{\ceil}[1]{\lceil#1\rceil}
+\newcommand{\floor}[1]{\lfloor#1\rfloor}
+\newcommand{\lsim}{\lesssim}
+\newcommand{\gsim}{\gtrsim}
+
+% Random variables
+\newcommand{\ralpha}{\textnormal{\alpha}}
+\newcommand{\rbeta}{\textnormal{\beta}}
+\newcommand{\rgamma}{\textnormal{\gamma}}
+\newcommand{\rdelta}{\textnormal{\delta}}
+\newcommand{\repsilon}{\textnormal{\epsilon}}
+\newcommand{\reps}{\textnormal{\varepsilon}}
+\newcommand{\rzeta}{\textnormal{\zeta}}
+\newcommand{\reta}{\textnormal{\eta}}
+\newcommand{\rtheta}{\textnormal{\theta}}
+\newcommand{\rvartheta}{\textnormal{\vartheta}}
+\newcommand{\riota}{\textnormal{\iota}}
+\newcommand{\rkappa}{\textnormal{\kappa}}
+\newcommand{\rlambda}{\textnormal{\lambda}}
+\newcommand{\rmu}{\textnormal{\mu}}
+\newcommand{\rnu}{\textnormal{\nu}}
+\newcommand{\rxi}{\textnormal{\xi}}
+\newcommand{\rpi}{\textnormal{\pi}}
+\newcommand{\rrho}{\textnormal{\rho}}
+\newcommand{\rsigma}{\textnormal{\sigma}}
+\newcommand{\rtau}{\textnormal{\tau}}
+\newcommand{\rupsilon}{\textnormal{\upsilon}}
+\newcommand{\rphi}{\textnormal{\phi}}
+\newcommand{\rvarphi}{\textnormal{\varphi}}
+\newcommand{\rchi}{\textnormal{\chi}}
+\newcommand{\rpsi}{\textnormal{\psi}}
+\newcommand{\romega}{\textnormal{\omega}}
+\newcommand{\rGamma}{\textnormal{\Gamma}}
+\newcommand{\rDelta}{\textnormal{\Delta}}
+\newcommand{\rTheta}{\textnormal{\Theta}}
+\newcommand{\rLambda}{\textnormal{\Lambda}}
+\newcommand{\rXi}{\textnormal{\Xi}}
+\newcommand{\rPi}{\textnormal{\Pi}}
+\newcommand{\rSigma}{\textnormal{\Sigma}}
+\newcommand{\rUpsilon}{\textnormal{\Upsilon}}
+\newcommand{\rPhi}{\textnormal{\Phi}}
+\newcommand{\rPsi}{\textnormal{\Psi}}
+\newcommand{\rOmega}{\textnormal{\Omega}}
+\newcommand{\ra}{\textnormal{a}}
+\newcommand{\rb}{\textnormal{b}}
+\newcommand{\rc}{\textnormal{c}}
+\newcommand{\rd}{\textnormal{d}}
+\newcommand{\re}{\textnormal{e}}
+\newcommand{\rf}{\textnormal{f}}
+\newcommand{\rg}{\textnormal{g}}
+\newcommand{\rh}{\textnormal{h}}
+\newcommand{\ri}{\textnormal{i}}
+\newcommand{\rj}{\textnormal{j}}
+\newcommand{\rk}{\textnormal{k}}
+\newcommand{\rl}{\textnormal{l}}
+% rm is already a command, just don't name any random variables m
+\newcommand{\rn}{\textnormal{n}}
+\newcommand{\ro}{\textnormal{o}}
+\newcommand{\rp}{\textnormal{p}}
+\newcommand{\rqq}{\textnormal{q}}
+\newcommand{\rr}{\textnormal{r}}
+\newcommand{\rs}{\textnormal{s}}
+\newcommand{\rt}{\textnormal{t}}
+\newcommand{\ru}{\textnormal{u}}
+\newcommand{\rv}{\textnormal{v}}
+\newcommand{\rw}{\textnormal{w}}
+\newcommand{\rx}{\textnormal{x}}
+\newcommand{\ry}{\textnormal{y}}
+\newcommand{\rz}{\textnormal{z}}
+\newcommand{\rA}{\textnormal{A}}
+\newcommand{\rB}{\textnormal{B}}
+\newcommand{\rC}{\textnormal{C}}
+\newcommand{\rD}{\textnormal{D}}
+\newcommand{\rE}{\textnormal{E}}
+\newcommand{\rF}{\textnormal{F}}
+\newcommand{\rG}{\textnormal{G}}
+\newcommand{\rH}{\textnormal{H}}
+\newcommand{\rI}{\textnormal{I}}
+\newcommand{\rJ}{\textnormal{J}}
+\newcommand{\rK}{\textnormal{K}}
+\newcommand{\rL}{\textnormal{L}}
+\newcommand{\rM}{\textnormal{M}}
+\newcommand{\rN}{\textnormal{N}}
+\newcommand{\rO}{\textnormal{O}}
+\newcommand{\rP}{\textnormal{P}}
+\newcommand{\rQ}{\textnormal{Q}}
+\newcommand{\rR}{\textnormal{R}}
+\newcommand{\rS}{\textnormal{S}}
+\newcommand{\rT}{\textnormal{T}}
+\newcommand{\rU}{\textnormal{U}}
+\newcommand{\rV}{\textnormal{V}}
+\newcommand{\rW}{\textnormal{W}}
+\newcommand{\rX}{\textnormal{X}}
+\newcommand{\rY}{\textnormal{Y}}
+\newcommand{\rZ}{\textnormal{Z}}
+
+% Random vectors
+\newcommand{\rvalpha}{\mathbf{\alpha}}
+\newcommand{\rvbeta}{\mathbf{\beta}}
+\newcommand{\rvgamma}{\mathbf{\gamma}}
+\newcommand{\rvdelta}{\mathbf{\delta}}
+\newcommand{\rvepsilon}{\mathbf{\epsilon}}
+\newcommand{\rveps}{\mathbf{\varepsilon}}
+\newcommand{\rvzeta}{\mathbf{\zeta}}
+\newcommand{\rveta}{\mathbf{\eta}}
+\newcommand{\rvtheta}{\mathbf{\theta}}
+\newcommand{\rvvartheta}{\mathbf{\vartheta}}
+\newcommand{\rviota}{\mathbf{\iota}}
+\newcommand{\rvkappa}{\mathbf{\kappa}}
+\newcommand{\rvlambda}{\mathbf{\lambda}}
+\newcommand{\rvmu}{\mathbf{\mu}}
+\newcommand{\rvnu}{\mathbf{\nu}}
+\newcommand{\rvxi}{\mathbf{\xi}}
+\newcommand{\rvpi}{\mathbf{\pi}}
+\newcommand{\rvrho}{\mathbf{\rho}}
+\newcommand{\rvsigma}{\mathbf{\sigma}}
+\newcommand{\rvtau}{\mathbf{\tau}}
+\newcommand{\rvupsilon}{\mathbf{\upsilon}}
+\newcommand{\rvphi}{\mathbf{\phi}}
+\newcommand{\rvvarphi}{\mathbf{\varphi}}
+\newcommand{\rvchi}{\mathbf{\chi}}
+\newcommand{\rvpsi}{\mathbf{\psi}}
+\newcommand{\rvomega}{\mathbf{\omega}}
+\newcommand{\rva}{\mathbf{a}}
+\newcommand{\rvb}{\mathbf{b}}
+\newcommand{\rvc}{\mathbf{c}}
+\newcommand{\rvd}{\mathbf{d}}
+\newcommand{\rve}{\mathbf{e}}
+\newcommand{\rvf}{\mathbf{f}}
+\newcommand{\rvg}{\mathbf{g}}
+\newcommand{\rvh}{\mathbf{h}}
+\newcommand{\rvi}{\mathbf{i}}
+\newcommand{\rvj}{\mathbf{j}}
+\newcommand{\rvk}{\mathbf{k}}
+\newcommand{\rvl}{\mathbf{l}}
+\newcommand{\rvm}{\mathbf{m}}
+\newcommand{\rvo}{\mathbf{o}}
+\newcommand{\rvp}{\mathbf{p}}
+\newcommand{\rvq}{\mathbf{q}}
+\newcommand{\rvr}{\mathbf{r}}
+\newcommand{\rvs}{\mathbf{s}}
+\newcommand{\rvt}{\mathbf{t}}
+\newcommand{\rvu}{\mathbf{u}}
+\newcommand{\rvv}{\mathbf{v}}
+\newcommand{\rvw}{\mathbf{w}}
+\newcommand{\rvx}{\mathbf{x}}
+\newcommand{\rvy}{\mathbf{y}}
+\newcommand{\rvz}{\mathbf{z}}
+
+% Random matrices
+\newcommand{\rmGamma}{\mathbf{\Gamma}}
+\newcommand{\rmDelta}{\mathbf{\Delta}}
+\newcommand{\rmTheta}{\mathbf{\Theta}}
+\newcommand{\rmLambda}{\mathbf{\Lambda}}
+\newcommand{\rmXi}{\mathbf{\Xi}}
+\newcommand{\rmPi}{\mathbf{\Pi}}
+\newcommand{\rmSigma}{\mathbf{\Sigma}}
+\newcommand{\rmUpsilon}{\mathbf{\Upsilon}}
+\newcommand{\rmPhi}{\mathbf{\Phi}}
+\newcommand{\rmPsi}{\mathbf{\Psi}}
+\newcommand{\rmOmega}{\mathbf{\Omega}}
+\newcommand{\rmA}{\mathbf{A}}
+\newcommand{\rmB}{\mathbf{B}}
+\newcommand{\rmC}{\mathbf{C}}
+\newcommand{\rmD}{\mathbf{D}}
+\newcommand{\rmE}{\mathbf{E}}
+\newcommand{\rmF}{\mathbf{F}}
+\newcommand{\rmG}{\mathbf{G}}
+\newcommand{\rmH}{\mathbf{H}}
+\newcommand{\rmI}{\mathbf{I}}
+\newcommand{\rmJ}{\mathbf{J}}
+\newcommand{\rmK}{\mathbf{K}}
+\newcommand{\rmL}{\mathbf{L}}
+\newcommand{\rmM}{\mathbf{M}}
+\newcommand{\rmN}{\mathbf{N}}
+\newcommand{\rmO}{\mathbf{O}}
+\newcommand{\rmP}{\mathbf{P}}
+\newcommand{\rmQ}{\mathbf{Q}}
+\newcommand{\rmR}{\mathbf{R}}
+\newcommand{\rmS}{\mathbf{S}}
+\newcommand{\rmT}{\mathbf{T}}
+\newcommand{\rmU}{\mathbf{U}}
+\newcommand{\rmV}{\mathbf{V}}
+\newcommand{\rmW}{\mathbf{W}}
+\newcommand{\rmX}{\mathbf{X}}
+\newcommand{\rmY}{\mathbf{Y}}
+\newcommand{\rmZ}{\mathbf{Z}}
+
+% Vectors
+\newcommand{\vzero}{\bm{0}}
+\newcommand{\vone}{\bm{1}}
+\newcommand{\valpha}{\bm{\alpha}}
+\newcommand{\vbeta}{\bm{\beta}}
+\newcommand{\vgamma}{\bm{\gamma}}
+\newcommand{\vdelta}{\bm{\delta}}
+\newcommand{\vepsilon}{\bm{\epsilon}}
+\newcommand{\veps}{\bm{\varepsilon}}
+\newcommand{\vzeta}{\bm{\zeta}}
+\newcommand{\veta}{\bm{\eta}}
+\newcommand{\vtheta}{\bm{\theta}}
+\newcommand{\vvartheta}{\bm{\vartheta}}
+\newcommand{\viota}{\bm{\iota}}
+\newcommand{\vkappa}{\bm{\kappa}}
+\newcommand{\vlambda}{\bm{\lambda}}
+\newcommand{\vmu}{\bm{\mu}}
+\newcommand{\vnu}{\bm{\nu}}
+\newcommand{\vxi}{\bm{\xi}}
+\newcommand{\vpi}{\bm{\pi}}
+\newcommand{\vrho}{\bm{\rho}}
+\newcommand{\vsigma}{\bm{\sigma}}
+\newcommand{\vtau}{\bm{\tau}}
+\newcommand{\vupsilon}{\bm{\upsilon}}
+\newcommand{\vphi}{\bm{\phi}}
+\newcommand{\vvarphi}{\bm{\varphi}}
+\newcommand{\vchi}{\bm{\chi}}
+\newcommand{\vpsi}{\bm{\psi}}
+\newcommand{\vomega}{\bm{\omega}}
+\newcommand{\vGamma}{\bm{\Gamma}}
+\newcommand{\vDelta}{\bm{\Delta}}
+\newcommand{\vTheta}{\bm{\Theta}}
+\newcommand{\vLambda}{\bm{\Lambda}}
+\newcommand{\vXi}{\bm{\Xi}}
+\newcommand{\vPi}{\bm{\Pi}}
+\newcommand{\vSigma}{\bm{\Sigma}}
+\newcommand{\vUpsilon}{\bm{\Upsilon}}
+\newcommand{\vPhi}{\bm{\Phi}}
+\newcommand{\vPsi}{\bm{\Psi}}
+\newcommand{\vOmega}{\bm{\Omega}}
+\newcommand{\va}{\bm{a}}
+\newcommand{\vb}{\bm{b}}
+\newcommand{\vc}{\bm{c}}
+\newcommand{\vd}{\bm{d}}
+\newcommand{\ve}{\bm{e}}
+\newcommand{\vf}{\bm{f}}
+\newcommand{\vg}{\bm{g}}
+\newcommand{\vh}{\bm{h}}
+\newcommand{\vi}{\bm{i}}
+\newcommand{\vj}{\bm{j}}
+\newcommand{\vk}{\bm{k}}
+\newcommand{\vl}{\bm{l}}
+\newcommand{\vm}{\bm{m}}
+\newcommand{\vn}{\bm{n}}
+\newcommand{\vo}{\bm{o}}
+\newcommand{\vp}{\bm{p}}
+\newcommand{\vq}{\bm{q}}
+\newcommand{\vr}{\bm{r}}
+\newcommand{\vs}{\bm{s}}
+\newcommand{\vt}{\bm{t}}
+\newcommand{\vu}{\bm{u}}
+\newcommand{\vv}{\bm{v}}
+\newcommand{\vw}{\bm{w}}
+\newcommand{\vx}{\bm{x}}
+\newcommand{\vy}{\bm{y}}
+\newcommand{\vz}{\bm{z}}
+\newcommand{\vA}{\bm{A}}
+\newcommand{\vB}{\bm{B}}
+\newcommand{\vC}{\bm{C}}
+\newcommand{\vD}{\bm{D}}
+\newcommand{\vE}{\bm{E}}
+\newcommand{\vF}{\bm{F}}
+\newcommand{\vG}{\bm{G}}
+\newcommand{\vH}{\bm{H}}
+\newcommand{\vI}{\bm{I}}
+\newcommand{\vJ}{\bm{J}}
+\newcommand{\vK}{\bm{K}}
+\newcommand{\vL}{\bm{L}}
+\newcommand{\vM}{\bm{M}}
+\newcommand{\vN}{\bm{N}}
+\newcommand{\vO}{\bm{O}}
+\newcommand{\vP}{\bm{P}}
+\newcommand{\vQ}{\bm{Q}}
+\newcommand{\vR}{\bm{R}}
+\newcommand{\vS}{\bm{S}}
+\newcommand{\vT}{\bm{T}}
+\newcommand{\vU}{\bm{U}}
+\newcommand{\vV}{\bm{V}}
+\newcommand{\vW}{\bm{W}}
+\newcommand{\vX}{\bm{X}}
+\newcommand{\vY}{\bm{Y}}
+\newcommand{\vZ}{\bm{Z}}
+
+% Matrices
+\newcommand{\mzero}{\bm{0}}
+\newcommand{\malpha}{\bm{\alpha}}
+\newcommand{\mbeta}{\bm{\beta}}
+\newcommand{\mgamma}{\bm{\gamma}}
+\newcommand{\mdelta}{\bm{\delta}}
+\newcommand{\mepsilon}{\bm{\epsilon}}
+\newcommand{\meps}{\bm{\varepsilon}}
+\newcommand{\mzeta}{\bm{\zeta}}
+\newcommand{\meta}{\bm{\eta}}
+\newcommand{\mtheta}{\bm{\theta}}
+\newcommand{\mvartheta}{\bm{\vartheta}}
+\newcommand{\miota}{\bm{\iota}}
+\newcommand{\mkappa}{\bm{\kappa}}
+\newcommand{\mlambda}{\bm{\lambda}}
+\newcommand{\mmu}{\bm{\mu}}
+\newcommand{\mnu}{\bm{\nu}}
+\newcommand{\mxi}{\bm{\xi}}
+\newcommand{\mpi}{\bm{\pi}}
+\newcommand{\mrho}{\bm{\rho}}
+\newcommand{\msigma}{\bm{\sigma}}
+\newcommand{\mtau}{\bm{\tau}}
+\newcommand{\mupsilon}{\bm{\upsilon}}
+\newcommand{\mphi}{\bm{\phi}}
+\newcommand{\mvarphi}{\bm{\varphi}}
+\newcommand{\mchi}{\bm{\chi}}
+\newcommand{\mpsi}{\bm{\psi}}
+\newcommand{\momega}{\bm{\omega}}
+\newcommand{\mGamma}{\bm{\Gamma}}
+\newcommand{\mDelta}{\bm{\Delta}}
+\newcommand{\mTheta}{\bm{\Theta}}
+\newcommand{\mLambda}{\bm{\Lambda}}
+\newcommand{\mXi}{\bm{\Xi}}
+\newcommand{\mPi}{\bm{\Pi}}
+\newcommand{\mSigma}{\bm{\Sigma}}
+\newcommand{\mUpsilon}{\bm{\Upsilon}}
+\newcommand{\mPhi}{\bm{\Phi}}
+\newcommand{\mPsi}{\bm{\Psi}}
+\newcommand{\mOmega}{\bm{\Omega}}
+\newcommand{\mA}{\bm{A}}
+\newcommand{\mB}{\bm{B}}
+\newcommand{\mC}{\bm{C}}
+\newcommand{\mD}{\bm{D}}
+\newcommand{\mE}{\bm{E}}
+\newcommand{\mF}{\bm{F}}
+\newcommand{\mG}{\bm{G}}
+\newcommand{\mH}{\bm{H}}
+\newcommand{\mI}{\bm{I}}
+\newcommand{\mJ}{\bm{J}}
+\newcommand{\mK}{\bm{K}}
+\newcommand{\mL}{\bm{L}}
+\newcommand{\mM}{\bm{M}}
+\newcommand{\mN}{\bm{N}}
+\newcommand{\mO}{\bm{O}}
+\newcommand{\mP}{\bm{P}}
+\newcommand{\mQ}{\bm{Q}}
+\newcommand{\mR}{\bm{R}}
+\newcommand{\mS}{\bm{S}}
+\newcommand{\mT}{\bm{T}}
+\newcommand{\mU}{\bm{U}}
+\newcommand{\mV}{\bm{V}}
+\newcommand{\mW}{\bm{W}}
+\newcommand{\mX}{\bm{X}}
+\newcommand{\mY}{\bm{Y}}
+\newcommand{\mZ}{\bm{Z}}
+
+% Tensor
+\DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl}
+\SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
+\newcommand{\tens}[1]{\bm{\mathsfit{#1}}}
+\newcommand{\talpha}{\tens{\alpha}}
+\newcommand{\tbeta}{\tens{\beta}}
+\newcommand{\tgamma}{\tens{\gamma}}
+\newcommand{\tdelta}{\tens{\delta}}
+\newcommand{\tepsilon}{\tens{\epsilon}}
+\newcommand{\teps}{\tens{\varepsilon}}
+\newcommand{\tzeta}{\tens{\zeta}}
+\newcommand{\teta}{\tens{\eta}}
+\newcommand{\ttheta}{\tens{\theta}}
+\newcommand{\tvartheta}{\tens{\vartheta}}
+\newcommand{\tiota}{\tens{\iota}}
+\newcommand{\tkappa}{\tens{\kappa}}
+\newcommand{\tlambda}{\tens{\lambda}}
+\newcommand{\tmu}{\tens{\mu}}
+\newcommand{\tnu}{\tens{\nu}}
+\newcommand{\txi}{\tens{\xi}}
+\newcommand{\tpi}{\tens{\pi}}
+\newcommand{\trho}{\tens{\rho}}
+\newcommand{\tsigma}{\tens{\sigma}}
+\newcommand{\ttau}{\tens{\tau}}
+\newcommand{\tupsilon}{\tens{\upsilon}}
+\newcommand{\tphi}{\tens{\phi}}
+\newcommand{\tvarphi}{\tens{\varphi}}
+\newcommand{\tchi}{\tens{\chi}}
+\newcommand{\tpsi}{\tens{\psi}}
+\newcommand{\tomega}{\tens{\omega}}
+\newcommand{\tGamma}{\tens{\Gamma}}
+\newcommand{\tDelta}{\tens{\Delta}}
+\newcommand{\tTheta}{\tens{\Theta}}
+\newcommand{\tLambda}{\tens{\Lambda}}
+\newcommand{\tXi}{\tens{\Xi}}
+\newcommand{\tPi}{\tens{\Pi}}
+\newcommand{\tSigma}{\tens{\Sigma}}
+\newcommand{\tUpsilon}{\tens{\Upsilon}}
+\newcommand{\tPhi}{\tens{\Phi}}
+\newcommand{\tPsi}{\tens{\Psi}}
+\newcommand{\tOmega}{\tens{\Omega}}
+\newcommand{\tA}{\tens{A}}
+\newcommand{\tB}{\tens{B}}
+\newcommand{\tC}{\tens{C}}
+\newcommand{\tD}{\tens{D}}
+\newcommand{\tE}{\tens{E}}
+\newcommand{\tF}{\tens{F}}
+\newcommand{\tG}{\tens{G}}
+\newcommand{\tH}{\tens{H}}
+\newcommand{\tI}{\tens{I}}
+\newcommand{\tJ}{\tens{J}}
+\newcommand{\tK}{\tens{K}}
+\newcommand{\tL}{\tens{L}}
+\newcommand{\tM}{\tens{M}}
+\newcommand{\tN}{\tens{N}}
+\newcommand{\tO}{\tens{O}}
+\newcommand{\tP}{\tens{P}}
+\newcommand{\tQ}{\tens{Q}}
+\newcommand{\tR}{\tens{R}}
+\newcommand{\tS}{\tens{S}}
+\newcommand{\tT}{\tens{T}}
+\newcommand{\tU}{\tens{U}}
+\newcommand{\tV}{\tens{V}}
+\newcommand{\tW}{\tens{W}}
+\newcommand{\tX}{\tens{X}}
+\newcommand{\tY}{\tens{Y}}
+\newcommand{\tZ}{\tens{Z}}
+
+% entries of a tensor
+% Same font as tensor, without \bm wrapper
+\newcommand{\etens}[1]{\mathsfit{#1}}
+\newcommand{\etalpha}{\etens{\alpha}}
+\newcommand{\etbeta}{\etens{\beta}}
+\newcommand{\etgamma}{\etens{\gamma}}
+\newcommand{\etdelta}{\etens{\delta}}
+\newcommand{\etepsilon}{\etens{\epsilon}}
+\newcommand{\eteps}{\etens{\varepsilon}}
+\newcommand{\etzeta}{\etens{\zeta}}
+\newcommand{\eteta}{\etens{\eta}}
+\newcommand{\ettheta}{\etens{\theta}}
+\newcommand{\etvartheta}{\etens{\vartheta}}
+\newcommand{\etiota}{\etens{\iota}}
+\newcommand{\etkappa}{\etens{\kappa}}
+\newcommand{\etlambda}{\etens{\lambda}}
+\newcommand{\etmu}{\etens{\mu}}
+\newcommand{\etnu}{\etens{\nu}}
+\newcommand{\etxi}{\etens{\xi}}
+\newcommand{\etpi}{\etens{\pi}}
+\newcommand{\etrho}{\etens{\rho}}
+\newcommand{\etsigma}{\etens{\sigma}}
+\newcommand{\ettau}{\etens{\tau}}
+\newcommand{\etupsilon}{\etens{\upsilon}}
+\newcommand{\etphi}{\etens{\phi}}
+\newcommand{\etvarphi}{\etens{\varphi}}
+\newcommand{\etchi}{\etens{\chi}}
+\newcommand{\etpsi}{\etens{\psi}}
+\newcommand{\etomega}{\etens{\omega}}
+\newcommand{\etGamma}{\etens{\Gamma}}
+\newcommand{\etDelta}{\etens{\Delta}}
+\newcommand{\etTheta}{\etens{\Theta}}
+\newcommand{\etLambda}{\etens{\Lambda}}
+\newcommand{\etXi}{\etens{\Xi}}
+\newcommand{\etPi}{\etens{\Pi}}
+\newcommand{\etSigma}{\etens{\Sigma}}
+\newcommand{\etUpsilon}{\etens{\Upsilon}}
+\newcommand{\etPhi}{\etens{\Phi}}
+\newcommand{\etPsi}{\etens{\Psi}}
+\newcommand{\etOmega}{\etens{\Omega}}
+\newcommand{\etA}{\etens{A}}
+\newcommand{\etB}{\etens{B}}
+\newcommand{\etC}{\etens{C}}
+\newcommand{\etD}{\etens{D}}
+\newcommand{\etE}{\etens{E}}
+\newcommand{\etF}{\etens{F}}
+\newcommand{\etG}{\etens{G}}
+\newcommand{\etH}{\etens{H}}
+\newcommand{\etI}{\etens{I}}
+\newcommand{\etJ}{\etens{J}}
+\newcommand{\etK}{\etens{K}}
+\newcommand{\etL}{\etens{L}}
+\newcommand{\etM}{\etens{M}}
+\newcommand{\etN}{\etens{N}}
+\newcommand{\etO}{\etens{O}}
+\newcommand{\etP}{\etens{P}}
+\newcommand{\etQ}{\etens{Q}}
+\newcommand{\etR}{\etens{R}}
+\newcommand{\etS}{\etens{S}}
+\newcommand{\etT}{\etens{T}}
+\newcommand{\etU}{\etens{U}}
+\newcommand{\etV}{\etens{V}}
+\newcommand{\etW}{\etens{W}}
+\newcommand{\etX}{\etens{X}}
+\newcommand{\etY}{\etens{Y}}
+\newcommand{\etZ}{\etens{Z}}
+
+% Sets
+\newcommand{\sone}{\mathbbm{1}}
+\newcommand{\sA}{\mathbb{A}}
+\newcommand{\sB}{\mathbb{B}}
+\newcommand{\sC}{\mathbb{C}}
+\newcommand{\sD}{\mathbb{D}}
+% Don't use a set called E, because this would be the same as our symbol for expectation.
+\newcommand{\sF}{\mathbb{F}}
+\newcommand{\sG}{\mathbb{G}}
+\newcommand{\sH}{\mathbb{H}}
+\newcommand{\sI}{\mathbb{I}}
+\newcommand{\sJ}{\mathbb{J}}
+\newcommand{\sK}{\mathbb{K}}
+\newcommand{\sL}{\mathbb{L}}
+\newcommand{\sM}{\mathbb{M}}
+\newcommand{\sN}{\mathbb{N}}
+\newcommand{\sO}{\mathbb{O}}
+% Don't use a set called P, because this would be the same as our symbol for probability.
+\newcommand{\sQ}{\mathbb{Q}}
+\newcommand{\sR}{\mathbb{R}}
+\newcommand{\sS}{\mathbb{S}}
+\newcommand{\sT}{\mathbb{T}}
+\newcommand{\sU}{\mathbb{U}}
+\newcommand{\sV}{\mathbb{V}}
+\newcommand{\sW}{\mathbb{W}}
+\newcommand{\sX}{\mathbb{X}}
+\newcommand{\sY}{\mathbb{Y}}
+\newcommand{\sZ}{\mathbb{Z}}
+
+% Function class, spaces, operator, etc.
+\newcommand{\fA}{\mathcal{A}}
+\newcommand{\fB}{\mathcal{B}}
+\newcommand{\fC}{\mathcal{C}}
+\newcommand{\fD}{\mathcal{D}}
+\newcommand{\fE}{\mathcal{E}}
+\newcommand{\fF}{\mathcal{F}}
+\newcommand{\fG}{\mathcal{G}}
+\newcommand{\fH}{\mathcal{H}}
+\newcommand{\fI}{\mathcal{I}}
+\newcommand{\fJ}{\mathcal{J}}
+\newcommand{\fK}{\mathcal{K}}
+\newcommand{\fL}{\mathcal{L}}
+\newcommand{\fM}{\mathcal{M}}
+\newcommand{\fN}{\mathcal{N}}
+\newcommand{\fO}{\mathcal{O}}
+\newcommand{\fP}{\mathcal{P}}
+\newcommand{\fQ}{\mathcal{Q}}
+\newcommand{\fR}{\mathcal{R}}
+\newcommand{\fS}{\mathcal{S}}
+\newcommand{\fT}{\mathcal{T}}
+\newcommand{\fU}{\mathcal{U}}
+\newcommand{\fV}{\mathcal{V}}
+\newcommand{\fW}{\mathcal{W}}
+\newcommand{\fX}{\mathcal{X}}
+\newcommand{\fY}{\mathcal{Y}}
+\newcommand{\fZ}{\mathcal{Z}}
+
+%neural networks
+\newcommand{\LS}{L_S}
+\newcommand{\LD}{L_\fD}
+\newcommand{\RS}{R_S}
+\newcommand{\Rn}{R_n}
+\newcommand{\RD}{R_\fD}
+\newcommand{\diam}{\mathrm{diam}}
+\newcommand{\diag}{\mathrm{diag}}
+\newcommand{\dist}{\mathrm{dist}}
+\newcommand{\ERM}{\mathrm{ERM}}
+\newcommand{\Lip}{\mathrm{Lip}}
+\newcommand{\ReLU}{\mathrm{ReLU}}
+\newcommand{\Rep}{\mathrm{Rep}}
+\newcommand{\Var}{\mathrm{Var}}
+\newcommand{\Rad}{\mathrm{Rad}}
+\newcommand{\DKL}{\mathrm{D}_{KL}}
+\newcommand{\conv}{\mathrm{conv}}
+\newcommand{\csch}{\mathrm{csch}}
+\newcommand{\sech}{\mathrm{sech}}
+\newcommand{\Sigmoid}{\mathrm{Sigmoid}}
+
+
+
+
+%define theorems
+\newtheorem{thm}{Theorem}
+\newtheorem{cor}{Corollary}
+\newtheorem{defi}{Definition}
+\newtheorem{lem}{Lemma}
+\newtheorem{prop}{Proposition}
+\newtheorem{rmk}{Remark}
+\newtheorem{assump}{Assumption}
+\newtheorem{exam}{Example}
+\newtheorem{conj}{Conjecture}
+\newtheorem{algo}{Algorithm}
+
+%
+\renewcommand{\abstractname}{Summary} \ No newline at end of file
diff --git a/macros/latex/contrib/mlmath/mlmath.tex b/macros/latex/contrib/mlmath/mlmath.tex
new file mode 100644
index 0000000000..abd27b42f8
--- /dev/null
+++ b/macros/latex/contrib/mlmath/mlmath.tex
@@ -0,0 +1,244 @@
+%% mlmath.tex
+%% Copyright 2020 by Zheng Ma, Zhiqin Xu, Tao Luo and Yaoyu Zhang
+%
+% This work may be distributed and/or modified under the
+% 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.3c 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 Zheng Ma.
+%
+% This work consists of the main source files mlmath.sty, mlmath.tex, mlmath.md,
+% and the derived documentation mlmath.pdf, README.md as well as the resource
+% files (they are svg file) of README.md under the folder svgs/.
+
+%! TeX program = xelatex
+\documentclass{article}
+\usepackage{geometry}
+\usepackage{amsmath}
+\usepackage{amsthm}
+\usepackage{amssymb}
+\usepackage{graphicx}
+\usepackage{hyperref}
+\usepackage{xcolor}
+\usepackage{booktabs}
+\usepackage[scheme=plain]{ctex}
+
+\usepackage{mlmath}
+%%%%%%%%%%%%%%%%%%%%%%%
+% \NewDocumentCommand{\tens}{t_}
+% {%
+% \IfBooleanTF{#1}
+% {\tensop}
+% {\otimes}%
+% }
+% \NewDocumentCommand{\tensop}{m}
+% {%
+% \mathbin{\mathop{\otimes}\displaylimits_{#1}}%
+% }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{document}
+
+\title{Suggested Notation for Machine Learning}
+\author{Beijing Academy of Artificial Intelligence\thanks{This document is published by Beijing Academy of Artificial Intelligence (北京智源人工智能研究院) jointly with Peking University (北京大学) and Shanghai Jiao Tong University (上海交通大学). The first version is drafted by Zhi-Qin John Xu (Corresponding: xuzhiqin@sjtu.edu.cn, Shanghai Jiao Tong University), Tao Luo (Purdue University), Zheng Ma (Purdue University), Yaoyu Zhang (Institute for Advanced Study).}}
+
+%\author{Zhi-Qin John Xu\thanks{Corresponding: xuzhiqin@sjtu.edu.cn, Shanghai Jiao Tong University.}, Tao Luo\thanks{Purdue University}, Zheng Ma\thanks{Purdue University}, Yaoyu Zhang\thanks{Institute for Advanced Study}}
+
+\maketitle
+%\date{\today}
+\begin{abstract}
+ The field of machine learning is evolving rapidly in recent years. Communication between different researchers and research groups becomes increasingly important. A key challenge for communication arises from inconsistent notation usages among different papers. This proposal suggests a standard for commonly used mathematical notation for machine learning. In this first version, only some notation are mentioned and more notation are left to be done. This proposal will be regularly updated based on the progress of the field. We look forward to more suggestions to improve this proposal in future versions.
+\end{abstract}
+
+\tableofcontents
+
+\section{Dataset}~\\
+Dataset $S=\{\vz_i\}_{i=1}^n=\{(\vx_i,\vy_i)\}_{i=1}^n$ is sampled from a distribution $\fD$ over a domain $\fZ=\fX\times\fY$.
+
+$\fX$ is the instance domain (a set), $\fY$ is the label domain (a set), and $\fZ=\fX\times\fY$ is the example domain (a set).
+
+Usually,
+$\fX$ is a subset of $\sR^d$ and $\fY$ is a subset of $\sR^{d_{o}}$, where $d$ is the input dimension, $d_{o}$ is the output dimension.
+
+$n=\#S$ is the number of samples. Without specification, $S$ and $n$ are for the training set.
+
+\section{Function}~\\
+A hypothesis space is denoted by $\fH$. A hypothesis function is denoted by $f_{\vtheta}(\vx)\in\fH$ or $f(\vx;\vtheta)\in\fH$ with $f_{\vtheta}:\fX\to\fY$.
+
+$\vtheta$ denotes the set of parameters of $f_{\vtheta}$.
+
+If there exists a target function, it is denoted by $f^*$or $f:\fX\to\fY$ satisfying $\vy_i=f^*(\vx_i)$ for $i=1,\ldots,n$.
+
+\section{Loss function}~\\
+A loss function, denoted by $\ell:\fH\times\fZ\to\sR_+:=[0,+\infty)$, measures the difference between a predicted label and a true label, e.g., $L^2$ loss:
+\[
+ \ell(f_{\vtheta},\vz)=\frac{1}{2}(f_{\vtheta}(\vx)-\vy)^2,
+\]
+where $\vz=(\vx,\vy)$. $\ell(f_{\vtheta},\vz)$ can also be written as
+\[
+ \ell(f_{\vtheta}(\vx),\vy)
+\]
+for convenience.
+Empirical risk or training loss for a set $S=\{(\vx_i,\vy_i)\}_{i=1}^{n}$ is denoted by $\LS(\vtheta)$ or $L_{n}(\vtheta)$ or $R_{n}(\vtheta)$ or $R_{S}(\vtheta)$,
+\begin{equation}
+ \LS(\vtheta) =\frac{1}{n}\sum_{i=1}^n\ell(f_{\vtheta}(\vx_i),\vy_i).
+\end{equation}
+
+
+The population risk or expected loss is denoted by $L_{\fD}(\vtheta)$ or $R_{\fD}(\vtheta)$
+\begin{equation}
+ \LD(\vtheta) =\Exp_{\fD}\ell(f_{\vtheta}(\vx),\vy),
+\end{equation}
+where $\vz=(\vx,\vy)$ follows the distribution $\fD$.
+
+\section{Activation function}
+An activation function is denoted by $\sigma(x)$.
+\begin{exam}Some commonly used activation functions are~\\
+ \begin{enumerate}
+ \item $\sigma(x) = \ReLU (x) = \max (0, x)$;
+ \item $\sigma(x) ={\rm sigmoid}(x)= \frac{1}{1 + \E^{-x}}$;
+ \item $\sigma(x) = \tanh x$;
+ \item $\sigma(x) = \cos x, \sin x$.
+ \end{enumerate}
+\end{exam}
+
+
+\section{Two-layer neural network}~\\
+The neuron number of the hidden layer is denoted by $m$. The two-layer neural network is
+\begin{equation}
+ f_{\vtheta}(\vx)=\sum_{j=1}^{m} a_j \sigma (\vw_j\cdot \vx + b_j),
+\end{equation}
+where $\sigma$ is the activation function, $\vw_j$ is the input weight, $a_j$ is the output weight, $b_j$ is the bias term. We denote the set of parameters by
+\[
+ \vtheta=(a_1,\cdots,a_m,\vw_1,\cdots,\vw_m,b_1,\cdots,b_m).
+\]
+\section{General deep neural network}~\\
+The counting of the layer number excludes the input layer. An $L$-layer neural network is denoted by
+\begin{equation}
+ f_{\vtheta}(\vx) = \vW^{[L-1]} \sigma\circ(\mW^{[L-2]}\sigma\circ(\cdots (\mW^{[1]} \sigma\circ(\mW^{[0]} \vx + \vb^{[0]} ) + \vb^{[1]} )\cdots)+\vb^{[L-2]})+\vb^{[L-1]},
+\end{equation}
+where $\mW^{[l]} \in \sR^{m_{l+1}\times m_{l}}$, $\vb^{[l]}=\sR^{m_{l+1}}$, $m_0=d_{\rm in}=d$, $m_{L}=d_{\rm o}$,
+$\sigma$ is a scalar function and ``$\circ$'' means entry-wise operation.
+We denote the set of parameters by \[
+ \vtheta=(\mW^{[0]},\mW^{[1]},\ldots,\vW^{[L-1]},\vb^{[0]},\vb^{[1]},\ldots,\vb^{[L-1]}),
+\]
+and an entry of $\vW^{[l]}$ by $\vW^{[l]}_{ij}$. This can also be defined recursively.
+\begin{align}
+ & f_{\vtheta}^{[0]}(\vx)=\vx, \\
+ & f_{\vtheta}^{[l]}(\vx)=\sigma\circ(\mW^{[l-1]} f_{\vtheta}^{[l-1]}(\vx) + \vb^{[l-1]}) \quad 1\leq l\leq L-1, \\
+ & f_{\vtheta}(\vx)=f_{\vtheta}^{[L]}(\vx)=\mW^{[L-1]} f_{\vtheta}^{[L-1]}(\vx) + \vb^{[L-1]}.
+\end{align}
+
+\section{Complexity}~\\
+The VC-dimension of a hypothesis class $\fH$ is denoted ${\rm VCdim}(\fH)$.
+
+The Rademacher complexity of a hypothesis space $\fH$ on a sample set $S$ is denoted by ${\rm Rad} (\fH\circ S)$ or ${\rm Rad}_{S} (\fH)$. The complexity ${\rm Rad}_{S} (\fH)$ is random because of the randomness of $S$. The expectation of the empirical Rademacher complexity over all samples of size $n$ is denoted by
+\[
+ {\rm Rad}_{n} (\fH)=\Exp_{S} {\rm Rad}_{S} (\fH).
+\]
+
+\section{Training}~\\
+The Gradient Descent is often denoted by GD. The Stochastic Gradient Descent is often denoted by SGD.
+
+A batch set is denoted by $B$ and the batch size is denoted by $|B|$.
+
+The learning rate is denoted by $\eta$.
+
+%\section{Gram matrix}~\\
+%The Gram matrix is denoted by $K_n$.
+
+\section{Fourier Frequency}~\\
+The discretized frequency is denoted by $\vk$, and the continuous frequency is denoted by $\vxi$.
+
+\section{Convolution}~\\
+The convolution operation is denoted by $*$.
+
+\newpage
+\section{Notation table}~\\
+\begin{center}
+ \begin{tabular}{llll}
+ \toprule
+ symbol & meaning & \LaTeX & simplied \\
+ \midrule
+
+ $\vx$ & input & \verb!\bm{x}! & \verb!\vx! \\
+ $\vy$ & output, label & \verb!\bm{y}! & \verb!\vy! \\
+ $d$ & input dimension & \verb!d! & \\
+ $d_{\rm o}$ & output dimension & \verb!d_{\rm o}! & \\
+ $n$ & number of samples & \verb!n! \\
+ $\fX$
+ & instances domain (a set) & \verb!\mathcal{X}! & \verb!\fX! \\
+ $\fY$
+ & labels domain (a set) & \verb!\mathcal{Y}! & \verb!\fY! \\
+ $\fZ$ & $=\fX\times\fY$ example domain & \verb!\mathcal{Z}! & \verb!\fZ! \\
+ $\fH$ & hypothesis space (a set) & \verb!\mathcal{H}! & \verb!\fH! \\
+ $\vtheta$ & a set of parameters & \verb!\bm{\theta}! & \verb!\vtheta! \\
+ $f_{\vtheta}:\fX\to \fY$ & hypothesis function & \verb!\f_{\bm{\theta}}! & \verb!f_{\vtheta}! \\
+ $f$ or $f^*:\fX\to\fY$ & target function & \verb!f,f^*! \\
+ $\ell:\fH\times \fZ\to \sR^+$ & loss function & \verb!\ell! \\
+ $\fD$ & distribution of $\fZ$ & \verb!\mathcal{D}! & \verb!\fD! \\
+ $S=\{\vz_i\}_{i=1}^n$ & $=\{(\vx_i,\vy_i)\}_{i=1}^n$ sample set \\
+ \begin{tabular}{@{}l @{}}$\LS(\vtheta)$, $L_{n}(\vtheta)$,\\$R_{n}(\vtheta)$, $R_{S}(\vtheta)$\end{tabular} & empirical risk or training loss \\
+ $\LD(\vtheta)$, $R_D(\vtheta)$ & population risk or expected loss \\
+ $\sigma:\sR\to\sR^+$ & activation function & \verb!\sigma! \\
+ $\vw_j$ & input weight & \verb!\bm{w}_j! & \verb!\vw_j! \\
+ $a_j$ & output weight & \verb!a_j! \\
+ $b_j$ & bias term & \verb!b_j! \\
+ $f_{\vtheta}(\vx)$ or $f(\vx;\vtheta)$ & neural network & \verb!f_{\bm{\theta}}! & \verb!f_{\vtheta}! \\
+ $\sum_{j=1}^{m} a_j \sigma (\vw_j\cdot \vx + b_j) $ & two-layer neural network \\
+ ${\rm VCdim}(\fH)$ & VC-dimension of $\fH$ \\
+ ${\rm Rad} (\fH\circ S)$, ${\rm Rad}_{S} (\fH)$ & Rademacher complexity of $\fH$ on $S$ \\
+ ${\rm Rad}_{n} (\fH)$ & \begin{tabular}{@{}l @{}}Rademacher complexity\\over samples of size $n$\end{tabular} \\
+ GD & gradient descent \\
+ SGD & stochastic gradient descent \\
+ $B$ & a batch set & \verb!B! \\
+ $|B|$ & batch size & \verb!b! \\
+ $\eta$ & learning rate & \verb!\eta! \\
+ %$K_n$&Gram matrix&\verb!K_n!\\
+ $\vk$ & discretized frequency & \verb!\bm{k}! & \verb!\vk! \\
+ $\vxi$ & continuous frequency & \verb!\bm{\xi}! & \verb!\vxi! \\
+ $*$ & convolution operation & \verb!*! \\
+ \bottomrule
+ \end{tabular}
+\end{center}
+
+\newpage
+\section{$L$-layer neural network}~\\
+\begin{center}
+ \begin{tabular}{llll}
+ \toprule
+ symbol & meaning & \LaTeX & simplied \\
+ \midrule
+ $d$ & input dimension & \verb!d! & \\
+ $d_{\rm o}$ & output dimension & \verb!d_{\rm o}! & \\
+ $m_l$ & the number of $l$th layer neuron, $m_0=d$, $m_{L} = d_{\rm o}$ & \verb!m_l! \\
+ $\mW^{[l]}$ & the $l$th layer weight & \verb!\bm{W}^{[l]}! & \verb!\mW^{[l]}! \\
+ $\vb^{[l]}$ & the $l$th layer bias term & \verb!\bm{b}^{[l]}! & \verb!\vb^{[l]}! \\
+ $\circ$ & entry-wise operation & \verb!\circ! \\
+ $\sigma:\sR\to\sR^+$ & activation function & \verb!\sigma! \\
+ $\vtheta$ & $=(\mW^{[0]},\ldots,\vW^{[L-1]},\vb^{[0]},\ldots,\vb^{[L-1]})$, parameters & \verb!\bm{\theta}! & \verb!\vtheta! \\
+ $f_{\vtheta}^{[0]}(\vx)$ & $=\vx$ \\
+ $f_{\vtheta}^{[l]}(\vx)$ & $=\sigma\circ(\mW^{[l-1]} f_{\vtheta}^{[l-1]}(\vx) + \vb^{[l-1]})$, $l$-th layer output \\
+ $f_{\vtheta}(\vx)$ & $=f_{\vtheta}^{[L]}(\vx)=\mW^{[L-1]} f_{\vtheta}^{[L-1]}(\vx) + \vb^{[L-1]}$, $L$-layer NN \\
+ \bottomrule
+ \end{tabular}
+\end{center}
+
+\newpage
+\section{Acknowledgements}
+Chenglong Bao (Tsinghua), Zhengdao Chen (NYU), Bin Dong (Peking), Weinan E (Princeton), Quanquan Gu (UCLA), Kaizhu Huang (XJTLU), Shi Jin (SJTU), Jian Li (Tsinghua), Lei Li (SJTU), Tiejun Li (Peking), Zhenguo Li (Huawei), Zhemin Li (NUDT), Shaobo Lin (XJTU), Ziqi Liu (CSRC), Zichao Long (Peking), Chao Ma (Princeton), Chao Ma (SJTU), Yuheng Ma (WHU), Dengyu Meng (XJTU), Wang Miao (Peking), Pingbing Ming (CAS), Zuoqiang Shi (Tsinghua), Jihong Wang (CSRC), Liwei Wang (Peking), Bican Xia (Peking), Zhouwang Yang (USTC), Haijun Yu (CAS), Yang Yuan (Tsinghua), Cheng Zhang (Peking), Lulu Zhang (SJTU), Jiwei Zhang (WHU), Pingwen Zhang (Peking), Xiaoqun Zhang (SJTU), Chengchao Zhao (CSRC), Zhanxing Zhu (Peking), Chuan Zhou (CAS), Xiang Zhou (cityU).
+
+
+
+
+
+
+
+\end{document}
diff --git a/macros/latex/contrib/yathesis/CHANGELOG.md b/macros/latex/contrib/yathesis/CHANGELOG.md
index 8355f3c158..6893e749ab 100644
--- a/macros/latex/contrib/yathesis/CHANGELOG.md
+++ b/macros/latex/contrib/yathesis/CHANGELOG.md
@@ -1,5 +1,17 @@
# [Unreleased]
+# [1.0.3] - 2020-06-16
+
+## Changed
+
+- Documentation revised.
+- Specimens improved.
+- Package `titlesec` used intead of `titleps`: possible (hopefully slight) layout discrepancies.
+
+## Fixed
+- Bug gh #74 (https://git.io/Jf64U).
+- Bug gh #65 (https://git.io/Jf64k), continuation and (?) ending.
+
# [1.0.2] - 2020-04-13
## Changed
diff --git a/macros/latex/contrib/yathesis/README.md b/macros/latex/contrib/yathesis/README.md
index 3bc87c5039..33f9a33c6b 100644
--- a/macros/latex/contrib/yathesis/README.md
+++ b/macros/latex/contrib/yathesis/README.md
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------
-- `yathesis` --- Yet Another Thesis Class, version 1.0.2
+- `yathesis` --- Yet Another Thesis Class, version 1.0.3
- E-mail: `denis.bitouze@univ-littoral.fr`
- 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/yathesis/doc/yathesis-fr.pdf b/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf
index fcb6e00bce..520a5a9276 100644
--- a/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf
+++ b/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/yathesis/exemples/specimen/these.pdf b/macros/latex/contrib/yathesis/exemples/specimen/these.pdf
index 968ded32ce..1104cc6f7d 100644
--- a/macros/latex/contrib/yathesis/exemples/specimen/these.pdf
+++ b/macros/latex/contrib/yathesis/exemples/specimen/these.pdf
Binary files differ
diff --git a/macros/latex/contrib/yathesis/source/yathesis.dtx b/macros/latex/contrib/yathesis/source/yathesis.dtx
index 984be7e0ae..9b7a90f18b 100644
--- a/macros/latex/contrib/yathesis/source/yathesis.dtx
+++ b/macros/latex/contrib/yathesis/source/yathesis.dtx
@@ -23,7 +23,7 @@
%<*readme>
-----------------------------------------------------------------------
-- `yathesis` --- Yet Another Thesis Class, version 1.0.2
+- `yathesis` --- Yet Another Thesis Class, version 1.0.3
- E-mail: `denis.bitouze@univ-littoral.fr`
- Released under the LaTeX Project Public License v1.3c or later. See
http://www.latex-project.org/lppl.txt
@@ -70,8 +70,8 @@ Typesetting the documentation of the class requires:
\fi
%</internal>
%<*class|install>
-\def\yathesisfileversion{1.0.2}
-\def\yathesisfiledate{2020-04-13}
+\def\yathesisfileversion{1.0.3}
+\def\yathesisfiledate{2020-06-16}
%</class|install>
%<*install>
\input docstrip.tex
@@ -278,6 +278,7 @@ This work consists of the file yathesis.dtx
\documentclass[english,french]{ltxdoc}
\usepackage[yad]{denisbdoc}
\lstMakeShortInline[style=dbtex]"
+%"
\usepackage[lining]{libertine}
\renewcommand{\ttdefault}{lmtt}
\makeatletter
@@ -854,7 +855,6 @@ This work consists of the file yathesis.dtx
refsegment=chapter,%
defernumbers=#1%
}%
- \AfterEndPreamble{\newrefsegment}%
}%
}
\yadsetup{%
@@ -955,7 +955,6 @@ This work consists of the file yathesis.dtx
setspace/.code={\PassOptionsToPackage{#1}{setspace}},%
xcolor/.code={\PassOptionsToPackage{#1}{xcolor}},%
datatool/.code={\PassOptionsToPackage{#1}{datatool}},%
- titleps/.code={\PassOptionsToPackage{#1}{titleps}},%
titlesec/.code={\PassOptionsToPackage{#1}{titlesec}},%
draftwatermark/.code={\PassOptionsToPackage{#1}{draftwatermark}},%
babel/.code={\PassOptionsToPackage{#1}{babel}},%
@@ -1083,7 +1082,7 @@ This work consists of the file yathesis.dtx
% \end{macrocode}
% Pour gérer les titres courants (entêtes) et bas de page
% \begin{macrocode}
-\RequirePackage[nopatches]{titleps}[2011/12/15]%
+\RequirePackage[pagestyles]{titlesec}[2019/10/16]%
% \end{macrocode}
% Pour supprimer le numéro de page sur la page de titre d'une partie
% \begin{macrocode}
@@ -3116,7 +3115,7 @@ This work consists of the file yathesis.dtx
% \begin{macro}{\pagestyle}
% Redéfinition permettant d'éviter de devoir ajouter
% \lstinline|\cleardoublepage| avant chaque la commande
-% \lstinline|\pagestyle| fournie par le package \package{titleps}
+% \lstinline|\pagestyle| fournie par le package \package{titlesec}
% (cet ajout est pour l'instant nécessaire pour que les entêtes
% aux frontières des chapitres non numérotés ne soient pas
% erronés).
@@ -3272,7 +3271,7 @@ This work consists of the file yathesis.dtx
% \end{macrocode}
%
% Globalement dans le document, la table des matières et la
-% numérotation des paragraphes vont jusqu'aux sous-sections
+% numérotation des paragraphes vont jusqu'aux sous-sections.
% \begin{macrocode}
\etocsettocdepth{\YAD@tocdepth}%
\AtBeginDocument{%
@@ -3283,18 +3282,15 @@ This work consists of the file yathesis.dtx
%
% \end{macrocode}
%
-% Définition des styles de pages (basées sur le \Package{titleps})
+% Définition des styles de pages (basés sur le \Package{titleps}, chargé par le
+% \Package{titlesec} avec l'option ×titleps×).
%
% \begin{macro}{\YAD@chapter@header}
% Définition de titres courants
% \begin{macrocode}
\DeclareRobustCommand{\YAD@chapter@header}{%
- \ifboolexpr{
- ((test {\ifnumcomp{\value{secnumdepth}}{>}{-1}} or (not bool
- {YAD@nonnumbered@chapter})) and test {\ifnumcomp{\value{chapter}}{>}{0}}) and
- (not bool {YAD@backmatter})
- }{%
- \MakeUppercase\chaptername{}\ \thechapter.
+ \ifthechapter{%
+ \MakeUppercase\chaptertitlename\ \thechapter.
}{%
}%
\chaptertitle%
@@ -3305,20 +3301,7 @@ This work consists of the file yathesis.dtx
% \begin{macro}{\YAD@section@header}
% \begin{macrocode}
\DeclareRobustCommand{\YAD@section@header}{%
- \ifboolexpr{
- (
- (
- test {\ifnumcomp{\value{secnumdepth}}{>}{0}}
- or
- (not bool {YAD@nonnumbered@section})
- )
- and
- test {\ifnumcomp{\value{chapter}}{>}{0}})
- and
- (not bool {YAD@backmatter})
- and
- (not bool {YAD@localbibs@used})
- }{%
+ \ifthesection{%
\thesection.
}{%
}%
@@ -3512,7 +3495,7 @@ This work consists of the file yathesis.dtx
}%
% \end{macrocode}
% Pour que les bibliographies locales apparaissent automatiquement à chaque fin de
-% chapitre, la commande "\chapter" est redéfinie de manière à commencer par
+% chapitre, la commande "\chapter" est redéfinie de manière être précédée par
% l'insertion de la bibliographie locale ("\printlocalbibs") du, donc, chapitre
% précédent (affichée seulement si celle-ci n'est pas vide). Ceci fonctionne
% bien, sauf :
@@ -4083,7 +4066,8 @@ This work consists of the file yathesis.dtx
% \end{macrocode}
% \end{macro}
%
-% Si la commande "\maketitle" n'a pas été utilisée, une erreur est émise.
+% Si la commande "\maketitle" n'a pas été utilisée, une erreur est émise (en
+% version finale).
% \begin{macrocode}
\AtEndDocument{%
\ifboolexpr{%
@@ -4101,6 +4085,11 @@ This work consists of the file yathesis.dtx
}%
% \end{macrocode}
%
+% Le mémoire est, à son début, automatiquement en style de pages préliminaires.
+% \begin{macrocode}
+\AfterEndPreamble{\pagestyle{preliminary}}%
+% \end{macrocode}
+%
% Code pour l'éventuel colophon
% \begin{macrocode}
\newcommand{\YAD@insert@colophon}{%
@@ -5105,11 +5094,18 @@ This work consists of the file yathesis.dtx
% or local) TOCs. For this, it is enough to \enquote{relax} "\addcontentsline".
% \begin{macrocode}
\renewcommand\addcontentsline[3]{}%
- \section *{\kern\dimen@ % \dimen@ works here by sheer luck
- % \contentsname%
- % \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
- \large\textbf{\translate{lbl-localtocname}}%
+ \begingroup
+ \titlespacing*{\section}{\dimen@}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
+ \section*{%
+ \large%
+ \translate{lbl-localtocname}%
}%
+ \endgroup
+% \end{macrocode}
+% We don't want the header contain the title of the previous (dummy) section in case
+% the first \enquote{real} section shows up.
+% \begin{macrocode}
+ \sectionmark{}%
% \end{macrocode}
% We restore the original behavior of "\addcontentsline".
% \begin{macrocode}
@@ -5286,11 +5282,31 @@ This work consists of the file yathesis.dtx
\ifbool{YAD@localbibs}{%
\ifbool{YAD@localbibs@used}{%
}{%
- \let\YAD@ORI@blx@warn@bibempty\blx@warn@bibempty%
- \def\blx@warn@bibempty{}%
- \YAD@printbibliography@ORI[segment=\therefsegment,heading=YAD@localbibs@heading]%
- \let\blx@warn@bibempty\YAD@ORI@blx@warn@bibempty%
- \booltrue{YAD@localbibs@used}%
+% \end{macrocode}
+% \end{environment}
+%
+% On n'affiche une bibliographie locale que dans les segments de bibliographie
+% autres que celui numéroté 0 sans quoi la bibliographie globale est suivie
+% d'une bibliographie locale contenant toutes les citations insérées en dehors
+% d'un segment (par exemple en cas de ×\nocite{*}× ou de citation par exemple
+% dans les épigraphes).
+% \begin{macrocode}
+ \ifnumcomp{\value{refsegment}}{=}{0}{%
+ }{%
+ \let\YAD@ORI@blx@warn@bibempty\blx@warn@bibempty%
+ \def\blx@warn@bibempty{}%
+% \end{macrocode}
+% Les bibliographies locales sont composées en interligne simple
+% \begin{macrocode}
+ \bgroup
+ \par%
+ \singlespacing%
+ \YAD@printbibliography@ORI[segment=\therefsegment,heading=YAD@localbibs@heading]%
+ \par%
+ \egroup%
+ \let\blx@warn@bibempty\YAD@ORI@blx@warn@bibempty%
+ \booltrue{YAD@localbibs@used}%
+ }%
}%
}{%
}%
@@ -6002,7 +6018,8 @@ This work consists of the file yathesis.dtx
% \begin{macrocode}
\AtEndPreamble{%
\@ifpackageloaded{biblatex}{%
- \defbibheading{YAD@localbibs@heading}[\translate{lbl-localbibname}]{%
+ \defbibheading{YAD@localbibs@heading}[\translate{lbl-localbibname} % (\therefsegment)
+ ]{%
\renewcommand\addcontentsline[3]{}%
\section*{#1}%
\let\addcontentsline\YAD@addcontentsline%
@@ -6024,20 +6041,26 @@ This work consists of the file yathesis.dtx
\let\YAD@printbibliography@ORI\printbibliography%
\renewcommand{\printbibliography}[1][]{%
\booltrue{YAD@printbibliography@used}%
+ \bgroup
+ \par%
+ \singlespacing%
+ \YAD@printbibliography@ORI[#1]%
% \end{macrocode}
%
-% Un hack aimablement fourni par samcarter
-% (\url{https://texnique.fr/osqa/questions/6977/header-avec-biblatex/6978})
-% a permis d'éviter que l'entête de la bibliographie, en dernière page de
-% celle-ci, ne contienne pas seulement \enquote{Bibliographie} mais
-% \enquote{CHAPITRE XXX. Bibliographie}.
+% On introduit un segment de bibliographie vide sans quoi la bibliographie est
+% suivie de la bibliographie locale du chapitre précédent (quand il en a une),
+% avec en outre un titre courant incorrect sur les pages paires
+% (\enquote{CHAPITRE (ou ANNEXE) XXX. Bibliographie du présent chapitre}).
% \begin{macrocode}
- \singlespace%
- \chapter*{\bibname}%
- \YAD@printbibliography@ORI[heading=none,#1]%
- \endsinglespace%
+ \newrefsegment%
+ \endrefsegment%
+ \egroup%
}%
}{%
+% \end{macrocode}
+%
+% Si \package{biblatex} non chargé (\package{bibtex} supposé).
+% \begin{macrocode}
\BeforeBeginEnvironment{thebibliography}{%
\singlespacing%
}%
@@ -6049,6 +6072,18 @@ This work consists of the file yathesis.dtx
% \end{macrocode}
% \end{macro}
%
+% On s'assure que, en fin de document, les \enquote{chapitres} et
+% \enquote{section} sont non numérotés afin d'éviter sur la (ou les ?)
+% dernière(s) page(s) des titres courants incorrects (comportant
+% \enquote{Chapitre XXX. ...} ou \enquote{XXX.XXX} qui ne devraient pas
+% apparaître si le dernier chapitre du document est non numéroté).
+% \begin{macrocode}
+\AtEndDocument{%
+ \booltrue{YAD@nonnumbered@chapter}%
+ \booltrue{YAD@nonnumbered@section}%
+}
+% \end{macrocode}
+%
% Si la commande "\printbibliography" n'a pas été utilisée, une erreur est émise.
% \begin{macrocode}
\AtEndDocument{%
@@ -6509,7 +6544,7 @@ This work consists of the file yathesis.dtx
#include:setspace
#include:tcolorbox
#include:textcase
-#include:titleps
+#include:titlesec
#include:tocbibind
#include:translator
#include:twoopt
@@ -6562,7 +6597,7 @@ adjustbox
setspace
xcolor
datatool
-titleps
+titlesec
draftwatermark
babel
datetime