summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-03 03:01:37 +0000
committerNorbert Preining <norbert@preining.info>2023-01-03 03:01:37 +0000
commit660cf44d2a0aee74bd6e69615fedfc57c966a260 (patch)
tree3e62bc2b2f8208c4abcad9423ee2efa266fa8c7b /macros/latex/contrib
parent4841af990664e40ab2f20099d8b39dabacf5ad0f (diff)
CTAN sync 202301030301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/babel-contrib/french/README.md2
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb-doc.pdfbin185385 -> 186723 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb-doc.tex43
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.dtx130
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.ins4
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.pdfbin362890 -> 364942 bytes
-rw-r--r--macros/latex/contrib/colorist/README.md8
-rw-r--r--macros/latex/contrib/colorist/colorart.cls37
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls37
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin101376 -> 0 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex625
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty37
-rw-r--r--macros/latex/contrib/colorist/colorist.sty4
-rw-r--r--macros/latex/contrib/minimalist/README.md10
-rw-r--r--macros/latex/contrib/minimalist/minimalist-classical.sty62
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin104027 -> 0 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex619
-rw-r--r--macros/latex/contrib/minimalist/minimalist-flow.sty1042
-rw-r--r--macros/latex/contrib/minimalist/minimalist-plain.sty51
-rw-r--r--macros/latex/contrib/minimalist/minimalist-stream.sty1101
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty5
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls35
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls35
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx144
-rw-r--r--macros/latex/contrib/projlib/README.md2
-rw-r--r--macros/latex/contrib/xput/README.md109
-rw-r--r--macros/latex/contrib/xput/doc/example-book.tex2
-rw-r--r--macros/latex/contrib/xput/doc/example-grid.tex4
-rw-r--r--macros/latex/contrib/xput/doc/example-template.tex4
-rw-r--r--macros/latex/contrib/xput/doc/example-text.tex2
-rw-r--r--macros/latex/contrib/xput/doc/xputmanual-layout-guides.pdfbin6452 -> 6493 bytes
-rw-r--r--macros/latex/contrib/xput/doc/xputmanual-layout-guides.tex1
-rw-r--r--macros/latex/contrib/xput/doc/xputmanual.pdfbin77006 -> 77041 bytes
-rw-r--r--macros/latex/contrib/xput/doc/xputmanual.tex2
-rwxr-xr-xmacros/latex/contrib/xput/scripts/xput31
-rwxr-xr-xmacros/latex/contrib/xput/scripts/xputserver83
-rw-r--r--macros/latex/contrib/xput/tex/xput.cls15
37 files changed, 2803 insertions, 1483 deletions
diff --git a/macros/latex/contrib/babel-contrib/french/README.md b/macros/latex/contrib/babel-contrib/french/README.md
index 08a1d95dd8..2ef0d0b281 100644
--- a/macros/latex/contrib/babel-contrib/french/README.md
+++ b/macros/latex/contrib/babel-contrib/french/README.md
@@ -50,5 +50,5 @@ Changes
See the included manual frenchb.pdf, section "Change History".
---
-Copyright 1996--2022 Daniel Flipo
+Copyright 1996--2023 Daniel Flipo
E-mail: daniel (dot) flipo (at) free (dot) fr
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
index 27a788be19..a877bbe57c 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
+++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
index ff9f5f6aec..f944831c59 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
+++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
@@ -121,7 +121,7 @@
\title{Mode d’emploi du module \ext{babel-french}}
\author{\href{mailto:daniel.flipo@free.fr}{Daniel \textsc{Flipo}}}
-\newcommand*{\latestversion}{3.5o}
+\newcommand*{\latestversion}{3.5p}
\date{Version {\latestversion} -- \today}
\begin{document}
@@ -158,9 +158,6 @@
\vspace{-\baselineskip}\noindent
\descindentFB=0pt
\begin{description}
- \item[3 juillet 2016] Ajout dans la version~3.2d, du paramètre
- |\descindentFB| pour les listes \env{description}, voir
- section~\ref{ssec:lists}.
\item[15 janvier 2017] La version~3.2f est compatible avec l’extension
\ext{icomma}.
\item[30 janvier 2017] Le comportement par défaut de la commande
@@ -182,10 +179,12 @@
p.~\pageref{frquote}.
\item[18 avril 2022] Nouvelle commande |\bname{}|, variante sans petites
capitales de |\bsc{}| voir p.~\pageref{bname}.
- \item[11 novembre 2022] Avec Lua(La)TeX le codage |«~abc~»| ne produit plus
+ \item[11 nov. 2022] Avec Lua(La)TeX le codage |«~abc~»| ne produit plus
d’espace parasite. La redéfinition de |\shorthandoff{}|,
|\shorthandon{}| sous LuaTeX/XeTeX est supprimée.
-\end{description}
+ \item[3 janvier 2022] Modification de la commande |\DecimalMathComma|,
+ voir p.~\pageref{decimalmathcomma}.
+ \end{description}
\end{abstract}
\egroup
@@ -623,15 +622,23 @@ vertical des lettres supérieures simulées par |\fup|
(jan-vier, dé-cembre, …) qui est interdite par défaut.
\enlargethispage{\baselineskip}
-\item En mode mathématique, la virgule est toujours suivie d’une espace
- car elle est traitée comme un signe de ponctuation et non comme
- une virgule décimale. La commande |\DecimalMathComma| supprime cette
- espace (mais uniquement en français), on revient au comportement par
- défaut avec |\StandardMathComma|. Remarquer qu’après une
- commande |\DecimalMathComma|, il est nécessaire de saisir un espace
- explicite dans les listes et les intervalles par exemple |$(x,\ y)$|
- et |$[0,\ 1]$|.
- Ces deux commandes sont utilisables n’importe où dans le document.
+\item En mode mathématique, la virgule est toujours suivie d’une espace car
+ elle est traitée comme un signe de ponctuation et non comme une virgule
+ décimale%
+ \footnote{Une virgule décimale peut toujours être codée \code{\{,\}} en mode
+ math.}.
+ La commande |\DecimalMathComma| supprime cette espace (mais uniquement en
+ français), on revient au comportement standard avec |\StandardMathComma|.
+ On peut l’utiliser dans un groupe pour limiter sa portée, sinon
+ après une commande |\DecimalMathComma|, il est nécessaire de saisir une
+ espace (fine) dans les listes et les intervalles par exemple |$(x,\,y)$| et
+ |$[0,\,1]$|.\hlabel{decimalmathcomma}
+
+ |\DecimalMathComma| peut être placée soit dans le préambule, soit dans le
+ corps du document \emph{en mode texte} et dans une partie \emph{en français},
+ son effet survit à un changement de langue (passage en anglais et retour en
+ français par exemple), sauf bien sûr si elle est placée dans un groupe.
+
Une solution alternative consiste à utiliser l’extension \ext{icomma}.
\item La commande |\nombre|, destinée à formater
@@ -1566,6 +1573,12 @@ comme celle concernant la saisie des guillemets.
car elle cassait la variante |\shorthandoff*{}|.
\end{itemize}
+\vspace{\parskip}
+Le comportement de |\DecimalMathComma| a changé en version~3.5p suite à une
+remarque de Fabrice Eudes : elle peut désormais être utilisée dans le préambule.
+Voir section~\ref{decimalmathcomma} p.~\pageref{decimalmathcomma} pour plus de
+détails.
+
\subsection{Changements entre les versions 3.4d et 3.3d}
\label{ssec:changes-3.4}
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.dtx b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
index 11036d0c9c..441b411aee 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.dtx
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
@@ -11,7 +11,7 @@
%<frenchb>\ProvidesLanguage{frenchb}
%<lua>--[[
%<lua> File `frenchb.lua’ generated from frenchb.dtx
- [2022/11/11 v3.5o French support from the babel system]
+ [2023/01/02 v3.5p French support from the babel system]
%<*internal>
\iffalse
%</internal>
@@ -82,7 +82,7 @@
\let\Module\meta % no math mode (see doc.sty)
\renewcommand*\descriptionlabel[1]{%
\hspace{\labelsep}\normalfont \fbo{#1}}
-\let\up\textsuperscript
+\NewCommandCopy{\up}{\textsuperscript}
\newcommand*{\FRguillspace}{\penalty 10000
\hskip.8\fontdimen2\font
plus.3\fontdimen3\font
@@ -318,8 +318,8 @@
% ordinary character \emph{when the current language is French}
% (no space added);
% as a counterpart, if |\DecimalMathComma| is active, an
-% explicit space has to be added in lists and intervals:
-% |$[0,\ 1]$|, |$(x,\ y)$|. |\StandardMathComma| switches
+% explicit thin space has to be added in lists and intervals:
+% |$(x,\,y)$|, |$[0,\,1]$|. |\StandardMathComma| switches
% back to the standard behaviour of the comma in French.
%
% The \pkg{icomma} package is an alternative workaround.
@@ -1458,8 +1458,8 @@
\ifFB@luatex@punct
\edef\bbl@tempa{\detokenize\expandafter{\languagename}}%
\edef\bbl@tempb{\detokenize{french}}%
- \ifx\bbl@tempa\bbl@tempb \FB@dialect=0 \relax
- \else \FB@dialect=1 \relax
+ \ifx\bbl@tempa\bbl@tempb \FB@dialect=\z@
+ \else \FB@dialect=\@ne
\fi
% \end{macrocode}
% When first entering French, we must set the LuaTeX
@@ -1528,8 +1528,8 @@
% any engine (up to version 3.2b, results were engine dependent).
% \begin{macrocode}
\ifFB@luatex@punct
- \newcommand*{\FB@spacing@on}{\FB@spacing=1 \relax}
- \newcommand*{\FB@spacing@off}{\FB@spacing=0 \relax}
+ \newcommand*{\FB@spacing@on}{\FB@spacing=\@ne}
+ \newcommand*{\FB@spacing@off}{\FB@spacing=\z@}
\else
\newcommand*{\FB@spacing@on}{\FB@spacingtrue}
\newcommand*{\FB@spacing@off}{\FB@spacingfalse}
@@ -1602,11 +1602,11 @@
% which parts of the glue table (|.fr| or |.ac|) are taken into
% account.
% \begin{macrocode}
- \newattribute\FB@spacing \FB@spacing=1 \relax
- \newattribute\FB@addDPspace \FB@addDPspace=1 \relax
- \newattribute\FB@addGUILspace \FB@addGUILspace=0 \relax
- \newattribute\FB@ucsNBSP \FB@ucsNBSP=0 \relax
- \newattribute\FB@dialect \FB@dialect=0 \relax
+ \newattribute\FB@spacing \FB@spacing=\@ne
+ \newattribute\FB@addDPspace \FB@addDPspace=\@ne
+ \newattribute\FB@addGUILspace \FB@addGUILspace=\z@
+ \newattribute\FB@ucsNBSP \FB@ucsNBSP=\z@
+ \newattribute\FB@dialect \FB@dialect=\z@
\ifLaTeXe
\PackageInfo{french.ldf}{No need for active punctuation
characters\MessageBreak with this version
@@ -2421,7 +2421,7 @@ return french_punctuation
% |\NoAutoSpacing|; this flag is also set to false when the current
% font is a typewriter font).
% \begin{macrocode}
- \XeTeXinterchartokenstate=1
+ \XeTeXinterchartokenstate=\@ne
\XeTeXcharclass `\: = \FB@punctthick
\XeTeXinterchartoks \z@ \FB@punctthick = {%
\ifFB@spacing\ifhmode\FDP@colonspace\fi\fi}%
@@ -2656,11 +2656,11 @@ return french_punctuation
% Set the default now for Plain (done later for LaTeX).
% \begin{macrocode}
\def\autospace@beforeFDP{%
- \ifFB@luatex@punct\FB@addDPspace=1 \fi
+ \ifFB@luatex@punct \FB@addDPspace=\@ne \fi
\def\FDP@thinspace{\penalty\@M\FBthinspace}%
\def\FDP@colonspace{\penalty\@M\FBcolonspace}}
\def\noautospace@beforeFDP{%
- \ifFB@luatex@punct\FB@addDPspace=0 \fi
+ \ifFB@luatex@punct \FB@addDPspace=\z@ \fi
\let\FDP@thinspace\@empty
\let\FDP@colonspace\@empty}
\ifLaTeXe
@@ -2838,11 +2838,11 @@ return french_punctuation
\newif\ifFBucsNBSP
\ifFB@luatex@punct
\DeclareRobustCommand*{\@FB@og}{\leavevmode
- \bgroup\FB@spacing=0 \guillemotleft\egroup
+ \bgroup\FB@spacing=\z@ \guillemotleft\egroup
\ifFBucsNBSP\FBgspchar\else\FB@guillspace\fi}
\DeclareRobustCommand*{\@FB@fg}{\ifdim\lastskip>\z@\unskip\fi
\ifFBucsNBSP\FBgspchar\else\FB@guillspace\fi
- \bgroup\FB@spacing=0 \guillemotright\egroup}
+ \bgroup\FB@spacing=\z@ \guillemotright\egroup}
\fi
% \end{macrocode}
% With XeTeX, |\ifFB@spacing| is set to |false| locally for the
@@ -3046,17 +3046,20 @@ return french_punctuation
% \changes{v3.5e}{2019/03/23}{reset \cs{FB@addGUILspace} attribute
% inside \cs{localleftbox} (LuaTeX).}
%
+% \changes{v3.5p}{2022/12/04}{\cs{FBeveryline@quote}: no need for
+% a penalty inside a \cs{localleftbox}.}
+%
% \begin{macrocode}
\ifx\FBeverylineguill\FBguillopen
- \def\FBeveryline@quote{\FB@addGUILspace=0 \guillemotleft
- \FB@guillspace}%
+ \def\FBeveryline@quote{\FB@addGUILspace=\z@
+ \guillemotleft\FBguillspace}%
\localleftbox{\FBeveryline@quote}%
\let\FBeverypar@quote\relax
\@ogi #1\ifFBcloseguill\@fgi\fi
\else
\ifx\FBeverylineguill\FBguillclose
- \def\FBeveryline@quote{\FB@addGUILspace=0 \guillemotright
- \FB@guillspace}%
+ \def\FBeveryline@quote{\FB@addGUILspace=\z@
+ \guillemotright\FBguillspace}%
\localleftbox{\FBeveryline@quote}%
\let\FBeverypar@quote\relax
\@ogi #1\ifFBcloseguill\@fgi\fi
@@ -3585,6 +3588,10 @@ return french_punctuation
% \changes{v3.5f}{2019/09/07}{Fixed bug with the acadian language.
% Warning added if used with the icomma package.}
%
+% \changes{v3.5p}{2023/01/02}{\cs{DecimalMathComma} can again be
+% used in the preamble for a global action. It now works as
+% expected inside a group.}
+%
% Unfortunately, |\newcount| inside |\if| breaks Plain formats.
% \begin{macrocode}
\newif\ifFB@icomma
@@ -3615,19 +3622,30 @@ return french_punctuation
\newcommand*{\dec@math@comma}{\mathcode`\,=\dec@mcc}
\newcommand*{\std@math@comma}{\mathcode`\,=\std@mcc}
\fi
+\let\dec@m@c\relax
% \end{macrocode}
-% |\DecimalMathComma| operates in French or Acadian independently.
+% If |\DecimalMathComma| is issued in the document body
+% (when the current language is French or Acadian) its effect will
+% survive to a language switch, unless issued inside a group
+% (see |\dec@m@c|’s expansion).
+% The \pkg{icomma} inhibits |\DecimalMathComma|.
% \begin{macrocode}
+\newif\if@FBpreamble \ifLaTeXe \@FBpreambletrue \fi
+\newif\if@preamble@DecimalMathComma
\newcommand*{\DecimalMathComma}{%
- \ifFB@icomma
- \PackageWarning{french.ldf}{%
- icomma package loaded, \protect\DecimalMathComma\MessageBreak
- does nothing. Reported}%
+ \if@FBpreamble \@preamble@DecimalMathCommatrue
\else
- \ifFBfrench
- \dec@math@comma
- \expandafter\addto\csname extras\languagename\endcsname
- {\dec@math@comma}%
+ \ifFB@icomma
+ \PackageWarning{french.ldf}{%
+ icomma package loaded, \protect\DecimalMathComma\MessageBreak
+ does nothing. Reported}%
+ \else
+ \ifFBfrench
+ \dec@math@comma
+ \let\dec@m@c\dec@math@comma
+ \expandafter\addto\csname extras\languagename\endcsname
+ {\dec@m@c}%
+ \fi
\fi
\fi
}
@@ -3637,19 +3655,45 @@ return french_punctuation
icomma package loaded, \protect\StandardMathComma\MessageBreak
does nothing. Reported}%
\else
- \std@math@comma
- \expandafter\addto\csname extras\languagename\endcsname
- {\std@math@comma}%
+ \ifFBfrench
+ \std@math@comma
+ \let\dec@m@c\relax
+ \fi
\fi
}
+% \end{macrocode}
+% Ii issued in the preamble, |\DecimalMathComma| works globally on
+% all parts of the document that are typeset in a French dialect.
+% Can be canceled anytime by |\StandardMathComma|.
+% \begin{macrocode}
\ifLaTeXe
- \AtBeginDocument{\@ifpackageloaded{icomma}%
- {\FB@icommatrue}%
- {\addto\noextrasfrench{\std@math@comma}%
- \ifdefined\noextrasacadian
- \addto\noextrasacadian{\std@math@comma}%
- \fi
- }%
+ \AtBeginDocument{%
+ \@FBpreamblefalse
+ \@ifpackageloaded{icomma}%
+ {\FB@icommatrue
+ \if@preamble@DecimalMathComma
+ \PackageWarning{french.ldf}{%
+ icomma package loaded, \protect\DecimalMathComma%
+ \MessageBreak does nothing. Reported}%
+ \fi
+ }%
+ {\if@preamble@DecimalMathComma
+ \ifFB@mainlanguage@FR \dec@math@comma \fi
+ \let\dec@m@c\dec@math@comma
+ \addto\extrasfrench{\dec@m@c}%
+ \ifdefined\extrasacadian
+ \addto\extrasacadian{\dec@m@c}%
+ \fi
+ \fi
+% \end{macrocode}
+% The comma is reset to type |\mathpunct| when leaving French
+% dialects (only if the icomma package is not loaded).
+% \begin{macrocode}
+ \addto\noextrasfrench{\std@math@comma}%
+ \ifdefined\noextrasacadian
+ \addto\noextrasacadian{\std@math@comma}%
+ \fi
+ }%
}
\else
\addto\noextrasfrench{\std@math@comma}
@@ -4673,7 +4717,7 @@ return french_punctuation
\define@key{FB}{UnicodeNoBreakSpaces}[true]%
{\ifFB@luatex@punct
\csname FBucsNBSP#1\endcsname
- \ifFBucsNBSP \FB@ucsNBSP=1 \fi
+ \ifFBucsNBSP \FB@ucsNBSP=\@ne \fi
\else
\FBWarning{Option `UnicodeNoBreakSpaces' skipped:%
\MessageBreak this option is for
@@ -5510,7 +5554,7 @@ return french_punctuation
\itemindent=\descindentFB
\else
\itemindent=-\leftmargin
- \ifnum\@listdepth=1
+ \ifnum\@listdepth=\@ne
\ifdim\descindentFB=\z@
\ifdim\listindentFB>\z@
\leftmargini=\listindentFB
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.ins b/macros/latex/contrib/babel-contrib/french/frenchb.ins
index 10f64910fa..0f973a54df 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.ins
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.ins
@@ -2,7 +2,7 @@
%% This file will generate fast loadable files and documentation driver
%% files from the doc files in this package when run through LuaTeX.
%%
-%% Copyright 2001-2022 Daniel Flipo. All rights reserved.
+%% Copyright 2001-2023 Daniel Flipo. All rights reserved.
%%
%% This is a generated file part of the the babel-french bundle
%% to be used with the Babel system.
@@ -14,7 +14,7 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2022/04/18}
+\def\filedate{2023/01/02}
\def\batchfile{frenchb.ins}
\input docstrip.tex
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.pdf b/macros/latex/contrib/babel-contrib/french/frenchb.pdf
index 61a6dfd316..11268e191f 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.pdf
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/README.md b/macros/latex/contrib/colorist/README.md
index b40c6088b2..fbfd1cd0be 100644
--- a/macros/latex/contrib/colorist/README.md
+++ b/macros/latex/contrib/colorist/README.md
@@ -1,8 +1,8 @@
-<!-- Copyright (C) 2021-2022 by Jinwen XU -->
+<!-- Copyright (C) 2021-2023 by Jinwen XU -->
# `colorist` bundle: write you documents in a colorful way
-**The whole series have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.**
+<!-- **The whole series have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.** -->
## Introduction
@@ -30,7 +30,7 @@ with a colorful design. It mainly consists of two parts.
Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
typesetting, and also use more beautiful fonts.
-### How to get these files
+<!-- ### How to get these files
You can get the `.sty` and `.cls` files mentioned above simply by compiling
`colorist.ins`:
```
@@ -39,7 +39,7 @@ latex colorist.ins
To get the `.tex` source files of the documentation, compile `colorist-doc.ins`:
```
latex colorist-doc.ins
-```
+``` -->
## Features
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 72929ae916..c361d0847f 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -2,7 +2,7 @@
%% This is file `colorist/colorart.cls',
%% generated with the docstrip utility.
%%
-%% Copyright (C) 2021-2022 by Jinwen XU
+%% Copyright (C) 2021-2023 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorart}
- {2022/09/03} {}
+ {2023/01/02} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -34,21 +34,24 @@
, draft .initial:n = { false }
, fast .bool_set:N = \l__colorclass_fast_bool
+ , print .bool_set:N = \l__colorclass_print_mode_bool
+ , print .initial:n = { false }
+ , print mode .bool_set:N = \l__colorclass_print_mode_bool
+ , print~mode .bool_set:N = \l__colorclass_print_mode_bool
+ , print-mode .bool_set:N = \l__colorclass_print_mode_bool
+ , print version .bool_set:N = \l__colorclass_print_mode_bool
+ , print~version .bool_set:N = \l__colorclass_print_mode_bool
+ , print-version .bool_set:N = \l__colorclass_print_mode_bool
+
, load custom font file .code:n = {
\bool_set_true:N \l__colorclass_load_custom_font_file_bool
\str_set:Nn \l__colorclass_custom_font_file_str { #1 }
}
, load custom font file .default:n = { colorist.font }
- , load~custom~font~file .code:n = {
- \bool_set_true:N \l__colorclass_load_custom_font_file_bool
- \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
- }
+ , load~custom~font~file .meta:n = { load custom font file = { #1 } }
, load~custom~font~file .default:n = { colorist.font }
- , load-custom-font-file .code:n = {
- \bool_set_true:N \l__colorclass_load_custom_font_file_bool
- \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
- }
+ , load-custom-font-file .meta:n = { load custom font file = { #1 } }
, load-custom-font-file .default:n = { colorist.font }
@@ -68,6 +71,19 @@
\LoadClass{\l__colorclass_base_class_tl}
+\NewDocumentCommand \IfPrintModeTF { m m }
+ {
+ \bool_if:NTF \l__colorclass_print_mode_bool { #1 } { #2 }
+ }
+\NewDocumentCommand \IfPrintModeT { m }
+ {
+ \bool_if:NT \l__colorclass_print_mode_bool { #1 }
+ }
+\NewDocumentCommand \IfPrintModeF { m }
+ {
+ \bool_if:NF \l__colorclass_print_mode_bool { #1 }
+ }
+
%%================================
%% Page layout
%%================================
@@ -165,6 +181,7 @@
{
\setsansfont { texgyreheros }
[
+ Extension = .otf ,
Scale = MatchUppercase ,
UprightFont = *-regular ,
BoldFont = *-bold ,
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 26c988c87a..2fb2ee3445 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -2,7 +2,7 @@
%% This is file `colorist/colorbook.cls',
%% generated with the docstrip utility.
%%
-%% Copyright (C) 2021-2022 by Jinwen XU
+%% Copyright (C) 2021-2023 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorbook}
- {2022/09/03} {}
+ {2023/01/02} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -34,21 +34,24 @@
, draft .initial:n = { false }
, fast .bool_set:N = \l__colorclass_fast_bool
+ , print .bool_set:N = \l__colorclass_print_mode_bool
+ , print .initial:n = { false }
+ , print mode .bool_set:N = \l__colorclass_print_mode_bool
+ , print~mode .bool_set:N = \l__colorclass_print_mode_bool
+ , print-mode .bool_set:N = \l__colorclass_print_mode_bool
+ , print version .bool_set:N = \l__colorclass_print_mode_bool
+ , print~version .bool_set:N = \l__colorclass_print_mode_bool
+ , print-version .bool_set:N = \l__colorclass_print_mode_bool
+
, load custom font file .code:n = {
\bool_set_true:N \l__colorclass_load_custom_font_file_bool
\str_set:Nn \l__colorclass_custom_font_file_str { #1 }
}
, load custom font file .default:n = { colorist.font }
- , load~custom~font~file .code:n = {
- \bool_set_true:N \l__colorclass_load_custom_font_file_bool
- \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
- }
+ , load~custom~font~file .meta:n = { load custom font file = { #1 } }
, load~custom~font~file .default:n = { colorist.font }
- , load-custom-font-file .code:n = {
- \bool_set_true:N \l__colorclass_load_custom_font_file_bool
- \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
- }
+ , load-custom-font-file .meta:n = { load custom font file = { #1 } }
, load-custom-font-file .default:n = { colorist.font }
@@ -68,6 +71,19 @@
\LoadClass{\l__colorclass_base_class_tl}
+\NewDocumentCommand \IfPrintModeTF { m m }
+ {
+ \bool_if:NTF \l__colorclass_print_mode_bool { #1 } { #2 }
+ }
+\NewDocumentCommand \IfPrintModeT { m }
+ {
+ \bool_if:NT \l__colorclass_print_mode_bool { #1 }
+ }
+\NewDocumentCommand \IfPrintModeF { m }
+ {
+ \bool_if:NF \l__colorclass_print_mode_bool { #1 }
+ }
+
%%================================
%% Page layout
%%================================
@@ -165,6 +181,7 @@
{
\setsansfont { texgyreheros }
[
+ Extension = .otf ,
Scale = MatchUppercase ,
UprightFont = *-regular ,
BoldFont = *-bold ,
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
deleted file mode 100644
index e1239399aa..0000000000
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
deleted file mode 100644
index a6b2ab9788..0000000000
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ /dev/null
@@ -1,625 +0,0 @@
-\documentclass[title in boldface, title in scshape, simple name]{colorart}
-
-%%================================
-%% Import toolkit
-%%================================
-\usepackage{ProjLib}
-\usepackage{longtable} % breakable tables
-\usepackage{hologo} % more TeX logo
-\usetikzlibrary{calc}
-
-\usepackage{blindtext}
-
-\UseLanguage{English}
-
-%%================================
-%% For typesetting code
-%%================================
-\usepackage{listings}
-\usepackage{xcolor}
-\usepackage{setspace}
-\definecolor{code-main}{RGB}{70,130,180}
-\definecolor{code-expl3}{RGB}{240,50,60}
-\definecolor{code-option}{RGB}{40,110,20}
-\definecolor{code-keys}{RGB}{100,130,150}
-\definecolor{code-comment}{RGB}{20,120,80}
-\definecolor{code-background}{gray}{0.99}
-\lstset{
- language = [LaTeX]TeX,
- basicstyle = \ttfamily,
- keywordstyle = \color{code-main},
- commentstyle = \color{code-comment},
- showstringspaces = false,
- breaklines = true,
- frame = lines,
- backgroundcolor = \color{code-background},
- flexiblecolumns = true,
- escapeinside = {(*}{*)},
- alsoletter = {_,:},
- % numbers = left,
- % firstnumber = last,
- numberstyle = \scriptsize\ttfamily,
- stepnumber = 1,
- numbersep = 5pt,
-}
-\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{% LaTeX2 commands
- classoffset = 0,
- texcsstyle =* \color{code-main},
- moretexcs =
- {
- linenumbers,nolinenumbers,
- part,parttext,chapter,section,subsection,subsubsection,
- frontmatter,mainmatter,backmatter,
- tableofcontents,
- href,
- color,
- NameTheorem,CreateTheorem,
- cref,
- ProjLib,
- DNF,
- UseLanguage,UseOtherLanguage,AddLanguageSetting,
- maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,
- qedhere,
- }
-}
-\lstset{% LaTeX3 commands
- classoffset = 1,
- texcsstyle =* \color{code-expl3},
- moretexcs =
- {
- }
-}
-\lstnewenvironment{code}{\setstretch{1.05}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
-\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
-
-\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}}
-\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
-\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
-
-%%================================
-%% tip
-%%================================
-\usepackage[many]{tcolorbox}
-\newenvironment{tip}[1][Tip]{%
- \begin{tcolorbox}[breakable,
- enhanced,
- width = \textwidth,
- colback = paper, colbacktitle = paper,
- colframe = gray!50, boxrule=0.2mm,
- coltitle = black,
- fonttitle = \sffamily,
- attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
- boxed title style = {boxrule=0pt, colframe=paper},
- before skip = 0.3cm,
- after skip = 0.3cm,
- top = 3mm,
- bottom = 3mm,
- title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}}
-
-%%================================
-%% Names
-%%================================
-\providecommand{\colorist}{\textsf{colorist}}
-\providecommand{\colorart}{\textsf{colorart}}
-\providecommand{\colorbook}{\textsf{colorbook}}
-\providecommand{\lebhart}{\textsf{lebhart}}
-\providecommand{\beaulivre}{\textsf{beaulivre}}
-
-%%================================
-%% Titles
-%%================================
-\let\LevelOneTitle\section
-\let\LevelTwoTitle\subsection
-\let\LevelThreeTitle\subsubsection
-
-%%================================
-%% Main text
-%%================================
-\begin{document}
-
-\def\PackageVersion{2022/09/03}
-
-\title{{\normalfont\bfseries\color{main-text}\colorist{}}\\write your articles or books in a colorful way}
-\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} \PackageVersion}}
-\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
-
-\maketitle
-
-\begin{abstract}
- \colorist{} is a series of styles and classes for you to typeset your articles or books in a colorful manner. The original intention in designing this series was to write drafts and notes that look colorful yet not dazzling. With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication.
-
- Finally, this documentation is typeset using the \colorart{} class (with the option \classoption{use boldface}). You can think of it as a short introduction and demonstration.
-\end{abstract}
-
-
-\begin{tip}
- This documentation has not been fully up-to-date with the new \texttt{expl3} version of this class series. Some options or commands introduced here might be obsolete.
-\end{tip}
-
-\setcounter{tocdepth}{2}
-\tableofcontents
-
-
-\medskip
-\LevelOneTitle*{Before you start}
-\addcontentsline{toc}{section}{Before you start}
-In order to use the package or classes described here, you need to:
-\begin{itemize}
- \item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
- \item download and install the required fonts if needed.
- \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
-\end{itemize}
-
-\LevelOneTitle{Introduction}
-
-\colorist{} is a series of styles and classes for you to typeset your articles or books in a colorful manner. The original intention in designing this series was to write drafts and notes that look colorful yet not dazzling.
-
-The entire collection includes \verb|colorist.sty|, which is the main style shared by all of the following classes; \verb|colorart.cls| for typesetting articles and \verb|colorbook.cls| for typesetting books. They compile with any major \TeX{} engine, with native support to English, French, German, Italian, Portuguese (European and Brazilian) and Spanish typesetting via \lstinline|\UseLanguage| (see the instruction below for detail).
-
-You can also found \lebhart{} and \beaulivre{} on CTAN. They are the enhanced version of \colorart{} and \colorbook{} with unicode support. With this, they can access to more beautiful fonts, and additionally have native support for Chinese, Japanese and Russian typesetting. On the other hand, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX} (not \hologo{pdfLaTeX}).
-
-With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities such as draft marks, enhanced author information block, mathematical symbols and shortcuts, etc. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication. For more detailed information, you can refer to the documentation of \ProjLib{} by running \lstinline|texdoc projlib| in the command line.
-
-\LevelOneTitle{Usage and examples}
-
-\LevelTwoTitle{How to load it}
-You can directly use \colorart{} or \colorbook{} as your document class. In this way, you can directly begin writing your document, without having to worry about the configurations.
-
-\begin{code}
-\documentclass{colorart} (*{\normalfont or}*) \documentclass{colorbook}
-\end{code}
-
-\begin{tip}
- You may wish to use \lebhart{} or \beaulivre{} instead, which should produce better result. All the examples later using \colorart{} or \colorbook{} can be adopted to \lebhart{} and \beaulivre{} respectively, without further modification.
-\end{tip}
-
-You can also use the default classes \textsf{article} or \textsf{book}, and load the \colorist{} package. This way, only the basic styles are set, and you can thus use your preferred fonts and page layout. All the features mentioned in this article are provided.
-
-\begin{code}
-\documentclass{article} (*{\normalfont or}*) \documentclass{book}
-\usepackage{colorist}
-\end{code}
-
-\LevelTwoTitle{Example - \colorart}
-
-Let's first look at a complete example of \colorart{} (the same works for \lebhart{}).
-
-\begin{code*}
-\documentclass{colorart}
-\usepackage{ProjLib}
-
-\UseLanguage{French}
-
-\begin{document}
-
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)}
-\date{\TheDate{2022-04-01}}
-
-\maketitle
-
-\begin{abstract}
- Ceci est un résumé. \DNF<(*\meta{some hint}*)>
-\end{abstract}
-\begin{keyword}
- AAA, BBB, CCC, DDD, EEE
-\end{keyword}
-
-\section{Un théorème}
-
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-Référence du théorème: \cref{thm:abc}
-
-\end{document}
-\end{code*}
-
-
-If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
-
-\LevelThreeTitle{Initialization}
-
-\begin{code}
-\documentclass{colorart}
-\usepackage{ProjLib}
-\end{code}
-
-Initialization is straightforward. The first line loads the document class \colorart{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
-
-\LevelThreeTitle{Set the language}
-
-\begin{code}
-\UseLanguage{French}
-\end{code}
-
-This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian%
-\footnote{The language Simplified Chinese, Traditional Chinese, Japanese and Russian requires Unicode support, thus the classes \lebhart{} or \beaulivre{}.}%
-.%
-
-For detailed description of this command and more related commands, please refer to the section on the multi-language support.
-
-\LevelThreeTitle{Title, author information, abstract and keywords}
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)}
-\date{\TheDate{2022-04-01}}
-\maketitle
-
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-\begin{keyword}
- (*\meta{keywords}*)
-\end{keyword}
-\end{code}
-
-This part begins with the title and author information block. The example shows the basic usage, but in fact, you can also write:
-
-\begin{code}
-\author{(*\meta{author 1}*)}
-\address{(*\meta{address 1}*)}
-\email{(*\meta{email 1}*)}
-\author{(*\meta{author 2}*)}
-\address{(*\meta{address 2}*)}
-\email{(*\meta{email 2}*)}
-...
-\end{code}
-
-In addition, you may also write in the \AmS{} fashion, i.e.:
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author 1}*)}
-\address{(*\meta{address 1}*)}
-\email{(*\meta{email 1}*)}
-\author{(*\meta{author 2}*)}
-\address{(*\meta{address 2}*)}
-\email{(*\meta{email 2}*)}
-\date{\TheDate{2022-04-01}}
-\subjclass{*****}
-\keywords{(*\meta{keywords}*)}
-
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-
-\maketitle
-\end{code}
-
-\LevelThreeTitle{Draft marks}
-
-\begin{code}
-\DNF<(*\meta{some hint}*)>
-\end{code}
-
-When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
-
-\LevelThreeTitle{Theorem-like environments}
-
-\begin{code}
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-Référence du théorème: \cref{thm:abc}
-\end{code}
-
-Commonly used theorem-like environments have been pre-defined. Also, when referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}} --- in this way, there is no need to explicitly write down the name of the corresponding environment every time.
-
-\begin{tip}
-If you wish to switch to the standard class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{article}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino,amsfashion]{ProjLib}
-\end{code}
-
-or to use the \AmS{} class:
-
-\begin{code}
-\documentclass{amsart}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib}
-\end{code}
-
-\end{tip}
-
-
-\vspace{1.5\baselineskip}
-\LevelTwoTitle{Example - \colorbook}
-
-Now let's look at an example of \colorbook{} (the same works for \beaulivre{}).
-
-\begin{code*}
-\documentclass{colorbook}
-\usepackage{ProjLib}
-
-\UseLanguage{French}
-
-\begin{document}
-
-\frontmatter
-
-\begin{titlepage}
- (*\meta{code for titlepage}*)
-\end{titlepage}
-
-\tableofcontents
-
-\mainmatter
-
-\part{(*\meta{part title}*)}
-\parttext{(*\meta{text after part title}*)}
-
-\chapter{(*\meta{chapter title}*)}
-
-\section{(*\meta{section title}*)}
-
-...
-
-\backmatter
-
-...
-
-\end{document}
-\end{code*}
-
-There is no much differences with \colorart{}, only that the title and author information should be typeset within the \texttt{titlepage} environment. Currently no default titlepage style is given, since the design of the title page is a highly personalized thing, and it is difficult to achieve a result that satisfies everyone.
-
-\bigskip
-In the next section, we will go through the options available.
-
-
-% \clearpage
-\LevelOneTitle{The options}
-
-\colorist{} offers the following options:
-
-\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
- \item The language options \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
- \begin{itemize}
- \item For the option names of a specific language, please refer to \meta{language name} in the next section. The first specified language will be used as the default language.
- \item The language options are optional, mainly for increasing the compilation speed. Without them the result would be the same, only slower.
- \end{itemize}
- \item \classoption{draft} or \classoption{fast}
- \begin{itemize}
- \item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
- \begin{itemize}
- \item Use simpler math font configuration;
- \item Do not use \textsf{hyperref};
- \item Enable the fast mode of \ProjLib{} toolkit.
- \end{itemize}
- \end{itemize}
- \begin{tip}
- During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
- \end{tip}
- \item \classoption{use boldface}
- \begin{itemize}
- \item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
- \end{itemize}
- \item \classoption{runin}
- \begin{itemize}
- \item Use the ``runin'' style for \lstinline|\subsubsection|
- \end{itemize}
- \item \classoption{nothms}
- \begin{itemize}
- \item Pure text mode. Do not load theorem-like environments.
- \end{itemize}
- \item \classoption{nothmnum}, \classoption{thmnum} or \classoption{thmnum=}\meta{counter}
- \begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
- \end{itemize}
- \item \classoption{regionalref}, \classoption{originalref}
- \begin{itemize}
- \item When referencing, whether the name of the theorem-like environment changes with the current language. The default is \classoption{regionalref}, \emph{i.e.}, the name corresponding to the current language is used; for example, when referencing a theorem-like environment in English context, the names "Theorem, Definition..." will be used no matter which language context the original environment is in. If \classoption{originalref} is enabled, then the name will always remain the same as the original place; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''.
- \item In \classoption{fast} mode, the option \classoption{originalref} will have no effect.
- \end{itemize}
-\end{itemize}
-
-Additionally, \colorart{} and \colorbook{} offers the following options:
-\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
- \item \classoption{a4paper} or \classoption{b5paper}
- \begin{itemize}
- \item Optional paper size. The default paper size is 8.5in $\times$ 11in.
- \end{itemize}
- \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
- \begin{itemize}
- \item Font options. As the name suggest, font with corresponding name will be loaded.
- \item The \classoption{useosf} option is used to enable the old-style figures.
- \end{itemize}
-\end{itemize}
-
-\LevelOneTitle{Instructions by topic}
-
-\LevelTwoTitle{Language configuration}
-
-\colorart{} has multi-language support, including English, French, German, Italian, Portuguese (European and Brazilian) and Spanish. The language can be selected by the following macros:
-
-\begin{itemize}
- \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding setting of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English'' is selected by default.
- \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, which uses the specified language settings to typeset \meta{content}. Compared with \lstinline|\UseLanguage|, it will not modify the line spacing, so line spacing would remain stable when CJK and Western texts are mixed.
-\end{itemize}
-
-\meta{language name} can be (it is not case sensitive, for example, \texttt{French} and \texttt{french} have the same effect):
-\begin{itemize}
- \item Simplified Chinese: \texttt{CN}, \texttt{Chinese}, \texttt{SChinese} or \texttt{SimplifiedChinese}
- \item Traditional Chinese: \texttt{TC}, \texttt{TChinese} or \texttt{TraditionalChinese}
- \item English: \texttt{EN} or \texttt{English}
- \item French: \texttt{FR} or \texttt{French}
- \item German: \texttt{DE}, \texttt{German} or \texttt{ngerman}
- \item Italian: \texttt{IT} or \texttt{Italian}
- \item Portuguese: \texttt{PT} or \texttt{Portuguese}
- \item Portuguese (Brazilian): \texttt{BR} or \texttt{Brazilian}
- \item Spanish: \texttt{ES} or \texttt{Spanish}
- \item Japanese: \texttt{JP} or \texttt{Japanese}
- \item Russian: \texttt{RU} or \texttt{Russian}
-\end{itemize}
-
-\medskip
-In addition, you can also add new settings to selected language:
-\begin{itemize}
- \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
- \begin{itemize}
- \item Add \meta{settings} to all supported languages.
- \end{itemize}
- \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
- \begin{itemize}
- \item Add \meta{settings} to the selected language \meta{language name}.
- \end{itemize}
-\end{itemize}
-For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).
-
-\LevelTwoTitle{Theorems and how to reference them}
-
-Environments such as \texttt{definition} and \texttt{theorem} have been preset and can be used directly.
-
-More specifically, preset environments include:
-\texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode.
-
-When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
-
-\begin{tip}[Example]
-\begin{code}
-\begin{definition}[Strange things] \label{def: strange} ...
-\end{code}
-
-will produce
-\begin{definition}[Strange things]\label{def: strange}
- This is the definition of some strange objects. There is approximately a one-line spacing before and after the theorem environment, and there will be a symbol to mark the end of the environment.
-\end{definition}
-
-\lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
-
-After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
-
-\UseLanguage{French}
-\begin{theorem}[Inutile]\label{thm}
- Un théorème en français.
-\end{theorem}
-
-By default, when referenced, the name of the theorem matches the current context. For example, the definition above will be displayed in French in the current French context: \cref{def: strange,thm}. If you want the name of the theorem to always match the language of the context in which the theorem is located, you can add \texttt{originalref} to the global options.
-\end{tip}
-
-\UseLanguage{English}
-
-The following are the main styles of theorem-like environments:
-\begin{theorem}
- Theorem style: theorem, proposition, lemma, corollary, ...
-\end{theorem}
-
-\begin{proof}
- Proof style
-\end{proof}
-
-\begin{remark}
- Remark style
-\end{remark}
-
-\begin{conjecture}
- Conjecture style
-\end{conjecture}
-
-\begin{example*}
- Example style: example, fact, ...
-\end{example*}
-
-\begin{problem}
- Problem style: problem, question, ...
-\end{problem}
-
-\medskip
-For aesthetics, adjacent definitions will be connected together automatically:
-\begin{definition}
- First definition.
-\end{definition}
-
-\begin{definition}
- Second definition.
-\end{definition}
-
-\begin{tip}
- Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
-\end{tip}
-
-\LevelTwoTitle{Draft mark}
-
-You can use \lstinline|\DNF| to mark the unfinished part. For example:
-\begin{itemize}
- \item \lstinline|\DNF| or \lstinline|\DNF<...>|. The effect is: \DNF~ or \DNF<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\DNF} in French mode.
-\end{itemize}
-
-\LevelTwoTitle{Title, abstract and keywords}
-
-\colorart{} has both the features of standard classes and that of the \AmS{} classes.
-
-Therefore, the title part can either be written in the usual way, in accordance with the standard class \textsf{article}:
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)\thanks{(*\meta{text}*)}}
-\date{(*\meta{date}*)}
-\maketitle
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-\begin{keyword}
- (*\meta{keywords}*)
-\end{keyword}
-\end{code}
-
-or written in the way of \AmS{} classes:
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)}
-\thanks{(*\meta{text}*)}
-\address{(*\meta{address}*)}
-\email{(*\meta{email}*)}
-\date{(*\meta{date}*)}
-\keywords{(*\meta{keywords}*)}
-\subjclass{(*\meta{subjclass}*)}
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-\maketitle
-\end{code}
-
-The author information can contain multiple groups, written as:
-
-\begin{code}
-\author{(*\meta{author 1}*)}
-\address{(*\meta{address 1}*)}
-\email{(*\meta{email 1}*)}
-\author{(*\meta{author 2}*)}
-\address{(*\meta{address 2}*)}
-\email{(*\meta{email 2}*)}
-...
-\end{code}
-
-Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-
-\bigskip
-% \clearpage
-\LevelOneTitle{Known issues}
-
-\begin{itemize}
- \item The font settings are still not perfect.
- \item The TOC design does not look very nice.
- \item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
- \item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
- \item There are still many things that can be optimized in the code.
-\end{itemize}
-
-
-\end{document}
-\endinput
-%%
-%% End of file `colorist/colorist-doc.tex'.
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty
index 409bb5b7c9..e5a3dd8a3c 100644
--- a/macros/latex/contrib/colorist/colorist-fancy.sty
+++ b/macros/latex/contrib/colorist/colorist-fancy.sty
@@ -2,7 +2,7 @@
%% This is file `colorist/colorist-fancy.sty',
%% generated with the docstrip utility.
%%
-%% Copyright (C) 2021-2022 by Jinwen XU
+%% Copyright (C) 2021-2023 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist-fancy}
- {2022/09/03} {}
+ {2023/01/02} {}
{The fancy style of colorist}
\IfPackageLoadedTF { colorist } {}
@@ -216,6 +216,21 @@
\fi
}
+\renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+
+\bool_if:NT \l__colorist_is_book_bool
+ {
+ \hook_gput_code:nnn { cmd/frontmatter/before } { colorist }
+ {
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\fnsymbol{footnote}}}
+ }
+ \hook_gput_code:nnn { cmd/mainmatter/before } { colorist }
+ {
+ \setcounter{footnote}{0}
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+ }
+ }
+
%%================================
%% Title format
%%================================
@@ -503,7 +518,7 @@
\projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext
{
, EN = This~page~is~intentionally~left~blank
- , FR = Cette~page~a~été~intentionellement~laissée~vide
+ , FR = Cette~page~est~intentionnellement~laissée~vide
, DE = Diese~Seite~wurde~absichtlich~leer~gelassen
, IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente
, PT = Esta~página~foi~intencionalmente~deixada~em~branco
@@ -616,6 +631,14 @@ heading_suffix "}\n"
\hspace*{20\p@}
}
+\hook_gput_code:nnn { begindocument/before } { colorist }
+ {
+ \bool_if:NF \l__colorist_fast_bool
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { colorist } { \bookmarksetup{startatroot} }
+ }
+ }
+
%%================================
%% Draft mark
%%================================
@@ -697,7 +720,7 @@ heading_suffix "}\n"
}
\newcommand{\customqedsymbol}{
- \makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
+ \makebox[1em]{\color{.!27!paper}\rule[-0.1em]{.95em}{.95em}}}
\let\qedsymbol\customqedsymbol
\bool_if:NTF \l__colorist_theorem_in_new_line_bool
@@ -742,10 +765,8 @@ heading_suffix "}\n"
\bool_if:NTF \l__colorist_fast_bool
{
- \providecommand{\phantomsection}{}
- \RequirePackage { url }
- \providecommand{\href}[2]{#2}
- \providecommand{\texorpdfstring}[2]{#1}
+ \RequirePackage { hyperref }
+ \hypersetup { draft }
}
{
\RequirePackage { hyperref }
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 4bbe5b57ec..089a20b458 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -2,7 +2,7 @@
%% This is file `colorist/colorist.sty',
%% generated with the docstrip utility.
%%
-%% Copyright (C) 2021-2022 by Jinwen XU
+%% Copyright (C) 2021-2023 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist}
- {2022/09/03} {}
+ {2023/01/02} {}
{A colorful style for articles and books}
\keys_define:nn { colorist }
diff --git a/macros/latex/contrib/minimalist/README.md b/macros/latex/contrib/minimalist/README.md
index f22ee11664..3c4ecee278 100644
--- a/macros/latex/contrib/minimalist/README.md
+++ b/macros/latex/contrib/minimalist/README.md
@@ -1,8 +1,8 @@
<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# `minimalist` bundle: write you documents in a simple and clear way
-
-**The whole series have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.**
+<!--
+**The whole series have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.** -->
## Introduction
@@ -13,6 +13,8 @@ with a simple and clear design. It mainly consists of two parts.
- `minimalist.sty` : interface of the main style
- `minimalist-plain.sty` : the plain style
- `minimalist-classical.sty` : the classical style
+ - `minimalist-stream.sty` : the stream style
+ - `minimalist-flow.sty` : the flow style
- `minimart.cls` : class for typesetting articles
- `minimbook.cls` : class for typesetting books
@@ -31,7 +33,7 @@ with a simple and clear design. It mainly consists of two parts.
Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
typesetting, and also use more beautiful fonts.
-### How to get these files
+<!-- ### How to get these files
You can get the `.sty` and `.cls` files mentioned above simply by compiling
`minimalist.ins`:
```
@@ -41,7 +43,7 @@ To get the `.tex` source files of the documentation, compile
`minimalist-doc.ins`:
```
latex minimalist-doc.ins
-```
+``` -->
## Features
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index d52f7f51f5..513c8e7f55 100644
--- a/macros/latex/contrib/minimalist/minimalist-classical.sty
+++ b/macros/latex/contrib/minimalist/minimalist-classical.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-classical}
- {2022/09/03} {}
+ {2023/01/02} {}
{The classical style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -269,6 +269,21 @@
\fi
}
+\renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+
+\bool_if:NT \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { cmd/frontmatter/before } { minimalist }
+ {
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\fnsymbol{footnote}}}
+ }
+ \hook_gput_code:nnn { cmd/mainmatter/before } { minimalist }
+ {
+ \setcounter{footnote}{0}
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+ }
+ }
+
%%================================
%% Title format
%%================================
@@ -276,28 +291,13 @@
\PassOptionsToPackage { normalem } { ulem }
\RequirePackage { ulem }
+\cs_new:Nn \minimalist_title_numbering_apply_font:n { { \usefont{U}{zeur}{b}{n} #1 } }
+
\cs_new_protected:Nn \minimalist_apply_title_numbering_style_static:n
{
#1
}
-\cs_new_protected:Nn \minimalist_apply_title_numbering_style:n
- {
- \group_begin:
- \tl_set:Nx \l_tmpa_tl { #1 }
- \regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
- \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
- \exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
- \int_case:nn { \l_tmpa_int }
- {
- { 0 } { \textcolor { main-text!24!paper } }
- { 1 } { \textcolor { main-text!39!paper } }
- { 2 } { \textcolor { main-text!39!paper } }
- { 3 } { \smaller[2] \textcolor { main-text!24!paper } }
- }
- \l_tmpa_tl
- \group_end:
- }
\newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
@@ -572,7 +572,7 @@
\projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext
{
, EN = This~page~is~intentionally~left~blank
- , FR = Cette~page~a~été~intentionellement~laissée~vide
+ , FR = Cette~page~est~intentionnellement~laissée~vide
, DE = Diese~Seite~wurde~absichtlich~leer~gelassen
, IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente
, PT = Esta~página~foi~intencionalmente~deixada~em~branco
@@ -636,9 +636,9 @@ heading_suffix "}\n"
}
\newcommand*{\IndexLinebreak}
{
- \nobreakspace\textcolor{main-text!50!paper}{\raisebox{.25ex}{.}\raisebox{.05ex}{.}}
+ \nobreakspace\textcolor{main-text!45!paper}{\raisebox{.4ex}{.}\raisebox{.2ex}{.}}
\item\hspace*{\hangindent}
- \textcolor{main-text!50!paper}{\raisebox{.35ex}{.}\raisebox{.15ex}{.}}\,
+ \textcolor{main-text!45!paper}{\raisebox{.45ex}{.}\raisebox{.25ex}{.}}\:
\unskip
}
@@ -678,6 +678,10 @@ heading_suffix "}\n"
\hook_gput_code:nnn { begindocument/before } { minimalist }
{
+ \bool_if:NF \l__minimalist_fast_bool
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \bookmarksetup{startatroot} }
+ }
\hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
\hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
}
@@ -734,15 +738,13 @@ heading_suffix "}\n"
\theoremstyle{simple}
\newcommand{\customqedsymbol}{
- \makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
+ \makebox[1em]{\color{.!27!paper}\rule[-0.1em]{.95em}{.95em}}}
\let\qedsymbol\customqedsymbol
\bool_if:NTF \l__minimalist_fast_bool
{
- \providecommand{\phantomsection}{}
- \RequirePackage { url }
- \providecommand{\href}[2]{#2}
- \providecommand{\texorpdfstring}[2]{#1}
+ \RequirePackage { hyperref }
+ \hypersetup { draft }
}
{
\RequirePackage { hyperref }
@@ -1029,13 +1031,13 @@ heading_suffix "}\n"
%%================================
%% Special adjustment
%%================================
-\crefformat { chapter } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { chapter } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { chapter } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
-\crefformat { section } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { section } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { section } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
-\crefformat { subsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { subsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
-\crefformat { subsubsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsubsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { subsubsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\endinput
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
deleted file mode 100644
index 444dbbe2f2..0000000000
--- a/macros/latex/contrib/minimalist/minimalist-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.tex b/macros/latex/contrib/minimalist/minimalist-doc.tex
deleted file mode 100644
index 717e31d600..0000000000
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ /dev/null
@@ -1,619 +0,0 @@
-\documentclass[classical, simple name]{minimart}
-
-\linenumbers % Enable line numbers
-
-%%================================
-%% Import toolkit
-%%================================
-\usepackage{ProjLib}
-\usepackage{longtable} % breakable tables
-\usepackage{hologo} % more TeX logo
-
-\usepackage{blindtext}
-
-\UseLanguage{English}
-
-%%================================
-%% For typesetting code
-%%================================
-\usepackage{listings}
-\usepackage{xcolor}
-\usepackage{setspace}
-\definecolor{code-main}{RGB}{70,130,180}
-\definecolor{code-expl3}{RGB}{240,50,60}
-\definecolor{code-option}{RGB}{40,110,20}
-\definecolor{code-keys}{RGB}{100,130,150}
-\definecolor{code-comment}{RGB}{20,120,80}
-\definecolor{code-background}{gray}{0.99}
-\lstset{
- language = [LaTeX]TeX,
- basicstyle = \ttfamily,
- keywordstyle = \color{code-main},
- commentstyle = \color{code-comment},
- showstringspaces = false,
- breaklines = true,
- frame = lines,
- backgroundcolor = \color{code-background},
- flexiblecolumns = true,
- escapeinside = {(*}{*)},
- alsoletter = {_,:},
- % numbers = left,
- % firstnumber = last,
- numberstyle = \scriptsize\ttfamily,
- stepnumber = 1,
- numbersep = 5pt,
-}
-\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{% LaTeX2 commands
- classoffset = 0,
- texcsstyle =* \color{code-main},
- moretexcs =
- {
- linenumbers,nolinenumbers,
- part,parttext,chapter,section,subsection,subsubsection,
- frontmatter,mainmatter,backmatter,
- tableofcontents,
- href,
- color,
- NameTheorem,CreateTheorem,
- cref,
- ProjLib,
- DNF,
- UseLanguage,UseOtherLanguage,AddLanguageSetting,
- maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,
- qedhere,
- }
-}
-\lstset{% LaTeX3 commands
- classoffset = 1,
- texcsstyle =* \color{code-expl3},
- moretexcs =
- {
- }
-}
-\lstnewenvironment{code}{\setstretch{1.05}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
-\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
-
-\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}}
-\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
-\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
-
-%%================================
-%% tip
-%%================================
-\usepackage[many]{tcolorbox}
-\newenvironment{tip}[1][Tip]
- {%
- \LocallyStopLineNumbers%
- \begin{tcolorbox}[breakable,
- enhanced,
- width = \textwidth,
- colback = paper, colbacktitle = paper,
- colframe = gray!50, boxrule=0.2mm,
- coltitle = black,
- fonttitle = \sffamily,
- attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
- boxed title style = {boxrule=0pt, colframe=paper},
- before skip = 3mm,
- after skip = 3mm,
- top = 2.5mm,
- bottom = 1.5mm,
- title={\scshape\sffamily #1}]%
- }
- {%
- \end{tcolorbox}%
- \ResumeLineNumbers%
- }
-
-%%================================
-%% Names
-%%================================
-\providecommand{\minimalist}{\textsf{minimalist}}
-\providecommand{\minimart}{\textsf{minimart}}
-\providecommand{\minimbook}{\textsf{minimbook}}
-\providecommand{\einfart}{\textsf{einfart}}
-\providecommand{\simplivre}{\textsf{simplivre}}
-
-%%================================
-%% Titles
-%%================================
-\let\LevelOneTitle\section
-\let\LevelTwoTitle\subsection
-\let\LevelThreeTitle\subsubsection
-
-%%================================
-%% Main text
-%%================================
-\begin{document}
-
-\def\PackageVersion{2022/09/03}
-
-\title{\minimalist{}, write your articles or books in a simple and clear way}
-\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\minimalist{} \PackageVersion}}
-\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
-
-\maketitle
-
-\begin{abstract}
- \minimalist{} is a series of styles and classes for you to typeset your articles or books in a simple and clear manner. The original intention in designing this series was to write drafts and notes that look simple yet not shabby. With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication.
-
- Finally, this documentation is typeset using the \minimart{} class (with the option \classoption{classical}). You can think of it as a short introduction and demonstration.
-\end{abstract}
-
-
-\setcounter{tocdepth}{2}
-\tableofcontents
-
-
-\medskip
-\LevelOneTitle*{Before you start}
-\addcontentsline{toc}{section}{Before you start}
-In order to use the package or classes described here, you need to:
-\begin{itemize}
- \item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{minimalist} and \texttt{projlib} are correctly installed in your \TeX{} system.
- \item download and install the required fonts if needed.
- \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
-\end{itemize}
-
-\LevelOneTitle{Introduction}
-
-\minimalist{} is a series of styles and classes for you to typeset your articles or books in a simple and clear manner. The original intention in designing this series was to write drafts and notes that look simple yet not shabby.
-
-The entire collection includes \verb|minimalist.sty|, which is the main style shared by all of the following classes; \verb|minimart.cls| for typesetting articles and \verb|minimbook.cls| for typesetting books. They compile with any major \TeX{} engine, with native support to English, French, German, Italian, Portuguese (European and Brazilian) and Spanish typesetting via \lstinline|\UseLanguage| (see the instruction below for detail).
-
-You can also found \einfart{} and \simplivre{} on CTAN. They are the enhanced version of \minimart{} and \minimbook{} with unicode support. With this, they can access to more beautiful fonts, and additionally have native support for Chinese, Japanese and Russian typesetting. On the other hand, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX} (not \hologo{pdfLaTeX}).
-
-With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities such as draft marks, enhanced author information block, mathematical symbols and shortcuts, etc. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication. For more detailed information, you can refer to the documentation of \ProjLib{} by running \lstinline|texdoc projlib| in the command line.
-
-\LevelOneTitle{Usage and examples}
-
-\LevelTwoTitle{How to load it}
-You can directly use \minimart{} or \minimbook{} as your document class. In this way, you can directly begin writing your document, without having to worry about the configurations.
-
-\begin{code}
-\documentclass{minimart} (*{\normalfont or}*) \documentclass{minimbook}
-\end{code}
-
-\begin{tip}
- You may wish to use \einfart{} or \simplivre{} instead, which should produce better result. All the examples later using \minimart{} or \minimbook{} can be adopted to \einfart{} and \simplivre{} respectively, without further modification.
-\end{tip}
-
-You can also use the default classes \textsf{article} or \textsf{book}, and load the \minimalist{} package. This way, only the basic styles are set, and you can thus use your preferred fonts and page layout. All the features mentioned in this article are provided.
-
-\begin{code}
-\documentclass{article} (*{\normalfont or}*) \documentclass{book}
-\usepackage{minimalist}
-\end{code}
-
-\LevelTwoTitle{Example - \minimart}
-
-Let's first look at a complete example of \minimart{} (the same works for \einfart{}).
-
-\begin{code*}
-\documentclass{minimart}
-\usepackage{ProjLib}
-
-\UseLanguage{French}
-
-\begin{document}
-
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)}
-\date{\TheDate{2022-04-01}}
-
-\maketitle
-
-\begin{abstract}
- Ceci est un résumé. \DNF<(*\meta{some hint}*)>
-\end{abstract}
-\begin{keyword}
- AAA, BBB, CCC, DDD, EEE
-\end{keyword}
-
-\section{Un théorème}
-
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-Référence du théorème: \cref{thm:abc}
-
-\end{document}
-\end{code*}
-
-
-If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
-
-\medskip
-\LevelThreeTitle{Initialization}
-
-\medskip
-\begin{code}
-\documentclass{minimart}
-\usepackage{ProjLib}
-\end{code}
-
-Initialization is straightforward. The first line loads the document class \minimart{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
-
-\LevelThreeTitle{Set the language}
-
-\medskip
-\begin{code}
-\UseLanguage{French}
-\end{code}
-
-This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian%
-\footnote{The language Simplified Chinese, Traditional Chinese, Japanese and Russian requires Unicode support, thus the classes \einfart{} or \simplivre{}.}%
-.%
-
-For detailed description of this command and more related commands, please refer to the section on the multi-language support.
-
-\LevelThreeTitle{Title, author information, abstract and keywords}
-
-\medskip
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)}
-\date{\TheDate{2022-04-01}}
-\maketitle
-
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-\begin{keyword}
- (*\meta{keywords}*)
-\end{keyword}
-\end{code}
-
-This part begins with the title and author information block. The example shows the basic usage, but in fact, you can also write:
-
-\begin{code}
-\author{(*\meta{author 1}*)}
-\address{(*\meta{address 1}*)}
-\email{(*\meta{email 1}*)}
-\author{(*\meta{author 2}*)}
-\address{(*\meta{address 2}*)}
-\email{(*\meta{email 2}*)}
-...
-\end{code}
-
-In addition, you may also write in the \AmS{} fashion, i.e.:
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author 1}*)}
-\address{(*\meta{address 1}*)}
-\email{(*\meta{email 1}*)}
-\author{(*\meta{author 2}*)}
-\address{(*\meta{address 2}*)}
-\email{(*\meta{email 2}*)}
-\date{\TheDate{2022-04-01}}
-\subjclass{*****}
-\keywords{(*\meta{keywords}*)}
-
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-
-\maketitle
-\end{code}
-
-\LevelThreeTitle{Draft marks}
-
-\medskip
-\begin{code}
-\DNF<(*\meta{some hint}*)>
-\end{code}
-
-When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
-
-\LevelThreeTitle{Theorem-like environments}
-
-\medskip
-\begin{code}
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-Référence du théorème: \cref{thm:abc}
-\end{code}
-
-Commonly used theorem-like environments have been pre-defined. Also, when referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}} --- in this way, there is no need to explicitly write down the name of the corresponding environment every time.
-
-\begin{tip}
-If you wish to switch to the standard class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{article}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino,amsfashion]{ProjLib}
-\end{code}
-
-or to use the \AmS{} class:
-
-\begin{code}
-\documentclass{amsart}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib}
-\end{code}
-
-\end{tip}
-
-
-\LevelTwoTitle{Example - \minimbook}
-
-Now let's look at an example of \minimbook{} (the same works for \simplivre{}).
-
-\begin{code*}
-\documentclass{minimbook}
-\usepackage{ProjLib}
-
-\UseLanguage{French}
-
-\begin{document}
-
-\frontmatter
-
-\begin{titlepage}
- (*\meta{code for titlepage}*)
-\end{titlepage}
-
-\tableofcontents
-
-\mainmatter
-
-\part{(*\meta{part title}*)}
-\parttext{(*\meta{text after part title}*)}
-
-\chapter{(*\meta{chapter title}*)}
-
-\section{(*\meta{section title}*)}
-
-...
-
-\backmatter
-
-...
-
-\end{document}
-\end{code*}
-
-There is no much differences with \minimart{}, only that the title and author information should be typeset within the \texttt{titlepage} environment. Currently no default titlepage style is given, since the design of the title page is a highly personalized thing, and it is difficult to achieve a result that satisfies everyone.
-
-\bigskip
-In the next section, we will go through the options available.
-
-
-\LevelOneTitle{The options}
-
-\minimalist{} offers the following options:
-
-\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
- \item The language options \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
- \begin{itemize}
- \item For the option names of a specific language, please refer to \meta{language name} in the next section. The first specified language will be used as the default language.
- \item The language options are optional, mainly for increasing the compilation speed. Without them the result would be the same, only slower.
- \end{itemize}
- \item \classoption{draft} or \classoption{fast}
- \begin{itemize}
- \item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
- \begin{itemize}
- \item Use simpler math font configuration;
- \item Do not use \textsf{hyperref};
- \item Enable the fast mode of \ProjLib{} toolkit.
- \end{itemize}
- \end{itemize}
- \begin{tip}
- During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
- \end{tip}
- \item \classoption{use boldface}
- \begin{itemize}
- \item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
- \end{itemize}
- \item \classoption{classical}
- \begin{itemize}
- \item Classic mode. An antique-looking style will be used when this option is enabled, like in the current documentation.
- \end{itemize}
- \item \classoption{runin}
- \begin{itemize}
- \item Use the ``runin'' style for \lstinline|\subsubsection|
- \end{itemize}
- \item \classoption{nothms}
- \begin{itemize}
- \item Pure text mode. Do not load theorem-like environments.
- \end{itemize}
- \item \classoption{nothmnum}, \classoption{thmnum} or \classoption{thmnum=}\meta{counter}
- \begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
- \end{itemize}
- \item \classoption{regionalref}, \classoption{originalref}
- \begin{itemize}
- \item When referencing, whether the name of the theorem-like environment changes with the current language. The default is \classoption{regionalref}, \emph{i.e.}, the name corresponding to the current language is used; for example, when referencing a theorem-like environment in English context, the names "Theorem, Definition..." will be used no matter which language context the original environment is in. If \classoption{originalref} is enabled, then the name will always remain the same as the original place; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''.
- \item In \texttt{fast} mode, the option \classoption{originalref} will have no effect.
- \end{itemize}
-\end{itemize}
-
-\bigskip
-Additionally, \minimart{} and \minimbook{} offers the following options:
-\begin{itemize}
- \item \classoption{a4paper} or \classoption{b5paper}
- \begin{itemize}
- \item Optional paper size. The default paper size is 7in $\times$ 10in.
- \end{itemize}
- \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
- \begin{itemize}
- \item Font options. As the name suggest, font with corresponding name will be loaded.
- \item The \classoption{useosf} option is used to enable the old-style figures.
- \end{itemize}
- \item \classoption{useindent}
- \begin{itemize}
- \item Use paragraph indentation instead of inter-paragraph spacing.
- \end{itemize}
-\end{itemize}
-
-% \clearpage
-\LevelOneTitle{Instructions by topic}
-
-\LevelTwoTitle{Language configuration}
-
-\minimart{} has multi-language support, including English, French, German, Italian, Portuguese (European and Brazilian) and Spanish. The language can be selected by the following macros:
-
-\begin{itemize}
- \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding setting of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English'' is selected by default.
- \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, which uses the specified language settings to typeset \meta{content}. Compared with \lstinline|\UseLanguage|, it will not modify the line spacing, so line spacing would remain stable when CJK and Western texts are mixed.
-\end{itemize}
-
-\meta{language name} can be (it is not case sensitive, for example, \texttt{French} and \texttt{french} have the same effect):
-\begin{itemize}
- \item Simplified Chinese: \texttt{CN}, \texttt{Chinese}, \texttt{SChinese} or \texttt{SimplifiedChinese}
- \item Traditional Chinese: \texttt{TC}, \texttt{TChinese} or \texttt{TraditionalChinese}
- \item English: \texttt{EN} or \texttt{English}
- \item French: \texttt{FR} or \texttt{French}
- \item German: \texttt{DE}, \texttt{German} or \texttt{ngerman}
- \item Italian: \texttt{IT} or \texttt{Italian}
- \item Portuguese: \texttt{PT} or \texttt{Portuguese}
- \item Portuguese (Brazilian): \texttt{BR} or \texttt{Brazilian}
- \item Spanish: \texttt{ES} or \texttt{Spanish}
- \item Japanese: \texttt{JP} or \texttt{Japanese}
- \item Russian: \texttt{RU} or \texttt{Russian}
-\end{itemize}
-
-\medskip
-In addition, you can also add new settings to selected language:
-\begin{itemize}
- \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
- \begin{itemize}
- \item Add \meta{settings} to all supported languages.
- \end{itemize}
- \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
- \begin{itemize}
- \item Add \meta{settings} to the selected language \meta{language name}.
- \end{itemize}
-\end{itemize}
-For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).
-
-\LevelTwoTitle{Theorems and how to reference them}
-
-Environments such as \texttt{definition} and \texttt{theorem} have been preset and can be used directly.
-
-More specifically, preset environments include:
-\texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode.
-
-When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
-
-\begin{tip}[Example]
-\begin{code}
-\begin{definition}[Strange things] \label{def: strange} ...
-\end{code}
-
-will produce
-\begin{definition}[Strange things]\label{def: strange}
- This is the definition of some strange objects. There is approximately a one-line spacing before and after the theorem environment, and there will be a symbol to mark the end of the environment.
-\end{definition}
-
-\lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
-
-After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
-
-\UseLanguage{French}
-\begin{theorem}[Inutile]\label{thm}
- Un théorème en français.
-\end{theorem}
-
-By default, when referenced, the name of the theorem matches the current context. For example, the definition above will be displayed in French in the current French context: \cref{def: strange,thm}. If you want the name of the theorem to always match the language of the context in which the theorem is located, you can add \texttt{originalref} to the global options.
-\end{tip}
-
-\UseLanguage{English}
-
-\begin{tip}
- Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
-\end{tip}
-
-\LevelTwoTitle{Draft mark}
-
-You can use \lstinline|\DNF| to mark the unfinished part. For example:
-\begin{itemize}
- \item \lstinline|\DNF| or \lstinline|\DNF<...>|. The effect is: \DNF~ or \DNF<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\DNF} in French mode.
-\end{itemize}
-
-\LevelTwoTitle{Title, abstract and keywords}
-
-\minimart{} has both the features of standard classes and that of the \AmS{} classes.
-
-Therefore, the title part can either be written in the usual way, in accordance with the standard class \textsf{article}:
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)\thanks{(*\meta{text}*)}}
-\date{(*\meta{date}*)}
-\maketitle
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-\begin{keyword}
- (*\meta{keywords}*)
-\end{keyword}
-\end{code}
-
-or written in the way of \AmS{} classes:
-
-\begin{code}
-\title{(*\meta{title}*)}
-\author{(*\meta{author}*)}
-\thanks{(*\meta{text}*)}
-\address{(*\meta{address}*)}
-\email{(*\meta{email}*)}
-\date{(*\meta{date}*)}
-\keywords{(*\meta{keywords}*)}
-\subjclass{(*\meta{subjclass}*)}
-\begin{abstract}
- (*\meta{abstract}*)
-\end{abstract}
-\maketitle
-\end{code}
-
-The author information can contain multiple groups, written as:
-
-\begin{code}
-\author{(*\meta{author 1}*)}
-\address{(*\meta{address 1}*)}
-\email{(*\meta{email 1}*)}
-\author{(*\meta{author 2}*)}
-\address{(*\meta{address 2}*)}
-\email{(*\meta{email 2}*)}
-...
-\end{code}
-
-Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-
-% \clearpage
-\LevelTwoTitle{Miscellaneous}
-
-\LevelThreeTitle{On the line numbers}
-Line numbers can be turned on and off at any time. \lstinline|\linenumbers| is used to enable the line numbers, and \lstinline|\nolinenumbers| is used to disable them. For the sake of beauty, the title, table of contents, index and some other elements are not numbered.
-
-\LevelThreeTitle{On the footnotes in the title}
-In \lstinline|\section| or \lstinline|\subsection| , if you wish to add footnotes, you can only:
-\begin{itemize}
- \item first write \lstinline|\mbox{\protect\footnotemark}|,
- \item then add \lstinline|\footnotetext{...}| afterwards.
-\end{itemize}
-This is a disadvantage brought about by the underline decoration of the title.
-
-
-\LevelOneTitle{Known issues}
-
-\begin{itemize}[itemsep=.6em]
- \item The font settings are still not perfect.
- \item Since many features are based on the \ProjLib{} toolkit, \minimalist{} (and hence \minimart{}, \einfart{} and \minimbook{}, \simplivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
- \item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
- \item There are still many things that can be optimized in the code.
-\end{itemize}
-
-
-\end{document}
-\endinput
-%%
-%% End of file `minimalist/minimalist-doc.tex'.
diff --git a/macros/latex/contrib/minimalist/minimalist-flow.sty b/macros/latex/contrib/minimalist/minimalist-flow.sty
new file mode 100644
index 0000000000..f85b6c15c4
--- /dev/null
+++ b/macros/latex/contrib/minimalist/minimalist-flow.sty
@@ -0,0 +1,1042 @@
+%%
+%% This is file `minimalist/minimalist-flow.sty',
+%% generated with the docstrip utility.
+%%
+%% Copyright (C) 2021-2022 by Jinwen XU
+%%
+%% This is part of the minimalist class series.
+%%
+%% 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.
+%%
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+\ProvidesExplPackage
+ {minimalist-flow}
+ {2023/01/02} {}
+ {The flow style of minimalist}
+
+\IfPackageLoadedTF { minimalist } {}
+ {
+ \msg_new:nnn { \@currname }
+ { minimalist-not-loaded }
+ { "#1"~is~an~internal~style~of~"minimalist".~To~use~it,~you~must~load~the~package~"minimalist"~first. }
+ \msg_warning:nnx { \@currname } { minimalist-not-loaded } { \@currname }
+ \endinput
+ }
+
+%%================================
+%% Title fonts
+%%================================
+\RequirePackage { relsize }
+\RequirePackage { anyfontsize }
+
+\NewCommandCopy \minimalist_original_bfseries: \bfseries
+\bool_new:N \l_minimalist_is_under_bfseries_bool
+\bool_set_false:N \l_minimalist_is_under_bfseries_bool
+\RenewDocumentCommand \bfseries { }
+ {
+ \bool_if:NF \l_minimalist_is_under_bfseries_bool
+ {
+ \colorlet{minimalist-temp-color}{.}
+ \color{minimalist-temp-color!70!paper}
+ }
+ \minimalist_original_bfseries:
+ \bool_set_true:N \l_minimalist_is_under_bfseries_bool
+ }
+\bool_if:NTF \l__minimalist_use_boldface_bool
+ {
+ \cs_new:Nn \minimalist_bfseries: { \bfseries }
+ }
+ {
+ \cs_new:Nn \minimalist_bfseries: {}
+ }
+
+\bool_if:NTF \l__minimalist_use_scshape_bool
+ {
+ \cs_new:Nn \minimalist_scshape: { \scshape }
+ }
+ {
+ \cs_new:Nn \minimalist_scshape: {}
+ }
+
+\tl_new:N \g_minimalist_title_font_common_tl
+
+\tl_new:N \g_minimalist_title_font_part_tl
+\tl_new:N \g_minimalist_title_font_chapter_tl
+\tl_new:N \g_minimalist_title_font_section_tl
+\tl_new:N \g_minimalist_title_font_subsection_tl
+\tl_new:N \g_minimalist_title_font_subsubsection_tl
+\tl_new:N \g_minimalist_title_font_paragraph_tl
+
+\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+% \bool_if:NTF \l__minimalist_runin_bool
+% {
+ \tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \itshape \g_minimalist_title_font_common_tl }
+% }
+% {
+% \tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
+% }
+\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+
+\bool_if:NF \l__minimalist_fast_bool
+ {
+ \RequirePackage { tikz }
+ \ExplSyntaxOff
+ \usetikzlibrary{calc,shadings}
+ \ExplSyntaxOn
+ \RequirePackage { tikzpagenodes } % For `current page text area`
+ }
+
+\bool_if:NTF \l__minimalist_fast_bool
+ {
+ \tl_const:Nn \l_minimalist_sep_bar { $|$ }
+ }
+ {
+ \tl_const:Nn \l_minimalist_sep_bar
+ {
+ \skip_horizontal:n { .1em }
+ \tikz[baseline=.125em] \draw[line~width=.9pt] (0,0) -- (0,.9em);
+ \skip_horizontal:n { .1em }
+ }
+ }
+
+%%================================
+%% Footer
+%%================================
+\RequirePackage { geometry }
+\RequirePackage { fancyhdr }
+\RequirePackage { extramarks }
+
+\hook_gput_code:nnn { begindocument/before } { minimalist }
+ {
+ \fancyhfoffset { 0pt }
+ }
+
+\tl_new:N \l_minimalist_leftmark_tl
+\tl_new:N \l_minimalist_rightmark_tl
+
+\tl_set:Nn \l_minimalist_leftmark_tl
+ {
+ \begin{minipage}[t]{.833\textwidth}
+ \lastleftmark
+ \end{minipage}
+ }
+\tl_set:Nn \l_minimalist_rightmark_tl
+ {
+ \begin{minipage}[t]{.833\textwidth}
+ \filleft
+ \lastrightmark
+ \end{minipage}
+ }
+
+\fancypagestyle { fancy }
+ {
+ \fancyhf { }
+ \if@twoside
+ \fancyfoot[RO]
+ {
+ \textcolor { main-text!30!paper } { \small \l_minimalist_rightmark_tl }
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fancyfoot[LE]
+ {
+ \leavevmode
+ \llap
+ {
+ \textcolor { main-text!75!paper } { \thepage }
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ }
+ \textcolor { main-text!30!paper } { \small \l_minimalist_leftmark_tl }
+ }
+ \else
+ \fancyfoot[R]
+ {
+ \textcolor { main-text!30!paper } { \small \l_minimalist_rightmark_tl }
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fi
+ \renewcommand { \headrulewidth } { 0pt }
+ }
+\pagestyle { fancy }
+
+\fancypagestyle { plain }
+ {
+ \fancyhf { }
+ \if@twoside
+ \fancyfoot[RO]
+ {
+ \nobreakspace
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fancyfoot[LE]
+ {
+ \leavevmode
+ \llap
+ {
+ \textcolor { main-text!75!paper } { \thepage }
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ }
+ \nobreakspace
+ }
+ \else
+ \fancyfoot[R]
+ {
+ \nobreakspace
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fi
+ \renewcommand { \headrulewidth } { 0pt }
+ }
+
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \bool_if:NTF \l__minimalist_fast_bool
+ {
+ \newcommand{ \minimalist_draw_help_line: }{}
+ }
+ {
+ \newcommand{ \minimalist_draw_help_line: }
+ {
+ \begin{tikzpicture}[remember~picture,overlay]
+ \foreach\i in {0,1,...,5}{
+ \fill[opacity=0.12-0.02*\i]
+ ($(current~page~text~area.north~east)+(-\i*0.5em-.025em,-10pt+\i*1.1pt)$)
+ rectangle ($(current~page~text~area.south~east)+(-\i*0.5em+.025em,10pt-\i*1.1pt)$);
+ \shade[top~color=paper,bottom~color=main-text,opacity=0.12-0.02*\i]
+ ($(current~page~text~area.north~east)+(-\i*0.5em-.025em,2pt)$)
+ rectangle ($(current~page~text~area.north~east)+(-\i*0.5em+.025em,-10pt+\i*1.1pt)$);
+ \shade[top~color=main-text,bottom~color=paper,opacity=0.12-0.02*\i]
+ ($(current~page~text~area.south~east)+(-\i*0.5em-.025em,-2pt)$)
+ rectangle ($(current~page~text~area.south~east)+(-\i*0.5em+.025em,10pt-\i*1.1pt)$);
+ }
+ \end{tikzpicture}
+ }
+ }
+ \fancypagestyle { part }
+ {
+ \fancyhf { }
+ \renewcommand { \headrulewidth } { 0pt }
+ \fancyhead[C] { \minimalist_draw_help_line: }
+ }
+ \addtolength { \headheight } { 20pt }
+ \addtolength { \topmargin } { -20pt }
+ \if@twoside
+ \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+ \renewcommand*{\sectionmark}[1]{
+ \markright{\protect\g_minimalist_section_decoration_char_tl\nobreakspace\thesection\nobreakspace\protect\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}}
+ }
+ {
+ \if@twoside
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+ }
+
+\renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+
+\bool_if:NT \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { cmd/frontmatter/before } { minimalist }
+ {
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\fnsymbol{footnote}}}
+ }
+ \hook_gput_code:nnn { cmd/mainmatter/before } { minimalist }
+ {
+ \setcounter{footnote}{0}
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+ }
+ }
+
+%%================================
+%% Title format
+%%================================
+\RequirePackage [ explicit, newparttoc ] { titlesec }
+\PassOptionsToPackage { normalem } { ulem }
+\RequirePackage { ulem }
+
+\cs_new:Nn \minimalist_title_numbering_apply_font:n { { \usefont{U}{zeur}{b}{n} #1 } }
+
+\cs_new_protected:Nn \minimalist_apply_title_numbering_style_static:n
+ {
+ \tl_set:Nx \l_tmpa_tl { #1 }
+ \regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
+ % \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
+ \regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
+ \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ }
+
+\cs_new_protected:Nn \minimalist_apply_title_numbering_style:n
+ {
+ \group_begin:
+ \tl_set:Nx \l_tmpa_tl { #1 }
+ \regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
+ % \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
+ \regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
+ \exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
+ \int_case:nn { \l_tmpa_int }
+ {
+ { 0 } { \textcolor { .!24!paper } }
+ { 1 } { \textcolor { .!39!paper } }
+ { 2 } { \textcolor { .!39!paper } }
+ { 3 } { \smaller[.5] \textcolor { .!39!paper } }
+ }
+ \l_tmpa_tl
+ \group_end:
+ }
+
+\newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
+
+\AddLanguageSetting
+ {
+ \renewcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
+ }
+\AddLanguageSetting [ schinese ]
+ {
+ \renewcommand{\partstring}{第 \zhnumber{\arabic{part}} 部分}
+ }
+\AddLanguageSetting [ tchinese ]
+ {
+ \renewcommand{\partstring}{第 \zhnumber{\arabic{part}} 部分}
+ }
+\AddLanguageSetting [ japanese ]
+ {
+ \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部}
+ }
+
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \setcounter{secnumdepth}{3}
+
+ %% Part
+ \titleclass{\part}{top} % make part like a chapter
+ \titleformat{\part}[display]
+ {\thispagestyle{part}
+ \LocallyStopLineNumbers
+ \g_minimalist_title_font_part_tl\filleft}
+ {\partstring}
+ {1em}
+ {\fontsize{20}{24}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ \titleformat{name=\part,numberless}[display]
+ {\thispagestyle{part}
+ \LocallyStopLineNumbers
+ % \phantomsection\addcontentsline{toc}{part}{#1}
+ \g_minimalist_title_font_part_tl\filleft}
+ {\phantom{\MakeUppercase{\partname}}}
+ {1em}
+ {\fontsize{20}{24}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ \titlespacing*{\part}{0pt}{5em}{6em}
+ %% Text after part
+ \newcommand{\parttext}[1]{
+ \vfill
+ \LocallyStopLineNumbers
+ \begin{flushright}
+ \begin{minipage}{0.833\textwidth}
+ \color{main-text!80!paper}\raggedleft#1
+ \end{minipage}
+ \end{flushright}
+ \ResumeLineNumbers
+ \vfill\vfill
+ \cleardoublepage
+ }
+
+ %% Chapter
+ \titleformat{\chapter}
+ {\thispagestyle{fancy}
+ \LocallyStopLineNumbers
+ \color{main-text!80!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
+ {
+ \rlap
+ {
+ \hspace*{-.5em}
+ \color{main-text!10!paper}
+ \fontsize{90}{0}\selectfont\raisebox{-10pt}{ \minimalist_title_numbering_apply_font:n { \thechapter } }
+ }
+ #1
+ }
+ [\ResumeLineNumbers]
+ \titleformat{name=\chapter,numberless}
+ {\thispagestyle{fancy}
+ \LocallyStopLineNumbers
+ % \phantomsection\addcontentsline{toc}{chapter}{#1}
+ \color{main-text!90!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
+ {
+ \rlap
+ {
+ \hspace*{-.5em}
+ \fontsize{80}{0}\selectfont\raisebox{-10pt}{ \phantom{*} }
+ }
+ #1
+ }
+ [\ResumeLineNumbers]
+ }
+ {
+ %% Part
+ \titleformat{\part}[display]
+ {\LocallyStopLineNumbers
+ \g_minimalist_title_font_part_tl\filleft}
+ {\partstring}
+ {.3em}
+ {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ \titleformat{name=\part,numberless}[display]
+ {\LocallyStopLineNumbers
+ % \phantomsection\addcontentsline{toc}{part}{#1}
+ \g_minimalist_title_font_part_tl\filleft}
+ {\phantom{\MakeUppercase{\partname}}}
+ {.3em}
+ {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ %% Text after part
+ \newcommand{\parttext}[1]{
+ \LocallyStopLineNumbers
+ \begin{flushright}
+ \begin{minipage}{0.833\textwidth}
+ \color{main-text!80!paper}\raggedleft#1
+ \end{minipage}
+ \end{flushright}
+ \ResumeLineNumbers
+ }
+ }
+
+%% Section
+\tl_gset:Nn \g_minimalist_section_decoration_char_tl {}
+\titleformat{\section}
+ {\LocallyStopLineNumbers
+ \centering}
+ {\raisebox{-.02\baselineskip}{\large \minimalist_apply_title_numbering_style:n { \thesection } }}{1em}
+ {\g_minimalist_title_font_section_tl #1}
+ [\ResumeLineNumbers]
+
+%% Subsection
+\titleformat{\subsection}
+ {\LocallyStopLineNumbers}
+ { \minimalist_apply_title_numbering_style:n { \thesubsection } }{.75em}
+ {\g_minimalist_title_font_subsection_tl #1}
+ [\ResumeLineNumbers]
+
+%% Subsubsection
+\bool_if:NTF \l__minimalist_runin_bool
+ {
+ \titleformat{\subsubsection}[runin]
+ {}
+ {
+ \minimalist_apply_title_numbering_style:n { \thesubsubsection }
+ \tl_if_blank:nT { #1 }
+ {
+ \hspace* { .5em }
+ }
+ }
+ {.5em}
+ {
+ \tl_if_blank:nF { #1 }
+ {
+ \g_minimalist_title_font_subsubsection_tl
+ #1. \hspace* { .5em }
+ }
+ }
+ }
+ {
+ \titleformat{\subsubsection}
+ {\LocallyStopLineNumbers}
+ { \minimalist_apply_title_numbering_style:n { \thesubsubsection } }{.75em}
+ {\g_minimalist_title_font_subsubsection_tl #1}
+ [\ResumeLineNumbers]
+ }
+
+%% Paragraph
+\titleformat{\paragraph}[runin]
+ { \g_minimalist_title_font_paragraph_tl }{\theparagraph}{1em}{#1}
+
+\titlespacing{\section}{0pt}{1\baselineskip plus .5\baselineskip minus .2\baselineskip}{.6\baselineskip plus .3\baselineskip minus .2\baselineskip}
+\titlespacing{\subsection}{0pt}{.75\baselineskip plus .3\baselineskip minus .2\baselineskip}{.4\baselineskip plus .2\baselineskip minus .1\baselineskip}
+\bool_if:NTF \l__minimalist_runin_bool
+ {
+ \titlespacing{\subsubsection}{0pt}{.5\baselineskip plus .2\baselineskip minus .1\baselineskip}{0pt}
+ }
+ {
+ \titlespacing{\subsubsection}{0pt}{.5\baselineskip plus .2\baselineskip minus .1\baselineskip}{.3\baselineskip plus .2\baselineskip minus .1\baselineskip}
+ }
+
+%%================================
+%% ToC format
+%%================================
+\RequirePackage { titletoc }
+\titlecontents{part}
+ [0em]
+ {\addvspace{1.5pc}\filcenter\normalfont}
+ { \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } \nopagebreak\\\nopagebreak\uppercase}
+ {}
+ {} % without page number
+ [\addvspace{.5pc}]
+
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \titlecontents{chapter}
+ [2em] % i.e., 0em (part) + 2em
+ {\addvspace{.5pc}\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{2em}}
+ {\hspace*{-2em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{section}
+ [5em] % i.e., 2em (chapter) + 3em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{2.75em}}
+ {\hspace*{-2.75em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsection}
+ [9em] % i.e., 5em (section) + 4em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{3.75em}}
+ {\hspace*{-3.75em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsubsection}
+ [13.5em] % i.e., 9em (subsection) + 4.5em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{4.25em}}
+ {\hspace*{-4.25em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ }
+ {
+ \titlecontents{section}
+ [2em] % i.e., 0em (part) + 2em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{1.75em}}
+ {\hspace*{-1.75em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsection}
+ [5em] % i.e., 2em (section) + 3em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{2.75em}}
+ {\hspace*{-2.75em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsubsection}
+ [9em] % i.e., 5em (subsection) + 4em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{3.75em}}
+ {\hspace*{-3.75em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ }
+
+%%================================
+%% Lists
+%%================================
+\RequirePackage { enumitem }
+\setlistdepth{10}
+\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
+\setlist[enumerate]{labelsep=*, leftmargin=*}
+\setlist[enumerate,1]{label = \normalfont\arabic*$\mskip-.5mu\big)$,
+ ref = \normalfont\color{.!45!paper}\arabic*$\mskip-.5mu\big)$}
+\setlist[enumerate,2]{label = \normalfont\emph{\roman*}$\mskip-.5mu\big)$,
+ ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman*}$\mskip-.5mu\big)$}
+\setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$,
+ ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$\mskip-.5mu\big)$}
+\setlist[description]{font=\normalfont\minimalist_bfseries:}
+
+\renewlist{itemize}{itemize}{10}
+\setlist[itemize]{leftmargin=*,label=\textcolor{.!27!paper}{$\cdot$}}
+\AddLanguageSetting { \setlist[itemize,1]{label=\textcolor{.!27!paper}{$\bullet$},leftmargin=\maxof{\parindent}{1.5em}} }
+\AddLanguageSetting [french] { \setlist[itemize,1]{label=\textcolor{.!39!paper}{\rule[.2\baselineskip]{.8em}{.75pt}},leftmargin=\maxof{\parindent}{1.5em}} }
+\setlist[itemize,2]{label=\textcolor{.!27!paper}{\rule[.2\baselineskip]{.55em}{.75pt}}}
+\setlist[itemize,3]{label=\textcolor{.!27!paper}{$\circ$}}
+\setlist[itemize,4]{label=\textcolor{.!27!paper}{$\ast$}}
+
+%%================================
+%% Blank page
+%%================================
+\projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext
+ {
+ , EN = This~page~is~intentionally~left~blank
+ , FR = Cette~page~est~intentionnellement~laissée~vide
+ , DE = Diese~Seite~wurde~absichtlich~leer~gelassen
+ , IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente
+ , PT = Esta~página~foi~intencionalmente~deixada~em~branco
+ , BR = Esta~página~foi~intencionalmente~deixada~em~branco
+ , ES = Esta~página~se~ha~dejado~intencionadamente~en~blanco
+ , CN = \ziju{0.2} 此页为有意留为空白
+ , TC = \ziju{0.2} 此頁為有意留為空白
+ , JP = このページは意図的に空白にしてあります
+ , RU = Эта~страница~намеренно~оставлена~пустой
+ }
+\renewcommand{\cleardoublepage}{
+ \relax
+ \clearpage
+ \if@twoside\ifodd\c@page\relax\else
+ \thispagestyle{empty}
+ \hook_gput_next_code:nn { shipout/background }
+ {
+ \put(0.5\paperwidth,-0.5\paperheight){
+ \makebox[0pt]{\large\color{main-text!10!paper}\g_minimalist_title_font_common_tl\bl@nkpagetext}}
+ }
+ \null\newpage\fi\fi
+}
+
+%%================================
+%% Index
+%%================================
+\RequirePackage { imakeidx }
+\makeindex[intoc]
+
+\RequirePackage { silence }
+\ExplSyntaxOff
+\WarningFilter{latex}{Writing or overwriting file}
+\begin{filecontents*}[overwrite]{\jobname.mst}
+delim_0 "\\IndexDotfill " % Filler between section heading and page number
+delim_1 "\\IndexDotfill " % Filler between subsection heading and page number
+headings_flag 1
+heading_prefix "\\IndexHeading{"
+heading_suffix "}\n"
+\end{filecontents*}
+\ExplSyntaxOn
+
+\projlib_langauge_define_multilingual_text:Nn \index_symbols_name
+ {
+ , EN = Symbols
+ , FR = Symboles
+ , DE = Symbole
+ , IT = Simboli
+ , PT = Símbolos
+ , BR = Símbolos
+ , ES = Símbolos
+ , CN = 符号
+ , TC = 符號
+ , JP = 記号
+ , RU = Символы
+ }
+
+\newcommand*{\IndexDotfill}
+ {
+ \null\nobreak
+ \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hskip1em plus1fill
+ }
+\newcommand*{\IndexLinebreak}
+ {
+ \nobreakspace\textcolor{main-text!45!paper}{\raisebox{.4ex}{.}\raisebox{.2ex}{.}}
+ \item\hspace*{\hangindent}
+ \textcolor{main-text!45!paper}{\raisebox{.45ex}{.}\raisebox{.25ex}{.}}\:
+ \unskip
+ }
+
+\newcommand*{\IndexHeading}[1]
+ {
+ \str_if_eq:nnTF { #1 } { Symbols }
+ { \tl_set:Nn \l_tmpa_tl { \index_symbols_name } }
+ { \tl_set:Nn \l_tmpa_tl { #1 } }
+ \centerline{ \g_minimalist_title_font_common_tl \minimalist_apply_title_numbering_style_static:n { \l_tmpa_tl } }
+ \nopagebreak
+ \par
+ \vspace{.3\baselineskip}
+ }
+
+\renewcommand*{\indexspace}
+ {
+ \par
+ \vspace{2pc plus .5pc minus .3pc}
+ }
+
+\bool_new:N \l__minimalist_if_first_subitem_bool
+\renewcommand*{\@idxitem}
+ {
+ \par\hangindent40\p@
+ \bool_set_true:N \l__minimalist_if_first_subitem_bool
+ }
+\renewcommand*{\subitem}
+ {
+ \par\hangindent40\p@
+ \bool_if:NT \l__minimalist_if_first_subitem_bool
+ {
+ \nobreak
+ \bool_set_false:N \l__minimalist_if_first_subitem_bool
+ }
+ \hspace*{20\p@}
+ }
+
+\hook_gput_code:nnn { begindocument/before } { minimalist }
+ {
+ \bool_if:NF \l__minimalist_fast_bool
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \bookmarksetup{startatroot} }
+ }
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
+ \hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
+ }
+
+%%================================
+%% Draft mark
+%%================================
+\RequirePackage { projlib-draft }
+
+%%================================
+%% Theorems
+%%================================
+\RequirePackage { mathtools }
+\RequirePackage { amsthm }
+
+\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+
+\PassOptionsToPackage { nopatch = eqnum } { microtype }
+
+\bool_if:NTF \l__minimalist_theorem_in_new_line_bool
+ {
+ \newtheoremstyle{simple}
+ {.75\baselineskip}{}
+ {
+ \normalfont
+ \parindent=0pt
+ \parskip=.3333\baselineskip plus .0667\baselineskip minus .0833\baselineskip
+ }{}
+ {\normalfont}{}
+ {0pt}
+ {
+ \rlap{\vbox{\hbox{\parbox{\linewidth}{
+ {\thmnumber{ \minimalist_apply_title_numbering_style:n { #2 } \hspace{.75em} }\thmname{#1}}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}
+ }}\hbox{\strut}\vspace{0pt}}}
+ }
+ }
+ {
+ \newtheoremstyle{simple}
+ {}{}
+ {
+ \normalfont
+ \parindent=0pt
+ \parskip=.3333\baselineskip plus .0667\baselineskip minus .0833\baselineskip
+ }{}
+ {\normalfont}{}
+ {0pt}
+ {{\thmnumber{ \minimalist_apply_title_numbering_style:n { #2 } \hspace{.75em} }\thmname{#1}}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace}
+ }
+
+\theoremstyle{simple}
+
+\newcommand{\customqedsymbol}{
+ \makebox[1em]{\color{.!27!paper}\rule[-0.1em]{.95em}{.95em}}}
+\let\qedsymbol\customqedsymbol
+
+\bool_if:NTF \l__minimalist_fast_bool
+ {
+ \RequirePackage { hyperref }
+ \hypersetup { draft }
+ }
+ {
+ \RequirePackage { hyperref }
+ \RequirePackage { bookmark }
+ \hypersetup{ hidelinks, linktoc = all }
+ \bookmarksetup{ numbered }
+ \renewcommand\Hy@numberline[1]{#1.~}
+ % https://tex.stackexchange.com/a/1821
+ % Add the bookmark of ToC
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
+
+\RequirePackage { projlib-theorem }
+
+\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
+
+\AddToHook{env/proof/begin}{\Hy@SaveLastskip\color{blue!50!cyan!55!main-text}\Hy@RestoreLastskip}
+
+\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name, proof } { shared counter = subsection }
+
+\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+
+\SetTheorem { remark }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+
+\bool_if:NF \l__projlib_theorem_complexname_bool
+ {
+ \exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
+ {
+ name style = {
+ , crefname style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , Crefname style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+
+ \SetTheorem { remark }
+ {
+ name style = {
+ , crefname style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , Crefname style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+ }
+
+\PassOptionsToPackage { many } { tcolorbox }
+\RequirePackage { tcolorbox }
+\bool_if:NT \l__minimalist_fast_bool { \tcbstartdraftmode }
+
+
+\NewDocumentEnvironment { emphasis } { }
+ {
+ \LocallyStopLineNumbers
+ \enlargethispage{2mm}
+ \begin{tcolorbox}
+ [
+ enhanced ~ jigsaw, breakable, oversize,
+ % nobeforeafter,
+ left = .5em, right=0mm, top=0.5mm, bottom=0mm, boxrule=0pt,
+ colback=main-text!2!paper, frame ~ hidden,
+ borderline ~ west = {.3em} {0mm} {main-text!25!paper},
+ arc = 0.2mm,
+ ]
+ }
+ {
+ \end{tcolorbox}
+ \ResumeLineNumbers
+ }
+
+\hook_gput_code:nnn { env/quote/begin } { minimalist } { \small }
+
+%%================================
+%% Title block style
+%%================================
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { package/projlib-author/after } { minimalist }
+ {
+ \tl_gset:Nn \g__projlib_author_font_author_tl { \normalfont \minimalist_scshape: }
+ \tl_gset:Nn \g__projlib_author_font_institute_tl { \large \normalfont }
+ \tl_gset:Nn \g__projlib_author_font_address_tl { \large \normalfont \itshape }
+ \tl_gset:Nn \g__projlib_author_font_curraddr_tl { \large \normalfont \itshape }
+ \tl_gset:Nn \g__projlib_author_font_email_tl { \large \normalfont \ttfamily }
+ }
+
+ \RequirePackage { projlib-titlepage }
+ \renewcommand{\maketitle}{
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
+ }
+ {
+ \renewcommand{\@maketitle}
+ {
+ \LocallyStopLineNumbers
+ \begin{center}
+ \let\footnote\thanks
+ {\minimalist_bfseries:\sffamily\minimalist_scshape:\Large\@title}\\\bigskip
+ \color{main-text!80!paper}
+ {\small\minimalist_scshape:\@author}
+ \par\smallskip\vspace{-\parskip}
+ {\small\@date}
+ \end{center}
+ \projlib_author_if_content_empty:nT { \@date } { \medskip }
+ \medskip\par
+ \ResumeLineNumbers
+ }
+
+ \hook_gput_code:nnn { cmd/maketitle/after } { minimalist } { \thispagestyle{fancy} }
+
+%%================================
+%% Abstract style
+%%================================
+ \renewenvironment{abstract}
+ {
+ \LocallyStopLineNumbers
+ \vspace{-.5\baselineskip}
+ \begin{center}
+ { \g_minimalist_title_font_section_tl \minimalist_scshape: \small\abstractname}\\
+ \vspace{-.3\baselineskip}
+ \begin{minipage}[t]{.833\textwidth}
+ \vspace{0pt}
+ \color{main-text!80!paper}
+ \footnotesize
+ \parindent=2em
+ }
+ {
+ \end{minipage}
+ \end{center}
+ \medskip
+ \ResumeLineNumbers
+ }
+
+%%================================
+%% Keyword environment
+%%================================
+ \DefineMultilingualText { \keywordname }
+ {
+ EN = Keywords ,
+ FR = Mots~clés ,
+ DE = Schlüsselwörter ,
+ IT = Parole~chiave ,
+ PT = Palavras~chave ,
+ BR = Palavras~chave ,
+ ES = Palabras~clave ,
+ CN = 关键词 ,
+ TC = 關鍵詞 ,
+ JP = キーワード ,
+ RU = Ключевые~слова ,
+ }
+
+ \newenvironment{keyword}{
+ \LocallyStopLineNumbers
+ \vspace{-.75\baselineskip}
+ \begin{center}
+ {\minimalist_bfseries:\minimalist_scshape:\small\keywordname}\\
+ \vspace{-.3\baselineskip}
+ \begin{minipage}[t]{.833\textwidth}
+ \vspace{0pt}
+ \color{main-text!80!paper}
+ \footnotesize
+ \parindent=2em
+ \begin{center}
+ }{
+ \end{center}
+ \end{minipage}
+ \end{center}
+ \medskip
+ \ResumeLineNumbers
+ }
+ } % end of \bool_if:NTF \l__minimalist_is_book_bool
+
+%%================================
+%% Simulate features of amsart
+%%================================
+\PassOptionsToPackage { amsfashion } { projlib-author }
+\RequirePackage { projlib-author }
+
+%%================================
+%% Special adjustment
+%%================================
+\setcounter{tocdepth}{1}
+
+\crefformat { chapter } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { chapter } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { section } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { section } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { subsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsubsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { subsubsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+
+\endinput
+%%
+%% End of file `minimalist/minimalist-flow.sty'.
diff --git a/macros/latex/contrib/minimalist/minimalist-plain.sty b/macros/latex/contrib/minimalist/minimalist-plain.sty
index 051a773624..705118b378 100644
--- a/macros/latex/contrib/minimalist/minimalist-plain.sty
+++ b/macros/latex/contrib/minimalist/minimalist-plain.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-plain}
- {2022/09/03} {}
+ {2023/01/02} {}
{The plain style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -255,6 +255,21 @@
\fi
}
+\renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+
+\bool_if:NT \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { cmd/frontmatter/before } { minimalist }
+ {
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\fnsymbol{footnote}}}
+ }
+ \hook_gput_code:nnn { cmd/mainmatter/before } { minimalist }
+ {
+ \setcounter{footnote}{0}
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+ }
+ }
+
%%================================
%% Title format
%%================================
@@ -262,11 +277,13 @@
\PassOptionsToPackage { normalem } { ulem }
\RequirePackage { ulem }
+\cs_new:Nn \minimalist_title_numbering_apply_font:n { { \usefont{U}{zeur}{b}{n} #1 } }
+
\cs_new_protected:Nn \minimalist_apply_title_numbering_style_static:n
{
\tl_set:Nx \l_tmpa_tl { #1 }
\regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
- \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
+ \regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
\textcolor { main-text!39!paper } { \normalfont \l_tmpa_tl }
}
@@ -275,7 +292,7 @@
\group_begin:
\tl_set:Nx \l_tmpa_tl { #1 }
\regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
- \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
+ \regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
\exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
\int_case:nn { \l_tmpa_int }
{
@@ -355,7 +372,7 @@
{
\hspace*{-.5em}
\color{main-text!10!paper}
- \fontsize{90}{0}\selectfont\raisebox{-10pt}{ \usefont{U}{zeur}{b}{n} \thechapter }
+ \fontsize{90}{0}\selectfont\raisebox{-10pt}{ \minimalist_title_numbering_apply_font:n { \thechapter } }
}
#1
}
@@ -541,7 +558,7 @@
\projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext
{
, EN = This~page~is~intentionally~left~blank
- , FR = Cette~page~a~été~intentionellement~laissée~vide
+ , FR = Cette~page~est~intentionnellement~laissée~vide
, DE = Diese~Seite~wurde~absichtlich~leer~gelassen
, IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente
, PT = Esta~página~foi~intencionalmente~deixada~em~branco
@@ -605,9 +622,9 @@ heading_suffix "}\n"
}
\newcommand*{\IndexLinebreak}
{
- \nobreakspace\textcolor{main-text!50!paper}{\raisebox{.25ex}{.}\raisebox{.05ex}{.}}
+ \nobreakspace\textcolor{main-text!45!paper}{\raisebox{.4ex}{.}\raisebox{.2ex}{.}}
\item\hspace*{\hangindent}
- \textcolor{main-text!50!paper}{\raisebox{.35ex}{.}\raisebox{.15ex}{.}}\,
+ \textcolor{main-text!45!paper}{\raisebox{.45ex}{.}\raisebox{.25ex}{.}}\:
\unskip
}
@@ -647,6 +664,10 @@ heading_suffix "}\n"
\hook_gput_code:nnn { begindocument/before } { minimalist }
{
+ \bool_if:NF \l__minimalist_fast_bool
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \bookmarksetup{startatroot} }
+ }
\hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
\hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
}
@@ -701,15 +722,13 @@ heading_suffix "}\n"
\theoremstyle{simple}
\newcommand{\customqedsymbol}{
- \makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
+ \makebox[1em]{\color{.!27!paper}\rule[-0.1em]{.95em}{.95em}}}
\let\qedsymbol\customqedsymbol
\bool_if:NTF \l__minimalist_fast_bool
{
- \providecommand{\phantomsection}{}
- \RequirePackage { url }
- \providecommand{\href}[2]{#2}
- \providecommand{\texorpdfstring}[2]{#1}
+ \RequirePackage { hyperref }
+ \hypersetup { draft }
}
{
\RequirePackage { hyperref }
@@ -986,13 +1005,13 @@ heading_suffix "}\n"
%%================================
%% Special adjustment
%%================================
-\crefformat { chapter } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { chapter } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { chapter } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
-\crefformat { section } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { section } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { section } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
-\crefformat { subsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { subsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
-\crefformat { subsubsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsubsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\labelcrefformat { subsubsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
\endinput
diff --git a/macros/latex/contrib/minimalist/minimalist-stream.sty b/macros/latex/contrib/minimalist/minimalist-stream.sty
new file mode 100644
index 0000000000..9dbf900f89
--- /dev/null
+++ b/macros/latex/contrib/minimalist/minimalist-stream.sty
@@ -0,0 +1,1101 @@
+%%
+%% This is file `minimalist/minimalist-stream.sty',
+%% generated with the docstrip utility.
+%%
+%% Copyright (C) 2021-2022 by Jinwen XU
+%%
+%% This is part of the minimalist class series.
+%%
+%% 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.
+%%
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+\ProvidesExplPackage
+ {minimalist-stream}
+ {2023/01/02} {}
+ {The stream style of minimalist}
+
+\IfPackageLoadedTF { minimalist } {}
+ {
+ \msg_new:nnn { \@currname }
+ { minimalist-not-loaded }
+ { "#1"~is~an~internal~style~of~"minimalist".~To~use~it,~you~must~load~the~package~"minimalist"~first. }
+ \msg_warning:nnx { \@currname } { minimalist-not-loaded } { \@currname }
+ \endinput
+ }
+
+%%================================
+%% Title fonts
+%%================================
+\RequirePackage { relsize }
+\RequirePackage { anyfontsize }
+
+\NewCommandCopy \minimalist_original_bfseries: \bfseries
+\bool_new:N \l_minimalist_is_under_bfseries_bool
+\bool_set_false:N \l_minimalist_is_under_bfseries_bool
+\RenewDocumentCommand \bfseries { }
+ {
+ \bool_if:NF \l_minimalist_is_under_bfseries_bool
+ {
+ \colorlet{minimalist-temp-color}{.}
+ \color{minimalist-temp-color!70!paper}
+ }
+ \minimalist_original_bfseries:
+ \bool_set_true:N \l_minimalist_is_under_bfseries_bool
+ }
+\bool_if:NTF \l__minimalist_use_boldface_bool
+ {
+ \cs_new:Nn \minimalist_bfseries: { \bfseries }
+ }
+ {
+ \cs_new:Nn \minimalist_bfseries: {}
+ }
+
+\bool_if:NTF \l__minimalist_use_scshape_bool
+ {
+ \cs_new:Nn \minimalist_scshape: { \scshape }
+ }
+ {
+ \cs_new:Nn \minimalist_scshape: {}
+ }
+
+\tl_new:N \g_minimalist_title_font_common_tl
+
+\tl_new:N \g_minimalist_title_font_part_tl
+\tl_new:N \g_minimalist_title_font_chapter_tl
+\tl_new:N \g_minimalist_title_font_section_tl
+\tl_new:N \g_minimalist_title_font_subsection_tl
+\tl_new:N \g_minimalist_title_font_subsubsection_tl
+\tl_new:N \g_minimalist_title_font_paragraph_tl
+
+\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \itshape \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+
+\bool_if:NF \l__minimalist_fast_bool
+ {
+ \RequirePackage { tikz }
+ \ExplSyntaxOff
+ \usetikzlibrary{calc,shadings}
+ \ExplSyntaxOn
+ \RequirePackage { tikzpagenodes } % For `current page text area`
+ }
+
+%%================================
+%% Footer
+%%================================
+\RequirePackage { geometry }
+\RequirePackage { fancyhdr }
+\RequirePackage { extramarks }
+
+\hook_gput_code:nnn { begindocument/before } { minimalist }
+ {
+ \fancyhfoffset { 0pt }
+ }
+
+\tl_new:N \l_minimalist_leftmark_tl
+\tl_new:N \l_minimalist_rightmark_tl
+
+\tl_set:Nn \l_minimalist_leftmark_tl
+ {
+ \begin{minipage}[t]{.833\textwidth}
+ \lastleftmark
+ \end{minipage}
+ }
+\tl_set:Nn \l_minimalist_rightmark_tl
+ {
+ \begin{minipage}[t]{.833\textwidth}
+ \filleft
+ \lastrightmark
+ \end{minipage}
+ }
+
+\fancypagestyle { fancy }
+ {
+ \fancyhf { }
+ \if@twoside
+ \fancyfoot[RO]
+ {
+ \textcolor { main-text!30!paper } { \small \l_minimalist_rightmark_tl }
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fancyfoot[LE]
+ {
+ \leavevmode
+ \llap
+ {
+ \textcolor { main-text!75!paper } { \thepage }
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ }
+ \textcolor { main-text!30!paper } { \small \l_minimalist_leftmark_tl }
+ }
+ \else
+ \fancyfoot[R]
+ {
+ \textcolor { main-text!30!paper } { \small \l_minimalist_rightmark_tl }
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fi
+ \renewcommand { \headrulewidth } { 0pt }
+ }
+\pagestyle { fancy }
+
+\fancypagestyle { plain }
+ {
+ \fancyhf { }
+ \if@twoside
+ \fancyfoot[RO]
+ {
+ \nobreakspace
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fancyfoot[LE]
+ {
+ \leavevmode
+ \llap
+ {
+ \textcolor { main-text!75!paper } { \thepage }
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ }
+ \nobreakspace
+ }
+ \else
+ \fancyfoot[R]
+ {
+ \nobreakspace
+ \rlap
+ {
+ \nobreakspace \nobreakspace \nobreakspace \nobreakspace
+ \textcolor { main-text!75!paper } { \thepage }
+ }
+ }
+ \fi
+ \renewcommand { \headrulewidth } { 0pt }
+ }
+
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \bool_if:NTF \l__minimalist_fast_bool
+ {
+ \newcommand{ \minimalist_draw_help_line: }{}
+ }
+ {
+ \newcommand{ \minimalist_draw_help_line: }
+ {
+ \begin{tikzpicture}[remember~picture,overlay]
+ \foreach\i in {0,1,...,5}{
+ \fill[opacity=0.12-0.02*\i]
+ ($(current~page~text~area.north~east)+(-\i*0.5em-.025em,-10pt+\i*1.1pt)$)
+ rectangle ($(current~page~text~area.south~east)+(-\i*0.5em+.025em,10pt-\i*1.1pt)$);
+ \shade[top~color=paper,bottom~color=main-text,opacity=0.12-0.02*\i]
+ ($(current~page~text~area.north~east)+(-\i*0.5em-.025em,2pt)$)
+ rectangle ($(current~page~text~area.north~east)+(-\i*0.5em+.025em,-10pt+\i*1.1pt)$);
+ \shade[top~color=main-text,bottom~color=paper,opacity=0.12-0.02*\i]
+ ($(current~page~text~area.south~east)+(-\i*0.5em-.025em,-2pt)$)
+ rectangle ($(current~page~text~area.south~east)+(-\i*0.5em+.025em,10pt-\i*1.1pt)$);
+ }
+ \end{tikzpicture}
+ }
+ }
+ \fancypagestyle { part }
+ {
+ \fancyhf { }
+ \renewcommand { \headrulewidth } { 0pt }
+ \fancyhead[C] { \minimalist_draw_help_line: }
+ }
+ \addtolength { \headheight } { 20pt }
+ \addtolength { \topmargin } { -20pt }
+ \if@twoside
+ \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+ \renewcommand*{\sectionmark}[1]{
+ \markright{\protect\g_minimalist_section_decoration_char_tl\nobreakspace\thesection\nobreakspace\protect\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}}
+ }
+ {
+ \if@twoside
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+ }
+
+\renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+
+\bool_if:NT \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { cmd/frontmatter/before } { minimalist }
+ {
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\fnsymbol{footnote}}}
+ }
+ \hook_gput_code:nnn { cmd/mainmatter/before } { minimalist }
+ {
+ \setcounter{footnote}{0}
+ \renewcommand*{\thefootnote}{\textcolor{main-text!45!paper}{\arabic{footnote}}}
+ }
+ }
+
+%%================================
+%% Title format
+%%================================
+\RequirePackage [ explicit, newparttoc ] { titlesec }
+% \renewcommand{\bottomtitlespace}{.1\textheight}
+% \RequirePackage { needspace }
+\PassOptionsToPackage { normalem } { ulem }
+\RequirePackage { ulem }
+
+\cs_new:Nn \minimalist_title_numbering_apply_font:n { { \usefont{U}{zeur}{b}{n} #1 } }
+
+\cs_new_protected:Nn \minimalist_apply_title_numbering_style_static:n
+ {
+ \tl_set:Nx \l_tmpa_tl { #1 }
+ \regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
+ % \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
+ \regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
+ \textcolor { main-text!39!paper } { \normalfont \l_tmpa_tl }
+ }
+
+\cs_new_protected:Nn \minimalist_apply_title_numbering_style:n
+ {
+ \group_begin:
+ \tl_set:Nx \l_tmpa_tl { #1 }
+ \regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
+ % \regex_replace_all:nnN { (\d) } { {\c{usefont}{U}{zeur}{b}{n}\1} } \l_tmpa_tl
+ \regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
+ \exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
+ \int_case:nn { \l_tmpa_int }
+ {
+ { 0 } { \textcolor { main-text!39!paper } }
+ { 1 } { \textcolor { main-text!39!paper } }
+ { 2 } { \textcolor { main-text!39!paper } }
+ { 3 } { \smaller[2] \textcolor { main-text!24!paper } }
+ }
+ \l_tmpa_tl
+ \group_end:
+ }
+
+\newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
+
+\AddLanguageSetting
+ {
+ \renewcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
+ }
+\AddLanguageSetting [ schinese ]
+ {
+ \renewcommand{\partstring}{第 \zhnumber{\arabic{part}} 部分}
+ }
+\AddLanguageSetting [ tchinese ]
+ {
+ \renewcommand{\partstring}{第 \zhnumber{\arabic{part}} 部分}
+ }
+\AddLanguageSetting [ japanese ]
+ {
+ \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部}
+ }
+
+
+\dim_new:N \l_minimalist_title_sep_dim
+\dim_set:Nn \l_minimalist_title_sep_dim { 1em }
+
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \setcounter{secnumdepth}{4}
+
+ %% Part
+ \titleclass{\part}{top} % make part like a chapter
+ \titleformat{\part}[display]
+ {\thispagestyle{part}
+ \LocallyStopLineNumbers
+ \g_minimalist_title_font_part_tl\filleft}
+ {\partstring}
+ {1em}
+ {\fontsize{20}{24}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ \titleformat{name=\part,numberless}[display]
+ {\thispagestyle{part}
+ \LocallyStopLineNumbers
+ % \phantomsection\addcontentsline{toc}{part}{#1}
+ \g_minimalist_title_font_part_tl\filleft}
+ {\phantom{\MakeUppercase{\partname}}}
+ {1em}
+ {\fontsize{20}{24}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ \titlespacing*{\part}{0pt}{5em}{6em}
+ %% Text after part
+ \newcommand{\parttext}[1]{
+ \vfill
+ \LocallyStopLineNumbers
+ \begin{flushright}
+ \begin{minipage}{0.833\textwidth}
+ \color{main-text!80!paper}\raggedleft#1
+ \end{minipage}
+ \end{flushright}
+ \ResumeLineNumbers
+ \vfill\vfill
+ \cleardoublepage
+ }
+
+ %% Chapter
+ \titleformat{\chapter}
+ {\thispagestyle{fancy}
+ \LocallyStopLineNumbers
+ \color{main-text!90!paper}
+ \g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
+ {
+ \llap{
+ {
+ \color{main-text!24!paper}
+ \fontsize{40}{0}\selectfont
+ \raisebox{-5pt}{ \minimalist_title_numbering_apply_font:n { \thechapter } }
+ }
+ \skip_horizontal:n { .75 \l_minimalist_title_sep_dim }
+ }
+ #1
+ }
+ [\ResumeLineNumbers]
+ \titleformat{name=\chapter,numberless}
+ {\thispagestyle{fancy}
+ \LocallyStopLineNumbers
+ % \phantomsection\addcontentsline{toc}{chapter}{#1}
+ \color{main-text!90!paper}
+ \g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
+ {
+ #1
+ }
+ [\ResumeLineNumbers]
+ }
+ {
+ %% Part
+ \titleformat{\part}[display]
+ {\LocallyStopLineNumbers
+ \g_minimalist_title_font_part_tl\filleft}
+ {\partstring}
+ {.3em}
+ {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ \titleformat{name=\part,numberless}[display]
+ {\LocallyStopLineNumbers
+ % \phantomsection\addcontentsline{toc}{part}{#1}
+ \g_minimalist_title_font_part_tl\filleft}
+ {\phantom{\MakeUppercase{\partname}}}
+ {.3em}
+ {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
+ [\ResumeLineNumbers]
+ %% Text after part
+ \newcommand{\parttext}[1]{
+ \LocallyStopLineNumbers
+ \begin{flushright}
+ \begin{minipage}{0.833\textwidth}
+ \color{main-text!80!paper}\raggedleft#1
+ \end{minipage}
+ \end{flushright}
+ \ResumeLineNumbers
+ }
+ }
+
+%% Section
+\tl_gset:Nn \g_minimalist_section_decoration_char_tl {}
+\titleformat{\section}
+ {\LocallyStopLineNumbers
+ % \needspace{2\baselineskip}
+ \larger \g_minimalist_title_font_section_tl}
+ {
+ \llap{
+ {\minimalist_apply_title_numbering_style:n { \thesection }}
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ }
+ {0pt}
+ {#1}
+ [\ResumeLineNumbers]
+
+\titleformat{name=\section,numberless}
+ {\LocallyStopLineNumbers
+ % \needspace{2\baselineskip}
+ \larger \g_minimalist_title_font_section_tl}
+ {}
+ {0pt}
+ {#1}
+ [\ResumeLineNumbers]
+
+%% Subsection
+\titleformat{\subsection}[runin]
+ {\g_minimalist_title_font_subsection_tl}
+ {
+ \llap{
+ \minimalist_apply_title_numbering_style:n { \thesubsection }
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ \tl_if_blank:nT { #1 }
+ {
+ \hspace* { \parindent }
+ }
+ }
+ {0pt}
+ {
+ \tl_if_blank:nF { #1 }
+ {
+ #1. \hspace* { .75em }
+ }
+ }
+
+%% Subsubsection
+\titleformat{\subsubsection}[runin]
+ {\g_minimalist_title_font_subsubsection_tl}
+ {
+ \llap{
+ { \minimalist_apply_title_numbering_style:n { \thesubsubsection } }
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ \tl_if_blank:nT { #1 }
+ {
+ \hspace* { \parindent }
+ }
+ }
+ {0pt}
+ {
+ \tl_if_blank:nF { #1 }
+ {
+ #1. \hspace* { .5em }
+ }
+ }
+
+%% Paragraph
+\titleformat{\paragraph}[runin]
+ { \g_minimalist_title_font_paragraph_tl }{\theparagraph}{1em}{#1}
+
+\titlespacing{\section}{0pt}{1\baselineskip plus .5\baselineskip minus .2\baselineskip}{.6\baselineskip plus .3\baselineskip minus .2\baselineskip}
+\titlespacing{\subsection}{0pt}{.6\baselineskip plus .2\baselineskip minus .1\baselineskip}{0pt}
+\titlespacing{\subsubsection}{0pt}{.5\baselineskip plus .1\baselineskip minus .1\baselineskip}{0pt}
+
+\hook_gput_code:nnn { package/bookmark/after } { minimalist }
+ {
+ \tl_gset:NV \toclevel@sectionsub \toclevel@subsection
+ }
+
+%% \sectionsub
+\titleclass{\sectionsub}{straight}[\section]
+\newcounter{sectionsub}
+\renewcommand{\thesectionsub}{\Alph{sectionsub}}
+
+\titleformat{\sectionsub}
+ {\LocallyStopLineNumbers
+ % \needspace{2\baselineskip}
+ \relscale{1.08} \g_minimalist_title_font_section_tl}
+ {
+ \llap{
+ {\minimalist_apply_title_numbering_style:n { \thesectionsub }}
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ }
+ {0pt}
+ {#1}
+ [\ResumeLineNumbers]
+
+\titleformat{name=\sectionsub,numberless}
+ {\LocallyStopLineNumbers
+ \phantomsection\addcontentsline{toc}{sectionsub}{#1}
+ % \needspace{2\baselineskip}
+ \relscale{1.08} \g_minimalist_title_font_section_tl}
+ {}
+ {0pt}
+ {#1}
+ [\ResumeLineNumbers]
+
+\titlespacing{\sectionsub}{0pt}{.8\baselineskip plus .4\baselineskip minus .2\baselineskip}{.6\baselineskip plus .2\baselineskip minus .1\baselineskip}
+
+%%================================
+%% ToC format
+%%================================
+\RequirePackage { titletoc }
+\titlecontents{part}
+ [0em]
+ {\addvspace{1.5pc}\filcenter\normalfont}
+ { \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } \nopagebreak\\\nopagebreak\uppercase}
+ {}
+ {} % without page number
+ [\addvspace{.5pc}]
+
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \titlecontents{chapter}
+ [2em] % i.e., 0em (part) + 2em
+ {\addvspace{.5pc}\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{2em}}
+ {\hspace*{-2em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{section}
+ [5em] % i.e., 2em (chapter) + 3em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{2.5em}}
+ {\hspace*{-2.5em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{sectionsub}
+ [9em] % i.e., 5em (section) + 4em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{3.5em}}
+ {\hspace*{-3.5em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsection}
+ [9em] % i.e., 5em (section) + 4em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{3.5em}}
+ {\hspace*{-3.5em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsubsection}
+ [13.5em] % i.e., 9em (subsection) + 4.5em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{4.0em}}
+ {\hspace*{-4.0em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ }
+ {
+ \titlecontents{section}
+ [2em] % i.e., 0em (part) + 2em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{1.5em}}
+ {\hspace*{-1.5em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsection}
+ [5em] % i.e., 2em (section) + 3em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{2.5em}}
+ {\hspace*{-2.5em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ \titlecontents{subsubsection}
+ [9em] % i.e., 5em (subsection) + 4em
+ {\normalfont}
+ {\contentslabel[ \minimalist_apply_title_numbering_style_static:n { \thecontentslabel } ]{3.5em}}
+ {\hspace*{-3.5em}}
+ {\titlerule*[1em]{\textcolor{main-text!15!paper}{.}}\contentspage}
+ }
+
+%%================================
+%% Lists
+%%================================
+\RequirePackage { enumitem }
+\setlistdepth{10}
+\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
+\setlist[enumerate]{labelsep=*, leftmargin=*}
+\setlist[enumerate,1]{label = \normalfont\arabic*$\mskip-.5mu\big)$,
+ ref = \normalfont\color{.!45!paper}\arabic*$\mskip-.5mu\big)$}
+\setlist[enumerate,2]{label = \normalfont\emph{\roman*}$\mskip-.5mu\big)$,
+ ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman*}$\mskip-.5mu\big)$}
+\setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$,
+ ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$\mskip-.5mu\big)$}
+\setlist[description]{font=\normalfont\minimalist_bfseries:}
+
+\renewlist{itemize}{itemize}{10}
+\setlist[itemize]{leftmargin=*,label=\textcolor{.!27!paper}{$\cdot$}}
+\AddLanguageSetting { \setlist[itemize,1]{label=\textcolor{.!27!paper}{$\bullet$},leftmargin=\maxof{\parindent}{1.5em}} }
+\AddLanguageSetting [french] { \setlist[itemize,1]{label=\textcolor{.!39!paper}{\rule[.2\baselineskip]{.8em}{.75pt}},leftmargin=\maxof{\parindent}{1.5em}} }
+\setlist[itemize,2]{label=\textcolor{.!27!paper}{\rule[.2\baselineskip]{.55em}{.75pt}}}
+\setlist[itemize,3]{label=\textcolor{.!27!paper}{$\circ$}}
+\setlist[itemize,4]{label=\textcolor{.!27!paper}{$\ast$}}
+
+%%================================
+%% Blank page
+%%================================
+\projlib_langauge_define_multilingual_text:Nn \bl@nkpagetext
+ {
+ , EN = This~page~is~intentionally~left~blank
+ , FR = Cette~page~est~intentionnellement~laissée~vide
+ , DE = Diese~Seite~wurde~absichtlich~leer~gelassen
+ , IT = Questa~pagina~è~stata~lasciata~vuota~intenzionalmente
+ , PT = Esta~página~foi~intencionalmente~deixada~em~branco
+ , BR = Esta~página~foi~intencionalmente~deixada~em~branco
+ , ES = Esta~página~se~ha~dejado~intencionadamente~en~blanco
+ , CN = \ziju{0.2} 此页为有意留为空白
+ , TC = \ziju{0.2} 此頁為有意留為空白
+ , JP = このページは意図的に空白にしてあります
+ , RU = Эта~страница~намеренно~оставлена~пустой
+ }
+\renewcommand{\cleardoublepage}{
+ \relax
+ \clearpage
+ \if@twoside\ifodd\c@page\relax\else
+ \thispagestyle{empty}
+ \hook_gput_next_code:nn { shipout/background }
+ {
+ \put(0.5\paperwidth,-0.5\paperheight){
+ \makebox[0pt]{\large\color{main-text!10!paper}\g_minimalist_title_font_common_tl\bl@nkpagetext}}
+ }
+ \null\newpage\fi\fi
+}
+
+%%================================
+%% Index
+%%================================
+\RequirePackage { imakeidx }
+\makeindex[intoc]
+
+\RequirePackage { silence }
+\ExplSyntaxOff
+\WarningFilter{latex}{Writing or overwriting file}
+\begin{filecontents*}[overwrite]{\jobname.mst}
+delim_0 "\\IndexDotfill " % Filler between section heading and page number
+delim_1 "\\IndexDotfill " % Filler between subsection heading and page number
+headings_flag 1
+heading_prefix "\\IndexHeading{"
+heading_suffix "}\n"
+\end{filecontents*}
+\ExplSyntaxOn
+
+\projlib_langauge_define_multilingual_text:Nn \index_symbols_name
+ {
+ , EN = Symbols
+ , FR = Symboles
+ , DE = Symbole
+ , IT = Simboli
+ , PT = Símbolos
+ , BR = Símbolos
+ , ES = Símbolos
+ , CN = 符号
+ , TC = 符號
+ , JP = 記号
+ , RU = Символы
+ }
+
+\newcommand*{\IndexDotfill}
+ {
+ \null\nobreak
+ \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hskip1em plus1fill
+ }
+\newcommand*{\IndexLinebreak}
+ {
+ \nobreakspace\textcolor{main-text!45!paper}{\raisebox{.4ex}{.}\raisebox{.2ex}{.}}
+ \item\hspace*{\hangindent}
+ \textcolor{main-text!45!paper}{\raisebox{.45ex}{.}\raisebox{.25ex}{.}}\:
+ \unskip
+ }
+
+\newcommand*{\IndexHeading}[1]
+ {
+ \str_if_eq:nnTF { #1 } { Symbols }
+ { \tl_set:Nn \l_tmpa_tl { \index_symbols_name } }
+ { \tl_set:Nn \l_tmpa_tl { #1 } }
+ \centerline{ \g_minimalist_title_font_common_tl \minimalist_apply_title_numbering_style_static:n { \l_tmpa_tl } }
+ \nopagebreak
+ \par
+ \vspace{.3\baselineskip}
+ }
+
+\renewcommand*{\indexspace}
+ {
+ \par
+ \vspace{2pc plus .5pc minus .3pc}
+ }
+
+\bool_new:N \l__minimalist_if_first_subitem_bool
+\renewcommand*{\@idxitem}
+ {
+ \par\hangindent40\p@
+ \bool_set_true:N \l__minimalist_if_first_subitem_bool
+ }
+\renewcommand*{\subitem}
+ {
+ \par\hangindent40\p@
+ \bool_if:NT \l__minimalist_if_first_subitem_bool
+ {
+ \nobreak
+ \bool_set_false:N \l__minimalist_if_first_subitem_bool
+ }
+ \hspace*{20\p@}
+ }
+
+\hook_gput_code:nnn { begindocument/before } { minimalist }
+ {
+ \bool_if:NF \l__minimalist_fast_bool
+ {
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \bookmarksetup{startatroot} }
+ }
+ \hook_gput_code:nnn { cmd/printindex/before } { minimalist } { \LocallyStopLineNumbers }
+ \hook_gput_code:nnn { cmd/printindex/after } { minimalist } { \ResumeLineNumbers }
+ }
+
+%%================================
+%% Draft mark
+%%================================
+\RequirePackage { projlib-draft }
+
+%%================================
+%% Theorems
+%%================================
+\RequirePackage { mathtools }
+\RequirePackage { amsthm }
+
+\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+
+\PassOptionsToPackage { nopatch = eqnum } { microtype }
+
+\newtheoremstyle{simple-newline}
+ {-.2\baselineskip plus 2pt minus .1\baselineskip}{.3\baselineskip plus 2pt minus .1\baselineskip}
+ {\normalfont}{}
+ {\normalfont}{}
+ {0pt}
+ {
+ \rlap{\vbox{\hbox{\parbox{\linewidth}{
+ \llap{
+ \phantom{\rule{0pt}{\baselineskip}}
+ \minimalist_apply_title_numbering_style:n { \thmnumber{#2} }
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ \vspace*{-\baselineskip}
+ {\thmname{#1}}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}
+ \phantom{q} % To provide something below the baseline
+ }}\hbox{\strut}\vspace{0pt}}}
+ }
+
+\dim_new:N \l_minimalist_space_before_inline_theorem_dim
+\AtBeginDocument
+ {
+ \dim_set:Nn \l_minimalist_space_before_inline_theorem_dim
+ {
+ \dim_eval:n { .3\baselineskip - .6\parskip }
+ }
+ }
+
+\newtheoremstyle{simple-inline}
+ % {.3\baselineskip plus 2pt minus .1\baselineskip}{.3\baselineskip plus 2pt minus .1\baselineskip}
+ {\l_minimalist_space_before_inline_theorem_dim}{\l_minimalist_space_before_inline_theorem_dim}
+ {\normalfont}{}
+ {\normalfont}{}
+ {0pt}
+ {
+ \llap{
+ \minimalist_apply_title_numbering_style:n { \thmnumber{#2} }
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ % \minimalist_bfseries:
+ {\thmname{#1}}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}
+ . \hspace{.5em}
+ }
+
+\bool_if:NTF \l__minimalist_theorem_in_new_line_bool
+ {
+ \theoremstyle{simple-newline}
+ }
+ {
+ \theoremstyle{simple-inline}
+ }
+
+\newtheoremstyle{proof}
+ {3\p@\@plus3\p@}{.3\baselineskip}
+ {\normalfont}{}
+ {\itshape}{}
+ {0pt}
+ {
+ \llap{
+ \minimalist_apply_title_numbering_style:n { \thmnumber{#2} }
+ \skip_horizontal:n { \l_minimalist_title_sep_dim }
+ }
+ {\thmname{#1}}
+ . \hspace{.5em}
+ }
+
+% \RequirePackage { regexpatch }
+% \xpatchcmd{\proof}{\topsep6\p@\@plus6\p@\relax}{\topsep3\p@\@plus3\p@\relax}{}{}
+
+\newcommand{\customqedsymbol}{
+ \makebox[1em]{\color{.!27!paper}\rule[-0.1em]{.95em}{.95em}}}
+\let\qedsymbol\customqedsymbol
+
+\def\simpleqedsymbol{
+ \makebox[1em]{\rlap{\textcolor{main-text!12!paper}{\rule[-0.1em]{.95em}{.95em}}}{\kern.07em\raisebox{.07em}{\textcolor{paper}{\rule[-0.1em]{.81em}{.81em}}}\kern.07em}}}
+\DeclareRobustCommand{\simpleqed}{%
+ \ifmmode \quad\hbox{\simpleqedsymbol}
+ \else
+ \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill
+ \quad\hbox{\simpleqedsymbol}%
+ \fi
+}
+
+\def\@endtheorem{\popQED\endtrivlist\@endpefalse}
+
+\bool_if:NTF \l__minimalist_fast_bool
+ {
+ \RequirePackage { hyperref }
+ \hypersetup { draft }
+ }
+ {
+ \RequirePackage { hyperref }
+ \RequirePackage { bookmark }
+ \hypersetup{ hidelinks, linktoc = all }
+ \bookmarksetup{ numbered }
+ \renewcommand\Hy@numberline[1]{#1.~}
+ % https://tex.stackexchange.com/a/1821
+ % Add the bookmark of ToC
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
+
+\PassOptionsToPackage { theorem-style = { remark = simple-inline, proof = proof } } { projlib-theorem }
+
+\RequirePackage { projlib-theorem }
+
+\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
+
+\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name, proof } { shared counter = subsection }
+
+\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+
+\SetTheorem { remark }
+ {
+ name style = {
+ , heading style = {
+ \g_minimalist_title_font_common_tl \textit
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+
+\bool_if:NF \l__projlib_theorem_complexname_bool
+ {
+ \exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
+ {
+ name style = {
+ , crefname style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , Crefname style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+
+ \SetTheorem { remark }
+ {
+ name style = {
+ , crefname style = {
+ \g_minimalist_title_font_common_tl \textit
+ }
+ , Crefname style = {
+ \g_minimalist_title_font_common_tl \textit
+ }
+ , numbering style = { \minimalist_apply_title_numbering_style_static:n }
+ }
+ }
+ }
+
+\PassOptionsToPackage { many } { tcolorbox }
+\RequirePackage { tcolorbox }
+\bool_if:NT \l__minimalist_fast_bool { \tcbstartdraftmode }
+
+
+\NewDocumentEnvironment { emphasis } { }
+ {
+ \LocallyStopLineNumbers
+ \enlargethispage{2mm}
+ \begin{tcolorbox}
+ [
+ enhanced ~ jigsaw, breakable, oversize,
+ % nobeforeafter,
+ left = .5em, right=0mm, top=0.5mm, bottom=0mm, boxrule=0pt,
+ colback=main-text!2!paper, frame ~ hidden,
+ borderline ~ west = {.3em} {0mm} {main-text!25!paper},
+ arc = 0.2mm,
+ ]
+ }
+ {
+ \end{tcolorbox}
+ \ResumeLineNumbers
+ }
+
+\hook_gput_code:nnn { env/quote/begin } { minimalist } { \small }
+
+%%================================
+%% Title block style
+%%================================
+\bool_if:NTF \l__minimalist_is_book_bool
+ {
+ \hook_gput_code:nnn { package/projlib-author/after } { minimalist }
+ {
+ \tl_gset:Nn \g__projlib_author_font_author_tl { \normalfont \minimalist_scshape: }
+ \tl_gset:Nn \g__projlib_author_font_institute_tl { \large \normalfont }
+ \tl_gset:Nn \g__projlib_author_font_address_tl { \large \normalfont \itshape }
+ \tl_gset:Nn \g__projlib_author_font_curraddr_tl { \large \normalfont \itshape }
+ \tl_gset:Nn \g__projlib_author_font_email_tl { \large \normalfont \ttfamily }
+ }
+
+ \RequirePackage { projlib-titlepage }
+ \renewcommand{\maketitle}{
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
+ }
+ {
+ \renewcommand{\@maketitle}
+ {
+ \LocallyStopLineNumbers
+ \begin{center}
+ \let\footnote\thanks
+ {\minimalist_bfseries:\sffamily\minimalist_scshape:\Large\@title}\\\bigskip
+ \color{main-text!80!paper}
+ {\small\minimalist_scshape:\@author}
+ \par\smallskip\vspace{-\parskip}
+ {\small\@date}
+ \end{center}
+ \projlib_author_if_content_empty:nT { \@date } { \medskip }
+ \medskip\par
+ \ResumeLineNumbers
+ }
+
+ \hook_gput_code:nnn { cmd/maketitle/after } { minimalist } { \thispagestyle{fancy} }
+
+%%================================
+%% Abstract style
+%%================================
+ \renewenvironment{abstract}
+ {
+ \LocallyStopLineNumbers
+ \vspace{-.5\baselineskip}
+ \begin{center}
+ { \g_minimalist_title_font_section_tl \minimalist_scshape: \small\abstractname}\\
+ \vspace{-.3\baselineskip}
+ \begin{minipage}[t]{.833\textwidth}
+ \vspace{0pt}
+ \color{main-text!80!paper}
+ \footnotesize
+ \parindent=2em
+ }
+ {
+ \end{minipage}
+ \end{center}
+ \medskip
+ \ResumeLineNumbers
+ }
+
+%%================================
+%% Keyword environment
+%%================================
+ \DefineMultilingualText { \keywordname }
+ {
+ EN = Keywords ,
+ FR = Mots~clés ,
+ DE = Schlüsselwörter ,
+ IT = Parole~chiave ,
+ PT = Palavras~chave ,
+ BR = Palavras~chave ,
+ ES = Palabras~clave ,
+ CN = 关键词 ,
+ TC = 關鍵詞 ,
+ JP = キーワード ,
+ RU = Ключевые~слова ,
+ }
+
+ \newenvironment{keyword}{
+ \LocallyStopLineNumbers
+ \vspace{-.75\baselineskip}
+ \begin{center}
+ {\minimalist_bfseries:\minimalist_scshape:\small\keywordname}\\
+ \vspace{-.3\baselineskip}
+ \begin{minipage}[t]{.833\textwidth}
+ \vspace{0pt}
+ \color{main-text!80!paper}
+ \footnotesize
+ \parindent=2em
+ \begin{center}
+ }{
+ \end{center}
+ \end{minipage}
+ \end{center}
+ \medskip
+ \ResumeLineNumbers
+ }
+ } % end of \bool_if:NTF \l__minimalist_is_book_bool
+
+%%================================
+%% Simulate features of amsart
+%%================================
+\PassOptionsToPackage { amsfashion } { projlib-author }
+\RequirePackage { projlib-author }
+
+%%================================
+%% Special adjustment
+%%================================
+\setcounter{tocdepth}{1}
+
+\crefformat { chapter } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { chapter } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { section } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { section } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { subsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\crefformat { subsubsection } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+\labelcrefformat { subsubsection } { #2 \minimalist_apply_title_numbering_style_static:n {#1} #3 }
+
+\endinput
+%%
+%% End of file `minimalist/minimalist-stream.sty'.
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 77be9865b6..dbc9de5a03 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist}
- {2022/09/03} {}
+ {2023/01/02} {}
{A simple and clear style for articles and books}
\keys_define:nn { minimalist }
@@ -88,7 +88,8 @@
%% Line numbers
%%================================
\PassOptionsToPackage { pagewise,mathlines } { lineno }
-\RequirePackage { linenoamsmath }
+\RequirePackage { amsmath }
+\RequirePackage { lineno }
\renewcommand{\linenumberfont}{\ttfamily\color{main-text!7!paper}\footnotesize}
\setlength{\linenumbersep}{1em}
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 4620adb745..7d2debb6bf 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{minimart}
- {2022/09/03} {}
+ {2023/01/02} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
@@ -34,6 +34,15 @@
, draft .initial:n = { false }
, fast .bool_set:N = \l__minimclass_fast_bool
+ , print .bool_set:N = \l__minimclass_print_mode_bool
+ , print .initial:n = { false }
+ , print mode .bool_set:N = \l__minimclass_print_mode_bool
+ , print~mode .bool_set:N = \l__minimclass_print_mode_bool
+ , print-mode .bool_set:N = \l__minimclass_print_mode_bool
+ , print version .bool_set:N = \l__minimclass_print_mode_bool
+ , print~version .bool_set:N = \l__minimclass_print_mode_bool
+ , print-version .bool_set:N = \l__minimclass_print_mode_bool
+
, classical .bool_set:N = \l__minimclass_classical_bool
, classical .initial:n = { false }
@@ -47,15 +56,9 @@
\str_set:Nn \l__minimclass_custom_font_file_str { #1 }
}
, load custom font file .default:n = { minimalist.font }
- , load~custom~font~file .code:n = {
- \bool_set_true:N \l__minimclass_load_custom_font_file_bool
- \str_set:Nn \l__minimclass_custom_font_file_str { #1 }
- }
+ , load~custom~font~file .meta:n = { load custom font file = { #1 } }
, load~custom~font~file .default:n = { minimalist.font }
- , load-custom-font-file .code:n = {
- \bool_set_true:N \l__minimclass_load_custom_font_file_bool
- \str_set:Nn \l__minimclass_custom_font_file_str { #1 }
- }
+ , load-custom-font-file .meta:n = { load custom font file = { #1 } }
, load-custom-font-file .default:n = { minimalist.font }
@@ -80,6 +83,19 @@
\bool_set_false:N \l__minimclass_useindent_bool
}
+\NewDocumentCommand \IfPrintModeTF { m m }
+ {
+ \bool_if:NTF \l__minimclass_print_mode_bool { #1 } { #2 }
+ }
+\NewDocumentCommand \IfPrintModeT { m }
+ {
+ \bool_if:NT \l__minimclass_print_mode_bool { #1 }
+ }
+\NewDocumentCommand \IfPrintModeF { m }
+ {
+ \bool_if:NF \l__minimclass_print_mode_bool { #1 }
+ }
+
%%================================
%% Page layout
%%================================
@@ -186,6 +202,7 @@
{
\setsansfont { texgyreheros }
[
+ Extension = .otf ,
Scale = MatchUppercase ,
UprightFont = *-regular ,
BoldFont = *-bold ,
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index 45908a0e44..be112f4f52 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{minimbook}
- {2022/09/03} {}
+ {2023/01/02} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }
@@ -34,6 +34,15 @@
, draft .initial:n = { false }
, fast .bool_set:N = \l__minimclass_fast_bool
+ , print .bool_set:N = \l__minimclass_print_mode_bool
+ , print .initial:n = { false }
+ , print mode .bool_set:N = \l__minimclass_print_mode_bool
+ , print~mode .bool_set:N = \l__minimclass_print_mode_bool
+ , print-mode .bool_set:N = \l__minimclass_print_mode_bool
+ , print version .bool_set:N = \l__minimclass_print_mode_bool
+ , print~version .bool_set:N = \l__minimclass_print_mode_bool
+ , print-version .bool_set:N = \l__minimclass_print_mode_bool
+
, classical .bool_set:N = \l__minimclass_classical_bool
, classical .initial:n = { false }
@@ -47,15 +56,9 @@
\str_set:Nn \l__minimclass_custom_font_file_str { #1 }
}
, load custom font file .default:n = { minimalist.font }
- , load~custom~font~file .code:n = {
- \bool_set_true:N \l__minimclass_load_custom_font_file_bool
- \str_set:Nn \l__minimclass_custom_font_file_str { #1 }
- }
+ , load~custom~font~file .meta:n = { load custom font file = { #1 } }
, load~custom~font~file .default:n = { minimalist.font }
- , load-custom-font-file .code:n = {
- \bool_set_true:N \l__minimclass_load_custom_font_file_bool
- \str_set:Nn \l__minimclass_custom_font_file_str { #1 }
- }
+ , load-custom-font-file .meta:n = { load custom font file = { #1 } }
, load-custom-font-file .default:n = { minimalist.font }
@@ -80,6 +83,19 @@
\bool_set_false:N \l__minimclass_useindent_bool
}
+\NewDocumentCommand \IfPrintModeTF { m m }
+ {
+ \bool_if:NTF \l__minimclass_print_mode_bool { #1 } { #2 }
+ }
+\NewDocumentCommand \IfPrintModeT { m }
+ {
+ \bool_if:NT \l__minimclass_print_mode_bool { #1 }
+ }
+\NewDocumentCommand \IfPrintModeF { m }
+ {
+ \bool_if:NF \l__minimclass_print_mode_bool { #1 }
+ }
+
%%================================
%% Page layout
%%================================
@@ -186,6 +202,7 @@
{
\setsansfont { texgyreheros }
[
+ Extension = .otf ,
Scale = MatchUppercase ,
UprightFont = *-regular ,
BoldFont = *-bold ,
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 9d9f00ec58..99a6820c2f 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -19,84 +19,84 @@
%<*ProjLib>
\ProvidesExplPackage
{ProjLib}
- {2022/11/15} {}
+ {2023/01/01} {}
{Collective interface of the ProjLib toolkit}
%</ProjLib>
%
%<*projlib-author>
\ProvidesExplPackage
{projlib-author}
- {2022/11/15} {}
+ {2023/01/01} {}
{Enhanced author information block}
%</projlib-author>
%
%<*projlib-datetime>
\ProvidesExplPackage
{projlib-datetime}
- {2022/11/15} {}
+ {2023/01/01} {}
{Convert numeric date-time string to natural language}
%</projlib-datetime>
%
%<*projlib-draft>
\ProvidesExplPackage
{projlib-draft}
- {2022/11/15} {}
+ {2023/01/01} {}
{Useful commands during draft stage}
%</projlib-draft>
%
%<*projlib-font>
\ProvidesExplPackage
{projlib-font}
- {2022/11/15} {}
+ {2023/01/01} {}
{Font selection and configuration}
%</projlib-font>
%
%<*projlib-language>
\ProvidesExplPackage
{projlib-language}
- {2022/11/15} {}
+ {2023/01/01} {}
{Multi-language configuration}
%</projlib-language>
%
%<*projlib-logo>
\ProvidesExplPackage
{projlib-logo}
- {2022/11/15} {}
+ {2023/01/01} {}
{The ProjLib logo}
%</projlib-logo>
%
%<*projlib-math>
\ProvidesExplPackage
{projlib-math}
- {2022/11/15} {}
+ {2023/01/01} {}
{Efficient math setup}
%</projlib-math>
%
%<*projlib-paper>
\ProvidesExplPackage
{projlib-paper}
- {2022/11/15} {}
+ {2023/01/01} {}
{Configuration of the paper style}
%</projlib-paper>
%
%<*projlib-text>
\ProvidesExplPackage
{projlib-text}
- {2022/11/15} {}
+ {2023/01/01} {}
{Text-related commands}
%</projlib-text>
%
%<*projlib-theorem>
\ProvidesExplPackage
{projlib-theorem}
- {2022/11/15} {}
+ {2023/01/01} {}
{Configuration of theorem-like environments}
%</projlib-theorem>
%
%<*projlib-titlepage>
\ProvidesExplPackage
{projlib-titlepage}
- {2022/11/15} {}
+ {2023/01/01} {}
{Commands for rendering the title page}
%</projlib-titlepage>
@@ -2514,6 +2514,35 @@
\RequirePackage { ebgaramond-maths }
\RequirePackage { ebgaramond }
\cs_undefine:c { Bbbk }
+ \cs_undefine:c { Top }
+ % https://tex.stackexchange.com/a/215272
+ \DeclareSymbolFont{ntxletters}{OML}{ntxmi}{m}{it}
+ \SetSymbolFont{ntxletters}{bold}{OML}{ntxmi}{b}{it}
+ \re@DeclareMathSymbol{\leftharpoonup}{\mathrel}{ntxletters}{"28}
+ \re@DeclareMathSymbol{\leftharpoondown}{\mathrel}{ntxletters}{"29}
+ \re@DeclareMathSymbol{\rightharpoonup}{\mathrel}{ntxletters}{"2A}
+ \re@DeclareMathSymbol{\rightharpoondown}{\mathrel}{ntxletters}{"2B}
+ \re@DeclareMathSymbol{\triangleleft}{\mathbin}{ntxletters}{"2F}
+ \re@DeclareMathSymbol{\triangleright}{\mathbin}{ntxletters}{"2E}
+ \re@DeclareMathSymbol{\partial}{\mathord}{ntxletters}{"40}
+ \re@DeclareMathSymbol{\flat}{\mathord}{ntxletters}{"5B}
+ \re@DeclareMathSymbol{\natural}{\mathord}{ntxletters}{"5C}
+ \re@DeclareMathSymbol{\star}{\mathbin}{ntxletters}{"3F}
+ \re@DeclareMathSymbol{\smile}{\mathrel}{ntxletters}{"5E}
+ \re@DeclareMathSymbol{\frown}{\mathrel}{ntxletters}{"5F}
+ \re@DeclareMathSymbol{\sharp}{\mathord}{ntxletters}{"5D}
+ \re@DeclareMathAccent{\vec}{\mathord}{ntxletters}{"7E}
+ \sys_if_engine_pdftex:F
+ {
+ \setsansfont { texgyreheros }
+ [
+ Scale = MatchUppercase ,
+ UprightFont = *-regular ,
+ BoldFont = *-bold ,
+ ItalicFont = *-italic ,
+ BoldItalicFont = *-bolditalic ,
+ ]
+ }
\projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } }
\bool_gset_true:N \g_projlib_font_already_set_bool
}
@@ -2570,6 +2599,14 @@
\bool_gset_true:N \g_projlib_font_already_set_bool
}
+% \bool_if:NF \l__projlib_font_lmodern_bool
+% {
+% \hook_gput_code:nnn { package/tikz-cd/after } { projlib-font }
+% {
+% \tikzcdset{arrow~style={math~font}}
+% }
+% }
+
\PassOptionsToPackage { verbose = silent } { microtype }
\RequirePackage { microtype }
%</projlib-font>
@@ -5275,7 +5312,7 @@
\keys_define:nn { projlib-titlepage-config }
{
, logo .code:n = { \tl_set:Nn \l_projlib_titlepage_logo_tl { \tl_trim_spaces:n { #1 } } }
- , logo .initial:n = { \scalebox { 2 } { \ProjLib } }
+ , logo .initial:n = { * }
, title .code:n = { \tl_set:Nn \l_projlib_titlepage_title_tl { \tl_trim_spaces:n { #1 } } }
, subtitle .code:n = { \tl_set:Nn \l_projlib_titlepage_subtitle_tl { \tl_trim_spaces:n { #1 } } }
, author .code:n = { \tl_set:Nn \l_projlib_titlepage_author_tl { \tl_trim_spaces:n { #1 } } }
@@ -5304,6 +5341,17 @@
\colorlet { titlepage-main } { blue!50!cyan!50!black }
\colorlet { titlepage-back } { blue!50!cyan!15!yellow!25 }
+\cs_new_protected:Nn \projlib_titlepage_show_logo:n
+ {
+ \tl_if_eq:NnTF \l_projlib_titlepage_logo_tl { \tl_trim_spaces:n { * } }
+ {
+ #1
+ }
+ {
+ \tl_use:N \l_projlib_titlepage_logo_tl
+ }
+ }
+
\cs_new_protected:Nn \projlib_titlepage_render:n
{
\keys_set:nn { projlib-titlepage-config } { #1 }
@@ -5333,7 +5381,7 @@
\node[text~width=.3\paperwidth, text~height=.2\paperheight, align=flush~left]
at ($(current~page.north~west)+(.32\paperwidth,-.17\paperheight)$)
{
- \l_projlib_titlepage_logo_tl
+ \projlib_titlepage_show_logo:n { \scalebox { 2 } { \ProjLib } }
};
\node[text~width=.8\paperwidth, text~height=.5\paperheight, align=flush~left]
at ($(current~page.north~west)+(.57\paperwidth,-.28\paperheight)$)
@@ -5367,7 +5415,7 @@
\node[text~width=.3\paperwidth, text~height=.2\paperheight, align=flush~left]
at ($(current~page.north~west)+(.27\paperwidth,-.15\paperheight)$)
{
- \l_projlib_titlepage_logo_tl
+ \projlib_titlepage_show_logo:n { \scalebox { 2 } { \ProjLib } }
};
\node[text~width=.8\paperwidth, text~height=.5\paperheight, align=flush~left]
at ($(current~page.north~west)+(.52\paperwidth,-.28\paperheight)$)
@@ -5392,6 +5440,72 @@
};
\end{tikzpicture}
}
+
+\cs_new_protected:Nn \projlib_titlepage_render_with_style_academic:
+ {
+ \begin{tikzpicture}[overlay,remember~picture]
+ \fill[color=titlepage-main] ($(current~page.south~west)$) rectangle ($(current~page.north~east)$);
+ \fill[color=white] ($(current~page.south~west)+(0,.3\paperheight)$) rectangle ($(current~page.north~east)+(0,-.3\paperheight)$);
+ \node[text~width=.3\paperwidth, text~height=.2\paperheight, align=flush~center]
+ at ($(current~page.north)+(0pt,-.15\paperheight)$)
+ {
+ \projlib_titlepage_show_logo:n { \color{white} \scalebox { 2 } { \ProjLibText } }
+ };
+ \node[text~width=.8\paperwidth, text~height=.5\paperheight, align=flush~center]
+ at ($(current~page.north)+(0pt,-.25\paperheight)$)
+ {
+ \color{titlepage-main}
+ \sffamily
+ \fontsize{24pt}{36pt}\selectfont
+ \textsc{ \l_projlib_titlepage_title_tl }\\[1.5em]
+ \fontsize{18pt}{27pt}\selectfont
+ \l_projlib_titlepage_subtitle_tl
+ };
+ \node[text~width=.5\paperwidth, text~height=.4\paperheight, align=flush~center]
+ at ($(current~page.south)+(0pt,.36\paperheight)$)
+ {
+ \color{white}
+ \fontsize{16pt}{24pt}\selectfont
+ \textsc{ \l_projlib_titlepage_author_tl }\\[1em]
+ \fontsize{12pt}{18pt}\selectfont
+ \l_projlib_titlepage_date_tl
+ };
+ \end{tikzpicture}
+ }
+
+\cs_new_protected:Nn \projlib_titlepage_render_with_style_minimalist:
+ {
+ \begin{tikzpicture}[overlay,remember~picture]
+ % \fill[color=white] ($(current~page.south~west)$) rectangle ($(current~page.north~east)$);
+ \node[text~width=.3\paperwidth, text~height=.2\paperheight, align=flush~left]
+ at ($(current~page.north~west)+(.32\paperwidth,-.2\paperheight)$)
+ {
+ \projlib_titlepage_show_logo:n { \scalebox { 2 } { \ProjLib } }
+ };
+ \node[text~width=.8\paperwidth, text~height=.5\paperheight, align=flush~left]
+ at ($(current~page.north~west)+(.57\paperwidth,-.22\paperheight)$)
+ {
+ \sffamily
+ \fontsize{24pt}{36pt}\selectfont
+ \textsc{ \l_projlib_titlepage_title_tl }\\[1.5em]
+ \fontsize{18pt}{27pt}\selectfont
+ \l_projlib_titlepage_subtitle_tl
+ };
+ % \node[text~width=.5\paperwidth, text~height=.4\paperheight, align=flush~left]
+ % at ($(current~page.south)+(.135\paperwidth,.35\paperheight)$)
+ \node[text~width=.8\paperwidth, text~height=.4\paperheight, align=flush~left]
+ at ($(current~page.south~west)+(.57\paperwidth,.45\paperheight)$)
+ {
+ \color{.!50}
+ % \begin{flushright}
+ \fontsize{16pt}{24pt}\selectfont
+ \textsc{ \l_projlib_titlepage_author_tl }\\[1em]
+ \fontsize{12pt}{18pt}\selectfont
+ \l_projlib_titlepage_date_tl
+ % \end{flushright}
+ };
+ \end{tikzpicture}
+ }
%</projlib-titlepage>
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/projlib/README.md b/macros/latex/contrib/projlib/README.md
index 2e85b88afa..3637bb2e2d 100644
--- a/macros/latex/contrib/projlib/README.md
+++ b/macros/latex/contrib/projlib/README.md
@@ -6,7 +6,7 @@
> **ProjLib** can be interpreted as "***Proj**ect **Lib**rary*" (in English), or as "***Proj**et **Lib**re*" (in French, meaning "*Free Project*").
-> **This bundle is dated 2022/11/15. Please note that the documentations are not yet up-to-date.**
+> **This bundle is dated 2022/11/20. Please note that the documentations are not yet up-to-date.**
## Introduction
diff --git a/macros/latex/contrib/xput/README.md b/macros/latex/contrib/xput/README.md
index 8843656c15..6471ea4556 100644
--- a/macros/latex/contrib/xput/README.md
+++ b/macros/latex/contrib/xput/README.md
@@ -1,46 +1,99 @@
-# Xput
+## What is Xput
-__Declarative Desktop Publishing with LaTeX__
+Xput is a LaTeX class to create graphic rich, layouted, perfectly typeset, and print ready PDFs just from a text file. It provides simple macros to put content on a page declaratively. Generic templates, automatic grid layout, and a simple and consistent user interface help you to create layouts with ease.
-The Xput LaTeX class provides a collection of macros that wrap the macro put to offer a more desktop-publishing-like experience for creating graphic rich documents like photo books.
-With Xput you can create single- and double-sided documents, create pages with margins, safety margins and bleed, use templates, align text and graphics in a grid, wrap text across multiple pages and use before pages.
-Generic templates, automatic grid layout and a simple and consistent user interface make it easier than ever to create graphic rich documents with LaTeX.
-Under the hood Xput uses the TikZ and tcolorbox packages, ImageMagick and Inkscape.
+The integration of Inkscape allows your to create beautiful box shadows. Text shadows and SVG filters are ideas for future releases.
-Xput is distributed under the [LaTeX Project Public License](https://www.latex-project.org/lppl/lppl-1-3c/) version 1.3c or later.
+The integration of ImageMagick allows you to configure the PDF export to create web, print or preview versions of your document. Parallelized image optimization, caching and a draft mode enable fast PDF creation and a responsive workflow, even for large documents with lots of photos and graphics.
-To submit bug reports and feature requests go to the official repository on [GitHub](https://github.com/friedemannbartels/xput/issues).
+Xput also integrates the TikZ and tcolorbox LaTeX packages.
-## Installation
+## Quick Start
-In general, you should use the package manager shipped with your TeX distribution to install Xput. Alternatively you can copy the contents of [xput-1.0.1.tds.zip](https://github.com/friedemannbartels/xput/releases/download/1.0.1/xput-1.0.1.tds.zip) to your local TeX directory tree.
+### Generic Templates
-### Command Line Tools
+Generic templates are the easiest way to put content on a page. The template name describes the layout. You can arrange [l]andscape, [p]ortrait, [s]quare, [w]ide, [g]olden ratio, g[o]lden upright ratio or [f]lexible placeholders in rows [-]. A valid template name for example is `sg-ff`. Notice you cannot combine flexible with fixed aspect ratio placeholders within a row.
-For image optimization, shadow creation and preflight perform these installation steps:
+```latex
+\template{sg}{
+ \text{Hello Xput}
+ \graphic{IMG1234}
+}
+```
-- Add the directory `tex/latex/xput/scripts` in your local TeX file tree to your `$PATH`.
-- Add `xputserver` to the list of `shell_escape_commands` in your `texmf.cnf`.
-- Install ImageMagick 7.0 or newer and Inkscape 1.0 or newer.
+### Custom Templates and the Grid
-The setup is tested with the engines `xelatex`, `pdflatex` and `lualatex` and the shells `zsh`, `bash` and `dash`.
+You can use the grid to layout content on a page. The grid has rows with cells. You can set width relations between cells and height relations between rows. You can give cells a explicit aspect ratio by adding a `!`.
-## Known Issues
+```latex
+\newtemplate{my template}{
+ \grid{
+ {[2]{2!}{3!}}
+ {[2]{1}}
+ }
+ \placeholder{0 0 1 1}
+}
+```
-### LuaLaTeX
+You can set margin and gutter for a single grid or on document or page level.
-Setting the page width and height as document option or in the preamble does not work with LuaLaTeX. You need to set the page width and height after `begin{document}`.
-Multi-threaded batch processing of images does not work with LuaLaTeX too.
+### Graphics
-### LuaLaTeX and pdfLaTeX
+Adding a graphic to a page is simple. You can scale, position and sharpen a graphic.
-LuaLaTeX and pdfLaTeX only work with restricted shell access. When running with unrestricted shell access (`--shell-escape`), image optimization, shadow creation and preflight do not work.
+```latex
+\page{
+ \graphic[
+ scale=1.2,
+ hpos=0.3,
+ unsharp=3x1
+ ]{filename}
+}
+```
-## Development
+### Borders and Shadows
+
+You can add borders and box shadows to graphics and text frames.
+
+```latex
+\newborder{my border}{
+ width=2mm,
+ color=magenta,
+ radius=5mm
+}
+\newshadow{my shadow}{
+ size=5,
+ color=magenta,
+ opacity=1
+}
+
+\page{
+ \graphic[
+ shadow=my shadow,
+ border=my border,
+ border radius=10mm
+ ]{filename}
+}
+```
+
+Have a look at the [examples](https://github.com/friedemannbartels/xput/tree/main/doc) and start playing with these.
+
+For a complete reference have a look at the [manual](https://github.com/friedemannbartels/xput/raw/main/doc/xputmanual.pdf).
+
+## Installation
+
+In general, you should use the package manager shipped with your TeX distribution to install Xput. Alternatively you can copy the contents of [xput.tds.zip](https://github.com/friedemannbartels/xput/releases/download/v1.0.2/xput.tds.zip) to your local TeX directory tree.
+
+### Command Line Tools
+
+For image optimization, shadow creation and preflight perform these installation steps:
-Run visual regression tests with the following command:
+- Add the directory _tex/latex/xput/scripts_ in your local TeX file tree to your `$PATH`.
+
+- Add `xputserver` to the list of `shell_escape_commands` in your top level _texmf.cnf_. Find your _texmf.cnf_ with the command `kpsewhich texmf.cnf`.
+
+- Install ImageMagick 7.0 or newer and Inkscape 1.0 or newer.
+
+## Development
- cd test
- xput test
-
-The tests are not included in the [CTAN](https://www.ctan.org/pkg/xput) package. You find the tests on [GitHub](https://github.com/friedemannbartels/xput/tree/main/test).
+Run visual regression tests inside the _tests_ directory with the command `xput test`
diff --git a/macros/latex/contrib/xput/doc/example-book.tex b/macros/latex/contrib/xput/doc/example-book.tex
index f770532e69..d318eba582 100644
--- a/macros/latex/contrib/xput/doc/example-book.tex
+++ b/macros/latex/contrib/xput/doc/example-book.tex
@@ -98,7 +98,7 @@
\lipsum[1][1-7]
}
}
-
+
\newgraphic{koepi wide}{vpos=0.43, file=koepi}
\page[double, page graphic=koepi wide, before page=, color=white]{
\rightpage{
diff --git a/macros/latex/contrib/xput/doc/example-grid.tex b/macros/latex/contrib/xput/doc/example-grid.tex
index 1a5c707dac..a1c341cd66 100644
--- a/macros/latex/contrib/xput/doc/example-grid.tex
+++ b/macros/latex/contrib/xput/doc/example-grid.tex
@@ -112,7 +112,7 @@
A grid with a fixed height relation between rows.
}
}
-
+
\page[gutter=10mm]{
\setgrid[
width=0.5\width,
@@ -132,7 +132,7 @@
{{1}}
}
}
-
+
\page{
\setgrid[width=\height]{
{{1}{1}}
diff --git a/macros/latex/contrib/xput/doc/example-template.tex b/macros/latex/contrib/xput/doc/example-template.tex
index a70acfd481..eb0b773601 100644
--- a/macros/latex/contrib/xput/doc/example-template.tex
+++ b/macros/latex/contrib/xput/doc/example-template.tex
@@ -26,7 +26,7 @@
This is a generic template.
}
}
-
+
\newtemplate{my template}{
\setgrid[height=\height-20mm]{
{[1]{1!}{1}}
@@ -36,7 +36,7 @@
\placeholder{1 0 2 1}
\placeholder{0 1 2 2}
}
-
+
\template[outer margin=10mm]{my template}{
\text{
This is a custom template.
diff --git a/macros/latex/contrib/xput/doc/example-text.tex b/macros/latex/contrib/xput/doc/example-text.tex
index 421532418e..9be397a042 100644
--- a/macros/latex/contrib/xput/doc/example-text.tex
+++ b/macros/latex/contrib/xput/doc/example-text.tex
@@ -33,7 +33,7 @@
}
\usetext[lorem]
}
-
+
\page{
\usetext[lorem]
\tcbset{
diff --git a/macros/latex/contrib/xput/doc/xputmanual-layout-guides.pdf b/macros/latex/contrib/xput/doc/xputmanual-layout-guides.pdf
index ec1763bf5d..0ec732a859 100644
--- a/macros/latex/contrib/xput/doc/xputmanual-layout-guides.pdf
+++ b/macros/latex/contrib/xput/doc/xputmanual-layout-guides.pdf
Binary files differ
diff --git a/macros/latex/contrib/xput/doc/xputmanual-layout-guides.tex b/macros/latex/contrib/xput/doc/xputmanual-layout-guides.tex
index 1e53fb0bf7..023858736a 100644
--- a/macros/latex/contrib/xput/doc/xputmanual-layout-guides.tex
+++ b/macros/latex/contrib/xput/doc/xputmanual-layout-guides.tex
@@ -18,6 +18,7 @@
gutter=5mm,
page width=20cm,
page height=20cm,
+ safety margin=2mm,
draft,
safezone,
grid,
diff --git a/macros/latex/contrib/xput/doc/xputmanual.pdf b/macros/latex/contrib/xput/doc/xputmanual.pdf
index 7ce8804b7a..ccb1e39f44 100644
--- a/macros/latex/contrib/xput/doc/xputmanual.pdf
+++ b/macros/latex/contrib/xput/doc/xputmanual.pdf
Binary files differ
diff --git a/macros/latex/contrib/xput/doc/xputmanual.tex b/macros/latex/contrib/xput/doc/xputmanual.tex
index fbfc3805c5..ff75b4eecf 100644
--- a/macros/latex/contrib/xput/doc/xputmanual.tex
+++ b/macros/latex/contrib/xput/doc/xputmanual.tex
@@ -18,7 +18,7 @@
\usepackage{tikz}
\OnlyDescription
\hypersetup{pdfborder={0 0 0}}
-\def\Xputversion{1.0.1}
+\def\Xputversion{1.0.2}
\begin{document}
diff --git a/macros/latex/contrib/xput/scripts/xput b/macros/latex/contrib/xput/scripts/xput
index 3727bb3dc1..57203c7a5d 100755
--- a/macros/latex/contrib/xput/scripts/xput
+++ b/macros/latex/contrib/xput/scripts/xput
@@ -13,6 +13,8 @@
# LaTeX version 2008/05/04 or later.
#
+version=1.0.2
+
OK="$( tput setaf 2 )•$( tput sgr0 )"
FAILED="$( tput setaf 1 )$( tput bold )x$( tput sgr0 )"
NEW="$( tput setaf 3 )$( tput bold )+$( tput sgr0 )"
@@ -380,27 +382,33 @@ perf() {
usage() {
cat <<HELP_USAGE
-usage: $(basename $0) test [-cs] [-e engine] [-d density] pattern
- or: $(basename $0) approve [-e engine] pattern
- or: $(basename $0) compare [-d density] files
- or: $(basename $0) perf [-cs] [-e engine] file
+usage: xput test [-cs] [-e ENGINE] [-d DENSITY] [PATTERN]
+ xput approve [-e ENGINE] [PATTERN]
+ xput compare [-d DENSITY] FILE FILE
+ xput perf [-cs] [-e ENGINE] FILE
+ xput --help
+ xput --version
-c clear cache
-s enable shell escape
- -d density set density in ppi (default 72)
- -e engine set latex engine (default xelatex)
+ -d DENSITY density in ppi (default 72)
+ -e ENGINE latex engine (default xelatex)
- Running \`$(basename $0) test\` creates pdf files for all tex files matching the
+ Running \`xput test\` creates pdf files for all tex files matching the
pattern and performs a visual regression test. If no pattern is specified,
all files in the current directory are tested except for files whose names
begin with an underscore.
- Running \`$(basename $0) approve\` replaces the reference files with the test files.
+ Running \`xput approve\` replaces the reference files with the test files.
- Running \`$(basename $0) compare\` creates a visual diff for two pdf files.
+ Running \`xput compare\` creates a visual diff for two pdf files.
- Running \`$(basename $0) perf\` measures the time for creating a pdf file from the
+ Running \`xput perf\` measures the time for creating a pdf file from the
given tex file.
+
+ Running \`xput --help\` returns this man page.
+
+ Running \`xput --version\` returns the Xput version.
HELP_USAGE
}
@@ -504,6 +512,9 @@ perf)
perf $clear $shell $engine $1
;;
+--version)
+ echo Xput $version
+ ;;
*)
usage
esac
diff --git a/macros/latex/contrib/xput/scripts/xputserver b/macros/latex/contrib/xput/scripts/xputserver
index 924bfe0da0..8e2baac919 100755
--- a/macros/latex/contrib/xput/scripts/xputserver
+++ b/macros/latex/contrib/xput/scripts/xputserver
@@ -13,6 +13,8 @@
# LaTeX version 2008/05/04 or later.
#
+version=1.0.2
+
_convert() {
turbo=$1
filename=$2
@@ -229,18 +231,27 @@ import() {
}
startturbo() {
- file=$1
+ file="$(echo $1 | sed -e 's/\.pdflatex$//g')"
if [ -f $file.tex ]; then
tmpdir=$( mktemp -d 2>/dev/null )/xputturbo$( date "+%Y%m%d%H%M%S" )$RANDOM
mkdir $tmpdir
cp $file.tex $tmpdir/xputturbobatchoptimizexyz.tex
- engine=$(echo $(ps -p $PPID -o command | sed -e 's/[A-Z]//g'| sed -e 's/ .*//g' | tr -d '\n'))
+ command=$(echo $(ps -p $PPID -o command ))
+ engine=$(echo $command | sed -e 's/^[A-Z ]*//g' | sed -e 's/ .*//g' | tr -d '\n')
+
+ case "$command" in
+ *-shell-escape*)
+ shellescape="--shell-escape"
+ ;;
+ esac
+
if [ "$engine" = "xelatex" ]; then
nopdf="-no-pdf"
fi
- $engine -interaction=batchmode $nopdf --output-directory $tmpdir $tmpdir/xputturbobatchoptimizexyz.tex > /dev/null
+
+ $engine $shellescape -interaction=batchmode $nopdf --output-directory $tmpdir $tmpdir/xputturbobatchoptimizexyz.tex > /dev/null
rm -rf $tmpdir
fi
@@ -285,11 +296,73 @@ batchoptimize() {
done
}
+usage() {
+ cat <<HELP_USAGE
+This script is intended for internal use of the Xput LaTeX class.
+
+usage: xputserver getwidth % FILE
+ xputserver optimize % FILE % FILENAME % EXTENSION % ORIGINALWIDTH % ORIGINALHEIGHT % CROPLEFT % CROPRIGHT % CROPTOP % CROPBOTTOM % DENSITY % WIDTH % HEIGHT % DOWNSAMPLETHRESHOLD % UNSHARP % QUALITY
+ xputserver makeshadow % FILENAME % STANDARDDEVIATION % OPACITY % COLOR % WIDTH % HEIGHT % FRAMEWIDTH % FRAMEHEIGHT % MARGIN % BORDERRADIUS
+ xputserver start [% import % [GRAPHICSPATH]] [% turbo % JOBNAME]
+ xputserver batchoptimize % BATCHLIST
+ xputserver --help
+ xputserver --version
+
+ FILE filename with extension (eg. IMG1234.JPEG)
+ FILENAME filename without extension (eg. IMG1234)
+ EXTENSION optimized file extension (.jpg|.png)
+ DENSITY density in ppi (eg. 72)
+ DOWNSAMPLETHRESHOLD downsample threshold (integer >= 100)
+ UNSHARP unsharp filter (eg. 2x1)
+ QUALITY quality (integer > 0, <= 100)
+ STANDARDDEVIATION standard deviation (decimal > 0.0)
+ OPACITY opacity (decimal >= 0.0, <= 1.0)
+ COLOR color string (eg. pink)
+ GRAPHICSPATH list of directories (eg. {images/}{tmp/})
+ JOBNAME LaTeX filename without extension (eg. my-document)
+ BATCHLIST a flat list of batch items where each batch item is
+ a flat list of the 15 parameters required by the
+ command \`xputserver optimize\`
+
+ All other parameters are length dimensions.
+ The command \`xputserver optimize\` expects integer values in the LaTeX
+ unit sp (eg. 65536).
+ The command \`xputserver makeshadow\` expects decimal values in a SVG
+ compatible unit (eg. 420.0pt).
+
+ Running \`xputserver getwidth\` returns the width in pixels for the given
+ image file.
+
+ Running \`xputserver optimize\` creates a cropped, rezised, sharpend and
+ compressed image and stores it in the cache directory.
+
+ Running \`xputserver makeshadow\` creates a shadow image and stores it in
+ the cache directory.
+
+ Running \`xputserver start\` with the import parameter triggers the image
+ import (see xputmanual.pdf chapter "Image Optimization").
+ Running the command with the parameter turbo, where the jobname is the
+ filename of the Xput document, processes the document in a special batch
+ mode, that creates a batch list and calls the command
+ \`xputserver batchoptimize\`.
+
+ Running \`xputserver batchoptimize\` optimizes multiple images in parallel.
+
+ Running \`xputserver --help\` returns this man page.
+
+ Running \`xputserver --version\` returns the Xput version.
+HELP_USAGE
+}
+
+if [ "$1" = --version ]; then
+ echo Xput Server $version
+ exit
+fi
+
input=$( echo "$@" | sed -e 's/\\//g' | sed -e 's/ %/%/g' | sed -e 's/% /%/g' )
IFS="%"
set -- $input
IFS=" "
-shift
case "$1" in
getwidth)
@@ -334,5 +407,5 @@ batchoptimize)
echo ok
;;
*)
- echo 🤖 Hi, I serve the Xput LaTeX class.
+ usage
esac
diff --git a/macros/latex/contrib/xput/tex/xput.cls b/macros/latex/contrib/xput/tex/xput.cls
index 6da33ee25d..a7fdd1c2bf 100644
--- a/macros/latex/contrib/xput/tex/xput.cls
+++ b/macros/latex/contrib/xput/tex/xput.cls
@@ -13,8 +13,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesClass{xput}[2022/12/19 declarative desktop publishing]
-\def\Xputversion{1.0.1}
+\ProvidesClass{xput}[2023/01/02 declarative desktop publishing]
+\def\Xputversion{1.0.2}
% packages
\RequirePackage{pgfopts}
@@ -3596,9 +3596,8 @@
\def\xput@err@noimportdir{errornoimportdir}
\def\xput@err@magicknotinstalled{errormagicknotinstalled}
\def\xput@err@inkscapenotinstalled{errorinkscapenotinstalled}
-\def\preventunrestrictedshellexecution{";-)" \%}
\newcommand\xput@getppi[1]{
- \immediate\openin\xput@scriptresult={|xputserver \preventunrestrictedshellexecution getwidth\% "#1"}
+ \immediate\openin\xput@scriptresult={|xputserver getwidth\% "#1"}
\ifeof\xput@scriptresult
\xput@errmsg@shellaccessforbidden{Ppi not calculated}
\else
@@ -3621,7 +3620,7 @@
\immediate\closein\xput@scriptresult
}
\newcommand\xput@optimizegraphic[2]{
- \immediate\openin\xput@scriptresult={|xputserver \preventunrestrictedshellexecution optimize\% "#1#2" \% "\xput@filename" \%\xput@optimizedext\%\the\numexpr\xput@originalgraphicwidth\%\the\numexpr\xput@originalgraphicheight\%\the\numexpr\xput@cropleft\%\the\numexpr\xput@cropright\%\the\numexpr\xput@croptop\%\the\numexpr\xput@cropbottom\%\the\numexpr\xput@density\%\the\numexpr\width\%\the\numexpr\height\%\xput@downsamplethreshold\%\xput@graphicoptionunsharp\%\xput@quality}
+ \immediate\openin\xput@scriptresult={|xputserver optimize\% "#1#2" \% "\xput@filename" \%\xput@optimizedext\%\the\numexpr\xput@originalgraphicwidth\%\the\numexpr\xput@originalgraphicheight\%\the\numexpr\xput@cropleft\%\the\numexpr\xput@cropright\%\the\numexpr\xput@croptop\%\the\numexpr\xput@cropbottom\%\the\numexpr\xput@density\%\the\numexpr\width\%\the\numexpr\height\%\xput@downsamplethreshold\%\xput@graphicoptionunsharp\%\xput@quality}
\ifeof\xput@scriptresult
\xput@errmsg@shellaccessforbidden{File not optimized}
\else
@@ -3639,7 +3638,7 @@
\immediate\closein\xput@scriptresult
}
\newcommand\xput@makeshadow[1]{
- \immediate\openin\xput@scriptresult={|xputserver \preventunrestrictedshellexecution makeshadow\%#1\%\xput@defaultshadowsize\%\xput@defaultshadowopacity\%\xput@defaultshadowcolor\%\the\xput@frameshadowwidth\%\the\xput@frameshadowheight\%\the\xput@frameshadowframewidth\%\the\xput@frameshadowframeheight\%\the\xput@frameshadowborder\%\the\xput@frameshadowradius}
+ \immediate\openin\xput@scriptresult={|xputserver makeshadow\%#1\%\xput@defaultshadowsize\%\xput@defaultshadowopacity\%\xput@defaultshadowcolor\%\the\xput@frameshadowwidth\%\the\xput@frameshadowheight\%\the\xput@frameshadowframewidth\%\the\xput@frameshadowframeheight\%\the\xput@frameshadowborder\%\the\xput@frameshadowradius}
\ifeof\xput@scriptresult
\edef\xput@processresult{\xput@err@shellaccessforbidden}
\xput@errmsg@shellaccessforbidden{Shadow not created}
@@ -3659,7 +3658,7 @@
\immediate\closein\xput@scriptresult
}
\def\xput@start{
- \immediate\openin\xput@scriptresult={|xputserver \preventunrestrictedshellexecution start\ifxput@import\%import\% "\ifdefined\Ginput@path\Ginput@path\fi" \fi\ifxput@isturbomode\%turbo\% "\jobname" \fi}
+ \immediate\openin\xput@scriptresult={|xputserver start\ifxput@import\%import\% "\ifdefined\Ginput@path\Ginput@path\fi" \fi\ifxput@isturbomode\%turbo\% "\jobname" \fi}
\ifeof\xput@scriptresult
\ifxput@import
\xput@errmsg@shellaccessforbidden{Import not working}
@@ -3689,7 +3688,7 @@
\global\edef\xput@batchlist{\xput@batchlist\% "#1#2" \% "\xput@filename" \%\xput@optimizedext\%\the\numexpr\xput@originalgraphicwidth\%\the\numexpr\xput@originalgraphicheight\%\the\numexpr\xput@cropleft\%\the\numexpr\xput@cropright\%\the\numexpr\xput@croptop\%\the\numexpr\xput@cropbottom\%\the\numexpr\xput@density\%\the\numexpr\width\%\the\numexpr\height\%\xput@downsamplethreshold\%\xput@graphicoptionunsharp\%\xput@quality}
}
\newcommand\xput@batchoptimize{
- \immediate\openin\xput@scriptresult={|xputserver \preventunrestrictedshellexecution batchoptimize\xput@batchlist}
+ \immediate\openin\xput@scriptresult={|xputserver batchoptimize\xput@batchlist}
\ifeof\xput@scriptresult
\else
\endlinechar=-1