summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-09-04 03:01:15 +0000
committerNorbert Preining <norbert@preining.info>2022-09-04 03:01:15 +0000
commit909458d2a89fa74c77683cbaf6f3b83861b186c3 (patch)
tree793c802255d76003c7d3ddc6b26275be75087914 /macros
parentaad0212913f1ba7176d3d187a33e955804ad271d (diff)
CTAN sync 202209040301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/colorist/colorart.cls71
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls71
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin102866 -> 101376 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex127
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty89
-rw-r--r--macros/latex/contrib/colorist/colorist.sty7
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.pdfbin53448 -> 53358 bytes
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.tex2
-rw-r--r--macros/latex/contrib/crefthe/crefthe.sty4
-rw-r--r--macros/latex/contrib/hereapplies/ChangeLog.md11
-rw-r--r--macros/latex/contrib/hereapplies/README.md37
-rw-r--r--macros/latex/contrib/hereapplies/hereapplies-doc.lyx1116
-rw-r--r--macros/latex/contrib/hereapplies/hereapplies-doc.pdfbin0 -> 364778 bytes
-rw-r--r--macros/latex/contrib/hereapplies/hereapplies-doc.tex230
-rw-r--r--macros/latex/contrib/hereapplies/hereapplies-example.pdfbin49764 -> 49420 bytes
-rw-r--r--macros/latex/contrib/hereapplies/hereapplies.sty49
-rw-r--r--macros/latex/contrib/hereapplies/lyx-module/hereapplies.module31
-rw-r--r--macros/latex/contrib/hereapplies/package.json11
-rw-r--r--macros/latex/contrib/minimalist/minimalist-classical.sty73
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin104902 -> 104027 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex145
-rw-r--r--macros/latex/contrib/minimalist/minimalist-plain.sty83
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty7
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls71
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls71
-rw-r--r--macros/texinfo/latest/texinfo.tex5
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdfbin261227 -> 262070 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex120
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdfbin140003 -> 140591 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex120
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdfbin143192 -> 143583 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex120
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls323
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-cn.pdfbin202160 -> 200690 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-cn.tex145
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-en.pdfbin93808 -> 92560 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-en.tex145
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-fr.pdfbin98098 -> 95692 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-fr.tex145
-rw-r--r--macros/unicodetex/latex/einfart/einfart.cls321
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdfbin222939 -> 220301 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex125
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.pdfbin92143 -> 91176 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.tex125
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdfbin93425 -> 92970 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex126
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls323
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdfbin257013 -> 256471 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex147
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-en.pdfbin137475 -> 136792 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-en.tex147
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdfbin139916 -> 139425 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex147
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre.cls321
54 files changed, 3648 insertions, 1563 deletions
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 9c838e534d..72929ae916 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorart}
- {2022/06/16} {}
+ {2022/09/03} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -65,7 +64,7 @@
\PassOptionsToPackage { \CurrentOption } { colorist }
}
}
-\ProcessKeysOptions { colorclass }
+\ProcessKeyOptions [ colorclass ]
\LoadClass{\l__colorclass_base_class_tl}
@@ -122,9 +121,6 @@
\RequirePackage { colorist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -132,6 +128,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -154,6 +159,7 @@
{
\RequirePackage { mathpazo }
\RequirePackage { newpxtext }
+ \bool_if:NT \l__projlib_font_useosf_bool { \useosf }
\RequirePackage { amssymb }
\sys_if_engine_pdftex:F
{
@@ -166,12 +172,40 @@
BoldItalicFont = *-bolditalic ,
]
}
+ % Adjusting the kerning of 'embrac' for 'newpxtext'
+ \hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__colorclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -185,25 +219,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { colorclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `colorist/colorart.cls'.
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 877f6d9cf0..26c988c87a 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorbook}
- {2022/06/16} {}
+ {2022/09/03} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -65,7 +64,7 @@
\PassOptionsToPackage { \CurrentOption } { colorist }
}
}
-\ProcessKeysOptions { colorclass }
+\ProcessKeyOptions [ colorclass ]
\LoadClass{\l__colorclass_base_class_tl}
@@ -122,9 +121,6 @@
\RequirePackage { colorist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -132,6 +128,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -154,6 +159,7 @@
{
\RequirePackage { mathpazo }
\RequirePackage { newpxtext }
+ \bool_if:NT \l__projlib_font_useosf_bool { \useosf }
\RequirePackage { amssymb }
\sys_if_engine_pdftex:F
{
@@ -166,12 +172,40 @@
BoldItalicFont = *-bolditalic ,
]
}
+ % Adjusting the kerning of 'embrac' for 'newpxtext'
+ \hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__colorclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -185,25 +219,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { colorclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `colorist/colorbook.cls'.
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 0a4331190f..e1239399aa 100644
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ b/macros/latex/contrib/colorist/colorist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
index 4f6c342273..a6b2ab9788 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\colorist{}}\\write your articles or books in a colorful way}
\author{Jinwen XU}
@@ -104,7 +132,7 @@
\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 \texttt{use boldface}). You can think of it as a short introduction and demonstration.
+ 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}
@@ -304,13 +332,6 @@ or to use the \AmS{} class:
\end{tip}
-\begin{tip}
-If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
-
-\begin{code}
-\documentclass[classical]{colorart}
-\end{code}
-\end{tip}
\vspace{1.5\baselineskip}
\LevelTwoTitle{Example - \colorbook}
@@ -362,13 +383,13 @@ In the next section, we will go through the options available.
\colorist{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\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 \texttt{draft} or \texttt{fast}
+ \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}
@@ -380,39 +401,39 @@ In the next section, we will go through the options available.
\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 \texttt{use boldface}
+ \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 \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \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 \texttt{regionalref}, \texttt{originalref}
+ \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 \texttt{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 \texttt{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 \texttt{originalref} will have no effect.
+ \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}
- \item \texttt{a4paper} or \texttt{b5paper}
+\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 \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \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 \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
\end{itemize}
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty
index cc3db07f88..409bb5b7c9 100644
--- a/macros/latex/contrib/colorist/colorist-fancy.sty
+++ b/macros/latex/contrib/colorist/colorist-fancy.sty
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist-fancy}
- {2022/06/16} {}
+ {2022/09/03} {}
{The fancy style of colorist}
\IfPackageLoadedTF { colorist } {}
@@ -405,9 +404,15 @@
\titleformat{\paragraph}[runin]
{\color{main-text!50!paper} \g_colorist_title_font_paragraph_tl }{\theparagraph}{1em}{#1}
-\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip}
-\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip}
-\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.3\baselineskip}
+\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__colorist_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
@@ -476,21 +481,21 @@
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
\setlist[enumerate]{labelsep=*, leftmargin=*}
-\setlist[enumerate,1]{label=\arabic*$)$,
- ref = \arabic*$)$}
-\setlist[enumerate,2]{label=\emph{\roman*}$)$,
- ref = \arabic{enumi}.\emph{\roman*}$)$}
-\setlist[enumerate,3]{label=\emph{\alph*}$)$,
- ref = \arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$)$}
+\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\colorist_bfseries:}
\renewlist{itemize}{itemize}{10}
-\setlist[itemize]{leftmargin=*,label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}}
-\AddLanguageSetting { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}} }
-\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.8em}{.75pt}}} }
-\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.5em}{.75pt}}}
-\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\circ$}}
-\setlist[itemize,4]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\ast$}}
+\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
@@ -557,8 +562,17 @@ heading_suffix "}\n"
\newcommand*{\IndexDotfill}
{
- \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hfill
+ \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 }
@@ -582,7 +596,7 @@ heading_suffix "}\n"
\renewcommand*{\indexspace}
{
\par
- \vspace{2pc ~ plus ~ .5pc ~ minus ~ .3pc}
+ \vspace{2pc plus .5pc minus .3pc}
}
\bool_new:N \l__colorist_if_first_subitem_bool
@@ -654,6 +668,10 @@ heading_suffix "}\n"
\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__colorist_theorem_in_new_line_bool
{
\newtheoremstyle{simple}
@@ -678,9 +696,9 @@ heading_suffix "}\n"
{\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace}
}
-\renewcommand{\qedsymbol}{
+\newcommand{\customqedsymbol}{
\makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
-\let\qedsymbolOriginal\qedsymbol
+\let\qedsymbol\customqedsymbol
\bool_if:NTF \l__colorist_theorem_in_new_line_bool
{
@@ -735,6 +753,13 @@ heading_suffix "}\n"
\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 } { colorist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
}
@@ -751,7 +776,9 @@ heading_suffix "}\n"
\tl_gset:Nn \g_crthm_combined_name_sep_tl { \textcolor{main-text}{-} }
-\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition, theorem-with-name }
+\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
+
+\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, theorem-with-name }
{
name style = {
heading style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
@@ -781,7 +808,7 @@ heading_suffix "}\n"
\bool_if:NF \l__projlib_theorem_complexname_bool
{
- \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, definition-theorem, definition-proposition, theorem-with-name }
+ \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, construction, theorem-with-name }
{
name style = {
, crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
@@ -923,7 +950,7 @@ heading_suffix "}\n"
\tcolorboxenvironment { #1 } { #2 }
}
-\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, construction, definition-proposition, definition-theorem, theorem-with-name }
+\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, construction, definition-corollary, definition-proposition, definition-theorem, theorem-with-name }
{
enhanced~jigsaw, breakable, lines~before~break=3,
left=3.5mm, right=3.5mm,
@@ -931,7 +958,7 @@ heading_suffix "}\n"
opacityframe=0.9, colframe=orange, arc=.7mm
}
- \colorist_add_colorbox:nn { definition, assumption, convention, hypothesis, notation, proposition-definition, theorem-definition }
+ \colorist_add_colorbox:nn { definition, assumption, convention, hypothesis, notation, corollary-definition, proposition-definition, theorem-definition }
{
enhanced~jigsaw, breakable, lines~before~break=3,
left=4mm, right=4mm, top=1mm, bottom=1mm,
@@ -1030,21 +1057,21 @@ heading_suffix "}\n"
}
\cs_new_protected:Nn \__colorist_add_scan_env_do:n
{
- \tl_const:cn { l__colorist_scan_env_ #1 }
+ \tl_const:cn { l__colorist_scan_env_ #1 _tl }
{
\AfterEnvEnd
{
\ScanEnv* { #1 }
- { \skip_vertical:n { -0.9\baselineskip } }
+ { \vspace { -1.15\baselineskip } }
{
\ScanEnv* { #1* }
- { \skip_vertical:n { -0.9\baselineskip } }
+ { \vspace { -1.15\baselineskip } }
{}
}
}
}
- \hook_gput_code:nnn { env/#1/end } { colorist } { \tl_use:c { l__colorist_scan_env_ #1 } }
- \hook_gput_code:nnn { env/#1*/end } { colorist } { \tl_use:c { l__colorist_scan_env_ #1 } }
+ \hook_gput_code:nnn { env/#1/end } { colorist } { \tl_use:c { l__colorist_scan_env_ #1 _tl } }
+ \hook_gput_code:nnn { env/#1*/end } { colorist } { \tl_use:c { l__colorist_scan_env_ #1 _tl } }
}
\colorist_add_scan_env:n { definition, assumption, convention, hypothesis, notation }
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 9e7c85109c..4bbe5b57ec 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist}
- {2022/06/16} {}
+ {2022/09/03} {}
{A colorful style for articles and books}
\keys_define:nn { colorist }
@@ -74,7 +73,7 @@
\PassOptionsToPackage { \CurrentOption } { projlib-theorem }
}
}
-\ProcessKeysOptions { colorist }
+\ProcessKeyOptions [ colorist ]
\bool_new:N \l__colorist_is_book_bool
\cs_if_exist:cTF { c@chapter }
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.pdf b/macros/latex/contrib/crefthe/crefthe-doc.pdf
index 734263af64..d6a42c38e7 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.pdf
+++ b/macros/latex/contrib/crefthe/crefthe-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.tex b/macros/latex/contrib/crefthe/crefthe-doc.tex
index 877e68119b..af156ef65d 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.tex
+++ b/macros/latex/contrib/crefthe/crefthe-doc.tex
@@ -116,7 +116,7 @@
\begin{document}
-\def\PackageVersion{2022/08/28}
+\def\PackageVersion{2022/09/03}
\title{\crefthepackage{}\\\smallskip\itshape Cross referencing with proper definite articles}
\author{Jinwen XU}
diff --git a/macros/latex/contrib/crefthe/crefthe.sty b/macros/latex/contrib/crefthe/crefthe.sty
index 8fc93018ce..40456ebd51 100644
--- a/macros/latex/contrib/crefthe/crefthe.sty
+++ b/macros/latex/contrib/crefthe/crefthe.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{crefthe}
- {2022/08/28} {}
+ {2022/09/03} {}
{Cross referencing with proper definite articles}
\keys_define:nn { crefthe }
@@ -141,7 +141,7 @@
\__crefthe_name_general:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { C }
}
-\cs_new:Npn \crefthe_width_of_space_dim { \tex_fontdimen:D 2 \tex_font:D }
+\cs_new:Npn \crefthe_width_of_space_dim { \tex_fontdimen:D 2 \tex_font:D~plus -\tex_fontdimen:D 3 \tex_font:D~minus -\tex_fontdimen:D 4 \tex_font:D }
\cs_new:Nn \crefthe_empty_adjust:n
{
diff --git a/macros/latex/contrib/hereapplies/ChangeLog.md b/macros/latex/contrib/hereapplies/ChangeLog.md
index 0dbba84996..97ee241848 100644
--- a/macros/latex/contrib/hereapplies/ChangeLog.md
+++ b/macros/latex/contrib/hereapplies/ChangeLog.md
@@ -2,6 +2,17 @@ Change Log
==========
+## 0.8.0 (2022-09-03)
+
+Changes:
+
+* The package now checks that the optional argument of the `\hereapplies` macro
+ does not contain commas
+* The LyX module has been updated
+* The documentation is now available in `.lyx`, `.tex` and `.pdf` format
+* Code review
+
+
## 0.7.0 (2022-08-29)
Changes:
diff --git a/macros/latex/contrib/hereapplies/README.md b/macros/latex/contrib/hereapplies/README.md
index 380a1fbdf1..6767f52376 100644
--- a/macros/latex/contrib/hereapplies/README.md
+++ b/macros/latex/contrib/hereapplies/README.md
@@ -81,7 +81,7 @@ labeled \texttt{myref}.
\end{document}
```
-will generate [this document][1].
+will generate the [`hereapplies-example.pdf`][1] document attached.
A minimal tutorial
@@ -93,8 +93,8 @@ The `\hereapplies` command notifies the document that one or more identifiers
apply to a particular point and adds a label to it.
If the optional argument is passed the label created will be named accordingly,
-otherwise an opaque name will be chosen. This argument may contain only what is
-legal for `\pageref`.
+otherwise an opaque name will be chosen for it. This argument may contain only
+what is legal for `\pageref`.
The `identifiers` argument must be a comma-separated list of identifiers
(leading and trailing spaces around each member will be ignored). Each of these
@@ -104,8 +104,7 @@ not create conflicts with possible macros or labels of the same names.
After storing some internal values, `\hereapplies` will expand exactly to
``` tex
-\phantomsection
-\label{...}
+\phantomsection\label{...}
```
Its “starred” version (`\hereapplies*`) will not invoke the `\phantomsection`
@@ -133,19 +132,18 @@ Internationalization
Currently the localization of **Here Applies** is not automatic. It is possible
however to control the strings generated by overwriting the four macros
-`\hapage`, `\hapages`, `\hadelimiter` and `\halastdelimiter`.
-
-For example, writing at the beginning of a document
+`\hapage`, `\hapages`, `\hadelimiter` and `\halastdelimiter`. For example,
+writing at the beginning of a document
``` tex
% German translation of **Here Applies**
-% English: `p.\ `
+% English: "p.\ "
\gdef\hapage{S.\ }
-% English: `pp.\ `
+% English: "pp.\ "
\gdef\hapages{S.\ }
-% English: `\ and\ `
+% English: "\ and\ "
\gdef\halastdelimiter{\ und\ }
-% English: `,\ ` (exactly like in German -- leave it)
+% English: ",\ " (exactly like in German -- leave it)
%\gdef\hadelimiter{,\ }
```
@@ -156,12 +154,9 @@ Get involved
------------
If you wish to get involved, please do not hesitate to send [merge requests][2]
-or participate in the discussion.
-
-The package is also [available on CTAN][3] under
-[`macros/latex/contrib/hereapplies`][4].
-
-For any issue, please [drop a message][5].
+or participate in the discussion. The package is also [available on
+**CTAN**][3] under [`macros/latex/contrib/hereapplies/`][4]. For any issue,
+please [drop a message][5].
Free software
@@ -169,13 +164,13 @@ Free software
**Here Applies** is free software. You can redistribute it and/or modify it
under the terms of the **AGPL** license version 3 or any later version. See
-[COPYING][6] for details.
+[`COPYING`][6] for details.
[1]: hereapplies-example.pdf
[2]: https://github.com/madmurphy/hereapplies.sty/pulls
[3]: https://www.ctan.org/pkg/hereapplies
- [4]: https://www.ctan.org/tex-archive/macros/latex/contrib/hereapplies
- [5]: https://github.com/madmurphy/libgnunetworker/issues
+ [4]: https://www.ctan.org/tex-archive/macros/latex/contrib/hereapplies/
+ [5]: https://github.com/madmurphy/hereapplies.sty/issues
[6]: COPYING
diff --git a/macros/latex/contrib/hereapplies/hereapplies-doc.lyx b/macros/latex/contrib/hereapplies/hereapplies-doc.lyx
new file mode 100644
index 0000000000..8bd29fc9c5
--- /dev/null
+++ b/macros/latex/contrib/hereapplies/hereapplies-doc.lyx
@@ -0,0 +1,1116 @@
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 544
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\begin_preamble
+\usepackage{doc}
+
+\AtBeginDocument{%
+ % LyX should add automatically `\usepackage{listings}` to the preamble...
+ \lstset{%
+ language=TeX,
+ basicstyle=\footnotesize,
+ numbers=left,
+ stepnumber=1,
+ showstringspaces=false,
+ tabsize=1,
+ breaklines=true,
+ breakatwhitespace=false,
+ }%
+}
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding ascii
+\fontencoding global
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype true
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing onehalf
+\use_hyperref true
+\pdf_title "The \\textquotedblleft{}Here Applies\\textquotedblright{} LaTeX Package"
+\pdf_author "madmurphy"
+\pdf_subject "Package documentation"
+\pdf_keywords "Glossary, Index, LaTeX, LaTeX hyperref, LaTeX labels, LaTeX package, LyX, LyX module, TOC"
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks false
+\pdf_backref false
+\pdf_pdfusetitle false
+\papersize a4paper
+\use_geometry true
+\use_package amsmath 1
+\use_package amssymb 0
+\use_package cancel 0
+\use_package esint 1
+\use_package mathdots 0
+\use_package mathtools 0
+\use_package mhchem 0
+\use_package stackrel 0
+\use_package stmaryrd 0
+\use_package undertilde 0
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 0
+\use_minted 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 3.25cm
+\topmargin 3.25cm
+\rightmargin 3.25cm
+\bottommargin 3.25cm
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Title
+The
+\series bold
+Here Applies
+\series default
+ \SpecialChar LaTeX
+ Package
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Abstract
+A \SpecialChar LaTeX
+ package for referencing groups of pages that share something in common.
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 2cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Overview
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Here Applies
+\series default
+ is a \SpecialChar LaTeX
+ package that allows to collect groups of labels and reference them
+ altogether.
+ It can be used for creating informal glossaries that cross-link concepts
+ to their applications, or simply mentioning multiple pages that share something
+ in common.
+\end_layout
+
+\begin_layout Standard
+The package offers two commands:
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ and
+\family typewriter
+
+\backslash
+whereapplies
+\family default
+ (plus their
+\begin_inset Quotes eld
+\end_inset
+
+starred
+\begin_inset Quotes erd
+\end_inset
+
+ versions
+\family typewriter
+
+\backslash
+hereapplies*
+\family default
+ and
+\family typewriter
+
+\backslash
+whereapplies*
+\family default
+).
+ In both cases an identifier is passed as argument – and this can be any
+ string invented in the moment (
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ additionally supports more than one identifier in the form of a comma-separated
+ list).
+\end_layout
+
+\begin_layout Standard
+Every time
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ is invoked with known identifiers, the document is made aware that the
+ place shares some kind of connection with other places in which the same
+ identifiers were used.
+ And so, every time the
+\family typewriter
+
+\backslash
+whereapplies
+\family default
+ command is invoked with a known identifier, all the occurrences of the
+ latter within the entire document will be printed in the form of a linkable
+ page list (e.g.
+
+\begin_inset Quotes eld
+\end_inset
+
+pp.
+\begin_inset space \space{}
+\end_inset
+
+1, 5, 8–9, 14–20…
+\begin_inset Quotes erd
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+As
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ is designed to be invoked in the middle of a chapter or a section and that
+ location must be made linkable, the
+\family typewriter
+
+\backslash
+phantomsection
+\family default
+ directive is invoked by default before a label is added.
+ To avoid calling
+\family typewriter
+
+\backslash
+phantomsection
+\family default
+, the
+\begin_inset Quotes eld
+\end_inset
+
+starred
+\begin_inset Quotes erd
+\end_inset
+
+ command
+\family typewriter
+
+\backslash
+hereapplies*
+\family default
+ is available.
+\end_layout
+
+\begin_layout Standard
+Finally, like
+\family typewriter
+
+\backslash
+whereapplies
+\family default
+ resembles a pluralizable version of
+\family typewriter
+
+\backslash
+pageref
+\family default
+, its
+\begin_inset Quotes eld
+\end_inset
+
+starred
+\begin_inset Quotes erd
+\end_inset
+
+ version
+\family typewriter
+
+\backslash
+whereapplies*
+\family default
+ will resemble a pluralizable version of
+\family typewriter
+
+\backslash
+pageref*
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+If you use LyX, the package ships a LyX module as well (please check the
+
+\family typewriter
+lyx-module
+\family default
+ subdirectory).
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Example usage
+\end_layout
+
+\begin_layout Standard
+The following \SpecialChar LaTeX
+ manuscript
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 3ex
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand lstinputlisting
+filename "hereapplies-example.tex"
+lstparams "language=TeX"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 3ex
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+will generate the
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+hereapplies-example.pdf
+\end_layout
+
+\end_inset
+
+ document attached.
+\end_layout
+
+\begin_layout Section
+A minimal tutorial
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{macro}{
+\backslash
+hereapplies}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Syntax:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+
+\backslash
+hereapplies
+\begin_inset space \enskip{}
+\end_inset
+
+[
+\begin_inset Formula $\langle$
+\end_inset
+
+
+\shape italic
+label
+\shape default
+
+\begin_inset Formula $\rangle$
+\end_inset
+
+]
+\begin_inset space \enskip{}
+\end_inset
+
+{
+\begin_inset Formula $\langle$
+\end_inset
+
+
+\shape italic
+identifiers
+\shape default
+
+\begin_inset Formula $\rangle$
+\end_inset
+
+}
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+
+\backslash
+hereapplies*
+\begin_inset space \enskip{}
+\end_inset
+
+[
+\begin_inset Formula $\langle$
+\end_inset
+
+
+\shape italic
+label
+\shape default
+
+\begin_inset Formula $\rangle$
+\end_inset
+
+]
+\begin_inset space \enskip{}
+\end_inset
+
+{
+\begin_inset Formula $\langle$
+\end_inset
+
+
+\shape italic
+identifiers
+\shape default
+
+\begin_inset Formula $\rangle$
+\end_inset
+
+}
+\end_layout
+
+\begin_layout Standard
+\noindent
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+The
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ command notifies the document that one or more identifiers apply to a particula
+r point and adds a label to it.
+\end_layout
+
+\begin_layout Standard
+If the optional argument is passed the label created will be named accordingly,
+ otherwise an opaque name will be chosen for it.
+ This argument may contain only what is legal for
+\family typewriter
+
+\backslash
+pageref
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+The
+\family typewriter
+\shape italic
+identifiers
+\family default
+\shape default
+ argument must be a comma-separated list of identifiers (leading and trailing
+ spaces around each member will be ignored).
+ Each of these strings will remain confined within the internal scope of
+ the package and will not create conflicts with possible macros or labels
+ of the same names.
+\end_layout
+
+\begin_layout Standard
+After storing some internal values,
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ will expand exactly to
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=TeX,numbers=none"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+phantomsection
+\backslash
+label{...}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Its
+\begin_inset Quotes eld
+\end_inset
+
+starred
+\begin_inset Quotes erd
+\end_inset
+
+ version (
+\family typewriter
+
+\backslash
+hereapplies*
+\family default
+) will not invoke the
+\family typewriter
+
+\backslash
+phantomsection
+\family default
+ directive.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{macro}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{macro}{
+\backslash
+whereapplies}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Syntax:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+
+\backslash
+whereapplies
+\begin_inset space \enskip{}
+\end_inset
+
+{
+\begin_inset Formula $\langle$
+\end_inset
+
+
+\shape italic
+identifier
+\shape default
+
+\begin_inset Formula $\rangle$
+\end_inset
+
+}
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+
+\backslash
+whereapplies*
+\begin_inset space \enskip{}
+\end_inset
+
+{
+\begin_inset Formula $\langle$
+\end_inset
+
+
+\shape italic
+identifier
+\shape default
+
+\begin_inset Formula $\rangle$
+\end_inset
+
+}
+\end_layout
+
+\begin_layout Standard
+\noindent
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+The
+\family typewriter
+
+\backslash
+whereapplies
+\family default
+ command prints all the occurrences of an identifier, in the form
+\begin_inset Quotes eld
+\end_inset
+
+p.
+\begin_inset space \space{}
+\end_inset
+
+…
+\begin_inset Quotes erd
+\end_inset
+
+ or
+\begin_inset Quotes eld
+\end_inset
+
+pp.
+\begin_inset space \space{}
+\end_inset
+
+…
+\begin_inset Quotes erd
+\end_inset
+
+ (with page range support).
+\end_layout
+
+\begin_layout Standard
+The
+\family typewriter
+\shape italic
+identifier
+\family default
+\shape default
+ argument will remain confined within the internal scope of the package
+ and will not create conflicts with possible commands or labels of the same
+ name.
+ Leading and trailing spaces around this string will be ignored.
+\end_layout
+
+\begin_layout Standard
+If the same
+\family typewriter
+\shape italic
+identifier
+\family default
+\shape default
+ is not passed to
+\family typewriter
+
+\backslash
+hereapplies
+\family default
+ at least once throughout the document,
+\family typewriter
+
+\backslash
+whereapplies
+\family default
+ will print
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+??
+\series default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+The
+\begin_inset Quotes eld
+\end_inset
+
+starred
+\begin_inset Quotes erd
+\end_inset
+
+ version of this command (
+\family typewriter
+
+\backslash
+whereapplies*
+\family default
+) will use
+\family typewriter
+
+\backslash
+pageref*
+\family default
+ instead of
+\family typewriter
+
+\backslash
+pageref
+\family default
+ for generating the page list.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{macro}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Internationalization
+\end_layout
+
+\begin_layout Standard
+Currently the localization of
+\series bold
+Here Applies
+\series default
+ is not automatic.
+ It is possible however to control the strings generated by overwriting
+ the four macros
+\family typewriter
+
+\backslash
+hapage
+\family default
+,
+\family typewriter
+
+\backslash
+hapages
+\family default
+,
+\family typewriter
+
+\backslash
+hadelimiter
+\family default
+ and
+\family typewriter
+
+\backslash
+halastdelimiter
+\family default
+.
+ For example, writing at the beginning of a document
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 3ex
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=TeX"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+% German translation of **Here Applies**
+\end_layout
+
+\begin_layout Plain Layout
+
+% English: "p.
+\backslash
+ "
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+gdef
+\backslash
+hapage{S.
+\backslash
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+% English: "pp.
+\backslash
+ "
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+gdef
+\backslash
+hapages{S.
+\backslash
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+% English: "
+\backslash
+ and
+\backslash
+ "
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+gdef
+\backslash
+halastdelimiter{
+\backslash
+ und
+\backslash
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+% English: ",
+\backslash
+ " (exactly like in German -- leave it)
+\end_layout
+
+\begin_layout Plain Layout
+
+%
+\backslash
+gdef
+\backslash
+hadelimiter{,
+\backslash
+ }
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 3ex
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+will translate
+\begin_inset Quotes eld
+\end_inset
+
+pp.
+\begin_inset space \space{}
+\end_inset
+
+2, 4 and 6
+\begin_inset Quotes erd
+\end_inset
+
+ into
+\begin_inset Quotes eld
+\end_inset
+
+S.
+\begin_inset space \space{}
+\end_inset
+
+2, 4 und 6
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+Get involved
+\end_layout
+
+\begin_layout Standard
+If you wish to get involved, please do not hesitate to send
+\begin_inset CommandInset href
+LatexCommand href
+name "merge requests"
+target "https://github.com/madmurphy/hereapplies.sty/pulls"
+literal "false"
+
+\end_inset
+
+ or participate in the discussion.
+ The package is also
+\begin_inset CommandInset href
+LatexCommand href
+name "available on \\textbf{CTAN}"
+target "https://www.ctan.org/pkg/hereapplies"
+literal "true"
+
+\end_inset
+
+ under
+\begin_inset CommandInset href
+LatexCommand href
+name "\\texttt{macros/latex/contrib/hereapplies/}"
+target "https://www.ctan.org/tex-archive/macros/latex/contrib/hereapplies/"
+literal "true"
+
+\end_inset
+
+.
+ For any issue, please
+\begin_inset CommandInset href
+LatexCommand href
+name "drop a message"
+target "https://github.com/madmurphy/hereapplies.sty/issues"
+literal "false"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+Free software
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Here Applies
+\series default
+ is free software.
+ You can redistribute it and/or modify it under the terms of the
+\series bold
+AGPL
+\series default
+ license version 3 or any later version.
+ See
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+COPYING
+\end_layout
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section*
+Code appendix
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+addcontentsline{toc}{section}{Code appendix}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand lstinputlisting
+filename "hereapplies.sty"
+lstparams "language=TeX"
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/macros/latex/contrib/hereapplies/hereapplies-doc.pdf b/macros/latex/contrib/hereapplies/hereapplies-doc.pdf
new file mode 100644
index 0000000000..812792219e
--- /dev/null
+++ b/macros/latex/contrib/hereapplies/hereapplies-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/hereapplies/hereapplies-doc.tex b/macros/latex/contrib/hereapplies/hereapplies-doc.tex
new file mode 100644
index 0000000000..9f4f5027b3
--- /dev/null
+++ b/macros/latex/contrib/hereapplies/hereapplies-doc.tex
@@ -0,0 +1,230 @@
+%% LyX 2.3.6.1 created this file. For more info, see http://www.lyx.org/.
+%% Do not edit unless you really know what you are doing.
+\documentclass[english]{article}
+\usepackage[T1]{fontenc}
+\usepackage[a4paper]{geometry}
+\geometry{verbose,tmargin=3.25cm,bmargin=3.25cm,lmargin=3.25cm,rmargin=3.25cm}
+\usepackage{babel}
+\usepackage{url}
+\usepackage{setspace}
+\usepackage{microtype}
+\onehalfspacing
+\usepackage[unicode=true,
+ bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
+ breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
+ {hyperref}
+\hypersetup{pdftitle={The \textquotedblleft{}Here Applies\textquotedblright{} LaTeX Package},
+ pdfauthor={madmurphy},
+ pdfsubject={Package documentation},
+ pdfkeywords={Glossary, Index, LaTeX, LaTeX hyperref, LaTeX labels, LaTeX package, LyX, LyX module, TOC}}
+
+\makeatletter
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
+\usepackage{doc}
+
+\AtBeginDocument{%
+ % LyX should add automatically `\usepackage{listings}` to the preamble...
+ \lstset{%
+ language=TeX,
+ basicstyle=\footnotesize,
+ numbers=left,
+ stepnumber=1,
+ showstringspaces=false,
+ tabsize=1,
+ breaklines=true,
+ breakatwhitespace=false,
+ }%
+}
+
+\makeatother
+
+\usepackage{listings}
+\renewcommand{\lstlistingname}{Listing}
+
+\begin{document}
+\title{The \textbf{Here Applies} \LaTeX{} Package}
+
+\maketitle
+\bigskip{}
+
+\begin{abstract}
+A \LaTeX{} package for referencing groups of pages that share something
+in common.
+\end{abstract}
+\vspace{2cm}
+
+
+\section{Overview}
+
+\textbf{Here Applies} is a \LaTeX{} package that allows to collect
+groups of labels and reference them altogether. It can be used for
+creating informal glossaries that cross-link concepts to their applications,
+or simply mentioning multiple pages that share something in common.
+
+The package offers two commands: \texttt{\textbackslash hereapplies}
+and \texttt{\textbackslash whereapplies} (plus their ``starred''
+versions \texttt{\textbackslash hereapplies{*}} and \texttt{\textbackslash whereapplies{*}}).
+In both cases an identifier is passed as argument -- and this can
+be any string invented in the moment (\texttt{\textbackslash hereapplies}
+additionally supports more than one identifier in the form of a comma-separated
+list).
+
+Every time \texttt{\textbackslash hereapplies} is invoked with known
+identifiers, the document is made aware that the place shares some
+kind of connection with other places in which the same identifiers
+were used. And so, every time the \texttt{\textbackslash whereapplies}
+command is invoked with a known identifier, all the occurrences of
+the latter within the entire document will be printed in the form
+of a linkable page list (e.g. ``pp.\ 1, 5, 8--9, 14--20\dots '').
+
+As \texttt{\textbackslash hereapplies} is designed to be invoked
+in the middle of a chapter or a section and that location must be
+made linkable, the \texttt{\textbackslash phantomsection} directive
+is invoked by default before a label is added. To avoid calling \texttt{\textbackslash phantomsection},
+the ``starred'' command \texttt{\textbackslash hereapplies{*}}
+is available.
+
+Finally, like \texttt{\textbackslash whereapplies} resembles a pluralizable
+version of \texttt{\textbackslash pageref}, its ``starred'' version
+\texttt{\textbackslash whereapplies{*}} will resemble a pluralizable
+version of \texttt{\textbackslash pageref{*}}.
+
+If you use LyX, the package ships a LyX module as well (please check
+the \texttt{lyx-module} subdirectory).
+
+\pagebreak{}
+
+\section{Example usage}
+
+The following \LaTeX{} manuscript
+
+\vspace{3ex}
+
+\lstinputlisting[language=TeX]{hereapplies-example.tex}
+
+\vspace{3ex}
+
+\noindent will generate the \url{hereapplies-example.pdf} document
+attached.
+
+\section{A minimal tutorial}
+
+\begin{macro}{\hereapplies}
+
+Syntax:
+
+\bigskip{}
+
+\texttt{\textbackslash hereapplies\enskip{}{[}$\langle$}\texttt{\textit{label}}\texttt{$\rangle${]}\enskip{}\{$\langle$}\texttt{\textit{identifiers}}\texttt{$\rangle$\}}
+
+\texttt{\textbackslash hereapplies{*}\enskip{}{[}$\langle$}\texttt{\textit{label}}\texttt{$\rangle${]}\enskip{}\{$\langle$}\texttt{\textit{identifiers}}\texttt{$\rangle$\}}
+
+\noindent \smallskip{}
+
+\noindent The \texttt{\textbackslash hereapplies} command notifies
+the document that one or more identifiers apply to a particular point
+and adds a label to it.
+
+If the optional argument is passed the label created will be named
+accordingly, otherwise an opaque name will be chosen for it. This
+argument may contain only what is legal for \texttt{\textbackslash pageref}.
+
+The \texttt{\textit{identifiers}} argument must be a comma-separated
+list of identifiers (leading and trailing spaces around each member
+will be ignored). Each of these strings will remain confined within
+the internal scope of the package and will not create conflicts with
+possible macros or labels of the same names.
+
+After storing some internal values, \texttt{\textbackslash hereapplies}
+will expand exactly to
+
+\begin{lstlisting}[language=TeX,numbers=none]
+\phantomsection\label{...}
+\end{lstlisting}
+
+Its ``starred'' version (\texttt{\textbackslash hereapplies{*}})
+will not invoke the \texttt{\textbackslash phantomsection} directive.
+
+\end{macro}
+
+\smallskip{}
+
+\begin{macro}{\whereapplies}
+
+Syntax:
+
+\bigskip{}
+
+\texttt{\textbackslash whereapplies\enskip{}\{$\langle$}\texttt{\textit{identifier}}\texttt{$\rangle$\}}
+
+\texttt{\textbackslash whereapplies{*}\enskip{}\{$\langle$}\texttt{\textit{identifier}}\texttt{$\rangle$\}}
+
+\noindent \smallskip{}
+
+\noindent The \texttt{\textbackslash whereapplies} command prints
+all the occurrences of an identifier, in the form ``p.\ \dots ''
+or ``pp.\ \dots '' (with page range support).
+
+The \texttt{\textit{identifier}} argument will remain confined within
+the internal scope of the package and will not create conflicts with
+possible commands or labels of the same name. Leading and trailing
+spaces around this string will be ignored.
+
+If the same \texttt{\textit{identifier}} is not passed to \texttt{\textbackslash hereapplies}
+at least once throughout the document, \texttt{\textbackslash whereapplies}
+will print ``\textbf{??}''.
+
+The ``starred'' version of this command (\texttt{\textbackslash whereapplies{*}})
+will use \texttt{\textbackslash pageref{*}} instead of \texttt{\textbackslash pageref}
+for generating the page list.
+
+\end{macro}
+
+\section{Internationalization}
+
+Currently the localization of \textbf{Here Applies} is not automatic.
+It is possible however to control the strings generated by overwriting
+the four macros \texttt{\textbackslash hapage}, \texttt{\textbackslash hapages},
+\texttt{\textbackslash hadelimiter} and \texttt{\textbackslash halastdelimiter}.
+For example, writing at the beginning of a document
+
+\vspace{3ex}
+
+\begin{lstlisting}[language=TeX]
+% German translation of **Here Applies**
+% English: "p.\ "
+\gdef\hapage{S.\ }
+% English: "pp.\ "
+\gdef\hapages{S.\ }
+% English: "\ and\ "
+\gdef\halastdelimiter{\ und\ }
+% English: ",\ " (exactly like in German -- leave it)
+%\gdef\hadelimiter{,\ }
+\end{lstlisting}
+
+\vspace{3ex}
+
+\noindent will translate ``pp.\ 2, 4 and 6'' into ``S.\ 2, 4
+und 6''.
+
+\section{Get involved}
+
+If you wish to get involved, please do not hesitate to send \href{https://github.com/madmurphy/hereapplies.sty/pulls}{merge requests}
+or participate in the discussion. The package is also \href{https://www.ctan.org/pkg/hereapplies}{available on \textbf{CTAN}}
+under \href{https://www.ctan.org/tex-archive/macros/latex/contrib/hereapplies/}{\texttt{macros/latex/contrib/hereapplies/}}.
+For any issue, please \href{https://github.com/madmurphy/hereapplies.sty/issues}{drop a message}.
+
+\section{Free software}
+
+\textbf{Here Applies} is free software. You can redistribute it and/or
+modify it under the terms of the \textbf{AGPL} license version 3 or
+any later version. See \url{COPYING} for details.
+
+\newpage{}
+
+\section*{Code appendix}
+
+\addcontentsline{toc}{section}{Code appendix}
+
+\lstinputlisting[language=TeX]{hereapplies.sty}
+\end{document}
diff --git a/macros/latex/contrib/hereapplies/hereapplies-example.pdf b/macros/latex/contrib/hereapplies/hereapplies-example.pdf
index a175e64cd5..512d7c2410 100644
--- a/macros/latex/contrib/hereapplies/hereapplies-example.pdf
+++ b/macros/latex/contrib/hereapplies/hereapplies-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/hereapplies/hereapplies.sty b/macros/latex/contrib/hereapplies/hereapplies.sty
index ba13cdb9a7..7802e30a11 100644
--- a/macros/latex/contrib/hereapplies/hereapplies.sty
+++ b/macros/latex/contrib/hereapplies/hereapplies.sty
@@ -1,4 +1,4 @@
-% -*- Mode: latex; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*-
+% -*- Mode: latex; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*-
%
%
% hereapplies.sty
@@ -8,7 +8,7 @@
%
% https://github.com/madmurphy/hereapplies.sty
%
-% Version 0.7.0
+% Version 0.8.0
%
% Copyright (C) 2022 madmurphy <madmurphy333@gmail.com>
%
@@ -66,7 +66,7 @@
% \end{document}
%
%
-\ProvidesPackage{hereapplies}[2022/08/29 Here Applies]
+\ProvidesPackage{hereapplies}[2022/09/03 Here Applies]
\RequirePackage{hyperref}
\RequirePackage{refcount}
%
@@ -101,7 +101,7 @@
% This macro is mainly for internal purposes (but nothing forbids invoking it
% directly). When invoked it checks whether a comma is present in `text to
% check`, then expands to `if yes` or `if no` accordingly.
-
+%
% Please do not put curly brackets around the text to check. The comma at the
% end of the text is mandatory.
%
@@ -350,16 +350,18 @@
% other packages, if needed.
%
%
-% Macro: `\starred@labeled@hereapplies{label}{identifiers}`
+% Macro: `\starred@nochecks@hereapplies{label}{identifiers}`
% *****************************************************************************
%
-% Identical to `\hereapplies*`, but the two arguments are both mandatory
+% Similar to `\hereapplies*`, but without checks and with two mandatory
+% arguments
%
% This macro is mainly for internal purposes (but nothing forbids invoking it
-% directly). See the documentation of `\hereapplies` for more information.
+% directly). Here the two arguments are both mandatory and there will be no
+% checks that first argument does not contain a comma. See the documentation of
+% `\hereapplies` for more information.
%
-\newcommand*{\starred@labeled@hereapplies}[2]{%
- \begingroup%
+\newcommand*{\starred@nochecks@hereapplies}[2]{%
% Assign a label to this occurrence
\label{#1}%
% Iterate through the comma-separated list `identifiers`
@@ -384,7 +386,8 @@
@ha@iter@@labels@\@ha@tmp@@id\endcsname{#1}%
\fi%
}%
- \endgroup%
+ % Clean the environment
+ \let\@ha@tmp@@id\undefined%
}
%
%
@@ -402,15 +405,23 @@
% The macro has been called with only one argument
% Assign a unique number to the unnamed occurrence
\stepcounter{@ha@unlabeled@counter}%
- % Call `\starred@hereapplies` with an opaque label
- {\edef\@ha@tmp@@mcall{\noexpand\starred@labeled@hereapplies{%
- hereapplies:unnamed\the@ha@unlabeled@counter}{#2}%
- }\@ha@tmp@@mcall}%
+ % Create an opaque label
+ \edef\@ha@tmp@@lbl{hereapplies:unnamed\the@ha@unlabeled@counter}%
\else%
% The macro has been called with two arguments
- % Call `\starred@labeled@hereapplies` with the same arguments
- \starred@labeled@hereapplies{#1}{#2}%
+ % Expand the first argument for checking properly
+ \edef\@ha@tmp@@lbl{#1}%
+ % Make sure that there are no commas in the `label` argument
+ \expandafter\@ha@ifcomma\@ha@tmp@@lbl,\@then{%
+ \PackageError{hereapplies}{Comma detected in "\@ha@tmp@@lbl"}{%
+ It is possible to assign only one single label.%
+ }%
+ }{}%
\fi%
+ % Call `\starred@nochecks@hereapplies`
+ \expandafter\starred@nochecks@hereapplies\expandafter{\@ha@tmp@@lbl}{#2}%
+ % Clean the environment
+ \let\@ha@tmp@@lbl\undefined%
}
%
%
@@ -431,12 +442,11 @@
% same name. Leading and trailing spaces around this string will be ignored.
%
\newcommand*{\get@hainfo}[2][labels]{%
- \begingroup%
% Trim leading and trailing spaces from the identifier
\edef\@ha@tmp@@id{\ha@trim{#2}}%
% Make sure that there are no commas
\expandafter\@ha@ifcomma\@ha@tmp@@id,\@then{%
- \PackageError{hereapplies}{Comma detected in "#2"}{%
+ \PackageError{hereapplies}{Comma detected in "\@ha@tmp@@id"}{%
It is possible to query only one single identifier at a time.%
}%
}{}%
@@ -444,7 +454,8 @@
\expandafter\@ha@newidentifier\expandafter{\@ha@tmp@@id}%
% Print the identifier's property
\csname @ha@prop@@#1@\@ha@tmp@@id\endcsname%
- \endgroup%
+ % Clean the environment
+ \let\@ha@tmp@@id\undefined%
}
%
%
diff --git a/macros/latex/contrib/hereapplies/lyx-module/hereapplies.module b/macros/latex/contrib/hereapplies/lyx-module/hereapplies.module
index 573b49c797..eae3e13919 100644
--- a/macros/latex/contrib/hereapplies/lyx-module/hereapplies.module
+++ b/macros/latex/contrib/hereapplies/lyx-module/hereapplies.module
@@ -1,9 +1,10 @@
#\DeclareLyXModule[hereapplies.sty]{Here Applies}
+#\DeclareCategory{Label and References}
#DescriptionBegin
#A module for for referencing groups of pages that share something in common.
#See the hereapplies.sty LaTeX package for more information.
#DescriptionEnd
-#Authors: madmurphy
+#Author: madmurphy
Format 66
@@ -11,9 +12,9 @@ AddToPreamble
\usepackage{hereapplies}
EndPreamble
-InsetLayout Flex:Here_applies
- LyXType custom
- Decoration Classic
+InsetLayout "Flex:Here applies"
+ LyXType custom
+ Decoration Classic
Font
Family Typewriter
Color black
@@ -32,7 +33,7 @@ InsetLayout Flex:Here_applies
MultiPar false
CustomPars false
ForcePlain true
- PassThru true
+ PassThru false
ParbreakIsNewline true
FreeSpacing false
ForceLTR true
@@ -49,9 +50,9 @@ InsetLayout Flex:Here_applies
EndArgument
End
-InsetLayout Flex:Here_applies*
- LyXType custom
- Decoration Classic
+InsetLayout "Flex:Here applies*"
+ LyXType custom
+ Decoration Classic
Font
Family Typewriter
Color black
@@ -70,7 +71,7 @@ InsetLayout Flex:Here_applies*
MultiPar false
CustomPars false
ForcePlain true
- PassThru true
+ PassThru false
ParbreakIsNewline true
FreeSpacing false
ForceLTR true
@@ -87,7 +88,7 @@ InsetLayout Flex:Here_applies*
EndArgument
End
-InsetLayout Flex:Where_applies
+InsetLayout "Flex:Where applies"
LyXType custom
Decoration Classic
Font
@@ -100,7 +101,7 @@ InsetLayout Flex:Where_applies
Color purple
Size Small
EndFont
- LabelString "Applications of"
+ LabelString "Where applies"
LatexType command
LatexName whereapplies
Requires hereapplies
@@ -108,14 +109,14 @@ InsetLayout Flex:Where_applies
MultiPar false
CustomPars false
ForcePlain true
- PassThru true
+ PassThru false
ParbreakIsNewline true
FreeSpacing false
ForceLTR true
BgColor lightgray
End
-InsetLayout Flex:Where_applies*
+InsetLayout "Flex:Where applies*"
LyXType custom
Decoration Classic
Font
@@ -128,7 +129,7 @@ InsetLayout Flex:Where_applies*
Color purple
Size Small
EndFont
- LabelString "Applications of*"
+ LabelString "Where applies*"
LatexType command
LatexName whereapplies*
Requires hereapplies
@@ -136,7 +137,7 @@ InsetLayout Flex:Where_applies*
MultiPar false
CustomPars false
ForcePlain true
- PassThru true
+ PassThru false
ParbreakIsNewline true
FreeSpacing false
ForceLTR true
diff --git a/macros/latex/contrib/hereapplies/package.json b/macros/latex/contrib/hereapplies/package.json
index fa375b37a7..ae02719882 100644
--- a/macros/latex/contrib/hereapplies/package.json
+++ b/macros/latex/contrib/hereapplies/package.json
@@ -1,15 +1,19 @@
{
"name": "hereapplies.sty",
- "version": "0.7.0",
+ "version": "0.8.0",
"description": "A LaTeX package for referencing groups of pages that share something in common",
- "homepage": "https://madmurphy.github.io/hereapplies.sty",
+ "homepage": "https://www.ctan.org/pkg/hereapplies",
"author": "madmurphy",
"license": "AGPL-3.0-or-later",
+ "main": "hereapplies.sty",
"repository": {
"url": "https://github.com/madmurphy/hereapplies.sty.git"
},
"src": [
- "hereapplies.sty"
+ "hereapplies.sty",
+ "hereapplies-doc.lyx",
+ "hereapplies-doc.tex",
+ "hereapplies-example.tex"
],
"bugs": {
"url": "https://github.com/madmurphy/hereapplies.sty/issues",
@@ -20,6 +24,7 @@
"index",
"latex",
"latex-hyperref",
+ "latex-labels",
"latex-package",
"lyx",
"lyx-module",
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index cb0e3df249..d52f7f51f5 100644
--- a/macros/latex/contrib/minimalist/minimalist-classical.sty
+++ b/macros/latex/contrib/minimalist/minimalist-classical.sty
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-classical}
- {2022/06/16} {}
+ {2022/09/03} {}
{The classical style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -469,9 +468,15 @@
\titleformat{\paragraph}[runin]
{ \g_minimalist_title_font_paragraph_tl }{\theparagraph}{1em}{#1}
-\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip}
-\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip}
-\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.3\baselineskip}
+\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
@@ -540,26 +545,26 @@
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
\setlist[enumerate]{labelsep=*, leftmargin=*}
-\setlist[enumerate,1]{label=\arabic*$)$,
- ref = \arabic*$)$}
-\setlist[enumerate,2]{label=\emph{\roman*}$)$,
- ref = \arabic{enumi}.\emph{\roman*}$)$}
-\setlist[enumerate,3]{label=\emph{\alph*}$)$,
- ref = \arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$)$}
+\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:}
-\newcommand\desculine{\colorlet{currentcolor}{.}\bgroup\markoverwith{\color{currentcolor!55!paper}
+\newcommand\desculine{\bgroup\markoverwith{\color{.!55!paper}
\rule[-.45ex]{2pt}{.75pt}}\ULon}
\renewcommand{\descriptionlabel}[1]{
\hspace{\labelsep}\normalfont\desculine{#1}
}
\renewlist{itemize}{itemize}{10}
-\setlist[itemize]{leftmargin=*,label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}}
-\AddLanguageSetting { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}} }
-\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.8em}{.75pt}}} }
-\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.5em}{.75pt}}}
-\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\circ$}}
-\setlist[itemize,4]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\ast$}}
+\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
@@ -626,8 +631,17 @@ heading_suffix "}\n"
\newcommand*{\IndexDotfill}
{
- \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hfill
+ \null\nobreak
+ \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hskip1em plus1fill
+ }
+\newcommand*{\IndexLinebreak}
+ {
+ \nobreakspace\textcolor{main-text!50!paper}{\raisebox{.25ex}{.}\raisebox{.05ex}{.}}
+ \item\hspace*{\hangindent}
+ \textcolor{main-text!50!paper}{\raisebox{.35ex}{.}\raisebox{.15ex}{.}}\,
+ \unskip
}
+
\newcommand*{\IndexHeading}[1]
{
\str_if_eq:nnTF { #1 } { Symbols }
@@ -642,7 +656,7 @@ heading_suffix "}\n"
\renewcommand*{\indexspace}
{
\par
- \vspace{2pc ~ plus ~ .5pc ~ minus ~ .3pc}
+ \vspace{2pc plus .5pc minus .3pc}
}
\bool_new:N \l__minimalist_if_first_subitem_bool
@@ -679,6 +693,10 @@ heading_suffix "}\n"
\RequirePackage { mathtools }
\RequirePackage { amsthm }
+\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+
+\PassOptionsToPackage { nopatch = eqnum } { microtype }
+
\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}}}
\bool_if:NTF \l__minimalist_theorem_in_new_line_bool
@@ -715,9 +733,9 @@ heading_suffix "}\n"
\theoremstyle{simple}
-\renewcommand{\qedsymbol}{
+\newcommand{\customqedsymbol}{
\makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
-\let\qedsymbolOriginal\qedsymbol
+\let\qedsymbol\customqedsymbol
\bool_if:NTF \l__minimalist_fast_bool
{
@@ -732,10 +750,19 @@ heading_suffix "}\n"
\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 } }
+
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
{
name style = {
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
index 03d2289372..444dbbe2f2 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.pdf
+++ b/macros/latex/contrib/minimalist/minimalist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.tex b/macros/latex/contrib/minimalist/minimalist-doc.tex
index a59d90ca4d..717e31d600 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ b/macros/latex/contrib/minimalist/minimalist-doc.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{English}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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]{%
+\newenvironment{tip}[1][Tip]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
@@ -110,14 +139,10 @@
\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 \texttt{classical}). You can think of it as a short introduction and demonstration.
+ 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}
-\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
@@ -365,13 +390,13 @@ In the next section, we will go through the options available.
\minimalist{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\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 \texttt{draft} or \texttt{fast}
+ \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}
@@ -383,46 +408,46 @@ In the next section, we will go through the options available.
\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 \texttt{use boldface}
+ \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 \texttt{classical}
+ \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 \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \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 \texttt{regionalref}, \texttt{originalref}
+ \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 \texttt{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 \texttt{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 \texttt{originalref} will have no effect.
+ \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 \texttt{a4paper} or \texttt{b5paper}
+ \item \classoption{a4paper} or \classoption{b5paper}
\begin{itemize}
\item Optional paper size. The default paper size is 7in $\times$ 10in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \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 \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item Use paragraph indentation instead of inter-paragraph spacing.
\end{itemize}
diff --git a/macros/latex/contrib/minimalist/minimalist-plain.sty b/macros/latex/contrib/minimalist/minimalist-plain.sty
index 6afa15b14e..051a773624 100644
--- a/macros/latex/contrib/minimalist/minimalist-plain.sty
+++ b/macros/latex/contrib/minimalist/minimalist-plain.sty
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-plain}
- {2022/06/16} {}
+ {2022/09/03} {}
{The plain style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -443,9 +442,15 @@
\titleformat{\paragraph}[runin]
{ \g_minimalist_title_font_paragraph_tl }{\theparagraph}{1em}{#1}
-\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip}
-\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip}
-\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.3\baselineskip}
+\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
@@ -514,21 +519,21 @@
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
\setlist[enumerate]{labelsep=*, leftmargin=*}
-\setlist[enumerate,1]{label=\arabic*$)$,
- ref = \arabic*$)$}
-\setlist[enumerate,2]{label=\emph{\roman*}$)$,
- ref = \arabic{enumi}.\emph{\roman*}$)$}
-\setlist[enumerate,3]{label=\emph{\alph*}$)$,
- ref = \arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$)$}
+\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=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\cdot$}}
-\AddLanguageSetting { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}} }
-\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.8em}{.75pt}}} }
-\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\rule[.2\baselineskip]{.5em}{.75pt}}}
-\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\circ$}}
-\setlist[itemize,4]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\ast$}}
+\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
@@ -595,8 +600,17 @@ heading_suffix "}\n"
\newcommand*{\IndexDotfill}
{
- \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hfill
+ \null\nobreak
+ \leaders \hbox to .67em {\hss \textcolor{main-text!15!paper}{.} \hss} \hskip1em plus1fill
}
+\newcommand*{\IndexLinebreak}
+ {
+ \nobreakspace\textcolor{main-text!50!paper}{\raisebox{.25ex}{.}\raisebox{.05ex}{.}}
+ \item\hspace*{\hangindent}
+ \textcolor{main-text!50!paper}{\raisebox{.35ex}{.}\raisebox{.15ex}{.}}\,
+ \unskip
+ }
+
\newcommand*{\IndexHeading}[1]
{
\str_if_eq:nnTF { #1 } { Symbols }
@@ -611,7 +625,7 @@ heading_suffix "}\n"
\renewcommand*{\indexspace}
{
\par
- \vspace{2pc ~ plus ~ .5pc ~ minus ~ .3pc}
+ \vspace{2pc plus .5pc minus .3pc}
}
\bool_new:N \l__minimalist_if_first_subitem_bool
@@ -648,11 +662,19 @@ heading_suffix "}\n"
\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}{}
+ {
+ \normalfont
+ \parindent=0pt
+ \parskip=.3333\baselineskip plus .0667\baselineskip minus .0833\baselineskip
+ }{}
{\normalfont}{}
{0pt}
{
@@ -665,7 +687,11 @@ heading_suffix "}\n"
{
\newtheoremstyle{simple}
{}{}
- {\normalfont}{}
+ {
+ \normalfont
+ \parindent=0pt
+ \parskip=.3333\baselineskip plus .0667\baselineskip minus .0833\baselineskip
+ }{}
{\normalfont}{}
{0pt}
{{\thmname{#1}\thmnumber{\nobreakspace #2}}
@@ -674,9 +700,9 @@ heading_suffix "}\n"
\theoremstyle{simple}
-\renewcommand{\qedsymbol}{
+\newcommand{\customqedsymbol}{
\makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
-\let\qedsymbolOriginal\qedsymbol
+\let\qedsymbol\customqedsymbol
\bool_if:NTF \l__minimalist_fast_bool
{
@@ -691,10 +717,19 @@ heading_suffix "}\n"
\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 } }
+
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
{
name style = {
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 910f1e7960..77be9865b6 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist}
- {2022/06/16} {}
+ {2022/09/03} {}
{A simple and clear style for articles and books}
\keys_define:nn { minimalist }
@@ -74,7 +73,7 @@
\PassOptionsToPackage { \CurrentOption } { projlib-theorem }
}
}
-\ProcessKeysOptions { minimalist }
+\ProcessKeyOptions [ minimalist ]
\bool_new:N \l__minimalist_is_book_bool
\cs_if_exist:cTF { c@chapter }
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 5ad7607932..4620adb745 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{minimart}
- {2022/06/16} {}
+ {2022/09/03} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
@@ -72,7 +71,7 @@
\PassOptionsToPackage { \CurrentOption } { minimalist }
}
}
-\ProcessKeysOptions { minimclass }
+\ProcessKeyOptions [ minimclass ]
\LoadClass{\l__minimclass_base_class_tl}
@@ -143,9 +142,6 @@
\RequirePackage { minimalist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -153,6 +149,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__minimclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -175,6 +180,7 @@
{
\RequirePackage { mathpazo }
\RequirePackage { newpxtext }
+ \bool_if:NT \l__projlib_font_useosf_bool { \useosf }
\RequirePackage { amssymb }
\sys_if_engine_pdftex:F
{
@@ -187,12 +193,40 @@
BoldItalicFont = *-bolditalic ,
]
}
+ % Adjusting the kerning of 'embrac' for 'newpxtext'
+ \hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__minimclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -206,25 +240,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { minimclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `minimalist/minimart.cls'.
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index f844f26ffb..45908a0e44 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{minimbook}
- {2022/06/16} {}
+ {2022/09/03} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }
@@ -72,7 +71,7 @@
\PassOptionsToPackage { \CurrentOption } { minimalist }
}
}
-\ProcessKeysOptions { minimclass }
+\ProcessKeyOptions [ minimclass ]
\LoadClass{\l__minimclass_base_class_tl}
@@ -143,9 +142,6 @@
\RequirePackage { minimalist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -153,6 +149,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__minimclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -175,6 +180,7 @@
{
\RequirePackage { mathpazo }
\RequirePackage { newpxtext }
+ \bool_if:NT \l__projlib_font_useosf_bool { \useosf }
\RequirePackage { amssymb }
\sys_if_engine_pdftex:F
{
@@ -187,12 +193,40 @@
BoldItalicFont = *-bolditalic ,
]
}
+ % Adjusting the kerning of 'embrac' for 'newpxtext'
+ \hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__minimclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -206,25 +240,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { minimclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `minimalist/minimbook.cls'.
diff --git a/macros/texinfo/latest/texinfo.tex b/macros/texinfo/latest/texinfo.tex
index e6a700631c..fefff2ed8e 100644
--- a/macros/texinfo/latest/texinfo.tex
+++ b/macros/texinfo/latest/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2022-09-01.06}
+\def\texinfoversion{2022-09-03.12}
%
% Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
%
@@ -4363,8 +4363,7 @@ $$%
% undo it ourselves.
\def\headitemfont{\b}% for people to use in the template row; not changeable
\def\headitem{%
- \checkenv\multitable
- \crcr
+ \crcr % must appear first
\gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
\global\everytab={\bf}% can't use \headitemfont since the parsing differs
\the\everytab % for the first item
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
index 8fad479adf..8cfd4eb066 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
index e50d5d6f62..21aa37a489 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\frontmatter
@@ -113,7 +141,7 @@
\beaulivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
-这篇说明文档即是用 \beaulivre{} 排版的 (使用了参数 \texttt{use boldface}),你可以把它看作一份简短的说明与演示。
+这篇说明文档即是用 \beaulivre{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。
\bigskip
\begin{tip}
@@ -262,13 +290,13 @@ Référence du théorème: \cref{thm:abc}
\beaulivre{} 文档类有下面几个选项:
-\begin{itemize}
- \item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item 语言选项 \classoption{EN} / \classoption{english} / \classoption{English}、\classoption{FR} / \classoption{french} / \classoption{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
\item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
- \item \texttt{draft} 或 \texttt{fast}
+ \item \classoption{draft} 或 \classoption{fast}
\begin{itemize}
\item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
\begin{itemize}
@@ -280,40 +308,40 @@ Référence du théorème: \cref{thm:abc}
\begin{tip}
在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
\end{tip}
- \item \texttt{a4paper} 或 \texttt{b5paper}
+ \item \classoption{a4paper} 或 \classoption{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}、\classoption{times}、\classoption{garamond}、\classoption{noto}、\classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
- \item \texttt{useosf} 选项用来启用“旧式”数字。
+ \item \classoption{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
% \clearpage
- \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}、\classoption{thmnum} 或 \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
- \item \texttt{regionalref}、\texttt{originalref}
+ \item \classoption{regionalref}、\classoption{originalref}
\begin{itemize}
- \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
- \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。
+ \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \classoption{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \classoption{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
+ \item 在 \classoption{fast} 模式下,\classoption{originalref} 将不起作用。
\end{itemize}
\end{itemize}
\bigskip
-另外,排版图书时常用的 \texttt{oneside}、\texttt{twoside} 选项也是可以使用的。默认采用双页排版。
+另外,排版图书时常用的 \classoption{oneside}、\classoption{twoside} 选项也是可以使用的。默认采用双页排版。
\LevelOneTitle{具体说明}
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
index 14f05ee2d7..0b0d279da8 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
index c9327150b2..863c1f5eb0 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\frontmatter
@@ -113,7 +141,7 @@
\beaulivre{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \lebhart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
-This documentation is typeset using \beaulivre{} (with the option \texttt{use boldface}). You can think of it as a short introduction and demonstration.
+This documentation is typeset using \beaulivre{} (with the option \classoption{use boldface}). You can think of it as a short introduction and demonstration.
\bigskip
\begin{tip}
@@ -263,13 +291,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\beaulivre{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\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 \texttt{draft} or \texttt{fast}
+ \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}
@@ -281,40 +309,40 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\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 \texttt{a4paper} or \texttt{b5paper}
+ \item \classoption{a4paper} or \classoption{b5paper}
\begin{itemize}
\item Paper size options. The default paper size is 8.5in $\times$ 11in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \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 \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{use boldface}
+ \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 \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \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 \texttt{regionalref}, \texttt{originalref}
+ \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 \texttt{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 \texttt{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 \texttt{originalref} will have no effect.
+ \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}
\bigskip
-In addition, the commonly used \texttt{oneside} and \texttt{twoside} options are also available. Two-page layout is used by default.
+In addition, the commonly used \classoption{oneside} and \classoption{twoside} options are also available. Two-page layout is used by default.
\LevelOneTitle{Instructions by topic}
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
index f91d45a4b1..143389a347 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
index dd146fc22c..54b0cbfe25 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\frontmatter
@@ -113,7 +141,7 @@
\beaulivre{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \beaulivre{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
-Cette documentation est composée à l'aide de \beaulivre{} (avec l'option \texttt{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+Cette documentation est composée à l'aide de \beaulivre{} (avec l'option \classoption{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\bigskip
\begin{tip}
@@ -263,13 +291,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\beaulivre{} propose les options suivantes :
-\begin{itemize}
- \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item Les options de langue \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
\begin{itemize}
\item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
\item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
\end{itemize}
- \item \texttt{draft} ou \texttt{fast}
+ \item \classoption{draft} ou \classoption{fast}
\begin{itemize}
\item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
\begin{itemize}
@@ -281,39 +309,39 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{tip}
Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
\end{tip}
- \item \texttt{a4paper} ou \texttt{b5paper}
+ \item \classoption{a4paper} ou \classoption{b5paper}
\begin{itemize}
\item Options de format de papier. Le format de papier par défaut est 8.5 pouces $\times$ 11 pouces.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
- \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \item L'option \classoption{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}, \classoption{thmnum} ou \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}, \texttt{originalref}
+ \item \classoption{regionalref}, \classoption{originalref}
\begin{itemize}
- \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \texttt{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \texttt{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
- \item En mode \texttt{fast}, l'option \texttt{originalref} n'aura aucun effet.
+ \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \classoption{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \classoption{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
+ \item En mode \classoption{fast}, l'option \classoption{originalref} n'aura aucun effet.
\end{itemize}
\end{itemize}
\bigskip
-De plus, les options \texttt{oneside} et \texttt{twoside} couramment utilisées lors de la composition de livres sont également disponibles. La disposition recto-verso est utilisée par défaut.
+De plus, les options \classoption{oneside} et \classoption{twoside} couramment utilisées lors de la composition de livres sont également disponibles. La disposition recto-verso est utilisée par défaut.
\LevelOneTitle{Instructions par sujet}
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index 7c63f73479..d06122aa4e 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre.cls
+++ b/macros/unicodetex/latex/beaulivre/beaulivre.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{beaulivre}
- {2022/06/16} {}
+ {2022/09/03} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -126,7 +125,7 @@
\PassOptionsToPackage { \CurrentOption } { colorist }
}
}
-\ProcessKeysOptions { colorclass }
+\ProcessKeyOptions [ colorclass ]
\LoadClass{\l__colorclass_base_class_tl}
@@ -183,9 +182,6 @@
\RequirePackage { colorist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -193,6 +189,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -231,46 +236,62 @@
{
\bool_if:NTF \l__projlib_font_useosf_bool
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
Numbers = OldStyle ,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
Numbers = OldStyle ,
]
}
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
]
}
- \setmonofont { NewCMMono10-Regular.otf }
+ \setmonofont { NewCMMono10 }
[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldOblique,
]
\projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+
+ \hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
@@ -281,48 +302,55 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKmainfont { SourceHanSerifSC-Regular }
+ \setCJKmainfont { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKmainfont { FandolSong-Regular.otf }
+ \setCJKmainfont { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKsansfont{SourceHanSansSC-Regular}
+ \setCJKsansfont { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKsansfont { FandolHei-Regular.otf }
+ \setCJKsansfont { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKmonofont { SourceHanMonoSC-Regular }
+ \setCJKmonofont { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -340,46 +368,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { SCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { SCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -398,46 +433,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
{
- \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC }
[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { TCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansTC-Regular }
{
- \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC }
[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { TCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
{
- \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC }
[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -456,46 +498,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerif-Regular }
{
- \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ \setCJKfamilyfont { JPmain } { SourceHanSerif }
[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { JPmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSans-Regular }
{
- \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ \setCJKfamilyfont { JPsans } { SourceHanSans }
[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { JPsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMono-Regular }
{
- \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ \setCJKfamilyfont { JPmono } { SourceHanMono }
[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -547,9 +596,14 @@
\RequirePackage { unicode-math }
\unimathsetup { math-style = ISO, partial = upright, nabla = upright }
\setmathfont { KpMath-Regular.otf }
+ \setmathfont { KpMath-Regular.otf }
+ [
+ range = \amalg ,
+ Scale = 0.84625
+ ]
\setmathfont { KpMath-Sans.otf }
[
- range = { \sum, \prod, \coprod }
+ range = { \sum }
]
\setmathfont { latinmodern-math.otf }
[
@@ -583,8 +637,8 @@
\cs_gset_eq:NN \square \mdwhtsquare
}
- % A temporary hack proposed in https://tex.stackexchange.com/a/647789
- \hook_gput_code:nnn { begindocument } { minimclass }
+ % https://tex.stackexchange.com/a/647789
+ \hook_gput_code:nnn { begindocument } { colorclass }
{
\NewCommandCopy\unicodevdots\vdots
\RenewDocumentCommand{\vdots}{}{\mathrel{\loweredvdots}}
@@ -669,8 +723,30 @@
\char_set_catcode_active:n { `\· }
\cs_new_protected:Npn · { \ensuremath\cdot }
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__colorclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -684,25 +760,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { colorclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `beaulivre/beaulivre.cls'.
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf b/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf
index 1cdbd80487..fb37baee06 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf
+++ b/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-cn.tex b/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
index df3e6ba662..df48a5f26c 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{Chinese}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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][提示]{%
+\newenvironment{tip}[1][提示]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{\einfart{},以极简主义风格排版你的文章}
\author{许锦文}
@@ -112,14 +141,10 @@
\einfart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
- 这篇说明文档即是用 \einfart{} 排版的 (使用了参数 \texttt{classical}),你可以把它看作一份简短的说明与演示。
+ 这篇说明文档即是用 \einfart{} 排版的 (使用了参数 \classoption{classical}),你可以把它看作一份简短的说明与演示。
\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}
{\setstretch{1.07}\tableofcontents}
@@ -309,13 +334,13 @@ Référence du théorème: \cref{thm:abc}
\einfart{} 文档类有下面几个选项:
-\begin{itemize}
- \item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item 语言选项 \classoption{EN} / \classoption{english} / \classoption{English}、\classoption{FR} / \classoption{french} / \classoption{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
\item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
- \item \texttt{draft} 或 \texttt{fast}
+ \item \classoption{draft} 或 \classoption{fast}
\begin{itemize}
\item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
\begin{itemize}
@@ -327,43 +352,43 @@ Référence du théorème: \cref{thm:abc}
\begin{tip}
在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
\end{tip}
- \item \texttt{a4paper} 或 \texttt{b5paper}
+ \item \classoption{a4paper} 或 \classoption{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 7in $\times$ 10in。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}、\classoption{times}、\classoption{garamond}、\classoption{noto}、\classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
- \item \texttt{useosf} 选项用来启用“旧式”数字。
+ \item \classoption{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
- \item \texttt{classical}
+ \item \classoption{classical}
\begin{itemize}
\item 经典模式。使用这一选项时,将会启用较为古色古香的风格,如同当前的这篇说明文档一样。
\end{itemize}
- \item \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item 采用段首缩进而不是段间间距。
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}、\classoption{thmnum} 或 \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
- \item \texttt{regionalref}、\texttt{originalref}
+ \item \classoption{regionalref}、\classoption{originalref}
\begin{itemize}
- \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
- \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。
+ \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \classoption{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \classoption{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
+ \item 在 \texttt{fast} 模式下,\classoption{originalref} 将不起作用。
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-en.pdf b/macros/unicodetex/latex/einfart/einfart-doc-en.pdf
index 4351f108fa..ab9ca0478f 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-en.pdf
+++ b/macros/unicodetex/latex/einfart/einfart-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-en.tex b/macros/unicodetex/latex/einfart/einfart-doc-en.tex
index e30554fe83..d054d9a47f 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-en.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-en.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{English}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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]{%
+\newenvironment{tip}[1][Tip]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{\einfart{}, write your articles in a simple and clear way}
\author{Jinwen XU}
@@ -112,14 +141,10 @@
\einfart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \einfart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
- This documentation is typeset using \einfart{} (with the option \texttt{classical}). You can think of it as a short introduction and demonstration.
+ This documentation is typeset using \einfart{} (with the option \classoption{classical}). 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
@@ -310,13 +335,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\einfart{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\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 \texttt{draft} or \texttt{fast}
+ \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}
@@ -328,43 +353,43 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\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 \texttt{a4paper} or \texttt{b5paper}
+ \item \classoption{a4paper} or \classoption{b5paper}
\begin{itemize}
\item Paper size options. The default paper size is 7in $\times$ 10in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \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 \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{use boldface}
+ \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 \texttt{classical}
+ \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 \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item Use paragraph indentation instead of inter-paragraph spacing.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \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 \texttt{regionalref}, \texttt{originalref}
+ \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 \texttt{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 \texttt{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 \texttt{originalref} will have no effect.
+ \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}
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf b/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf
index 3f4126eb8a..d69a51a0ef 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf
+++ b/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-fr.tex b/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
index c1c6298c4e..6d6d24d138 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{French}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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][Astuce]{%
+\newenvironment{tip}[1][Astuce]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{\einfart{}, écrivez vos articles de manière simple et claire}
\author{Jinwen XU}
@@ -112,14 +141,10 @@
\einfart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \einfart{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
- Cette documentation est composée à l'aide de \einfart{} (avec l'option \texttt{classical}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+ Cette documentation est composée à l'aide de \einfart{} (avec l'option \classoption{classical}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\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
@@ -309,13 +334,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\LevelOneTitle{Les options}
-\begin{itemize}
- \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item Les options de langue \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
\begin{itemize}
\item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
\item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
\end{itemize}
- \item \texttt{draft} ou \texttt{fast}
+ \item \classoption{draft} ou \classoption{fast}
\begin{itemize}
\item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
\begin{itemize}
@@ -327,43 +352,43 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{tip}
Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
\end{tip}
- \item \texttt{a4paper} ou \texttt{b5paper}
+ \item \classoption{a4paper} ou \classoption{b5paper}
\begin{itemize}
\item Options de format de papier. Le format de papier par défaut est 7 pouces $\times$ 10 pouces.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
- \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \item L'option \classoption{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
- \item \texttt{classical}
+ \item \classoption{classical}
\begin{itemize}
\item Mode classique. Un style antique sera utilisé lorsque cette option est activée, comme dans la documentation actuelle.
\end{itemize}
- \item \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item Utilisez l'indentation des paragraphes au lieu de l'espacement entre les paragraphes.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}, \classoption{thmnum} ou \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}, \texttt{originalref}
+ \item \classoption{regionalref}, \classoption{originalref}
\begin{itemize}
- \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \texttt{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \texttt{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
- \item En mode \texttt{fast}, l'option \texttt{originalref} n'aura aucun effet.
+ \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \classoption{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \classoption{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
+ \item En mode \texttt{fast}, l'option \classoption{originalref} n'aura aucun effet.
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/einfart/einfart.cls b/macros/unicodetex/latex/einfart/einfart.cls
index c27101fa25..e95c073d6f 100644
--- a/macros/unicodetex/latex/einfart/einfart.cls
+++ b/macros/unicodetex/latex/einfart/einfart.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{einfart}
- {2022/06/16} {}
+ {2022/09/03} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
@@ -133,7 +132,7 @@
\PassOptionsToPackage { \CurrentOption } { minimalist }
}
}
-\ProcessKeysOptions { minimclass }
+\ProcessKeyOptions [ minimclass ]
\LoadClass{\l__minimclass_base_class_tl}
@@ -204,9 +203,6 @@
\RequirePackage { minimalist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -214,6 +210,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__minimclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -252,46 +257,62 @@
{
\bool_if:NTF \l__projlib_font_useosf_bool
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
Numbers = OldStyle ,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
Numbers = OldStyle ,
]
}
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
]
}
- \setmonofont { NewCMMono10-Regular.otf }
+ \setmonofont { NewCMMono10 }
[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldOblique,
]
\projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+
+ \hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
@@ -302,48 +323,55 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKmainfont { SourceHanSerifSC-Regular }
+ \setCJKmainfont { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKmainfont { FandolSong-Regular.otf }
+ \setCJKmainfont { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKsansfont{SourceHanSansSC-Regular}
+ \setCJKsansfont { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKsansfont { FandolHei-Regular.otf }
+ \setCJKsansfont { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKmonofont { SourceHanMonoSC-Regular }
+ \setCJKmonofont { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -361,46 +389,53 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { SCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { SCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -419,46 +454,53 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
{
- \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC }
[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { TCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSansTC-Regular }
{
- \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC }
[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { TCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
{
- \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC }
[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -477,46 +519,53 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerif-Regular }
{
- \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ \setCJKfamilyfont { JPmain } { SourceHanSerif }
[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { JPmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSans-Regular }
{
- \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ \setCJKfamilyfont { JPsans } { SourceHanSans }
[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { JPsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMono-Regular }
{
- \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ \setCJKfamilyfont { JPmono } { SourceHanMono }
[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -570,9 +619,14 @@
\RequirePackage { unicode-math }
\unimathsetup { math-style = ISO, partial = upright, nabla = upright }
\setmathfont { KpMath-Regular.otf }
+ \setmathfont { KpMath-Regular.otf }
+ [
+ range = \amalg ,
+ Scale = 0.84625
+ ]
\setmathfont { KpMath-Sans.otf }
[
- range = { \sum, \prod, \coprod }
+ range = { \sum }
]
\setmathfont { latinmodern-math.otf }
[
@@ -606,7 +660,7 @@
\cs_gset_eq:NN \square \mdwhtsquare
}
- % A temporary hack proposed in https://tex.stackexchange.com/a/647789
+ % https://tex.stackexchange.com/a/647789
\hook_gput_code:nnn { begindocument } { minimclass }
{
\NewCommandCopy\unicodevdots\vdots
@@ -692,8 +746,30 @@
\char_set_catcode_active:n { `\· }
\cs_new_protected:Npn · { \ensuremath\cdot }
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__minimclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -707,25 +783,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { minimclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `einfart/einfart.cls'.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
index cde237718f..3b51e48fc9 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
index 55e53b41af..c5140be7d8 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\以多彩的方式排版你的文章}
\author{许锦文}
@@ -106,7 +134,7 @@
\lebhart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
- 这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \texttt{use boldface}),你可以把它看作一份简短的说明与演示。
+ 这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。
\end{abstract}
@@ -286,13 +314,6 @@ Référence du théorème: \cref{thm:abc}
\end{tip}
-\begin{tip}
-如果你喜欢这个文档类,但又希望使用一种更加中规中矩的样式,那么不妨使用 \texttt{classical} 选项,就像这样:
-
-\begin{code}
-\documentclass[classical]{lebhart}
-\end{code}
-\end{tip}
\bigskip
@@ -308,13 +329,13 @@ Référence du théorème: \cref{thm:abc}
\lebhart{} 文档类有下面几个选项:
-\begin{itemize}
- \item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item 语言选项 \classoption{EN} / \classoption{english} / \classoption{English}、\classoption{FR} / \classoption{french} / \classoption{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
\item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
- \item \texttt{draft} 或 \texttt{fast}
+ \item \classoption{draft} 或 \classoption{fast}
\begin{itemize}
\item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
\begin{itemize}
@@ -326,35 +347,35 @@ Référence du théorème: \cref{thm:abc}
\begin{tip}
在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
\end{tip}
- \item \texttt{a4paper} 或 \texttt{b5paper}
+ \item \classoption{a4paper} 或 \classoption{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}、\classoption{times}、\classoption{garamond}、\classoption{noto}、\classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
- \item \texttt{useosf} 选项用来启用“旧式”数字。
+ \item \classoption{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}、\classoption{thmnum} 或 \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
- \item \texttt{regionalref}、\texttt{originalref}
+ \item \classoption{regionalref}、\classoption{originalref}
\begin{itemize}
- \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
- \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。
+ \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \classoption{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \classoption{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
+ \item 在 \classoption{fast} 模式下,\classoption{originalref} 将不起作用。
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
index 08043c1346..937cfd968a 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
index b40f05cdd0..57af583316 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\write your articles in a colorful way}
\author{Jinwen XU}
@@ -106,7 +134,7 @@
\lebhart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \lebhart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
- This documentation is typeset using \lebhart{} (with the option \texttt{use boldface}). You can think of it as a short introduction and demonstration.
+ This documentation is typeset using \lebhart{} (with the option \classoption{use boldface}). You can think of it as a short introduction and demonstration.
\end{abstract}
@@ -287,13 +315,6 @@ or to use the \AmS{} class:
\end{tip}
-\begin{tip}
-If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
-
-\begin{code}
-\documentclass[classical]{lebhart}
-\end{code}
-\end{tip}
% \clearpage
@@ -307,13 +328,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\lebhart{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\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 \texttt{draft} or \texttt{fast}
+ \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}
@@ -325,36 +346,36 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\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 \texttt{a4paper} or \texttt{b5paper}
+ \item \classoption{a4paper} or \classoption{b5paper}
\begin{itemize}
\item Paper size options. The default paper size is 8.5in $\times$ 11in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \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 \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{use boldface}
+ \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 \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
% \clearpage
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \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 \texttt{regionalref}, \texttt{originalref}
+ \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 \texttt{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 \texttt{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 \texttt{originalref} will have no effect.
+ \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}
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
index a94ea9c456..1e431ebd17 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
index 369644bf47..ec1631a991 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\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,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\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
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\écrivez vos articles de manière colorée}
\author{Jinwen XU}
@@ -106,7 +134,7 @@
\lebhart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \lebhart{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
- Cette documentation est composée à l'aide de \lebhart{} (avec l'option \texttt{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+ Cette documentation est composée à l'aide de \lebhart{} (avec l'option \classoption{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\end{abstract}
@@ -287,14 +315,6 @@ ou utilisez la classe \AmS{} :
\vspace{-.5\baselineskip}
\end{tip}
-\begin{tip}
-Si vous aimez la classe de document actuelle, mais que vous souhaitez un style plus «~simple~», vous pouvez utiliser l'option \texttt{classical}, comme ceci :
-
-\begin{code}
-\documentclass[classical]{lebhart}
-\end{code}
-\vspace{-.5\baselineskip}
-\end{tip}
\LevelOneTitle{À propos des polices par défaut}
@@ -308,13 +328,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\lebhart{} propose les options suivantes :
-\begin{itemize}
- \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item Les options de langue \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
\begin{itemize}
\item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
\item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
\end{itemize}
- \item \texttt{draft} ou \texttt{fast}
+ \item \classoption{draft} ou \classoption{fast}
\begin{itemize}
\item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
\begin{itemize}
@@ -326,35 +346,35 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{tip}
Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
\end{tip}
- \item \texttt{a4paper} ou \texttt{b5paper}
+ \item \classoption{a4paper} ou \classoption{b5paper}
\begin{itemize}
\item Options de format de papier. Le format de papier par défaut est 8.5 pouces $\times$ 11 pouces.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
- \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \item L'option \classoption{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}, \classoption{thmnum} ou \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}, \texttt{originalref}
+ \item \classoption{regionalref}, \classoption{originalref}
\begin{itemize}
- \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \texttt{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \texttt{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
- \item En mode \texttt{fast}, l'option \texttt{originalref} n'aura aucun effet.
+ \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \classoption{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \classoption{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
+ \item En mode \classoption{fast}, l'option \classoption{originalref} n'aura aucun effet.
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index 9635010f70..a78a85bccd 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{lebhart}
- {2022/06/16} {}
+ {2022/09/03} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -126,7 +125,7 @@
\PassOptionsToPackage { \CurrentOption } { colorist }
}
}
-\ProcessKeysOptions { colorclass }
+\ProcessKeyOptions [ colorclass ]
\LoadClass{\l__colorclass_base_class_tl}
@@ -183,9 +182,6 @@
\RequirePackage { colorist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -193,6 +189,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -231,46 +236,62 @@
{
\bool_if:NTF \l__projlib_font_useosf_bool
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
Numbers = OldStyle ,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
Numbers = OldStyle ,
]
}
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
]
}
- \setmonofont { NewCMMono10-Regular.otf }
+ \setmonofont { NewCMMono10 }
[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldOblique,
]
\projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+
+ \hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
@@ -281,48 +302,55 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKmainfont { SourceHanSerifSC-Regular }
+ \setCJKmainfont { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKmainfont { FandolSong-Regular.otf }
+ \setCJKmainfont { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKsansfont{SourceHanSansSC-Regular}
+ \setCJKsansfont { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKsansfont { FandolHei-Regular.otf }
+ \setCJKsansfont { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKmonofont { SourceHanMonoSC-Regular }
+ \setCJKmonofont { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -340,46 +368,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { SCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { SCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -398,46 +433,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
{
- \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC }
[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { TCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansTC-Regular }
{
- \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC }
[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { TCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
{
- \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC }
[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -456,46 +498,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerif-Regular }
{
- \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ \setCJKfamilyfont { JPmain } { SourceHanSerif }
[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { JPmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSans-Regular }
{
- \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ \setCJKfamilyfont { JPsans } { SourceHanSans }
[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { JPsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMono-Regular }
{
- \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ \setCJKfamilyfont { JPmono } { SourceHanMono }
[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -547,9 +596,14 @@
\RequirePackage { unicode-math }
\unimathsetup { math-style = ISO, partial = upright, nabla = upright }
\setmathfont { KpMath-Regular.otf }
+ \setmathfont { KpMath-Regular.otf }
+ [
+ range = \amalg ,
+ Scale = 0.84625
+ ]
\setmathfont { KpMath-Sans.otf }
[
- range = { \sum, \prod, \coprod }
+ range = { \sum }
]
\setmathfont { latinmodern-math.otf }
[
@@ -583,8 +637,8 @@
\cs_gset_eq:NN \square \mdwhtsquare
}
- % A temporary hack proposed in https://tex.stackexchange.com/a/647789
- \hook_gput_code:nnn { begindocument } { minimclass }
+ % https://tex.stackexchange.com/a/647789
+ \hook_gput_code:nnn { begindocument } { colorclass }
{
\NewCommandCopy\unicodevdots\vdots
\RenewDocumentCommand{\vdots}{}{\mathrel{\loweredvdots}}
@@ -669,8 +723,30 @@
\char_set_catcode_active:n { `\· }
\cs_new_protected:Npn · { \ensuremath\cdot }
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__colorclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -684,25 +760,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { colorclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `lebhart/lebhart.cls'.
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf
index 4d831c22cc..d596dc7ad5 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
index e49bd7a2b0..4a91ad2308 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{Chinese}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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][提示]{%
+\newenvironment{tip}[1][提示]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\frontmatter
\LocallyStopLineNumbers
@@ -122,17 +151,13 @@
\simplivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
-这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \texttt{use boldface}),你可以把它看作一份简短的说明与演示。
+这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。
\bigskip
\begin{tip}
多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。
\end{tip}
-\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}
-
\tableofcontents
\mainmatter
@@ -275,13 +300,13 @@ Référence du théorème: \cref{thm:abc}
\simplivre{} 文档类有下面几个选项:
-\begin{itemize}
- \item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item 语言选项 \classoption{EN} / \classoption{english} / \classoption{English}、\classoption{FR} / \classoption{french} / \classoption{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
\item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
- \item \texttt{draft} 或 \texttt{fast}
+ \item \classoption{draft} 或 \classoption{fast}
\begin{itemize}
\item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
\begin{itemize}
@@ -293,47 +318,47 @@ Référence du théorème: \cref{thm:abc}
\begin{tip}
在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
\end{tip}
- \item \texttt{a4paper} 或 \texttt{b5paper}
+ \item \classoption{a4paper} 或 \classoption{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 7in $\times$ 10in。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}、\classoption{times}、\classoption{garamond}、\classoption{noto}、\classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
- \item \texttt{useosf} 选项用来启用“旧式”数字。
+ \item \classoption{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
- \item \texttt{classical}
+ \item \classoption{classical}
\begin{itemize}
\item 经典模式。使用这一选项时,将会启用较为古色古香的风格,如同当前的这篇说明文档一样。
\end{itemize}
- \item \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item 采用段首缩进而不是段间间距。
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}、\classoption{thmnum} 或 \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
- \item \texttt{regionalref}、\texttt{originalref}
+ \item \classoption{regionalref}、\classoption{originalref}
\begin{itemize}
- \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
- \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。
+ \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \classoption{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \classoption{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
+ \item 在 \texttt{fast} 模式下,\classoption{originalref} 将不起作用。
\end{itemize}
\end{itemize}
\bigskip
-另外,排版图书时常用的 \texttt{oneside}、\texttt{twoside} 选项也是可以使用的。默认采用双页排版。
+另外,排版图书时常用的 \classoption{oneside}、\classoption{twoside} 选项也是可以使用的。默认采用双页排版。
\LevelOneTitle{具体说明}
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf
index 7d769103fc..ba8d7cce47 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex b/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
index a607310484..f70d41698c 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{English}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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]{%
+\newenvironment{tip}[1][Tip]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\LocallyStopLineNumbers
@@ -123,17 +152,13 @@
\simplivre{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \einfart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
-This documentation is typeset using \simplivre{} (with the option \texttt{use boldface}). You can think of it as a short introduction and demonstration.
+This documentation is typeset using \simplivre{} (with the option \classoption{use boldface}). You can think of it as a short introduction and demonstration.
\bigskip
\begin{tip}
Multi-language support, theorem-like environments, draft marks and some other features are provided by the \ProjLib{} toolkit. Here we only briefly discuss how to use it with this document class. For more detailed information, you can refer to the documentation of \ProjLib{}.
\end{tip}
-\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}
-
\tableofcontents
\mainmatter
@@ -277,13 +302,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\simplivre{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\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 \texttt{draft} or \texttt{fast}
+ \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}
@@ -295,48 +320,48 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\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 \texttt{a4paper} or \texttt{b5paper}
+ \item \classoption{a4paper} or \classoption{b5paper}
\begin{itemize}
\item Paper size options. The default paper size is 7in $\times$ 10in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \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 \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{use boldface}
+ \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 \texttt{classical}
+ \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 \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item Use paragraph indentation instead of inter-paragraph spacing.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \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 \texttt{regionalref}, \texttt{originalref}
+ \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 \texttt{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 \texttt{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 \texttt{originalref} will have no effect.
+ \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
-In addition, the commonly used \texttt{oneside} and \texttt{twoside} options are also available. Two-page layout is used by default.
+In addition, the commonly used \classoption{oneside} and \classoption{twoside} options are also available. Two-page layout is used by default.
\LevelOneTitle{Instructions by topic}
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf
index ceba510095..ef1a2d4bf3 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
index 72156379c9..45c275b6bc 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
@@ -9,8 +9,6 @@
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
-\usepackage{relsize}
-
\usepackage{blindtext}
\UseLanguage{French}
@@ -19,46 +17,73 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
-}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\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,
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+\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,
+ }
}
-{\ResumeLineNumbers}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\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][Astuce]{%
+\newenvironment{tip}[1][Astuce]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,12 +94,16 @@
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,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
%%================================
%% Names
@@ -97,7 +126,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\frontmatter
\LocallyStopLineNumbers
@@ -122,17 +151,13 @@
\simplivre{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \simplivre{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
-Cette documentation est composée à l'aide de \simplivre{} (avec l'option \texttt{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+Cette documentation est composée à l'aide de \simplivre{} (avec l'option \classoption{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\bigskip
\begin{tip}
La prise en charge multilingue, les environnements de type théorème, les marques de brouillon et quelques autres fonctionnalités sont fournis par la boîte à outils \ProjLib{}. Ici, nous ne discutons que brièvement de la façon de l'utiliser avec cette classe de document. Pour plus d'informations, veuillez vous référer à la documentation de \ProjLib{}.
\end{tip}
-\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}
-
\tableofcontents
\mainmatter
@@ -275,13 +300,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\LevelOneTitle{Les options}
-\begin{itemize}
- \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item Les options de langue \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
\begin{itemize}
\item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
\item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
\end{itemize}
- \item \texttt{draft} ou \texttt{fast}
+ \item \classoption{draft} ou \classoption{fast}
\begin{itemize}
\item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
\begin{itemize}
@@ -293,47 +318,47 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{tip}
Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
\end{tip}
- \item \texttt{a4paper} ou \texttt{b5paper}
+ \item \classoption{a4paper} ou \classoption{b5paper}
\begin{itemize}
\item Options de format de papier. Le format de papier par défaut est 7 pouces $\times$ 10 pouces.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
- \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \item L'option \classoption{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
- \item \texttt{classical}
+ \item \classoption{classical}
\begin{itemize}
\item Mode classique. Un style antique sera utilisé lorsque cette option est activée, comme dans la documentation actuelle.
\end{itemize}
- \item \texttt{useindent}
+ \item \classoption{useindent}
\begin{itemize}
\item Utilisez l'indentation des paragraphes au lieu de l'espacement entre les paragraphes.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}, \classoption{thmnum} ou \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}, \texttt{originalref}
+ \item \classoption{regionalref}, \classoption{originalref}
\begin{itemize}
- \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \texttt{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \texttt{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
- \item En mode \texttt{fast}, l'option \texttt{originalref} n'aura aucun effet.
+ \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \classoption{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \classoption{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
+ \item En mode \texttt{fast}, l'option \classoption{originalref} n'aura aucun effet.
\end{itemize}
\end{itemize}
\bigskip
-De plus, les options \texttt{oneside} et \texttt{twoside} couramment utilisées lors de la composition de livres sont également disponibles. La disposition recto-verso est utilisée par défaut.
+De plus, les options \classoption{oneside} et \classoption{twoside} couramment utilisées lors de la composition de livres sont également disponibles. La disposition recto-verso est utilisée par défaut.
\LevelOneTitle{Instructions par sujet}
diff --git a/macros/unicodetex/latex/simplivre/simplivre.cls b/macros/unicodetex/latex/simplivre/simplivre.cls
index 25377b24b8..cedeb63c85 100644
--- a/macros/unicodetex/latex/simplivre/simplivre.cls
+++ b/macros/unicodetex/latex/simplivre/simplivre.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{simplivre}
- {2022/06/16} {}
+ {2022/09/03} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }
@@ -133,7 +132,7 @@
\PassOptionsToPackage { \CurrentOption } { minimalist }
}
}
-\ProcessKeysOptions { minimclass }
+\ProcessKeyOptions [ minimclass ]
\LoadClass{\l__minimclass_base_class_tl}
@@ -204,9 +203,6 @@
\RequirePackage { minimalist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -214,6 +210,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__minimclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -252,46 +257,62 @@
{
\bool_if:NTF \l__projlib_font_useosf_bool
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
Numbers = OldStyle ,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
Numbers = OldStyle ,
]
}
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
]
}
- \setmonofont { NewCMMono10-Regular.otf }
+ \setmonofont { NewCMMono10 }
[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldOblique,
]
\projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+
+ \hook_gput_code:nnn { begindocument/before } { minimclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
@@ -302,48 +323,55 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKmainfont { SourceHanSerifSC-Regular }
+ \setCJKmainfont { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKmainfont { FandolSong-Regular.otf }
+ \setCJKmainfont { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKsansfont{SourceHanSansSC-Regular}
+ \setCJKsansfont { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKsansfont { FandolHei-Regular.otf }
+ \setCJKsansfont { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKmonofont { SourceHanMonoSC-Regular }
+ \setCJKmonofont { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -361,46 +389,53 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { SCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { SCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -419,46 +454,53 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
{
- \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC }
[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { TCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSansTC-Regular }
{
- \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC }
[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { TCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
{
- \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC }
[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -477,46 +519,53 @@
{
\__minimclass_if_font_exist:nnn { SourceHanSerif-Regular }
{
- \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ \setCJKfamilyfont { JPmain } { SourceHanSerif }
[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { JPmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__minimclass_if_font_exist:nnn { SourceHanSans-Regular }
{
- \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ \setCJKfamilyfont { JPsans } { SourceHanSans }
[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { JPsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__minimclass_if_font_exist:nnn { SourceHanMono-Regular }
{
- \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ \setCJKfamilyfont { JPmono } { SourceHanMono }
[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -570,9 +619,14 @@
\RequirePackage { unicode-math }
\unimathsetup { math-style = ISO, partial = upright, nabla = upright }
\setmathfont { KpMath-Regular.otf }
+ \setmathfont { KpMath-Regular.otf }
+ [
+ range = \amalg ,
+ Scale = 0.84625
+ ]
\setmathfont { KpMath-Sans.otf }
[
- range = { \sum, \prod, \coprod }
+ range = { \sum }
]
\setmathfont { latinmodern-math.otf }
[
@@ -606,7 +660,7 @@
\cs_gset_eq:NN \square \mdwhtsquare
}
- % A temporary hack proposed in https://tex.stackexchange.com/a/647789
+ % https://tex.stackexchange.com/a/647789
\hook_gput_code:nnn { begindocument } { minimclass }
{
\NewCommandCopy\unicodevdots\vdots
@@ -692,8 +746,30 @@
\char_set_catcode_active:n { `\· }
\cs_new_protected:Npn · { \ensuremath\cdot }
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__minimclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -707,25 +783,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { minimclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `simplivre/simplivre.cls'.