summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/colorist/README.md7
-rw-r--r--macros/latex/contrib/colorist/colorart.cls340
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls340
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin104178 -> 99093 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex114
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty1026
-rw-r--r--macros/latex/contrib/colorist/colorist.sty1518
-rw-r--r--macros/latex/contrib/minimalist/minimalist-classical.sty72
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin112379 -> 104579 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex113
-rw-r--r--macros/latex/contrib/minimalist/minimalist-plain.sty100
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty2
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls2
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls2
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx215
-rw-r--r--macros/latex/contrib/projlib/README.md8
-rw-r--r--macros/latex/contrib/seu-ml-assign/README.md30
-rw-r--r--macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.pdfbin0 -> 483948 bytes
-rw-r--r--macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.tex214
-rw-r--r--macros/latex/contrib/seu-ml-assign/seu-ml-assign-sample.tex384
-rw-r--r--macros/latex/contrib/seu-ml-assign/seu-ml-assign.cls298
-rw-r--r--macros/luatex/generic/luaaddplot/README.md34
-rw-r--r--macros/luatex/generic/luaaddplot/luaaddplot.dtx300
-rw-r--r--macros/luatex/generic/luaaddplot/luaaddplot.ins19
-rw-r--r--macros/luatex/generic/luaaddplot/luaaddplot.pdfbin0 -> 258501 bytes
-rw-r--r--macros/luatex/generic/luatexko/ChangeLog7
-rw-r--r--macros/luatex/generic/luatexko/README2
-rw-r--r--macros/luatex/generic/luatexko/luatexko-doc.pdfbin338346 -> 339172 bytes
-rw-r--r--macros/luatex/generic/luatexko/luatexko-doc.tex2
-rw-r--r--macros/luatex/generic/luatexko/luatexko-normalize.lua6
-rw-r--r--macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua6
-rw-r--r--macros/luatex/generic/luatexko/luatexko.lua6
-rw-r--r--macros/luatex/generic/luatexko/luatexko.sty6
-rw-r--r--macros/luatex/latex/letgut/README.md17
-rw-r--r--macros/luatex/latex/letgut/doc/CHANGELOG.md12
-rw-r--r--macros/luatex/latex/letgut/doc/exemple-nouveautes.pdfbin0 -> 19444 bytes
-rw-r--r--macros/luatex/latex/letgut/doc/latexmkrc27
-rw-r--r--macros/luatex/latex/letgut/doc/letgut-code.pdfbin0 -> 444403 bytes
-rw-r--r--macros/luatex/latex/letgut/doc/letgut-code.tex3361
-rw-r--r--macros/luatex/latex/letgut/doc/letgut.bib9
-rw-r--r--macros/luatex/latex/letgut/doc/letgut.pdfbin0 -> 309781 bytes
-rw-r--r--macros/luatex/latex/letgut/doc/letgut.tex1435
-rw-r--r--macros/luatex/latex/letgut/doc/listings-conf.tex40
-rw-r--r--macros/luatex/latex/letgut/doc/localconf.tex187
-rw-r--r--macros/luatex/latex/letgut/doc/xindex-letgut.lua94
-rw-r--r--macros/luatex/latex/letgut/source/HOWTO.md33
-rw-r--r--macros/luatex/latex/letgut/source/letgut-banner.org804
-rw-r--r--macros/luatex/latex/letgut/source/letgut.org3405
-rw-r--r--macros/luatex/latex/letgut/tex/Flag_of_La_Francophonie-crop.pdfbin0 -> 2148 bytes
-rw-r--r--macros/luatex/latex/letgut/tex/informations-gut.tex155
-rw-r--r--macros/luatex/latex/letgut/tex/letgut-acronyms.tex198
-rw-r--r--macros/luatex/latex/letgut/tex/letgut.cbx16
-rw-r--r--macros/luatex/latex/letgut/tex/letgut.dbx50
-rw-r--r--macros/luatex/latex/letgut/tex/letgut.lbx8
-rw-r--r--macros/luatex/latex/letgut/tex/logo-gut.pdfbin0 -> 6708 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/README.md4
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdfbin331931 -> 311864 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex107
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdfbin215629 -> 202688 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex113
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdfbin219574 -> 207082 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex106
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls1188
-rw-r--r--macros/unicodetex/latex/einfart/README.md2
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-cn.pdfbin250375 -> 241093 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-cn.tex102
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-en.pdfbin156990 -> 148049 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-en.tex109
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-fr.pdfbin162067 -> 154409 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-fr.tex107
-rw-r--r--macros/unicodetex/latex/einfart/einfart.cls2
-rw-r--r--macros/unicodetex/latex/lebhart/README.md4
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdfbin280462 -> 269110 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex105
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.pdfbin157258 -> 154045 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.tex115
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdfbin160284 -> 160620 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex105
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls1188
-rw-r--r--macros/unicodetex/latex/simplivre/README.md2
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdfbin310348 -> 326762 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex106
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-en.pdfbin211798 -> 224472 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-en.tex114
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdfbin214738 -> 226321 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex109
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre.cls2
87 files changed, 14375 insertions, 4339 deletions
diff --git a/macros/latex/contrib/colorist/README.md b/macros/latex/contrib/colorist/README.md
index 2b54c97fa2..b40c6088b2 100644
--- a/macros/latex/contrib/colorist/README.md
+++ b/macros/latex/contrib/colorist/README.md
@@ -1,14 +1,17 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# `colorist` bundle: write you documents in a colorful way
+**The whole series have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.**
+
## Introduction
`colorist` is a collection of styles and classes that helps you typesetting articles and books
with a colorful design. It mainly consists of two parts.
- Main part:
- - `colorist.sty` : the main style
+ - `colorist.sty` : interface of the main style
+ - `colorist-fancy.sty` : the fancy style
- `colorart.cls` : class for typesetting articles
- `colorbook.cls` : class for typesetting books
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index abd20901e2..cbacee3853 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -2,7 +2,7 @@
%% This is file `colorist/colorart.cls',
%% generated with the docstrip utility.
-%% Copyright (C) 2021 by Jinwen XU
+%% Copyright (C) 2021-2022 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -16,211 +16,157 @@
%% 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\ProvidesClass{colorart}
- [2021/12/16 A colorful article style]
-\def\colorclass@baseclass{article}
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{
- family = @colorclass,
- prefix = @colorclass@,
-}
-\DeclareBoolOption[false]{draft}
-\DeclareBoolOption[false]{fast}
-\DeclareBoolOption[false]{useosf}
-\DeclareBoolOption[false]{lmodern}
-\DeclareBoolOption[false]{palatino}
-\DeclareBoolOption[false]{times}
-\DeclareBoolOption[false]{garamond}
-\DeclareBoolOption[false]{noto}
-\DeclareBoolOption[false]{biolinum}
-\DeclareBoolOption[false]{customfont}
-\DeclareStringOption{thmnum}[PJL@thmnum@default]
-
-\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
-\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
-\newif\if@colorclass@afourpaper\@colorclass@afourpaperfalse
-\DeclareVoidOption{a4paper}{\@colorclass@afourpapertrue}
-
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
-\ProcessKeyvalOptions*\relax
-\LoadClass{\colorclass@baseclass}
-
-\if@colorclass@draft
- \@colorclass@fasttrue
-\fi
-\if@colorclass@lmodern
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@palatino
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@times
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@garamond
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@noto
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@biolinum
- \@colorclass@customfonttrue
-\fi
+\RequirePackage{l3keys2e}
+\ProvidesExplClass
+ {colorart}
+ {2022/03/19} {}
+ {A colorful article style}
+
+\tl_const:Nn \l__colorclass_base_class_tl { article }
+
+
+\bool_new:N \l__colorclass_load_custom_font_file_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_bool
+
+
+\keys_define:nn { colorclass }
+ {
+ , draft .bool_set:N = \l__colorclass_fast_bool
+ , draft .initial:n = { false }
+ , fast .bool_set:N = \l__colorclass_fast_bool
+
+
+ , load custom font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load custom font file .default:n = { colorist.font }
+ , load~custom~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load~custom~font~file .default:n = { colorist.font }
+ , load-custom-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load-custom-font-file .default:n = { colorist.font }
+
+
+ , a4paper .bool_set:N = \l__colorclass_a_four_paper_bool
+ , a4paper .initial:n = { false }
+ , b5paper .bool_set:N = \l__colorclass_b_five_paper_bool
+ , b5paper .initial:n = { false }
+
+ , 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+ , 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+
+ , unknown .code:n = {
+ \PassOptionsToPackage { \CurrentOption } { colorist }
+ }
+ }
+\ProcessKeysOptions { colorclass }
+
+\LoadClass{\l__colorclass_base_class_tl}
%%================================
-%% Page layout
+%% Page layout
%%================================
-\RequirePackage{silence}
-\WarningFilter{geometry}{Over-specification in}
-\RequirePackage[heightrounded]{geometry}
-\geometry{
- papersize={8.5in,11in},
- % total={47em,66em},
- total={6.500in,9.130in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\if@colorclass@bfivepaper
-\geometry{
- b5paper,
- % total={40em,59em},
- total={5.535in,8.160in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-\if@colorclass@afourpaper
-\geometry{
- a4paper,
- % total={47em,70em},
- total={6.500in,9.685in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-
-\RequirePackage{indentfirst}
-
-\if@colorclass@fast
- \PassOptionsToPackage{fast}{colorist}
- \RequirePackage{draftwatermark}
- \DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
-\fi
-
-\RequirePackage{colorist}
+\RequirePackage { silence }
+\WarningFilter { geometry } { Over-specification }
+
+\PassOptionsToPackage { heightrounded } { geometry }
+\RequirePackage { geometry }
+
+\geometry
+ {
+ papersize = { 8.5in, 11in },
+ total = { 6.500in, 9.130in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+
+\bool_if:NT \l__colorclass_b_five_paper_bool
+ {
+ \geometry
+ {
+ b5paper,
+ total = { 5.535in, 8.160in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_a_four_paper_bool
+ {
+ \geometry
+ {
+ a4paper,
+ total = { 6.500in, 9.685in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_fast_bool
+ {
+ \PassOptionsToPackage { fast } { colorist }
+ \RequirePackage { draftwatermark }
+ \DraftwatermarkOptions { text = { \normalfont DRAFT }, color = paper!97!-paper }
+ }
+
+\RequirePackage { indentfirst }
+
+\RequirePackage { colorist }
+
+\hfuzz=2pt
+\vfuzz=2pt
%%================================
-%% Fonts
+%% Fonts
%%================================
-\RequirePackage{iftex}
-\ifPDFTeX
-\RequirePackage[T1]{fontenc}
-\RequirePackage{inputenc}
-\fi
-\if@colorclass@customfont\else
-\RequirePackage{mathpazo}
-\RequirePackage{newpxtext}
-\fi
-\RequirePackage{amssymb}
-
-\if@colorclass@lmodern
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \RequirePackage{cfr-lm}
- \else
- \RequirePackage{lmodern}
- \fi
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@palatino
- \RequirePackage{amssymb}
- \RequirePackage{mathpazo}
- \PassOptionsToPackage{defaultsups}{newpxtext}
- \RequirePackage{newpxtext}
- % \RequirePackage{newpxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.07}}
- \if@colorclass@useosf\useosf\fi
-\fi
-
-\if@colorclass@times
- \RequirePackage{amssymb}
- \PassOptionsToPackage{defaultsups}{newtxtext}
- \RequirePackage{newtxtext}
- \RequirePackage{newtxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.00}}
- \if@colorclass@useosf\useosf\fi
- \let\colorist@textsc\relax
-\fi
-
-\if@colorclass@garamond
- \RequirePackage{amssymb}
- \if@colorclass@useosf\else
- \PassOptionsToPackage{lining}{ebgaramond}
- \fi
- \RequirePackage{ebgaramond-maths}
- \RequirePackage{ebgaramond}
- % \RequirePackage{garamondlibre}
- \PJLsetlinespacing{\setstretch{1.00}}
- \let\colorist@textsc\relax
-\fi
-
-\if@colorclass@noto
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \PassOptionsToPackage{oldstyle}{notomath}
- \fi
- \RequirePackage{anyfontsize}
- \RequirePackage{notomath}
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@biolinum
- \RequirePackage{amssymb}
- % \RequirePackage{mathpazo}
- % \RequirePackage[sansmath]{libertinust1math}
- \ifPDFTeX
- \if@colorclass@useosf
- \PassOptionsToPackage{osf}{biolinum}
- \fi
- \RequirePackage{biolinum}
- \renewcommand*\familydefault{\biolinum@family}
- \else
- \PassOptionsToPackage{no-math}{fontspec}
- \RequirePackage{fontspec}
- \setmainfont{LinBiolinum_R.otf}[
- BoldFont = LinBiolinum_RB.otf ,
- ItalicFont = LinBiolinum_RI.otf ,
- BoldItalicFont = LinBiolinum_RBO.otf,
- \if@colorclass@useosf Numbers = OldStyle\fi ]
- \fi
- \PJLsetlinespacing{\setstretch{1.05}}
- \RequirePackage[italic,defaultmathsizes]{mathastext}
-\fi
-
-\def\PJL@font@alreadyset{}
-
-\PassOptionsToPackage{verbose=silent}{microtype}
-\RequirePackage{microtype}
-\PassOptionsToPackage{all}{nowidow}
-\RequirePackage{nowidow}
-\RequirePackage{embrac}
+\WarningFilter { latexfont } { Font~shape }
+\WarningFilter { latexfont } { Some~font }
+
+\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
+ {
+ \bool_if:NT #1
+ {
+ \exp_args:Nx \file_if_exist:nT { #2 }
+ {
+ \exp_args:Nx \file_input:n { #2 }
+ \use_none:nn
+ }
+ }
+ \use:n { #3 }
+ }
+
+
+\__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_bool { \l__colorclass_custom_font_file_str }
+ {
+ \RequirePackage { projlib-font }
+
+ \bool_if:NF \g_projlib_font_already_set_bool
+ {
+ \RequirePackage { mathpazo }
+ \RequirePackage { newpxtext }
+ \RequirePackage { amssymb }
+ }
+ }
+
+\PassOptionsToPackage { all } { nowidow }
+\RequirePackage { nowidow }
+\RequirePackage { embrac }
%%================================
-%% Graphics
+%% Graphics
%%================================
-\RequirePackage{graphicx}
-\graphicspath{{images/}}
-\RequirePackage{wrapfig}
-\RequirePackage{float}
-\RequirePackage{caption}
-\captionsetup{font=small}
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
\endinput
%%
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index a2ee22f3de..ce2d27ce8b 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -2,7 +2,7 @@
%% This is file `colorist/colorbook.cls',
%% generated with the docstrip utility.
-%% Copyright (C) 2021 by Jinwen XU
+%% Copyright (C) 2021-2022 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -16,211 +16,157 @@
%% 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\ProvidesClass{colorbook}
- [2021/12/16 A colorful book style]
-\def\colorclass@baseclass{book}
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{
- family = @colorclass,
- prefix = @colorclass@,
-}
-\DeclareBoolOption[false]{draft}
-\DeclareBoolOption[false]{fast}
-\DeclareBoolOption[false]{useosf}
-\DeclareBoolOption[false]{lmodern}
-\DeclareBoolOption[false]{palatino}
-\DeclareBoolOption[false]{times}
-\DeclareBoolOption[false]{garamond}
-\DeclareBoolOption[false]{noto}
-\DeclareBoolOption[false]{biolinum}
-\DeclareBoolOption[false]{customfont}
-\DeclareStringOption{thmnum}[PJL@thmnum@default]
-
-\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
-\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
-\newif\if@colorclass@afourpaper\@colorclass@afourpaperfalse
-\DeclareVoidOption{a4paper}{\@colorclass@afourpapertrue}
-
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
-\ProcessKeyvalOptions*\relax
-\LoadClass{\colorclass@baseclass}
-
-\if@colorclass@draft
- \@colorclass@fasttrue
-\fi
-\if@colorclass@lmodern
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@palatino
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@times
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@garamond
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@noto
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@biolinum
- \@colorclass@customfonttrue
-\fi
+\RequirePackage{l3keys2e}
+\ProvidesExplClass
+ {colorbook}
+ {2022/03/19} {}
+ {A colorful book style}
+
+\tl_const:Nn \l__colorclass_base_class_tl { book }
+
+
+\bool_new:N \l__colorclass_load_custom_font_file_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_bool
+
+
+\keys_define:nn { colorclass }
+ {
+ , draft .bool_set:N = \l__colorclass_fast_bool
+ , draft .initial:n = { false }
+ , fast .bool_set:N = \l__colorclass_fast_bool
+
+
+ , load custom font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load custom font file .default:n = { colorist.font }
+ , load~custom~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load~custom~font~file .default:n = { colorist.font }
+ , load-custom-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load-custom-font-file .default:n = { colorist.font }
+
+
+ , a4paper .bool_set:N = \l__colorclass_a_four_paper_bool
+ , a4paper .initial:n = { false }
+ , b5paper .bool_set:N = \l__colorclass_b_five_paper_bool
+ , b5paper .initial:n = { false }
+
+ , 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+ , 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+
+ , unknown .code:n = {
+ \PassOptionsToPackage { \CurrentOption } { colorist }
+ }
+ }
+\ProcessKeysOptions { colorclass }
+
+\LoadClass{\l__colorclass_base_class_tl}
%%================================
-%% Page layout
+%% Page layout
%%================================
-\RequirePackage{silence}
-\WarningFilter{geometry}{Over-specification in}
-\RequirePackage[heightrounded]{geometry}
-\geometry{
- papersize={8.5in,11in},
- % total={47em,66em},
- total={6.500in,9.130in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\if@colorclass@bfivepaper
-\geometry{
- b5paper,
- % total={40em,59em},
- total={5.535in,8.160in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-\if@colorclass@afourpaper
-\geometry{
- a4paper,
- % total={47em,70em},
- total={6.500in,9.685in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-
-\RequirePackage{indentfirst}
-
-\if@colorclass@fast
- \PassOptionsToPackage{fast}{colorist}
- \RequirePackage{draftwatermark}
- \DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
-\fi
-
-\RequirePackage{colorist}
+\RequirePackage { silence }
+\WarningFilter { geometry } { Over-specification }
+
+\PassOptionsToPackage { heightrounded } { geometry }
+\RequirePackage { geometry }
+
+\geometry
+ {
+ papersize = { 8.5in, 11in },
+ total = { 6.500in, 9.130in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+
+\bool_if:NT \l__colorclass_b_five_paper_bool
+ {
+ \geometry
+ {
+ b5paper,
+ total = { 5.535in, 8.160in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_a_four_paper_bool
+ {
+ \geometry
+ {
+ a4paper,
+ total = { 6.500in, 9.685in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_fast_bool
+ {
+ \PassOptionsToPackage { fast } { colorist }
+ \RequirePackage { draftwatermark }
+ \DraftwatermarkOptions { text = { \normalfont DRAFT }, color = paper!97!-paper }
+ }
+
+\RequirePackage { indentfirst }
+
+\RequirePackage { colorist }
+
+\hfuzz=2pt
+\vfuzz=2pt
%%================================
-%% Fonts
+%% Fonts
%%================================
-\RequirePackage{iftex}
-\ifPDFTeX
-\RequirePackage[T1]{fontenc}
-\RequirePackage{inputenc}
-\fi
-\if@colorclass@customfont\else
-\RequirePackage{mathpazo}
-\RequirePackage{newpxtext}
-\fi
-\RequirePackage{amssymb}
-
-\if@colorclass@lmodern
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \RequirePackage{cfr-lm}
- \else
- \RequirePackage{lmodern}
- \fi
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@palatino
- \RequirePackage{amssymb}
- \RequirePackage{mathpazo}
- \PassOptionsToPackage{defaultsups}{newpxtext}
- \RequirePackage{newpxtext}
- % \RequirePackage{newpxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.07}}
- \if@colorclass@useosf\useosf\fi
-\fi
-
-\if@colorclass@times
- \RequirePackage{amssymb}
- \PassOptionsToPackage{defaultsups}{newtxtext}
- \RequirePackage{newtxtext}
- \RequirePackage{newtxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.00}}
- \if@colorclass@useosf\useosf\fi
- \let\colorist@textsc\relax
-\fi
-
-\if@colorclass@garamond
- \RequirePackage{amssymb}
- \if@colorclass@useosf\else
- \PassOptionsToPackage{lining}{ebgaramond}
- \fi
- \RequirePackage{ebgaramond-maths}
- \RequirePackage{ebgaramond}
- % \RequirePackage{garamondlibre}
- \PJLsetlinespacing{\setstretch{1.00}}
- \let\colorist@textsc\relax
-\fi
-
-\if@colorclass@noto
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \PassOptionsToPackage{oldstyle}{notomath}
- \fi
- \RequirePackage{anyfontsize}
- \RequirePackage{notomath}
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@biolinum
- \RequirePackage{amssymb}
- % \RequirePackage{mathpazo}
- % \RequirePackage[sansmath]{libertinust1math}
- \ifPDFTeX
- \if@colorclass@useosf
- \PassOptionsToPackage{osf}{biolinum}
- \fi
- \RequirePackage{biolinum}
- \renewcommand*\familydefault{\biolinum@family}
- \else
- \PassOptionsToPackage{no-math}{fontspec}
- \RequirePackage{fontspec}
- \setmainfont{LinBiolinum_R.otf}[
- BoldFont = LinBiolinum_RB.otf ,
- ItalicFont = LinBiolinum_RI.otf ,
- BoldItalicFont = LinBiolinum_RBO.otf,
- \if@colorclass@useosf Numbers = OldStyle\fi ]
- \fi
- \PJLsetlinespacing{\setstretch{1.05}}
- \RequirePackage[italic,defaultmathsizes]{mathastext}
-\fi
-
-\def\PJL@font@alreadyset{}
-
-\PassOptionsToPackage{verbose=silent}{microtype}
-\RequirePackage{microtype}
-\PassOptionsToPackage{all}{nowidow}
-\RequirePackage{nowidow}
-\RequirePackage{embrac}
+\WarningFilter { latexfont } { Font~shape }
+\WarningFilter { latexfont } { Some~font }
+
+\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
+ {
+ \bool_if:NT #1
+ {
+ \exp_args:Nx \file_if_exist:nT { #2 }
+ {
+ \exp_args:Nx \file_input:n { #2 }
+ \use_none:nn
+ }
+ }
+ \use:n { #3 }
+ }
+
+
+\__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_bool { \l__colorclass_custom_font_file_str }
+ {
+ \RequirePackage { projlib-font }
+
+ \bool_if:NF \g_projlib_font_already_set_bool
+ {
+ \RequirePackage { mathpazo }
+ \RequirePackage { newpxtext }
+ \RequirePackage { amssymb }
+ }
+ }
+
+\PassOptionsToPackage { all } { nowidow }
+\RequirePackage { nowidow }
+\RequirePackage { embrac }
%%================================
-%% Graphics
+%% Graphics
%%================================
-\RequirePackage{graphicx}
-\graphicspath{{images/}}
-\RequirePackage{wrapfig}
-\RequirePackage{float}
-\RequirePackage{caption}
-\captionsetup{font=small}
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
\endinput
%%
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 4059849823..6320e9f13e 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 560dcb2796..98804ad9b3 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -1,7 +1,7 @@
-\documentclass[English,Chinese,French,allowbf]{colorart}
+\documentclass[English,Chinese,French,use boldface,simple name]{colorart}
\setsansfont{texgyreheros}[
- Scale=MatchLowercase,
+ Scale=MatchUppercase,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
@@ -45,7 +45,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -99,11 +99,13 @@
%%================================
\begin{document}
-\title{{\normalfont\bfseries\color{maintext}\colorist{}}\\write your articles or books in a colorful way}
+\def\PackageVersion{2022/03/19}
+
+\title{{\normalfont\bfseries\color{main-text}\colorist{}}\\write your articles or books in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} 2021/12/16}}
+\thanks{Corresponding to: \texttt{\colorist{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{December 2021, in Paris}
+\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
@@ -114,6 +116,10 @@
\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
@@ -125,7 +131,7 @@ In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
\item download and install the required fonts if needed.
- \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+ \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
\LevelOneTitle{Introduction}
@@ -172,7 +178,7 @@ Let's first look at a complete example of \colorart{} (the same works for \lebha
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -222,7 +228,7 @@ For detailed description of this command and more related commands, please refer
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -255,7 +261,7 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -359,7 +365,7 @@ There is no much differences with \colorart{}, only that the title and author in
In the next section, we will go through the options available.
-\clearpage
+% \clearpage
\LevelOneTitle{The options}
\colorist{} offers the following options:
@@ -390,17 +396,13 @@ In the next section, we will go through the options available.
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -530,75 +532,10 @@ For aesthetics, adjacent definitions will be connected together automatically:
Second definition.
\end{definition}
-\LevelTwoTitle{Define a new theorem-like environment}
-
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-
-For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-And then define this environment in one of following five ways:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
- \item This method is usually useful in the following two situations:
- \begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+ Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
\end{tip}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-Here is an example. The following code:
-
-\begin{code}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context.
-The effect is as follows:
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- The \lstinline|proofidea*| environment.
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- The \lstinline|proofidea| environment.
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -606,13 +543,6 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>
-\clearpage
- The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Title, abstract and keywords}
\colorart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -664,10 +594,10 @@ The author information can contain multiple groups, written as:
Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
\bigskip
-\clearpage
+% \clearpage
\LevelOneTitle{Known issues}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item The font settings are still not perfect.
\item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty
new file mode 100644
index 0000000000..2161c7065d
--- /dev/null
+++ b/macros/latex/contrib/colorist/colorist-fancy.sty
@@ -0,0 +1,1026 @@
+%%
+%% This is file `colorist/colorist-fancy.sty',
+%% generated with the docstrip utility.
+
+%% Copyright (C) 2021-2022 by Jinwen XU
+%%
+%% This is part of the colorist class series.
+%%
+%% This work may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License, either version 1.3c of this license or (at
+%% your option) any later version. The latest version of this license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[2020-10-01]
+\RequirePackage{l3keys2e}
+\ProvidesExplPackage
+ {colorist-fancy}
+ {2022/03/19} {}
+ {The fancy style of colorist}
+
+\@ifpackageloaded { colorist } {}
+ {
+ \msg_new:nnn { \@currname }
+ { colorist-not-loaded }
+ { "#1"~is~an~internal~style~of~"colorist".~To~use~it,~you~must~load~the~package~"colorist"~first. }
+ \msg_warning:nnx { \@currname } { colorist-not-loaded } { \@currname }
+ \endinput
+ }
+
+%%================================
+%% Title fonts
+%%================================
+\RequirePackage { anyfontsize }
+
+\bool_if:NTF \l__colorist_use_boldface_bool
+ {
+ \cs_new:Nn \colorist_bfseries: { \bfseries \colorlet{colorist-temp-color}{.} \color{colorist-temp-color!90!paper} }
+ }
+ {
+ \cs_new:Nn \colorist_bfseries: {}
+ }
+
+\tl_new:N \g_colorist_title_font_common_tl
+
+\tl_new:N \g_colorist_title_font_part_tl
+\tl_new:N \g_colorist_title_font_chapter_tl
+\tl_new:N \g_colorist_title_font_section_tl
+\tl_new:N \g_colorist_title_font_subsection_tl
+\tl_new:N \g_colorist_title_font_subsubsection_tl
+\tl_new:N \g_colorist_title_font_paragraph_tl
+
+\tl_gset:Nn \g_colorist_title_font_common_tl { \sffamily }
+\tl_gset:Nn \g_colorist_title_font_part_tl { \colorist_bfseries: \g_colorist_title_font_common_tl }
+\tl_gset:Nn \g_colorist_title_font_chapter_tl { \colorist_bfseries: \g_colorist_title_font_common_tl }
+\tl_gset:Nn \g_colorist_title_font_section_tl { \colorist_bfseries: \g_colorist_title_font_common_tl }
+\tl_gset:Nn \g_colorist_title_font_subsection_tl { \colorist_bfseries: \g_colorist_title_font_common_tl }
+\tl_gset:Nn \g_colorist_title_font_subsubsection_tl { \colorist_bfseries: \g_colorist_title_font_common_tl }
+\tl_gset:Nn \g_colorist_title_font_paragraph_tl { \colorist_bfseries: \g_colorist_title_font_common_tl }
+
+%%================================
+%% Color
+%%================================
+\definecolor{maintheme}{RGB}{70,130,180}
+\definecolor{forestgreen}{RGB}{21,122,81}
+\definecolor{lightorange}{RGB}{255,185,88}
+
+%%================================
+%% Footer
+%%================================
+\RequirePackage { geometry }
+\RequirePackage { fancyhdr }
+\RequirePackage { extramarks }
+
+\hook_gput_code:nnn { begindocument/before } { colorist }
+ {
+ \fancyhfoffset { 0pt }
+ }
+
+\tl_new:N \l_colorist_leftmark_tl
+\tl_new:N \l_colorist_rightmark_tl
+
+\tl_set:Nn \l_colorist_leftmark_tl
+ {
+ \begin{minipage}[t]{.833\textwidth}
+ \lastleftmark
+ \end{minipage}
+ }
+\tl_set:Nn \l_colorist_rightmark_tl
+ {
+ \begin{minipage}[t]{.833\textwidth}
+ \filleft
+ \lastrightmark
+ \end{minipage}
+ }
+
+\fancypagestyle { fancy }
+ {
+ \fancyhf{}
+ \if@twoside
+ \fancyfoot[RO]{\sffamily\textcolor{main-text!30!paper}{ \small \l_colorist_rightmark_tl }
+ \rlap{\nobreakspace\nobreakspace\nobreakspace\nobreakspace\textcolor{main-text!75!paper}{\textbf{\thepage}}}}
+ \fancyfoot[LE]{\leavevmode\sffamily\llap{\textcolor{main-text!75!paper}{\textbf{\thepage}}
+ \nobreakspace\nobreakspace\nobreakspace\nobreakspace}
+ \textcolor{main-text!30!paper}{ \l_colorist_leftmark_tl }}
+ \else
+ \fancyfoot[R]{\textcolor{main-text!30!paper}{ \l_colorist_rightmark_tl }
+ \rlap{\nobreakspace\nobreakspace\nobreakspace\nobreakspace\textcolor{main-text!75!paper}{\textbf{\thepage}}}}
+ \fi
+ \renewcommand{\headrulewidth}{0pt}
+ }
+\pagestyle{fancy}
+
+\fancypagestyle { plain }
+ {
+ \fancyhf{}
+ \if@twoside
+ \fancyfoot[RO]{\sffamily
+ \nobreakspace\rlap{\nobreakspace\nobreakspace\nobreakspace\nobreakspace\textcolor{main-text!75!paper}{\textbf{\thepage}}}}
+ \fancyfoot[LE]{\leavevmode\sffamily\llap{\textcolor{main-text!75!paper}{\textbf{\thepage}}
+ \nobreakspace\nobreakspace}}
+ \else
+ \fancyfoot[R]{\sffamily
+ \nobreakspace\nobreakspace\nobreakspace\rlap{\textcolor{main-text!75!paper}{\textbf{\thepage}}}}
+ \fi
+ \renewcommand{\headrulewidth}{0pt}
+ }
+
+\bool_if:NTF \l__colorist_is_book_bool
+ {
+ \if@twoside
+ \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+ \renewcommand*{\sectionmark}[1]{
+ \markright{\thesection\nobreakspace\nobreakspace#1}}
+ }
+ {
+ \if@twoside
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}}
+ \else
+ \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
+ \fi
+ }
+
+%%================================
+%% Title format
+%%================================
+\RequirePackage [ explicit, newparttoc ] { titlesec }
+\PassOptionsToPackage { normalem } { ulem }
+\RequirePackage { ulem }
+
+\PassOptionsToPackage { many } { tcolorbox }
+\RequirePackage { tcolorbox }
+\bool_if:NT \l__colorist_fast_bool { \tcbstartdraftmode }
+
+\newcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
+
+\AddLanguageSetting
+ {
+ \renewcommand{\partstring}{\MakeUppercase{{\partname\nobreakspace\protect\thepart}}}
+ }
+\AddLanguageSetting [ schinese ]
+ {
+ \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分}
+ }
+\AddLanguageSetting [ tchinese ]
+ {
+ \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部分}
+ }
+\AddLanguageSetting [ japanese ]
+ {
+ \renewcommand{\partstring}{第 \nobreakspace\thepart\nobreakspace 部}
+ }
+
+\bool_if:NTF \l__colorist_is_book_bool
+ {
+ \setcounter{secnumdepth}{3}
+
+ %% Part
+ \titleclass{\part}{top} % make part like a chapter
+ \titleformat{\part}[display]
+ { \g_colorist_title_font_part_tl \filleft}
+ {
+ \thispagestyle{empty}
+ \begin{tikzpicture}[remember~picture,overlay]
+ \fill[maintheme!10!paper] (current~page.north~west) rectangle (current~page.south~east);
+ \node at ($(current~page.north~west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{\thepart}}};
+ \end{tikzpicture}
+ }
+ {1em}
+ {\fontsize{20}{0}\selectfont\MakeUppercase{#1}}
+ \titleformat{name=\part,numberless}[display]
+ {% \phantomsection\addcontentsline{toc}{part}{#1}%
+ \g_colorist_title_font_part_tl \filleft}
+ {
+ \thispagestyle{empty}
+ \begin{tikzpicture}[remember~picture,overlay]
+ \fill[maintheme!10!paper] (current~page.north~west) rectangle (current~page.south~east);
+ \node at ($(current~page.north~west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{$*$}}};
+ \end{tikzpicture}
+ }
+ {1em}
+ {\fontsize{20}{0}\selectfont\MakeUppercase{#1}}
+ \titlespacing*{\part}{0pt}{5em}{6em}
+ %% Text after part
+ \newcommand{\parttext}[1]{
+ \vfill
+ \begin{flushright}
+ \begin{minipage}{0.833\textwidth}
+ \color{main-text!80!paper}\raggedleft#1
+ \end{minipage}
+ \end{flushright}
+ \vfill\vfill
+ \cleardoublepage
+ }
+
+ %% Chapter
+ % Numbered chapter title: \TheChapter{<number>}{<title>}
+ \newcommand{\TheChapter}[2]
+ {
+ \tcbsidebyside[enhanced,sidebyside~adapt=right,sidebyside~align=bottom,
+ colback=paper,frame~hidden,
+ segmentation~code={
+ \filldraw[maintheme] (segmentation.north)
+ -- ($(segmentation.east)-(12pt,0)$)
+ -- ($(segmentation.west)+(12pt,0)$)
+ -- (segmentation.south);}
+ ]{\filleft#2}{\normalfont\textcolor{maintheme}{\scalebox{4}{#1}}}
+ }
+ % Numberless chapter title: \TheChapterSingle{<title>}
+ \newcommand{\TheChapterSingle}[1]
+ {
+ \begin{tcolorbox}[
+ enhanced,
+ width = 0.67\textwidth,
+ colback=paper,frame~hidden,
+ halign=center]
+ #1
+ \vspace{-.6em}
+ \begin{center}
+ \begin{tikzpicture}
+ \filldraw[maintheme] (-4em,0) -- (4em,0) -- (0,-.1em) -- (0,.1em);
+ \end{tikzpicture}
+ \end{center}
+ \end{tcolorbox}
+ }
+
+ \titleformat{name=\chapter}
+ { \g_colorist_title_font_chapter_tl \scshape\huge} % Format
+ {} % Label
+ {0mm} % Sep
+ {\TheChapter{\thechapter}{#1}} % Before-code
+ \titlespacing*{name=\chapter}
+ {0em}{*2}{0em} % {left}{before-sep}{after-sep}
+
+ \titleformat{name=\chapter, numberless}
+ {\filcenter \g_colorist_title_font_chapter_tl \scshape\huge}
+ {}
+ {0mm}
+ {\TheChapterSingle{#1}}
+ \titlespacing*{name=\chapter, numberless}
+ {0em}{*2}{0em}
+
+ %% Section
+ \titleformat{\section}
+ {\color{maintheme} \g_colorist_title_font_section_tl \large}
+ {\thesection}{.75em}{#1}
+
+ %% Subsection
+ \titleformat{\subsection}
+ { \g_colorist_title_font_subsection_tl }{\thesubsection}{.75em}
+ {#1}
+ }
+ {
+ %% Part
+ \titleformat{\part}[display]
+ { \g_colorist_title_font_part_tl \filleft}
+ {\partstring}
+ {.3em}
+ {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
+ \titleformat{name=\part,numberless}[display]
+ {% \phantomsection\addcontentsline{toc}{part}{#1}
+ \g_colorist_title_font_part_tl \filleft}
+ {\phantom{\MakeUppercase{\partname}}}
+ {.3em}
+ {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
+ %% Text after part
+ \newcommand{\parttext}[1]
+ {
+ \begin{flushright}
+ \begin{minipage}{0.833\textwidth}
+ \color{main-text!80!paper}\raggedleft#1
+ \end{minipage}
+ \end{flushright}
+ }
+
+ %% Section
+ \titleformat{\section}
+ {\color{maintheme} \g_colorist_title_font_section_tl \large}
+ {\thesection}{.75em}{\scshape #1}
+
+ %% Subsection
+ \titleformat{\subsection}
+ { \g_colorist_title_font_subsection_tl }{\thesubsection}{.75em}
+ {#1}
+ }
+
+%% Subsubsection
+\bool_if:NTF \l__colorist_runin_bool
+ {
+ \titleformat{\subsubsection}[runin]
+ {\color{main-text!70!paper} \g_colorist_title_font_subsubsection_tl }
+ {\thesubsubsection}
+ {.5em}
+ {#1.}
+ [\hspace*{.3em}]
+ }
+ {
+ \titleformat{\subsubsection}
+ {\color{main-text!70!paper} \g_colorist_title_font_subsubsection_tl }
+ {\thesubsubsection}
+ {.5em}
+ {#1}
+ }
+
+%% Paragraph
+\titleformat{\paragraph}[runin]
+ { \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}
+
+%%================================
+%% ToC format
+%%================================
+\RequirePackage { titletoc }
+\titlecontents{part}
+ [0em]
+ {\addvspace{1.5pc}\large\filcenter\sffamily \colorist_bfseries: }
+ {\textcolor{maintheme}{\bfseries\thecontentslabel}\nopagebreak\\\nopagebreak\uppercase}
+ {}
+ {} % without page number
+ [\addvspace{.5pc}]
+
+\bool_if:NTF \l__colorist_is_book_bool
+ {
+ \titlecontents{chapter}
+ [2em] % i.e., 0em (part) + 2em
+ {\addvspace{1pc}\normalfont\color{maintheme}\sffamily \colorist_bfseries: }
+ {\contentslabel{2em}}
+ {\scshape\hspace*{-2em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\hspace*{-.25pt}\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage}
+ \titlecontents{section}
+ [4em] % i.e., 2em (chapter) + 2em
+ {\addvspace{.3pc}\normalfont\color{maintheme}\sffamily}
+ {\contentslabel{1.75em}}
+ {\hspace*{-1.75em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage}
+ \titlecontents{subsection}
+ [7em] % i.e., 4em (section) + 3em
+ {\addvspace{.15pc}\normalfont\sffamily}
+ {\contentslabel{2.75em}}
+ {\hspace*{-2.75em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage}
+ \titlecontents{subsubsection}
+ [10em] % i.e., 7em (subsection) + 3em
+ {\normalfont\sffamily}
+ {\contentslabel{3.25em}}
+ {\hspace*{-3.25em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage}
+ }
+ {
+ \titlecontents{section}
+ [2em] % i.e., 0em (part) + 2em
+ {\addvspace{.3pc}\normalfont\color{maintheme}\sffamily}
+ {\contentslabel{1.75em}}
+ {\hspace*{-1.75em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage}
+ \titlecontents{subsection}
+ [4.5em] % i.e., 2em (section) + 2.5em
+ {\addvspace{.15pc}\normalfont\sffamily}
+ {\contentslabel{2.15em}}
+ {\hspace*{-2.15em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage}
+ \titlecontents{subsubsection}
+ [7.75em] % i.e., 5em (subsection) + 3.25em
+ {\normalfont\sffamily}
+ {\contentslabel{2.75em}}
+ {\hspace*{-2.75em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage}
+ }
+
+%%================================
+%% Lists
+%%================================
+\RequirePackage { enumitem }
+\setlist{noitemsep}
+\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[description]{font=\normalfont\colorist_bfseries:}
+
+\setlist[itemize]{leftmargin=*}
+\AddLanguageSetting { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}} }
+\AddLanguageSetting [french] { \setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!55!paper}{---}} }
+\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}}
+\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\texttt{*}}}
+
+%%================================
+%% Blank page
+%%================================
+\newcommand{\blinkpagetext}{This~page~is~intentionally~left~blank}
+\renewcommand{\cleardoublepage}{
+ \relax
+ \clearpage
+ \if@twoside\ifodd\c@page\relax\else
+ \thispagestyle{empty}
+ \hook_gput_next_code:nn { shipout/background }
+ {
+ \put(0.5\paperwidth,-0.5\paperheight){
+ \makebox[0pt]{\large\color{main-text!10!paper}\blinkpagetext}}
+ }
+ \null\newpage\fi\fi
+}
+
+%%================================
+%% Draft mark
+%%================================
+\RequirePackage { projlib-draft }
+
+%%================================
+%% Icons
+%%================================
+\RequirePackage{tikz}
+\newcommand{\ideabulb}[2][0.15]
+ {
+ \scalebox{#1}{
+ \begin{tikzpicture}
+ \filldraw[draw=#2,fill=#2] (0,0) circle [radius=1cm];
+ \filldraw[draw=paper,fill=paper,rounded~corners=0.8pt]
+ [rotate=20] (-0.26,-0.66) rectangle (-0.06,-0.6)
+ [xshift=-0.4mm,yshift=1mm] (-0.26,-0.66) rectangle (0.02,-0.6)
+ [xshift=0.4mm,yshift=1mm] (-0.26,-0.66) rectangle (-0.06,-0.6);
+ \draw[draw=paper,line~width=0.7mm] (-0.18,-0.46)
+ .. controls (-0.18,-0.28) and (-0.28,-0.12) ..(-0.4,0.1)
+ .. controls (-0.55,0.4) and (-0.3,0.64) ..(0,0.64)
+ .. controls (0.3,0.64) and (0.55,0.4) ..(0.4,0.1)
+ .. controls (0.28,-0.12) and (0.18,-0.28) ..(0.18,-0.46);
+ \end{tikzpicture}}
+ }
+
+\newcommand{\questionmark}[2][0.15]
+ {
+ \scalebox{#1}{
+ \begin{tikzpicture}
+ \filldraw[draw=#2,fill=#2] (0,0) circle [radius=1cm];
+ \filldraw[paper,yshift=0.5mm,scale=0.9] (-0.4,0.1) circle [radius=0.77mm];
+ \draw[draw=paper,line~width=1.5mm,yshift=0.5mm,scale=0.9] (-0.4,0.1)
+ .. controls (-0.55,0.4) and (-0.3,0.64) ..(0,0.64)
+ .. controls (0.3,0.64) and (0.55,0.4) ..(0.4,0.1)
+ .. controls (0.28,-0.12) and (0.05,-0.28) ..(0.05,-0.3)
+ .. controls (0,-0.36) and (0.0,-0.45) ..(0.0,-0.5);
+ \fill[fill=paper,rounded~corners=0.6mm]
+ (-0.09,-0.75) rectangle (0.09,-0.53);
+ \end{tikzpicture}}
+ }
+
+%%================================
+%% Theorems
+%%================================
+\RequirePackage { mathtools }
+\RequirePackage { amsthm }
+
+\bool_if:NTF \l__colorist_theorem_in_new_line_bool
+ {
+ \newtheoremstyle{simple}
+ {}{}
+ {\normalfont}{}
+ {\normalfont}{}
+ {\newline}
+ {{\thmname{#1}\nobreakspace\thmnumber{#2}}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}\ensuremath{(\text{#3})}}}\smallskip}
+ }
+ {
+ \newtheoremstyle{simple}
+ {}{}
+ {\normalfont}{}
+ {\normalfont}{}
+ {0pt}
+ {{\thmname{#1}\nobreakspace\thmnumber{#2}}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}\ensuremath{(\text{#3})}}}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace}
+ }
+
+\renewcommand{\qedsymbol}{
+ \makebox[1em]{\color{main-text!27!paper}\rule[-0.1em]{.95em}{.95em}}}
+\let\qedsymbolOriginal\qedsymbol
+
+\bool_if:NTF \l__colorist_theorem_in_new_line_bool
+ {
+ \newtheoremstyle{basic}
+ {0pt}{0pt}{\normalfont}{0pt}
+ {}{\;}{\newline}
+ {{\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}}
+ \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace(#3)}\smallskip}
+ }
+ {
+ \newtheoremstyle{basic}
+ {0pt}{0pt}{\normalfont}{0pt}
+ {}{\;}{0.25em}
+ {{\thmname{#1}\nobreakspace\thmnumber{\textup{#2}}}
+ \thmnote{\normalfont\sffamily\color{main-text}\nobreakspace(#3)}}
+ }
+
+\theoremstyle{basic}
+
+\newtheoremstyle{emphasis}
+ {0pt}{0pt}{\itshape}{0pt}{}{}{0pt}
+ {\thmnote{\normalfont\sffamily\color{main-text}#3\hspace*{0.5em}}}
+
+\renewenvironment{proof}[1][\proofname]{\par
+ \pushQED{\qed}
+ \normalfont \topsep6\p@\@plus6\p@\relax
+ \trivlist
+ \item[\hskip\labelsep
+ \itshape \sffamily \colorist_bfseries:
+ #1\hspace{.4em}
+ \textcolor{main-text!27!paper}{$|$}]\ignorespaces
+}{%
+ \popQED\endtrivlist\@endpefalse
+}
+
+\bool_if:NTF \l__colorist_fast_bool
+ {
+ \providecommand{\phantomsection}{}
+ \RequirePackage { url }
+ \newcommand{\href}[2]{#2}
+ }
+ {
+ \PassOptionsToPackage { hidelinks,linktoc=all } { hyperref }
+ \RequirePackage { bookmark }
+ \RequirePackage { hyperref }
+ }
+
+
+\PassOptionsToPackage
+ {
+ theorem style = {
+ , remark = emphasis
+ , observation = emphasis
+ }
+ }
+ { projlib-theorem }
+
+\RequirePackage { projlib-theorem }
+
+\SetTheorem { theorem, lemma, proposition, corollary, property, axiom, definition-theorem, definition-proposition }
+ {
+ name style = {
+ heading style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ }
+ }
+
+\SetTheorem { definition, assumption, convention, hypothesis, notation }
+ {
+ name style = {
+ heading style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ }
+ }
+
+\SetTheorem { fact, example, problem, question, exercise }
+ {
+ name style = {
+ heading style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ }
+ }
+
+\SetTheorem { conjecture }
+ {
+ name style = {
+ heading style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ }
+ }
+
+\SetTheorem { definition-proposition }
+ {
+ name = {
+ heading = {
+ , english = \color{forestgreen}Definition\color{main-text}-\color{orange}Proposition
+ , french = \color{forestgreen}Définition\color{main-text}-\color{orange}Proposition
+ , ngerman = \color{forestgreen}Definition\color{main-text}-\color{orange}Proposition
+ , italian = \color{forestgreen}Definizione\color{main-text}-\color{orange}Proposizione
+ , portuguese = \color{forestgreen}Definição\color{main-text}-\color{orange}Proposição
+ , brazilian = \color{forestgreen}Definição\color{main-text}-\color{orange}Proposição
+ , spanish = \color{forestgreen}Definición\color{main-text}-\color{orange}Proposición
+ , schinese = \color{forestgreen}定义\color{main-text}-\color{orange}命题
+ , tchinese = \color{forestgreen}定義\color{main-text}-\color{orange}命題
+ , japanese = \color{forestgreen}定義\color{main-text}-\color{orange}命題
+ , russian = \color{forestgreen}Определение\color{main-text}-\color{orange}Предложение
+ }
+ }
+ }
+
+\SetTheorem { definition-theorem }
+ {
+ name = {
+ heading = {
+ , english = \color{forestgreen}Definition\color{main-text}-\color{orange}Theorem
+ , french = \color{forestgreen}Définition\color{main-text}-\color{orange}Théorème
+ , ngerman = \color{forestgreen}Definition\color{main-text}-\color{orange}Satz
+ , italian = \color{forestgreen}Definizione\color{main-text}-\color{orange}Teorema
+ , portuguese = \color{forestgreen}Definição\color{main-text}-\color{orange}Teorema
+ , brazilian = \color{forestgreen}Definição\color{main-text}-\color{orange}Teorema
+ , spanish = \color{forestgreen}Definición\color{main-text}-\color{orange}Teorema
+ , schinese = \color{forestgreen}定义\color{main-text}-\color{orange}定理
+ , tchinese = \color{forestgreen}定義\color{main-text}-\color{orange}定理
+ , japanese = \color{forestgreen}定義\color{main-text}-\color{orange}定理
+ , russian = \color{forestgreen}Определение\color{main-text}-\color{orange}Теорема
+ }
+ }
+ }
+
+\bool_if:NF \l__projlib_theorem_complexname_bool
+ {
+ \SetTheorem { theorem, lemma, proposition, corollary, property, axiom, definition-theorem, definition-proposition }
+ {
+ name style = {
+ , crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , Crefname style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , numbering style = { \color{orange}\colorist_bfseries:\g_colorist_title_font_common_tl }
+ }
+ }
+
+ \SetTheorem { definition, assumption, convention, hypothesis, notation }
+ {
+ name style = {
+ , crefname style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , Crefname style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , numbering style = { \color{forestgreen}\colorist_bfseries:\g_colorist_title_font_common_tl }
+ }
+ }
+
+ \SetTheorem { fact, example, problem, question, exercise }
+ {
+ name style = {
+ , crefname style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , Crefname style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , numbering style = { \color{main-text}\colorist_bfseries:\g_colorist_title_font_common_tl }
+ }
+ }
+
+ \SetTheorem { conjecture }
+ {
+ name style = {
+ , crefname style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , Crefname style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl\textsc }
+ , numbering style = { \color{purple}\colorist_bfseries:\g_colorist_title_font_common_tl }
+ }
+ }
+
+ \SetTheorem { definition-proposition }
+ {
+ name = {
+ , crefname = {
+ , english = {\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}{\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}
+ , french = [la]{\color{forestgreen}Définition\color{main-text}-\color{orange}Proposition}[les]{\color{forestgreen}Définition\color{main-text}-\color{orange}Proposition}
+ , ngerman = {\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}{\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}
+ , italian = [la]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Proposizione}[le]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Proposizione}
+ , portuguese = [a]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}[as]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}
+ , brazilian = [a]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}[as]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}
+ , spanish = [la]{\color{forestgreen}Definición\color{main-text}-\color{orange}Proposición}[las]{\color{forestgreen}Definición\color{main-text}-\color{orange}Proposición}
+ , schinese = {\color{forestgreen}定义\color{main-text}-\color{orange}命题}{\color{forestgreen}定义\color{main-text}-\color{orange}命题}
+ , tchinese = {\color{forestgreen}定義\color{main-text}-\color{orange}命題}{\color{forestgreen}定義\color{main-text}-\color{orange}命題}
+ , japanese = {\color{forestgreen}定義\color{main-text}-\color{orange}命題}{\color{forestgreen}定義\color{main-text}-\color{orange}命題}
+ , russian = {\color{forestgreen}Определение\color{main-text}-\color{orange}Предложение}{\color{forestgreen}Определение\color{main-text}-\color{orange}Предложение}
+ }
+ , Crefname = {
+ , english = {\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}{\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}
+ , french = [la]{\color{forestgreen}Définition\color{main-text}-\color{orange}Proposition}[les]{\color{forestgreen}Définition\color{main-text}-\color{orange}Proposition}
+ , ngerman = {\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}{\color{forestgreen}Definition\color{main-text}-\color{orange}Proposition}
+ , italian = [la]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Proposizione}[le]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Proposizione}
+ , portuguese = [a]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}[as]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}
+ , brazilian = [a]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}[as]{\color{forestgreen}Definição\color{main-text}-\color{orange}Proposição}
+ , spanish = [la]{\color{forestgreen}Definición\color{main-text}-\color{orange}Proposición}[las]{\color{forestgreen}Definición\color{main-text}-\color{orange}Proposición}
+ , schinese = {\color{forestgreen}定义\color{main-text}-\color{orange}命题}{\color{forestgreen}定义\color{main-text}-\color{orange}命题}
+ , tchinese = {\color{forestgreen}定義\color{main-text}-\color{orange}命題}{\color{forestgreen}定義\color{main-text}-\color{orange}命題}
+ , japanese = {\color{forestgreen}定義\color{main-text}-\color{orange}命題}{\color{forestgreen}定義\color{main-text}-\color{orange}命題}
+ , russian = {\color{forestgreen}Определение\color{main-text}-\color{orange}Предложение}{\color{forestgreen}Определение\color{main-text}-\color{orange}Предложение}
+ }
+ }
+ }
+
+ \SetTheorem { definition-theorem }
+ {
+ name = {
+ , crefname = {
+ , english = {\color{forestgreen}Definition\color{main-text}-\color{orange}Theorem}{\color{forestgreen}Definition\color{main-text}-\color{orange}Theorem}
+ , french = [la]{\color{forestgreen}Définition\color{main-text}-\color{orange}Théorème}[les]{\color{forestgreen}Définition\color{main-text}-\color{orange}Théorème}
+ , ngerman = {\color{forestgreen}Definition\color{main-text}-\color{orange}Satz}{\color{forestgreen}Definition\color{main-text}-\color{orange}Satz}
+ , italian = [la]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Teorema}[le]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Teorema}
+ , portuguese = [a]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}[as]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}
+ , brazilian = [a]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}[as]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}
+ , spanish = [la]{\color{forestgreen}Definición\color{main-text}-\color{orange}Teorema}[las]{\color{forestgreen}Definición\color{main-text}-\color{orange}Teorema}
+ , schinese = {\color{forestgreen}定义\color{main-text}-\color{orange}定理}{\color{forestgreen}定义\color{main-text}-\color{orange}定理}
+ , tchinese = {\color{forestgreen}定義\color{main-text}-\color{orange}定理}{\color{forestgreen}定義\color{main-text}-\color{orange}定理}
+ , japanese = {\color{forestgreen}定義\color{main-text}-\color{orange}定理}{\color{forestgreen}定義\color{main-text}-\color{orange}定理}
+ , russian = {\color{forestgreen}Определение\color{main-text}-\color{orange}Теорема}{\color{forestgreen}Определение\color{main-text}-\color{orange}Теорема}
+ }
+ , Crefname = {
+ , english = {\color{forestgreen}Definition\color{main-text}-\color{orange}Theorem}{\color{forestgreen}Definition\color{main-text}-\color{orange}Theorem}
+ , french = [La]{\color{forestgreen}Définition\color{main-text}-\color{orange}Théorème}[Les]{\color{forestgreen}Définition\color{main-text}-\color{orange}Théorème}
+ , ngerman = {\color{forestgreen}Definition\color{main-text}-\color{orange}Satz}{\color{forestgreen}Definition\color{main-text}-\color{orange}Satz}
+ , italian = [La]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Teorema}[Le]{\color{forestgreen}Definizione\color{main-text}-\color{orange}Teorema}
+ , portuguese = [A]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}[As]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}
+ , brazilian = [A]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}[As]{\color{forestgreen}Definição\color{main-text}-\color{orange}Teorema}
+ , spanish = [La]{\color{forestgreen}Definición\color{main-text}-\color{orange}Teorema}[Las]{\color{forestgreen}Definición\color{main-text}-\color{orange}Teorema}
+ , schinese = {\color{forestgreen}定义\color{main-text}-\color{orange}定理}{\color{forestgreen}定义\color{main-text}-\color{orange}定理}
+ , tchinese = {\color{forestgreen}定義\color{main-text}-\color{orange}定理}{\color{forestgreen}定義\color{main-text}-\color{orange}定理}
+ , japanese = {\color{forestgreen}定義\color{main-text}-\color{orange}定理}{\color{forestgreen}定義\color{main-text}-\color{orange}定理}
+ , russian = {\color{forestgreen}Определение\color{main-text}-\color{orange}Теорема}{\color{forestgreen}Определение\color{main-text}-\color{orange}Теорема}
+ }
+ }
+ }
+ }
+
+\RequirePackage { marginnote }
+\RequirePackage { ifoddpage }
+\newcommand{\mparadjust}[1]{\renewcommand*{\marginnotevadjust}{#1}}
+\hook_gput_code:nnn { begindocument/before } { colorist }
+{
+ %
+}
+\hook_gput_code:nnn { env/remark/begin } { colorist }
+ {
+ \if@twoside\checkoddpage
+ \ifoddpage\reversemarginpar\fi
+ \else
+ \reversemarginpar
+ \fi
+ \mparadjust{-.25em}
+ \marginnote{\ideabulb[0.3]{orange}
+ \bool_if:NTF \l__colorist_is_book_bool
+ {
+ \hspace*{-.2em}
+ }
+ {
+ \hspace*{-.5em}
+ }
+ }
+ \normalmarginpar
+ }
+\hook_gput_code:nnn { env/conjecture/begin } { colorist }
+ {
+ \if@twoside\checkoddpage
+ \ifoddpage\reversemarginpar\fi
+ \else
+ \reversemarginpar
+ \fi
+ \mparadjust{-.25em}
+ \marginnote{\questionmark[0.3]{purple}
+ \bool_if:NTF \l__colorist_is_book_bool
+ {
+ \hspace*{-.2em}
+ }
+ {
+ \hspace*{-.5em}
+ }
+ }
+ \normalmarginpar
+ }
+
+\ExplSyntaxOff
+\RequirePackage{iftex}
+\ifXeTeX
+\def\pgfsys@hboxsynced#1{%
+{%
+ \pgfsys@beginscope%
+ \setbox\pgf@hbox=\hbox{%
+ \hskip\pgf@pt@x%
+ \raise\pgf@pt@y\hbox{%
+ \pgf@pt@x=0pt%
+ \pgf@pt@y=0pt%
+ \special{pdf: content q}%
+ \pgflowlevelsynccm%
+ \pgfsys@invoke{q -1 0 0 -1 0 0 cm}%
+ \special{pdf: content -1 0 0 -1 0 0 cm q}
+ % translate to original coordinate system
+ \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1%
+ \pgfsys@invoke{n Q Q Q}%
+ }%
+ \hss%
+ }%
+ \wd\pgf@hbox=0pt%
+ \ht\pgf@hbox=0pt%
+ \dp\pgf@hbox=0pt%
+ \pgfsys@hbox\pgf@hbox%
+ \pgfsys@endscope%
+}}
+\fi
+\ExplSyntaxOn
+
+\cs_new_protected:Nn \colorist_add_colorbox:nn
+ % #1 = list of environments
+ % #2 = settings of tcolorbox
+ {
+ \clist_map_inline:nn { #1 }
+ {
+ \__colorist_add_colorbox_do:nn { ##1 } { #2 }
+ \__colorist_add_colorbox_do:nn { ##1* } { #2 }
+ }
+ }
+\cs_new_protected:Nn \__colorist_add_colorbox_do:nn
+ % #1 = name of environment
+ % #2 = settings of tcolorbox
+ {
+ \tcolorboxenvironment { #1 } { #2 }
+ }
+
+\colorist_add_colorbox:nn { theorem, lemma, proposition, corollary, property, axiom, definition-proposition, definition-theorem }
+ {
+ enhanced~jigsaw, pad~at~break*=1mm, breakable, lines~before~break=3,
+ left=3.5mm, right=3.5mm,
+ before=\par\medskip\noindent,
+ colback=main-text!3!paper,
+ opacityframe=0.9, colframe=orange, arc=.7mm
+ }
+
+\colorist_add_colorbox:nn { definition, assumption, convention, hypothesis, notation }
+ {
+ enhanced~jigsaw, pad~at~break*=1mm, breakable, lines~before~break=3,
+ left=4mm, right=4mm, top=1mm, bottom=1mm,
+ before=\par\medskip\noindent,
+ colback=lightorange!10!paper, boxrule=0pt, frame~hidden,
+ borderline~west={1.5mm}{0mm}{forestgreen}, arc=.7mm
+ }
+
+\colorist_add_colorbox:nn { fact, example }
+ {
+ enhanced~jigsaw, pad~at~break*=1mm, breakable, lines~before~break=3,
+ colback=main-text!5!paper,
+ before=\par\medskip\noindent,
+ boxrule=0pt, frame~hidden, arc=.7mm
+ }
+
+\colorist_add_colorbox:nn { conjecture }
+ {
+ enhanced~jigsaw, pad~at~break*=1mm, breakable, lines~before~break=3,
+ left=3.5mm, right=3.5mm,
+ before=\par\medskip\noindent,
+ colback=main-text!3!paper,
+ opacityframe=0.7, colframe=purple, arc=.7mm
+ }
+
+\colorist_add_colorbox:nn { problem }
+ {
+ enhanced~jigsaw, pad~at~break*=1mm, breakable, lines~before~break=3,
+ colback=yellow!25!paper,
+ before=\par\medskip\noindent,
+ boxrule=0pt, frame~hidden, arc=.7mm
+ }
+
+\colorist_add_colorbox:nn { question, exercise, remark, observation }
+ {
+ enhanced~jigsaw, pad~at~break*=1mm, breakable, lines~before~break=3,
+ oversize,
+ top=0mm, bottom=0mm,
+ before=\par\medskip\noindent,
+ opacityframe=0, opacityback=0
+ }
+
+\NewDocumentCommand \AfterEnvEnd { +m }
+ { \colorist_after_env_end:nw { #1 } }
+\cs_new_protected:Npn \colorist_after_env_end:nw #1 #2
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ { #2 \if@ignore\@ignorefalse\ignorespaces\fi #1 }
+\NewDocumentCommand \ScanEnv { s m +m +m }
+ {
+ \IfBooleanTF { #1 }
+ { \colorist_scan_env_ignore_par:nTF }
+ { \colorist_scan_env:nTF }
+ { #2 } { #3 } { #4 }
+ }
+\cs_new_protected:Npn \colorist_scan_env:nTF
+ { \__colorist_scan_env:NnTF \c_false_bool }
+\cs_new_protected:Npn \colorist_scan_env_ignore_par:nTF
+ { \__colorist_scan_env:NnTF \c_true_bool }
+\tl_new:N \l__colorist_collected_tl
+\cs_new_protected:Npn \__colorist_scan_env:NnTF #1 #2 #3 #4
+ {
+ \tl_clear:N \l__colorist_collected_tl
+ \peek_analysis_map_inline:n
+ {
+ \tl_put_right:Nn \l__colorist_collected_tl { ##1 }
+ \int_compare:nNnTF { "##3 } = { 0 }
+ {
+ \exp_args:No \token_if_eq_meaning:NNTF { ##1 } \begin
+ { \peek_analysis_map_break:n { \__colorist_chk_env:nTFn { #2 } { #3 } { #4 } } }
+ {
+ \bool_lazy_and:nnF { #1 }
+ { \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \par }
+ { \__colorist_scan_env_end:n { #4 } }
+ }
+ }
+ { \int_compare:nNnF { "##3 } = { 10 } { \__colorist_scan_env_end:n { #4 } } }
+ }
+ }
+\cs_new_protected:Npn \__colorist_scan_env_end:n #1
+ { \peek_analysis_map_break:n { \__colorist_reinsert_tokens:nn { #1 } { } } }
+\cs_new_protected:Npn \__colorist_reinsert_tokens:nn #1 #2
+ {
+ \use:x
+ {
+ \tl_clear:N \exp_not:N \l__colorist_collected_tl
+ \exp_not:n { #1 } \l__colorist_collected_tl #2
+ }
+ }
+\cs_new_protected:Npn \__colorist_chk_env:nTFn #1 #2 #3 #4
+ {
+ \exp_args:Nx \__colorist_reinsert_tokens:nn
+ { \str_if_eq:nnTF { #1 } { #4 } { \exp_not:n { #2 } } { \exp_not:n { #3 } } } { { #4 } }
+ }
+
+\cs_new_protected:Nn \colorist_add_scan_env:n
+ {
+ \clist_map_inline:nn { #1 }
+ {
+ \__colorist_add_scan_env_do:n { ##1 }
+ }
+ }
+\cs_new_protected:Nn \__colorist_add_scan_env_do:n
+ {
+ \tl_const:cn { l__colorist_scan_env_ #1 }
+ {
+ \AfterEnvEnd
+ {
+ \ScanEnv* { #1 }
+ { \skip_vertical:n { -0.9\baselineskip } }
+ {
+ \ScanEnv* { #1* }
+ { \skip_vertical:n { -0.9\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 } }
+ }
+
+\colorist_add_scan_env:n { definition, assumption, convention, hypothesis, notation }
+
+\theoremstyle{simple}
+
+\bool_if:NF \l__colorist_is_book_bool {
+
+%%================================
+%% Title block style
+%%================================
+\renewcommand{\@maketitle}{
+\begin{center}
+ \color{maintheme}
+ {\Large\sffamily\scshape \colorist_bfseries: \@title}\\\bigskip
+ \color{main-text!80!paper}
+ {\scshape\@author}\par\smallskip
+ {\@date}
+\end{center}
+\ifx\@date\@empty\bigskip\fi
+\medskip
+}
+
+\hook_gput_code:nnn { cmd/maketitle/after } { colorist } { \thispagestyle{fancy} }
+
+%%================================
+%% Abstract style
+%%================================
+\renewenvironment{abstract}
+{\small{\centerline{\textsc{ \colorist_bfseries: \sffamily\abstractname}}\vspace{-0.3\baselineskip}}
+ \color{main-text!80!paper}\begin{quotation}}
+{\end{quotation}\medskip}
+
+%%================================
+%% Keyword environment
+%%================================
+\DefineMultilingualText { \keywordname }
+ {
+ EN = Keywords ,
+ FR = Mots~clés ,
+ DE = Schlüsselwörter ,
+ IT = Parole~chiave ,
+ PT = Palavras~chave ,
+ BR = Palavras~chave ,
+ ES = Palabras~clave ,
+ CN = 关键词 ,
+ TC = 關鍵詞 ,
+ JP = キーワード ,
+ RU = Ключевые~слова ,
+ }
+
+\newenvironment{keyword}
+{\small\centerline{{ \colorist_bfseries: \keywordname}}\vspace{-0.3\baselineskip}
+ \color{main-text!80!paper}\begin{center}}
+{\end{center}\medskip}
+
+%%================================
+%% Simulate features of amsart
+%%================================
+\PassOptionsToPackage { amsfashion } { projlib-author }
+\RequirePackage { projlib-author }
+
+}
+
+\endinput
+%%
+%% End of file `colorist/colorist-fancy.sty'.
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index fa30bf3aa0..6da2938455 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -2,7 +2,7 @@
%% This is file `colorist/colorist.sty',
%% generated with the docstrip utility.
-%% Copyright (C) 2021 by Jinwen XU
+%% Copyright (C) 2021-2022 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -16,1484 +16,76 @@
%% 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\ProvidesPackage{colorist}
- [2021/12/16 A colorful style for articles and books]
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{%
- family = @colorist,
- prefix = @colorist@
-}
-\DeclareBoolOption[false]{draft}
-\DeclareBoolOption[false]{fast}
-\DeclareBoolOption[false]{puretext}
-\DeclareBoolOption[false]{nothms}
-\DeclareBoolOption[false]{delaythms}
-\DeclareBoolOption[false]{nothmnum}
-\DeclareStringOption{thmnum}[colorist@thmnum@default]
-\DeclareBoolOption[true]{regionalref}
-\DeclareBoolOption[false]{originalref}
-\DeclareBoolOption[false]{allowbf}
-\DeclareBoolOption[false]{runin}
-\ProcessKeyvalOptions*\relax
+\RequirePackage{l3keys2e}
+\ProvidesExplPackage
+ {colorist}
+ {2022/03/19} {}
+ {A colorful style for articles and books}
-\if@colorist@originalref
- \@colorist@regionalreffalse
-\fi
-\if@colorist@draft
- \@colorist@fasttrue
-\fi
-\if@colorist@puretext
- \@colorist@nothmstrue
-\fi
-
-\if@colorist@fast
- \PassOptionsToPackage{fast}{PJLdraft}
- \PassOptionsToPackage{fast}{PJLthm}
-\fi
-\expandafter\ifstrempty\expandafter{\@colorist@thmnum}{}{
- \expandafter\ifstrequal\expandafter{\@colorist@thmnum}{colorist@thmnum@default}{
- \PassOptionsToPackage{thmnum}{PJLthm}
- }{
- \PassOptionsToPackage{thmnum=\@colorist@thmnum}{PJLthm}
- }
-}
-\if@colorist@regionalref\else
- \PassOptionsToPackage{originalref}{PJLthm}
-\fi
-
-\if@colorist@allowbf
- \newcommand{\conditionalbfseries}{\bfseries\colorlet{PJLtempcolor}{.}\color{PJLtempcolor!90!paper}}
-\else
- \newcommand{\conditionalbfseries}{}
-\fi
-
-\newif\ifIsBook
-\ifdefined\c@chapter\IsBooktrue\else\IsBookfalse\fi
-
-\let\colorist@sffamily\sffamily
-\let\colorist@scshape\scshape
-\let\colorist@textsc\textsc
-
-%%================================
-%% Title fonts
-%%================================
-\RequirePackage{anyfontsize}
-
-\newcommand{\partfont}{\conditionalbfseries\colorist@sffamily}
-\newcommand{\chapfont}{\conditionalbfseries\colorist@sffamily\colorist@scshape}
-\newcommand{\secfont}{\conditionalbfseries\colorist@sffamily}
-\newcommand{\subsecfont}{\conditionalbfseries\colorist@sffamily}
-\newcommand{\subsubsecfont}{\conditionalbfseries\colorist@sffamily}
-
-%%================================
-%% Paper configuration
-%%================================
-\RequirePackage{PJLpaper}
-
-%%================================
-%% Color
-%%================================
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightorange}{RGB}{255,185,88}
-
-%%================================
-%% Footer
-%%================================
-\RequirePackage{geometry}
-\RequirePackage{fancyhdr}
-\RequirePackage{extramarks}
-
-\AtEndPreamble{\fancyhfoffset{0pt}}
-
-\fancypagestyle{fancy}{
- \fancyhf{}
- \if@twoside
- \fancyfoot[RO]{\sffamily\textcolor{maintext!30!paper}{\small\lastrightmark}%
- \rlap{~~~~\textcolor{maintext!75!paper}{\textbf{\thepage}}}}
- \fancyfoot[LE]{\leavevmode\sffamily\llap{\textcolor{maintext!75!paper}{\textbf{\thepage}}%
- ~~~~}%
- \textcolor{maintext!30!paper}{\small\lastleftmark}}
- \else
- \fancyfoot[R]{\sffamily\textcolor{maintext!30!paper}{\small\lastrightmark}%
- \rlap{~~~~\textcolor{maintext!75!paper}{\textbf{\thepage}}}}
- \fi
- \renewcommand{\headrulewidth}{0pt}
-}
-\pagestyle{fancy}
-
-\fancypagestyle{plain}{
- \fancyhf{}
- \if@twoside
- \fancyfoot[RO]{%
- \sffamily~\rlap{~~~~\textcolor{maintext!75!paper}{\textbf{\thepage}}}}
- \fancyfoot[LE]{\leavevmode\sffamily\llap{\textcolor{maintext!75!paper}{\textbf{\thepage}}%
- ~~~}}
- \else
- \fancyfoot[R]{%
- ~\rlap{~~~~\textcolor{maintext!75!paper}{\textbf{\thepage}}}}
- \fi
- \renewcommand{\headrulewidth}{0pt}
-}
-
-\ifbool{IsBook}{
- \if@twoside
- \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}}
- \else
- \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
- \fi
- \renewcommand*{\sectionmark}[1]{%
- \markright{\thesection~~#1}}
-}{
- \if@twoside
- \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{}}
- \else
- \renewcommand*{\sectionmark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
- \fi
-}
-%%================================
-%% Languages and line spacing
-%%================================
-\RequirePackage{PJLlang}
-\PJLsetlinespacing{\setstretch{1.07}}
-\PJLsetCJKlinespacing{\onehalfspacing}
-\raggedbottom
-
-%%================================
-%% Title format
-%%================================
-\RequirePackage[explicit,newparttoc]{titlesec}
-\PassOptionsToPackage{normalem}{ulem}
-\RequirePackage{ulem}
-
-\newcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}
-\gappto{\PJLlang@langconfig@common}{%
-\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}%
-}
-\gappto{\PJLlang@langconfig@CN}{%
-\renewcommand{\partstring}{第~\thepart~部分}%
-}
-\gappto{\PJLlang@langconfig@TC}{%
-\renewcommand{\partstring}{第~\thepart~部分}%
-}
-\gappto{\PJLlang@langconfig@JP}{%
-\renewcommand{\partstring}{第~\thepart~部}%
-}
-
-\ifbool{IsBook}{
- %% Part
- \titleclass{\part}{top} % make part like a chapter
- \titleformat{\part}[display]
- {\partfont\filleft}
- {%
- \thispagestyle{empty}%
- \begin{tikzpicture}[remember picture,overlay]
- \fill[maintheme!10!paper] (current page.north west) rectangle (current page.south east);
- \node at ($(current page.north west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{\thepart}}};
- \end{tikzpicture}%
- }
- {1em}
- {\fontsize{20}{0}\selectfont\MakeUppercase{#1}}
- \titleformat{name=\part,numberless}[display]
- {% \phantomsection\addcontentsline{toc}{part}{#1}%
- \partfont\filleft}
- {%
- \thispagestyle{empty}%
- \begin{tikzpicture}[remember picture,overlay]
- \fill[maintheme!10!paper] (current page.north west) rectangle (current page.south east);
- \node at ($(current page.north west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{$*$}}};
- \end{tikzpicture}%
- }
- {1em}
- {\fontsize{20}{0}\selectfont\MakeUppercase{#1}}
- \titlespacing*{\part}{0pt}{5em}{6em}
- %% Text after part
- \newcommand{\parttext}[1]{%
- \vfill%
- \begin{flushright}%
- \begin{minipage}{0.833\textwidth}%
- \color{maintext!80!paper}\raggedleft#1%
- \end{minipage}%
- \end{flushright}%
- \vfill\vfill%
- \cleardoublepage%
- }
-
- %% Chapter
- \newcommand{\TheChapter}[2]{%
- \tcbsidebyside[enhanced,sidebyside adapt=right,sidebyside align=bottom,
- colback=paper,frame hidden,
- segmentation code={
- \filldraw[maintheme] (segmentation.north)
- -- ($(segmentation.east)-(12pt,0)$)
- -- ($(segmentation.west)+(12pt,0)$)
- -- (segmentation.south);}
- ]{\filleft#2}{\normalfont\textcolor{maintheme}{\scalebox{4}{#1}}}
- }
-
- \newcommand{\TheChapterSingle}[1]{%
- \begin{tcolorbox}[
- enhanced,
- width = 0.67\textwidth,
- colback=paper,frame hidden,
- halign=center]
- #1
- \vspace{-.6em}
- \begin{center}
- \begin{tikzpicture}
- \filldraw[maintheme] (-4em,0) -- (4em,0) -- (0,-.1em) -- (0,.1em);
- \end{tikzpicture}
- \end{center}
- \end{tcolorbox}
- }
-
- \titleformat{name=\chapter}
- {\chapfont\huge} % Format
- {} % Label
- {0mm} % Sep
- {\TheChapter{\thechapter}{#1}} % Before-code
- \titlespacing*{name=\chapter}
- {0em}{*2}{0em} % {left}{before-sep}{after-sep}
-
- \titleformat{name=\chapter, numberless}
- {\filcenter\chapfont\huge}
- {}
- {0mm}
- {\TheChapterSingle{#1}}
- \titlespacing*{name=\chapter, numberless}
- {0em}{*2}{0em}
-
- %% Section
- \titleformat{\section}
- {\color{maintheme}\secfont\large}
- {\thesection}{.75em}{#1}
- % [{\titlerule[.75pt]}]
-
- %% Subsection
- \titleformat{\subsection}
- {\subsecfont}{\thesubsection}{.75em}
- {#1}
-}{
- %% Part
- \titleformat{\part}[display]
- {%
- \partfont\filleft}
- {\partstring}
- {.3em}
- {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
- \titleformat{name=\part,numberless}[display]
- {% \phantomsection\addcontentsline{toc}{part}{#1}%
- \partfont\filleft}
- {\phantom{\MakeUppercase{\partname}}}
- {.3em}
- {\fontsize{16}{0}\selectfont\MakeUppercase{#1}}
- %% Text after part
- \newcommand{\parttext}[1]{%
- \begin{flushright}%
- \begin{minipage}{0.833\textwidth}%
- \color{maintext!80!paper}\raggedleft#1%
- \end{minipage}%
- \end{flushright}%
- }
-
- %% Section
- \titleformat{\section}
- {\color{maintheme}\secfont\large}
- {\thesection}{.75em}{\scshape #1}
- % [{\titlerule[.75pt]}]
-
- %% Subsection
- \titleformat{\subsection}
- {\subsecfont}{\thesubsection}{.75em}
- {\scshape #1}
-}
-
-%% Subsubsection
-\if@colorist@runin
-\titleformat{\subsubsection}[runin]
- {\color{maintext!70!paper}\subsubsecfont}{\thesubsubsection}{.5em}
- {#1.}[\hspace*{.3em}]
-\else
-\titleformat{\subsubsection}
- {\color{maintext!70!paper}\subsubsecfont}{\thesubsubsection}{.5em}
- {#1}
-\fi
-
-%% Paragraph
-\titleformat{\paragraph}[runin]
- {\conditionalbfseries\scshape}{\theparagraph}{1em}{#1}
-
-\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip}
-\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip}
-\titlespacing{\subsubsection}{0pt}{.6\baselineskip}{.3\baselineskip}
-
-%%================================
-%% TOC format
-%%================================
-\RequirePackage{titletoc}
-\titlecontents{part}
- [0em]
- {\addvspace{1.5pc}\large\filcenter\colorist@sffamily\conditionalbfseries}
- {\textcolor{maintheme}{\bfseries\thecontentslabel}\nopagebreak\\\nopagebreak\uppercase}
- {}
- {} % without page number
- [\addvspace{.5pc}]
-\ifbool{IsBook}{
- \titlecontents{chapter}
- [2em] % i.e., 0em (part) + 2em
- {\addvspace{1pc}\normalfont\color{maintheme}\colorist@sffamily\conditionalbfseries}
- {\contentslabel{2em}}
- {\colorist@scshape\hspace*{-2em}}
- {\titlerule*[10pt]{\parbox{2pt}{\hspace*{-.25pt}\textcolor{maintext!15!paper}{.}}}\color{maintheme}\contentspage}
- \titlecontents{section}
- [4em] % i.e., 2em (chapter) + 2em
- {\addvspace{.3pc}\normalfont\color{maintheme}\colorist@sffamily}
- {\contentslabel{1.75em}}
- {\hspace*{-1.75em}}
- {\titlerule*[10pt]{\parbox{2pt}{\textcolor{maintext!15!paper}{.}}}\color{maintheme}\contentspage}
- \titlecontents{subsection}
- [7em] % i.e., 4em (section) + 3em
- {\addvspace{.15pc}\normalfont\colorist@sffamily}
- {\contentslabel{2.75em}}
- {\hspace*{-2.75em}}
- {\titlerule*[10pt]{\parbox{2pt}{\textcolor{maintext!15!paper}{.}}}\color{maintext!45!paper}\contentspage}
- \titlecontents{subsubsection}
- [10em] % i.e., 7em (subsection) + 3em
- {\normalfont\colorist@sffamily}
- {\contentslabel{3.25em}}
- {\hspace*{-3.25em}}
- {\titlerule*[10pt]{\parbox{2pt}{\textcolor{maintext!15!paper}{.}}}\color{maintext!45!paper}\contentspage}
-}{
- \titlecontents{section}
- [2em] % i.e., 0em (part) + 2em
- {\addvspace{.3pc}\normalfont\color{maintheme}\colorist@sffamily}
- {\contentslabel{1.75em}}
- {\hspace*{-1.75em}}
- {\titlerule*[10pt]{\parbox{2pt}{\textcolor{maintext!15!paper}{.}}}\color{maintheme}\contentspage}
- \titlecontents{subsection}
- [4.5em] % i.e., 2em (section) + 2.5em
- {\addvspace{.15pc}\normalfont\colorist@sffamily}
- {\contentslabel{2.15em}}
- {\hspace*{-2.15em}}
- {\titlerule*[10pt]{\parbox{2pt}{\textcolor{maintext!15!paper}{.}}}\color{maintext!45!paper}\contentspage}
- \titlecontents{subsubsection}
- [7.75em] % i.e., 5em (subsection) + 3.25em
- {\normalfont\colorist@sffamily}
- {\contentslabel{2.75em}}
- {\hspace*{-2.75em}}
- {\titlerule*[10pt]{\parbox{2pt}{\textcolor{maintext!15!paper}{.}}}\color{maintext!45!paper}\contentspage}
-}
-
-%%================================
-%% Lists
-%%================================
-\RequirePackage{enumitem}
-\setlist{noitemsep}
-\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[description]{font=\normalfont\conditionalbfseries}
-
-\setlist[itemize]{leftmargin=*}
-\gappto{\PJLlang@langconfig@common}{\setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{$\bullet$}}}
-\gappto{\PJLlang@langconfig@FR}{\setlist[itemize,1]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!50!paper}{---}}}
-\setlist[itemize,2]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{--}}
-\setlist[itemize,3]{label=\colorlet{currentcolor}{.}\textcolor{currentcolor!27!paper}{\texttt{*}}}
-
-%%================================
-%% Blank page
-%%================================
-\newcommand{\blinkpagetext}{This page is intentionally left blank}
-\renewcommand{\cleardoublepage}{\relax
- \clearpage
- \if@twoside\ifodd\c@page\relax\else
- \thispagestyle{empty}
- \AddToHookNext{shipout/background}
- {%
- \put(0.5\paperwidth,-0.5\paperheight){%
- \makebox[0pt]{\large\color{maintext!10!paper}\blinkpagetext}}}
- \null\newpage\fi\fi}
-
-%%================================
-%% Draft mark
-%%================================
-\RequirePackage{PJLdraft}
-
-%%================================
-%% Icons
-%%================================
-\RequirePackage{tikz}
-\newcommand{\ideabulb}[2][0.15]{%
- \scalebox{#1}{%
- \begin{tikzpicture}
- \filldraw[draw=#2,fill=#2] (0,0) circle [radius=1cm];
- \filldraw[draw=paper,fill=paper,rounded corners=0.8pt]
- [rotate=20] (-0.26,-0.66) rectangle (-0.06,-0.6)
- [xshift=-0.4mm,yshift=1mm] (-0.26,-0.66) rectangle (0.02,-0.6)
- [xshift=0.4mm,yshift=1mm] (-0.26,-0.66) rectangle (-0.06,-0.6);
- \draw[draw=paper,line width=0.7mm] (-0.18,-0.46)
- .. controls (-0.18,-0.28) and (-0.28,-0.12) ..(-0.4,0.1)
- .. controls (-0.55,0.4) and (-0.3,0.64) ..(0,0.64)
- .. controls (0.3,0.64) and (0.55,0.4) ..(0.4,0.1)
- .. controls (0.28,-0.12) and (0.18,-0.28) ..(0.18,-0.46);
- \end{tikzpicture}}}
-
-\newcommand{\questionmark}[2][0.15]{%
- \scalebox{#1}{%
- \begin{tikzpicture}
- \filldraw[draw=#2,fill=#2] (0,0) circle [radius=1cm];
- \filldraw[paper,yshift=0.5mm,scale=0.9] (-0.4,0.1) circle [radius=0.77mm];
- \draw[draw=paper,line width=1.5mm,yshift=0.5mm,scale=0.9] (-0.4,0.1)
- .. controls (-0.55,0.4) and (-0.3,0.64) ..(0,0.64)
- .. controls (0.3,0.64) and (0.55,0.4) ..(0.4,0.1)
- .. controls (0.28,-0.12) and (0.05,-0.28) ..(0.05,-0.3)
- .. controls (0,-0.36) and (0.0,-0.45) ..(0.0,-0.5);
- \fill[fill=paper,rounded corners=0.6mm]
- (-0.09,-0.75) rectangle (0.09,-0.53);
- \end{tikzpicture}}}
-
-%%================================
-%% Theorems
-%%================================
-\RequirePackage{mathtools}
-\RequirePackage{amsthm}
-\def\simpleqedsymbol{%
- \makebox[1em]{\rlap{\textcolor{maintext!12!paper}{\rule[-0.1em]{.95em}{.95em}}}{\kern.07em\raisebox{.07em}{\textcolor{paper}{\rule[-0.1em]{.81em}{.81em}}}\kern.07em}}}
-\newtheoremstyle{simple}%
- {}{}%
- {\normalfont}{}%
- {\normalfont}{}%
- {0pt}%
- {\global\let\qedsymbol\simpleqedsymbol%
- {\conditionalbfseries\thmname{#1}\thmnumber{ #2}}\hspace{.4em}%
- \textcolor{maintext!27!paper}{$|$}\hspace{.4em}%
- \color{maintext!50!paper}\thmnote{\ensuremath{(\text{#3})}~~}%
- \pushQED{\qed}%
- }
-\def\@endtheorem{\global\let\qedsymbol\simpleqedsymbol%
- \popQED\endtrivlist\@endpefalse
- \global\let\qedsymbol\qedsymbolOriginal}
-
-\renewcommand{\qedsymbol}{%
- \makebox[1em]{\color{maintext!27!paper}\rule[-0.1em]{.95em}{.95em}}}
-\let\qedsymbolOriginal\qedsymbol
-
-\newtheoremstyle{basic}
- {0pt}{0pt}{\normalfont}{0pt}
- {}{\;}{0.25em}
- {{\thmname{#1}~\thmnumber{\textup{#2}}}
- \thmnote{\normalfont\colorist@sffamily\color{maintext}~(#3)}}
-
-\newtheoremstyle{emphasis}
- {0pt}{0pt}{\itshape}{0pt}{}{}{0pt}
- {\thmnote{\normalfont\colorist@sffamily\color{maintext}#3\hspace*{0.5em}}}
-
-\if@colorist@fast
- \providecommand{\phantomsection}{}
- \RequirePackage{url}
- \newcommand{\href}[2]{#2}
-\else
- \PassOptionsToPackage{hidelinks,linktoc=all}{hyperref}
- \RequirePackage{bookmark}
- \RequirePackage{hyperref}
-\fi
-
-\PassOptionsToPackage{nothms,simplename}{PJLthm}
-\RequirePackage{PJLthm}
-
-\pretocmd{\theoremnameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenameEN}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnameEN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnameEN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnameEN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnameEN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnameEN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnameEN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameEN\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\propositionnameEN}
-\expandafter\def\csname definition-theoremnameEN\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\theoremnameEN}
-
-\pretocmd{\theoremnameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenameFR}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnameFR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnameFR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnameFR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnameFR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnameFR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnameFR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameFR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Définition}-\propositionnameFR}
-\expandafter\def\csname definition-theoremnameFR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Définition}-\theoremnameFR}
-
-\pretocmd{\theoremnameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenameDE}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnameDE}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnameDE}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnameDE}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnameDE}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnameDE}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnameDE}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameDE\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\propositionnameDE}
-\expandafter\def\csname definition-theoremnameDE\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\theoremnameDE}
-
-\pretocmd{\theoremnameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenameIT}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnameIT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnameIT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnameIT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnameIT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnameIT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnameIT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameIT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definizione}-\propositionnameIT}
-\expandafter\def\csname definition-theoremnameIT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definizione}-\theoremnameIT}
-
-\pretocmd{\theoremnamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenamePT}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnamePT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnamePT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnamePT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnamePT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnamePT}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnamePT}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnamePT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\propositionnamePT}
-\expandafter\def\csname definition-theoremnamePT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\theoremnamePT}
-
-\pretocmd{\theoremnameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenameBR}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnameBR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnameBR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnameBR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnameBR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnameBR}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnameBR}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameBR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\propositionnameBR}
-\expandafter\def\csname definition-theoremnameBR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\theoremnameBR}
-
-\pretocmd{\theoremnameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\lemmanameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propositionnameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\corollarynameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\propertynameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\factnameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conjecturenameES}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\definitionnameES}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\axiomnameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\assumptionnameES}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\conventionnameES}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\hypothesisnameES}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\notationnameES}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\examplenameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\problemnameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\questionnameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\exercisenameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\remarknameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\pretocmd{\observationnameES}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries\colorist@textsc}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameES\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\propositionnameES}
-\expandafter\def\csname definition-theoremnameES\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\theoremnameES}
-
-\pretocmd{\theoremnameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\lemmanameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propositionnameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\corollarynameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propertynameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\factnameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conjecturenameCN}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\definitionnameCN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\axiomnameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\assumptionnameCN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conventionnameCN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\hypothesisnameCN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\notationnameCN}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\examplenameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\problemnameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\questionnameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\exercisenameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\remarknameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\observationnameCN}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameCN\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定义}-\propositionnameCN}
-\expandafter\def\csname definition-theoremnameCN\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定义}-\theoremnameCN}
-
-\pretocmd{\theoremnameTC}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\lemmanameTC}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propositionnameTC}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\corollarynameTC}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propertynameTC}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\factnameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conjecturenameTC}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\definitionnameTC}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\axiomnameTC}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\assumptionnameTC}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conventionnameTC}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\hypothesisnameTC}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\notationnameTC}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\examplenameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\problemnameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\questionnameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\exercisenameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\remarknameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\observationnameTC}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameTC\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\propositionnameTC}
-\expandafter\def\csname definition-theoremnameTC\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\theoremnameTC}
-
-\pretocmd{\theoremnameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\lemmanameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propositionnameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\corollarynameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propertynameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\factnameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conjecturenameJP}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\definitionnameJP}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\axiomnameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\assumptionnameJP}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conventionnameJP}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\hypothesisnameJP}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\notationnameJP}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\examplenameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\problemnameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\questionnameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\exercisenameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\remarknameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\observationnameJP}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameJP\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\propositionnameJP}
-\expandafter\def\csname definition-theoremnameJP\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\theoremnameJP}
-
-\pretocmd{\theoremnameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\lemmanameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propositionnameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\corollarynameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\propertynameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\factnameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conjecturenameRU}{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\definitionnameRU}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\axiomnameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\assumptionnameRU}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\conventionnameRU}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\hypothesisnameRU}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\notationnameRU}{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\examplenameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\problemnameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\questionnameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\exercisenameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\remarknameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\pretocmd{\observationnameRU}{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries}{}{\FAIL}
-\expandafter\def\csname definition-propositionnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\propositionnameRU}
-\expandafter\def\csname definition-theoremnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\theoremnameRU}
-
-\def\colorist@definethms{
-\if@colorist@nothms\else
-\theoremstyle{basic}
-\if@colorist@nothmnum
-\CreateTheorem*{theorem}
-\CreateTheorem*{lemma}
-\CreateTheorem*{proposition}
-\CreateTheorem*{corollary}
-\CreateTheorem*{definition-proposition}
-\CreateTheorem*{definition-theorem}
-\CreateTheorem*{property}
-\CreateTheorem*{fact}
-\CreateTheorem*{conjecture}
-\else
-\CreateTheorem@thmnum{theorem}
-\CreateTheorem{lemma}[theorem]
-\CreateTheorem{proposition}[theorem]
-\CreateTheorem{corollary}[theorem]
-\CreateTheorem{definition-proposition}[theorem]
-\CreateTheorem{definition-theorem}[theorem]
-\CreateTheorem{property}[theorem]
-\CreateTheorem{fact}[theorem]
-\CreateTheorem{conjecture}[theorem]
-\fi
-\CreateTheorem*{theorem*}
-\CreateTheorem*{lemma*}
-\CreateTheorem*{proposition*}
-\CreateTheorem*{corollary*}
-\CreateTheorem*{definition-proposition*}
-\CreateTheorem*{definition-theorem*}
-\CreateTheorem*{property*}
-\CreateTheorem*{fact*}
-\CreateTheorem*{conjecture*}
-\if@colorist@nothmnum
-\CreateTheorem*{definition}
-\CreateTheorem*{axiom}
-\CreateTheorem*{assumption}
-\CreateTheorem*{convention}
-\CreateTheorem*{hypothesis}
-\CreateTheorem*{notation}
-\CreateTheorem*{example}
-\CreateTheorem*{problem}
-\CreateTheorem*{question}
-\CreateTheorem*{exercise}
-\else
-\CreateTheorem{definition}[theorem]
-\CreateTheorem{axiom}[theorem]
-\CreateTheorem{assumption}[theorem]
-\CreateTheorem{convention}[theorem]
-\CreateTheorem{hypothesis}[theorem]
-\CreateTheorem{notation}[theorem]
-\CreateTheorem{example}[theorem]
-\CreateTheorem{problem}[theorem]
-\CreateTheorem{question}[theorem]
-\CreateTheorem{exercise}[theorem]
-\fi
-\CreateTheorem*{definition*}
-\CreateTheorem*{axiom*}
-\CreateTheorem*{assumption*}
-\CreateTheorem*{convention*}
-\CreateTheorem*{hypothesis*}
-\CreateTheorem*{notation*}
-\CreateTheorem*{example*}
-\CreateTheorem*{problem*}
-\CreateTheorem*{question*}
-\CreateTheorem*{exercise*}
-
-\theoremstyle{emphasis}
-\if@colorist@nothmnum
-\CreateTheorem*{remark}
-\CreateTheorem*{observation}
-\else
-\CreateTheorem@thmnum{remark}
-\CreateTheorem@thmnum{observation}
-\fi
-\CreateTheorem*{remark*}
-\CreateTheorem*{observation*}
-
-\theoremstyle{simple}
-\fi
-}
-
-\if@colorist@delaythms
- \AtEndPreamble{\colorist@definethms}
-\else
- \colorist@definethms
-\fi
-
-\theoremstyle{simple}
-
-\creflabelformat{PJLtheorem}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLlemma}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLproposition}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLcorollary}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLproperty}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLfact}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{PJLconjecture}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{PJLdefinition}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{PJLaxiom}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLassumption}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{PJLconvention}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{PJLhypothesis}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{PJLnotation}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{PJLexample}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{PJLproblem}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{PJLquestion}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{PJLexercise}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{PJLdefinition-theorem}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{PJLdefinition-proposition}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factEN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureEN}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionEN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionEN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionEN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisEN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationEN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleEN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemEN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionEN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseEN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionEN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factFR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureFR}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionFR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionFR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionFR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisFR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationFR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleFR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemFR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionFR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseFR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionFR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factDE}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureDE}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionDE}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionDE}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionDE}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisDE}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationDE}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleDE}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemDE}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionDE}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseDE}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionDE}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factIT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureIT}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionIT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionIT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionIT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisIT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationIT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleIT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemIT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionIT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseIT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionIT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factPT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjecturePT}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionPT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionPT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionPT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisPT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationPT}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{examplePT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemPT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionPT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exercisePT}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionPT}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factBR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureBR}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionBR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionBR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionBR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisBR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationBR}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleBR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemBR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionBR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseBR}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionBR}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factES}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureES}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionES}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionES}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionES}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisES}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationES}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleES}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemES}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionES}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseES}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionES}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factCN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureCN}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionCN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionCN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionCN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisCN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationCN}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleCN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemCN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionCN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseCN}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionCN}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factTC}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureTC}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionTC}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionTC}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionTC}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisTC}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationTC}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleTC}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemTC}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionTC}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseTC}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionTC}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factJP}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureJP}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionJP}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionJP}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionJP}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisJP}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationJP}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleJP}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemJP}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionJP}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseJP}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionJP}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\creflabelformat{theoremRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{lemmaRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propositionRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{corollaryRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{propertyRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{factRU}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{conjectureRU}{#2{\normalfont\colorist@sffamily\color{purple}\conditionalbfseries#1}#3}
-\creflabelformat{definitionRU}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{axiomRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{assumptionRU}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{conventionRU}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{hypothesisRU}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{notationRU}{#2{\normalfont\colorist@sffamily\color{forestgreen}\conditionalbfseries#1}#3}
-\creflabelformat{exampleRU}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{problemRU}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{questionRU}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{exerciseRU}{#2{\normalfont\colorist@sffamily\color{maintext}\conditionalbfseries#1}#3}
-\creflabelformat{definition-theoremRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-\creflabelformat{definition-propositionRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-
-\RequirePackage{marginnote}
-\RequirePackage{ifoddpage}
-\newcommand{\mparadjust}[1]{\renewcommand*{\marginnotevadjust}{#1}}
-\AtEndPreamble{ % For puretext mode
-\pretocmd{\remark}{%
- \if@twoside\checkoddpage%
- \ifoddpage\reversemarginpar\fi%
- \else%
- \reversemarginpar%
- \fi%
- \mparadjust{-.25em}%
- \marginnote{\ideabulb[0.3]{orange}%
- \ifIsBook%
- \hspace*{-.2em}%
- \else%
- \hspace*{-.5em}%
- \fi%
- }\normalmarginpar%
-}{}{}
-\pretocmd{\conjecture}{%
- \if@twoside\checkoddpage%
- \ifoddpage\reversemarginpar\fi%
- \else%
- \reversemarginpar%
- \fi%
- \mparadjust{-.25em}%
- \marginnote{\questionmark[0.3]{purple}%
- \ifIsBook%
- \hspace*{-.2em}%
- \else%
- \hspace*{-.5em}%
- \fi%
- }\normalmarginpar%
-}{}{}
-}
-
-\RequirePackage{iftex}
-\ifXeTeX
-\def\pgfsys@hboxsynced#1{%
-{%
- \pgfsys@beginscope%
- \setbox\pgf@hbox=\hbox{%
- \hskip\pgf@pt@x%
- \raise\pgf@pt@y\hbox{%
- \pgf@pt@x=0pt%
- \pgf@pt@y=0pt%
- \special{pdf: content q}%
- \pgflowlevelsynccm%
- \pgfsys@invoke{q -1 0 0 -1 0 0 cm}%
- \special{pdf: content -1 0 0 -1 0 0 cm q}
- % translate to original coordinate system
- \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash
- \wd#1=0pt%
- \ht#1=0pt%
- \dp#1=0pt%
- \box#1%
- \pgfsys@invoke{n Q Q Q}%
- }%
- \hss%
- }%
- \wd\pgf@hbox=0pt%
- \ht\pgf@hbox=0pt%
- \dp\pgf@hbox=0pt%
- \pgfsys@hbox\pgf@hbox%
- \pgfsys@endscope%
-}}
-\fi
-
-\renewenvironment{proof}[1][\proofname]{\par
- \pushQED{\qed}%
- \normalfont \topsep6\p@\@plus6\p@\relax
- \trivlist
- \item[\hskip\labelsep
- \itshape
- #1\hspace{.4em}%
- \textcolor{maintext!27!paper}{$|$}]\ignorespaces
-}{%
- \popQED\endtrivlist\@endpefalse
-}
-
-\RequirePackage[many]{tcolorbox}
-\if@colorist@fast
- \tcbstartdraftmode
-\fi
-\tcolorboxenvironment{theorem}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{theorem*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{lemma}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{lemma*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{proposition}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{proposition*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{corollary}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{corollary*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{property}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{property*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{axiom}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{axiom*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{definition-proposition}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{definition-proposition*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{definition-theorem}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-\tcolorboxenvironment{definition-theorem*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.9,colframe=orange,arc=.7mm}
-
-\tcolorboxenvironment{fact}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!5!paper,
- boxrule=0pt,frame hidden,arc=.7mm}
-\tcolorboxenvironment{fact*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!5!paper,
- boxrule=0pt,frame hidden,arc=.7mm}
-
-\tcolorboxenvironment{conjecture}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.7,colframe=purple,arc=.7mm}
-\tcolorboxenvironment{conjecture*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!3!paper,
- left=3.5mm,right=3.5mm,
- opacityframe=0.7,colframe=purple,arc=.7mm}
-
-\tcolorboxenvironment{definition}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{definition*}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{assumption}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{assumption*}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{convention}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{convention*}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{hypothesis}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{hypothesis*}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{notation}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-\tcolorboxenvironment{notation*}
- {enhanced jigsaw,pad at break*=1mm,breakable,
- left=4mm,right=4mm,top=1mm,bottom=1mm,
- colback=lightorange!10!paper,boxrule=0pt,frame hidden,
- borderline west={1.5mm}{0mm}{forestgreen},arc=.7mm}
-
-\tcolorboxenvironment{example}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!5!paper,
- boxrule=0pt,frame hidden,arc=.7mm,lines before break=3}
-\tcolorboxenvironment{example*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=maintext!5!paper,
- boxrule=0pt,frame hidden,arc=.7mm,lines before break=3}
-
-\tcolorboxenvironment{problem}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,
- boxrule=0pt,frame hidden,arc=.7mm}
-\tcolorboxenvironment{problem*}
- {enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,
- boxrule=0pt,frame hidden,arc=.7mm}
-
-\tcolorboxenvironment{question}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{question*}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{exercise}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{exercise*}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{remark}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{remark*}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{observation}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-\tcolorboxenvironment{observation*}
- {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
- top=0mm,bottom=0mm,
- opacityframe=0,opacityback=0,lines before break=3}
-
-\ExplSyntaxOn
-\NewDocumentCommand \AfterEnvEnd { +m }
- { \colorist_after_env_end:nw {#1} }
-\cs_new_protected:Npn \colorist_after_env_end:nw #1 #2
- \if@ignore\@ignorefalse\ignorespaces\fi
- { #2 \if@ignore\@ignorefalse\ignorespaces\fi #1 }
- \NewDocumentCommand \ScanEnv { s m +m+m }
+\keys_define:nn { colorist }
{
- \IfBooleanTF {#1}
- { \jinwen_scan_env_ignore_par:nTF }
- { \jinwen_scan_env:nTF }
- {#2} {#3} {#4}
+ , draft .bool_set:N = \l__colorist_fast_bool
+ , draft .initial:n = { false }
+ , fast .bool_set:N = \l__colorist_fast_bool
+
+ , style .str_set:N = \l__colorist_style_str
+ , style .initial:n = { fancy }
+ , fancy .meta:n = { style = fancy }
+
+ , use-boldface .bool_set:N = \l__colorist_use_boldface_bool
+ , use-boldface .initial:n = { false }
+ , use~boldface .bool_set:N = \l__colorist_use_boldface_bool
+ , use boldface .bool_set:N = \l__colorist_use_boldface_bool
+ , usebf .bool_set:N = \l__colorist_use_boldface_bool
+ , allow-boldface .bool_set:N = \l__colorist_use_boldface_bool
+ , allow~boldface .bool_set:N = \l__colorist_use_boldface_bool
+ , allow boldface .bool_set:N = \l__colorist_use_boldface_bool
+ , allowbf .bool_set:N = \l__colorist_use_boldface_bool
+ , runin .bool_set:N = \l__colorist_runin_bool
+ , runin .initial:n = { false }
+
+ , theorem-in-new-line .bool_set:N = \l__colorist_theorem_in_new_line_bool
+ , theorem-in-new-line .initial:n = { false }
+ , theorem~in~new~line .bool_set:N = \l__colorist_theorem_in_new_line_bool
+ , theorem in new line .bool_set:N = \l__colorist_theorem_in_new_line_bool
+
+ , unknown .code:n = {
+ \PassOptionsToPackage { \CurrentOption } { projlib-language }
+ \PassOptionsToPackage { \CurrentOption } { projlib-author }
+ \PassOptionsToPackage { \CurrentOption } { projlib-datetime }
+ \PassOptionsToPackage { \CurrentOption } { projlib-draft }
+ \PassOptionsToPackage { \CurrentOption } { projlib-font }
+ \PassOptionsToPackage { \CurrentOption } { projlib-logo }
+ \PassOptionsToPackage { \CurrentOption } { projlib-math }
+ \PassOptionsToPackage { \CurrentOption } { projlib-paper }
+ \PassOptionsToPackage { \CurrentOption } { projlib-theorem }
+ }
}
-\cs_new_protected:Npn \jinwen_scan_env:nTF
- { \__jinwen_scan_env:NnTF \c_false_bool }
-\cs_new_protected:Npn \jinwen_scan_env_ignore_par:nTF
- { \__jinwen_scan_env:NnTF \c_true_bool }
-\tl_new:N \l__jinwen_collected_tl
-\cs_new_protected:Npn \__jinwen_scan_env:NnTF #1 #2 #3 #4
- {
- \tl_clear:N \l__jinwen_collected_tl
- \peek_analysis_map_inline:n
- {
- \tl_put_right:Nn \l__jinwen_collected_tl {##1}
- \int_compare:nNnTF { "##3 } = { 0 }
- {
- \exp_args:No \token_if_eq_meaning:NNTF {##1} \begin
- { \peek_analysis_map_break:n { \__jinwen_chk_env:nTFn {#2} {#3} {#4} } }
- {
- \bool_lazy_and:nnF {#1}
- { \exp_args:No \token_if_eq_meaning_p:NN {##1} \par }
- { \__jinwen_scan_env_end:n {#4} }
- }
- }
- { \int_compare:nNnF { "##3 } = { 10 } { \__jinwen_scan_env_end:n {#4} } }
- }
- }
-\cs_new_protected:Npn \__jinwen_scan_env_end:n #1
- { \peek_analysis_map_break:n { \__jinwen_reinsert_tokens:nn {#1} { } } }
-\cs_new_protected:Npn \__jinwen_reinsert_tokens:nn #1 #2
+\ProcessKeysOptions { colorist }
+
+\bool_new:N \l__colorist_is_book_bool
+\cs_if_exist:cTF { c@chapter }
{
- \use:x
- {
- \tl_clear:N \exp_not:N \l__jinwen_collected_tl
- \exp_not:n {#1} \l__jinwen_collected_tl #2
- }
+ \bool_set_true:N \l__colorist_is_book_bool
}
-\cs_new_protected:Npn \__jinwen_chk_env:nTFn #1 #2 #3 #4
{
- \exp_args:Nx \__jinwen_reinsert_tokens:nn
- { \str_if_eq:nnTF {#1} {#4} { \exp_not:n {#2} } { \exp_not:n {#3} } } { {#4} }
+ \bool_set_false:N \l__colorist_is_book_bool
}
-\ExplSyntaxOff
-
-\def\scandefinitionenv{%
- \AfterEnvEnd{%
- \ScanEnv*{definition}%
- {\vspace{-1.05\baselineskip}}%
- {\ScanEnv*{definition*}%
- {\vspace{-1.05\baselineskip}}%
- {}}}}
-\AddToHook{env/definition/end}{\scandefinitionenv}%
-\AddToHook{env/definition*/end}{\scandefinitionenv}%
-
-\def\scanassumptionenv{%
- \AfterEnvEnd{%
- \ScanEnv*{assumption}%
- {\vspace{-1.05\baselineskip}}%
- {\ScanEnv*{assumption*}%
- {\vspace{-1.05\baselineskip}}%
- {}}}}
-\AddToHook{env/assumption/end}{\scanassumptionenv}%
-\AddToHook{env/assumption*/end}{\scanassumptionenv}%
-
-\def\scanconventionenv{%
- \AfterEnvEnd{%
- \ScanEnv*{convention}%
- {\vspace{-1.05\baselineskip}}%
- {\ScanEnv*{convention*}%
- {\vspace{-1.05\baselineskip}}%
- {}}}}
-\AddToHook{env/convention/end}{\scanconventionenv}%
-\AddToHook{env/convention*/end}{\scanconventionenv}%
-
-\def\scanhypothesisenv{%
- \AfterEnvEnd{%
- \ScanEnv*{hypothesis}%
- {\vspace{-1.05\baselineskip}}%
- {\ScanEnv*{hypothesis*}%
- {\vspace{-1.05\baselineskip}}%
- {}}}}
-\AddToHook{env/hypothesis/end}{\scanhypothesisenv}%
-\AddToHook{env/hypothesis*/end}{\scanhypothesisenv}%
-
-\def\scannotationenv{%
- \AfterEnvEnd{%
- \ScanEnv*{notation}%
- {\vspace{-1.05\baselineskip}}%
- {\ScanEnv*{notation*}%
- {\vspace{-1.05\baselineskip}}%
- {}}}}
-\AddToHook{env/notation/end}{\scannotationenv}%
-\AddToHook{env/notation*/end}{\scannotationenv}%
-
-\ifbool{IsBook}{}{%
%%================================
-%% Title block style
+%% Paper configuration
%%================================
-\renewcommand{\@maketitle}{%
-\begin{center}%
- \color{maintheme}%
- {\Large\colorist@sffamily\scshape\conditionalbfseries\@title}\\\bigskip%
- \color{maintext!80!paper}%
- {\scshape\@author}\\\smallskip%
- {\@date}%
-\end{center}%
-\ifx\@date\@empty\bigskip\fi%
-\medskip%
-}
-\apptocmd{\maketitle}{\thispagestyle{fancy}}{}{\FAIL}
+\RequirePackage { projlib-paper }
%%================================
-%% Abstract style
+%% Multi-language support
%%================================
-\renewenvironment{abstract}
-{\small{\centerline{\textsc{\conditionalbfseries\sffamily\abstractname}}\vspace{-0.3\baselineskip}}
- \color{maintext!80!paper}\begin{quotation}}
-{\end{quotation}\medskip}
+\RequirePackage { projlib-language }
%%================================
-%% Keyword
+%% Loading the style
%%================================
-\def\keywordnameEN{\textsc{Keywords}}
-\def\keywordnameFR{\textsc{Mots clés}}
-\def\keywordnameDE{\textsc{Schlüsselwörter}}
-\def\keywordnameCN{关键词}
-\def\keywordnameTC{關鍵詞}
-\def\keywordnameJP{キーワード}
-\def\keywordnameRU{Ключевые слова}
-
-\newenvironment{keyword}
-{\small{\centerline{{\conditionalbfseries\csname keywordname\csname\languagename ABBR\endcsname\endcsname}}\vspace{-0.3\baselineskip}}
- \color{maintext!80!paper}\begin{center}}
-{\end{center}\medskip}
-
-%%================================
-%% Simulate features of amsart
-%%================================
-\PassOptionsToPackage{amsfashion}{PJLauthor}
-\RequirePackage{PJLauthor}
-
-}
+\exp_args:No \RequirePackage { colorist- \l__colorist_style_str }
\endinput
%%
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index 0e366919ba..beef4ed857 100644
--- a/macros/latex/contrib/minimalist/minimalist-classical.sty
+++ b/macros/latex/contrib/minimalist/minimalist-classical.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{minimalist-classical}
- {2022/03/17} {}
+ {2022/03/19} {}
{The classical style of minimalist}
\@ifpackageloaded { minimalist } {}
@@ -185,7 +185,7 @@
\renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
\fi
\renewcommand*{\sectionmark}[1]{
- \markright{\g_minimalist_section_decoration_char_tl\nobreakspace\arabic{section}\nobreakspace\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}}
+ \markright{\protect\g_minimalist_section_decoration_char_tl\nobreakspace\arabic{section}\nobreakspace\protect\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}}
}
{
\if@twoside
@@ -565,24 +565,50 @@
\RequirePackage { projlib-theorem }
+\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ }
+ }
+
+\SetTheorem { remark }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ }
+ }
+
\bool_if:NF \l__projlib_theorem_complexname_bool
{
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist }
{
name style = {
- , heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- }
, crefname style = {
, english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
, french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
@@ -628,20 +654,6 @@
\SetTheorem { remark }
{
name style = {
- , heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- }
, crefname style = {
, english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
, french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
@@ -656,7 +668,7 @@
, japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
, russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
}
- , crefname style = {
+ , Crefname style = {
, english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
, french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
, ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
index 4cf1db38d8..d8557ff023 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 28577a6bcc..925ce47eeb 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ b/macros/latex/contrib/minimalist/minimalist-doc.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{minimart}
+\documentclass[classical, simple name]{minimart}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,11 +96,13 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\minimalist{} 2021/12/16}}
+\thanks{Corresponding to: \texttt{\minimalist{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{December 2021, in Paris}
+\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
@@ -111,6 +113,10 @@
\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
@@ -122,7 +128,7 @@ In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{minimalist} and \texttt{projlib} are correctly installed in your \TeX{} system.
\item download and install the required fonts if needed.
- \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+ \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
\LevelOneTitle{Introduction}
@@ -169,7 +175,7 @@ Let's first look at a complete example of \minimart{} (the same works for \einfa
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -223,7 +229,7 @@ For detailed description of this command and more related commands, please refer
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -256,7 +262,7 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -310,7 +316,6 @@ or to use the \AmS{} class:
\end{tip}
-\clearpage
\LevelTwoTitle{Example - \minimbook}
Now let's look at an example of \minimbook{} (the same works for \simplivre{}).
@@ -353,7 +358,6 @@ There is no much differences with \minimart{}, only that the title and author in
\bigskip
In the next section, we will go through the options available.
-\clearpage
\LevelOneTitle{The options}
@@ -390,17 +394,13 @@ In the next section, we will go through the options available.
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -427,7 +427,7 @@ Additionally, \minimart{} and \minimbook{} offers the following options:
\end{itemize}
\end{itemize}
-\clearpage
+% \clearpage
\LevelOneTitle{Instructions by topic}
\LevelTwoTitle{Language configuration}
@@ -501,76 +501,10 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\LevelTwoTitle{Define a new theorem-like environment}
-
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-And then define this environment in one of following five ways:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
- \end{itemize}
-\clearpage
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
- \item This method is usually useful in the following two situations:
- \begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+ Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
\end{tip}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-Here is an example. The following code:
-
-\begin{code}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context.
-The effect is as follows:
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- The \lstinline|proofidea*| environment.
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- The \lstinline|proofidea| environment.
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -578,12 +512,7 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
-\clearpage
+% \clearpage
\LevelTwoTitle{Title, abstract and keywords}
\minimart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -634,7 +563,7 @@ The author information can contain multiple groups, written as:
Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-\clearpage
+% \clearpage
\LevelTwoTitle{Miscellaneous}
\LevelThreeTitle{On the line numbers}
@@ -648,8 +577,6 @@ In \lstinline|\section| or \lstinline|\subsection| , if you wish to add footnote
\end{itemize}
This is a disadvantage brought about by the underline decoration of the title.
-\LevelThreeTitle{On the QED symbols}
-Since the font in the theorem-like environments is the same as that of the main text, in order to indicate where the environments end, a hollow QED symbol \simpleqedsymbol{} is placed at the end of the theorem-like environments. However, if your theorem ends with an equation or list (itemize, enumerate, description, etc.), this symbol cannot be automatically placed in the correct position. In this case, you need to manually add a \lstinline|\qedhere| at the end of your equation or the last entry of your list to make the QED symbol appear at the end of the line.
\LevelOneTitle{Known issues}
diff --git a/macros/latex/contrib/minimalist/minimalist-plain.sty b/macros/latex/contrib/minimalist/minimalist-plain.sty
index 2bc3cd69b0..9c7cd650d2 100644
--- a/macros/latex/contrib/minimalist/minimalist-plain.sty
+++ b/macros/latex/contrib/minimalist/minimalist-plain.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{minimalist-plain}
- {2022/03/17} {}
+ {2022/03/19} {}
{The plain style of minimalist}
\@ifpackageloaded { minimalist } {}
@@ -115,14 +115,14 @@
{
\fancyhf{}
\if@twoside
- \fancyfoot[RO]{\small\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl }
- \nobreakspace\nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}}
- \fancyfoot[LE]{\small\leavevmode\llap{\thepage
- \nobreakspace\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }}
- \nobreakspace\nobreakspace\textcolor{main-text!30!paper}{ \l_minimalist_leftmark_tl }}
+ \fancyfoot[RO]{\textcolor{main-text!30!paper}{ \small \l_minimalist_rightmark_tl }
+ \rlap{\nobreakspace\nobreakspace\nobreakspace\nobreakspace\textcolor{main-text!75!paper}{\minimalist_bfseries: \thepage}}}
+ \fancyfoot[LE]{\leavevmode\llap{\textcolor{main-text!75!paper}{\minimalist_bfseries: \thepage}
+ \nobreakspace\nobreakspace\nobreakspace\nobreakspace}
+ \textcolor{main-text!30!paper}{ \l_minimalist_leftmark_tl }}
\else
- \fancyfoot[R]{\small\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl }
- \nobreakspace\nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}}
+ \fancyfoot[R]{\textcolor{main-text!30!paper}{ \l_minimalist_rightmark_tl }
+ \rlap{\nobreakspace\nobreakspace\nobreakspace\nobreakspace\textcolor{main-text!75!paper}{\minimalist_bfseries: \thepage}}}
\fi
\renewcommand{\headrulewidth}{0pt}
}
@@ -132,13 +132,13 @@
{
\fancyhf{}
\if@twoside
- \fancyfoot[RO]{\small
- \nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}}
- \fancyfoot[LE]{\small\leavevmode\llap{\thepage
- \nobreakspace\nobreakspace\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }}}
+ \fancyfoot[RO]{
+ \nobreakspace\rlap{\nobreakspace\nobreakspace\nobreakspace\nobreakspace\textcolor{main-text!75!paper}{\minimalist_bfseries: \thepage}}}
+ \fancyfoot[LE]{\leavevmode\llap{\textcolor{main-text!75!paper}{\minimalist_bfseries: \thepage}
+ \nobreakspace\nobreakspace}}
\else
- \fancyfoot[R]{\small
- \nobreakspace\rlap{\textcolor{main-text!27!paper}{ \l_minimalist_sep_bar }\nobreakspace\nobreakspace\thepage}}
+ \fancyfoot[R]{
+ \nobreakspace\nobreakspace\nobreakspace\rlap{\textcolor{main-text!75!paper}{\minimalist_bfseries: \thepage}}}
\fi
\renewcommand{\headrulewidth}{0pt}
}
@@ -185,7 +185,7 @@
\renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{\textsc{#1}}}
\fi
\renewcommand*{\sectionmark}[1]{
- \markright{\g_minimalist_section_decoration_char_tl\nobreakspace\arabic{section}\nobreakspace\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}}
+ \markright{\protect\g_minimalist_section_decoration_char_tl\nobreakspace\arabic{section}\nobreakspace\protect\g_minimalist_section_decoration_char_tl\nobreakspace\nobreakspace\nobreakspace#1}}
}
{
\if@twoside
@@ -299,7 +299,7 @@
% \phantomsection\addcontentsline{toc}{chapter}{#1}
\color{main-text!80!paper}\g_minimalist_title_font_chapter_tl\fontsize{16}{0}\selectfont}{}{0em}
{\rlap{\hspace*{-.5em}{\color{main-text!12!paper}
- \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{*}}}#1}
+ \fontsize{80}{0}\selectfont\normalfont\raisebox{-7pt}{\phantom{*}}}}#1}
[\ResumeLineNumbers]
}
{
@@ -521,24 +521,50 @@
\RequirePackage { projlib-theorem }
+\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ }
+ }
+
+\SetTheorem { remark }
+ {
+ name style = {
+ , heading style = {
+ , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ }
+ }
+ }
+
\bool_if:NF \l__projlib_theorem_complexname_bool
{
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist }
{
name style = {
- , heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- }
, crefname style = {
, english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
, french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
@@ -584,20 +610,6 @@
\SetTheorem { remark }
{
name style = {
- , heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- }
, crefname style = {
, english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
, french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
@@ -612,7 +624,7 @@
, japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
, russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
}
- , crefname style = {
+ , Crefname style = {
, english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
, french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
, ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 176d5986e0..50148e29fd 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{minimalist}
- {2022/03/17} {}
+ {2022/03/19} {}
{A simple and clear style for articles and books}
\keys_define:nn { minimalist }
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 4fe51f5c4d..1340e14853 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{minimart}
- {2022/03/17} {}
+ {2022/03/19} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index f346448d3a..995334db6c 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{minimbook}
- {2022/03/17} {}
+ {2022/03/19} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 53a8117f7b..db18403a5c 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -20,70 +20,70 @@
%<*ProjLib>
\ProvidesExplPackage
{ProjLib}
- {2022/03/17} {}
+ {2022/03/19} {}
{Collective interface of the ProjLib toolkit}
%</ProjLib>
%
%<*projlib-author>
\ProvidesExplPackage
{projlib-author}
- {2022/03/17} {}
+ {2022/03/19} {}
{Enhanced author information block}
%</projlib-author>
%
%<*projlib-datetime>
\ProvidesExplPackage
{projlib-datetime}
- {2022/03/17} {}
+ {2022/03/19} {}
{Convert numeric date-time string to natural language}
%</projlib-datetime>
%
%<*projlib-draft>
\ProvidesExplPackage
{projlib-draft}
- {2022/03/17} {}
+ {2022/03/19} {}
{Useful commands during draft stage}
%</projlib-draft>
%
%<*projlib-font>
\ProvidesExplPackage
{projlib-font}
- {2022/03/17} {}
+ {2022/03/19} {}
{Font selection and configuration}
%</projlib-font>
%
%<*projlib-language>
\ProvidesExplPackage
{projlib-language}
- {2022/03/17} {}
+ {2022/03/19} {}
{Multi-language configuration}
%</projlib-language>
%
%<*projlib-logo>
\ProvidesExplPackage
{projlib-logo}
- {2022/03/17} {}
+ {2022/03/19} {}
{The ProjLib logo}
%</projlib-logo>
%
%<*projlib-math>
\ProvidesExplPackage
{projlib-math}
- {2022/03/17} {}
+ {2022/03/19} {}
{Efficient math setup}
%</projlib-math>
%
%<*projlib-paper>
\ProvidesExplPackage
{projlib-paper}
- {2022/03/17} {}
+ {2022/03/19} {}
{Configuration of the paper style}
%</projlib-paper>
%
%<*projlib-theorem>
\ProvidesExplPackage
{projlib-theorem}
- {2022/03/17} {}
+ {2022/03/19} {}
{Configuration of theorem-like environments}
%</projlib-theorem>
@@ -190,7 +190,7 @@
{
\hook_gput_code:nnn { cmd/@author/after } { projlib-author }
{
- \phantom {A} \\[-.85\baselineskip]
+ \phantom {A} \\[-.9\baselineskip]
\bool_if:NF \g__projlib_author_affil_already_exist_bool
{
\skip_vertical:n { \g__projlib_author_length_innersep_dim }
@@ -250,6 +250,8 @@
{
\RequirePackage{ projlib-language }
+ \tl_const:Nn \c_projlib_author_dot_tl { . }
+
\tl_new:N \g_projlib_author_keywordsname_style_tl
\tl_gset:Nn \g_projlib_author_keywordsname_style_tl { \itshape }
@@ -280,38 +282,39 @@
\tl_gset:Nn \g__projlib_author_dedicatory_tl { #1 }
}
- \hook_gput_code:nnn { begindocument/before } { projlib-author }
- {
- \NewCommandCopy \projlib_author_backup_footnotemark: \footnotemark
- \tl_gset:Nn \footnotemark {}
- \NewCommandCopy \projlib_author_backup_thanks:w \thanks
- \cs_undefine:N \thanks
+ \NewCommandCopy \projlib_author_backup_footnotemark: \footnotemark
+ \tl_gset:Nn \footnotemark {}
- % measure the width of "*"
- \hbox_set:Nn \l_tmpa_box { * }
- \dim_const:Nn \c__projlib_author_length_width_of_asterisk_dim { \box_wd:N \l_tmpa_box }
+ \NewCommandCopy \projlib_author_backup_thanks:w \thanks
+ \cs_undefine:N \thanks
- \cs_new_nopar:Nn \projlib_author_pre_thanks:n
+ % measure the width of "*"
+ \hbox_set:Nn \l_tmpa_box { * }
+ \dim_const:Nn \c__projlib_author_length_width_of_asterisk_dim { \box_wd:N \l_tmpa_box }
+
+ \cs_new_nopar:Nn \projlib_author_pre_thanks:n
+ {
+ \projlib_author_backup_thanks:w
{
- \projlib_author_backup_thanks:w
- {
- \skip_horizontal:n { - \c__projlib_author_length_width_of_asterisk_dim }
- #1
- }
+ \skip_horizontal:n { - \c__projlib_author_length_width_of_asterisk_dim }
+ #1
}
+ }
- \NewDocumentCommand \thanks { m }
+ \NewDocumentCommand \thanks { m }
+ {
+ \tl_if_blank:nF { #1 }
{
- \tl_if_blank:nF { #1 }
+ \hook_gput_code:nnn { cmd/@title/after } { projlib-author }
{
- \hook_gput_code:nnn { cmd/@title/after } { projlib-author }
- {
- \projlib_author_pre_thanks:n { #1 }
- }
+ \projlib_author_pre_thanks:n { #1 }
}
}
+ }
+ \hook_gput_code:nnn { begindocument/before } { projlib-author }
+ {
\NewCommandCopy \projlib_author_backup_my_author:w \author
\RenewDocumentCommand \author { m }
{
@@ -320,7 +323,7 @@
\RenewCommandCopy \footnotemark \projlib_author_backup_footnotemark:
\RenewCommandCopy \thanks \projlib_author_backup_thanks:w
#1
- \cs_undefine:N \footnotemark
+ \tl_gset:Nn \footnotemark {}
}
}
}
@@ -384,7 +387,7 @@
{
\group_begin:
\g_projlib_author_keywordsname_style_tl
- \keywordsname .
+ \keywordsname \c_projlib_author_dot_tl
\group_end:
\c_space_tl
\g__projlib_author_keywords_tl
@@ -430,7 +433,7 @@
}
\projlib_author_pre_thanks:n
{
- \textit{ \l_projlib_author_subjclassname_tl . }
+ \textit{ \l_projlib_author_subjclassname_tl \c_projlib_author_dot_tl }
\enspace
\l_projlib_author_subjclass_tl .
}
@@ -2744,35 +2747,35 @@
\tl_gput_right:Nn \g_projlib_language_settings_schinese_tl
{
\g_projlib_language_settings_common_tl
- \tl_gset:Nn \languagename { schinese }
- \tl_gset:cn { abstractname } { 摘要 }
- \tl_gset:cn { proofname } { 证明 }
- \tl_gset:cn { contentsname } { 目录 }
- \tl_gset:cn { listfigurename } { 插图 }
- \tl_gset:cn { listtablename } { 表格 }
- \tl_gset:cn { figurename } { 图 }
- \tl_gset:cn { tablename } { 表 }
- \tl_gset:cn { indexname } { 索引 }
- \tl_gset:cn { appendixname } { 附录 }
- \tl_gset:cn { refname } { 参考文献 }
- \tl_gset:cn { bibname } { 参考文献 }
+ \tl_set:Nn \languagename { schinese }
+ \tl_set:cn { abstractname } { 摘要 }
+ \tl_set:cn { proofname } { 证明 }
+ \tl_set:cn { contentsname } { 目录 }
+ \tl_set:cn { listfigurename } { 插图 }
+ \tl_set:cn { listtablename } { 表格 }
+ \tl_set:cn { figurename } { 图 }
+ \tl_set:cn { tablename } { 表 }
+ \tl_set:cn { indexname } { 索引 }
+ \tl_set:cn { appendixname } { 附录 }
+ \tl_set:cn { refname } { 参考文献 }
+ \tl_set:cn { bibname } { 参考文献 }
}
\tl_gput_right:Nn \g_projlib_language_settings_tchinese_tl
{
\g_projlib_language_settings_common_tl
- \tl_gset:Nn \languagename { tchinese }
- \tl_gset:cn { abstractname } { 摘要 }
- \tl_gset:cn { proofname } { 證明 }
- \tl_gset:cn { contentsname } { 目錄 }
- \tl_gset:cn { listfigurename } { 插圖 }
- \tl_gset:cn { listtablename } { 表格 }
- \tl_gset:cn { figurename } { 圖 }
- \tl_gset:cn { tablename } { 表 }
- \tl_gset:cn { indexname } { 索引 }
- \tl_gset:cn { appendixname } { 附錄 }
- \tl_gset:cn { refname } { 參考文獻 }
- \tl_gset:cn { bibname } { 參考文獻 }
+ \tl_set:Nn \languagename { tchinese }
+ \tl_set:cn { abstractname } { 摘要 }
+ \tl_set:cn { proofname } { 證明 }
+ \tl_set:cn { contentsname } { 目錄 }
+ \tl_set:cn { listfigurename } { 插圖 }
+ \tl_set:cn { listtablename } { 表格 }
+ \tl_set:cn { figurename } { 圖 }
+ \tl_set:cn { tablename } { 表 }
+ \tl_set:cn { indexname } { 索引 }
+ \tl_set:cn { appendixname } { 附錄 }
+ \tl_set:cn { refname } { 參考文獻 }
+ \tl_set:cn { bibname } { 參考文獻 }
}
\tl_gput_right:Nn \g_projlib_language_settings_japanese_tl
@@ -3005,6 +3008,7 @@
\endinput
}
+%<*projlib-logo-old>
\cs_if_exist:cTF { fontspec }
{
\newfontface \__projlib_logo_font: { LinBiolinum_R.otf }
@@ -3034,19 +3038,20 @@
}
}
-% \RequirePackage { xcolor }
% \cs_new_protected:Nn \projlib_logo_generic:n
% {
% \group_begin:
% \normalfont
% \__projlib_logo_font:
-% \textcolor { blue!55!cyan } { P }
-% \textcolor { blue!45!cyan } { r }
-% \textcolor { blue!30!cyan } { o }
-% \textcolor { green!70!black!70 } { #1 }
-% \textcolor { red!20!yellow } { L }
-% \textcolor { red!40!yellow } { i }
-% \textcolor { red!55!yellow } { b }
+% \color_group_begin:
+% \color_select:n { blue!60!cyan } { P }
+% \color_select:n { blue!45!cyan } { r }
+% \color_select:n { blue!30!cyan } { o }
+% \color_select:n { green!70!black!70 } { #1 }
+% \color_select:n { red!20!yellow } { L }
+% \color_select:n { red!40!yellow } { i }
+% \color_select:n { red!60!yellow } { b }
+% \color_group_end:
% \group_end:
% }
\cs_new_protected:Nn \projlib_logo_generic:n
@@ -3055,13 +3060,13 @@
\normalfont
\__projlib_logo_font:
\color_group_begin:
- \color_select:n { blue!60!cyan } { P }
- \color_select:n { blue!45!cyan } { r }
- \color_select:n { blue!30!cyan } { o }
- \color_select:n { green!70!black!70 } { #1 }
- \color_select:n { red!20!yellow } { L }
- \color_select:n { red!40!yellow } { i }
- \color_select:n { red!60!yellow } { b }
+ \color_select:n { blue!50!cyan!30!black } { P }
+ \color_select:n { blue!50!cyan!55!black } { r }
+ \color_select:n { blue!50!cyan!75!black } { o }
+ \color_select:n { blue!50!cyan!90!black } { #1 }
+ \color_select:n { blue!50!cyan!75!black } { L }
+ \color_select:n { blue!50!cyan!55!black } { i }
+ \color_select:n { blue!50!cyan!30!black } { b }
\color_group_end:
\group_end:
}
@@ -3074,6 +3079,50 @@
{
\projlib_logo_generic:n { j }
}
+%</projlib-logo-old>
+
+\RequirePackage { tikz }
+
+\cs_new_protected:Nn \projlib_logo_generic:
+ {
+ \skip_horizontal:n { .2em }
+ \begin{tikzpicture}[line~width=.1em, baseline=0]
+ \begin{scope}[color=blue!50!cyan!30!black]
+ \draw (0.22em,.5em) circle (.22em);
+ \draw (0em,0em) -- (0em,.5em);
+ \end{scope}
+ \begin{scope}[color=blue!50!cyan!40!black, xshift=.65em]
+ \draw (0em,0em) -- (0em,.25em) arc [start~angle=180, end~angle=90, radius=.2em];
+ \end{scope}
+ \begin{scope}[color=blue!50!cyan!45!black, xshift=1.0em]
+ \draw (0.2em,.24em) circle (.2em);
+ \end{scope}
+ \begin{scope}[color=blue!50!cyan!50!black, xshift=1.65em]
+ \draw (0em,-.25em) -- (0em,.5em);
+ \begin{scope}[yshift=.75em]
+ % \draw[line~width=.032em, color=orange!60!yellow, xshift=.01em, yshift=-.003em] (0,0) circle (.13em);
+ % \node[rotate=-15,scale=0.45, xshift=.033em] { \usefont{U}{zeur}{b}{n} \symbol{"02} };
+ \draw[line~width=.06em, color=orange!60!yellow] (0,0) circle (.13em);
+ \end{scope}
+ \end{scope}
+ \begin{scope}[color=blue!50!cyan!67!black, xshift=2.0em]
+ \draw (0em,0em) -- (0em,.75em);
+ \end{scope}
+ \begin{scope}[color=blue!50!cyan!75!black, xshift=2.35em]
+ \draw (0em,0em) -- (0em,.5em);
+ \end{scope}
+ \begin{scope}[color=blue!50!cyan!90!black, xshift=2.63em]
+ \draw (0.2em,.24em) circle (.2em);
+ \draw (0em,0.24em) -- (0em,.75em);
+ \end{scope}
+ \end{tikzpicture}
+ \skip_horizontal:n { .2em }
+ }
+
+\DeclareRobustCommand * \ProjLib
+ {
+ \projlib_logo_generic:
+ }
%</projlib-logo>
%
%<*projlib-math>
@@ -3395,6 +3444,13 @@
, theorem numbering .default:n = { * }
, thmnum .tl_set:N = \l__projlib_theorem_theorem_numbering_tl
, thmnum .default:n = { * }
+ , theorem-style .tl_set:N = \l__projlib_theorem_theorem_style_tl
+ , theorem-style .initial:n = { }
+ , theorem-style .value_required:n = true
+ , theorem~style .tl_set:N = \l__projlib_theorem_theorem_style_tl
+ , theorem~style .value_required:n = true
+ , theorem style .tl_set:N = \l__projlib_theorem_theorem_style_tl
+ , theorem style .value_required:n = true
, complex-name .bool_set:N = \l__projlib_theorem_complexname_bool
, complex-name .initial:n = { true }
, complex~name .bool_set:N = \l__projlib_theorem_complexname_bool
@@ -3462,6 +3518,17 @@
% \PassOptionsToPackage { no preset names } { create-theorem }
% }
+\cs_new_protected:Nn \projlib_theorem_preset_theorem_style:nn
+ {
+ \tl_const:cn { c_crthm_theorem_style_preset_ #1 _tl } { #2 }
+ }
+
+\cs_generate_variant:Nn \keyval_parse:nnn { nno }
+\keyval_parse:nno
+ { }
+ { \projlib_theorem_preset_theorem_style:nn }
+ { \l__projlib_theorem_theorem_style_tl }
+
\RequirePackage { amsthm }
\RequirePackage { create-theorem }
diff --git a/macros/latex/contrib/projlib/README.md b/macros/latex/contrib/projlib/README.md
index 9922ad0b82..3c25a992a8 100644
--- a/macros/latex/contrib/projlib/README.md
+++ b/macros/latex/contrib/projlib/README.md
@@ -2,11 +2,13 @@
# ProjLib Toolkit
-The bundle is dated 2022/03/17
+The bundle is dated 2022/03/19
+
+![image](https://i.imgur.com/bOOJLve.png)
## **Important note**
-The whole project is being rewritten with `expl3`. The new modules are basically finished but are not yet documented. They have the names with prefix "projlib-", and they are in many ways better and more powerful than their predecessors. The most important thing to be noticed is that these new modules are not compatible with the old ones, and thus they cannot appear simultaneously in the same document, which, unfortunately, means that (for now) they cannot be used in classes like `lebhart`, `beaulivre` (these are the classes with which the author produced the old documentations), etc.
+The whole project is being rewritten with `expl3`. The new modules are basically finished but are **not yet documented**. They have filenames with the prefix "projlib-", and they are in many ways better and more powerful than their predecessors.
The new modules are:
- projlib-author
@@ -19,7 +21,7 @@ The new modules are:
- projlib-paper
- projlib-theorem
-Below are the old README.
+Below is the old README.
---
diff --git a/macros/latex/contrib/seu-ml-assign/README.md b/macros/latex/contrib/seu-ml-assign/README.md
new file mode 100644
index 0000000000..86702d3812
--- /dev/null
+++ b/macros/latex/contrib/seu-ml-assign/README.md
@@ -0,0 +1,30 @@
+# SEU-ML-Assign LaTeX Template
+LaTeX Template for Southeast University Machine Learning Assignment
+
+> GitHub Project Site: https://tvj.one/ml-tex
+
+## Class and Options
+This project provides the `seu-ml-assign` class.
+
+| Option | Explanation |
+| - | - |
+| `solution` | Write solutions (for students). **[default]** |
+| `problem` | Write problem sets (for instructors). |
+| `9pt` | Set font size as 9 points. |
+| `10pt` | Set font size as 10 points. **[default]** |
+| `11pt` | Set font size as 11 points. |
+| `12pt` | Set font size as 12 points. |
+
+## Commands and Usage
+Please refer to the [documentation](seu-ml-assign-doc.pdf).
+
+## TODOs
+- [x] Class Definition
+- [x] Example `tex` File
+- [x] Class Documentation
+- [ ] Class Website
+- [ ] Submission to CTAN
+- [ ] Demonstration Video
+
+## License
+This project is licensed under the [MIT License](LICENSE).
diff --git a/macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.pdf b/macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.pdf
new file mode 100644
index 0000000000..43504378ae
--- /dev/null
+++ b/macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.tex b/macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.tex
new file mode 100644
index 0000000000..c9556da739
--- /dev/null
+++ b/macros/latex/contrib/seu-ml-assign/seu-ml-assign-doc.tex
@@ -0,0 +1,214 @@
+%! TEX program = pdflatex
+
+\documentclass{seu-ml-assign}
+
+\title{Documentation}
+\author{Teddy van Jerry}
+\studentID{}
+\instructor{TeX - LaTeX Stack Exchange}
+\date{\today}
+\duedate{20:00 March 21, 2022}
+\assignno{1.0}
+\semester{LaTeX Template}
+
+\renewcommand{\sectionheadname}{Section}
+\renewcommand{\pdftitleadditionalname}{}
+
+\usepackage{booktabs}
+\usepackage{colortbl}
+% option for tabular with '\midrule'
+\aboverulesep = 0mm \belowrulesep = 0mm
+
+\newcommand{\grayrow}{\rowcolor[rgb]{ .906, .902, .902}}
+
+\begin{document}
+ \maketitle
+
+ \section{Basic Information of This Template Class}
+
+ Despite this \textit{SEU-ML-Assign} class is dedicated to Southeast University as the Machine Learning assignment \LaTeX{} template both for teachers and students, it can also be used for other schools.
+ In the near future, it will eventually become an elegant template for all assignment requirememts.
+
+ \begin{table}[htbp]
+ \bgroup
+ \def\arraystretch{1.2}
+ \setlength{\tabcolsep}{1.5em}
+ \begin{tabular}{ll}
+ \toprule
+ \grayrow \textbf{Package Class Name} & seu-ml-assign \\
+ \textbf{Version} & 1.0 (2022/03/20) \\
+ \grayrow \textbf{Description} & \LaTeX{} Template for Southeast University Machine Learning Assignment \\
+ \textbf{Author} & Teddy van Jerry (Wuqiong Zhao) \\
+ \grayrow \textbf{Maintainer} & Teddy van Jerry (Wuqiong Zhao) \\
+ \textbf{GitHub Repository} & \url{https://tvj.one/ml-tex} \\
+ \grayrow \textbf{Issues} & \url{https://tvj.one/ml-tex/issues} \\
+ \textbf{Open Source License} & MIT License (\url{https://tvj.one/ml-tex/blob/master/LICENSE}) \\
+ \bottomrule
+ \end{tabular}%
+ \egroup
+ \end{table}
+
+ You can contact me at \href{mailto:me@tvj.one}{me@tvj.one} for support.
+
+ \section{Class Options}
+
+ To use this template, put \texttt{seu-ml-assign.cls} file under the same directory with your main \texttt{tex} file.
+ \begin{lstlisting}[language=tex,numbers=none]
+\documentclass{seu-ml-assign} % SEU Machine Learning Assignment Template
+ \end{lstlisting}
+ There are 6 supported options:
+ \begin{table}[htbp]
+ \bgroup
+ \def\arraystretch{1.2}
+ \setlength{\tabcolsep}{1.5em}
+ \begin{tabular}{ll}
+ \toprule
+ \textbf{Option} & \textbf{Description} \\
+ \midrule\midrule
+ \grayrow \texttt{solution} & Write solutions (for students). \textbf{[Default]} \\
+ \texttt{problem} & Write problem sets (for instructors). \\
+ \grayrow \texttt{9pt} & Set font size as 9 points. \\
+ \texttt{10pt} & Set font size as 10 points. \textbf{[Default]} \\
+ \grayrow \texttt{11pt} & Set font size as 11 points. \\
+ \texttt{12pt} & Set font size as 12 points. \\
+ \bottomrule
+ \end{tabular}%
+ \egroup
+ \end{table}
+
+ For example, a 10pt document for instructors to create an assignment consisting of problem sets should use
+
+ \begin{lstlisting}[language=tex,numbers=none]
+\documentclass[10pt,problem]{seu-ml-assign} % The 10pt option can be omitted.
+ \end{lstlisting}
+
+ There are several differences between the \texttt{solution} mode and \texttt{problem} mode,
+ including the preset texts on the document (for example the student name is not shown in the \texttt{problem} mode) and some properties can only be used with the \texttt{problem} mode which will be elaborated on in \S\ref{subsec:prob_only_properties}.
+
+ \section{Document Properties}
+
+ \subsection{Fields}
+
+ There are several fields to set.
+ Consider the following example used in the sample file:
+ \begin{lstlisting}[language=tex,numbers=none]
+\title{Assignment} % Document Type: assignment, quiz, etc.
+\author{Teddy van Jerry} % Your Name
+\studentID{61520522} % Your Student ID
+\instructor{TeX - LaTeX Stack Exchange} % The Name of Your Instructor
+\date{\today} % The Submission or Release Date
+\duedate{20:00 March 21, 2022} % The Time the Assignment is Due
+\assignno{1} % Assignment Number
+\semester{SEU --- 2022 Spring} % Semester
+ \end{lstlisting}
+
+ With these fields set, you can use the command \verb|\maketitle| to print the title.
+ At the same time, the metadata for the PDF document is automatically set.
+
+ \subsection{Problem Mode Only Properties}\label{subsec:prob_only_properties}
+ One of the fields \verb|\author{}| and \verb|\instructor{}| can be omitted or set as empty provided that they are the same.
+
+ \section{Section Title (Problem) Settings}
+
+ \subproblem{Normal Title}
+
+ The title of a problem can be set as \verb|\section{This is a Section Title}| or uses a higher level command \verb|\problem{This is a Section Title}|.
+
+ \subproblem{Problem with Points}
+
+ The points of a problem can be set using command \verb|\problempts{xxx}| before calling the \verb|\section{}| command.
+ These two commands can be simplified to \verb|\problem[xxx]{}|.
+ For example, using the command \verb|\problem[15]{This is a Problem Worth 15 Points}| will have:\vspace{-8mm}
+
+ \renewcommand{\sectionheadname}{Problem}
+ \setproblem{1}
+
+ % \problem[15]{This is a Problem Worth 15 Points}
+ \problempts{15}
+ \section*{This is a Problem Worth 15 Points}
+ Note that if the point is an empty string, the point information will not be shown.
+
+ \subproblem{Long Title Compatibility}
+ There is also no problem if the section title is too long.\vspace{-8mm}
+
+ \setproblem{2}
+ \problempts{20}
+ \section*{I Don't Think that Anyone Will Enjoy Themselves Seeing a Very Very Long Problem That is Worth Twenty Points in this Machine Learning Course}
+
+ \renewcommand{\sectionheadname}{Section}
+ \setproblem{4}
+
+ \subproblem{Section Title Name}
+ The name of the section (default name as \texttt{problem}) can be changed by using \verb|\renewcommand{\sectionheadname}{Name}|.
+
+ \subproblem{Section Number}
+ The number of the section can be changed, for example \verb|\texttt{\setproblem{4}}| will make the next section number be \texttt{5}.
+ For experienced \LaTeX{} users to understand, this command actually change the section counter.
+
+ \subproblem{Solution Declaration}
+ You can use \verb|\startsolution| to declare you start writing the solution.
+ This will reset the section number and it is especially useful when your document contains problems and solutions as two separate parts.
+ There is an option \texttt{print} and if you use \verb|\startsolution[print]| you will get:
+
+ \startsolution[print]
+ and the word \textsc{Solution} can be changed using command \verb|\renewcommand{\solutionname}{Other Name}|.
+
+
+ \setproblem{4}
+ \section{Subsection Title (Sub Problem) Settings}
+
+ \subproblem{Normal Title} This is a normal title using command \verb|\subproblem{Normal Title}| or its equivalent command \verb|\subsection{Normal Title}|.
+
+ \subproblem{} Use \verb|\subproblem{}| or \verb|\subsection{}| if only the sub problem number is required (like this line).
+
+ \subproblem{Subsection Number} Similar to \verb|\setproblem{}|, there is also \verb|\setsubproblem{}|.
+
+ \section{Other Tools}
+
+ \subsection{Equation Numbering} The equation number is within the section (problem), for example
+
+ \begin{equation}\label{eq:2-1-det}
+ \mathrm{det}(\mathbf{A})=1\times\begin{vNiceArray}{rr}
+ -5&3\\-6&4
+ \end{vNiceArray}-(-3)\times\begin{vNiceArray}{rr}
+ 3&3\\6&4
+ \end{vNiceArray}+3\times\begin{vNiceArray}{rr}
+ 3&-5\\6&-6
+ \end{vNiceArray}=1\times(-2)+3\times(-6)+3\times 12=16.
+ \end{equation}
+
+ \subsection{Maths Packages} Maths Package \texttt{mathtools}, \texttt{amssymb}, \texttt{amsthm}, \texttt{bm} and \texttt{nicematrix} are automatically loaded.
+ The \texttt{nicematrix} package is especially powerful in terms of writing a matrix.
+ You can find its documentation at \url{https://ctan.org/pkg/nicematrix}.
+
+ \subsection{Fancy Box} A fancy box has been defined.
+ \begin{fancybox}{This is a Title}
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin viverra massa rutrum felis vulputate, ac faucibus velit accumsan. Vivamus aliquet felis nec interdum sollicitudin. Nullam ornare eu velit id cursus. Maecenas a sodales velit, vel cursus magna. Cras lobortis venenatis.
+ \end{fancybox}
+
+
+ You can use the following code to generate it.
+ \begin{lstlisting}[language=tex,numbers=none,morekeywords={begin}]
+\begin{fancybox}{This is a Title}
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin viverra massa rutrum felis vulputate, ac faucibus velit accumsan. Vivamus aliquet felis nec interdum sollicitudin. Nullam ornare eu velit id cursus. Maecenas a sodales velit, vel cursus magna. Cras lobortis venenatis.
+\end{fancybox}
+ \end{lstlisting}
+
+ \appendix
+ \renewcommand{\sectionheadname}{Appendix}
+
+ \section{Known Issues}\label{sec:known_issues}
+
+ \begin{itemize}
+ \item \verb|\section*{}| still shows the section number except for it does not increment the section counter by one;
+ \item The section title background height may not be accurate;
+ \item The style of the footnote line has not been adapted to the current colorful theme.
+ \end{itemize}
+
+ \section{Source Code}
+
+ The source code of \texttt{SEU-ML-Assign.cls} is listed below.
+
+ \lstinputlisting[language=tex,linerange={15-1000},firstnumber=15]{SEU-ML-Assign.cls}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/seu-ml-assign/seu-ml-assign-sample.tex b/macros/latex/contrib/seu-ml-assign/seu-ml-assign-sample.tex
new file mode 100644
index 0000000000..de5bf5f833
--- /dev/null
+++ b/macros/latex/contrib/seu-ml-assign/seu-ml-assign-sample.tex
@@ -0,0 +1,384 @@
+%! TEX program = pdflatex
+
+\documentclass[solution]{seu-ml-assign}
+
+\title{Assignment}
+\author{Teddy van Jerry}
+\studentID{61520522}
+\instructor{TeX - LaTeX Stack Exchange}
+\date{\today}
+\duedate{20:00 March 21, 2022}
+\assignno{1}
+\semester{SEU --- 2022 Spring}
+
+\begin{document}
+
+\maketitle
+
+% \startsolution[print]
+
+\problem{Basic Vector Operations}
+\subproblem{}
+$\|\mathbf{a}\|_2=\sqrt{1^2+2^2+3^2}=\sqrt{14},\quad \|\mathbf{b}\|_2=\sqrt{(-8)^2+1^2+2^2}=\sqrt{69}$.
+
+\subproblem{}
+$\|\mathbf{a}-\mathbf{b}\|_2=\sqrt{9^2+1^2+1^2}=\sqrt{83}$.
+
+\subproblem{}
+$\mathbf{a}$ and $\mathbf{b}$ are orthogonal.
+\begin{proof}
+The inner product of vectors $\mathbf{a}$ and $\mathbf{b}$ is
+\begin{equation}
+\langle\mathbf{a},\mathbf{b}\rangle=\mathbf{a}^T\mathbf{b}=1\times(-8)+2\times 1+3\times 2=0,
+\end{equation}
+therefore $\mathbf{a}$ and $\mathbf{b}$ are orthogonal.
+\end{proof}
+
+\problem{Basic Matrix Operations}
+According to the consensus, the matrix notation should be the bold upper-case letter like $\mathbf{A}$ or $\bm{A}$, not $A$.
+
+\subproblem{}
+\begin{equation}
+ \begin{aligned}
+ [\mathbf{A}, \mathbf{I}_3]&=
+ \begin{bNiceArray}{rrr:rrr}
+ 1&-3&3&1&0&0\\3&-5&3&0&1&0\\6&-6&4&0&0&1
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&-3&3&1&0&0\\0&4&-6&-3&1&0\\0&12&-14&-6&0&1
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&-3&3&1&0&0\\0&4&-6&-3&1&0\\0&0&4&3&-3&1
+ \end{bNiceArray}\\
+ &\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&-3&0&-\frac{5}{4}&\frac{9}{4}&\frac{3}{4}\\[0.3em]0&4&0&\frac{3}{2}&-\frac{7}{2}&-\frac{3}{2}\\[0.3em]0&0&1&\frac{3}{4}&-\frac{3}{4}&\frac{1}{4}
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&0&0&-\frac{1}{8}&-\frac{3}{8}&\frac{3}{8}\\[0.3em]0&1&0&\frac{3}{8}&-\frac{7}{8}&\frac{3}{8}\\[0.3em]0&0&1&\frac{3}{4}&-\frac{3}{4}&\frac{1}{4}
+ \end{bNiceArray},
+ \end{aligned}
+\end{equation}
+where $\mathbf{I}_3$ is the $3\times 3$ identity matrix.
+Therefore we have
+\begin{equation}\label{eq:2-1-inv}
+ \mathbf{A}^{-1}=
+ \begin{bNiceArray}{rrr}
+ -\frac{1}{8}&-\frac{3}{8}&\frac{3}{8}\\[0.3em]\frac{3}{8}&-\frac{7}{8}&\frac{3}{8}\\[0.3em]\frac{3}{4}&-\frac{3}{4}&\frac{1}{4}
+ \end{bNiceArray}.
+\end{equation}
+The determinant of matrix $\mathbf{A}$ can be calculated as
+\begin{equation}\label{eq:2-1-det}
+ \mathrm{det}(\mathbf{A})=1\times\begin{vNiceArray}{rr}
+ -5&3\\-6&4
+ \end{vNiceArray}-(-3)\times\begin{vNiceArray}{rr}
+ 3&3\\6&4
+ \end{vNiceArray}+3\times\begin{vNiceArray}{rr}
+ 3&-5\\6&-6
+ \end{vNiceArray}=1\times(-2)+3\times(-6)+3\times 12=16,
+\end{equation}
+where $|\cdot|$ denotes the determinant.
+
+\subproblem{}
+The rank of matrix $\mathbf{A}$ is $3$ because as is shown in Eq.~\eqref{eq:2-1-inv} the matrix $\mathbf{A}$ is invertible.
+
+\subproblem{}
+The trace of matrix $\mathbf{A}$ is
+\begin{equation}
+ \mathrm{tr}(\mathbf{A})=\sum_{i=1}^{3}a_{ii}=1+(-5)+4=0.
+\end{equation}
+
+\begin{equation}
+ \mathbf{A}+\mathbf{A}^{T}=\begin{bNiceArray}{rrr}
+ 1&-3&3\\3&-5&3\\6&-6&4
+ \end{bNiceArray}+
+ \begin{bNiceArray}{rrr}
+ 1&3&6\\-3&-5&-6\\3&3&4
+ \end{bNiceArray}=
+ \begin{bNiceArray}{rrr}
+ 2&0&9\\0&-10&-3\\9&-3&8
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+\begin{equation}
+ \mathbf{A}+\mathbf{A}^{T}=\begin{bNiceArray}{rrr}
+ 1&-3&3\\3&-5&3\\6&-6&4
+ \end{bNiceArray}+
+ \begin{bNiceArray}{rrr}
+ 1&3&6\\-3&-5&-6\\3&3&4
+ \end{bNiceArray}=
+ \begin{bNiceArray}{rrr}
+ 2&0&9\\0&-10&-3\\9&-3&8
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+$\mathbf{A}$ is not an orthogonal matrix.
+\begin{proof}
+ Assume $\mathbf{A}$ is an orthogonal matrix,
+ therefore
+ \begin{equation}
+ \mathbf{AA}^{T}=\mathbf{I}_3,
+ \end{equation}
+ Take the determinant at both side, it can be derived that
+ \begin{equation}
+ |\mathrm{det}(\mathbf{A})|=\sqrt{|\mathbf{A}||\mathbf{A}^T|}=|\mathrm{det}(\mathbf{I}_3)|=1,
+ \end{equation}
+ which contradicts with Eq.~\eqref{eq:2-1-det}.
+ Therefore, the assumption is false.
+\end{proof}
+
+\subproblem{}
+Let $f(\lambda)$ be the characteristic function of matrix $\mathbf{A}$ and
+\begin{equation}\label{eq:2-6-f}
+ f(\lambda)=\begin{vNiceArray}{ccc}
+ \lambda-1&3&-3\\-3&\lambda+5&-3\\-6&6&\lambda-4
+ \end{vNiceArray}=(\lambda-4)(\lambda+2)^2,
+\end{equation}
+therefore the eigenvalues are $\lambda_1=4, \lambda_2=\lambda_3=-2$.
+Let the corresponding eigenvectors be $\bm{\alpha}_i$, $i=1,2,3$.
+\begin{equation}
+ (\mathbf{A}-\lambda_i\mathbf{I}_3)\bm{\alpha}_i=\mathbf{0},\quad i=1,2,3,
+\end{equation}
+and the corresponding eigenvectors are
+\begin{equation}
+ \bm{\alpha}_1=\begin{bNiceArray}{ccc}1&1&2\end{bNiceArray}^T,\quad
+ \bm{\alpha}_{2,3}=\begin{bNiceArray}{ccc}1&1+c_{2,3}&c_{2,3}\end{bNiceArray}^T,
+\end{equation}
+where $c_{2,3}\in\mathbb{R}$.
+Without loss of generality, we take $c_2=0$ and $c_3=-1$, and we have $\bm{\alpha}_2=\begin{bNiceArray}{ccc}1&1&0\end{bNiceArray}^T$ and $\bm{\alpha}_2=\begin{bNiceArray}{ccc}1&0&-1\end{bNiceArray}^T$.
+
+\subproblem{}
+Use the result from Eq.~\eqref{eq:2-6-f}, the matrix $\mathbf{A}$ can be diagonalized as
+\begin{equation}
+ \bm{\Lambda}=\begin{bNiceArray}{rrr}
+ 4&0&0\\0&-2&0\\0&0&-2
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+The $\ell_{2,1}$ norm of $\mathbf{A}$ is
+\begin{equation}
+ \|\mathbf{A}\|_{2,1}=\sum_{i=1}^3\sqrt{\sum_{j=1}^3a_{ij}^2}=\sqrt{46}+\sqrt{70}+\sqrt{34}\approx 20.98,
+\end{equation}
+and the Frobenius norm of $\mathbf{A}$ is
+\begin{equation}
+ \|\mathbf{A}\|_F=\sqrt{\sum_{i,j=1,\mathrlap{2,3}}a_{ij}^2}=\sqrt{150}=5\sqrt{6}\approx 12.247.
+\end{equation}
+
+\subproblem{}
+The nuclear norm of $\mathbf{A}$ is
+\begin{equation}
+ \|\mathbf{A}\|_*=\mathrm{tr}(\sqrt{\mathbf{A}\mathbf{A^*}})=\sum_{i=1}^3\sigma_i(\mathbf{A})\approx 14.728,
+\end{equation}
+and the spectral norm of $\mathbf{A}$ is
+\begin{equation}
+ \|\mathbf{A}\|_2=\max\sigma_i(\mathbf{A})\approx 12.065.
+\end{equation}
+
+\vspace{2mm}
+\begin{lstlisting}[language=Matlab, title={MATLAB Code for Check}]
+A = [1, -3, 3; 3, -5, 3; 6, -6, 4]; % define the matrix A
+inv(A) % calculate and print the inverse of A
+det(A) % the determinant of A
+rank(A) % the rank of A
+trace(A) % the trace of A
+A + A.' % the sum of A and the transpose of A
+sum(sum(A * A.' ~= eye(3))) % check if A is orthogonal
+[X, D] = eig(A) % the eigenvectors and the corresponding eigenvalues of A
+sum(sqrt(sum(A .^ 2))) % l-2,1 norm of A
+norm(A, 'fro') % Frobenius norm of A
+sum(svd(A)) % nuclear norm of A
+max(svd(A)) % spectral norm of A
+\end{lstlisting}
+
+\problem{Linear Equations}
+\subproblem{}
+It is evident to solve the linear equation
+\begin{equation}\label{eq:3-1}
+ \left\{
+ \begin{aligned}
+ x_1&=-1, \\
+ x_2&=0, \\
+ x_3&=1.
+ \end{aligned}
+ \right.
+\end{equation}
+
+\subproblem{}
+Let
+\begin{equation}
+ \mathbf{A}=\begin{bNiceArray}{rrr}
+ 2&2&3\\1&-1&0\\-1&2&1
+ \end{bNiceArray},\quad
+ \mathbf{b}=
+ \begin{bNiceArray}{r}
+ 1\\-1\\2
+ \end{bNiceArray},
+\end{equation}
+and we have $\mathbf{Ax}=\mathbf{b}$ as
+\begin{equation}
+ \begin{bNiceArray}{rrr}
+ 2&2&3\\1&-1&0\\-1&2&1
+ \end{bNiceArray}
+ \begin{bNiceArray}{r}
+ x_1\\x_2\\x_3
+ \end{bNiceArray}=
+ \begin{bNiceArray}{r}
+ 1\\-1\\2
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+Since there is a unique solution shown in Eq.~\eqref{eq:3-1}, we know
+\begin{equation}\label{eq:3-3}
+ \mathrm{rank}(\mathbf{A})=3.
+\end{equation}
+
+\subproblem{}
+\begin{equation}
+ \begin{aligned}
+ [\mathbf{A}, \mathbf{I}_3]&=
+ \begin{bNiceArray}{rrr:rrr}
+ 2&2&3&1&0&0\\1&-1&0&0&1&0\\-1&2&1&0&0&1
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 2&2&3&1&0&0\\1&-1&0&0&1&0\\0&1&1&0&1&1
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&1&\frac{3}{2}&\frac{1}{2}&0&0\\1&-1&0&0&1&0\\0&1&1&0&1&1
+ \end{bNiceArray}\\
+ &\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&1&\frac{3}{2}&\frac{1}{2}&0&0\\[0.3em]0&-2&-\frac{3}{2}&-\frac{1}{2}&1&0\\[0.3em]0&1&1&0&1&1
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&1&\frac{3}{2}&\frac{1}{2}&0&0\\[0.3em]0&-1&-\frac{3}{4}&-\frac{1}{4}&\frac{1}{2}&0\\[0.3em]0&0&\frac{1}{4}&-\frac{1}{4}&\frac{3}{2}&1
+ \end{bNiceArray}\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&1&0&2&-9&-6\\[0.3em]0&-1&0&-1&5&3\\[0.3em]0&0&1&-1&6&4
+ \end{bNiceArray}\\
+ &\sim
+ \begin{bNiceArray}{rrr:rrr}
+ 1&0&0&1&-4&-3\\0&1&0&1&-5&-3\\0&0&1&-1&6&4
+ \end{bNiceArray},
+ \end{aligned}
+\end{equation}
+therefore the inverse of $\mathbf{A}$ is
+\begin{equation}\label{eq:3-4-inv}
+ \mathbf{A}^{-1}=\begin{bNiceArray}{rrr}
+ 1&-4&-3\\1&-5&-3\\-1&6&4
+ \end{bNiceArray}.
+\end{equation}
+The determinant of $\mathbf{A}$ can be calculated as
+\begin{equation}
+ \mathrm{det}(\mathbf{A})=2\times\begin{vNiceArray}{rr}
+ -1&0\\2&1
+ \end{vNiceArray}-2\times\begin{vNiceArray}{rr}
+ 1&0\\-1&1
+ \end{vNiceArray}+3\times\begin{vNiceArray}{rr}
+ 1&-1\\-1&2
+ \end{vNiceArray}=2\times(-1)-2\times 1+3\times 1=-1.
+\end{equation}
+
+\subproblem{}
+As is shown in Eq.~\eqref{eq:3-3}, $\mathbf{A}$ is invertible and with the result in Eq.~\eqref{eq:3-4-inv}
+\begin{equation}
+ \mathbf{x}=\mathbf{A}^{-1}\mathbf{b}=
+ \begin{bNiceArray}{rrr}
+ 1&-4&-3\\1&-5&-3\\-1&6&4
+ \end{bNiceArray}
+ \begin{bNiceArray}{r}
+ 1\\-1\\2
+ \end{bNiceArray}=
+ \begin{bNiceArray}{r}
+ -1\\0\\1
+ \end{bNiceArray},
+\end{equation}
+and it is exactly the same result with Eq.~\eqref{eq:3-1}.
+
+\subproblem{}
+The inner product
+\begin{equation}
+ \langle\mathbf{x},\mathbf{b}\rangle=\mathbf{x}^T\mathbf{b}=1\times 1+0\times(-1)+1\times 2=1,
+\end{equation}
+and the outer product is
+\begin{equation}
+ \mathbf{x}\otimes\mathbf{b}=\mathbf{x}\mathbf{b}^T=
+ \begin{bNiceArray}{r}
+ -1\\0\\1
+ \end{bNiceArray}
+ \begin{bNiceArray}{rrr}
+ 1&-1&2
+ \end{bNiceArray}=
+ \begin{bNiceArray}{rrr}
+ -1&1&-2\\0&0&0\\1&-1&2
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+$\|\mathbf{b}\|_1=|1|+|-1|+|2|=4,\quad\|\mathbf{b}\|_2=\sqrt{1^2+(-1)^2+2^2}=\sqrt{6},\quad\|\mathbf{b}\|_{\infty}=\max\{|1|,|-1|,|2|\}=2.$
+
+\subproblem{}
+Let $\mathbf{y}=\begin{bNiceArray}{rrr}
+ y_1&y_2&y_3
+\end{bNiceArray}^T$,
+we have
+\begin{equation}
+ \mathbf{y}^T\mathbf{Ay}=
+ \begin{bNiceArray}{rrr}
+ y_1&y_2&y_3
+ \end{bNiceArray}
+ \begin{bNiceArray}{rrr}
+ 2&2&3\\1&-1&0\\-1&2&1
+ \end{bNiceArray}
+ \begin{bNiceArray}{r}
+ y_1\\y_2\\y_3
+ \end{bNiceArray}=2y_1^2-y_2^2+y_3^2+3y_1y_2+2y_2y_3+2y_1y_3,
+\end{equation}
+and
+\begin{equation}
+ \bigtriangledown_{\mathbf{y}}\mathbf{y}^T\mathbf{Ay}=
+ \begin{bNiceArray}{r}
+ \frac{\partial}{\partial y_1}\mathbf{y}^T\mathbf{Ay} \\[.3em]
+ \frac{\partial}{\partial y_2}\mathbf{y}^T\mathbf{Ay} \\[.3em]
+ \frac{\partial}{\partial y_3}\mathbf{y}^T\mathbf{Ay}
+ \end{bNiceArray}=
+ \begin{bNiceArray}{r}
+ 4y_1+3y_2+2y_3 \\
+ 3y_1-2y_2+2y_3 \\
+ 2y_1+2y_2+2y_3
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+The equation $\mathbf{A}_1\mathbf{x}=\mathbf{b}_1$ can be represented as
+\begin{equation}
+ \begin{bNiceArray}{rrr}
+ 2&2&3\\1&-1&0\\-1&2&1\\-1&2&1
+ \end{bNiceArray}
+ \begin{bNiceArray}{r}
+ x_1\\x_2\\x_3
+ \end{bNiceArray}=
+ \begin{bNiceArray}{r}
+ 1\\-1\\2\\2
+ \end{bNiceArray}.
+\end{equation}
+
+\subproblem{}
+$\mathrm{rank}(\mathbf{A}_1)=3$.
+\begin{proof}
+ On one hand, $\mathrm{rank}(\mathbf{A}_1)\geq\mathrm{rank}(\mathbf{A})=3$ which is shown in Eq.~\eqref{eq:3-3}.
+ On the other hand, $\mathrm{rank}(\mathbf{A}_1)\leq\min\{3,4\}=3$.
+ Therefore, $\mathrm{rank}(\mathbf{A}_1)=3$.
+ We can also find the first three equations are linearly independent while the last equation is actually the same with the third equation which makes it meaningless.
+\end{proof}
+
+\subproblem{}
+Yes.
+\begin{proof}
+ Since $\mathrm{rank}(\mathbf{A}_1)=\|\mathbf{x}\|_0$, i.e. rank of $\mathbf{A}_1$ is equal to the dimension of $\mathbf{x}$, the formula can be solved with a unique solution the same as Eq.~\eqref{eq:3-1}.
+\end{proof}
+
+\end{document}
diff --git a/macros/latex/contrib/seu-ml-assign/seu-ml-assign.cls b/macros/latex/contrib/seu-ml-assign/seu-ml-assign.cls
new file mode 100644
index 0000000000..eedc7c2f0b
--- /dev/null
+++ b/macros/latex/contrib/seu-ml-assign/seu-ml-assign.cls
@@ -0,0 +1,298 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% seu-ml-assign.cls %%
+%% %%
+%% ================================================== %%
+%% %%
+%% Version: 1.0 (2022/03/20) %%
+%% Author: Teddy van Jerry (Wuqiong Zhao) %%
+%% License: MIT LICENSE %%
+%% GitHub Repo: https://tvj.one/ml-tex %%
+%% Compiler: pdflatex, xelatex, lualatex %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{seu-ml-assign}[2022/02/20 SEU Machine Learning Assignment Template]
+
+%% Class and Options
+\def\@@ptsize{10pt} % font size
+\DeclareOption{9pt}{\def\@@ptsize{9pt}}
+\DeclareOption{10pt}{\def\@@ptsize{10pt}}
+\DeclareOption{11pt}{\def\@@ptsize{11pt}}
+\DeclareOption{12pt}{\def\@@ptsize{12pt}}
+\def\@@solutionmode{1} % default as the solution mode
+\DeclareOption{solution}{\def\@@solutionmode{1}} % solution mode
+\DeclareOption{problem}{\def\@@solutionmode{0}} % problem mode
+\ProcessOptions\relax
+\LoadClass[a4paper,onecolumn,\@@ptsize]{article}
+
+%% Page Settings
+\RequirePackage[inner=2.0cm,outer=2.0cm,top=1.2cm,bottom=3.5cm]{geometry}
+\newcommand{\firstfooteradditionalheight}{2em} % additional height for footer on the first page
+\hfuzz=.5em % disable false positive of overfull \hbox
+
+%% Document Propertities
+\global\let\@assignno\@empty
+\global\let\@semester\@empty
+\global\let\@studentID\@empty
+\global\let\@instructor\@empty
+\global\let\@duedate\@empty
+\global\let\@author\@empty
+\newcommand{\assignno}[1]{\gdef\@assignno{#1}} % Assignment Number
+\newcommand{\semester}[1]{\gdef\@semester{#1}} % Semester
+\newcommand{\studentID}[1]{\gdef\@studentID{#1}} % Student ID
+\newcommand{\instructor}[1]{\gdef\@instructor{#1}} % Instructor
+\newcommand{\duedate}[1]{\gdef\@duedate{#1}} % Due Date of the Assignment
+
+%% Fonts and Colors
+\RequirePackage[T1]{fontenc}
+\RequirePackage[usenames,dvipsnames]{xcolor}
+
+%% TikZ Rule
+\RequirePackage{tikz}
+\usetikzlibrary{fadings, calc}
+\newcommand{\tikzrule}[3][]{\tikz{\fill[#1] (0,0) rectangle (#2,#3);}}
+
+%% Sections Settings
+\RequirePackage[explicit]{titlesec} % explained in https://tex.stackexchange.com/a/292307/234654
+% http://mirrors.ctan.org/macros/latex/contrib/titlesec/titlesec.pdf
+\pgfdeclarelayer{background}
+\pgfsetlayers{background,main}
+\global\let\@problempts\@empty
+\newcommand{\problempts}[1]{\gdef\@problempts{#1}} % Points of the Problem
+\newcommand{\problemptsprint}{\ifx\@problempts\@empty\else(\@problempts~points)\fi}
+\newcommand{\sectionheadname}{Problem} % Name for the Section (default as 'Problem')
+% Reference: https://tex.stackexchange.com/a/12269/234654
+\newcommand{\boxedsection}[3][blue!20]{{%
+ \begin{tikzpicture}[inner sep=0pt, inner ysep=0.3ex]
+ \node[anchor=base west] at (0,0) (counter) {#2};
+ \path let \p1 = (counter.base east) in node[anchor=base west, text width={\textwidth-\x1-0.33em}] (content)
+ at ($(counter.base east)+(0.33em,0)$) {#3};
+ \begin{pgfonlayer}{background}
+ \shade[left color=#1,right color=white] let \p1=(counter.north), \p2=(content.north) in
+ (0,{max(\y1,\y2)}) rectangle (content.south east);
+ \end{pgfonlayer}
+ \end{tikzpicture}
+}}
+% \titleformat{<command>}
+% [<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
+\titleformat{\section}%
+ {\Large\bfseries}%
+ {}%
+ {0pt}%
+ {\boxedsection{\sectionheadname{} \thesection:}{#1}}%
+ [%
+ \vspace{-2.1\baselineskip}\hfill{\normalfont\small\problemptsprint}%
+ \problempts{}% clear the problem points
+ ]%
+\newcommand{\setproblem}[1]{\ifx#1\@empty\else\setcounter{section}{#1}\fi} % force the number of problem
+\newcommand{\setsubproblem}[1]{\ifx#1\@empty\else\setcounter{subsection}{#1}\fi} % force the number of subproblem
+\newcommand{\problem}[2][]{\problempts{#1}\section{#2}}%
+\newcommand{\solutionname}{Solution}
+\newcommand{\startsolution}[1][print]{%
+ \setproblem{0}% reset the section counter
+ \def\startsolutionprintoption{print}
+ \def\startsolutionprintuseroption{#1}
+ \ifx\startsolutionprintuseroption\startsolutionprintoption{%
+ {%
+ \fontfamily{LinuxLibertineT-OsF}\selectfont% select font as Linux Libertine
+ \centering\LARGE\scshape%
+ \solutionname{}\\[-0.2em]%
+ }%
+ \noindent%
+ \tikzrule[WildStrawberry, path fading=west]{.5\textwidth}{.2em}% <-- Do not remove this
+ \tikzrule[WildStrawberry, path fading=east]{.5\textwidth}{.2em}
+ }\fi%
+}
+\titlespacing*{\section}{0em}{2.5\baselineskip}{1\baselineskip}
+\titleformat{\subsection}[runin]{\large\bfseries}{}{0pt}{(\arabic{subsection}) #1}%
+\newcommand{\subproblem}[2][]{\subsection[#1]{#2}}
+\titleformat{\subsubsection}[runin]{}{}{0pt}{(\arabic{subsubsection}. #1}
+
+%% Maths Settings
+\RequirePackage{mathtools}
+\RequirePackage{amssymb}
+\RequirePackage{amsthm} % proof environment and others
+\RequirePackage{bm} % \bm command
+\RequirePackage{nicematrix}
+\numberwithin{equation}{section}
+
+%% Code Block Settings
+\RequirePackage{listings}
+\definecolor{dkgreen}{rgb}{0,0.5,0}
+\definecolor{gray}{rgb}{0.5,0.5,0.5}
+\definecolor{mauve}{rgb}{0.58,0,0.82}
+\lstset{
+ numbers=left,
+ frame=tb,
+ aboveskip=3mm,
+ belowskip=3mm,
+ showstringspaces=false,
+ columns=fixed,
+ framerule=1pt,
+ rulecolor=\color{gray!35},
+ backgroundcolor=\color{gray!5},
+ basicstyle={\ttfamily\small},
+ numberstyle=\footnotesize\color{gray},
+ keywordstyle=\bfseries\color{blue},
+ commentstyle=\color{dkgreen},
+ stringstyle=\color{mauve},
+ breaklines=true,
+ breakatwhitespace=true,
+ tabsize=2,
+ extendedchars=false,
+ postbreak=\mbox{\hspace{-1.4em}\textcolor{purple}{$\hookrightarrow$}\space}
+}
+
+%% Captions Settings
+\RequirePackage[font=footnotesize,labelfont=bf]{caption}
+
+%% Color Boxes
+\RequirePackage[many]{tcolorbox}
+\RequirePackage{varwidth}
+\newtcolorbox{fancybox}[2][]{enhanced,skin=enhancedlast jigsaw,
+ attach boxed title to top left={xshift=-4mm,yshift=-0.5mm},
+ fonttitle=\bfseries\sffamily,varwidth boxed title=0.7\linewidth,
+ colbacktitle=blue!45!white,colframe=red!50!black,
+ interior style={top color=blue!10!white,bottom color=red!10!white},
+ boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt},
+ underlay boxed title={
+ \fill[blue!45!white] (title.north west) -- (title.north east)
+ -- +(\tcboxedtitleheight-1mm,-\tcboxedtitleheight+1mm)
+ -- ([xshift=4mm,yshift=0.5mm]frame.north east) -- +(0mm,-1mm)
+ -- (title.south west) -- cycle;
+ \fill[blue!45!white!50!black] ([yshift=-0.5mm]frame.north west)
+ -- +(-0.4,0) -- +(0,-0.3) -- cycle;
+ \fill[blue!45!white!50!black] ([yshift=-0.5mm]frame.north east)
+ -- +(0,-0.3) -- +(0.4,0) -- cycle; },
+ title={#2},#1
+}
+\newtcolorbox{notice}[2][]{enhanced,
+ colframe=blue!50!black,colback=blue!10!white,colbacktitle=blue!5!yellow!10!white,
+ fonttitle=\bfseries,coltitle=black,attach boxed title to top center=
+ {yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=2mm-\tcboxedtitleheight/2},
+ boxed title style={boxrule=0.5mm,
+ frame code={ \path[tcb fill frame] ([xshift=-4mm]frame.west)
+ -- (frame.north west) -- (frame.north east) -- ([xshift=4mm]frame.east)
+ -- (frame.south east) -- (frame.south west) -- cycle; },
+ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
+ -- (interior.north west) -- (interior.north east)
+ -- ([xshift=2mm]interior.east) -- (interior.south east) -- (interior.south west)
+ -- cycle;} },
+ title={#2},#1
+}
+
+%% Header and Footer
+\RequirePackage{fancyhdr}
+\RequirePackage[colorlinks=true,urlcolor=blue,linkcolor=purple,citecolor=red]{hyperref}
+\setlength{\headheight}{52pt}
+\setlength{\marginparwidth}{2cm}
+\pagestyle{fancy}
+\lhead{
+ \fontfamily{LinuxLibertineT-OsF}\selectfont
+ \if\@@solutionmode1
+ \textsc{\@title~\@assignno} -- \@studentID~\@author
+ \else
+ \textsc{Machine Learning \@title~\@assignno}
+ \fi
+}
+
+\rhead{\thepage}
+\renewcommand\headrule{\vspace{-0.7em}\tikzrule[BrickRed, path fading=east]{.5\textwidth}{0.3mm}}
+\cfoot{}
+% header and footer style for the first page
+\fancypagestyle{firstpage}{
+ \renewcommand\headrule{}
+ \lhead{}
+ \rhead{}
+ \cfoot{
+ \fontfamily{LinuxLibertineT-OsF}\selectfont
+ \vspace*{-\firstfooteradditionalheight}
+ \vspace{-1.5em}
+ \tikzrule[purple, path fading=west]{.5\textwidth}{.15em}% <-- Do not remove this
+ \tikzrule[purple, path fading=east]{.5\textwidth}{.15em}
+
+ \footnotesize\centering
+ \if\@@solutionmode1
+ This \MakeLowercase{\@title{}} is due \@duedate{} and the date of submission is \@date.
+ \else
+ This \MakeLowercase{\@title{}} is due \textbf{\@duedate{}} and the version of the problem set is \@date.
+ \fi
+
+ % LaTeX template information
+ \LaTeX{} template for this \MakeLowercase{\@title{}} is \textit{SEU-ML-Assign}
+ open source at \href{https://tvj.one/ml-tex}{tvj.one/ml-tex} under the MIT License.
+ E-mail \href{mailto:me@tvj.one}{me@tvj.one} for support.
+ }
+}
+
+%% Title Settings
+\RequirePackage{tabularx}
+\RequirePackage{afterpage}
+\newcommand{\pdftitleadditionalname}{Solution}
+\makeatletter
+\renewcommand\maketitle{
+
+ \if\@@solutionmode0
+ \ifx\@instructor\@empty
+ \let\@instructor\@author % author is the instructor (if not specified)
+ \else
+ \ifx\@author\@empty
+ \let\@author\@instructor % instructor is the author (if not specified)
+ \fi
+ \fi
+ \fi
+
+ \thispagestyle{firstpage}
+ \fontfamily{LinuxLibertineT-OsF}\selectfont % set font as Linux Libertine
+ \enlargethispage{-\firstfooteradditionalheight} % make room for the footer
+ \begin{minipage}{10.5cm}
+ \centering
+ {
+ \fontsize{36}{48}\selectfont
+ \textcolor{Plum}{\scshape Machine Learning}
+ }\\[.5em]
+ {
+ \if\@@solutionmode1
+ \@studentID~\@author
+ \qquad
+ \fi
+ \textit{Instructor:~\@instructor}
+ }
+ \end{minipage}
+ \begin{minipage}{5cm}
+ \vspace{0.7em}
+ \centering
+ {
+ \large
+ \textcolor{BrickRed}{\sffamily \@semester}
+ \vspace{2mm}
+ }
+ \LARGE\@title~{\fontfamily{bch}\selectfont\@assignno}
+ \end{minipage}
+ \\[.3em]
+ \tikzrule[cyan, path fading=east]{\textwidth}{.4em}
+ \vspace{2mm}
+
+ \fontfamily{cmr}\selectfont % Computer Modern
+
+ % Set up document meta data
+ % Note that it should be placed here because
+ % by now \@author and \@title have been set.
+ \hypersetup{
+ pdfauthor={\@author},
+ pdftitle={%
+ \@title~\@assignno~
+ \if\@@solutionmode1
+ \pdftitleadditionalname{}
+ \fi
+ - Machine Learning
+ },
+ pdfsubject={Machine Learning},
+ pdfkeywords={Machine Learning, \@title},
+ pdfcreator={LaTeX with SEU-ML-Assign class},
+ pdfproducer={LaTeX}
+ }
+}
+\makeatother
diff --git a/macros/luatex/generic/luaaddplot/README.md b/macros/luatex/generic/luaaddplot/README.md
new file mode 100644
index 0000000000..ce4f4448e3
--- /dev/null
+++ b/macros/luatex/generic/luaaddplot/README.md
@@ -0,0 +1,34 @@
+luaaddeplot
+===========
+
+Version
+-------
+1.0
+
+Author
+------
+Reinhard Kotucha <a href="mailto:Reinhard.Kotucha@gmx.de">Reinhard.Kotucha@gmx.de</a>
+
+License
+-------
+LPPL v1.3 or any later version.
+
+Description
+-----------
+luaaddplot is an extension to pgfplots which extends the `\addplot`
+macro by a facility which allows modification of data files while they
+are read. With luaaddplot it's not necessary anymore to pre-process
+data files generated by measuring devices with external scripts.
+
+This package can be used with plain LuaTeX or LuaLaTeX.
+
+Installation
+------------
+Copy
+
+`luaaddplot.tex` and `luaaddplot.lua` to `tex/generic/luaaddplot`
+
+and
+
+`luaaddplot.sty` to `tex/latex/luaaddplot`.
+
diff --git a/macros/luatex/generic/luaaddplot/luaaddplot.dtx b/macros/luatex/generic/luaaddplot/luaaddplot.dtx
new file mode 100644
index 0000000000..7d3e4bf8c2
--- /dev/null
+++ b/macros/luatex/generic/luaaddplot/luaaddplot.dtx
@@ -0,0 +1,300 @@
+% \iffalse meta-comment
+%
+% $Id: luaaddplot.dtx 3 2022-03-19 23:12:51Z reinhard $
+%
+%<*driver>
+\documentclass[a4paper,11pt]{ltxdoc}
+\MakeShortVerb{\|}
+
+\advance\textheight by 2\baselineskip
+\usepackage[english]{babel}
+\usepackage{tgpagella}
+\usepackage[dvipsnames]{xcolor}
+\usepackage{parskip}
+\usepackage{siunitx}
+\usepackage[colorlinks,bookmarksopen,bookmarksnumbered]{hyperref}
+\hypersetup{linkcolor=BrickRed}
+
+\author{Reinhard Kotucha}
+\title{\textsf{luaaddplot}}
+\begin{document}
+\maketitle
+\vspace*{1cm}
+
+\begin{abstract}
+ \parindent=0pt \parskip=1ex
+ \noindent The \textsf{pgfplots} package supports plotting data from files.
+ If these files are generated by measuring devices they almost always
+ have to be pre-processed.
+
+ This packge provides a macro |\luaaddplot| which extends the
+ functionality of |\addplot| by an optional argument containing
+ a $\lambda$- expression which is evaluated for each line of the data
+ file.
+
+ The package requires Lua\TeX\ or Lua\LaTeX.
+\end{abstract}
+\vspace*{1cm}
+\tableofcontents
+\vspace*{\fill}
+
+\newpage
+
+\section{Introduction}
+When plotting files generated by measuring devices the data files
+often have to be pre-processed before they can be passed to \textsf{pgfplots}.
+In most cases a header describing the device configuration must be
+removed, column delimiters have to be changed, and units have to be
+scaled (\si{\hertz} to \si{\mega\hertz}, \si{\volt} to
+\si{\micro\volt}, etc\ldots). In some cases more complex operations
+are required.
+
+\subsection{Usage}
+
+\verb| \luaaddplot|\oarg{options}| file "|%
+$\langle$\textit{filename}$\rangle$|"|[|, |$\langle$\textit{$\lambda$-expression}$\rangle$]|;|
+
+Everything between \cs{luaaddplot} and the keyword |file| is passed to
+\cs{addplot}, everything between |file| and the semicolon is
+processed by Lua and valid Lua syntax is required here. You can
+consider code between |file| and the terminating semicolon as
+arguments of a Lua function with braces omitted.
+
+\subsection{Reading the data file}
+
+Data files generated by measuring devices usually have an ASCII
+header describing the settings. These lines are often preceded by
+comment characters but not always. In order to avoid pre-processing
+with another tool, all lines which do not begin with a number are
+ignored.
+
+Different devices use different column delimiters. Therefore tabs,
+colons, semicolons, and commas are replaced by a space. With other
+words, various datafile formats are converted to a format specified by
+\textsc{Matlab}.
+
+\subsection{\texorpdfstring{$\lambda$}{lambda}-Expressions}
+
+A $\lambda$-expression is an anonymous function and looks like this:
+\begin{verbatim}
+ function (a)
+ return a[1], a[2]
+ end
+\end{verbatim}
+
+The formal parameter |a| (its name can be chosen arbitrarily) is
+replaced by an ordered list of columns for each line in the data file.
+The return values are the $x$ and $y$ values to be plotted and are
+passed to \cs{addplot}. Always two values must be returned. Please
+note that the index of the first column is 1 in Lua and not 0, as in
+many other programming languages.
+
+In the example above the first and second column of the data file
+will be plotted. This is the default if the $\lambda$-expression is
+omitted.
+
+\newpage
+
+\section{Examples}
+
+\subsection{Scaling}
+
+The following is an excerpt of a data file generated by a spectrum analyzer.
+
+\begin{verbatim}
+x-Unit;Hz;
+y-Unit;dBm;
+Preamplifier;OFF;
+Transducer;OFF;
+Values;501;
+0;43.660163879394531;
+6000000;-53.616184234619141;
+12000000;-60.31707763671875;
+18000000;-62.548038482666016;
+54000000;-66.722061157226563;
+\end{verbatim}
+
+Frequencies are in \si{\hertz} but for the plot we prefer
+\si{\mega\hertz}. The solution is
+\begin{verbatim}
+\luaaddplot[blue] file "spectrum.data", function (col)
+ return col[1]/1e6, col2
+ end;
+\end{verbatim}
+
+
+\subsection{Processing}
+
+The following is an excerpt of a data file generated by a vector
+network analyzer.
+
+\begin{verbatim}
+%% Date: 2021-02-25 11:36:04
+%% Data & Calibration Information:
+%% Trc1:S11(Full One Port)
+%%freq[Hz] re:Trc1_S11 im:Trc1_S11
+6.650000000000000E+008,3.684957681171731E-001,-9.205383204111828E-001,
+6.652500000000000E+008,3.717039523633851E-001,-9.215835251874305E-001,
+6.655000000000000E+008,3.687706454916999E-001,-9.207422307051146E-001,
+6.657500000000000E+008,3.574212650433284E-001,-9.176705980253278E-001,
+6.660000000000000E+008,3.453552411257967E-001,-9.254690887689956E-001,
+\end{verbatim}
+
+The first column denotes the frequency in \si{\hertz}, the second and
+third column denote the real and imaginary part of the impedance
+$s_{11}$ respectively.
+
+Now we want to plot
+\begin{displaymath}
+ 20 \log_{10} \sqrt{(\text{Re\,} s_{11})^2 + (\text{Im\,} s_{11})^2}
+\end{displaymath}
+with frequencies in \si{\mega\hertz}.
+
+The solution is
+\begin{verbatim}
+\luaaddplot[green] file "s11.data",
+ function (col)
+ return col[1]/1e6, 20*math.log10(math.sqrt(col[2]^2 + col[3]^2))
+ end;
+\end{verbatim}
+
+
+\newpage
+\section{Implementation}
+\DocInput{luaaddplot.dtx}
+\end{document}
+%<*tex|sty|lua>
+%</tex|sty|lua>
+
+%</driver>
+% \fi
+% \begin{macrocode}
+%<tex>%% File 'luaaddplot.tex', generated from luaaddplot.dtx'.
+%<sty>%% File 'luaaddplot.sty', generated from luaaddplot.dtx'.
+%<lua>-- File 'luaaddplot.lua', generated from luaaddplot.dtx'.
+%<lua>--[[
+%%
+%% luaaddplot.dtx
+%% Copyright 2022 Reinhard Kotucha <reinhard.kotucha@gmx.net>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Reinhard Kotucha.
+%%
+%% This work consists of the files luaaddplot.dtx and luaaddplot.ins
+%% and the derived files luaaddplot.tex, luaaddplot.sty, and luaaddplot.lua.
+%<lua>--]]
+% \end{macrocode}
+% \subsection{luaaddplot.tex}
+% \begin{macrocode}
+%<*tex>
+\directlua{require('luaaddplot')}
+\def\luaaddplot#1file#2;{
+ \directlua{luaaddplot.opts('#1')luaaddplot.readfile(#2)}}
+%</tex>
+% \end{macrocode}
+% \subsection{luaaddplot.sty}
+% \begin{macrocode}
+%<*sty> \ProvidesPackage{luaaddplot}[2022/03/18/ v1.0]
+\input luaaddplot.tex
+%</sty>
+% \end{macrocode}
+% \subsection{luaaddplot.lua}
+% \begin{macrocode}
+%<*lua>
+
+module('luaaddplot', package.seeall)
+
+% \end{macrocode}
+% \DescribeMacro{readfile()}
+% Read and pre-process file \verb|file| and apply
+% $\lambda$-expression. If the second argument is \verb|nil| the
+% first and second column is returned.
+% \begin{macrocode}
+function readfile (file, lambda)
+% \end{macrocode}
+% Check whether datafile exists.
+% \begin{macrocode}
+ if not lfs.isfile(file) then
+ error('\nERROR: File "'..file..'" not found.')
+ end
+
+ local data = io.open(file)
+
+ for line in data:lines() do
+% \end{macrocode}
+% Remove all spaces at the beginning of a line.
+% \begin{macrocode}
+ line = line:gsub('^%s+', '')
+% \end{macrocode}
+% Ignore all lines which don't begin with a number. All comments
+% and empty lines in data files are ignored.
+% \begin{macrocode}
+ if line:match('^%-?%.?[0-9]') then
+% \end{macrocode}
+% Replace possible non-space delimiters by spaces. This allows to
+% process various datafile formats the same way as \textsc{Matlab}
+% files without manual interaction.
+% \begin{macrocode}
+ line = line:gsub('[\t:;,]', ' ')
+% \end{macrocode}
+% The result must be a table with two columns. If no $\lambda$
+% expression is provided, the first two colums of the data file are
+% returned. With a $\lambda$ expression as second argument arbitrary
+% columns can be selected from a data file and can be pre-processed in
+% any way possible.
+% \begin{macrocode}
+ local a, b
+ local cols = line:explode (' +')
+% \end{macrocode}
+% Convert strings to numbers. Because $\lambda$ expressions can
+% access any column we convert all table entries from strings
+% to numbers, if possible, instead of only the return values.
+% Numbers are returned to \TeX\ as floating point numbers.
+% \begin{macrocode}
+ for i, col in ipairs(cols) do
+ cols[i] = tonumber(cols[i])
+ end
+
+ if lambda then
+ a, b = lambda(cols)
+ if a and b then
+ tex.print(string.format('%g %g', a, b))
+ end
+ else
+ tex.print(string.format('%g %g', cols[1], cols[2]))
+ end
+ end
+ end
+ tex.print('};')
+ data:close()
+end
+% \end{macrocode}
+% \DescribeMacro{opts()}
+% Pass optional arguments from \verb|\luaaddplot| to \verb|\addplot|.
+% \begin{macrocode}
+
+function opts (s)
+ tex.print('\\addplot'..s..' table {')
+end
+
+% </lua>
+% \end{macrocode}
+
+%\endinput
+% Local Variables:
+% mode: LaTeX
+% TeX-master: t
+% TeX-engine: luatex
+% indent-tabs-mode: nil
+% coding: utf-8-unix
+% End:
+% vim:set tabstop=2 expandtab:
diff --git a/macros/luatex/generic/luaaddplot/luaaddplot.ins b/macros/luatex/generic/luaaddplot/luaaddplot.ins
new file mode 100644
index 0000000000..e6258a3a70
--- /dev/null
+++ b/macros/luatex/generic/luaaddplot/luaaddplot.ins
@@ -0,0 +1,19 @@
+
+% $Id: luaaddplot.ins 2 2022-03-19 23:02:47Z reinhard $
+
+\input docstrip
+
+\nopreamble
+\askforoverwritefalse
+
+\usedir{tex/latex/luaaddplot}
+
+ \generate{\file{luaaddplot.sty}{\from{luaaddplot.dtx}{sty}}}
+
+\usedir{tex/generic/luaaddplot}
+
+ \generate{\file{luaaddplot.tex}{\from{luaaddplot.dtx}{tex}}}
+ \nopostamble
+ \generate{\file{luaaddplot.lua}{\from{luaaddplot.dtx}{lua}}}
+
+\endbatchfile
diff --git a/macros/luatex/generic/luaaddplot/luaaddplot.pdf b/macros/luatex/generic/luaaddplot/luaaddplot.pdf
new file mode 100644
index 0000000000..875fac1157
--- /dev/null
+++ b/macros/luatex/generic/luaaddplot/luaaddplot.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexko/ChangeLog b/macros/luatex/generic/luatexko/ChangeLog
index 62e73af1e4..208b56d08c 100644
--- a/macros/luatex/generic/luatexko/ChangeLog
+++ b/macros/luatex/generic/luatexko/ChangeLog
@@ -1,3 +1,10 @@
+2022-03-20 Dohyun Kim <nomos at ktug org>
+
+ Version 3.4
+
+ * luatexko.sty:
+ - do not delay loading of konames-utf.sty
+
2021-07-10 Dohyun Kim <nomos at ktug org>
Version 3.3
diff --git a/macros/luatex/generic/luatexko/README b/macros/luatex/generic/luatexko/README
index fd2b7fd95b..da8e77294c 100644
--- a/macros/luatex/generic/luatexko/README
+++ b/macros/luatex/generic/luatexko/README
@@ -1,4 +1,4 @@
-LuaTeX-ko Package version 3.3 (2021/07/10)
+LuaTeX-ko Package version 3.4 (2022/03/20)
===========================================
This is a Lua(La)TeX macro package that supports typesetting Korean
diff --git a/macros/luatex/generic/luatexko/luatexko-doc.pdf b/macros/luatex/generic/luatexko/luatexko-doc.pdf
index 033ac28c5b..7f2be3cd7b 100644
--- a/macros/luatex/generic/luatexko/luatexko-doc.pdf
+++ b/macros/luatex/generic/luatexko/luatexko-doc.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexko/luatexko-doc.tex b/macros/luatex/generic/luatexko/luatexko-doc.tex
index 8b32a6f49e..deb48a91bd 100644
--- a/macros/luatex/generic/luatexko/luatexko-doc.tex
+++ b/macros/luatex/generic/luatexko/luatexko-doc.tex
@@ -142,7 +142,7 @@
\author{Dohyun Kim \normalsize |<nomos at ktug org>| \and
Soojin Nam \normalsize |<jsunam at gmail com>| \and
\normalsize <\url{http://github.com/dohyunkim/luatexko}>}
-\date{Version 3.3\quad 2021/07/10}
+\date{Version 3.4\quad 2022/03/20}
\maketitle
\begin{quote}
diff --git a/macros/luatex/generic/luatexko/luatexko-normalize.lua b/macros/luatex/generic/luatexko/luatexko-normalize.lua
index 961d581c79..49c076915b 100644
--- a/macros/luatex/generic/luatexko/luatexko-normalize.lua
+++ b/macros/luatex/generic/luatexko/luatexko-normalize.lua
@@ -1,6 +1,6 @@
-- luatexko-normalize.lua
--
--- Copyright (c) 2013-2021 Dohyun Kim <nomos at ktug org>
+-- Copyright (c) 2013-2022 Dohyun Kim <nomos at ktug org>
-- Soojin Nam <jsunam at gmail com>
--
-- This work may be distributed and/or modified under the
@@ -13,8 +13,8 @@
luatexbase.provides_module({
name = "luatexko-normalize",
- version = "3.3",
- date = "2021/07/10",
+ version = "3.4",
+ date = "2022/03/20",
author = "Dohyun Kim, Soojin Nam",
description = "Hangul normalization",
license = "LPPL v1.3+",
diff --git a/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua b/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua
index 1a48a48693..59517fbcc7 100644
--- a/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua
+++ b/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua
@@ -1,6 +1,6 @@
-- luatexko-uhc2utf8.lua
--
--- Copyright (c) 2013-2021 Dohyun Kim <nomos at ktug org>
+-- Copyright (c) 2013-2022 Dohyun Kim <nomos at ktug org>
-- Soojin Nam <jsunam at gmail com>
--
-- This work may be distributed and/or modified under the
@@ -13,8 +13,8 @@
luatexbase.provides_module({
name = "luatexko-uhc2utf8",
- version = "3.3",
- date = "2021/07/10",
+ version = "3.4",
+ date = "2022/03/20",
author = "Dohyun Kim, Soojin Nam",
description = "UHC (CP949) input encoding",
license = "LPPL v1.3+",
diff --git a/macros/luatex/generic/luatexko/luatexko.lua b/macros/luatex/generic/luatexko/luatexko.lua
index 6b82a190f5..b46abe07a2 100644
--- a/macros/luatex/generic/luatexko/luatexko.lua
+++ b/macros/luatex/generic/luatexko/luatexko.lua
@@ -1,6 +1,6 @@
-- luatexko.lua
--
--- Copyright (c) 2013-2021 Dohyun Kim <nomos at ktug org>
+-- Copyright (c) 2013-2022 Dohyun Kim <nomos at ktug org>
-- Soojin Nam <jsunam at gmail com>
--
-- This work may be distributed and/or modified under the
@@ -13,8 +13,8 @@
luatexbase.provides_module {
name = 'luatexko',
- date = '2021/07/10',
- version = '3.3',
+ date = '2022/03/20',
+ version = '3.4',
description = 'typesetting Korean with LuaTeX',
author = 'Dohyun Kim, Soojin Nam',
license = 'LPPL v1.3+',
diff --git a/macros/luatex/generic/luatexko/luatexko.sty b/macros/luatex/generic/luatexko/luatexko.sty
index 0cfb6da6a9..a6d4419d26 100644
--- a/macros/luatex/generic/luatexko/luatexko.sty
+++ b/macros/luatex/generic/luatexko/luatexko.sty
@@ -1,6 +1,6 @@
% luatexko.sty
%
-% Copyright (c) 2013-2021 Dohyun Kim <nomos at ktug org>
+% Copyright (c) 2013-2022 Dohyun Kim <nomos at ktug org>
% Soojin Nam <jsunam at gmail com>
%
% This work may be distributed and/or modified under the
@@ -14,7 +14,7 @@
\ifdefined\luatexkohangulfontattr \endinput\fi
\ifdefined\ProvidesPackage
\NeedsTeXFormat{LaTeX2e}[2021/06/01]
- \ProvidesPackage{luatexko}[2021/07/10 v3.3 typesetting Korean with LuaTeX]
+ \ProvidesPackage{luatexko}[2022/03/20 v3.4 typesetting Korean with LuaTeX]
\RequirePackage{luatexbase}
\RequirePackage{fontspec}[2020/02/03]
\else
@@ -967,12 +967,12 @@
\def\가{가}\def\이{이}\def\라{라}\def\으{으}\def\로{로}%
\def\hellipsis{...}}}{}
\@ifpackageloaded{pxrubrica}{\let\ruby\jruby}{}
- \if@hangul \RequirePackage{konames-utf}\fi
}
% misc
\RequirePackage{kolabels-utf}
\protected\def\hellipsis{\char"2026\char"2026 }
\if@hangul
+ \RequirePackage{konames-utf}
\linespread{1.3888}
\footnotesep=1.3888\footnotesep
\skip\footins=\glueexpr\skip\footins/72*100\relax
diff --git a/macros/luatex/latex/letgut/README.md b/macros/luatex/latex/letgut/README.md
new file mode 100644
index 0000000000..83e3c69e9d
--- /dev/null
+++ b/macros/luatex/latex/letgut/README.md
@@ -0,0 +1,17 @@
+letgut-banner - Support for the banner of the newsletter
+ “La Lettre de GUTenberg”
+=============================================================
+
+About
+-------
+This package automatically draw the banner of the newsletter “La Lettre de
+GUTenberg” with the current main font.
+
+Release
+-------
+2022-03-18 v0.9
+
+Development
+-----------
+Follow development, submit issues, and suggest improvements at
+https://framagit.org/gutenberg/classe-lettre-gut.
diff --git a/macros/luatex/latex/letgut/doc/CHANGELOG.md b/macros/luatex/latex/letgut/doc/CHANGELOG.md
new file mode 100644
index 0000000000..3aa86a9425
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/CHANGELOG.md
@@ -0,0 +1,12 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic
+Versioning](http://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [0.9] - 2022-03-18
+
+### Added First public testing release
diff --git a/macros/luatex/latex/letgut/doc/exemple-nouveautes.pdf b/macros/luatex/latex/letgut/doc/exemple-nouveautes.pdf
new file mode 100644
index 0000000000..276d417350
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/exemple-nouveautes.pdf
Binary files differ
diff --git a/macros/luatex/latex/letgut/doc/latexmkrc b/macros/luatex/latex/letgut/doc/latexmkrc
new file mode 100644
index 0000000000..4f0bd48a74
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/latexmkrc
@@ -0,0 +1,27 @@
+$pdf_mode = 4;
+
+$bibtex_use = 1;
+$bibtex = 'biber %O %B';
+
+$makeindex = 'xindex -c letgut -l "*"';
+
+$quote_filenames = 0;
+
+$clean_ext .= ' synctex.gz* run.xml tex.bak out sta bbl bcf fdb_latexmk run tdo
+ listing *~ lo* xdy vrb ain atfi nav snm thm iny xref db* listing tcbtemp aux
+ idx ind lof lot out toc acn acr alg glg* glo* gls* ins sbl slg sym ist
+ run.xml xdy lol fls unq synctex.gz mw *~ aux bcf frm msk nlg nls ntn tcbtemp
+ thm nav nlo not idx ilg ind lof lot out toc acn acr alg glg glo gls glg2 gls2
+ glo2 sbl slg slo sls sym glsdefs ist run.xml xdy lol fls unq synctex.gz *~
+ listing png tkzfct.gnuplot tkzfct.table mw snm tns sta vrb xref 4ct 4tc idv
+ lg pre tmp *.typo upa' ;
+
+@generated_exts = qw(db* listing tcbtemp aux idx ind lof lot out toc acn acr alg
+glg* glo* gls* ins sbl slg sym ist run.xml xdy lol fls unq synctex.gz mw *~ aux
+bcf frm msk nlg nls ntn tcbtemp thm nav nlo not i dx ind lof lot out toc acn acr
+alg glg glo gls glg2 gls2 glo2 sbl slg slo sls sym glsdefs ist run.xml xdy lol
+fls unq synctex.gz *~ listing png tkzfct.gnuplot tkzfct.table mw snm tns sta
+vrb xref *.typo upa);
+
+push @generated_exts, 'acn', 'acr', 'alg', 'bcf', 'fls', 'gl*', 'sbl*', 'sl*', 'sym*' ;
+
diff --git a/macros/luatex/latex/letgut/doc/letgut-code.pdf b/macros/luatex/latex/letgut/doc/letgut-code.pdf
new file mode 100644
index 0000000000..bf4c676520
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/letgut-code.pdf
Binary files differ
diff --git a/macros/luatex/latex/letgut/doc/letgut-code.tex b/macros/luatex/latex/letgut/doc/letgut-code.tex
new file mode 100644
index 0000000000..347a2a5c79
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/letgut-code.tex
@@ -0,0 +1,3361 @@
+% Created 2022-03-18 ven. 19:02
+% Intended LaTeX compiler: lualatex
+\documentclass{letgut}
+ \setmainfont{KpRoman}
+\setsansfont{KpSans}
+\setmonofont[Scale = MatchLowercase]{RobotoMono}
+\letgutsetup{editorial=false}
+\input{listings-conf}
+\author{Association GUTenberg}
+\date{\today}
+\title{Support for the newsletter “La Lettre GUTenberg”}
+\begin{document}
+
+
+\section{Identification}
+\label{sec:org4c9ba67}
+
+\begin{lstlisting}
+% This is file `letgut.cls',
+% generated with the Emacs Org-babel utility.
+%
+% The original source file is letgut.org
+%
+% -------:| ----------------------------------------------------
+% letgut:| Class for the newsletter “La Lettre GUTenberg”
+% Author:| Association GUTenberg
+% E-mail:| secretariat@gutenberg.eu.org
+% License:| Released under the LaTeX Project Public License
+% | v1.3c or later
+% See:| http://www.latex-project.org/lppl.txt
+%
+% Copyright (C) 1994-2022 by Association GUTenberg
+% <secretariat@gutenberg.eu.org>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License (LPPL), either
+% version 1.3c of this license or (at your option) any later
+% version. The latest version of this license is in the file:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This work is “maintained” (as per LPPL maintenance status)
+% by Association GUTenberg.
+%
+\end{lstlisting}
+
+\section{Debugging}
+\label{sec:org09b0cd2}
+
+\begin{lstlisting}
+% \RequirePackage[
+% , check-declarations
+% , enable-debug
+% , backend=luatex
+% ]{expl3}
+\end{lstlisting}
+
+\section{Implementation}
+\label{sec:orga99a9b5}
+
+These document classes can only be used with \LaTeXe, so we make
+sure that an appropriate message is displayed when another \TeX{}
+format is used.
+
+\begin{lstlisting}
+\NeedsTeXFormat{LaTeX2e}[2020-10-01]
+\end{lstlisting}
+
+We define some constant token lists immediately useful.
+
+\begin{lstlisting}
+\ExplSyntaxOn
+\tl_const:Nn \c__letgut_Lettre_tl { \emph{ Lettre } }
+\tl_const:Nn \c__letgut_gutenberg_tl { GUTenberg }
+\tl_const:Nn \c__letgut_Lettre_gutenberg_tl {
+ \c__letgut_Lettre_tl~\c_space_tl \c__letgut_gutenberg_tl
+}
+\tl_const:Nn \c__letgut_la_lettre_gutenberg_tl {
+ la~ \c__letgut_Lettre_gutenberg_tl
+}
+\tl_const:Nn \c__letgut_La_lettre_gutenberg_tl {
+ \text_titlecase_first:n \c__letgut_la_lettre_gutenberg_tl
+}
+\ExplSyntaxOff
+\end{lstlisting}
+
+Now, we can announce the class name and its version:
+
+\begin{lstlisting}
+\ProvidesExplClass{letgut}
+{2022-03-18}
+{0.9}
+{
+ Class~ for~ the~ newsletter~
+ “\c__letgut_La_lettre_gutenberg_tl”
+}
+\end{lstlisting}
+
+\subsection{Messages}
+\label{sec:org447090b}
+
+We specify the messages come from a class, which is letgut (see
+\url{https://github.com/latex3/latex3/issues/887}).
+
+\begin{lstlisting}
+\prop_gput:Nnn \g_msg_module_type_prop { letgut } { Class }
+\end{lstlisting}
+
+Some messages are declared for future use.
+
+\begin{lstlisting}
+\msg_new:nnn{letgut}{Wrong~engine}{
+ The~ letgut~ class~ requires~ LuaTeX.\\\\
+ You~ must~ change~ your~ typesetting~ engine~ to~
+ “lualatex”~ instead~ of~ “latex”~ or~ “pdflatex”
+ or~ “xelatex”.
+}
+\msg_new:nnn{letgut}{Existing~command}{
+ The~ command~ \c_backslash_str \text_lowercase:n{#1}~
+ already~ exists~ and~ has~ not~ be~ overwritten~ by~
+ \token_to_str:N \letgutacro{#1}{...}.~
+ The~ corresponding~ acronym~ has~ to~ be~ used~ e.g.~
+ like~ this:~
+ \token_to_str:N \ac{ \text_lowercase:n{#1} }.
+}
+\msg_new:nnn{letgut}{Not~month~iso~date}{
+ The~ supplied~ date~(“#1”)~ isn't~ at~ the~ month~ iso~
+ date~ format~ (YYYY-MM):~ it~ will~ be~ printed~ as~
+ it~ is.
+}
+\msg_new:nnn{letgut}{Banner~file~not~provided}{
+ No~ `\c__letgut_banner_file_tl.pdf'~ file~ provided:~
+ the~ banner~ will~ be~ automatically~ created.
+}
+\msg_new:nnn{letgut}{Editorial~file~missing}{
+ File~`\c__letgut_editorial_file_tl.tex'~missing!~
+ The~ editorial~ will~ be~ missing.
+}
+\msg_new:nnn{letgut}{Informations~file~missing}{
+ File~ `\c__letgut_informations_gutenberg_file_tl.tex'~
+ missing!~ The~ informations~ about~
+ \c__letgut_gutenberg_tl\c_space_tl~ will~ be~ missing.
+}
+\msg_new:nnn{letgut}{pagecolor~inoperative~with~paper~option}{
+ The~ `pagecolor=#1`~ option~ is~ inoperative~ with~ the~ `paper`~
+ option:~ the~ color~ of~ the~ page~ will~ remain~ white.
+}
+\msg_new:nnn{letgut}{frontcover-missing}{
+ You~ didn't~ use~ the~ `frontcover`~ option~ for~ the~
+ bookreview~ “#1”,~ so~ the~ book~ cover~image~ will~ be~ missing:~
+ are~ you~ sure?
+}
+\msg_new:nnn{letgut}{frontcover-file-not-found}{
+ The~ book~ cover~ image~ `#2`~ you~ specified~ via~ the~
+ `frontcover`~ option~ for~ the~ bookreview~ “#1”~ cannot~ be~ found.
+}
+\end{lstlisting}
+
+\subsection{Engine checking}
+\label{sec:org5711d86}
+
+\begin{lstlisting}
+\sys_if_engine_luatex:F {
+ \msg_fatal:nn{letgut}{Wrong~engine}
+}
+\end{lstlisting}
+
+\subsection{Declarations}
+\label{sec:orga63e6a8}
+
+\subsubsection{Booleans}
+\label{sec:orge5b5c6b}
+
+\begin{itemize}
+\item For testing the emptyness of the title.
+\begin{lstlisting}
+\bool_new:N \g__letgut_title_empty_bool
+\end{lstlisting}
+\item For the paper (or not) output.
+\begin{lstlisting}
+\bool_new:N \g__letgut_paper_bool
+\end{lstlisting}
+\item For testing whether we currently are in a footnote or not.
+\begin{lstlisting}
+\bool_new:N \l__letgut_in_footnote_bool
+\end{lstlisting}
+\end{itemize}
+
+\subsubsection{Dimensions}
+\label{sec:org61842b5}
+
+\begin{itemize}
+\item Geometry of the document
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_textheight_dim { 25cm }
+\dim_const:Nn \c__letgut_textwidth_dim { 14cm }
+\dim_const:Nn \c__letgut_lmargin_dim { 5cm }
+\dim_const:Nn \c__letgut_tmargin_dim { 2.92cm }
+% \dim_const:Nn \c__letgut_tmargin_dim { 3cm }
+\dim_const:Nn \c__letgut_head_dim { 0.6cm }
+\dim_const:Nn \c__letgut_headsep_dim { 0.82cm }
+% \dim_const:Nn \c__letgut_headsep_dim { 0.9cm }
+\dim_const:Nn \c__letgut_marginparwidth_dim { 3.74cm }
+\end{lstlisting}
+\item Horizontal offset of the headers and the sections titles:
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_hoffset_dim { 3cm }
+\dim_const:Nn \c__letgut_title_hoffset_dim {
+ -\c__letgut_hoffset_dim
+}
+\dim_const:Nn \c__letgut_subtitle_hoffset_dim {
+ \c__letgut_title_hoffset_dim
+}
+\dim_const:Nn \c__letgut_section_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 1cm
+}
+\dim_const:Nn \c__letgut_subsection_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 1.5cm
+}
+\dim_const:Nn \c__letgut_subsubsection_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 2cm
+}
+\dim_const:Nn \c__letgut_paragraph_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 2.5cm
+}
+\dim_const:Nn \c__letgut_subparagraph_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 3cm
+}
+\end{lstlisting}
+\item Distance between the baseline of the header text and the decorative line:
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_head_rule_skip_dim { 0.115cm }
+\end{lstlisting}
+\item Head rule width:
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_head_rule_width_dim { 0.03cm }
+\end{lstlisting}
+\item Dimensions of the banner.
+\begin{itemize}
+\item Thickness of the “L”.
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_banner_thickness_dim { 4cm }
+\end{lstlisting}
+\item Height of the “L” (that of the text area plus 3cm).
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_banner_height_dim {
+ \c__letgut_textheight_dim
+ +
+ 3cm
+}
+\end{lstlisting}
+\end{itemize}
+\item Height of the membership reminder box.
+\begin{lstlisting}
+\dim_new:N \g__letgut_membership_reminder_box_height_dim
+\end{lstlisting}
+\item Horizontal space for the frontcover in the margin in book reviews.
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_bookreview_frontcover_margin_sep_dim {
+ 4mm
+ }
+\end{lstlisting}
+\item Dimensions used by the listings and the examples.
+\end{itemize}
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_height_mentions_dim { 5mm }
+\dim_const:Nn \c__letgut_from_left_boundingbox_to_text_dim { 5.5mm }
+\dim_const:Nn \c__letgut_number_offset_dim { 1mm }
+\dim_const:Nn \c__letgut_number_sep_dim {
+ \c__letgut_from_left_boundingbox_to_text_dim
+ +
+ \c__letgut_number_offset_dim
+}
+\end{lstlisting}
+
+\subsubsection{Skips (lengths with rubber components)}
+\label{sec:orgbda0ae2}
+
+The following skips, borrowed from the standard classes, are specified in
+\lstinline+ex+ unit, which depends on the font used and hence have to be specified
+after the class has been loaded; in fact, we postpone this at the end of the
+preamble, when the font is specified (thanks to \lstinline+\setmainfont+).
+
+\begin{lstlisting}
+\AddToHook{begindocument/before}{%
+\end{lstlisting}
+
+Before and after:
+
+\begin{itemize}
+\item “titles titles”:
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_title_title_skip
+{
+ 3.5ex plus 1ex minus .2ex
+}
+\skip_const:Nn \c__letgut_after_title_title_skip
+{
+ 2.3ex plus .2ex
+}
+\end{lstlisting}
+\item subtitles titles:
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_subtitle_title_skip
+{
+ \c__letgut_before_title_title_skip
+}
+\skip_const:Nn \c__letgut_after_subtitle_title_skip
+{
+ \c__letgut_after_title_title_skip
+}
+\end{lstlisting}
+\item sections titles:
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_section_title_skip
+{
+ 3.25ex plus 1ex minus .2ex
+}
+\skip_const:Nn \c__letgut_after_section_title_skip
+{
+ 1.5ex plus .2ex
+}
+\end{lstlisting}
+\item subsections titles (identical to the sections ones):
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_subsection_title_skip
+{
+ \c__letgut_before_section_title_skip
+}
+\skip_const:Nn \c__letgut_after_subsection_title_skip
+{
+ \c__letgut_after_section_title_skip
+}
+\end{lstlisting}
+\item paragraphs titles:
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_subsubsection_title_skip
+{
+ 1.5ex plus .5ex minus .2ex
+}
+\skip_const:Nn \c__letgut_after_subsubsection_title_skip
+{
+ 0.75ex plus 0.1ex
+}
+\end{lstlisting}
+\item paragraphs titles (identical to the subsubsection ones):
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_paragraph_title_skip
+{
+ \c__letgut_before_subsubsection_title_skip
+}
+\skip_const:Nn \c__letgut_after_paragraph_title_skip
+{
+ \c__letgut_after_subsubsection_title_skip
+}
+\end{lstlisting}
+\item subparagraphs titles (identical to the paragraph ones):
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_before_subparagraph_title_skip
+{
+ \c__letgut_before_paragraph_title_skip
+}
+\skip_const:Nn \c__letgut_after_subparagraph_title_skip
+{
+ \c__letgut_after_paragraph_title_skip
+}
+\end{lstlisting}
+\end{itemize}
+
+We close the \lstinline+\AddToHook{begindocument/before}+ argument.
+
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+
+\subsubsection{Integers}
+\label{sec:orgb3e9382}
+\begin{lstlisting}
+\int_new:N \g__letgut_ltx_example_int
+\end{lstlisting}
+
+\subsubsection{Strings}
+\label{sec:orgdd18dd8}
+
+\begin{lstlisting}
+\str_new:N \g__letgut_label_ltx_example_str
+\str_new:N \g__letgut_callout_label_ltx_example_str
+\str_const:Nn \c__letgut_label_ltx_example_str {
+ __letgut_label_ltx_example
+}
+\str_const:Nn \c__letgut_callout_label_ltx_example_str {
+ __letgut_callout_label_ltx_example
+}
+\end{lstlisting}
+
+\subsubsection{Token lists}
+\label{sec:orgaf6d8ec}
+
+\begin{enumerate}
+\item Constant ones
+\label{sec:orgb1ea800}
+
+\begin{lstlisting}
+\tl_const:Nn \c__letgut_cahier_tl { \emph{ Cahier } }
+\tl_const:Nn \c__letgut_cahiers_tl {
+ \c__letgut_cahier_tl \emph{ s }
+}
+\tl_const:Nn \c__letgut_tugboat_tl { \emph{ TUGboat } }
+\tl_const:Nn \c__letgut_banner_file_tl { bandeau }
+\tl_const:Nn \c__letgut_editorial_file_tl { editorial }
+\tl_const:Nn \c__letgut_informations_gutenberg_file_tl {
+ informations-gut
+}
+\tl_const:Nn \c__letgut_acronyms_file_tl { letgut-acronyms }
+\tl_const:Nn \c__letgut_local_config_file_tl { localconf }
+\tl_const:Nn \c__letgut_contents_name_tl { Sommaire }
+\tl_const:Nn \c__letgut_draftwatermark_text_tl {
+ \textnormal{Brouillon}
+}
+\tl_const:Nn \c__letgut_membership_reminder_tl {
+ {\LARGE
+ \bfseries
+ Avez-vous~ pensé~ à~ régler~ votre~ cotisation~ ?
+ % \the\year~ ?
+ \par
+ \medskip
+ }
+ Si~ vous~ avez~ oublié,~ ce~ n'est~ ni~ trop~ tard~
+ ni~ difficile~ :
+ \par
+ \url{http://gutenberg.eu.org/?Adherer-en-ligne}
+ \bool_if:NT \g__letgut_informations_bool {
+ \file_if_exist:nT
+ {./\c__letgut_informations_gutenberg_file_tl}{
+ \par
+ Voir~ aussi~ page~ \pageref{letgut_label_adhesions}.
+ }
+ }
+}
+\tl_const:Nn \c__letgut_missing_editorial_tl {
+ Ne~ pas~ omettre~ l'éditorial~ !\\(à~ faire~ figurer~
+ dans~ un~ \file*{\c__letgut_editorial_file_tl.tex}~
+ dans~ le~ dossier~ courant)
+}
+\tl_const:Nn \c__letgut_missing_infomations_tl {
+ Ne~ pas~ omettre~ les~ informations~ sur~
+ \c__letgut_gutenberg_tl{}~ !\\(dans~ un~
+ \file*{\c__letgut_informations_gutenberg_file_tl.tex}~
+ situé~ dans~ le~ dossier~ courant)
+}
+\tl_const:Nn \c__letgut_default_alert_box_color_tl {
+ gray9
+}
+\tl_const:Nn \c__letgut_default_allcolors_links_color_tl
+{
+ teal!60!black
+}
+\end{lstlisting}
+
+\item Variables ones
+\label{sec:org4c5e60d}
+
+\begin{lstlisting}
+\tl_new:N \g__letgut_mark_tl
+\tl_new:N \g__letgut_title_tl
+\tl_new:N \l_letgut_last_name_tl
+\tl_new:N \l_letgut_first_name_tl
+\tl_new:N \l_letgut_title_tl
+\tl_new:N \l__letgut_title_addon_tl
+\tl_new:N \l__letgut_reference_text_tl
+\end{lstlisting}
+\end{enumerate}
+
+\subsubsection{Comma separated lists}
+\label{sec:org158b7a3}
+
+\begin{lstlisting}
+\clist_new:N \g__letgut_pagecolor_clist
+\clist_const:Nn \c__letgut_default_pagecolor_screen_clist
+{1.0, 0.98, 0.94}
+\clist_const:Nn \c__letgut_default_pagecolor_paper_clist
+{1, 1, 1}
+\end{lstlisting}
+
+\subsubsection{Sequences}
+\label{sec:orgaa04440}
+
+\begin{lstlisting}
+\seq_new:N \l__letgut_first_last_names_items_seq
+\end{lstlisting}
+
+\subsection{Class options}
+\label{sec:orgef3017c}
+
+In order to provide class options, we load the \package{l3keys2e} which provides
+\LaTeXe{} option processing using \LaTeX3 keys:
+
+\begin{lstlisting}
+\RequirePackage{l3keys2e}
+\end{lstlisting}
+
+We define the 2 load time options for the target audience:
+
+\begin{itemize}
+\item \lstinline+for-readers+ (the default), for the “normal” “Lettre”,
+\item \lstinline+for-authors+, (only) the author(s) of an article of the “Lettre”.
+\end{itemize}
+
+\begin{lstlisting}
+\keys_define:nn { letgut }
+{
+ , for-readers .bool_gset:N = \g__letgut_for_readers_bool
+ , for-readers .initial:n = { true }
+ , for-readers .default:n = { true }
+ , for-authors .bool_gset_inverse:N = \g__letgut_for_readers_bool
+}
+\ProcessKeysOptions { letgut }
+\end{lstlisting}
+
+\subsection{Class and package loading}
+\label{sec:org464c4b7}
+
+The \letgutcls{} is based on the \lstinline+article+ class. It is by default two sided
+because of the alternating headers, and will by typeset with \lstinline+11pt+ as global
+font size.
+
+\begin{lstlisting}
+\LoadClass[twoside,11pt]{article}
+\end{lstlisting}
+
+We now load some packages.
+
+\begin{itemize}
+\item The \letgutcls{} will have to be used with LuaLaTeX. Hence the font selection
+package for XeLaTeX and LuaLaTeX.
+\begin{lstlisting}
+\RequirePackage{fontspec}
+\end{lstlisting}
+\item For subliminal refinements towards typographical perfection.
+\begin{lstlisting}
+\RequirePackage[
+, stretch=30
+, shrink=25
+, letterspace=150
+]{microtype}
+\end{lstlisting}
+\item Help in implementing paragraph layouts where the paragraphs are separated by
+a vertical space instead of (or in addition to) indenting them.
+\begin{lstlisting}
+\RequirePackage{parskip}
+\end{lstlisting}
+\item Extensive control of page headers and footers in \LaTeXe.
+\begin{lstlisting}
+\RequirePackage{fancyhdr}
+\end{lstlisting}
+\item Flexible and complete interface to document dimensions.
+\begin{lstlisting}
+\RequirePackage[a4paper]{geometry}
+\end{lstlisting}
+\item Enhanced support for graphics.
+\begin{lstlisting}
+\RequirePackage{graphicx}
+\end{lstlisting}
+\item Extending the array and tabular environments.
+\begin{lstlisting}
+\RequirePackage{array}
+\end{lstlisting}
+\item Completely customisable TOCs.
+\begin{lstlisting}
+\RequirePackage{etoc}
+\end{lstlisting}
+\item Control layout of itemize, enumerate, description, and design our own lists.
+\begin{lstlisting}
+\RequirePackage{enumitem}
+\end{lstlisting}
+\item Select alternative section titles.
+\begin{lstlisting}
+\RequirePackage{titlesec}
+\end{lstlisting}
+\item Several logos and ornaments.
+\begin{lstlisting}
+\RequirePackage{fourier-orns}
+\end{lstlisting}
+\item Control float placement.
+\begin{lstlisting}
+\RequirePackage[section,above]{placeins}
+\end{lstlisting}
+\item Sophisticated verbatim text.
+\begin{lstlisting}
+\RequirePackage{fancyvrb}
+\end{lstlisting}
+\item Publication quality tables in \LaTeX{}.
+\begin{lstlisting}
+\RequirePackage{booktabs}
+\end{lstlisting}
+\item Context sensitive quotation facilities.
+\begin{lstlisting}
+\RequirePackage{csquotes}
+\end{lstlisting}
+\item Mathematical tools to use with (and which loads) \package{amsmath}.
+\begin{lstlisting}
+\RequirePackage[fleqn]{mathtools}
+\end{lstlisting}
+\item Better accessibility support for PDF files. This package is used because we
+want the material added to the background (banner on the first page and draft
+watermark) to be not selectable in order to let the reader who wants to copy
+the interesting text be able to select it.
+\end{itemize}
+\begin{lstlisting}
+\RequirePackage{accsupp}
+\end{lstlisting}
+\begin{itemize}
+\item A comprehensive (SI) units package.
+\begin{lstlisting}
+\RequirePackage{siunitx}
+\end{lstlisting}
+\item A collection of logos with bookmark support.
+\begin{lstlisting}
+\RequirePackage{hologo}
+\end{lstlisting}
+\item Driver-independent color extensions.
+\begin{lstlisting}
+\RequirePackage[table]{xcolor}
+\end{lstlisting}
+\item Coloured boxes, for \LaTeX{} examples and theorems, etc.
+\begin{lstlisting}
+\RequirePackage{tcolorbox}
+\end{lstlisting}
+\item Expandable macros to extract the data from references and allow counter
+assignments or calculations.
+\begin{lstlisting}
+\RequirePackage{refcount}
+\end{lstlisting}
+\item Select colors with proper WCAG color contrast.
+\begin{lstlisting}
+\RequirePackage{ninecolors}
+\end{lstlisting}
+\item Typeset tabulars and arrays with LaTeX3 (for the alert boxes typeset as
+simple tabulars).
+\begin{lstlisting}
+\RequirePackage{tabularray}
+\end{lstlisting}
+\item Multilingual support for Plain \TeX{} or \LaTeX{}.
+\begin{lstlisting}
+\RequirePackage[english,french]{babel}
+\end{lstlisting}
+\item Intelligent page references.
+\begin{lstlisting}
+\RequirePackage[nospace,french]{varioref}
+\end{lstlisting}
+\item Macros for Euro sign.
+\begin{lstlisting}
+\RequirePackage[right]{eurosym}
+\end{lstlisting}
+\item Typeset source code listings using \LaTeX{}.
+\begin{lstlisting}
+\RequirePackage{listings}
+\end{lstlisting}
+\item Modifying the layout of floats.
+\begin{lstlisting}
+\RequirePackage{floatrow}
+\end{lstlisting}
+\item Sophisticated Bibliographies in \LaTeX{}.
+\begin{lstlisting}
+\RequirePackage[
+ sorting=none,
+ datamodel=letgut,
+ citestyle=letgut
+]{biblatex}
+\end{lstlisting}
+\item Typeset acronyms.
+\begin{lstlisting}
+\RequirePackage{acro}
+\end{lstlisting}
+\end{itemize}
+
+The following packages have to be the last ones loaded. So we ensure this by
+loading them just before the begining of the document:
+\begin{lstlisting}
+\AddToHook{begindocument/before}{
+\end{lstlisting}
+\begin{itemize}
+\item Extensive support for hypertext in \LaTeX{}
+\begin{lstlisting}
+\RequirePackage{hyperref}
+\end{lstlisting}
+\item Adjusting the anchors of captions
+\begin{lstlisting}
+\RequirePackage[all]{hypcap}
+\end{lstlisting}
+\item Intelligent cross-referencing
+\begin{lstlisting}
+\RequirePackage[french]{cleveref}
+\end{lstlisting}
+\end{itemize}
+We close the \lstinline+\AddToHook{begindocument/before}+ argument.
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+\subsection{Settings for the loaded packages}
+\label{sec:orgbefd239}
+
+\begin{itemize}
+\item We switch to the French typographic conventions for \package{siunitx}.
+\begin{lstlisting}
+\sisetup{
+ , locale=FR
+ , mode=text
+}
+\end{lstlisting}
+\item Concerning floats, we ask:
+\begin{itemize}
+\item the caption text will be justified,
+\item the figures and their captions to be boxed (in order to distiguish them from
+the current text),
+\item the tables to have their captions above them.
+\begin{lstlisting}
+\DeclareMarginSet{hangleft}{
+ \setfloatmargins{\hskip-\c__letgut_hoffset_dim}{\hfil}
+}
+\DeclareFloatVCode{__letgut_ruleabove}{
+ \par\rule{\hsize}{.8pt}\vskip4pt\par
+ }
+\DeclareFloatVCode{__letgut_rulebelow}{
+ \par\vskip2pt\rule{\hsize}{.8pt}\par
+}
+\DeclareFloatStyle{__letgut_ruled}{
+ precode=__letgut_ruleabove,
+ postcode=__letgut_rulebelow,
+ % heightadjust=all,
+ floatwidth=.8\linewidth
+}
+\floatsetup{objectset=justified}
+\floatsetup[figure]{
+ style=__letgut_ruled,
+ margins=hangleft,
+ capposition=beside,
+ capbesideposition={top,left},
+ floatwidth=0.85\textwidth
+}
+\floatsetup[table]{capposition=top}
+\end{lstlisting}
+\end{itemize}
+Moreover, the tables will be entitled \enquote{tableau} instead of
+\enquote{table}.
+\begin{lstlisting}
+\renewcommand*\frenchtablename{Tableau}
+\end{lstlisting}
+\item We fix some defaults for the listings : we define a style for all the listings
+which resets all the \TeX{} control sequences/keywords and then load all the
+basic (La)\TeX{} dialects of \TeX{}. But we start with a dialect which is missing in
+the \package*{listings}.
+\begin{lstlisting}
+\lstdefinelanguage[classes]{TeX}[LaTeX]{TeX}{%
+ % Control sequences
+ moretexcs={%
+ abovecaptionskip,abstractname,appendix,appendixname,
+ arraycolsep,arrayrulewidth,author,backmatter,baselinestretch,
+ belowcaptionskip,bf,bibindent,bibname,bigskipamount,
+ bottomfraction,brokenpenalty,cal,chapter,chaptermark,
+ chaptername,clubpenalty,columnsep,columnseprule,contentsname,
+ date,dblfloatpagefraction,dblfloatsep,dbltextfloatsep,
+ dbltopfraction,descriptionlabel,displaywidowpenalty,
+ doublerulesep,evensidemargin,fboxrule,fboxsep,figurename,
+ floatpagefraction,floatsep,footins,footnoterule,footnotesep,
+ footnotesize,footskip,frontmatter,headheight,headsep,huge,Huge,
+ indexname,indexspace,interlinepenalty,intextsep,it,jot,
+ labelenumi,labelenumii,labelenumiii,labelenumiv,labelitemfont,
+ labelitemi,labelitemii,labelitemiii,labelitemiv,labelsep,
+ labelwidth,large,Large,LARGE,leftmargin,leftmargini,
+ leftmarginii,leftmarginiii,leftmarginiv,leftmarginv,
+ leftmarginvi,lineskip,listfigurename,listoffigures,
+ listoftables,listtablename,mainmatter,maketitle,marginparpush,
+ marginparsep,marginparwidth,maxdepth,medskipamount,mit,
+ newblock,normallineskip,normalsize,oddsidemargin,paragraph,
+ paragraphmark,parindent,parskip,part,partname,partopsep,
+ postdisplaypenalty,predisplaypenalty,refname,rm,sc,scriptsize,
+ section,sectionmark,sf,sl,small,smallskipamount,subitem,
+ subparagraph,subparagraphmark,subsection,subsectionmark,
+ subsubitem,subsubsection,subsubsectionmark,tabbingsep,
+ tabcolsep,tablename,tableofcontents,textfloatsep,textfraction,
+ textheight,textwidth,thechapter,theenumi,theenumii,theenumiii,
+ theenumiv,theequation,theparagraph,thepart,thesection,
+ thesubparagraph,thesubsection,thesubsubsection,tiny,title,
+ today,topfraction,topmargin,topskip,tt,widowpenalty,
+ },%
+ % Keywords of class 1 : keywords that contain other characters
+ % (since of the same class as the ones specified as
+ % 'otherkeywords')
+ morekeywords={%
+ %
+ },%
+ % Keywords of class 2 : environments names
+ morekeywords=[2]{%
+ abstract,description,figure,quotation,quote,table,
+ thebibliography,theindex,titlepage,verse%
+ },%
+ % Keywords of class 3 : mandatory arguments (not environments)
+ % & optional arguments which are keys (in key=value)
+ morekeywords=[3]{%
+ },%
+ % Keywords of class 4 : values of keys (in key=value)
+ morekeywords=[4]{%
+ },%
+ % Keywords of class 5 : arguments specifications (after “:”
+ % in expl3 syntax)
+ morekeywords=[5]{%
+ },%
+ % Keywords of class 6 : current package name (and possibly
+ % derived packages)
+ morekeywords=[6]{%
+ a0poster,aalok,aastex631,abntex2,achemso,acmart,acmconf,
+ active-conf,adfathesis,afparticle,afthesis,aguplus,aiaa-tc,
+ akklecture,akkscript,akktecdoc,akletter,myletter,ametsoc,
+ amsart,amsbook,amsdtx,amsldoc,amsproc,aomart,apa,apa6,
+ apa6e,apa7,arabart,arabbook,arabrep,arabrep1,articleingud,
+ asaetr,ascelike,asmeconf,asmejour,assignment,aucklandthesis,
+ bangorcsthesis,bangorexam,barticle,bbook,bletter,
+ bankstatement,article,book,letter,ltnews,ltxdoc,ltxguide,
+ minimal,proc,report,slides,source2edoc,basque-book,beamer,
+ beamerswitch,beaulivre,beilstein,argetabelle,bewerbung,
+ bgteubner,BHCexam,bitart,bitbook,bjfuthesis,BMSTU-IU8,
+ bookcover,bookest,bookshelf,br-lex,brandeis-dissertation,
+ brandeis-problemset,brandeis-thesis,buctcover,buctthesis,
+ bxjsarticle,bxjsbook,bxjsreport,bxjsslide,cascadilla,cd,
+ cd-cover,articoletteracdp,letteracdp,cesenaexam,cheatsheet,
+ chemmacros-manual,chletter,cje,cnbwp,cnltx-doc,codedoc,
+ colorart,colorbook,combine,cc,ConcProg,confproc,contracard,
+ courseoutline,coursepaper,cquthesis,csbulletin,csbulobalka,
+ csbulv1,ctexart,ctexbeamer,ctexbook,ctexrep,ctxdoc,curve,
+ cv4tw,cweb,idcc,ijdc-v14,ijdc-v9,dinbrief,disser,gost732,
+ dithesis,droit-fr,dtk,dvdcoll,easybook,ebsthesis,agecon,
+ ajae,apecon,ecca,erae,itaxpf,jrurstud,njf,oegatb,pocoec,
+ regstud,worlddev,ecv,einfart,ejpecp,elbioimp,elegantbook,
+ elegantnote,elegantpaper,elpres,cas-dc,cas-sc,elsarticle,
+ elteikthesis,emisa,emulateapj,erdc,eskd,eskdgraph,eskdtab,
+ eskdtext,estcpmm,europasscv,europecv,exam,exam-n,examdesign,
+ exesheet,extarticle,extbook,extletter,extproc,extreport,
+ facsimile,factura,fancyhandout,fancyslides,fbithesis,fcavtex,
+ fdudoc,fduthesis-en,fduthesis,fei,ffslides,fithesis,
+ fithesis2,fithesis3,fithesis4,flacards,flashcards,frletter,
+ g-brief,g-brief2,gaceta,gammas,gatech-thesis,gmdocc,
+ gradstudentresume,grant-afosr,grant-aro,grant-darpa,grant-doe,
+ grant-nih,grant-nrl,grant-nsf,grant-onr,grant,graphpaper,
+ gridslides,gsemthesis,guitartabs,gzt,gztarticle,h2020proposal,
+ hgbarticle,hgbreport,hgbthesis,harnon-cv,hausarbeit-jura,
+ hcart,hcletter,hcreport,hcslides,hecthese,hepthesis,hitec,
+ hithesis,hitreport,hitszthesis,hletter,hpsdiss,fsbispit,
+ huawei,hustthesis,icsv,IEEEconf,IEEEtran,ijmart,ijsra,
+ image-gallery,IMTEKda,inkpaper,invoice-class,iodhbwm,iscram,
+ isov2,isodoc,iwhdp,jacow,jlreq,jmlr,jmlrbook,jnuexam,jpsj2,
+ jura,jurabook,juraovw,juraurtl,kdgcoursetext,kdgmasterthesis,
+ kdpcover,kerntest,kluwer,knittingpattern,scrartcl,scrarticle,
+ scrbook,scrdoc,scrletter,scrlttr2,scrreport,scrreprt,komacv,
+ oblivoir-utf,oblivoir-xl,oblivoir,xoblivoir,ksp-thesis,l3doc,
+ labbook,leadsheet,leaflet,lebhart,lectures,letgut,lettre,limap,
+ limecv,lion-msc,lni,lps,lt3graph-packagedoc,ltxdockit,
+ ltxguidex,abstbook,beletter,flashcard,iagproc,cours,fiche,
+ matapli,matc3mem,mcmthesis,ltxmdf,medstarbeamer,meetingmins,
+ memoir,mensa-tex,mentis,metanorma,milog,minimart,minimbook,
+ mla,mluexercise,mnras,moderncv,modernposter,msu-thesis,
+ mucproc,mugsthesis,muling,musuos,muthesis,third-rep,mwart,
+ mwbk,mwrep,mycv,nature,ncc,nccproc,sibjnm,nddiss2e,
+ ndsu-thesis,newlfm,nih,nihbiosketch,njurepo,nlctdoc,nostarch,
+ nrc1,nrc2,artikel1,artikel2,artikel3,boek,boek3,brief,
+ rapport1,rapport3,nwejm,nwejmart,octavo,onrannual,
+ oup-authoring-template,journal,paper,papertex,pbsheet,pecha,
+ petiteannonce,philosophersimprint,pittetd,pkuthss,plari,play,
+ postcards,powerdot,FUpowerdot,ppr-prv,pracjourn,pressrelease,
+ proposal,reporting,dfgproposal,dfgreporting,euproposal,
+ eureporting,prosper,protocol,prtec,upmgr,wkmgr,pst-doc,
+ ptptex,qcm,quantumarticle,qyxf-book,ReadableCV,recipe,
+ RecipeBook,recipecard,refart,refrep,resphilosophica,revtex4-2,
+ revtex4,revtex4-1,rtklage,ryersonSGSThesis,ryethesis,sageep,
+ sapthesis,schuleab,schulein,schuleit,schulekl,schuleub,
+ schuleue,schullsg,schullzk,schulma-ab,schulma-gutachten,
+ schulma-klausur,schulma-komp,schulma-mdlprf,schulma-praes,
+ schwalbe,sciposter,screenplay,scrjrnl,sdapsclassic,sduthesis,
+ seminar,semproc,sesamanuel,seuthesix,sffms,cassete,etiketka,
+ shtthesis,caesar_book,sides,simplecv,simplivre,skbarticle,
+ skbbeamer,skbbook,skblncsbeamer,skblncsppt,skbmoderncv,skdoc,
+ skeyval-testclass,skrapport,smfart,smfbook,SPhdThesis,spie,
+ sr-vorl,sslides,stage,standalone,usthesis,hwexam,mikoslides,
+ omdoc,smglom,subfiles,suftesi,sugconf,tabriz-thesis,talk,
+ tcldoc,tclldoc,powersem,thesis-ekf,thesis-gwu,thuthesis,
+ tikz-kalender,tikzposter,tlc-article,TOPletter,toptesi,
+ tudabeamer,tudaexercise,tudaleaflet,tudaletter,tudaposter,
+ tudapub,tudasciposter,tudscrartcl,tudscrbook,tudscrdoc,
+ tudscrmanual,tudscrposter,tudscrreprt,tufte-book,tufte-handout,
+ ltugboat,ltugproc,tui,turabian,turabian-researchpaper,
+ turabian-thesis,my-thesis,ua-thesis,uafthesis,
+ uantwerpenbamathesis,uantwerpencoursetext,uantwerpenexam,
+ uantwerpenletter,uantwerpenphdthesis,uantwerpenreport,
+ ucalgmthesis,ucbthesis,ucdavisthesis,ucsmonograph,ucthesis,
+ udesoftec,uebungsblatt,uestcthesis,uhhassignment,uiucredborder,
+ uiucthesis,ulthese,legislation,umich-thesis,umthesis,
+ unam-thesis,unifith,unitn-bimrep,univie-ling-expose,
+ univie-ling-paper,univie-ling-thesis,univie-ling-wlg,
+ unizgklasa,uothesis,UoWthesis,upmethodology-document,URbeamer,
+ URletter,uspatent,ut-thesis,utexasthesis,uwmslide,uwthesis,
+ verifica,webquiz,willowtreebook,withargs-packagedoc,
+ wsemclassic,xduthesis,xebaposter,xmuthesis,xsim-manual,
+ yaletter,yathesis,ycbook,ydoc,york-thesis,
+ },%
+ otherkeywords={},%
+ alsoletter={0123456789-},%
+ alsodigit={},%
+ sensitive%
+}[keywords,tex,comments]%
+\end{lstlisting}
+
+\begin{lstlisting}
+\lstdefinestyle{__letgut_all_reset}{
+ basicstyle=\ttfamily,
+ language=TeX,%
+ texcs={},%
+ keywords={},%
+ keywords=[2]{},%
+ keywords=[3]{},%
+ keywords=[4]{},%
+ keywords=[5]{},%
+ otherkeywords={},%
+ alsoletter={},%
+ alsodigit={},%
+ alsolanguage=[AlLaTeX]TeX,%
+ alsolanguage=[LaTeX]TeX,%
+ alsolanguage=[plain]TeX,%
+ alsolanguage=[common]TeX,%
+ alsolanguage=[primitive]TeX,%
+ alsolanguage=[classes]TeX,%
+\end{lstlisting}
+Because of a current issue involving \package{parskip} and
+\package{listings}
+(\url{https://github.com/FrankMittelbach/fmitex-parskip/issues/3}), we have to
+set the skip below the displayed listings to a zero length.
+\begin{lstlisting}
+belowskip=0pt,
+}
+\lstset{
+ style=__letgut_all_reset
+}
+\end{lstlisting}
+This style is applied automatically at the beginning of each \lstinline+\input+
+file. Hence, the keywords defined in a previous file (by loading some
+peticular (La)\TeX{} dialects, i.e. control sequences and keywords specific to
+some class or packages) won't interfere with the ones of the current file.
+\begin{lstlisting}
+\AddToHook{cmd/input/before}{
+ \lstset{%
+ style=__letgut_all_reset,%
+ }
+}
+\end{lstlisting}
+\item The \lstinline+\printbibliography+ command is redefined in order its \lstinline+heading+ is by
+default set to \lstinline+subbibliography+.
+\begin{lstlisting}
+\NewCommandCopy{\__letgut_old_printbibliography}{
+ \printbibliography
+}
+\RenewDocumentCommand {\printbibliography} { O{} } {
+ \phantomsection
+ \__letgut_old_printbibliography[#1]
+}
+\end{lstlisting}
+ For printing the bibliography, we define two new bibheadings for the
+structure levels \lstinline+\title+ and \lstinline+\subtitle+.
+\begin{lstlisting}
+\defbibheading{title}[\refname]{%
+ \title{#1}}
+\defbibheading{subtitle}[\refname]{%
+ \subtitle{#1}}
+\end{lstlisting}
+\item The acronyms will be typset in footnote, with small caps shape. When they are
+(English) foreign, it will be specified and the translation will be added.
+\begin{lstlisting}
+\acsetup{
+ first-style=footnote,
+ format/short = {\scshape},
+ format/foreign = {\em},
+ foreign/display,
+ locale/format = {\upshape},
+ locale/display,
+}
+\end{lstlisting}
+ Moreover, we redefine the private macro \lstinline+\acro_footnote:n+ of the
+\package*{acro} in order to make the footnotes displaying the long forms of the
+acronyms ended by a period (like ordinary footnotes).
+\begin{lstlisting}
+\cs_undefine:N \acro_footnote:n
+\cs_new_protected:Npn \acro_footnote:n #1
+{
+ \tl_set:Ne \l__acro_tmpa_tl {
+ \l__acro_fnpct_check_tl
+ }
+ \exp_last_unbraced:Nno
+ \footnote {#1.}
+ \l__acro_tmpa_tl
+}
+\end{lstlisting}
+
+The following settings for packages that have to be the last ones loaded are
+also done just before the begining of the document.
+\end{itemize}
+
+\begin{lstlisting}
+\AddToHook{begindocument/before}{
+\end{lstlisting}
+
+\begin{itemize}
+\item We want the hyperlinks to be as unobtrusive as possible.
+\begin{lstlisting}
+\bool_if:NTF \g__letgut_paper_bool {
+ \hypersetup{draft}
+}{
+ \hypersetup{%
+ colorlinks,%
+ allcolors={letgut_allcolors_links},%
+ }%
+}
+\end{lstlisting}
+
+A preset of acronyms is input (if found).
+\begin{lstlisting}
+\file_if_exist:nT {\c__letgut_acronyms_file_tl}{
+ \file_input:n {\c__letgut_acronyms_file_tl}
+}
+\end{lstlisting}
+
+\item Depending on some chosen class options, some packages have to be loaded,
+notably before \package*{hyperref} is loaded, and actions are taken
+accordingly.
+\begin{itemize}
+\item If the `draft` mode (default) is on, we load the \package*{lua-typo} which
+highlights typographical flaws with LuaLaTeX. For the moment,
+
+the \package*{lua-typo} isn't loaded since the `luacolor`
+package it loads
+
+currently does not work well in \lstinline+shipout/background+ (see
+\url{https://github.com/ho-tex/luacolor/issues/4}).
+\begin{lstlisting}
+% % \bool_if:NF \g__letgut_paper_bool {
+\bool_if:NT \g__letgut_draft_bool {
+ % \RequirePackage[All]{lua-typo}
+ \AddToHook{shipout/background}
+ {
+ \__letgut_unselectable:n {
+ \put(0.5\paperwidth,-0.5\paperheight)
+ {
+ \Huge
+\end{lstlisting}
+Currently, we can't use \package{l3color}'s \lstinline+\color_fill:n+\footnote{See \url{https://github.com/ho-tex/luacolor/issues/4\#issuecomment-848774260}.}
+and we have to rely on \package{xcolor}'s \lstinline+\color+.
+\begin{lstlisting}
+% \color_fill:n {black!10}
+\color{black!10}
+\hbox_set:Nn \l_tmpa_box {
+ \fontsize{0.25\paperwidth}{0.3\paperwidth}
+ \selectfont
+ \c__letgut_draftwatermark_text_tl
+}
+\hbox_set:Nn \l_tmpb_box {
+ \hbox_overlap_center:n {
+ \box_use:N \l_tmpa_box
+ }
+}
+\end{lstlisting}
+The draft watermak is rotated in order to be parallely slanted to the first
+diagonal of the page (angle \(=\arctan(\text{paper height}/\text{paper
+ width})\)).
+\begin{lstlisting}
+\box_rotate:Nn \l_tmpb_box {
+ \fp_eval:n {
+ atand (
+ \dim_to_fp:n {\paperheight}
+ /
+ \dim_to_fp:n {\paperwidth}
+ )
+ }
+}
+\box_use:N \l_tmpb_box
+}
+}
+}
+\end{lstlisting}
+ Moreover, we want all the overfull boxes to be shown (as with
+\lstinline+draft+ option of the standard classes).
+\begin{lstlisting}
+\setlength\overfullrule{5pt}
+}
+% % }
+\end{lstlisting}
+\end{itemize}
+\end{itemize}
+
+We close the \lstinline+\AddToHook{begindocument/before}+ argument.
+
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+\subsection{Date handling}
+\label{sec:org5c102e6}
+
+\begin{lstlisting}
+\int_new:N \g__letgut_date_month_int
+\int_new:N \g__letgut_date_year_int
+
+\int_gset:Nn \g__letgut_date_month_int {\the\month}
+\int_gset:Nn \g__letgut_date_year_int {\the\year}
+
+\tl_new:N \g__letgut_date_month_tl
+\tl_new:N \g__letgut_date_tl
+
+\cs_new_protected:Npn \__letgut_date_parse:n #1
+{
+ \__letgut_if_is_iso_date:nTF {#1}
+ {
+ \__letgut_date_parse:www #1 \q_stop
+ }{
+ \msg_term:nnn{letgut}{Not~month~iso~date}{#1}
+ \tl_gset:Nn \g__letgut_date_tl { #1 }
+ }
+}
+
+\prg_new_protected_conditional:Npnn
+\__letgut_if_is_iso_date:n #1 { T, F, TF }
+{
+ \regex_match:nnTF { ^\d{4}-(\d{1,2}) } {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+}
+
+\prg_new_protected_conditional:Npnn
+\__letgut_if_is_int:n #1 { T, F, TF }
+{
+ \regex_match:nnTF { ^[\+\-]?[\d]+$ } {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+}
+
+\cs_new_protected:Npn \__letgut_month_name:n #1
+{
+ % \text_titlecase_first:n {
+ \int_case:nnF
+ { #1 }
+ {
+ { 1 }{ janvier }
+ { 2 }{ février }
+ { 3 }{ mars }
+ { 4 }{ avril }
+ { 5 }{ mai }
+ { 6 }{ juin }
+ { 7 }{ juillet }
+ { 8 }{ août }
+ { 9 }{ septembre }
+ { 10 }{ octobre }
+ { 11 }{ novembre }
+ { 12 }{ décembre }
+ }
+ { Month~ Error! }
+ % }
+}
+
+\cs_new_protected:Npn \__letgut_date_parse:www #1-#2
+\q_stop
+{
+ \int_compare:nTF
+ {
+ \the\year <= #1 <= \the\year+1
+\end{lstlisting}
+
+\begin{lstlisting}
+}{
+ \int_gset:Nn \g__letgut_date_year_int {#1}
+}{
+ \int_gset:Nn \g__letgut_date_year_int {\the\year}
+}
+\__letgut_if_is_int:nTF {#2}
+{
+ \int_compare:nTF
+ {
+ 1 <= #2 <= 12
+\end{lstlisting}
+
+\begin{lstlisting}
+ }
+ {\int_gset:Nn \g__letgut_date_month_int {#2}}
+ {\int_gset:Nn \g__letgut_date_month_int {\the\month}}
+ }{
+ \int_gset:Nn \g__letgut_date_month_int {\the\month}
+ }
+ \tl_gset:Nn \g__letgut_date_month_tl {
+ \__letgut_month_name:n { \g__letgut_date_month_int }
+ }
+ \tl_gset:Nn \g__letgut_date_tl {
+ \tl_use:N \g__letgut_date_month_tl
+ \c_space_tl
+ \int_use:N \g__letgut_date_year_int
+ }
+}
+\end{lstlisting}
+
+\subsection{Page color default settings}
+\label{sec:orgbdbe3de}
+
+By default, the page color will be the one linked to the \lstinline+screen+ option.
+
+\begin{lstlisting}
+\pagecolor[rgb]{\c__letgut_default_pagecolor_screen_clist}
+\clist_set_eq:NN \g__letgut_pagecolor_clist
+ \c__letgut_default_pagecolor_screen_clist
+\end{lstlisting}
+
+\subsection{Options}
+\label{sec:orgc4ef889}
+
+These options look to need to be specified rather at the end (throws an error if
+defined before the \lstinline+\__letgut_date_parse:n+'s definition):
+
+\begin{itemize}
+\item \lstinline+number+ for the number of the issue,
+\item \lstinline+date+ for the date of the issue, either empty (hence the current (month)
+date) or at the format \lstinline+YYYY-MM+ or as free input,
+\item \lstinline+pagecolor+ (relevant only with the (default) \lstinline+screen+ load time option) for
+a color of the page other than the default one,
+\item \lstinline+membership-reminder+ that typesets a membership reminder on the first page,
+\end{itemize}
+
+\begin{lstlisting}
+\keys_define:nn { letgut/setup }
+{
+ , draft .bool_gset:N = \g__letgut_draft_bool
+ , draft .initial:n = { true }
+ , draft .default:n = { true }
+ , final .bool_gset_inverse:N = \g__letgut_draft_bool
+ , number .int_gset:N = \g__letgut_number_int
+ , date .code:n = { \__letgut_date_parse:n { #1 } }
+ , date .initial:x = {\the\year-\the\month}
+ , paper .code:n = {
+ \bool_gset_true:N \g__letgut_paper_bool
+ \pagecolor[rgb]{\c__letgut_default_pagecolor_paper_clist}
+ \clist_set_eq:NN \g__letgut_pagecolor_clist
+ \c__letgut_default_pagecolor_paper_clist
+ }
+ , screen .bool_gset_inverse:N = \g__letgut_paper_bool
+ , pagecolor .initial:V
+ = \c__letgut_default_pagecolor_screen_clist
+ , pagecolor .code:n = {
+ \definecolor{letgut_pagecolor}{rgb}{#1}
+ \AddToHook{begindocument/before}
+ {
+ \bool_if:NTF \g__letgut_paper_bool {
+ \msg_warning:nnn{letgut}{
+ pagecolor~inoperative~with~paper~option
+ }{#1}
+ }{
+ \clist_gset:Nn \g__letgut_pagecolor_clist { #1 }
+ \pagecolor[rgb]{#1}
+ }
+ }
+ }
+ , allcolorslinks .code:n = {
+ \colorlet{letgut_allcolors_links}{#1}}
+ , allcolorslinks .initial:V
+ = \c__letgut_default_allcolors_links_color_tl
+ , membership-reminder .bool_gset:N
+ = \g__letgut_membership_reminder_bool
+ , membership-reminder .initial:n = { true }
+ , editorial .bool_gset:N = \g__letgut_editorial_bool
+ , editorial .initial:n = { true }
+ , informations .bool_gset:N = \g__letgut_informations_bool
+ , informations .initial:n = { true }
+}
+\end{lstlisting}
+
+\subsection{Headers}
+\label{sec:org0244c68}
+
+We now define the headers.
+
+\begin{itemize}
+\item The distance between the baseline of the header text and the decorative line
+in the header is made a little bit bigger.
+\begin{lstlisting}
+\renewcommand{\headruleskip}{
+ \c__letgut_head_rule_skip_dim
+}
+\end{lstlisting}
+\item The decorative line width in the header is made a little bit bigger.
+\begin{lstlisting}
+\renewcommand{\headrulewidth}{
+ \c__letgut_head_rule_width_dim
+}
+\end{lstlisting}
+\item The headers alternate between even and odd pages.
+\begin{lstlisting}
+\fancyhf{}
+\fancyhead[RO,LE]{\thepage}
+\fancyhead[RE,LO]{\g__letgut_mark_tl}
+\end{lstlisting}
+\item The headers are left offset
+\begin{lstlisting}
+\fancyheadoffset[L]{\c__letgut_hoffset_dim}
+\end{lstlisting}
+\item We load the default \package{fancyhdr}'s page style
+\begin{lstlisting}
+\pagestyle{fancy}
+\end{lstlisting}
+\end{itemize}
+
+\subsection{Marginal notes}
+\label{sec:org56c8ec1}
+We want the marginal notes to be in the left margin.
+
+\begin{lstlisting}
+\reversemarginpar
+\end{lstlisting}
+
+\subsection{Table of contents}
+\label{sec:org861e968}
+
+The table of contents is customized:
+
+\begin{itemize}
+\item only the titles of the articles are shown (but the bookmarks have their natural depth):
+\end{itemize}
+\begin{lstlisting}
+\etocsetnexttocdepth{0}
+\end{lstlisting}
+\begin{itemize}
+\item layout:
+\begin{lstlisting}
+\etocsetstyle {section}
+{}
+{\leavevmode\leftskip 2cm\relax}
+{\normalsize%
+ \etocname~\dotfill~\etocpage\par
+}
+{}
+\end{lstlisting}
+\item its title is dropped:
+\end{itemize}
+\begin{lstlisting}
+\renewcommand*\frenchcontentsname{}
+\end{lstlisting}
+
+\subsection{Geometry of the document}
+\label{sec:org282c9ab}
+
+\begin{lstlisting}
+\geometry{
+ asymmetric,
+ textheight=\c__letgut_textheight_dim,
+ textwidth=\c__letgut_textwidth_dim,
+ lmargin=\c__letgut_lmargin_dim,
+ tmargin=\c__letgut_tmargin_dim,
+ head=\c__letgut_head_dim,
+ headsep=\c__letgut_headsep_dim,
+ marginparwidth=\c__letgut_marginparwidth_dim,
+ % verbose,
+ % showframe
+}
+\end{lstlisting}
+
+\subsection{Alert box}
+\label{sec:org1d5f02b}
+
+\begin{lstlisting}
+\cs_new_protected:Nn \__letgut_alert_box:nn
+{
+ \noindent
+ \begin{tblr}{
+ width=\linewidth,
+ rowspec={Q[c,m,#1]},
+ colspec={|
+\end{lstlisting}
+
+\begin{lstlisting}
+ >{\bfseries}X|
+ },
+ vlines,
+ hlines,
+ rowsep=2.5mm,
+ colsep=2.5mm
+ }
+ #2
+ \end{tblr}
+ \skip_vertical:N \c_zero_dim
+}
+\end{lstlisting}
+
+\subsection{“Title” and marks}
+\label{sec:org7f25fee}
+
+We redefine \lstinline+\@title+ in order to make it empty. Hence we can later test if
+the \lstinline+\title+ has been populated by the user (thanks to \lstinline+\title+) and, if so,
+we will (automatically) display on the first page and headers the provided
+title instead of the number and the date (see below).
+\begin{lstlisting}
+\tl_gclear:N \@title
+\end{lstlisting}
+
+At the end of preamble, we put the \lstinline+\@title+ (empty or populated by the
+user) into \lstinline+\g__letgut_@title_str+ for later tests.
+\begin{lstlisting}
+\AddToHook{begindocument/before}
+{
+ \str_set_eq:NN \g__letgut_@title_str \@title
+\end{lstlisting}
+
+The number is added only if it is
+
+\(>0\).
+
+\begin{lstlisting}
+\tl_gset:Nn \g__letgut_title_tl {
+ \int_compare:nNnT
+ \g__letgut_number_int
+\end{lstlisting}
+
+\begin{lstlisting}
+ > \c_zero_int
+ {numéro~ \int_use:N\g__letgut_number_int{}~ --~ }
+ \g__letgut_date_tl
+ }
+ \str_if_empty:NTF \g__letgut_@title_str {
+ \tl_gset:Nn \g__letgut_mark_tl {
+ \textit{\c__letgut_La_lettre_gutenberg_tl}
+ }
+ }{
+ \tl_gset:Nn \g__letgut_mark_tl {
+ \g__letgut_@title_str
+ }
+ }
+ \tl_gput_right:Nn \g__letgut_mark_tl {
+ ,~\g__letgut_title_tl
+ }
+}
+\end{lstlisting}
+
+\subsection{First page handling}
+\label{sec:org30496fe}
+
+The first page is special as it should automatically contain certain elements:
+\begin{itemize}
+\item the banner,
+\item either the number and the date of the issue, or a given title,
+\item the table of contents,
+\item the editorial,
+\item the membership reminder.
+\end{itemize}
+
+The first page is inserted only is the target audience is the readers of the
+Lettre.
+
+\begin{lstlisting}
+\bool_if:NT \g__letgut_for_readers_bool {
+\end{lstlisting}
+
+\begin{lstlisting}
+\file_if_exist:nTF {\c__letgut_banner_file_tl.pdf}{
+ \AddToHookNext{shipout/background}
+ {
+ \begin{picture}(0,0)
+ \put(-2cm,-25.275cm){
+ \includegraphics[scale=0.96]{
+ \c__letgut_banner_file_tl.pdf
+ }
+ }
+ \end{picture}
+ }
+}{
+\end{lstlisting}
+
+The \lstinline+pagecolor+ option is possibly set (with \lstinline+\AddToHook{begindocument/before}+)
+and the page color chosen has to be used for the letters of the banner so the
+following code has to be postponed after the former (hence here
+\lstinline+\AddToHook{begindocument}+ and with \lstinline+\AddToHook{begindocument/before}+).
+
+\begin{lstlisting}
+ \msg_term:nn{letgut}{Banner~file~not~provided}
+ \RequirePackage[pagecolor={\g__letgut_pagecolor_clist}]{
+ letgut-banner
+ }
+}
+\end{lstlisting}
+
+Here starts what is automatically added at the beginning of the document.
+
+\begin{lstlisting}
+\AddToHook{begindocument/end}
+{
+\end{lstlisting}
+
+\begin{itemize}
+\item If a membership reminder is asked, we create an (alert) box containing the
+corresponding text and reduce the textheight of this page of the height of
+this box.
+\begin{lstlisting}
+\bool_if:NT \g__letgut_membership_reminder_bool {
+ \box_new:N \g__letgut_membership_reminder_box
+ \vbox_gset:Nn \g__letgut_membership_reminder_box {
+ \alertbox []{ \c__letgut_membership_reminder_tl }
+ }
+ \dim_gset:Nn
+ \g__letgut_membership_reminder_box_height_dim {
+ \box_ht:N \g__letgut_membership_reminder_box
+ }
+ \enlargethispage{
+ - \g__letgut_membership_reminder_box_height_dim
+ }
+}
+\end{lstlisting}
+\item We want the text on the first page to not encroach on the horizontal bar of
+the banner.
+\begin{lstlisting}
+\dim_const:Nn \c__letgut_first_page_shrink_dim {
+ \c__letgut_banner_thickness_dim
+ +
+ \c__letgut_tmargin_dim
+ +
+ \c__letgut_textheight_dim
+ -
+ .5\paperheight
+ -
+ .5\c__letgut_banner_height_dim
+}
+\enlargethispage{
+ - \c__letgut_first_page_shrink_dim
+}
+\enlargethispage{
+ - \baselineskip
+}
+\end{lstlisting}
+\item If the user has specified a title, we make a (our own) title and use it and
+the possibly provided author(s) for the metadata of the PDF; otherwise we
+display the number and the date of the newsletter.
+\begin{lstlisting}
+\str_if_empty:NTF \g__letgut_@title_str {
+ \bool_gset_true:N \g__letgut_title_empty_bool
+ \begin{flushright}
+ \Huge
+ \text_titlecase_first:n { \g__letgut_title_tl }
+ \end{flushright}
+ \hypersetup{
+ pdftitle={
+ \c__letgut_Lettre_gutenberg_tl
+ \int_compare:nNnT
+ \g__letgut_number_int
+\end{lstlisting}
+\end{itemize}
+
+\begin{lstlisting}
+ > \c_zero_int
+ {
+ \c_space_tl~ \int_use:N \g__letgut_number_int
+ }
+ },
+ pdfauthor={
+ Association~
+ \c__letgut_gutenberg_tl
+ \c_space_tl
+ (éditeur)
+ },
+ }
+ \vspace*{1cm}
+}{
+ \hypersetup{
+ pdftitle={\g__letgut_@title_str}
+ }
+ \tl_if_empty:NF \@author {
+ \hypersetup{
+ pdfauthor={\@author}
+ }
+ }
+\end{lstlisting}
+Here, we insert the title, but don't rely on \lstinline+\maketitle+ because it
+lets to \lstinline+\relax+ the command \lstinline+\title+ which is used later as new sectionning
+levels for the titles of the articles of the Lettre. So we emulate the
+intersting part of the \lstinline+\maketitle+ command (borrowed from \file{article.cls}).
+\begin{lstlisting}
+\null
+\vskip 2em%
+\begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+\end{center}%
+\par
+\vskip 1.5em
+}
+\end{lstlisting}
+\begin{itemize}
+\item No headers on the first page. This has to be inserted after the previous
+(customized) \lstinline+\maketitle+ since this command inserts a \lstinline+\newpage+ which would
+ruin the effort of \lstinline+\thispagestyle{empty}+ if inserted before.
+\begin{lstlisting}
+\thispagestyle{empty}
+\end{lstlisting}
+\item The table of contents is automatically added and has a bookmark entry.
+\begin{lstlisting}
+\pdfbookmark[1]{
+ \c__letgut_contents_name_tl
+}{
+ \c__letgut_contents_name_tl
+}
+\tableofcontents
+\end{lstlisting}
+Should a title be displayed, the table of contents would be added after it,
+followed by a new page (otherwise, if \lstinline+\title+ used after \lstinline+\begin{document}+
+sees its title on the front page, it will overflow onto the banner).
+\begin{lstlisting}
+\bool_if:NTF \g__letgut_title_empty_bool {
+ \vspace*{1.5cm}
+}{
+ \newpage
+}
+\end{lstlisting}
+\item Conditionally to the fact the \lstinline+editorial+ option is not set to \lstinline+false+: if the
+\file*{editorial.tex} of the editorial is found, its content is input and
+has a bookmark entry; otherwise, a warning is displayed.
+\begin{lstlisting}
+\bool_if:NTF \g__letgut_editorial_bool {
+ \file_if_exist:nTF {./\c__letgut_editorial_file_tl}{
+ \RenewDocumentCommand\author{ m } {
+ \__letgut_author:n { #1 }
+ }
+ \pdfbookmark[1]{Éditorial}{
+ \c__letgut_editorial_file_tl
+ }
+ \file_input:n {./\c__letgut_editorial_file_tl}
+ % % \int_set:N \l_tmpa_int {\pagenumber}
+ % % \int_compare:nNnT \l_tmpa_int = 1 { \newpage }
+\end{lstlisting}
+\end{itemize}
+
+\begin{lstlisting}
+ % \if\count{\pagenumber}>1
+ % \else
+ % \newpage
+ % \fi
+ }{
+ \msg_warning:nn{letgut}{Editorial~file~missing}
+ \alertbox{ \c__letgut_missing_editorial_tl }
+ \newpage
+ }
+}{
+ % \newpage
+}
+\end{lstlisting}
+
+We close the \lstinline+\AddToHook{begindocument/end}+ argument.
+
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+Membership reminder.
+
+\begin{lstlisting}
+\AddToHook{begindocument}{
+ \bool_if:NT \g__letgut_membership_reminder_bool {
+ \AddToHookNext{shipout/background}
+ {
+ \put(1in,-1in){
+ \put(
+ \oddsidemargin,
+ - \topmargin
+ - \headheight
+ - \headsep
+ - \textheight
+ + \c__letgut_first_page_shrink_dim
+ + .5\baselineskip
+ ){
+ \box_use:N \g__letgut_membership_reminder_box
+ }
+ }
+ }
+ }
+}
+\end{lstlisting}
+
+\subsection{Last page handling}
+\label{sec:org4d6bc37}
+
+The last page is special: it should automatically contain some informations about
+\gutenberg.
+
+\begin{lstlisting}
+\AddToHook{enddocument}
+{
+\end{lstlisting}
+Conditionally to the fact the \lstinline+informations+ option is not set to \lstinline+false+: if the
+\file*{informations-gut.tex} which contains the informations about
+\gutenberg. Otherwise, a warning is displayed.
+\begin{lstlisting}
+\bool_if:NT \g__letgut_informations_bool {
+ \clearpage
+ \phantomsection
+ \file_if_exist:nTF
+ {./\c__letgut_informations_gutenberg_file_tl}{
+ \file_input:n {./\c__letgut_informations_gutenberg_file_tl}
+ }{
+ \msg_warning:nn{letgut}{Informations~file~missing}
+ \alertbox{ \c__letgut_missing_infomations_tl }
+ }
+}
+\end{lstlisting}
+
+We close the \lstinline+\AddToHook{enddocument}+ argument.
+
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+We close the boolean which tests whether the target audience is the readers or
+the author(s) of the “Lettre”.
+
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+\subsection{Sections, subsections, etc.}
+\label{sec:org4d2fa9d}
+
+\subsubsection{Numbering}
+\label{sec:orge3d86f9}
+We want all the sections to be unnumbered.
+
+\begin{lstlisting}
+\setcounter{secnumdepth}{-10}
+\end{lstlisting}
+
+\subsubsection{Format}
+\label{sec:org36330f3}
+
+\begin{itemize}
+\item We create the new level \lstinline+\title+ for the titles of the articles. They are
+displayed uppercased.
+\begin{lstlisting}
+\AddToHook{begindocument/before}{%
+ \titleclass{\title}{straight}[\part]
+ \titleformat{\title}{
+ \normalfont
+ \LARGE
+ \bfseries
+ \text_uppercase:n
+ }{}{1em}{
+ \aldineleft\c_space_tl
+ }{}
+ \etocsetlevel{title}{0}
+ \def\toclevel@title{0}%
+ \etocsetstyle {title}
+ {}
+ {
+ \leavevmode\leftskip 2cm\relax
+ }
+ {\mdseries\normalsize
+ \etocname
+ \nobreak\leaders\hbox~ to~ 1ex{\hss.}\hfill
+ \etocpage
+ \par}
+ {}
+\end{lstlisting}
+\item We also create the new level \lstinline+\subtitle+ for the subtitles of the
+articles. They are dispayed uppercased (but in a smaller size than \lstinline+\title+).
+\begin{lstlisting}
+\titleclass{\subtitle}{straight}[\title]
+\titleformat{\subtitle}{
+ \normalfont
+ \Large
+ \bfseries
+ \text_uppercase:n
+}{}{1em}{}{}
+\etocsetlevel{subtitle}{1}
+\def\toclevel@subtitle{1}%
+\def\toclevel@subtitle{1}
+\end{lstlisting}
+\item By default (that is when \lstinline+\subtitle+ is not used), the toc levels of the
+sections, subsections, etc. are set to \lstinline+1+, \lstinline+2+, etc. But, when \lstinline+\subtitle+ is
+used, since this level has toc level \lstinline+1+, the toc levels of the sections,
+subsections, etc. have to be set to \lstinline+2+, \lstinline+3+, etc. And this has to be reset
+each time \lstinline+\title+ and \lstinline+\subtitle+ are used.
+\begin{lstlisting}
+\AddToHook{cmd/title/before}{
+ \etocsetlevel{section}{1}
+ \def\toclevel@section{1}%
+ \etocsetlevel{subsection}{2}
+ \def\toclevel@subsection{2}%
+ \etocsetlevel{subsubsection}{3}
+ \def\toclevel@subsubsection{3}%
+ \etocsetlevel{paragraph}{4}
+ \def\toclevel@paragraph{4}%
+ \etocsetlevel{subparagraph}{5}
+ \def\toclevel@subparagraph{5}%
+}
+\AddToHook{cmd/subtitle/before}{
+ \etocsetlevel{section}{2}
+ \def\toclevel@section{2}%
+ \etocsetlevel{subsection}{3}
+ \def\toclevel@subsection{3}%
+ \etocsetlevel{subsubsection}{4}
+ \def\toclevel@subsubsection{4}%
+ \etocsetlevel{paragraph}{5}
+ \def\toclevel@paragraph{5}%
+ \etocsetlevel{subparagraph}{6}
+ \def\toclevel@subparagraph{6}%
+}
+\end{lstlisting}
+
+\begin{itemize}
+\item The (sub)paragraphs have the usual format, except that they are not
+“runin” (\package{titlesec}'s package's terminology).
+\end{itemize}
+\begin{lstlisting}
+ \titleformat{\paragraph}{
+ \normalfont
+ \normalsize
+ \bfseries
+ }{\theparagraph}{1em}{}
+ \titleformat{\subparagraph}{
+ \normalfont
+ \normalsize
+ \bfseries
+ }{\thesubparagraph}{1em}{}
+}
+\end{lstlisting}
+\item We modify the spacing, mainly by shifting the titles in the left margin (the
+rest is borrowed from the standard classes).
+\begin{lstlisting}
+\titlespacing*{\title}
+{\c__letgut_title_hoffset_dim}
+{\c__letgut_before_title_title_skip}
+{\c__letgut_after_title_title_skip}
+\titlespacing*{\subtitle}
+{\c__letgut_subtitle_hoffset_dim}
+{\c__letgut_before_subtitle_title_skip}
+{\c__letgut_after_subtitle_title_skip}
+\titlespacing*{\section}
+{\c__letgut_section_hoffset_dim}
+{\c__letgut_before_section_title_skip}
+{\c__letgut_after_section_title_skip}
+\titlespacing*{\subsection}
+{\c__letgut_subsection_hoffset_dim}
+{\c__letgut_before_subsection_title_skip}
+{\c__letgut_after_subsection_title_skip}
+\titlespacing*{\subsubsection}
+{\c__letgut_subsubsection_hoffset_dim}
+{\c__letgut_before_subsubsection_title_skip}
+{\c__letgut_after_subsubsection_title_skip}
+\titlespacing*{\paragraph}
+{\c__letgut_paragraph_hoffset_dim}
+{\c__letgut_before_paragraph_title_skip}
+{\c__letgut_after_paragraph_title_skip}
+\titlespacing*{\subparagraph}
+{\c__letgut_subparagraph_hoffset_dim}
+{\c__letgut_before_subparagraph_title_skip}
+{\c__letgut_after_subparagraph_title_skip}
+\end{lstlisting}
+\end{itemize}
+
+\subsection{Document commands}
+\label{sec:orga7db03b}
+
+\subsubsection{Setup}
+\label{sec:org35e852f}
+
+We define the command that lets us specify the newsletter setup.
+
+\begin{lstlisting}
+\NewDocumentCommand \letgutsetup { m } {
+ \keys_set:nn { letgut/setup } { #1 }
+}
+\end{lstlisting}
+
+\subsubsection{For the rubric dedicated to new stuffs appeared on \acs{ctan}}
+\label{sec:orga18e077}
+
+\begin{itemize}
+\item We create a new type of list, dedicated to the new stuffs (classes, packages,
+etc.) on CTAN and similar to a description list (except the label provided in
+the optional argument of \lstinline+\item+ is automatically an argument of the
+\lstinline+\package+ command).
+\begin{lstlisting}
+\cs_new_protected:Nn \__letgut_ctan_news_item:n {
+ \package{#1}~:
+}
+\newlist{ctannews}{description}{1}
+\setlist[ctannews]{format=\__letgut_ctan_news_item:n}
+\end{lstlisting}
+The stuffs created by French speaking people are highlighted in a special
+way and, for this, a starred variant of the \lstinline+\item+ command is provided. We
+insert a systematic \lstinline+\phantomsection+ in order the cross-references to such
+items are correct.
+\begin{lstlisting}
+\cs_new_protected:Npn \__letgut_item:nn #1 #2
+{
+ \tl_if_empty:nTF {#2}
+ {
+ \__letgut_old_item
+ }{
+ \__letgut_old_item[#2]
+ }
+ \phantomsection
+ \IfBooleanT {#1}{
+ \mbox{}\marginpar[\mbox{}\hfill\francophony]{}
+ }
+}
+\NewCommandCopy{\__letgut_old_item}{\item}
+\RenewDocumentCommand {\item} { s O{} } {
+ \__letgut_item:nn {#1}{#2}
+}
+\end{lstlisting}
+\end{itemize}
+\begin{itemize}
+\item Command that inserts the \enquote{francophony} logo.
+\begin{lstlisting}
+\NewDocumentCommand {\francophony} { } {
+ \raisebox{-1.5pt}{
+ \includegraphics[width=\f@size pt]{
+ Flag_of_La_Francophonie-crop
+ }
+ }
+}
+\end{lstlisting}
+\end{itemize}
+
+\subsubsection{Persons and authors}
+\label{sec:org73bd77f}
+
+For both persons and authors, the argument of:
+\begin{itemize}
+\item a single individual is given as:
+\begin{itemize}
+\item \meta{Last name}, \meta{First name}
+\item and possibly \meta{Last name}, \meta{First name}, \meta{Title}
+\end{itemize}
+\item multiple individuals, the schemes for each of the individuals are the same of
+a single one, separated by a semicolon.
+\end{itemize}
+
+\begin{lstlisting}
+\NewDocumentCommand {\person} { m } {
+ \__letgut_process_list:n {#1}
+}
+\cs_new_protected:Npn \__letgut_author:n #1
+{
+ \nopagebreak
+ \begin{flushright}
+ \__letgut_process_list:n {#1}
+ \end{flushright}
+}
+\AddToHook{begindocument/end}{%
+ \RenewDocumentCommand\author{ m } {
+ \__letgut_author:n { #1 }
+ }
+}
+\end{lstlisting}
+
+In the following \lstinline+\__letgut_titlecase_name+ control sequence, we parse last and
+first names, splitting and unsplitting them at spaces and dashes (\lstinline+-+) with
+titlecasing in between.
+
+\begin{lstlisting}
+\cs_new_protected:Npn \__letgut_titlecase_name:n #1
+{
+ \seq_set_split:Nnn \l_tmpa_seq { - } {#1}
+ \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \text_titlecase_first:n{ \text_lowercase:n {##1} }
+ }
+ \tl_set:Nx \l_tmpa_tl {\seq_use:Nn \l_tmpb_seq {-}}
+ \seq_clear:N \l_tmpa_seq
+ \seq_set_split:NnV \l_tmpa_seq { ~ } { \l_tmpa_tl }
+ \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \text_titlecase_first:n{##1}
+ }
+ \seq_use:Nn \l_tmpb_seq {~}
+}
+\end{lstlisting}
+
+The following control sequence splits a semi-colon separated list and each item
+is splitted as a comma separated list.
+
+\begin{lstlisting}
+\cs_new_protected:Nn \__letgut_person_last_name:n
+{
+ {\scshape \__letgut_titlecase_name:n {#1}}
+}
+\cs_new_protected:Nn \__letgut_person_first_name_last_name:nn
+{
+ \__letgut_titlecase_name:n {#1}
+ \c_space_tl
+ \__letgut_person_last_name:n {#2}
+}
+\cs_new_protected:Nn
+\__letgut_person_first_name_last_name_title:nnn
+{
+ \__letgut_person_first_name_last_name:nn {#1} {#2}
+ \c_space_tl
+ (#3)
+}
+\seq_new:N \l__letgut_items_seq
+\cs_new_protected:Npn \__letgut_process_list:n #1
+{
+ \seq_clear:N \l__letgut_items_seq
+ \seq_set_split:Nnn \l_tmpa_seq {and} {#1}
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \seq_set_from_clist:Nn \l_tmpb_seq {##1}
+ \seq_pop_left:NN \l_tmpb_seq \l_letgut_last_name_tl
+ \seq_pop_left:NN \l_tmpb_seq \l_letgut_first_name_tl
+ \seq_pop_left:NN \l_tmpb_seq \l_letgut_title_tl
+ \seq_put_right:Nx \l__letgut_items_seq {
+ \quark_if_no_value:NTF \l_letgut_first_name_tl {
+ \__letgut_person_last_name:n {
+ \l_letgut_last_name_tl
+ }
+ }{
+ \quark_if_no_value:NTF \l_letgut_title_tl {
+ \__letgut_person_first_name_last_name:nn
+ {\l_letgut_first_name_tl}
+ {\l_letgut_last_name_tl}
+ }{
+ \__letgut_person_first_name_last_name_title:nnn
+ {\l_letgut_first_name_tl}
+ {\l_letgut_last_name_tl}
+ {\l_letgut_title_tl}
+ }
+ }
+ }
+ }
+ \seq_use:Nnnn \l__letgut_items_seq {
+ \c_space_tl \str_use:N \& \c_space_tl
+ } { ,~ } { \c_space_tl \str_use:N \& \c_space_tl }
+}
+\end{lstlisting}
+
+\subsubsection{Horizontal rule}
+\label{sec:orgc866c8e}
+
+\begin{lstlisting}
+\NewDocumentCommand {\separator} { } {
+ \par
+ \skip_vertical:N 1em
+ \hrule
+ \skip_vertical:N 1em
+}
+\end{lstlisting}
+
+\subsubsection{Alert boxes}
+\label{sec:org7e6600e}
+
+\begin{lstlisting}
+\colorlet {letgut_default_alert_box_color} {
+ \c__letgut_default_alert_box_color_tl
+}
+\NewDocumentCommand \alertbox {
+ O{letgut_default_alert_box_color} +m
+} {
+ \__letgut_alert_box:nn { #1 }{ #2 }
+}
+\end{lstlisting}
+
+\subsubsection{Typesetting of packages, classes, files and softwares.}
+\label{sec:orgaf32b00}
+
+The \lstinline+\c__letgut_httpsprefix_tl+ comes from:
+
+\url{https://github.com/latex3/hyperref/issues/188\#issuecomment-826302843}.
+
+\begin{lstlisting}
+\tl_const:Nx \c__letgut_httpsprefix_tl
+{https\char_generate:nn{58}{12}//}
+\end{lstlisting}
+We define the font switches dediacted to each of packages and classes
+(\TeX{} stuff), files and softwares.
+\begin{lstlisting}
+\tl_new:N \l__letgut__tex_stuff_font_switch_tl
+\tl_new:N \l__letgut_files_font_switch_tl
+\tl_new:N \l__letgut_softwares_font_switch_tl
+\tl_set:Nn \l__letgut__tex_stuff_font_switch_tl {\sffamily}
+\tl_set:Nn \l__letgut_files_font_switch_tl {\ttfamily}
+\tl_set:Nn \l__letgut_softwares_font_switch_tl {\ttfamily}
+\end{lstlisting}
+
+\begin{lstlisting}
+\cs_new_protected:Nn \__letgut_tex_stuff:nn
+{
+ \IfNoValueTF {#1}
+ {
+ \href{
+ \c__letgut_httpsprefix_tl ctan.org/pkg/#2
+ }{
+ {\l__letgut__tex_stuff_font_switch_tl #2}
+ }
+ }{
+ \tl_if_empty:nTF {#1}
+ {
+ {\l__letgut__tex_stuff_font_switch_tl #2}
+ }{
+ \href{#1}{{\l__letgut__tex_stuff_font_switch_tl #2}}
+ }
+ }
+}
+\cs_new_protected:Nn \__letgut_software:nn
+{
+ \tl_if_empty:nTF {#1}
+ {
+ {\l__letgut_softwares_font_switch_tl #2}
+ }{
+ \href{#1}{{\l__letgut_softwares_font_switch_tl #2}}
+ }
+}
+\cs_new_protected:Nn \__letgut_file:n
+{
+ {\l__letgut_files_font_switch_tl #1}
+}
+\NewDocumentCommand{\package}{ s o m O{package} } {
+ \IfBooleanT{#1}{
+ #4
+ \c_space_tl
+ }
+ \__letgut_tex_stuff:nn {#2}{#3}
+}
+\NewDocumentCommand{\class}{ s o m O{classe} } {
+ \IfBooleanT{#1}{
+ #4
+ \c_space_tl
+ }
+ \__letgut_tex_stuff:nn {#2}{#3}
+}
+\NewDocumentCommand{\file}{ s m O{fichier} } {
+ \IfBooleanT{#1}{
+ #3
+ \c_space_tl
+ }
+ \__letgut_file:n {#2}
+}
+\NewDocumentCommand {\software} { s O{} m O{logiciel} } {
+ \IfBooleanT{#1}{
+ #4
+ \c_space_tl
+ }
+ \__letgut_software:nn {#2}{#3}
+}
+\end{lstlisting}
+
+\subsubsection{Names, etc.}
+\label{sec:org45141b1}
+
+\begin{lstlisting}
+ \NewExpandableDocumentCommand { \gutenberg } { } {
+ \c__letgut_gutenberg_tl
+ }
+ \NewExpandableDocumentCommand { \gut } { } {
+ \c__letgut_gutenberg_tl
+ }
+\NewExpandableDocumentCommand { \lettre } { } {
+ \c__letgut_Lettre_tl
+ }
+ \NewExpandableDocumentCommand { \lettregut } { } {
+ \lettre \c_space_tl \gutenberg
+ }
+ \NewExpandableDocumentCommand { \Cahier } { } {
+ \c__letgut_cahier_tl
+ }
+ \NewExpandableDocumentCommand { \Cahiers } { } {
+ \c__letgut_cahiers_tl
+ }
+ \NewExpandableDocumentCommand { \letgut } { } {
+ \class{letgut}
+ }
+ \NewExpandableDocumentCommand { \letgutcls } { } {
+ \class*{letgut}
+ }
+ \NewExpandableDocumentCommand { \tugboat } { } {
+ \c__letgut_tugboat_tl
+ }
+ \NewExpandableDocumentCommand { \knuth } { } {
+ \person{Knuth, Donald~ E.}
+ }
+ \NewExpandableDocumentCommand { \lamport } { } {
+ \person{Lamport, Leslie}
+ }
+\end{lstlisting}
+
+\subsubsection{Foreign locutions}
+\label{sec:org32f4b23}
+
+\begin{lstlisting}
+\cs_new_protected:Npn \__letgut_emphasis:n #1
+{
+ \emph{#1}
+}
+\NewDocumentCommand { \foreignloc } { m } {
+ \__letgut_emphasis:n {#1}
+}
+\NewDocumentCommand { \latinloc } { m } {
+ \__letgut_emphasis:n {#1}
+}
+\end{lstlisting}
+
+\subsubsection{Bookmarks handling}
+\label{sec:org2ee5370}
+
+We disabling some commands when their arguments have to go to bookmarks.
+
+\begin{lstlisting}
+\AddToHook{begindocument/end}{
+ \pdfstringdefDisableCommands{
+ \def\person#1{#1}
+ \def\author#1{#1}
+ \def\package#1{#1}
+ % \def\package*#1{package~#1}
+ \def\class#1{#1}
+ % \def\class*#1{classe~#1}
+ \def\file#1{#1}
+ % \def\file*#1{fichier~#1}
+ \def\software#1{#1}
+ % \def\software*#1{logiciel~#1}
+ \def\foreignloc#1{#1}
+ \def\lettre{Lettre}
+ \def\gutenberg{GUTenberg}
+ \def\gut{\gutenberg}
+ \def\lettregut{\lettre\c_space_tl\gutenberg}
+ \def\Cahier{Cahier}
+ \def\Cahiers{\Cahier s}
+ \def\letgut{letgut}
+ \def\letgutcls{classe~ letgut}
+ \def\knuth{Donald~ E.~ Knuth}
+ \def\lamport{Leslie~ Lamport}
+ \def\latinloc#1{#1}
+ }
+}
+\end{lstlisting}
+
+\subsubsection{Acronyms}
+\label{sec:orgd329484}
+
+The following command let us define acronyms. The arguments are as follows:
+\begin{itemize}
+\item \lstinline+#1+: optional argument that let us override the default settings of this
+command,
+\item \lstinline+#2+: the uppercase version of both the id and the short form of the acronym,
+\item \lstinline+#3+: the long form (in French if \#4 has \lstinline+-NoValue-+, in English otherwise),
+\item \lstinline+#4+: the French translation of an English acronym.
+\end{itemize}
+
+\begin{lstlisting}
+\cs_new_protected:Nn \__letgut_acronym:nnnn
+{
+ \AddToHook{begindocument/before}{
+ \IfValueTF {#4}{
+ \tl_if_empty:nTF {#4}{
+ \exp_args:Nx \DeclareAcronym{\text_lowercase:n {#2}}{
+ short = \text_lowercase:n {#2},
+ sort= #2,
+ long = {\emph{#3}},
+ extra-long = {anglais},
+ pdfstring = #2,
+ short-acc = #2,
+ #1
+ }
+ }{
+ \exp_args:Nx \DeclareAcronym{\text_lowercase:n {#2}}{
+ short = \text_lowercase:n {#2},
+ sort= #2,
+ long = {#4},
+ foreign = {#3},
+ foreign-babel = english,
+ foreign-locale = anglais,
+ pdfstring = #2,
+ short-acc = #2,
+ #1
+ }
+ }
+ }{
+ \exp_args:Nx \DeclareAcronym{\text_lowercase:n {#2}}{
+ short = \text_lowercase:n {#2},
+ sort= #2,
+ long = {#3},
+ pdfstring = #2,
+ short-acc = #2,
+ #1
+ }
+ }
+\end{lstlisting}
+The ⟨id⟩ of the acronym will automatically be the name of a public command
+(\lstinline+\+​⟨id⟩) acting as \lstinline+\ac{id}+.
+\begin{lstlisting}
+\exp_after:wN \cs_if_exist:cT { \text_lowercase:n {#2} } {
+ \msg_note:nnn{letgut}{Existing~command}{#2}
+}
+\exp_args:Nc \ProvideDocumentCommand
+{ \text_lowercase:n {#2} } { s } {
+ \IfBooleanTF {##1}{
+ \exp_args:Nx \acs { \text_lowercase:n {#2} }
+ }{
+ \exp_args:Nx \ac { \text_lowercase:n { #2 } }
+ }
+}
+\end{lstlisting}
+We want the command \lstinline+\+​⟨id⟩ to work also in bookmarks (the resulting string will
+be the uppercased acronym).
+\begin{lstlisting}
+\pdfstringdefDisableCommands
+ {
+ \exp_after:wN
+ \def\cs:w \text_lowercase:n {#2} \cs_end: { #2 }
+ }
+}
+}
+\end{lstlisting}
+
+The first occurrences of the acronyms will be displayed in their short forms,
+with the long ones in footnotes. But what about acronyms whom first occurrences
+arise within footnotes? We want the to be displayed as their short forms
+followed by their the long form in parentheses. For this, we have to add
+a boolean at the beginning (and reversed at the end) of the \lstinline+\footnote+ command
+to know whether we currently are in a footnote or not and display the acronym
+accordingly.
+
+\begin{lstlisting}
+\NewCommandCopy{\__letgut_old_footnote}{\footnote}
+\RenewDocumentCommand {\footnote} { m }{
+ \bool_set_true:N \l__letgut_in_footnote_bool
+ \__letgut_old_footnote { #1 }
+ \bool_set_false:N \l__letgut_in_footnote_bool
+}
+\end{lstlisting}
+We change a bit both the \lstinline+footnote+ acro template, the \lstinline+description+ list
+template, and the macro which prints the locale.
+\begin{lstlisting}
+\DeclareAcroProperty{extra-foreign}
+\DeclareAcroProperty{extra-long}
+\RenewAcroTemplate {footnote}
+{
+ \acrowrite {short}
+ \acroiffirstT
+ {
+\end{lstlisting}
+If we are in a footnote, first occurrences of the acronyms are displayed
+as “short (long)”. Otherwise, they are displayed as “short\footnote{long}”.
+\begin{lstlisting}
+ \bool_if:NTF \l__letgut_in_footnote_bool {
+ \space
+ (
+ \acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ~ }
+ \acroifT {foreign} { \acrowrite {foreign} :~ }
+ \acrowrite {long}
+ \acrogroupcite
+ )
+ }{
+ \acfootnote
+ {
+ \acroifT {alt} {
+ \acrotranslate {or} ~ \acrowrite {alt} :~
+ }
+ \acroifT {foreign} { \acrowrite {foreign} }
+ \acrowrite {long}
+ \acroifT {extra-long} { ~ [\acrowrite {extra-long}] }
+ \acroifT {extra-foreign} {
+ \c_space_tl [\acrowrite {extra-foreign}]
+ }
+ \acrogroupcite
+ }
+ }
+ }
+ }
+ \RenewAcroTemplate[list]{description}{%
+ \acroheading
+ \acropreamble
+ \begin{description}
+ \acronymsmapF{%
+ \item[\acrowrite{short}\acroifT{alt}{/\acrowrite{alt}}]
+ \acroifT{foreign}{
+ \acrowrite{foreign}\acroifT{extra}{, }
+ }%
+ \acroifT{extra}{\acrowrite{extra}}%
+ \acroifanyT{foreign,extra}{\acspace (}%
+ \acrowrite{list}%
+ \acroifT {extra-foreign} {
+ , \c_space_tl \acrowrite {extra-foreign}
+ }
+ \acroifanyT{foreign,extra}{)}%
+ \acropagefill
+ \acropages
+ {\acrotranslate{page}\nobreakspace}
+ {\acrotranslate{pages}\nobreakspace}%
+ }
+ {\item\AcroRerun}
+ \end{description}
+}
+% #1: id
+% #2: property
+% #3: text
+\cs_set_protected:Npn \acro_locale:nnn #1#2#3
+ {
+ \acro_if_foreign:nTF {#2}
+ {
+ \acro_if_locale:nnTF {#1} {#2}
+ {
+ \__acro_foreign_language:en
+ { \str_lowercase:e {
+ \acro_property_get:nn {#1} {foreign-babel}
+ }
+ }
+ {#3}
+ \bool_if:NTF \l__acro_list_bool
+ { \bool_if:NT \l__acro_list_show_locale_bool }
+ { \bool_if:NT \l__acro_show_locale_bool }
+ {
+ {
+ \l__acro_locale_format_tl
+ {
+ \acro_property_if_set:nnTF {#1} {
+ foreign-locale
+ }
+ {
+ \acspace
+ [
+ \acro_property_get:nn {#1} {
+ foreign-locale
+ }
+ ]
+ }{
+ \baselanguage
+ {
+ \acro_property_get:nn {#1} {
+ foreign-babel
+ }
+ }
+ }
+ }
+ }
+ :~
+ }
+ }
+ {#3}
+ }
+ {#3}
+ }
+\end{lstlisting}
+Now, the document command that let the user create acronyms.
+\begin{lstlisting}
+\NewDocumentCommand{\letgutacro}{ O{} m m o }
+{
+ \__letgut_acronym:nnnn {#1} {#2} {#3} {#4}
+}
+\end{lstlisting}
+For printing the acronyms, we define two new heading templates for the structure
+levels \lstinline+\title+ and \lstinline+\subtitle+.
+\begin{lstlisting}
+\NewAcroTemplate[heading] {title}
+ { \title { \acrolistname } }
+\NewAcroTemplate[heading] {subtitle}
+ { \subtitle { \acrolistname } }
+\end{lstlisting}
+We make \lstinline+\letgutacro+ available only in the preamble part of the document
+(otherwise, no warning from \package{acro} but only the long form of the acronym
+is printed when used for the first time with \lstinline+\ac+).
+\begin{lstlisting}
+\@onlypreamble\letgutacro
+\end{lstlisting}
+
+\subsection{Bibliography}
+\label{sec:orgc523238}
+
+We want the \lstinline+\citeauthor+ command to display, not only the last, but the
+full name of the authors.
+
+\begin{lstlisting}
+\NewCommandCopy{\__letgut_old_citeauthor}{
+ \citeauthor
+}
+\RenewDocumentCommand {\citeauthor} { O{} O{} m } {
+ \AtNextCite{\DeclareNameAlias{labelname}{given-family}}
+ \__letgut_old_citeauthor[#1][#2]{#3}
+}
+\end{lstlisting}
+
+\subsection{Book reviews}
+\label{sec:org2fd9b20}
+
+\begin{lstlisting}
+\tl_new:N \g__letgut_bookreview_frontcover_tl
+\tl_new:N \g__letgut_bookreview_bibkey_tl
+\end{lstlisting}
+The keys options are created.
+\begin{lstlisting}
+\keys_define:nn { gzt/bookreview }
+{
+ title .tl_gset:N = \g__letgut_bookreview_title_tl,
+ frontcover .tl_gset:N = \g__letgut_bookreview_frontcover_tl,
+ bibkey .tl_gset:N = \g__letgut_bookreview_bibkey_tl,
+ reviewer .tl_gset:N = \g__letgut_bookreview_reviewer_tl,
+ price .tl_gset:N = \g__letgut_bookreview_price_tl,
+\end{lstlisting}
+
+All these options, when used, must receive a value.
+
+\begin{lstlisting}
+ title .value_required:n = true,
+ frontcover .value_required:n = true,
+ bibkey .value_required:n = true,
+ reviewer .value_required:n = true,
+}
+\end{lstlisting}
+
+We create the new environment for the book reviews.
+
+\begin{lstlisting}
+\cs_generate_variant:Nn \msg_warning:nnn { nnV }
+\cs_generate_variant:Nn \msg_error:nnnn { nnVV }
+\NewDocumentEnvironment{bookreview}{ m }
+{
+ \keys_set:nn { gzt/bookreview } { #1 }
+ \section{\g__letgut_bookreview_title_tl}
+ \tl_if_empty:NTF \g__letgut_bookreview_frontcover_tl {
+ \msg_warning:nnV{letgut}{frontcover-missing}{
+ \g__letgut_bookreview_title_tl
+ }
+ }{
+\end{lstlisting}
+
+We check if the front cover file is available against the list of accepted
+extensions of the \lstinline+graphicx+ package.
+
+\begin{lstlisting}
+ \clist_map_inline:Nn \Gin@extensions {
+ \file_if_exist:nT{\g__letgut_bookreview_frontcover_tl##1}{
+ \bool_set_true:N \l_tmpa_bool
+ \clist_map_break:
+ }
+ }
+ \bool_if:NTF \l_tmpa_bool {
+ \marginpar{
+ \hspace*{\c__letgut_bookreview_frontcover_margin_sep_dim}
+ % \raggedleft
+ \raisebox{-\totalheight}{
+ \fbox{
+ \includegraphics[width=-\c__letgut_title_hoffset_dim]{
+ \g__letgut_bookreview_frontcover_tl
+ }
+ }
+ }
+ }
+ }{
+ \msg_error:nnVV
+ {letgut}
+ {frontcover-file-not-found}
+ {\g__letgut_bookreview_title_tl}
+ {\g__letgut_bookreview_frontcover_tl}
+ }
+ }
+ \noindent
+ \textsf{\fullcite{\g__letgut_bookreview_bibkey_tl}}
+ \tl_if_empty:NF \g__letgut_bookreview_price_tl{
+ .\c_space_tl\EUR{\g__letgut_bookreview_price_tl}
+ }
+ \par
+}{
+ \exp_args:NV \author{\g__letgut_bookreview_reviewer_tl}
+}
+\end{lstlisting}
+
+\subsection{Miscellanous}
+\label{sec:org00f0870}
+
+\begin{itemize}
+\item We specify the possible hyphenations of \enquote{\gutenberg}.
+\end{itemize}
+\begin{lstlisting}
+\hyphenation{GUT-enberg}
+\end{lstlisting}
+
+\subsubsection{Non selectable text}
+\label{sec:org4c4b60b}
+
+We create a control sequence that makes its argument not selectable in the
+PDF. This will be used notably for the line numbers of the listings and the
+watermarks.
+\begin{lstlisting}
+\cs_new_protected:Npn \__letgut_unselectable:n #1
+{
+ \BeginAccSupp{ActualText={}}#1\EndAccSupp{}
+}
+\end{lstlisting}
+
+\subsubsection{Typesetting of code, etc.}
+\label{sec:org61c4abd}
+
+We provide a \lstinline+\meta+ macro that (poorly) mimics the one of the
+\package*{doc}. It is added at the very end of the preamble since other
+package that provide a better definition of this macro may have been loaded
+(e.g. \package{tcolorbox}).
+\begin{lstlisting}
+\colorlet {__letgut_meta} {
+ brown
+}
+\cs_new_protected:Nn \__letgut_meta:nn
+{
+ \bgroup
+ \normalfont
+ \ttfamily
+ \itshape
+ \textcolor{#1}{$\langle$#2$\rangle$}
+ \egroup
+}
+\AddToHook{begindocument/before}{
+ \ProvideDocumentCommand{\meta}{ O{__letgut_meta} m } {
+ \__letgut_meta:nn {#1}{#2}
+ }
+}
+\end{lstlisting}
+
+\subsection{\LaTeX{} listings and examples}
+\label{sec:org371597a}
+
+We first define some colors used in the listings and examples.
+
+\begin{lstlisting}
+\definecolor{__letgut_backgroundCode}{cmyk}{0,0,0,0.04}
+\definecolor{__letgut_borderCode}{cmyk}{0,0,0,0.2}
+\definecolor{__letgut_foregroundLinenumber}{cmyk}{0,0,0,0.5}
+\definecolor{__letgut_foregroundMention}{cmyk}{0,0,0,0}
+\definecolor{__letgut_backgroundResult}{cmyk}{0,0,0,0}
+\end{lstlisting}
+
+We now define the colors for the syntax highlighting and define the style of our
+listings.
+
+\begin{lstlisting}
+\colorlet{__letgut_texcs}{blue}
+\colorlet{__letgut_comment}{gray}
+\colorlet{__letgut_argument-specification-separator}{red}
+\colorlet{__letgut_argument-specification}{cyan}
+\colorlet{__letgut_mandatory-argument}{purple}
+\colorlet{__letgut_environment}{teal}
+\colorlet{__letgut_key}{__letgut_mandatory-argument}
+\colorlet{__letgut_value}{violet}
+\colorlet{__letgut_optional-argument}{__letgut_key}
+\colorlet{__letgut_math}{green!50!black}
+\lstset{%
+ texcsstyle=*\color{__letgut_texcs},
+ commentstyle=\color{__letgut_comment}\itshape,
+ keywordstyle= \color{__letgut_argument-specification-separator},
+ keywordstyle={[2]\color{__letgut_environment}},
+ keywordstyle={[3]\color{__letgut_key}},
+ keywordstyle={[4]\color{__letgut_value}},
+ keywordstyle={[5]\color{__letgut_argument-specification}},
+ keywordstyle={[6]\color{__letgut_key}},
+ escapechar=£,
+ literate=*%
+ {\\\\}{{{\color{__letgut_texcs}\textbackslash\textbackslash}}}{2}%
+ {\\[}{{\textcolor{__letgut_math}{\textbackslash[}}}{2}%
+ {\\]}{{\textcolor{__letgut_math}{\textbackslash]}}}{2}%
+ {$}{{\textcolor{__letgut_math}{\$}}}{1}%$
+}
+\end{lstlisting}
+
+For the listings and examples, we rely on \package*{tcolorbox}, and more
+specifically on some of its libraries.
+
+\begin{lstlisting}
+\tcbuselibrary{listings,xparse,breakable,skins}
+\end{lstlisting}
+
+The functions:
+
+\begin{itemize}
+\item \lstinline+\__letgut_code_result_mention_box:n+ draws the mentions “code” and “résultat”
+in the codes boxes and the possible corresponding results boxes,
+\item \lstinline+\__letgut_title_code_result_box:n+ for the title of codes and the results
+boxes: “Exemple” followed by the number of the example and, if a \lstinline+title addon+
+option is provided, the specified title addon.
+\end{itemize}
+
+\begin{lstlisting}
+\cs_new_protected:Npn \__letgut_code_result_mention_box:nn #1 #2
+{
+ \node[
+ minimum~ width=1cm,
+ minimum~ height=\c__letgut_height_mentions_dim,
+ outer~ sep=auto,
+ anchor=north~ east,
+ fill=__letgut_borderCode
+ ]~ at~ (#1)
+ {
+ \itshape
+ \small
+ \color{__letgut_foregroundMention}
+ \__letgut_unselectable:n {#2}
+ };
+}
+\cs_new_protected:Npn \__letgut_title_code_result_box:n #1
+{
+ Exemple~ \thetcbcounter
+ \tl_if_empty:NF {#1} { \hypersetup{hidelinks} \c_space_tl :~#1 }
+}
+\cs_new_protected:Nn \__letgut_on_callout_page:nn
+{
+ \tl_set:Nn \l_tmpa_int {\getpagerefnumber{#1}}
+ \tl_set:Nn \l_tmpb_int {\thepage}
+ \int_compare:nNnF {\l_tmpa_int} = {\l_tmpb_int}
+ {#2}
+}
+\end{lstlisting}
+
+We define the style of the codes and the results boxes.
+
+\begin{lstlisting}
+\tl_set:Nn \l__letgut_reference_text_tl {
+ Cf.~\vref{\g__letgut_label_ltx_example_str}.
+}
+\tcbset{
+ __letgut_code/.style={
+ listing~ options={
+ % style=tcblatex,
+ numbers=left,
+ numbersep=\c__letgut_number_sep_dim,
+\end{lstlisting}
+We want the line numbers to not be selectable, hence the \lstinline+\__letgut_unselectable:n+:.
+\begin{lstlisting}
+numberstyle=
+ \scriptsize
+ \ttfamily
+ \color{__letgut_foregroundLinenumber}
+ \__letgut_unselectable:n,
+},
+every~ float=\raggedleft,
+colback=__letgut_backgroundCode,
+breakable,
+sharp~ corners,
+boxrule=0.25mm,
+colframe=__letgut_borderCode,
+sidebyside~ align=top~ seam,
+toprule~ at~ break=0mm,
+bottomrule~ at~ break=0mm,
+colbacktitle=__letgut_borderCode,
+fonttitle=\sffamily\bfseries,
+before~ title={
+ \tl_set:Nn \l__letgut__tex_stuff_font_switch_tl {\rmfamily}
+},
+\end{lstlisting}
+We define a custom \package*{tcolorbox}'s \lstinline+title addon+ option that let us
+specify an addon to the title which will added after the automatically
+generated title “Exemple \meta{number}”.
+\begin{lstlisting}
+title~ addon/.store~ in=\l__letgut_title_addon_tl,
+title=\__letgut_title_code_result_box:n {\l__letgut_title_addon_tl},
+\end{lstlisting}
+We define a custom \package*{tcolorbox}'s \lstinline+reference text+ option that let us
+override the text of the reference for the examples with code and result side by
+side that are floating and not being of their call out pages.
+\begin{lstlisting}
+reference~ text/.code={
+ \tl_set:Nn \l__letgut_reference_text_tl {##1}
+},
+\end{lstlisting}
+We define a custom \package*{tcolorbox}'s \lstinline+result width+ option that let us
+specify the width of the result which is \lstinline+\linewidth+ by default.
+\begin{lstlisting}
+result~ width/.store~ in=\l__letgut_result_width_dim,
+result~ width=\linewidth,
+},
+__letgut_code_result/.style={
+ __letgut_code={#1},
+ bicolor,
+ colbacklower=__letgut_backgroundResult,
+ segmentation~ at~ break=false,
+ top=\c__letgut_height_mentions_dim,
+ middle=\c__letgut_height_mentions_dim,
+\end{lstlisting}
+We want the side by side code/result examples to automatically be floating.
+\begin{lstlisting}
+sidebyside@true/.code={%
+ \tcb@sidebysidetrue%
+ \tcb@isbreakablefalse%
+ \pgfkeysalso{floatplacement=ht}%
+ \pgfkeysalso{float}%
+ \pgfkeysalso{label={\g__letgut_label_ltx_example_str}}%
+ \tl_set:Nx \l_tmpa_tl {
+ \getpagerefnumber {
+ \g__letgut_callout_label_ltx_example_str
+ }
+ }
+ \tl_set:Nx \l_tmpb_tl {
+ \getpagerefnumber {
+ \g__letgut_label_ltx_example_str
+ }
+ }
+ \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+ {
+ \l__letgut_reference_text_tl
+ \tl_set:Nn \l__letgut_reference_text_tl {
+ Cf.~\vref{\g__letgut_label_ltx_example_str}.
+ }
+ \pgfkeysalso{
+ drop~ shadow=black,
+ grow~ to~ left~ by=4cm,
+ boxed~ title~ style={sharp~ corners},
+ }
+ \pgfkeysalso{after~ title~ app=\c_space_tl (cf.~page~\thepage)}
+ }
+},%
+overlay={
+ \iftcb@sidebyside
+ \__letgut_code_result_mention_box:nn {segmentation.north} {code}
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {résultat}
+ \else
+ \ifcase\tcbsegmentstate
+ % 0 = Box contains only an upper part
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {code}
+ \or%
+ % 1 = Box contains an upper and a lower part
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {code
+\end{lstlisting}
+
+\begin{lstlisting}
+ \int_compare:nNnT {\thetcbbreakpart} > {1} {~(suite)}
+}
+\__letgut_code_result_mention_box:nn {
+ [yshift=.1mm]segmentation.east
+} {résultat}
+\else%
+% 2 = Box contains only a lower part
+\__letgut_code_result_mention_box:nn {interior.north~ east} {résultat
+\end{lstlisting}
+
+\begin{lstlisting}
+\int_compare:nNnT {\thetcbbreakpart} > {1} {~(suite)}
+}
+\fi
+\fi
+},
+},
+}
+\end{lstlisting}
+
+The \package*{tcolorbox} listings defined below make use of
+\package*{cleveref}'s features. But, since the latter package is loaded
+\lstinline+\AddToHook{begindocument/before}+, the same is needed for these listings.
+
+\begin{lstlisting}
+\AddToHook{begindocument/before}{
+\end{lstlisting}
+
+We now define the environments that let us display:
+
+\begin{enumerate}
+\item only \LaTeX{} code:
+\end{enumerate}
+\begin{lstlisting}
+\DeclareTCBListing[
+ auto~ counter,
+ crefname={exemple}{exemples}
+]{ltx-code}{ !O{} }{%
+ __letgut_code,
+ listing~ only,
+ #1%
+}
+\end{lstlisting}
+\begin{enumerate}
+\item both \LaTeX{} code and its result:
+\begin{enumerate}
+\item ordinary:
+\end{enumerate}
+\end{enumerate}
+\begin{lstlisting}
+\DeclareTCBListing[
+ use~ counter~ from=ltx-code,
+ crefname={exemple}{exemples}
+]{ltx-code-result}{ !O{} }{%
+ __letgut_code_result,
+ #1%
+}
+\end{lstlisting}
+\begin{enumerate}
+\item with the result obtained externally:
+\end{enumerate}
+\begin{lstlisting}
+\DeclareTCBListing[
+ use~ counter~ from=ltx-code,
+ crefname={exemple}{exemples}
+]{ltx-code-external-result}{ O{} m }{%
+ __letgut_code_result,
+ listing~ and~ comment,
+ image~ comment={width=\l__letgut_result_width_dim}{#2},
+ center~ lower,
+ #1%
+}
+\end{lstlisting}
+
+\begin{lstlisting}
+}
+\end{lstlisting}
+
+The examples with code and result side by side will be floating but we want the
+ones being of their call out pages to have before and after them a reduced
+vertical glue (\lstinline+\g__letgut_reduced_intextsep_dim+). Hence we store the original
+glue (\lstinline+\intextsep+) in a custom one (\lstinline+\g__letgut_orig_intextsep_dim+) in order
+to retrieve the original skip for floats other than these ones.
+
+\begin{lstlisting}
+\skip_const:Nn \c__letgut_orig_intextsep_skip {\intextsep}
+\skip_const:Nn \c__letgut_reduced_intextsep_skip {
+ 4\p@ \@plus .667\p@ \@minus .667\p@
+}
+\end{lstlisting}
+
+We now use hooks in order to\ldots{}
+
+\begin{lstlisting}
+\AddToHook{env/ltx-code-result/before}{
+ \int_gincr:N \g__letgut_ltx_example_int
+ \str_set:Nx \g__letgut_label_ltx_example_str {
+ \c__letgut_label_ltx_example_str-
+ \int_use:N \g__letgut_ltx_example_int
+ }
+ \str_set:Nx \g__letgut_callout_label_ltx_example_str {
+ \c__letgut_callout_label_ltx_example_str-
+ \int_use:N \g__letgut_ltx_example_int
+ }
+ \label{\g__letgut_callout_label_ltx_example_str}
+ \tl_set:Nx \l_tmpa_tl {
+ \getpagerefnumber {
+ \g__letgut_callout_label_ltx_example_str
+ }
+ }
+ \tl_set:Nx \l_tmpb_tl {
+ \getpagerefnumber {
+ \g__letgut_label_ltx_example_str
+ }
+ }
+ \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+ {
+ \skip_set_eq:NN \intextsep \c__letgut_reduced_intextsep_skip
+ }
+}
+\end{lstlisting}
+
+\subsection{Local config file}
+\label{sec:org562c2a3}
+
+Each issue of the Lettre requires certain local configurations: configuration
+dedicated to the issue in question, particular packages used in the articles,
+specific configurations of the \package*{listings}, etc. In order to not clutter
+the main \file*{.tex} of the Lettre, a local configuration file named
+\file{localconf.tex}, if present in the current directory, is automatically
+included at the end of the end of the preamble. And since this file is input in
+the current category régime (\lstinline+\ExplSyntaxOn+), a \lstinline+\ExplSyntaxOff+ is
+automatically inserted at its beginning.
+
+\begin{lstlisting}
+\file_if_exist:nT {./\c__letgut_local_config_file_tl}{
+ \AddToHook { file/before/./\c__letgut_local_config_file_tl } {
+ \ExplSyntaxOff
+ }
+ \file_input:n {./\c__letgut_local_config_file_tl}
+}
+\end{lstlisting}
+
+We don't want the book review entry types to be listed in the bibliography
+(they appears only thanks to the \lstinline+bookreview+ environment).
+
+\begin{lstlisting}
+\ExecuteBibliographyOptions[bookreview]{skipbib,skiplab}
+\end{lstlisting}
+
+\begin{lstlisting}
+\endinput
+\end{lstlisting}
+
+\section{(biblatex) Data model}
+\label{sec:org14731c9}
+
+We give the (\package{biblatex}) data model that enriches the default one for
+several purposes:
+\begin{itemize}
+\item the books reviews,
+\item the books advertisements.
+\end{itemize}
+
+\begin{lstlisting}
+\ProvidesFile{letgut.lbx}[2022-03-18 v0.9 letgut localization]
+\InheritBibliographyExtras{french}
+\DeclareBibliographyStrings{
+ inherit = {french},
+ number = {{\no}{\no}},
+ volume = {{volume}{vol\adddot}},
+ volumes = {{volumes}{vol\adddot}},
+}
+\end{lstlisting}
+
+We create the new bibliography driver \lstinline+bookreview+ (that seems to
+create the corresponding new entry).
+
+\begin{lstlisting}
+\ProvidesFile{letgut.dbx}[2022-03-18 v0.9 letgut data model macros]
+\DeclareBibliographyDriver{bookreview}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit{\printdelim{nametitledelim}}
+ \newblock
+ \usebibmacro{maintitle+title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \printfield{edition}%
+ \newunit
+ \iffieldundef{maintitle}
+ {\printfield{volume}%
+ \printfield{part}}
+ {}%
+ \newunit
+ \printfield{volumes}%
+ \newunit\newblock
+ \usebibmacro{series+number}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \finentrypunct
+ \usebibmacro{finentry}}
+\end{lstlisting}
+
+We provide a specific \lstinline+biblatex+ citation style .
+
+\begin{lstlisting}
+\ProvidesFile{letgut.cbx}[2022-03-18 v0.9 letgut base citation style]
+\RequireCitationStyle{numeric}
+\end{lstlisting}
+
+The books reviewed have their titles not only emphasized, but in bold face as
+well\ldots{}
+
+\begin{lstlisting}
+\DeclareFieldFormat[bookreview]{title}{\textbf{\emph{#1}}}
+\end{lstlisting}
+
+\ldots{} but not their subtitles.
+
+\begin{lstlisting}
+\renewbibmacro*{title}{%
+ \ifboolexpr{
+ test {\iffieldundef{title}}
+ and
+ test {\iffieldundef{subtitle}}
+ }
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \setunit{\subtitlepunct}}%
+ \printfield[emph]{subtitle}%
+ \newunit}%
+ \printfield{titleaddon}}
+\end{lstlisting}
+
+\section{Provided files}
+\label{sec:org59fbe1b}
+
+\subsection{Example file of an issue of the newsletter}
+\label{sec:org4b9a54d}
+
+\begin{lstlisting}
+\documentclass{letgut}
+
+\letgutsetup{
+ % % Option booléenne pour la version finale de la Lettre.
+ % % L'option contraire`draft` (par défaut) affiche
+ % % « Brouillon » en filigrane et actionne le package
+ % % `lua-typo`.
+ %
+ % , final
+ %
+ % % Option coloriant le fond de la page d'une couleur
+ % % par défaut (`1.0, 0.98, 0.94` en « rgb ») mais
+ % % modifiable au moyen de l'option `pagecolor` ci-dessous.
+ %
+ % , paper
+ %
+ % % Numéro de la Lettre
+ %
+ , number=44
+ %
+ % % Date de la Lettre. Celle-ci est déduite de la
+ % % date du jour, mais peut être spécifiée sous la forme
+ % % AAAA-MM (avec garde-fous) ou librement
+ % % (p. ex. `date=Printemps 2021`).
+ %
+ % , date=2025-16
+ %
+ % % Couleur de la page, à spécifier selon le modèle « rgb ».
+ %
+ % , pagecolor={1.0, 0.1, 0.94}
+ %
+ % % Couleur des hyperliens, à spécifier selon le modèle
+ % % « named ».
+ %
+ % , allcolorslinks=cyan
+ %
+ % % Un (r)appel à cotisation est automatiquement ajouté
+ % % en 1re page. Si on ne le souhaite pas, il suffit de
+ % % passer l'option `membership-reminder=false`.
+ %
+ % , membership-reminder=false
+ %
+ % % Si un fichier `editorial.tex`, on s'en doute censé
+ % % contenir l'éditorial, est présent dans le répertoire
+ % % courant, son contenu est automatiquement ajouté en
+ % % 1re page. Si un tel fichier est absent du répertoire
+ % % courant, une alerte est affichée à la place, sauf si,
+ % % parce qu'on ne souhaite pas d'éditorial, on passe
+ % % l'option `editorial=false`.
+ %
+ % , editorial=false
+ %
+ % % Les informations concernant GUTenberg, si elles
+ % % figurent dans un fichier `informations-gut.tex`
+ % % présent dans le répertoire courant, sont
+ % % automatiquement ajoutées en dernière page.
+ % % Si on ne souhaite pas que figurent ces
+ % % informations, il suffit de passer l'option
+ % % `informations=false`.
+ %
+ % , informations=false
+}
+
+\setmainfont{TeX Gyre Schola} % Par exemple
+
+\usepackage[maths=both]{duckuments}
+\usepackage{mwe}
+
+% \addbibresource{biblio.bib}
+
+\begin{document}
+\duckument
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-engine: luatex
+%%% TeX-master: t
+%%% End:
+\end{lstlisting}
+
+\subsection{Example of an editorial}
+\label{sec:orgf79a2c2}
+
+\begin{lstlisting}
+Ceci est un intéressant éditorial de la \lettregut{}
+dans lequel on peut causer de l'\ag{} et du \ca{}
+de l'association. Il peut aussi y être question du \ctan.
+
+\lipsum[1-5]
+
+\begin{figure}[ht]
+ \centering
+ \includegraphics[width=.7\linewidth]{example-image}
+ \caption{Ducks ?}
+ \label{fig:ducks}
+\end{figure}
+
+\lipsum[6-10]
+\end{lstlisting}
+
+\subsection{Informations about \gutenberg}
+\label{sec:orgcc0dfe6}
+
+\begin{lstlisting}
+\enlargethispage{1.5cm}
+\small
+\vspace*{-1cm}
+\hspace*{-1.5cm}%
+\raisebox{-\height+0.7\baselineskip}{%
+ \begin{minipage}[t]{.6\textwidth}%\vspace{0pt}%
+ \includegraphics[width=\linewidth]{logo-gut.pdf}
+ \end{minipage}%
+}%
+\hfill%
+\begin{minipage}[t]{.4\textwidth}%\vspace{0pt}%
+ \footnotesize\raggedleft%
+ Association \gut{}\\
+ 15 rue des Halles -- \textsc{bp} 74\\
+ 75001 Paris\\
+ France\\
+ \nolinkurl{secretariat@gutenberg.eu.org}
+\end{minipage}%
+
+\begin{description}
+\item[Site internet :] \url{https://www.gutenberg.eu.org/}
+\item[\Cahiers{} :] \url{http://cahiers.gutenberg.eu.org/}
+\item[Problèmes techniques :]
+ \leavevmode
+ \begin{description}
+ \item[la liste \texttt{gut} :]
+ \url{https://www.gutenberg.eu.org/-Listes-de-diffusion-}
+ \item[le site \TeX nique de questions et réponses :]
+ \url{https://texnique.fr/}
+ \item[la foire aux questions :]
+ \url{https://faq.gutenberg.eu.org}
+ \end{description}
+\end{description}
+%
+\alertbox{%
+ Cette association est la vôtre: faites-nous part de
+ vos idées, de vos envies, de vos préoccupations
+ à l'adresse \nolinkurl{secretariat@gutenberg.eu.org}.%
+}
+
+% \section[Association GUTenberg (tout sur l')]
+% {Adhésion à l'association}
+\title{Adhésion à l'association}
+\label{letgut_label_adhesions}
+
+\begin{itemize}
+\item % Adhésions et abonnements
+ Les adhésions sont à renouveler en début d'année
+ pour l'année civile.
+ % \item Il n'y a pas de lettre de rappel, chaque membre
+ % doit faire son renouvellement annuel; %\hspace*{1em}
+ % merci de renvoyer spontanément le bulletin ci-dessous
+ % en début d'année.
+\item Les administrations peuvent joindre un bon de commande
+ revêtu de la signature de la personne responsable ;
+ les étudiants doivent joindre un justificatif.
+ % \item Si vous souhaitez que vos coordonnées restent
+ % confidentielles, merci de le signaler.
+\end{itemize}
+
+\section{Tarifs \the\year}
+
+Les membres de \gut\ peuvent adhérer à l'association
+internationale, le \acf{tug}, et recevoir son bulletin
+\emph{\acs{tug}boat} à un tarif préférentiel :
+\begin{description}
+\item[tarif normal :] \EUR{65} (au lieu de 85~\$)
+\item[tarif étudiant :] \EUR{40} (au lieu de 55~\$)
+\end{description}
+% (\EUR{49,50}, étudiants et demandeurs d'emploi :
+% \EUR{29}, au lieu de 85\$ et % 65\$). Voir
+% \url{%
+% https://www.gutenberg.eu.org/?Adherer-a-l-association%
+% }.
+
+\footnotesize
+\begin{center}
+ \begin{tabular}{lr}
+ \toprule
+ \textbf{Type d'adhésion} & \textbf{Prix} \\
+ \midrule
+ Membre individuel & \EUR{30} \\
+ Membre individuel + adhésion \acs{tug} & \EUR{95} \\
+ Membre individuel étudiant/demandeur d'emploi & \EUR{15} \\
+ Membre individuel étudiant + adhésion \acs{tug} & \EUR{55} \\
+ Association d'étudiants & \EUR{65} \\
+ Organisme à but non lucratif & \EUR{130} \\
+ Organisme à but lucratif & \EUR{229} \\
+ \bottomrule
+ \end{tabular}
+\end{center}
+
+\section{Règlements}
+
+Les règlements peuvent s'effectuer par :
+\begin{itemize}
+\item \textbf{virement bancaire}%
+ \footnote{Nous vous remercions de \textbf{privilégier}
+ le \textbf{virement bancaire}.\label{fn:1}} (IBAN :
+ FR76 1870 7000 3003 0191 3568 475)%
+ \leavevmode
+
+ \alertbox{%
+ Veillez à bien \emph{indiquer vos nom et prénom}
+ dans les références du virement !%
+ }
+\item Paypal\footnotemark[\value{footnote}] :
+ \url{https://www.gutenberg.eu.org/?Adherer-en-ligne}
+\item bulletin et chèque\footnotemark[\value{footnote}] :
+ \url{https://www.gutenberg.eu.org/?Adherer-a-l-association}
+\end{itemize}
+
+\vfill
+
+\begin{center}
+ \begin{tblr}{
+ width=.75\linewidth,
+ colspec={
+ % < (Just not to disturb the parentheses
+ % balancing detection of my editor.)
+ >{\bfseries}r@{ }X
+ },
+ vline{1,3}={solid},
+ hline{1,7}={solid},
+ rowsep=0mm,
+ row{1} = {abovesep+=.25cm},
+ row{2} = {belowsep+=.125cm},
+ row{6} = {belowsep+=.25cm},
+ % colsep=2.5mm,
+ }
+ \SetCell[c=2]{c} \emph{La \lettregut}\\
+ \SetCell[c=2]{c} \mdseries Bulletin irrégulomestriel
+ de l'association \gut\\
+ Directeur de la publication :
+ & \person{Bideault, Patrick} \\
+ Comité de rédaction :
+ & {Patrick \bsc{Bideault}, Denis \bsc{Bitouzé}, \\
+ Céline \bsc{Chevalier} \& Maxime \bsc{Chupin}} \\
+ Adresse de la rédaction : &
+ {
+ Association \gut\\
+ 15 rue des Halles -- \textsc{bp} 74\\
+ 75001 Paris
+ }
+ \\
+ \acs{issn} : & 2742-6149 (version numérique)
+ \end{tblr}
+\end{center}
+\vfill
+\mbox{}
+\clearpage
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
+\end{lstlisting}
+\end{document} \ No newline at end of file
diff --git a/macros/luatex/latex/letgut/doc/letgut.bib b/macros/luatex/latex/letgut/doc/letgut.bib
new file mode 100644
index 0000000000..0593f3c176
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/letgut.bib
@@ -0,0 +1,9 @@
+
+@online{AssociationGUTenbergLettreGUTenberg,
+ title = {Lettre GUTenberg},
+ author = {{Association GUTenberg}},
+ url = {https://www.gutenberg.eu.org/-Lettre-GUTenberg-},
+ organization = {Groupe francophone des Utilisateurs de \TeX, \LaTeX{} et logiciels compagnons}
+}
+
+
diff --git a/macros/luatex/latex/letgut/doc/letgut.pdf b/macros/luatex/latex/letgut/doc/letgut.pdf
new file mode 100644
index 0000000000..76847e9bce
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/letgut.pdf
Binary files differ
diff --git a/macros/luatex/latex/letgut/doc/letgut.tex b/macros/luatex/latex/letgut/doc/letgut.tex
new file mode 100644
index 0000000000..4d8c219baa
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/letgut.tex
@@ -0,0 +1,1435 @@
+\documentclass{letgut}
+
+% On compose la présente documentation en Kp-Fonts, sauf en ce qui concerne la
+% fonte à chasse fixe qui n'est pas ce qu'il y a de plus réussi chez elle.
+\setmainfont{KpRoman}
+\setsansfont{KpSans}
+% \setmonofont{TeX Gyre Cursor}
+\setmonofont[Scale = MatchLowercase]{RobotoMono}
+
+% On ne veut pas d'éditorial dans cette « Lettre » et on veut que sa couleur de
+% fond ne soit pas la couleur ivoire par défaut, mais du blanc.
+\letgutsetup{
+ , editorial=false
+ , pagecolor= {1,1,1}
+ % ,final
+}
+
+\lstset{
+ language=TeX,%
+ alsolanguage=[geometry]TeX,%
+ alsolanguage=[LaTeX]TeX,%
+ alsolanguage=[plain]TeX,%
+ alsolanguage=[common]TeX,%
+ alsolanguage=[primitive]TeX,%
+ alsolanguage=[xcolor]TeX,%
+ alsolanguage=[listings]TeX,%
+ alsolanguage=[biblatex]TeX,%
+ alsolanguage=[hyperref]TeX,%
+ alsolanguage=[extLaTeX]TeX,%
+ alsolanguage=[letgut]TeX,%
+ alsolanguage=[hologo]TeX,%
+ alsolanguage=[acro]TeX,%
+ alsolanguage=[tcolorbox]TeX,%
+ alsolanguage=[csquotes]TeX,%
+ alsolanguage=[varioref]TeX,%
+ alsolanguage=[babel-french]TeX,%
+}
+
+% Bibliographie
+\addbibresource{letgut.bib}
+
+% On définit quelques commandes (utiles seulement pour la présente
+% documentation), par exemple celle permettant d'accéder à la couleur de fond du
+% papier lorsque l'option `paper' n'est pas employée.
+\ExplSyntaxOn
+\NewDocumentCommand { \letgutdefaultpagecolor } { } {
+ \c__letgut_default_pagecolor_screen_clist
+}
+\definecolor{letgutdefaultpagecolor}{rgb}{\c__letgut_default_pagecolor_screen_clist}
+
+\NewDocumentCommand { \letgutalertboxdefaultcolor } { } {
+ \c__letgut_default_alert_box_color_tl
+}
+
+\NewDocumentCommand { \letgutallcolorslinks } { } {
+ \c__letgut_default_allcolors_links_color_tl
+}
+
+\NewDocumentCommand { \docker } { s } {
+ \IfBooleanTF{#1}%
+ {\software{docker}}%
+ {\software[https://docs.docker.com/]{Docker}}%
+}
+
+\pdfstringdefDisableCommands{%
+ \def\docker{Docker}
+}
+\ExplSyntaxOff
+
+% Acronymes
+\letgutacro[tag=thisdocument]{LD}{\LaTeX{} dépendant}
+\letgutacro[tag=thisdocument]{CD}{Compact Disc}[]
+\letgutacro[tag=thisdocument]{TLMGR}{\TeX~Live Manager}[gestionnaire \TeX~Live]
+\letgutacro[tag=thisdocument,short=no-op,short-format=\upshape] % Désactive les petites capitales
+{NOOP}
+{No Operation}
+[instruction nulle]
+\letgutacro{CPGÉ}{Classes Préparatoires aux Grandes Écoles}
+
+% Éléments du titre
+\title{%
+ Documentation de la
+ \texorpdfstring{%
+ \letgutcls%
+ }{%
+ classe letgut%
+ }%
+}
+\author{Association GUTenberg}
+\date{%
+ Version 0.9 en date du \today%
+ \texorpdfstring{%
+ \\
+ \url{https://framagit.org/gutenberg/classe-lettre-gut}%
+ }{%
+ }%
+}
+
+% \tcbset{index command name=\jobname-commands}
+% \makeindex[name=\jobname-commands,title=Index des commandes,extout=odx,extin=ond,columnseprule]
+% \makeindex[title=Index des concepts,extout=pdx,extin=pnd,columnseprule]
+\begin{document}
+
+\title{Introduction}
+\label{sec:introduction}
+L'association \gutenberg{} publie la \lettregut{}, son bulletin irrégulomestriel,
+depuis février 1993 \autocite{AssociationGUTenbergLettreGUTenberg}.
+
+Pour ce faire, une classe \hologo{(La)TeX} dédiée, maison, a peu à peu vu le
+jour\footnote{Notamment grâce au concours de \person{André, Jacques},
+ \person{Flipo, Daniel} et \person{Chupin, Maxime}.} mais, au gré des
+nouveaux besoins et des personnes qui ont assuré la publication de la \lettre{},
+son développement a été quelque peu erratique ; il n'aurait notamment pas été
+possible de publier son code en l'état. En outre, sa documentation était
+inexistante.
+
+Le \ca{} de l'association élu en novembre 2020 a souhaité fournir une classe
+mieux structurée, davantage pérenne et documentée, à même d'être publiée sur le
+\ctan{}. C'est désormais chose faite avec la présente \letgutcls\footnote{À
+ cette occasion, la classe a été légèrement renommée de \class[]{let-gut} en
+ \letgut{}.}.
+
+\title{Usage de la classe \letgut}
+\label{sec:usage-de-la}
+
+\section{Compilation}
+\label{sec:compilation}
+
+\begin{dbwarning}{\hologo{LuaLaTeX} (récent) et UTF-8 nécessaires}{lualatex-recent}
+ Les documents recourant à la \letgutcls{} doivent :
+ \begin{itemize}
+ \item être compilés avec le moteur \hologo{LuaLaTeX}\footnote{Dans une version
+ au minimum \texttt{1.13.2}, le format \software{lualatex} devant être dans
+ une version au minimum \texttt{2021.6.6}.} ;
+ \item avoir (de ce fait) comme codage d'entrée l'UTF-8\footnote{Y compris les
+ fichiers sources auxiliaires tels que les \file{.bib}.}.
+ \end{itemize}
+\end{dbwarning}
+
+La section \enquote{\nameref{recours-docker}}, \vpageref{recours-docker},
+détaille un moyen de de disposer d'une telle version de \hologo{LuaLaTeX} sans
+risque de perturber une installation de \hologo{(La)TeX} déjà existante.
+
+\section{Options}
+\label{sec:options}
+
+La \letgutcls{} fournit deux types d'\meta{options} :
+
+\begin{description}
+\item[\foreignloc{load-time} :] à spécifier \emph{exclusivement} au chargement
+ de la classe, selon la syntaxe usuelle
+ ×\documentclass[×\meta{options}×]{letgut}×
+\item[\emph{non} \foreignloc{load-time} :] à spécifier \emph{exclusivement} en
+ argument de la commande dédiée \refCom{letgutsetup}.
+\end{description}
+
+\subsection{Options \foreignloc{load-time}}
+\label{sec:fore-time-meta}
+
+Ces options, au nombre de deux, sont \enquote{contraires} l'une de l'autre.
+
+\begin{docKeys}
+ {
+ {
+ doc name = for-readers,
+ doc description = {\valinitdef[\docValue*{true}][\docValue*{true}]},
+ },
+ {
+ doc name = for-authors,
+ doc description = {\valinitdef[\docValue*{false}][\docValue*{true}]},
+ },
+ }%
+ %
+ Ces clés booléennes, contraires l'une de l'autre, activent les versions
+ respectivement \enquote{pour lecteurs} (par défaut) et \enquote{pour auteurs}
+ de la \lettre{}. Celles-ci mettent en page la \lettre{} respectivement :
+ \begin{itemize}
+ \item telle que les lecteurs finaux la liront ;
+ \item telle que les auteurs d'articles de la \lettre{} peuvent le souhaiter au
+ cours de leur rédaction, notamment sans :
+ \begin{itemize}
+ \item titre ;
+ \item (r)appel à cotisation (cf. clé \refKey{membership-reminder}) ;
+ \item éditorial\footnote{Ou avertissement s'il n'est pas trouvé.} (cf. clé
+ \refKey{editorial}) ;
+ \item informations sur \gut{}\footnote{Ou avertissement si elles ne sont pas
+ trouvées.} (cf. clé \refKey{informations}).
+ \end{itemize}
+ \end{itemize}
+\end{docKeys}
+
+\subsection{Options non \foreignloc{load-time}}
+\label{sec:emphn-fore-time}
+
+\begin{docCommand}{letgutsetup}{\marg{options}}
+ \index{configuration}%
+ Cette commande permet de spécifier les \meta{options} \emph{non} \foreignloc{load-time} de la \letgutcls{}.
+\end{docCommand}
+
+Ces \meta{options} sont les suivantes :
+
+\begin{docKeys}
+ {
+ {
+ doc name = draft,
+ doc description = {\valinitdef[\docValue*{true}][\docValue*{true}]},
+ },
+ {
+ doc name = final,
+ doc description = {\valinitdef[\docValue*{false}][\docValue*{true}]},
+ },
+ }%
+ %
+ Ces clés booléennes, contraires l'une de l'autre, activent les versions
+ respectivement \enquote{brouillon} (par défaut) et \enquote{final} de la
+ \lettre{}.
+
+ En version \enquote{brouillon}, et seulement dans cette version% \footnote{Avec
+ % la version actuelle, une conséquence supplémentaire mais temporaire est
+ % que }
+ :
+ \begin{enumerate}
+ \item le \package*{lua-typo} est chargé\footnote{En fait, cela est
+ momentanément désactivé car le \package*{luacolor}, chargé en sous-main
+ par \package{lua-typo}, ne fonctionne actuellement pas bien avec une
+ fonctionnalité du noyau \hologo{LaTeX} utilisée par la classe (plus de
+ détails
+ \href{https://github.com/ho-tex/luacolor/issues/4}{ici}.)}. Celui-ci met
+ en lumière, par un changement de couleur, les lignes typographiquement
+ imparfaites d’un fichier \pdf*{} produit par \hologo{LuaLaTeX} ;
+ \item le mot \enquote{Brouillon} figure en filigrane sur chaque page ;
+ \item les boîtes trop pleines (\foreignloc{Overfull \docAuxCommand*{hbox}})
+ sont mises en évidence comme avec les classes standards.
+ \end{enumerate}
+\end{docKeys}
+
+\begin{docKeys}
+ {
+ {
+ doc name = screen,
+ doc description = {\valinitdef[\docValue*{true}][\docValue*{true}]},
+ },
+ {
+ doc name = paper,
+ doc description = {\valinitdef[\docValue*{false}][\docValue*{true}]},
+ },
+ }%
+ %
+ Ces clés booléennes, contraires l'une de l'autre, activent les formats de
+ sortie respectivement \enquote{écran} (par défaut) et \enquote{papier} de la
+ \lettre{}.
+
+ En version \enquote{écran}, et seulement dans cette version, la couleur de
+ fond du papier est par défaut non pas le blanc mais celle spécifiée (et
+ modifiable) par \refKey{pagecolor}.
+\end{docKeys}
+
+\begin{docKey}{number}{=\meta{numéro}}{\valinitdef}
+ Cette clé permet de spécifier le \meta{numéro} de la \lettre{}.
+\end{docKey}
+
+{%
+ % \tcbset{before lower=\vspace*{.5\baselineskip}\par}
+ \begin{docKey}{date}{=\meta{année}\texttt{-}\meta{mois} ou \meta{texte}}{\valinitdef[année et mois en cours]}
+ Cette clé permet de spécifier la date de la \lettre{}. Celle-ci est affichée sous
+ la forme :
+ \begin{itemize}
+ \item \enquote{\meta{Mois} \meta{année}} dans les cas où l'option :
+ \begin{itemize}
+ \item n'est pas employée (les mois et année en cours sont alors
+ utilisés) ;
+ \item est employée sous la forme \refKey*{date}×=×\meta{année}×-×\meta{mois}
+ où \meta{année} et \meta{mois} doivent être des nombres entiers
+ positifs. Les garde-fous suivants sont mis en place :
+ \begin{itemize}
+ \item si \meta{année} n'est pas celle en cours ou la suivante, elle est
+ remplacée par l'année en cours ;
+ \item si \meta{mois} n'est pas entre $1$ et $12$, il est remplacé par le
+ mois en cours ;
+ \end{itemize}
+ \end{itemize}
+ \item \enquote{\meta{texte}} si l'option est employée sous la forme
+ \refKey*{date}×=×\meta{texte}.
+ \end{itemize}
+ \end{docKey}
+}
+
+\begin{docKey}{pagecolor}{=\marg{couleur}}{\valinitdef[\docValue*{letgut_pagecolor}]}
+ Cette clé permet, si (et seulement) l'option \refKey{paper} \emph{n'}est
+ \emph{pas} employée, de spécifier (selon le modèle \enquote{rgb}) une
+ \meta{couleur} de fond du papier autre que celle appliquée par
+ défaut\footnote{C'est-à-dire \colorbox{letgutdefaultpagecolor}{celle-ci}% , dont
+ % la valeur \enquote{rgb} est \docValue*{\letgutdefaultpagecolor}
+ .}.
+\end{docKey}
+
+\begin{docKey}{allcolorslinks}{=\meta{couleur}}{\valinitdef[\docValue*{letgut_allcolors_links}]}
+ Cette clé permet de spécifier (selon le modèle \enquote{\foreignloc{named}})
+ une \meta{couleur} pour (tous) les liens hypertextes autre que celle
+ \docColor{letgut_allcolors_links} par défaut\footnote{C'est-à-dire
+ \textcolor{letgut_allcolors_links}{celle-ci}% , égale
+ % à \docValue*{\letgutallcolorslinks}
+ .}.
+\end{docKey}
+
+\begin{docKey}{membership-reminder}{}{\valinitdef[\docValue*{true}][\docValue*{true}]}
+ Cette clé booléenne affiche automatiquement un (r)appel à cotisation en bas de
+ 1\iere{} page de la \lettre{}.
+\end{docKey}
+
+\begin{docKey}{editorial}{}{\valinitdef[\docValue*{true}][\docValue*{true}]}
+ Cette clé booléenne importe automatiquement en tout début de la \lettre{}
+ (néanmoins après le titre et le sommaire) le \file*{editorial.tex} contenant
+ l'éditorial. Si aucun \file*{editorial.tex} n'est trouvé dans le répertoire
+ courant, un avertissement est émis lors de la compilation et une boîte
+ d'alerte est affichée en 1\iere{} page.
+\end{docKey}
+
+\begin{docKey}{informations}{}{\valinitdef[\docValue*{true}][\docValue*{true}]}
+ Cette clé booléenne importe automatiquement en dernière page de la \lettre{}
+ le \file*{informations-gut.tex} contenant toutes les informations sur
+ \gut{}. Si aucun \file*{informations-gut.tex} n'est trouvé dans le
+ répertoire courant, un avertissement est émis lors de la compilation et une
+ boîte d'alerte est affichée en dernière page.
+\end{docKey}
+
+\section{Titre et titres courants}
+\label{sec:titre}
+Si la commande \docAuxCommand{title}\marg{titre} est
+\begin{description}
+\item[\emph{non} utilisée :] le titre du document est construit à partir du
+ \meta{numéro} et de la \meta{date} spécifiés (cf. clés \refKey{number} et
+ \refKey{date}). Il figure alors automatiquement en 1\iere{} page sous la forme
+ \enquote{Numéro \meta{numéro} -- \meta{date}}. Le titre courant est alors
+ \enquote{La \lettregut{}, \meta{date}} ;
+\item[\phantom{\emph{non}} utilisée\footnotemark{} :]\footnotetext{Ainsi que les
+ habituelles commandes \docAuxCommand{author} et \docAuxCommand{date}.} et
+ ce, \emph{avant \lstinline+\\begin\{document\}+}, le \meta{titre} du document
+ figure alors automatiquement en 1\iere{} page sous sa forme habituelle et est
+ suivie d'un changement de page. Le titre courant est alors
+ \enquote{\meta{titre}, \meta{date}}.
+\end{description}
+
+\begin{dbwarning}{\docAuxCommand{title} et \docAuxCommand{author}
+ $\neq$ avant et après \lstinline+\\begin\{document\}+}{}
+ Les commandes \docAuxCommand{title} et \docAuxCommand{author} ne se comportent
+ pas de la même façon avant et après \lstinline+\begin{document}+ (cf. sections
+ \nameref{sec:structuration} \vpageref{sec:structuration} et
+ \nameref{sec:sign-des-articl} \vpageref{sec:sign-des-articl}).
+\end{dbwarning}
+
+\begin{dbwarning}{Commande \docAuxCommand{maketitle} à \emph{ne pas} employer}{}
+ La commande \docAuxCommand{maketitle} est à \emph{ne pas} employer car elle
+ l'est en sous-main par la classe.
+\end{dbwarning}
+
+\section{Structuration}
+\label{sec:structuration}
+
+\begin{docCommands}[
+ doc parameter = \oarg{intitulé alternatif}\marg{intitulé}
+ ]
+ {
+ { doc name = title },
+ { doc name = subtitle },
+ { doc name = section },
+ { doc name = subsection },
+ { doc name = subsubsection },
+ { doc name = paragraph },
+ { doc name = subparagraph },
+ }
+ %
+ Ces commandes permettent de structurer le contenu de la \lettre{} :
+ \begin{itemize}
+ \item \refCom{title} est celle de plus haut niveau, introduisant
+ l'\meta{intitulé} de chaque article (automatiquement composé en grandes
+ capitales et précédé de l'ornement \aldineleft) ;
+ \item \refCom{subtitle}, de niveau suivant et facultative, introduisant un
+ \meta{intitulé} d'éventuel sous-titre d'article (automatiquement composé en
+ grandes capitales). Ceci peut être utile par exemple pour distinguer des
+ parties indépendantes d'un même article ;
+ \item celles de niveaux suivants sont les habituelles commandes de
+ structuration fournies par la \class*{article}.
+ \end{itemize}
+\end{docCommands}
+
+\begin{dbremark}{Structure non numérotée}{}
+ Les titres, sous-titres, sections, sous-sections, etc. de la \lettre{} ne sont
+ pas numérotés. Aussi pourra-t-on, pour faire référence à l'une de ces
+ rubriques, recourir aux commandes :
+ \begin{itemize}
+ \item \docAuxCommand{nameref} pour en citer l'\meta{intitulé} ;
+ \item \docAuxCommand{vpageref} pour en citer la page ;
+ \item \docAuxCommand{enquote} pour, le cas échéant, faire figurer
+ l'\meta{intitulé} entre guillemets ;
+ % \item \docAuxCommand{namecref} (fournie par le \package*{cleveref}, chargé par
+ % \letgut{}) pour en citer la nature (le cas échéant).
+ \end{itemize}
+ ces trois commandes étant directement utilisables puisque fournies par les
+ packages respectivement \package{hyperref}, \package{varioref} et
+ \package{csquotes}, chargés en sous-main par la \letgutcls{}.
+\end{dbremark}
+
+\bgroup
+\lstset{deletekeywords=[3]{section,nameref}}
+\begin{ltx-code-result}[title addon=références croisées aux rubriques]
+On lira avec intérêt la section \enquote{\nameref{sec:acronymes}}
+\vpageref{sec:acronymes}.
+\end{ltx-code-result}
+\egroup
+
+\section[Personnes et auteurs]{Noms de personnes et d'auteurs d'articles}
+\label{sec:sign-des-articl}
+
+% Les prénom, nom et titre d'une personne peuvent être affichés au moyen de la
+% commande \refCom{person} suivante.
+
+\begin{docCommands}[
+ doc name = person,
+ doc name = author,
+ ]
+ {
+ {
+ doc name = person,
+ doc parameter = \marg{données}
+ },
+ {
+ doc name = person,
+ doc parameter = \brackets{\meta{données$_1$} and \meta{données$_2$}[ and ...]}
+ },
+ {
+ doc name = author,
+ doc parameter = \marg{données}
+ },
+ {
+ doc name = author,
+ doc parameter = \brackets{\meta{données$_1$} and \meta{données$_2$}[ and ...]}
+ },
+ }
+ \index{auteur}
+ \index{personne}
+ %
+ Ces commandes affichent\footnote{Au fer à droite pour \refCom{author}.} les
+ \meta{données} (noms et éventuels prénoms et titres) d'une ou plusieurs
+ personnes ou d'un ou plusieurs auteurs d'articles, ces \meta{données}
+ étant spécifiées :
+ \begin{description}
+ \item[pour un individu unique] selon l'un des formats suivants :
+ \begin{itemize}
+ \item \meta{nom}
+ \item \meta{nom}×, ×\meta{prénom}
+ \item \meta{nom}×, ×\meta{prénom}×, ×\meta{titre}
+ \end{itemize}
+\item[pour des individus multiples :]\leavevmode
+ \begin{itemize}
+ \item selon le même schéma que pour un individu unique ;
+ \item les \meta{données} de chacun des individus étant séparées par le mot clé
+ \lstinline+and+.
+ \end{itemize}
+ \end{description}
+\end{docCommands}
+
+Indépendamment de la casse utilisée en entrée, pour chaque \meta{nom} et
+\meta{prénom} :
+\begin{itemize}
+\item chacune des initiales et des premières lettres après un espace ou un tiret
+ est affiché en grande capitale ;
+\item le reste est affiché en :
+ \begin{itemize}
+ \item petites capitales pour un \meta{nom} ;
+ \item bas de casse pour un \meta{prénom}.
+ \end{itemize}
+\end{itemize}
+
+\begin{ltx-code-result}[title addon=personnes]
+On peut dire merci à
+\person{Knuth, Donald E., dieu and Lamport, Leslie} !
+\end{ltx-code-result}
+
+\bgroup
+\lstset{deletekeywords=[3]{author},deletekeywords=[4]{TeX,},deletekeywords=[5]{e}}
+\begin{ltx-code-result}[title addon=auteur]
+\begin{displayquote} % Fourni par `csquotes' chargé par `letgut'
+ Wait, wait, I never said that.
+ \author{knuth, dONALD e.}
+\end{displayquote}
+\end{ltx-code-result}
+ % The \TeX{} family of programs seems to be nice and healthy
+ % as it continues to approach perfection.
+\egroup
+
+\section{Aide à la saisie et homogénéisation de la mise en forme}
+\label{sec:aide-la-saisie}
+
+Les articles de la \lettre{} sont émaillés de concepts (packages ou classes
+\hologo{(La)TeX}, logiciels, etc.) et de termes et expressions
+(\enquote{\gut{}}, \enquote{\lettre{}}, etc.) employés de façon
+récurrente. Aussi des commandes spécifiques sont-elles prévues de façon à en
+faciliter la saisie et à en homogénéiser la mise en forme.
+
+\subsection{Packages et classes, logiciels, fichiers, locutions étrangères}
+\label{sec:classes-packages-et}
+
+\begin{docCommands}
+ {
+ {
+ doc name = package,
+ doc parameter = \oarg{URL}\marg{nom},
+ },
+ {
+ doc name = package*,
+ doc parameter = \oarg{URL}\marg{nom}\oarg{préfixe},
+ },
+ {
+ doc name = class,
+ doc parameter = \oarg{URL}\marg{nom},
+ },
+ {
+ doc name = class*,
+ doc parameter = \oarg{URL}\marg{nom}\oarg{préfixe},
+ },
+ }
+ %
+ Ces commandes affichent le \meta{nom} d'un package ou d'une classe
+ \hologo{(La)TeX}. Le \meta{nom} affiché est un lien hypertexte si et seulement
+ si l'argument optionnel est :
+ \begin{description}
+ \item[\emph{non} employé] la cible étant alors
+ \url{https://ctan.org/pkg/}\meta{nom} ;
+ \item[\phantom{\emph{non}} employé] mais non vide, la cible étant alors
+ \meta{URL}.
+ \end{description}
+ Pour que le \meta{nom} affiché ne soit pas un lien hypertexte, il suffit
+ d'employer un argument optionnel vide.
+
+ Les versions étoilées font précéder le \meta{nom} d'un \meta{préfixe} qui, par
+ défaut, est respectivement \enquote{package} et \enquote{classe}.
+\end{docCommands}
+
+\bgroup
+\lstset{deletekeywords=[4]{tables,}}
+\begin{ltx-code-result}[title addon=packages et classes]
+La \class*{letgut} s'appuie entre autres sur le \package*{etoc}
+(qui permet de personnaliser les tables des matières).
+
+Une des classes s'appuyant sur le \package*[]{etoc} est
+\class[https://framagit.org/gutenberg/classe-lettre-gut]{letgut}.
+\end{ltx-code-result}
+\egroup
+
+\begin{docCommands}
+ {
+ {
+ doc name = software,
+ doc parameter = \oarg{URL}\marg{nom},
+ },
+ {
+ doc name = software*,
+ doc parameter = \oarg{URL}\marg{nom}\oarg{préfixe},
+ },
+ }
+ %
+ Ces commandes affichent le \meta{nom} d'un logiciel qui est optionnellement un
+ lien hypertexte vers \meta{URL}. La version étoilée fait précéder le
+ \meta{nom} d'un \meta{préfixe} qui, par défaut, est \enquote{logiciel}.
+\end{docCommands}
+
+\begin{docCommands}
+ {
+ {
+ doc name = file,
+ doc parameter = \marg{nom},
+ },
+ {
+ doc name = file*,
+ doc parameter = \marg{nom}\oarg{préfixe},
+ },
+ }
+ %
+ Ces commandes affichent le \meta{nom} d'un fichier. La version étoilée fait
+ précéder le \meta{nom} d'un \meta{préfixe} qui, par défaut, est
+ \enquote{fichier}.
+\end{docCommands}
+
+\bgroup
+\lstset{deletekeywords=[3]{file,plus,l}}
+\begin{ltx-code-result}[title addon=logiciels et fichiers]
+Le \file*{test.tex} a été ouvert dans le
+\software*[https://www.gnu.org/software/emacs/]{Emacs}, plus
+précisément dans \software*{Emacs}[l'éditeur de texte].
+\end{ltx-code-result}
+\egroup
+
+\begin{dbwarning}{Commandes pas toutes bienvenues en \docAuxCommand{title} et
+ \docAuxCommand{subtitle}}{}
+ Lorsqu'elles sont employées en argument des commandes \refCom{title} et
+ \refCom{subtitle}, les versions étoilées de ces commandes ont des effets
+ indésirables (préfixes pas en grandes capitales et signets non conformes).
+\end{dbwarning}
+
+\begin{docCommand}{foreignloc}{\marg{locution}}
+ Cette commande est conçue pour afficher une \meta{locution} étrangère.
+\end{docCommand}
+
+\begin{docCommand}{latinloc}{\marg{locution}}
+ Cette commande est conçue pour afficher une \meta{locution} latine.
+\end{docCommand}
+
+\bgroup
+\lstset{deletekeywords=[3]{options}}
+\begin{ltx-code-result}[title addon=locutions étrangères]
+Ce ne sont pas toutes des \foreignloc{load-time options} :
+\latinloc{errare humanum est} !
+\end{ltx-code-result}
+\egroup
+
+\subsection{Termes et expressions}
+\label{sec:termes}
+
+\begin{docCommands}
+ {
+ { doc name = gutenberg },
+ { doc name = gut },
+ { doc name = lettre },
+ { doc name = lettregut },
+ { doc name = Cahier },
+ { doc name = Cahiers },
+ { doc name = letgut },
+ { doc name = letgutcls },
+ { doc name = knuth },
+ { doc name = lamport },
+ { doc name = tugboat },
+ }
+ %
+ Ce que ces commandes affichent est répertorié dans le \vref{tab:raccourcis}.
+\end{docCommands}
+
+\begin{table}[htb]
+ \centering
+ \begin{tabular}{ll}
+ \toprule
+ \refCom{gutenberg} & \gutenberg \\
+ \refCom{gut} & \gut \\
+ \refCom{lettre} & \lettre \\
+ \refCom{lettregut} & \lettregut \\
+ \refCom{Cahier} & \Cahier \\
+ \refCom{Cahiers} & \Cahiers \\ \midrule
+ \refCom{letgut} & \letgut \\
+ \refCom{letgutcls} & \letgutcls \\ \midrule
+ \refCom{knuth} & \knuth \\
+ \refCom{lamport} & \lamport \\
+ \refCom{tugboat} & \tugboat \\ \bottomrule
+ \end{tabular}
+ \caption{Effet des commandes de raccourcis}
+ \label{tab:raccourcis}
+\end{table}
+
+Par homogénéité avec les commandes \refCom{class} et \refCom{class*}, on aurait
+pu souhaiter que les terme et expression \enquote{\letgut} et
+\enquote{\letgutcls} soient produits par \refCom{letgut} et
+\docAuxCommand*{letgut*}. Mais cette dernière commande, étoilée, a dû être
+remplacée par une commande non étoilée (\refCom{letgutcls}), sans quoi un
+problème technique aurait empêché l'utilisation de \refCom{letgut} en argument
+de \docAuxCommand{section}%
+\footnote{Plus de détails
+ \href{https://tex.stackexchange.com/q/493017/18401}{ici}.}.
+
+\begin{dbwarning}{Commande \refCom{letgutcls} pas bienvenue en \docAuxCommand{title} et
+ \docAuxCommand{subtitle}}{}
+ Lorsqu'elle est employée en argument des commandes \refCom{title} et
+ \refCom{subtitle}, la commande \refCom{letgutcls} a un effet indésirable
+ (préfixe pas en grandes capitales).
+\end{dbwarning}
+
+\section{Exemples de codes \hologo{(La)TeX}, possiblement avec résultats}
+\label{sec:exemples-de-codes}
+
+Afin de présenter aisément et de façon homogène les exemples de codes
+\hologo{(La)TeX}, possiblement avec leurs résultats, la \letgutcls{} fournit les
+environnements \enquote{verbatim} suivants.
+
+\begin{docEnvironments}[
+ doc parameter = \oarg{options},
+ doclang/environment content = code,
+ ]{
+ {
+ doc name = ltx-code,
+ % doc description = code (seulement),
+ },
+ {
+ doc name = ltx-code-result,
+ % doc description = % code
+ % $+$ résultat (interne),
+ },
+ {
+ doc name = ltx-code-external-result,
+ doc parameter = \oarg{options}\marg{fichier},
+ % doc description = % code
+ % $+$ résultat (externe),
+ },
+ }
+ Ces environnements affichent le \meta{code} \hologo{(La)TeX} qui y est inséré et
+ pour :
+ \begin{description}
+ \item[\refEnv{ltx-code}] seulement ce \meta{code} ;
+ \item[\refEnv{ltx-code-result}] également le résultat, compilé en même temps
+ que la \lettre{} ;
+ \item[\refEnv{ltx-code-external-result}] également le résultat, compilé
+ indépendamment de la \lettre{} et dont le \meta{fichier} image est spécifié.
+ \end{description}
+\end{docEnvironments}
+
+\begin{dbremark}{Mise en page des exemples de codes}{}
+ \begin{enumerate}
+ \item Les exemples de codes (avec ou sans résultats) sont par défaut
+ automatiquement coupés en frontière de page.
+ \item Les exemples de codes avec résultats (environnements
+ \refEnv{ltx-code-result} et \refEnv{ltx-code-external-result}), présentent
+ ces codes et résulats :
+ \begin{itemize}
+ \item l'un sous l'autre par défaut ;
+ \item l'un à gauche de l'autre si l'option \lstinline+sidebyside+ est
+ employée.
+ \end{itemize}
+ \end{enumerate}
+\end{dbremark}
+
+\begin{dbwarning}{Exemples de codes avec résultats : possiblement
+ flottants}{exemples-flottants}
+ Si l'option \lstinline+sidebyside+ est passée à l'un ou l'autre des
+ environnements \refEnv{ltx-code-result} et \refEnv{ltx-code-external-result},
+ l'exemple :
+ \begin{itemize}
+ \item présente ses code et résultat en regard ce qui rend impossible sa
+ coupure en frontière de page ;
+ \item est alors automatiquement flottant.
+ \end{itemize}
+ Dans le cas où cet exemple (\no\meta{n}) s'avère se trouver sur une page
+ (\meta{q}) autre que celle (\meta{p}) de son point d'insertion, deux
+ références croisées sont automatiquement insérées :
+ \begin{description}
+ \item[une \enquote{avant} :] au point d'insertion de l'exemple pour indiquer
+ qu'il est à consulter plus loin ; son texte, \emph{par défaut}
+ \enquote{Cf. exemple \meta{n} page \meta{q}.}, peut être surchargé au moyen
+ de l'option \refKey{reference text} ;
+ \item[une \enquote{arrière} :] à la fin du titre de l'exemple ; son texte est
+ \enquote{ (cf. page \meta{p})}.
+ \end{description}
+\end{dbwarning}
+
+Ces trois environnements admettent des \meta{options} :
+\begin{itemize}
+\item (toutes) celles acceptées par l'environnement
+ \docAuxEnvironment{tcblisting} et la commande \docAuxCommand{newtcblisting}
+ fournis par la bibliothèque \lstinline+listings+ du
+ \package*{tcolorbox}\footnote{Et, aussi, les commandes
+ \docAuxCommand{DeclareTCBListing} et assimilées fournies par la bibliothèque
+ \lstinline+xparse+ de ce package.}. Elles permettent notamment de surcharger
+ les réglages par défaut, par exemple :
+ \begin{itemize}
+ \item de faire figurer l'éventuel résultat, non pas sous le code comme c'est
+ le cas par défaut, mais en regard (à droite) au moyen de l'option
+ \lstinline+sidebyside+ ;
+ \item de supprimer les numéros de ligne au moyen de l'option
+\bgroup
+\lstset{deletekeywords=[3]{none},morekeywords=[4]{none},morekeywords=[3]{listing}}
+\begin{ltx-code}
+listing options={numbers=none}
+\end{ltx-code}
+\egroup
+ \end{itemize}
+\item trois spécifiques à ces environnements :
+ \begin{docKey*}{title addon}{=\meta{supplément au titre}}{\valinitdef}
+ Cette option permet d'adjoindre un \meta{supplément au titre} de ces
+ exemples, qui sont par défaut et automatiquement \enquote{Exemple \meta{n}}.
+ \end{docKey*}
+ \begin{docKey*}{result width}{=\meta{longueur}}{\valinitdef[\docAuxCommand*{linewidth}]}
+ Cette option, utile seulement pour l'environnement
+ \refEnv{ltx-code-external-result}, permet de spécifier une largeur autre que
+ celle initiale pour le fichier image du résultat, compilé indépendamment de
+ la \lettre{}.
+ \end{docKey*}
+ \begin{docKey*}{reference text}{=\meta{texte}}{\valinitdef[Cf. exemple \meta{n} page \meta{q}.]}
+ Cette option n'a d'effet que :
+ \begin{itemize}
+ \item avec l'un ou l'autre des environnements \refEnv{ltx-code-result} et
+ \refEnv{ltx-code-external-result} ;
+ \item lorsque l'option \lstinline+sidebyside+ leur est passée ;
+ \item lorsque l'exemple s'avère se trouver sur une page autre que
+ celle de son point d'insertion.
+ \end{itemize}
+ Elle permet alors de surcharger le texte \enquote{Cf. exemple \meta{n} page
+ \meta{q}.} automatiquement inséré au point d'insertion de l'exemple
+ (cf.~\vref{wa-exemples-flottants})\footnote{Il est par exemple possible de
+ s'affranchir de ce texte en recourant à \lstinline+reference text=\{\}+.}.
+ \begin{dbwarning}{\refKey{reference text} avant \lstinline+sidebyside+}{}
+ Pour qu'elle soit prise en compte, l'option \refKey{reference text} doit
+ être passée \emph{avant} l'option \lstinline+sidebyside+.
+ \end{dbwarning}
+ \end{docKey*}
+\end{itemize}
+
+\begin{dbwarning}{Caractère d'échappement}{}
+ \lstset{escapechar=}%
+ La \letgutcls{} définit ×£× comme caractère d'échappement dans \LaTeX{} au
+ sein d'un code \LaTeX{}.
+\end{dbwarning}
+
+\section{Nouveautés apparues sur le \ctan}
+\label{sec:rubr-cons-aux}
+
+Afin de pouvoir plus aisément lister les nouveautés (packages et classes
+\hologo{(La)TeX}, etc.) apparues sur le \ctan{}, la \letgutcls{} fournit le
+nouvel environnement de liste \refEnv{ctannews}, similaire à l'environnement
+\docAuxEnvironment{description}.
+%
+\begin{docEnvironment}[doclang/environment content=liste des nouveautés]{ctannews}{}
+ Cet environnement permet de dresser la \meta{liste des nouveautés} apparues
+ sur le \ctan{}.
+\end{docEnvironment}
+%
+Chaque \meta{nouveauté} est introduite au moyen de la commande \refCom{item}
+suivante.
+\begin{docCommands}[
+ doc parameter = \oarg{nom},
+ ]
+ {
+ { doc name = item },
+ { doc name = item* },
+ }
+ %
+ Cette commande affiche le \meta{nom} de la \meta{nouveauté} comme ce serait le
+ cas pour le \enquote{label} d'une liste de description, ce qui permet ensuite
+ de décrire la \meta{nouveauté} en question. Le \meta{nom} est en outre un lien
+ hypertexte vers sa page sur le \ctan{}
+ (\url{https://ctan.org/pkg/}\meta{nom}).
+
+ La version étoilée \refCom{item*} est dédiée aux nouveautés œuvres de
+ contributeurs francophones et le logo de la francophonie, alors
+ automatiquement situé en regard dans la marge, les signale comme telles.
+\end{docCommands}
+
+\bgroup
+\lstset{deletekeywords=[3]{l},deletekeywords=[6]{hologo,matapli}}
+\begin{ltx-code-external-result}[title addon=nouveautés]{exemple-nouveautes}
+\begin{ctannews}
+\item[nl-interval] vise à simplifier le processus de représentation
+ graphique des intervalles de l'axe réel.
+\item*[matapli] classe \hologo{LaTeX} destinée à la composition
+ de la revue Matapli (conçue par \person{Chupin, Maxime},
+ secrétaire adjoint de \gutenberg{}).
+\end{ctannews}
+\end{ltx-code-external-result}
+\egroup
+
+\begin{docCommand}{francophony}{}
+ Cette commande affiche le logo de la francophonie, ainsi : \francophony.
+\end{docCommand}
+
+\section{Fiches de lecture}
+\label{sec:fiches-de-lecture}
+
+Les fiches de lecture d'un livre sont créées au moyen de l'environnement
+\refEnv{bookreview} suivant.
+
+\begin{docEnvironment}[doclang/environment content=fiche de lecture]{bookreview}{\marg{caractéristiques}}
+ Cet environnement permet de mettre en page une \meta{fiche de lecture}
+ caractérisée par les \meta{caractéristiques} suivantes qui sont, selon les
+ cas :
+ \begin{description}
+ \item[obligatoires :]
+ \begin{docKey}{title}{=\meta{titre}}{\valinitdef}
+ Cette clé permet de spécifier le \meta{titre} introductif de la fiche.
+ \end{docKey}
+ \begin{docKey}{reviewer}{=\meta{rapporteur}}{\valinitdef}
+ Cette clé permet de spécifier le \meta{rapporteur} de la fiche, à spécifier
+ selon la syntaxe de la commande \refCom{author}.
+ \end{docKey}
+ \begin{docKey}{bibkey}{=\meta{clé}}{\valinitdef}
+ Cette clé permet de spécifier la \meta{clé} identifiant l'entrée d'un
+ \file*{.bib} contenant les données bibliographiques du document rapporté.
+ \end{docKey}
+ \item[fortement conseillée :]
+ \begin{docKey}{frontcover}{=\meta{fichier}}{\valinitdef}
+ Cette clé permet de spécifier le \meta{fichier} image de la couverture du
+ document rapporté.
+ \end{docKey}
+ \item[facultative :]
+ \begin{docKey}{price}{=\meta{prix}}{\valinitdef}
+ Cette clé permet le cas échéant de spécifier le \meta{prix} du document rapporté.
+ \end{docKey}
+ \end{description}
+\end{docEnvironment}
+
+\section{Acronymes}
+\label{sec:acronymes}
+
+Nombreux sont les articles de la \lettre{} susceptibles de contenir des
+acronymes peut-être pas connus de tous. Aussi est-il opportun que, lors de leur
+première occurrence, ceux-ci soient explicités.
+
+Pour automatiser cela, la \letgutcls{} s'appuie sur le \package*{acro} ;
+toutefois, pour à la fois simplifier la création desdits acronymes et étendre
+(légèrement) les fonctionnalités offertes par \package{acro}, elle fournit la
+commande dédiée \refCom{letgutacro}.
+
+\begin{docCommand}{letgutacro}{\oarg{options}\marg{COURT}\marg{long}\oarg{traduction
+ française}}
+ \index{acronyme}%
+ Cette commande permet de créer un nouvel acronyme en spécifiant :
+ \begin{itemize}
+ \item sa forme courte \meta{COURT}, \emph{obligatoirement en grandes
+ capitales} ;
+ \item sa forme longue \meta{long}.
+ \end{itemize}
+ En outre, le 1\ier{} et 2\ieme{} arguments \emph{optionnels} permettent de,
+ respectivement :
+ \begin{itemize}
+ \item passer à la commande \docAuxCommand{DeclareAcronym} (de création
+ d'acronymes du \package*{acro} agissant en sous-main) des \meta{options} qui
+ lui sont propres, permettant ainsi de surcharger les options par défaut
+ passées à cette commande par \refCom{letgutacro} ;
+ \item signaler que l'acronyme provient de l'anglais et d'en spécifier la
+ \meta{traduction française} (éventuellement vide si celle-ci n'est pas
+ pertinente).
+ \end{itemize}
+
+ L'acronyme ainsi créé a pour identifiant \meta{court}, c'est-à-dire
+ la version \emph{en bas de casse} de \meta{COURT}, et peut donc
+ être employé au moyen des commandes fournies par le \package*{acro}, par
+ exemple :
+ \begin{itemize}
+ \item ×\ac{×\meta{court}×}×\footnote{Acronyme automatiquement affiché sous sa
+ forme complète à sa 1\iere{} occurrence, sous sa forme courte à ses
+ occurrences suivantes.} ;
+ \item ×\acs{×\meta{court}×}×\footnote{Acronyme affiché sous sa forme courte
+ seulement.}.
+ \end{itemize}
+ Toutefois, pour simplifier l'usage de ces acronymes, la \letgutcls{} crée
+ alors automatiquement une commande \docAuxCommand{\meta{court}}%
+ \footnote{%
+ Sauf si elle existe déjà, auquel cas la création d'une telle commande est
+ silencieusement escamotée. Ainsi par exemple, l'acronyme
+ %
+ \lstinline!\\letgutacro[...]\{TIKZ\}\{...\}[...]!
+ %
+ fourni par \letgut{} (cf. \vpageref{liste-acronymes}) ne surcharge-t-il
+ pas la commande \docAuxCommand{tikz} fournie notamment par le
+ \package*{tikz}.%
+ }
+ %
+ qui agit comme :
+ \begin{itemize}
+ \item ×\ac{×\meta{court}×}× en version non étoilée ;
+ \item ×\acs{×\meta{court}×}× en version étoilée.
+ \end{itemize}
+\end{docCommand}
+Ainsi, l'acronyme utilisé via \docAuxCommand{\meta{court}} figure, pour ses
+occurrences :
+\begin{description}
+\item[première :] sous la forme \meta{\textsc{court}}\footnote{C'est-à-dire
+ \meta{court} en petites capitales.} suivi d'une note de bas de
+ page contenant \enquote{\meta{long}.} ;
+\item[suivantes :] sous la forme \meta{\textsc{court}}.
+\end{description}
+
+En outre :
+\begin{itemize}
+\item cette commande peut être utilisée sans restriction en argument des
+ commandes \refCom{title}, \refCom{subtitle}, \refCom{section},
+ \refCom{subsection}, etc. et l'acronyme figure sous sa forme \meta{COURT} dans
+ les \foreignloc{bookmarks} (signets) ;
+\item un copié de \meta{\textsc{court}} colle \meta{COURT}.
+\end{itemize}
+
+\begin{dbwarning}{\refCom{letgutacro} : uniquement en préambule}{}
+ La définition d'acronymes au moyen de \refCom{letgutacro} ne peut se faire
+ qu'en préambule.
+\end{dbwarning}
+
+Ainsi, avec les définitions suivantes en préambule :
+
+\bgroup
+\lstset{deletekeywords={and},deletekeywords=[3]{and,emph,n,german},deletekeywords=[4]{and,TeX}}
+\begin{ltx-code}[title addon=définition d'acronymes,drop lifted shadow]
+% Acronyme français
+\letgutacro{LD}{\LaTeX{} dépendant}
+
+% Acronyme anglais avec traduction française
+\letgutacro{TLMGR}{\TeX~Live Manager}[gestionnaire \TeX~Live]
+
+% Acronyme anglais sans traduction française
+\letgutacro{CD}{Compact Disc}[]
+
+% Acronyme anglais avec surcharge :
+% - `short=no-op` : l'acronyme est « no-op » (en bas de casse)
+% et le nom de la commande sous-jacente ne peut être \no-op
+% (tiret interdit)
+% - `short-format=\upshape` : les petites capitales sont
+% désactivées
+\letgutacro[short=no-op,short-format=\upshape]
+{NOOP}
+{No Operation}
+[instruction nulle]
+
+% Acronyme en allemand :
+\letgutacro[
+ short=\emph{Ti\emph{k}Z},
+ short-format=\em,
+ foreign-babel=german,
+ foreign-locale=allemand]
+{TIKZ}
+{Ti\emph{k}Z ist \emph{kein} Zeichenprogramm}
+[Ti\emph{k}Z \emph{n'}est \emph{pas} un programme de dessin]
+\end{ltx-code}
+\egroup
+
+a-t-on :
+
+\bgroup
+\lstset{deletekeywords=[3]{cd,tikz,on},deletekeywords=[4]{on},deletekeywords=[6]{cd}}
+\begin{ltx-code-result}[title addon=utilisation d'acronymes]
+On dispose désormais pour \enquote{\LaTeX{} dépendant}
+d'un acronyme qu'on peut utiliser par exemple
+\begin{itemize}
+\item ainsi : \ac{ld} ou \acs{ld} ;
+\item ou bien ainsi : \ld{} ou \ld*{}.
+\end{itemize}
+
+On peut également employer les acronymes :
+\begin{itemize}
+\item \cd{}, \cd{} ;
+\item \tlmgr{}, \tlmgr{} ;
+\item \noop{}, \noop{} ;
+\item \ac{tikz}, \ac{tikz}. % Noter le non emploi de `\tikz'
+\end{itemize}
+\end{ltx-code-result}
+\egroup
+
+Les noms des commandes sous-jacentes ne doivent contenir que des lettres, mais
+celles-ci peuvent être accentuées. Ainsi, avec la définition suivante en
+préambule :
+
+\bgroup
+\lstset{deletekeywords=[3]{and}}
+\begin{ltx-code}[title addon=définition d'acronyme avec lettres
+ accentuées,drop lifted shadow]
+\letgutacro{CPGÉ}{Classes Préparatoires aux Grandes Écoles}
+\end{ltx-code}
+\egroup
+
+a-t-on :
+
+\bgroup
+\lstset{deletekeywords=[3]{l}}
+\begin{ltx-code-result}[title addon=utilisation d'acronyme avec lettres accentuées]
+On peut également employer l'acronyme \cpgé{}, \cpgé{}.
+\end{ltx-code-result}
+\egroup
+
+La \letgutcls{} fournit un \file*{letgut-acronyms.tex} dans lequel sont définis
+plusieurs acronymes anglais et français, directement utilisables. Ceux-ci sont
+répertoriés \vpageref{liste-acronymes}.
+
+\section{Séparateurs}
+\label{sec:filets}
+
+Il est parfois utile d'accentuer la séparation entre les articles de la
+\lettre. Ceci peut se faire au moyen de la commande \refCom{separator} qui
+insère un filet horizontal.
+
+\begin{docCommand}{separator}{}
+ \index{séparateur}%
+ Cette commande permet d'accentuer la séparation entre deux articles.
+\end{docCommand}
+
+\section{Boîtes d'alertes}
+\label{sec:boites-dalertes}
+
+\begin{docCommand}{alertbox}{ \oarg{couleur}\marg{texte} }
+ \index{alerte}%
+ Cette commande insère une boîte d'alerte :
+ \begin{itemize}
+ \item optionnellement de \meta{couleur} de fond (à spécifier selon le modèle
+ \enquote{\foreignloc{named}}) autre que celle par défaut\footnote{C'est-à-dire
+ \colorbox{letgut_default_alert_box_color}{celle-ci}% , nommée
+ % \docColor{letgut_default_alert_box_color} et égale
+ % à \docValue*{\letgutalertboxdefaultcolor}
+ .} ;
+ \item contenant le \meta{texte} (qui peut contenir plusieurs paragraphes).
+ \end{itemize}
+\end{docCommand}
+
+\bgroup
+\lstset{deletekeywords=[5]{en}}
+\begin{ltx-code-result}[title addon=boîtes d'alertes]
+\alertbox{%
+ Adhérez, adhérez, il en restera toujours quelque chose !%
+}
+\alertbox[yellow]{%
+ Adhérez, adhérez !
+
+ Il en restera toujours quelque chose...%
+}
+\end{ltx-code-result}
+\egroup
+
+\section{Fichier local de configuration}
+\label{sec:fichier-local-de}
+
+Chaque numéro de la \lettre{} nécessite certaines configurations locales :
+configuration dédiée au numéro en question, packages particuliers utilisés dans
+les articles, configurations propres du \package*{listings}, etc. Afin de ne pas
+encombrer le \file*{.tex} principal de la \lettre{}, un fichier de configuration
+locale nommé
+%
+\ExplSyntaxOn
+\file{
+ \tl_use:N \c__letgut_local_config_file_tl.tex
+}~
+\ExplSyntaxOff
+%
+est, si présent dans le répertoire courant, automatiquement inclus à la fin
+du préambule.
+
+\title{Aspects de la 1\iere{} page}
+\label{sec:mise-en-page}
+
+La première page de la \lettre{} comporte :
+\begin{itemize}
+\item une bannière sous forme d'un très grand \enquote{L} en noir sur lequel
+ figurent de la couleur de fond de la page, en gras, dans sa partie :
+ \begin{itemize}
+ \item verticale, \enquote{La} puis, chacune sur une ligne, les lettres du mot
+ \enquote{Lettre} en grandes capitales ;
+ \item horizontale, \enquote{\gut}.
+ \end{itemize}
+\item un très grand \enquote{g}, en filigrane et en gris clair.
+\end{itemize}
+La fonte de ces deux éléments est la principale utilisée (spécifiée au moyen de
+\docAuxCommand{setmainfont}).
+
+Pour ce faire, la classe charge le package maison \package{letgut-banner} qui
+n'est pas décrit ici.
+
+\title{Les dinosaures, leur écosystème et \letgut}
+\label{recours-docker}
+
+Pour à la fois :
+\begin{itemize}
+\item disposer d'une version suffisamment récente de \hologo{LuaLaTeX}
+ pour la présente \letgutcls{} (cf. \vref{wa-lualatex-recent}) ;
+\item éviter de perturber une installation existante de \hologo{(La)TeX} ;
+\end{itemize}
+on pourra recourir à \docker{}\footnote{Cerise sur le gâteau : un temps de
+ compilation éventuellement réduit de façon significative. Ainsi, celui de la
+ présente documentation est-il sur la machine de \person{Bitouzé, Denis} d'un
+ peu plus de \SI{13}{\s} avec \docker{} et de plus de \SI{30}{\s} par le biais
+ habituel.} dont cette section est un mode d'emploi :
+\begin{itemize}
+\item express ;
+\item axé sur Linux, mais qui devant s'appliquer au moins en partie aux autres
+ systèmes d'exploitation ;
+\item axé sur la \tl{}.
+\end{itemize}
+
+\begin{dbwarning}{Commande \software{sudo} peut-être nécessaire}{}
+ Les commandes \docker*{} ci-après ne sont pas précédées de \software{sudo}
+ mais, selon les systèmes d'exploitation, elles peuvent devoir l'être.
+\end{dbwarning}
+
+On commence par installer \docker*{} puis à lancer le service
+\docker*\footnote{Pour Ubuntu, cf. par exemple
+ \href{https://doc.ubuntu-fr.org/docker}{ce guide}.}.
+
+Ensuite, par exemple depuis un dossier où se trouve un \file*{mon-fichier.tex} (disons
+à compiler avec \hologo{LuaLaTeX}), on lance la longue commande suivante
+(\emph{qui doit être sur une seule ligne}\footnote{%
+ Pour la copier d'un seul bloc, il devrait suffire de \emph{copier} (et non de
+ \emph{cliquer sur}) l'icône suivante
+% \marginpar{%
+ \BeginAccSupp{method=plain,ActualText={%
+ docker run -i --rm --name latex -v "$PWD":/usr/src/app -w /usr/src/app registry.gitlab.com/islandoftex/images/texlive:latest-with-cache lualatex mon-fichier
+ }%
+ }%
+ \faCopy[regular]%$$
+ \EndAccSupp{}%
+% }%
+}) :
+
+% \begin{listingshell}
+% docker run --rm -it -v $(pwd):/workdir danteev/texlive lualatex mon-fichier
+% \end{listingshell}
+
+\begin{listingshell}
+docker run -i --rm --name latex -v "$PWD":/usr/src/app -w /usr/src/app registry.gitlab.com/islandoftex/images/texlive:latest-with-cache lualatex mon-fichier
+\end{listingshell}
+
+La toute première fois, cela provoque le téléchargement de plusieurs fichiers,
+dont celui assez lourd de l'image d'une version allégée de la \tl{}~2021
+(délestée des sources et des documentations) puis lance la compilation
+demandée.
+
+Pour simplifier les compilations ultérieures, on aura intérêt à créer dans son
+\file*{.bashrc} (ou \file{.zshrc}, etc.) un ou plusieurs alias de la forme :
+
+\begin{tcblisting}{listing only,breakable,listing options={style=tcblatex,language=bash}}
+alias docker-texlive='docker run -i --rm --name latex -v "$PWD":/usr/src/app -w /usr/src/app registry.gitlab.com/islandoftex/images/texlive:latest-with-cache'
+alias docker-pdflatex='docker-texlive pdflatex'
+alias docker-xelatex='docker-texlive xelatex'
+alias docker-lualatex='docker-texlive lualatex'
+alias docker-biber='docker-texlive biber'
+alias docker-makeglossaries='docker-texlive makeglossaries'
+alias docker-latexmk-pdf='docker-texlive latexmk -pdf'
+alias docker-latexmk-xe='docker-texlive latexmk -pdfxe'
+alias docker-latexmk-lua='docker-texlive latexmk -pdflua'
+\end{tcblisting}
+
+pour pouvoir compiler au moyen de seulement\footnote{En lançant préalablement
+ \lstinline[language=bash]+source ~/.bashrc+ (ou assimilé) afin de pouvoir en
+ bénéficier dans un terminal déjà ouvert.} :
+
+\begin{listingshell}
+docker-latexmk-lua mon-fichier
+\end{listingshell}
+
+\title{Packages chargés par \letgut{}}
+\label{sec:packages-charges-par}
+
+La \letgutcls{} charge en sous-main un certain nombre de packages utiles, voire
+nécessaires, à son codage. Elle en charge également certains pas indispensables,
+mais considérés comme \enquote{incontournables} pour que les auteurs de la
+\lettre{} puissent (aisément) composer un \enquote{joli} document. Nous en
+dressons ci-après la liste en les regroupant selon ces deux catégories.
+
+\section{Packages utiles aux auteurs de la \lettre{}}
+\label{sec:utiles-aux-auteurs}
+
+\begin{ctannews}
+\item[fontspec] fontes \otf{}.
+\item[microtype] raffinements subliminaux vers la perfection typographique.
+ \begin{description}
+ \item[Options :] \docAuxKey*{stretch=30}, \docAuxKey*{shrink=25},
+ \docAuxKey*{letterspace=150}.
+ \end{description}
+\item[graphicx] prise en charge améliorée des graphiques.
+\item[array] extension des environnements \docAuxEnvironment*{array} et
+ \docAuxEnvironment*{tabular}.
+\item[fancyvrb] notamment pour permettre l'usage de commandes \enquote{verbatim}
+ dans les notes de bas de page.
+\item[booktabs] tableaux de qualité.
+\item[csquotes] facilités de citations, en ligne et hors-texte, sensibles au
+ contexte.
+\item[amsmath] nombreux outils utiles pour la composition mathématique.
+\item[mathtools] étend les fonctionnalités et corrige certaines déficiences
+ d'\package{amsmath} et de \hologo{LaTeX}.
+ \begin{description}
+ \item[Option :] \docAuxKey*{fleqn}.
+ \end{description}
+\item[siunitx] aide à la saisie et à l'affichage cohérent des nombres, unités et
+ quantités.
+ \begin{description}
+ \item[Options :] \docAuxKey*{locale=FR}, \docAuxKey*{mode=text}.
+ \end{description}
+\item[hologo] collection de logos habituels (\hologo{LaTeX}, \hologo{LaTeX2e},
+ etc.) avec support pour les signets.
+\item[xcolor] accès facile, indépendant du pilote, à plusieurs types de teintes,
+ de nuances, de tons et de mélanges de couleurs arbitraires.
+ \begin{description}
+ \item[Option :] \docAuxKey*{table}.
+ \end{description}
+\item[ninecolors] sélection de couleurs avec contraste \wcag{} approprié.
+\item[tabularray] mise en page de tableaux et de matrices offrant une séparation
+ complète des contenus et styles. Ce package très récent (sorti le 14 mai 2021)
+ est utilisé dans le code de la classe pour la création de boîtes d'alertes
+ \enquote{légères}, c.-à-d. ne nécessitant notamment pas le chargement
+ (indirect) du package \ac{tikz} qui augmente significativement le temps de
+ compilation ; mais il pourrait (devrait) être utile également aux auteurs de
+ la \lettre{}.
+\item[babel] support multilingue.
+ \begin{description}
+ \item[Options :] \docAuxKey*{english}, \docAuxKey*{french} ;
+ \item[Configuration] \lstinline+\renewcommand*\frenchtablename{Tableau}+.
+ \end{description}
+\item[varioref] références de pages intelligentes.
+ \begin{description}
+ \item[Options :] \docAuxKey*{nospace}, \docAuxKey*{french}.
+ \end{description}
+\item[eurosym] symbole et montants en \euro{}.
+ \begin{description}
+ \item[Option :] \docAuxKey*{right}.
+ \end{description}
+\item[listings] composition des listings informatiques.
+ \begin{description}
+ \item[Options :] \docAuxKey*{basicstyle=\ttfamily}, \docAuxKey*{frame=single},
+ \docAuxKey*{belowskip=0pt}\footnote{Cette dernière option du fait
+ d'\href{https://github.com/FrankMittelbach/fmitex-parskip/issues/3}{un
+ problème actuel} impliquant les packages \package{parskip} et
+ \package{listings}.}.
+ \end{description}
+\item[floatrow] nombreuses possibilités de personnalisation de la disposition
+ des flottants.
+ \begin{description}
+ \item[Options :]\leavevmode{}
+ \begin{itemize}
+ \item \docAuxKey*{objectset=justified} ;
+ \item \docAuxKey*{style=__letgut_ruled}\footnote{Style propre à la classe.}
+ et \docAuxKey*{margins=hangleft} pour les figures ;
+ \item \docAuxKey*{capposition=top} pour les tableaux.
+ \end{itemize}
+ \end{description}
+\item[biblatex] bibliographies sophistiquées.
+ \begin{description}
+ \item[Option :] \docAuxKey*{sorting=none}.
+ \end{description}
+\item[acro] création simple d'acronymes\footnote{Pour la gestion des acronymes,
+ il était initialement prévu de recourir au \package*{glossaries-extra} mais
+ celui-ci augmente significativement le temps de compilation.}.
+ \begin{description}
+ \item[Options :]\leavevmode{}
+ \begin{itemize}
+ \item \docAuxKey*{first-style=footnote} ;
+ \item \docAuxKey*{format/short=}\lstinline|\scshape| ;
+ \item \docAuxKey*{format/foreign=}\lstinline|\em| ;
+ \item \docAuxKey*{foreign/display} ;
+ \item \docAuxKey*{locale/display} ;
+ \item \docAuxKey*{locale/format=}\lstinline|\upshape|.
+ \end{itemize}
+ \end{description}
+\item[hyperref] prise en charge étendue de l'hypertexte.
+ \begin{description}
+ \item[Options :]\leavevmode{}
+ \begin{itemize}
+ \item \docAuxKey*{draft} si l'option de classe \refKey{paper} est utilisée ;
+ \item \docAuxKey*{colorlinks}, \docAuxKey*{allcolors={letgut_allcolors_links}}
+ sinon.
+ \end{itemize}
+ \end{description}
+\item[hypcap] ajustement des ancres des légendes.
+ \begin{description}
+ \item[Option :] \docAuxKey*{all}.
+ \end{description}
+\item[cleveref] détermination automatique du format des références en fonction
+ du type de référence.
+ \begin{description}
+ \item[Option :] \docAuxKey*{french}.
+ \end{description}
+\item[lua-typo] mise en lumière, par un changement de couleur, des lignes
+ typographiquement imparfaites avec \hologo{LuaLaTeX}.
+ \begin{description}
+ \item[Option :] \docAuxKey*{All}.
+ \end{description}
+\end{ctannews}
+
+\section{Packages utiles au codage de la classe \letgut}
+\label{sec:utiles-au-codage}
+
+\begin{ctannews}
+\item[l3keys2e] traitement \hologo{LaTeX2e} des options de classe en utilisant
+ les clés \hologo{LaTeX3}.
+\item[parskip] mise en page de paragraphes séparés par un blanc vertical au lieu
+ (ou en plus) d'un retrait.
+\item[fancyhdr] contrôle étendu des en-têtes et des pieds de page.
+\item[geometry] interface flexible et complète pour les dimensions des
+ documents.
+ \begin{description}
+ \item[Options :] \docAuxKey*{a4paper}, \docAuxKey*{asymmetric}.
+ \end{description}
+\item[etoc] tables des matières entièrement personnalisables.
+\item[enumitem] contrôle de la mise en page de \docAuxEnvironment*{itemize},
+ \docAuxEnvironment*{enumerate}, \docAuxEnvironment*{description} et permet de
+ cloner les environnements standards et créer de nouveaux
+ environnements. Utilisé pour la création de l'environnement \refEnv{ctannews}.
+\item[titlesec] personnalisation aisée des titres de sections, etc.
+\item[placeins] contrôle du placement des flottants permettant de s'assurer que
+ ceux d'une section (donc d'un article dans le cas de la \lettre{})
+ apparaissent avant la commande \docAuxCommand*{section} suivante.
+ \begin{description}
+ \item[Options :] \docAuxKey*{section}, \docAuxKey*{above}.
+ \end{description}
+\item[accsupp] notamment remplacement de texte lors des copiés-collés, utilisé
+ en particulier pour que les acronymes, composés en petites capitales par
+ \letgut{}, une fois copiés, soient collés en grandes capitales.
+\item[letgut-banner] bannière de la 1\iere{} page de la \lettre{}.
+\end{ctannews}
+
+\printacronyms[
+, heading=title
+% , template=longtable
+, preamble={\label{liste-acronymes}}
+, display=all
+, exclude=thisdocument
+, name={Liste des acronymes prédéfinis par \letgut}
+]
+
+\printbibliography[heading=title]
+
+% \listoffigures
+% \listoftables
+\tcblistof[\title]{dbwarninglist}{Table des avertissements}%
+% \tcblistof[\title]{dbremarklist}{Table des remarques}%
+%
+\phantomsection
+\indexprologue{%
+ Afin de différencier leurs natures, les entrées de cet index sont affichées
+ en couleurs (variées) lorsqu'elles correspondent à des :
+ \begin{itemize}
+ \item commandes ;
+ \item environnements ;
+ \item clés ;
+ \item valeurs de clé ;
+ \end{itemize}
+}%
+% \renewcommand{\indexname}{Index des commandes}
+% \printindex[\jobname-commands]
+% %
+% \phantomsection
+% \indexprologue{%
+% Dans cet index, un numéro de page :
+% \begin{description}
+% \item[en gras] indique une page contenant une information importante sur
+% l'entrée correspondante, par exemple sa définition ;
+% \item[en italique] indique une page contenant un exemple qui illustre
+% l'entrée correspondante.
+% \end{description}
+% }%
+% \renewcommand{\indexname}{Index des concepts}
+\printindex
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-engine: luatex
+%%% TeX-master: t
+%%% End:
diff --git a/macros/luatex/latex/letgut/doc/listings-conf.tex b/macros/luatex/latex/letgut/doc/listings-conf.tex
new file mode 100644
index 0000000000..dd58a10716
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/listings-conf.tex
@@ -0,0 +1,40 @@
+\lstset{
+ backgroundcolor=\color{__letgut_backgroundCode},
+ rulecolor=\color{__letgut_borderCode},
+ frame=single,
+ aboveskip=\medskipamount,
+ breaklines=false,
+}
+
+\lstset{
+ language=TeX,%
+ alsolanguage=[geometry]TeX,%
+ alsolanguage=[LaTeX]TeX,%
+ alsolanguage=[plain]TeX,%
+ alsolanguage=[common]TeX,%
+ alsolanguage=[primitive]TeX,%
+ alsolanguage=[classes]TeX,%
+ alsolanguage=[xcolor]TeX,%
+ alsolanguage=[listings]TeX,%
+ alsolanguage=[biblatex]TeX,%
+ alsolanguage=[hyperref]TeX,%
+ alsolanguage=[xparse]TeX,%
+ alsolanguage=[lthooks]TeX,%
+ alsolanguage=[extLaTeX]TeX,%
+ alsolanguage=[letgut]TeX,%
+ alsolanguage=[hologo]TeX,%
+ alsolanguage=[acro]TeX,%
+ alsolanguage=[tcolorbox]TeX,%
+ alsolanguage=[graphicx]TeX,%
+ alsolanguage=[csquotes]TeX,%
+ alsolanguage=[varioref]TeX,%
+ alsolanguage=[babel-french]TeX,%
+ alsolanguage=[l3keys2e]TeX,%
+ alsolanguage=[expl3]TeX,%
+}
+
+% We need to disable `escapechar=£' enabled by the class in order to avoid this
+% to make a mess in the listing which contains it.
+\lstset{
+ escapechar=,%
+}
diff --git a/macros/luatex/latex/letgut/doc/localconf.tex b/macros/luatex/latex/letgut/doc/localconf.tex
new file mode 100644
index 0000000000..d7834205ee
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/localconf.tex
@@ -0,0 +1,187 @@
+% Pour de jolies icônes
+\usepackage{fontawesome5}
+
+% Pour l'index
+\usepackage[imakeidx]{xindex}
+\makeindex
+% Commande sans laquelle les numéros de pages de l'index ne seraient pas des
+% hyperliens
+\DeclareHookRule{env/document/begin}{xindex}{before}{hyperref}
+
+% La librairie suivante doit nécessairement être chargée après `imakeidx`
+\tcbuselibrary{%
+ documentation,theorems%
+}
+
+% Nous voulons que la commande \meta, fournie par la librairie `documentation'
+% du package `tcolorbox' affiche son argument en fonte à châsse fixe, en couleur
+% et sans correction d'italique.
+\AddToHook{cmd/meta@font@select/after}{%
+ \ttfamily%
+ \color{brown}%
+ \let\/\relax%
+}
+
+\makeatletter
+\lst@InputCatcodes
+\def\lst@DefEC{%
+ \lst@CCECUse \lst@ProcessLetter
+ ^^80^^81^^82^^83^^84^^85^^86^^87^^88^^89^^8a^^8b^^8c^^8d^^8e^^8f%
+ ^^90^^91^^92^^93^^94^^95^^96^^97^^98^^99^^9a^^9b^^9c^^9d^^9e^^9f%
+ ^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8^^a9^^aa^^ab^^ac^^ad^^ae^^af%
+ ^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8^^b9^^ba^^bb^^bc^^bd^^be^^bf%
+ ^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8^^c9^^ca^^cb^^cc^^cd^^ce^^cf%
+ ^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8^^d9^^da^^db^^dc^^dd^^de^^df%
+ ^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8^^e9^^ea^^eb^^ec^^ed^^ee^^ef%
+ ^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8^^f9^^fa^^fb^^fc^^fd^^fe^^ff%
+ ^^^^201c^^^^201d% nouveaux pour “ et ”
+ ^^00}
+\lst@RestoreCatcodes
+\makeatother
+
+\ExplSyntaxOn
+
+\lstMakeShortInline×
+
+\lstdefinelanguage{extrabash}{%
+ morekeywords={%
+ docker,docker-pdflatex,docker-lualatex
+ },%
+ alsoletter={-},%
+ sensitive%
+}
+
+\tcbset{%
+ doclang/environment~ content=contenu~ de~ l'environnement,%
+ doclang/color=~ (couleur),%
+ doclang/colors=Couleurs,%
+ doclang/environments=Environnements,%
+ doclang/keys=Clés,%
+ doclang/values=Valeurs,%
+ doclang/pageshort=p.,%
+ documentation~ listing~ style=dbtex,%
+ color~ command=__letgut_texcs,%
+ color~ environment=__letgut_environment,%
+ color~ key=__letgut_key,%
+ color~ value=__letgut_value,%
+ doc~ head={interior~ style={fill,color=yellow!20!white}},%
+ % index~ format=pgfchapter,%
+ index~ format=off,%
+ index~ colorize,%
+ index~ annotate=false,%
+ enhanced,%
+ % listing~ style=dbtex,%
+ % every~ box/.style={documentation~ listing~ style=dbtex},%
+ % index~ actual={},%
+ % doc~ left~ indent=-15mm,%
+ % doc~ right~ indent=-15mm+2em
+ keywords~ bold=false
+}%
+
+\DeclareTotalTCBox{\commandshell}{ v }{ commandshell}{#1}
+\newtcblisting{listingshell}[1][]{%
+ % colback=black,
+ % colupper=white,
+ colback=white,
+ colupper=black,
+ colframe=yellow!75!black,
+ breakable,
+ listing~ only,
+ listing~ options={%
+ style=tcblatex,
+ language=bash,
+ alsolanguage=extrabash,%
+ basicstyle=\footnotesize\ttfamily,
+ escapeinside={(*@}{@*)},
+ upquote=true,
+ showstringspaces=false
+ },
+ every~ listing~ line={%
+ \textcolor{red}{%
+ \small\ttfamily\bfseries%
+ \BeginAccSupp{method=plain,ActualText={}}
+ \$~
+ \EndAccSupp{}%
+ }
+ },
+ #1
+}
+
+\renewcommand*{\tcbdocnew}[1]{
+ \scriptsize\sffamily\textcolor{green!50!black}{\bfseries
+Nouv. :} #1}
+\renewcommand*{\tcbdocupdated}[1]{\scriptsize\sffamily\textcolor{blue!75!black}{\bfseries
+\textsc{m.-à-j.} :} #1}
+%
+
+\NewDocumentCommand \valinit { o }
+{
+ % valeurs~ :~
+ init.~
+ {
+ \em
+ \IfNoValueTF {#1}
+ { vide }
+ { #1 }
+ }
+}
+
+\NewDocumentCommand \valdef { o }
+{
+ par~ déf.~
+ {
+ \em
+ \IfNoValueTF {#1}
+ { aucune }
+ { #1 }
+ }
+}
+
+\NewDocumentCommand{\valinitdef}{ O{} o } {
+ \tl_if_blank:nTF {#1}
+ {
+ \valinit,~ \valdef[#2]
+ }
+ {
+ \valinit[#1],~ \valdef[#2]
+ }
+}
+
+\tcbset{dbtcb/.style={%
+ breakable,
+ fonttitle=\bfseries,
+ enlarge~ top~ by=1mm,
+ separator~ sign~ dash,
+ label~ separator=-,
+ before~ title={%
+ \hypersetup{hidelinks}%
+ \tcbset{%
+ color~ definition=white,
+ color~ hyperlink=white,
+ }%
+ },%
+ keywords~ bold=false,
+ }%
+}%
+
+\AddToHook{begindocument/before}{
+ \newtcbtheorem[list~inside=dbwarninglist,crefname={avertissement}{avertissements}]{dbwarning}{Avertissement}{%
+ colback=red!5!white,
+ colframe=red!75!black,
+ dbtcb
+ }{wa}
+ \newtcbtheorem[list~inside=dbremarklist,crefname={remarque}{remarques}]{dbremark}{Remarque}{%
+ colback=blue!5!white,
+ colframe=blue!75!black,
+ dbtcb
+ }{rq}
+}
+%
+\ExplSyntaxOff
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-engine: luatex
+%%% TeX-master: letgut
+%%% End:
diff --git a/macros/luatex/latex/letgut/doc/xindex-letgut.lua b/macros/luatex/latex/letgut/doc/xindex-letgut.lua
new file mode 100644
index 0000000000..3bd7e7cd02
--- /dev/null
+++ b/macros/luatex/latex/letgut/doc/xindex-letgut.lua
@@ -0,0 +1,94 @@
+-----------------------------------------------------------------------
+-- FILE: xindex-letgut.lua
+-- DESCRIPTION: configuration file for xindex.lua
+-- REQUIREMENTS:
+-- AUTHOR: Denis Bitouzé
+-- LICENSE: LPPL1.3
+--
+-- $Id: xindex-letgut.lua 22 2022-03-11 dbitouze $
+-----------------------------------------------------------------------
+
+if not modules then modules = { } end modules ['xindex-cfg'] = {
+ version = 0.41,
+ comment = "French configuration to xindex.lua",
+ author = "Denis Bitouzé",
+ copyright = "Denis Bitouzé",
+ license = "LPPL 1.3"
+}
+
+itemPageDelimiter = "," -- Hello, 14
+compressPages = true -- something like 12--15, instead of 12,13,14,15. the |( ... |) syntax is still valid
+fCompress = false -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5
+minCompress = 2 -- 14--17 or
+rangeSymbol = "-"
+numericPage = true -- for non numerical pagenumbers, like "VI-17"
+sublabels = {"", "\\,", "\\,", "\\,"} -- for the (sub(sub(sub-items first one is for item
+pageNoPrefixDel = "" -- a delimiter for page numbers like "VI-17" -- not used !!!
+indexOpening = "" -- commands after envStart
+idxnewletter = "\\textbf" -- Only valid if -n is not set
+envStart = "\\begin{theindex}"
+envStop = "\\end{theindex}"
+
+--[[
+ Each character's position in this array-like table determines its 'priority'.
+ Several characters in the same slot have the same 'priority'.
+]]
+alphabet_lower = { -- for sorting
+ { ' ' }, -- only for internal tests
+ { 'a', 'á', 'à', 'ä', 'â', 'å', 'æ', },
+ { 'b' },
+ { 'c', 'ç' },
+ { 'd' },
+ { 'e', 'é', 'è', 'ë', 'ê' },
+ { 'f' },
+ { 'g' },
+ { 'h' },
+ { 'i', 'í', 'ì', 'î', 'ï' },
+ { 'j' },
+ { 'k' },
+ { 'l' },
+ { 'm' },
+ { 'n', 'ñ' },
+ { 'o', 'ó', 'ò', 'ö', 'ô', 'ø', 'œ', 'ø'},
+ { 'p' },
+ { 'q' },
+ { 'r' },
+ { 's', 'š' },
+ { 'ss', 'ß' },
+ { 't' },
+ { 'u', 'ú', 'ù', 'ü' , 'û'},
+ { 'v' },
+ { 'w' },
+ { 'x' },
+ { 'y', 'ý', 'ÿ' },
+ { 'z', 'ž' }
+}
+alphabet_upper = { -- for sorting
+ { ' ' },
+ { 'A', 'Á', 'À', 'Ä', 'Å', 'Æ', 'Â' },
+ { 'B' },
+ { 'C', 'Ç' },
+ { 'D' },
+ { 'E', 'È', 'É', 'Ë', 'Ê' },
+ { 'F' },
+ { 'G' },
+ { 'H' },
+ { 'I', 'Í', 'Ì', 'Ï', 'Î' },
+ { 'J' },
+ { 'K' },
+ { 'L' },
+ { 'M' },
+ { 'N', 'Ñ' },
+ { 'O', 'Ó', 'Ò', 'Ö', 'Ø','Œ', 'Ø', 'Ô'},
+ { 'P' },
+ { 'Q' },
+ { 'R' },
+ { 'S', 'Š' },
+ { 'T' },
+ { 'U', 'Ú', 'Ù', 'Ü', 'Û' },
+ { 'V' },
+ { 'W' },
+ { 'X' },
+ { 'Y', 'Ý', 'Ÿ' },
+ { 'Z', 'Ž' }
+}
diff --git a/macros/luatex/latex/letgut/source/HOWTO.md b/macros/luatex/latex/letgut/source/HOWTO.md
new file mode 100644
index 0000000000..678ece4f0c
--- /dev/null
+++ b/macros/luatex/latex/letgut/source/HOWTO.md
@@ -0,0 +1,33 @@
+In order to:
+
+- tangle the `letgut.cls` and `letgut-banner.sty` files,
+- build the documentations `letgut-code.pdf` and `letgut-banner-code.pdf` of the
+ codes,
+
+from the Org Mode source files `letgut.org` and `letgut-banner.org`:
+
+- it is necessary a reasonably recent version of Emacs,
+- it is then sufficient to run (in a directory containing the `letgut.el` file
+ to be found in the current directory):
+ - for the `letgut` class:
+
+ emacs -Q letgut.org --batch -l letgut.el -f org-babel-tangle --kill
+ emacs -Q letgut.org --batch -l letgut.el -f org-latex-export-to-pdf --kill
+
+ - for the `letgut-banner` package:
+
+ emacs -Q letgut-banner.org --batch -l letgut.el -f org-babel-tangle --kill
+ emacs -Q letgut-banner.org --batch -l letgut.el -f org-latex-export-to-pdf --kill
+
+This creates the files `letgut.cls`, `letgut-banner.sty`, `letgut-code.tex` and
+`letgut-banner-code.tex`.
+
+One can then build the PDF files `letgut-code.pdf` and `letgut-banner-code.pdf`
+by running `latexmk` on each of the corresponding `.tex` files in a directory
+containing the following files to be found in the `.../doc/lualatex/letgut`
+directory: `latexmkrc`, `letgut.bib`, `letgut-code.pdf`, `letgut-code.tex`,
+`letgut.pdf`, `letgut.tex`, `listings-conf.tex`, `localconf.tex`, `README.md`,
+`xindex-letgut.lua`.
+
+Likewise, the user documentation `letgut.pdf` is built by running `latexmk` on
+the corresponding `.tex` file (which doesn't derive from an Org Mode file).
diff --git a/macros/luatex/latex/letgut/source/letgut-banner.org b/macros/luatex/latex/letgut/source/letgut-banner.org
new file mode 100644
index 0000000000..44fa5fdec9
--- /dev/null
+++ b/macros/luatex/latex/letgut/source/letgut-banner.org
@@ -0,0 +1,804 @@
+# Hey, Emacs! This is a -*- mode: org -*- file!
+
+#+TITLE: Support for the banner of the newsletter “La Lettre de GUTenberg”
+#+AUTHOR: Association GUTenberg
+#+EMAIL: secretariat@gutenberg.eu.org
+#+DESCRIPTION: ...
+#+KEYWORDS: ...
+#+LANGUAGE: en
+#+OPTIONS: num:t toc:nil title:nil
+
+#+LATEX_COMPILER: lualatex
+
+#+LaTeX_CLASS: letgut
+#+LaTeX_HEADER: \setmainfont{KpRoman}
+#+LaTeX_HEADER: \setsansfont{KpSans}
+#+LaTeX_HEADER: \setmonofont[Scale = MatchLowercase]{RobotoMono}
+#+LaTeX_HEADER: \letgutsetup{editorial=false}
+#+LaTeX_HEADER: \input{listings-conf}
+# #+LaTeX_HEADER: \input{codehigh-conf}
+# #+LaTeX_HEADER: \letgutsetup{editorial=false,final}
+
+#+PROPERTY: header-args :padline no :tangle letgut-banner.sty :exports both :noweb yes :eval always
+#+export_file_name: letgut-banner-code
+
+* Readme file :noexport:
+
+#+begin_src markdown :tangle README.md :exports none
+ letgut-banner - Support for the banner of the newsletter
+ “La Lettre de GUTenberg”
+ =============================================================
+
+ About
+ -------
+ This package automatically draw the banner of the newsletter “La Lettre de
+ GUTenberg” with the current main font.
+
+ Release
+ -------
+ 2022-03-18 v0.9
+
+ Development
+ -----------
+ Follow development, submit issues, and suggest improvements at
+ https://framagit.org/gutenberg/classe-lettre-gut.
+#+end_src
+
+* Identification
+
+#+begin_src latex
+% This is file `letgut.cls',
+% generated with the Emacs Org-babel utility.
+%
+% The original source file is letgut-banner.org
+%
+% -------------:| ---------------------------------------------------
+% letgut-banner:| Package for the banner of the newsletter
+% | “La Lettre GUTenberg”
+% Author:| Association GUTenberg
+% E-mail:| secretariat@gutenberg.eu.org
+% License:| Released under the LaTeX Project Public License
+% | v1.3c or later
+% See:| http://www.latex-project.org/lppl.txt
+%
+% Copyright (C) 1994-2022 by Association GUTenberg
+% <secretariat@gutenberg.eu.org>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License (LPPL), either
+% version 1.3c of this license or (at your option) any later
+% version. The latest version of this license is in the file:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This work is “maintained” (as per LPPL maintenance status)
+% by Association GUTenberg.
+#+end_src
+
+* Implementation
+
+These document classes can only be used with \LaTeXe, so we make
+sure that an appropriate message is displayed when another \TeX{}
+format is used.
+
+#+begin_src latex
+\NeedsTeXFormat{LaTeX2e}[2020-10-01]
+#+end_src
+
+Now, we can announce the package name and its version:
+
+#+begin_src latex
+\ProvidesExplPackage{letgut-banner}
+{2022-03-18}
+{0.9}
+{
+ Package for the banner of the newsletter “La Lettre de GUTenberg”
+}
+#+end_src
+
+** Packages loaded
+
+In order to provide class options, we load the \package{l3keys2e} which provides
+\LaTeXe{} option processing using \LaTeX3 keys:
+
+ #+begin_src latex
+\RequirePackage{l3keys2e}
+ #+end_src
+
+Till the Lua-based color will be added to the core \package{l3color} approach,
+we have to rely on \package{xcolor}
+
+#+begin_src latex
+\RequirePackage{xcolor}
+#+end_src
+
+We want the material added to the first page to be not selectable in order to let the
+reader who wants to copy the interesting text be able to select it (see below).
+
+#+begin_src latex
+\RequirePackage{accsupp}
+#+end_src
+
+What follows has to be done at this end of the preamble, otherwise the font set
+with ~\setmainfont~ in the preamble isn't taken in account in the banner.
+
+We define an option for the color of the text in the “L” (that has to be the
+same as the page color of the document).
+
+#+begin_src latex
+ \keys_define:nn { letgut-banner }
+ {
+ , pagecolor .clist_gset:N = \g__letgutbanner_pagecolor_clist
+ , pagecolor .initial:n = { 1,1,1 }
+ }
+ \ProcessKeysOptions { letgut-banner }
+#+end_src
+
+#+begin_src latex
+\AddToHook{begindocument}{
+#+end_src
+
+#+begin_src latex
+ \cs_generate_variant:Nn \color_fill:nn { nV }
+#+end_src
+
+** Declarations
+
+*** Dimensions
+
+ #+begin_src latex
+ \dim_new:N \g__letgutbanner_area_height_dim
+ \dim_new:N \g__letgutbanner_La_height_dim
+ \dim_new:N \g__letgutbanner_La_depth_dim
+ \dim_new:N \g__letgutbanner_La_yoffset_dim
+ \dim_new:N \g__letgutbanner_banner_vertical_contents_width_dim
+ \dim_new:N \g__letgutbanner_largest_LETR_box_height_dim
+ \dim_new:N \g__letgutbanner_between_letters_yoffset_dim
+ \dim_new:N \g__letgutbanner_between_letters_vertical_space_dim
+ \dim_new:N \g__letgutbanner_banner_padding_dim
+ \dim_if_exist:NF \g__letgutbanner_first_page_shrink_dim {
+ \dim_new:N \g__letgutbanner_first_page_shrink_dim
+ }
+ #+end_src
+
+- Dimensions of the page. If the present package is used with the
+ \class*{letgut}, they are borrowed from it. Otherwise, they are set to default
+ values. For this, we first generate a variant of ~\dim_const:Nn~ (see
+ https://github.com/latex3/latex3/issues/947#issuecomment-860950569).
+ #+begin_src latex
+ \cs_generate_variant:Nn \dim_const:Nn { NV }
+ \dim_if_exist:NTF \c__letgut_textheight_dim {
+ \dim_const:NV \c__letgutbanner_textheight_dim
+ \c__letgut_textheight_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_textheight_dim
+ { 25cm }
+ }
+ \dim_if_exist:NTF \c__letgut_textwidth_dim {
+ \dim_const:NV \c__letgutbanner_textwidth_dim
+ \c__letgut_textwidth_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_textwidth_dim
+ { 14cm }
+ }
+ \dim_if_exist:NTF \c__letgut_lmargin_dim {
+ \dim_const:NV \c__letgutbanner_lmargin_dim
+ \c__letgut_lmargin_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_lmargin_dim
+ { 5cm }
+ }
+ \dim_if_exist:NTF \c__letgut_tmargin_dim {
+ \dim_const:NV \c__letgutbanner_tmargin_dim
+ \c__letgut_tmargin_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_tmargin_dim
+ { 2.92cm }
+ % \dim_const:Nn \c__letgutbanner_tmargin_dim
+ % { 3cm }
+ }
+ \dim_if_exist:NTF \c__letgut_head_dim {
+ \dim_const:NV \c__letgutbanner_head_dim
+ \c__letgut_head_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_head_dim
+ { 0.6cm }
+ }
+ \dim_if_exist:NTF \c__letgut_headsep_dim {
+ \dim_const:NV \c__letgutbanner_headsep_dim
+ \c__letgut_headsep_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_headsep_dim
+ { 0.82cm }
+ % \dim_const:Nn \c__letgutbanner_headsep_dim
+ % { 0.9cm }
+ }
+ \dim_if_exist:NTF \c__letgut_marginparwidth_dim {
+ \dim_const:NV \c__letgutbanner_marginparwidth_dim
+ \c__letgut_marginparwidth_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_marginparwidth_dim
+ { 3.74cm }
+ }
+ #+end_src
+- Dimensions of the banner. If the present package is used with the
+ \class*{letgut}, they are borrowed from it. Otherwise, they are set to
+ default values.
+ - Thickness of the “L”.
+ #+begin_src latex
+ \dim_if_exist:NTF \c__letgut_banner_thickness_dim {
+ \dim_const:NV \c__letgutbanner_banner_thickness_dim
+ \c__letgut_banner_thickness_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_banner_thickness_dim
+ { 4cm }
+ }
+ #+end_src
+ - Height of the “L” (that of the text area plus 3cm).
+ #+begin_src latex
+ \dim_if_exist:NTF \c__letgut_banner_height_dim {
+ \dim_const:NV \c__letgutbanner_banner_height_dim
+ \c__letgut_banner_height_dim
+ }{
+ \dim_const:Nn \c__letgutbanner_banner_height_dim {
+ \c__letgutbanner_textheight_dim
+ +
+ 3cm
+ }
+ }
+ #+end_src
+ - Initial padding of the text embedded in the vertical bar of the “L”.
+ #+begin_src latex
+ \dim_const:Nn \c__letgutbanner_banner_padding_dim { .25cm }
+ #+end_src
+ - Width of the “L” (the width ($w$) of the text zone plus the width ($l$) of
+ the left margin minus half the difference between the width of the left
+ margin and the width ($d$) of the “L”: $=w+l-(l-d)/2=w+(l+d)/2$).
+ #+begin_src latex
+ \dim_const:Nn \c__letgutbanner_banner_width_dim {
+ \c__letgutbanner_textwidth_dim
+ +
+ (
+ \c__letgutbanner_banner_thickness_dim
+ +
+ \c__letgutbanner_lmargin_dim
+ )/2
+ }
+ #+end_src
+ - Initial width of the text embedded in the “L” vertical bar.
+ #+begin_src latex
+ \dim_const:Nn
+ \c__letgutbanner_banner_vertical_contents_width_dim {
+ \c__letgutbanner_banner_thickness_dim
+ -
+ 2\c__letgutbanner_banner_padding_dim
+ }
+ #+end_src
+ - Width of the text embedded in the horizontal bar of the “L” (of the text
+ area plus half the difference between that of the left margin and that of
+ the thickness of the “L”, minus the padding -- and not 2 times the
+ padding because this text will be stuck to its left “margin”).
+ #+begin_src latex
+ \dim_const:Nn
+ \c__letgutbanner_banner_horizontal_contents_width_dim {
+ \c__letgutbanner_textwidth_dim
+ - (
+ \c__letgutbanner_banner_thickness_dim
+ -
+ \c__letgutbanner_lmargin_dim
+ )/2
+ -
+ \c__letgutbanner_banner_padding_dim
+ }
+ #+end_src
+
+*** Boxes
+
+New boxes, for each of the letters in the word “LETTRE” (!), and then for the
+rest of the content listed in the banner.
+#+begin_src latex
+\box_new:N \g__letgutbanner_L_box
+\box_new:N \g__letgutbanner_E_box
+\box_new:N \g__letgutbanner_T_box
+\box_new:N \g__letgutbanner_R_box
+\box_new:N \g__letgutbanner_La_box
+\box_new:N \g__letgutbanner_GUTenberg_box
+\box_new:N \g__letgutbanner_largest_LETR_box
+\box_new:N \g__letgutbanner_g_box
+#+end_src
+
+*** Floating point numbers
+
+- Minimum percentage of the common height of the letters of the word “LETTRE”
+ that their line spacing must represent.
+#+begin_src latex
+\fp_const:Nn \c__letgutbanner_leading_minimum_percent_fp { 0.15 }
+#+end_src
+- Factor applied to the line spacing between “La” and the 1st letter of
+ “LETTRE” compared to that between the letters of “LETTRE”.
+#+begin_src latex
+\fp_const:Nn \c__letgutbanner_leading_La_factor_fp { 1.5 }
+#+end_src
+
+** Application des dimensions de la page
+
+#+begin_src latex
+ \geometry{
+ asymmetric,
+ textheight = \c__letgutbanner_textheight_dim,
+ textwidth = \c__letgutbanner_textwidth_dim,
+ lmargin = \c__letgutbanner_lmargin_dim,
+ tmargin = \c__letgutbanner_tmargin_dim,
+ head = \c__letgutbanner_head_dim,
+ headsep = \c__letgutbanner_headsep_dim,
+ marginparwidth= \c__letgutbanner_marginparwidth_dim,
+ % showframe,
+ % verbose,
+ }
+#+end_src
+
+** Filling of the boxes
+#+begin_src latex
+ \hbox_gset:Nn \g__letgutbanner_L_box { \textbf{L} }
+ \hbox_gset:Nn \g__letgutbanner_E_box { \textbf{E} }
+ \hbox_gset:Nn \g__letgutbanner_T_box { \textbf{T} }
+ \hbox_gset:Nn \g__letgutbanner_R_box { \textbf{R} }
+ \hbox_gset:Nn \g__letgutbanner_La_box { \textbf{\textit{La}} }
+ \hbox_gset:Nn \g__letgutbanner_GUTenberg_box {
+ \textbf{\textit{GUTenberg}}
+ }
+ \hbox_gset:Nn \g__letgutbanner_g_box { \textbf{g} }
+#+end_src
+
+** Computations
+
+Determination of the widths of each of the letter boxes of the word “LETTRE”.
+#+begin_src latex
+ \dim_const:Nn \c__letgutbanner_L_width_dim {
+ \box_wd:N \g__letgutbanner_L_box
+ }
+ \dim_const:Nn \c__letgutbanner_E_width_dim {
+ \box_wd:N \g__letgutbanner_E_box
+ }
+ \dim_const:Nn \c__letgutbanner_T_width_dim {
+ \box_wd:N \g__letgutbanner_T_box
+ }
+ \dim_const:Nn \c__letgutbanner_R_width_dim {
+ \box_wd:N \g__letgutbanner_R_box
+ }
+#+end_src
+Determination of the largest of these widths, stored in the scratch dimension
+~\g_tmpa_dim~.
+#+begin_src latex
+\dim_gset:Nn \g_tmpa_dim {
+ \fp_eval:n {
+ max (
+ \c__letgutbanner_L_width_dim,
+ \c__letgutbanner_E_width_dim,
+ \c__letgutbanner_T_width_dim,
+ \c__letgutbanner_R_width_dim,
+ )
+ }pt
+}
+#+end_src
+Determination of the (1st) box whose width is the largest of all (~argmax~, as
+it were).
+#+begin_src latex
+\box_gset_eq:NN \g__letgutbanner_largest_LETR_box \dim_case:nnF
+{ \g_tmpa_dim }
+{
+ { \c__letgutbanner_L_width_dim } { \g__letgutbanner_L_box }
+ { \c__letgutbanner_E_width_dim } { \g__letgutbanner_E_box }
+ { \c__letgutbanner_T_width_dim } { \g__letgutbanner_T_box }
+ { \c__letgutbanner_R_width_dim } { \g__letgutbanner_R_box }
+}
+{ No~ idea! }
+#+end_src
+Resize the box containing “GUTenberg” to the width of the text embedded in the
+horizontal bar of the “L”.
+#+begin_src latex
+ \box_gresize_to_wd:Nn \g__letgutbanner_GUTenberg_box {
+ \c__letgutbanner_banner_horizontal_contents_width_dim
+ }
+#+end_src
+Determination of the height and depth of the box containing “GUTenberg” resized.
+#+begin_src latex
+ \dim_const:Nn \c__letgutbanner_GUTenberg_height_dim {
+ \box_ht:N \g__letgutbanner_GUTenberg_box
+ }
+ \dim_const:Nn \c__letgutbanner_GUTenberg_depth_dim {
+ \box_dp:N \g__letgutbanner_GUTenberg_box
+ }
+#+end_src
+Determining the size of the vertical offset of the box containing the resized
+“GUTenberg”, so that it is vertically centered in the horizontal bar of the “L”:
+the box positioned in $0$ would be at the very bottom of the box containing the
+banner so with base line at the bottom the horizontal bar of the “L” so we raise
+it first by its depth ($d$) and then by half the difference between the heights
+($H$) of the horizontal bar of the “L” and ($h+d$) total of the box containing
+“GUTenberg” resized ($=d+H/2-(h+d)/2=(H-h+d)/2$).
+#+begin_src latex
+ \dim_const:Nn \c__letgutbanner_GUTenberg_yoffset_dim {
+ (
+ \c__letgutbanner_banner_thickness_dim
+ -
+ \c__letgutbanner_GUTenberg_height_dim
+ +
+ \c__letgutbanner_GUTenberg_depth_dim
+ )/2
+ }
+#+end_src
+Once the height of the zone devoted to “La LETTRE” in the vertical bar of the
+“L” has been fixed, the line spacing between the letters of the word “LETTRE”
+depends in fact only on the width occupied by the widest of them, by definition
+equal to the width allocated to the text embedded in the vertical bar of the
+“L”. The latter, stored in ~\g__letgutbanner_banner_vertical_contents_width_dim~, is
+initially fixed:
+#+begin_src latex
+ \dim_gset:Nn
+ \g__letgutbanner_banner_vertical_contents_width_dim
+ \c__letgutbanner_banner_vertical_contents_width_dim
+#+end_src
+but, to avoid this line spacing being too small (or even negative), we test that
+it is greater than a certain threshold, equal to a certain minimum percentage of
+the height common to the letters of the word “LETTRE”, stored in:
+
+~\c__letgutbanner_leading_minimum_percent_fp~
+
+and fixed at 0.15. If this is not the
+case, we reduce (by 1pt):
+
+~\g__letgutbanner_banner_vertical_contents_width_dim~
+
+and loop until it is the case.
+#+begin_src latex
+ \dim_do_until:nNnn {
+ \g__letgutbanner_between_letters_vertical_space_dim
+ }
+ >
+ {
+ \fp_use:N\c__letgutbanner_leading_minimum_percent_fp
+ \g__letgutbanner_largest_LETR_box_height_dim
+ }{
+#+end_src
+Resize the largest of these boxes to the width of the text embedded in the “L”.
+#+begin_src latex
+ \box_gresize_to_wd:Nn \g__letgutbanner_largest_LETR_box {
+ \g__letgutbanner_banner_vertical_contents_width_dim
+ }
+#+end_src
+Height of this resized larger box.
+#+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_largest_LETR_box_height_dim {
+ \box_ht:N \g__letgutbanner_largest_LETR_box
+ }
+#+end_src
+Resize the boxes for each of the letters in the word “LETTRE” so that they are
+all the same height as the widest of them.
+#+begin_src latex
+ \box_gresize_to_ht:Nn \g__letgutbanner_L_box {
+ \g__letgutbanner_largest_LETR_box_height_dim
+ }
+ \box_gresize_to_ht:Nn \g__letgutbanner_E_box {
+ \g__letgutbanner_largest_LETR_box_height_dim
+ }
+ \box_gresize_to_ht:Nn \g__letgutbanner_T_box {
+ \g__letgutbanner_largest_LETR_box_height_dim
+ }
+ \box_gresize_to_ht:Nn \g__letgutbanner_R_box {
+ \g__letgutbanner_largest_LETR_box_height_dim
+ }
+#+end_src
+Resize the box containing “La” to the width of the text embedded in the “L”
+vertical bar.
+#+begin_src latex
+ \box_gresize_to_wd:Nn \g__letgutbanner_La_box {
+ \g__letgutbanner_banner_vertical_contents_width_dim
+ }
+#+end_src
+Determine the height ($h$) and depth ($d$) of the resized box containing “La”.
+#+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_La_height_dim {
+ \box_ht:N \g__letgutbanner_La_box
+ }
+ \dim_gset:Nn \g__letgutbanner_La_depth_dim {
+ \box_dp:N \g__letgutbanner_La_box
+ }
+#+end_src
+Determining the size of the vertical offset of the resized box containing “La”
+so that its top is, relative to the top of the “L”, offset by the same amount as
+the bottom of the box containing “GUTenberg” is offset from the bottom of the
+“L” (i.e., the distance from the top of the page to the top of “La” and the
+distance from the bottom of the page to the baseline of “GUTenberg” are
+identical).
+#+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_La_yoffset_dim {
+ \c__letgutbanner_banner_height_dim
+ -
+ \c__letgutbanner_GUTenberg_yoffset_dim
+ -
+ \g__letgutbanner_La_height_dim
+ +
+ \g__letgutbanner_La_depth_dim
+ }
+#+end_src
+For the following, the area containing the letters of the word “LETTRE” aligned
+vertically is fixed, defined as follows:
+ - its top is the baseline of “La”,
+ - its bottom is the baseline of “GUTenberg”.
+Determination of the height of this area.
+#+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_area_height_dim {
+ \g__letgutbanner_La_yoffset_dim
+ -
+ \g__letgutbanner_La_depth_dim
+ -
+ \c__letgutbanner_GUTenberg_yoffset_dim
+ }
+#+end_src
+Determining the vertical jump ($s$) between the letters in the word “LETTRE”
+with the constraints that:
+ - the top of the 1st letter (“L”) is $3e/2$ below the top of the area (where
+ $e$ is the common vertical space separating the letters of the word
+ “LETTRE”),
+ - the baseline of the last letter (“E”) is merged with the bottom of the area,
+ - this jump must not be less than 20 % of the common height $h$ to all these
+ letters i.e.:
+
+ ~\g__letgutbanner_largest_LETR_box_height_dim~
+
+ otherwise the size of the largest of these boxes is reduced to less than the
+ width of the text embedded in the “L”.
+
+The sum of :
+ - the 5 vertical spaces ($5e$) between the letters in the word “LETTRE”,
+ - the 6 common heights ($6h$) to all these letters,
+ - $3e/2$,
+must equal the height ($H$) of the zone. So we have $H=3e/2+5e+6h$, that is
+$e=2(H-6h)/13$. Once initialized, the vertical jump between the letters is
+$s=e+h$ that is $s=(2H+h)/13$. Therefore:
+
+1. Determine the vertical half-space between the letters.
+ #+begin_src latex
+ \dim_set:Nn \l_tmpa_dim {
+ (
+ \g__letgutbanner_area_height_dim
+ -
+ 6\g__letgutbanner_largest_LETR_box_height_dim
+ )/13
+ }
+ #+end_src
+2. Vertical space between letters.
+ #+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_between_letters_vertical_space_dim {
+ 2\l_tmpa_dim
+ }
+ #+end_src
+3. If this space does not check the condition explained above, we reduce:
+
+ ~\g__letgutbanner_banner_vertical_contents_width_dim~
+
+ and loop.
+ #+begin_src latex
+ \dim_gsub:Nn \g__letgutbanner_banner_vertical_contents_width_dim {
+ 1pt
+ }
+ }
+ #+end_src
+The width allocated to the text embedded in the vertical bar of the “L” may have
+been re-evaluated, so the padding (which must be symmetrical) may have changed
+as well.
+ #+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_banner_padding_dim {
+ (
+ \c__letgutbanner_banner_thickness_dim
+ -
+ \g__letgutbanner_banner_vertical_contents_width_dim
+ )/2
+ }
+ #+end_src
+4. Determination of the vertical offset of the 1st letter (“L”).
+ #+begin_src latex
+ \dim_const:Nn \c__letgutbanner_first_letter_yoffset_dim {
+ \g__letgutbanner_La_yoffset_dim
+ -
+ \g__letgutbanner_largest_LETR_box_height_dim
+ -
+ \fp_use:N \c__letgutbanner_leading_La_factor_fp
+ \g__letgutbanner_between_letters_vertical_space_dim
+ }
+ #+end_src
+5. Determination of the vertical jump between letters.
+ #+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_between_letters_yoffset_dim {
+ \g__letgutbanner_between_letters_vertical_space_dim
+ +
+ \g__letgutbanner_largest_LETR_box_height_dim
+ }
+ #+end_src
+Resize the box containing “g” to the width of the text.
+#+begin_src latex
+ \box_gresize_to_wd:Nn \g__letgutbanner_g_box {
+ \c__letgutbanner_textwidth_dim
+ }
+#+end_src
+Calculates the size by which the height of the text box on the 1st page must be
+reduced so that the banner does not encroach on the text. Relative to the top of
+the page:
+ - the top of the horizontal bar of “L” is at a distance equal to the sum of :
+ - the distance between this top of page and the top of the vertical bar of
+ “L”, equal to the height ($p$) of the paper minus the height ($l$) of “L”
+#+begin_src latex
+ \dim_gset:Nn \g__letgutbanner_first_page_shrink_dim {
+ \c__letgutbanner_tmargin_dim
+ +
+ \c__letgutbanner_textheight_dim
+ +
+ \c__letgutbanner_banner_thickness_dim
+ -
+ .5\paperheight
+ -
+ .5\c__letgutbanner_banner_height_dim
+ +
+ .5\baselineskip
+ }
+#+end_src
+Automatic addition on the 1st page (only) of the banner.
+#+begin_src latex
+\AddToHookNext{shipout/background}{
+#+end_src
+We want the material added to this page to be not selectable in order to let the
+reader who wants to copy the interesting text be able to select it.
+#+begin_src latex
+ \BeginAccSupp{ActualText={}}
+#+end_src
+We put now the big “L” at the right place.
+#+begin_src latex
+ \put(
+ .5\c__letgutbanner_lmargin_dim-.5\c__letgutbanner_banner_thickness_dim
+ ,
+ -.5\paperheight-.5\c__letgutbanner_banner_height_dim
+ ){
+ \put(0,0){
+ \rule{
+ \c__letgutbanner_banner_width_dim
+ }{
+ \c__letgutbanner_banner_thickness_dim
+ }
+ }
+ \put(0,0){
+ \rule{
+ \c__letgutbanner_banner_thickness_dim
+ }{
+ \c__letgutbanner_banner_height_dim
+ }
+ }
+ #+end_src
+The color should not be systematically white, but should be identical to the one
+chosen for the page background.
+#+begin_src latex
+ % \color_fill:nV {rgb}{ \g__letgutbanner_pagecolor_clist }
+ \color[rgb]{ \g__letgutbanner_pagecolor_clist }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \g__letgutbanner_La_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_La_box
+ }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \c__letgutbanner_first_letter_yoffset_dim
+ -0\g__letgutbanner_between_letters_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_L_box
+ }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \c__letgutbanner_first_letter_yoffset_dim
+ -1\g__letgutbanner_between_letters_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_E_box
+ }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \c__letgutbanner_first_letter_yoffset_dim
+ -2\g__letgutbanner_between_letters_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_T_box
+ }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \c__letgutbanner_first_letter_yoffset_dim
+ -3\g__letgutbanner_between_letters_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_T_box
+ }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \c__letgutbanner_first_letter_yoffset_dim
+ -4\g__letgutbanner_between_letters_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_R_box
+ }
+ \put(
+ \g__letgutbanner_banner_padding_dim
+ ,
+ \c__letgutbanner_first_letter_yoffset_dim
+ -5\g__letgutbanner_between_letters_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_E_box
+ }
+ \put(
+ \c__letgutbanner_banner_thickness_dim
+ ,
+ \c__letgutbanner_GUTenberg_yoffset_dim
+ ){
+ \box_use:N \g__letgutbanner_GUTenberg_box
+ }
+ % \color_fill:n {black!10}
+ \color{ black!10 }
+ \put(
+ .5\c__letgutbanner_lmargin_dim+.5\c__letgutbanner_banner_thickness_dim
+ ,
+ .5\paperheight
+ +
+ .5\c__letgutbanner_banner_height_dim
+ -
+ \c__letgutbanner_tmargin_dim
+ ){
+ \box_move_down:nn {.5\c__letgutbanner_textheight_dim}
+ {\box_use:N \g__letgutbanner_g_box}
+ }
+}
+ #+end_src
+ We end the part which isn't selectable.
+ #+begin_src latex
+ \EndAccSupp{}
+ }
+#+end_src
+
+We close ~\AddToHook{begindocument}~.
+
+#+begin_src latex
+}
+#+end_src
+
+If the package is used with another class than \class{letgut}, we reduce the
+textheight of the first page of the height of the horizontal bar of the “L”.
+
+#+begin_src latex
+\@ifclassloaded{letgut}{
+}{
+ \AddToHook{begindocument/end}{%
+ \enlargethispage{
+ - \g__letgutbanner_first_page_shrink_dim
+ }
+ \thispagestyle{empty}
+ }
+}
+#+end_src
+
+* Example file (=letgut-banner-example.tex=)
+
+#+begin_src latex :tangle letgut-banner-example.tex :exports both
+ \documentclass[twoside]{article}
+ \usepackage{fontspec}
+ \usepackage[a4paper]{geometry}
+ \usepackage{fancyhdr}
+ \usepackage{letgut-banner}
+ \usepackage{lipsum}
+ \setmainfont{TeX Gyre Schola}
+ \fancyhf{}
+ \fancyhead[RO,LE]{\thepage}
+ \fancyhead[RE,LO]{Test~\textsf{letgut-banner}}
+ \pagestyle{fancy}
+ \begin{document}
+ \lipsum[1-20]
+ \end{document}
+#+end_src
diff --git a/macros/luatex/latex/letgut/source/letgut.org b/macros/luatex/latex/letgut/source/letgut.org
new file mode 100644
index 0000000000..11bd545dec
--- /dev/null
+++ b/macros/luatex/latex/letgut/source/letgut.org
@@ -0,0 +1,3405 @@
+# Hey, Emacs! This is a -*- mode: org -*- file!
+
+#+TITLE: Support for the newsletter “La Lettre GUTenberg”
+#+AUTHOR: Association GUTenberg
+#+EMAIL: secretariat@gutenberg.eu.org
+#+DESCRIPTION: ...
+#+KEYWORDS: ...
+#+LANGUAGE: en
+#+OPTIONS: num:t toc:nil title:nil
+
+#+LATEX_COMPILER: lualatex
+
+#+LaTeX_CLASS: letgut
+#+LaTeX_HEADER: \setmainfont{KpRoman}
+#+LaTeX_HEADER: \setsansfont{KpSans}
+#+LaTeX_HEADER: \setmonofont[Scale = MatchLowercase]{RobotoMono}
+#+LaTeX_HEADER: \letgutsetup{editorial=false}
+#+LaTeX_HEADER: \input{listings-conf}
+# #+LaTeX_HEADER: \input{codehigh-conf}
+# #+LaTeX_HEADER: \letgutsetup{editorial=false,final}
+
+#+PROPERTY: header-args :padline no :tangle letgut.cls :exports both :noweb yes :eval always
+#+export_file_name: letgut-code
+
+* Changelog file :noexport:
+
+#+begin_src markdown :tangle CHANGELOG.md
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic
+Versioning](http://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [0.9] - 2022-03-18
+
+### Added First public testing release
+#+end_src
+
+* Readme file :noexport:
+
+#+begin_src markdown :tangle README.md
+letgut - Support for the newsletter “La Lettre GUTenberg”
+=========================================================
+
+About
+-------
+This bundle includes a LaTeX class, a `.sty` file and an acronym file dedicated
+to the newsletter “La Lettre GUTenberg” of GUTenberg, the French TeX User Group.
+
+Release
+-------
+2022-03-18 v0.9
+
+Development
+-----------
+Follow development, submit issues and suggest improvements at
+https://framagit.org/gutenberg/classe-lettre-gut.
+#+end_src
+
+* How to :noexport:
+
+We explain in a \file*{HOWTO.md} file how to:
+
+- tangle the \file*{letgut.cls} and \file*{letgut-banner.sty},
+- build the:
+ - documented codes \file*{letgut-code.pdf} and \file*{letgut-banner-code.pdf}
+ of the classe and the package,
+ - \file*{letgut.pdf} of the class
+
+from the \software[https://orgmode.org/]{Org Mode} source files
+\file*{letgut.org} and \file*{letgut-banner.org}.
+
+#+begin_src markdown :tangle HOWTO.md :exports none
+In order to:
+
+- tangle the `letgut.cls` and `letgut-banner.sty` files,
+- build the documentations `letgut-code.pdf` and `letgut-banner-code.pdf` of the
+ codes,
+
+from the Org Mode source files `letgut.org` and `letgut-banner.org`:
+
+- it is necessary a reasonably recent version of Emacs,
+- it is then sufficient to run (in a directory containing the `letgut.el` file
+ to be found in the current directory):
+ - for the `letgut` class:
+
+ emacs -Q letgut.org --batch -l letgut.el -f org-babel-tangle --kill
+ emacs -Q letgut.org --batch -l letgut.el -f org-latex-export-to-pdf --kill
+
+ - for the `letgut-banner` package:
+
+ emacs -Q letgut-banner.org --batch -l letgut.el -f org-babel-tangle --kill
+ emacs -Q letgut-banner.org --batch -l letgut.el -f org-latex-export-to-pdf --kill
+
+This creates the files `letgut.cls`, `letgut-banner.sty`, `letgut-code.tex` and
+`letgut-banner-code.tex`.
+
+One can then build the PDF files `letgut-code.pdf` and `letgut-banner-code.pdf`
+by running `latexmk` on each of the corresponding `.tex` files in a directory
+containing the following files to be found in the `.../doc/lualatex/letgut`
+directory: `latexmkrc`, `letgut.bib`, `letgut-code.pdf`, `letgut-code.tex`,
+`letgut.pdf`, `letgut.tex`, `listings-conf.tex`, `localconf.tex`, `README.md`,
+`xindex-letgut.lua`.
+
+Likewise, the user documentation `letgut.pdf` is built by running `latexmk` on
+the corresponding `.tex` file (which doesn't derive from an Org Mode file).
+#+end_src
+
+* Identification
+
+#+begin_src latex
+% This is file `letgut.cls',
+% generated with the Emacs Org-babel utility.
+%
+% The original source file is letgut.org
+%
+% -------:| ----------------------------------------------------
+% letgut:| Class for the newsletter “La Lettre GUTenberg”
+% Author:| Association GUTenberg
+% E-mail:| secretariat@gutenberg.eu.org
+% License:| Released under the LaTeX Project Public License
+% | v1.3c or later
+% See:| http://www.latex-project.org/lppl.txt
+%
+% Copyright (C) 1994-2022 by Association GUTenberg
+% <secretariat@gutenberg.eu.org>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License (LPPL), either
+% version 1.3c of this license or (at your option) any later
+% version. The latest version of this license is in the file:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This work is “maintained” (as per LPPL maintenance status)
+% by Association GUTenberg.
+%
+#+end_src
+
+* Debugging
+
+#+begin_src latex
+% \RequirePackage[
+% , check-declarations
+% , enable-debug
+% , backend=luatex
+% ]{expl3}
+#+end_src
+
+* Implementation
+
+These document classes can only be used with \LaTeXe, so we make
+sure that an appropriate message is displayed when another \TeX{}
+format is used.
+
+#+begin_src latex
+\NeedsTeXFormat{LaTeX2e}[2020-10-01]
+#+end_src
+
+We define some constant token lists immediately useful.
+
+#+begin_src latex
+ \ExplSyntaxOn
+ \tl_const:Nn \c__letgut_Lettre_tl { \emph{ Lettre } }
+ \tl_const:Nn \c__letgut_gutenberg_tl { GUTenberg }
+ \tl_const:Nn \c__letgut_Lettre_gutenberg_tl {
+ \c__letgut_Lettre_tl~\c_space_tl \c__letgut_gutenberg_tl
+ }
+ \tl_const:Nn \c__letgut_la_lettre_gutenberg_tl {
+ la~ \c__letgut_Lettre_gutenberg_tl
+ }
+ \tl_const:Nn \c__letgut_La_lettre_gutenberg_tl {
+ \text_titlecase_first:n \c__letgut_la_lettre_gutenberg_tl
+ }
+ \ExplSyntaxOff
+#+end_src
+
+Now, we can announce the class name and its version:
+
+#+begin_src latex
+ \ProvidesExplClass{letgut}
+ {2022-03-18}
+ {0.9}
+ {
+ Class~ for~ the~ newsletter~
+ “\c__letgut_La_lettre_gutenberg_tl”
+ }
+#+end_src
+
+** Messages
+
+We specify the messages come from a class, which is letgut (see
+\url{https://github.com/latex3/latex3/issues/887}).
+
+#+begin_src latex
+ \prop_gput:Nnn \g_msg_module_type_prop { letgut } { Class }
+#+end_src
+
+Some messages are declared for future use.
+
+#+begin_src latex
+ \msg_new:nnn{letgut}{Wrong~engine}{
+ The~ letgut~ class~ requires~ LuaTeX.\\\\
+ You~ must~ change~ your~ typesetting~ engine~ to~
+ “lualatex”~ instead~ of~ “latex”~ or~ “pdflatex”
+ or~ “xelatex”.
+ }
+ \msg_new:nnn{letgut}{Existing~command}{
+ The~ command~ \c_backslash_str \text_lowercase:n{#1}~
+ already~ exists~ and~ has~ not~ be~ overwritten~ by~
+ \token_to_str:N \letgutacro{#1}{...}.~
+ The~ corresponding~ acronym~ has~ to~ be~ used~ e.g.~
+ like~ this:~
+ \token_to_str:N \ac{ \text_lowercase:n{#1} }.
+ }
+ \msg_new:nnn{letgut}{Not~month~iso~date}{
+ The~ supplied~ date~(“#1”)~ isn't~ at~ the~ month~ iso~
+ date~ format~ (YYYY-MM):~ it~ will~ be~ printed~ as~
+ it~ is.
+ }
+ \msg_new:nnn{letgut}{Banner~file~not~provided}{
+ No~ `\c__letgut_banner_file_tl.pdf'~ file~ provided:~
+ the~ banner~ will~ be~ automatically~ created.
+ }
+ \msg_new:nnn{letgut}{Editorial~file~missing}{
+ File~`\c__letgut_editorial_file_tl.tex'~missing!~
+ The~ editorial~ will~ be~ missing.
+ }
+ \msg_new:nnn{letgut}{Informations~file~missing}{
+ File~ `\c__letgut_informations_gutenberg_file_tl.tex'~
+ missing!~ The~ informations~ about~
+ \c__letgut_gutenberg_tl\c_space_tl~ will~ be~ missing.
+ }
+ \msg_new:nnn{letgut}{pagecolor~inoperative~with~paper~option}{
+ The~ `pagecolor=#1`~ option~ is~ inoperative~ with~ the~ `paper`~
+ option:~ the~ color~ of~ the~ page~ will~ remain~ white.
+ }
+ \msg_new:nnn{letgut}{frontcover-missing}{
+ You~ didn't~ use~ the~ `frontcover`~ option~ for~ the~
+ bookreview~ “#1”,~ so~ the~ book~ cover~image~ will~ be~ missing:~
+ are~ you~ sure?
+ }
+ \msg_new:nnn{letgut}{frontcover-file-not-found}{
+ The~ book~ cover~ image~ `#2`~ you~ specified~ via~ the~
+ `frontcover`~ option~ for~ the~ bookreview~ “#1”~ cannot~ be~ found.
+ }
+#+end_src
+
+** Engine checking
+
+#+begin_src latex
+ \sys_if_engine_luatex:F {
+ \msg_fatal:nn{letgut}{Wrong~engine}
+ }
+#+end_src
+
+** Declarations
+
+*** Booleans
+
+- For testing the emptyness of the title.
+ #+begin_src latex
+ \bool_new:N \g__letgut_title_empty_bool
+ #+end_src
+- For the paper (or not) output.
+ #+begin_src latex
+ \bool_new:N \g__letgut_paper_bool
+ #+end_src
+- For testing whether we currently are in a footnote or not.
+ #+begin_src latex
+ \bool_new:N \l__letgut_in_footnote_bool
+ #+end_src
+
+*** Dimensions
+
+- Geometry of the document
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_textheight_dim { 25cm }
+ \dim_const:Nn \c__letgut_textwidth_dim { 14cm }
+ \dim_const:Nn \c__letgut_lmargin_dim { 5cm }
+ \dim_const:Nn \c__letgut_tmargin_dim { 2.92cm }
+ % \dim_const:Nn \c__letgut_tmargin_dim { 3cm }
+ \dim_const:Nn \c__letgut_head_dim { 0.6cm }
+ \dim_const:Nn \c__letgut_headsep_dim { 0.82cm }
+ % \dim_const:Nn \c__letgut_headsep_dim { 0.9cm }
+ \dim_const:Nn \c__letgut_marginparwidth_dim { 3.74cm }
+ #+end_src
+- Horizontal offset of the headers and the sections titles:
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_hoffset_dim { 3cm }
+ \dim_const:Nn \c__letgut_title_hoffset_dim {
+ -\c__letgut_hoffset_dim
+ }
+ \dim_const:Nn \c__letgut_subtitle_hoffset_dim {
+ \c__letgut_title_hoffset_dim
+ }
+ \dim_const:Nn \c__letgut_section_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 1cm
+ }
+ \dim_const:Nn \c__letgut_subsection_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 1.5cm
+ }
+ \dim_const:Nn \c__letgut_subsubsection_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 2cm
+ }
+ \dim_const:Nn \c__letgut_paragraph_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 2.5cm
+ }
+ \dim_const:Nn \c__letgut_subparagraph_hoffset_dim {
+ \c__letgut_title_hoffset_dim + 3cm
+ }
+ #+end_src
+- Distance between the baseline of the header text and the decorative line:
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_head_rule_skip_dim { 0.115cm }
+ #+end_src
+- Head rule width:
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_head_rule_width_dim { 0.03cm }
+ #+end_src
+- Dimensions of the banner.
+ - Thickness of the “L”.
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_banner_thickness_dim { 4cm }
+ #+end_src
+ - Height of the “L” (that of the text area plus 3cm).
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_banner_height_dim {
+ \c__letgut_textheight_dim
+ +
+ 3cm
+ }
+ #+end_src
+- Height of the membership reminder box.
+ #+begin_src latex
+ \dim_new:N \g__letgut_membership_reminder_box_height_dim
+ #+end_src
+- Horizontal space for the frontcover in the margin in book reviews.
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_bookreview_frontcover_margin_sep_dim {
+ 4mm
+ }
+ #+end_src
+- Dimensions used by the listings and the examples.
+#+begin_src latex
+ \dim_const:Nn \c__letgut_height_mentions_dim { 5mm }
+ \dim_const:Nn \c__letgut_from_left_boundingbox_to_text_dim { 5.5mm }
+ \dim_const:Nn \c__letgut_number_offset_dim { 1mm }
+ \dim_const:Nn \c__letgut_number_sep_dim {
+ \c__letgut_from_left_boundingbox_to_text_dim
+ +
+ \c__letgut_number_offset_dim
+ }
+#+end_src
+
+*** Skips (lengths with rubber components)
+
+ The following skips, borrowed from the standard classes, are specified in
+ ~ex~ unit, which depends on the font used and hence have to be specified
+ after the class has been loaded; in fact, we postpone this at the end of the
+ preamble, when the font is specified (thanks to ~\setmainfont~).
+
+#+begin_src latex
+ \AddToHook{begindocument/before}{%
+#+end_src
+
+Before and after:
+
+ - “titles titles”:
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_title_title_skip
+ {
+ 3.5ex plus 1ex minus .2ex
+ }
+ \skip_const:Nn \c__letgut_after_title_title_skip
+ {
+ 2.3ex plus .2ex
+ }
+ #+end_src
+ - subtitles titles:
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_subtitle_title_skip
+ {
+ \c__letgut_before_title_title_skip
+ }
+ \skip_const:Nn \c__letgut_after_subtitle_title_skip
+ {
+ \c__letgut_after_title_title_skip
+ }
+ #+end_src
+ - sections titles:
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_section_title_skip
+ {
+ 3.25ex plus 1ex minus .2ex
+ }
+ \skip_const:Nn \c__letgut_after_section_title_skip
+ {
+ 1.5ex plus .2ex
+ }
+ #+end_src
+ - subsections titles (identical to the sections ones):
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_subsection_title_skip
+ {
+ \c__letgut_before_section_title_skip
+ }
+ \skip_const:Nn \c__letgut_after_subsection_title_skip
+ {
+ \c__letgut_after_section_title_skip
+ }
+ #+end_src
+ - paragraphs titles:
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_subsubsection_title_skip
+ {
+ 1.5ex plus .5ex minus .2ex
+ }
+ \skip_const:Nn \c__letgut_after_subsubsection_title_skip
+ {
+ 0.75ex plus 0.1ex
+ }
+ #+end_src
+ - paragraphs titles (identical to the subsubsection ones):
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_paragraph_title_skip
+ {
+ \c__letgut_before_subsubsection_title_skip
+ }
+ \skip_const:Nn \c__letgut_after_paragraph_title_skip
+ {
+ \c__letgut_after_subsubsection_title_skip
+ }
+ #+end_src
+ - subparagraphs titles (identical to the paragraph ones):
+ #+begin_src latex
+ \skip_const:Nn \c__letgut_before_subparagraph_title_skip
+ {
+ \c__letgut_before_paragraph_title_skip
+ }
+ \skip_const:Nn \c__letgut_after_subparagraph_title_skip
+ {
+ \c__letgut_after_paragraph_title_skip
+ }
+ #+end_src
+
+We close the ~\AddToHook{begindocument/before}~ argument.
+
+#+begin_src latex
+}
+#+end_src
+
+
+*** Integers
+ #+begin_src latex
+\int_new:N \g__letgut_ltx_example_int
+ #+end_src
+
+*** Strings
+
+ #+begin_src latex
+\str_new:N \g__letgut_label_ltx_example_str
+\str_new:N \g__letgut_callout_label_ltx_example_str
+\str_const:Nn \c__letgut_label_ltx_example_str {
+ __letgut_label_ltx_example
+}
+\str_const:Nn \c__letgut_callout_label_ltx_example_str {
+ __letgut_callout_label_ltx_example
+}
+ #+end_src
+
+*** Token lists
+
+**** Constant ones
+
+ #+begin_src latex
+ \tl_const:Nn \c__letgut_cahier_tl { \emph{ Cahier } }
+ \tl_const:Nn \c__letgut_cahiers_tl {
+ \c__letgut_cahier_tl \emph{ s }
+ }
+ \tl_const:Nn \c__letgut_tugboat_tl { \emph{ TUGboat } }
+ \tl_const:Nn \c__letgut_banner_file_tl { bandeau }
+ \tl_const:Nn \c__letgut_editorial_file_tl { editorial }
+ \tl_const:Nn \c__letgut_informations_gutenberg_file_tl {
+ informations-gut
+ }
+ \tl_const:Nn \c__letgut_acronyms_file_tl { letgut-acronyms }
+ \tl_const:Nn \c__letgut_local_config_file_tl { localconf }
+ \tl_const:Nn \c__letgut_contents_name_tl { Sommaire }
+ \tl_const:Nn \c__letgut_draftwatermark_text_tl {
+ \textnormal{Brouillon}
+ }
+ \tl_const:Nn \c__letgut_membership_reminder_tl {
+ {\LARGE
+ \bfseries
+ Avez-vous~ pensé~ à~ régler~ votre~ cotisation~ ?
+ % \the\year~ ?
+ \par
+ \medskip
+ }
+ Si~ vous~ avez~ oublié,~ ce~ n'est~ ni~ trop~ tard~
+ ni~ difficile~ :
+ \par
+ \url{http://gutenberg.eu.org/?Adherer-en-ligne}
+ \bool_if:NT \g__letgut_informations_bool {
+ \file_if_exist:nT
+ {./\c__letgut_informations_gutenberg_file_tl}{
+ \par
+ Voir~ aussi~ page~ \pageref{letgut_label_adhesions}.
+ }
+ }
+ }
+ \tl_const:Nn \c__letgut_missing_editorial_tl {
+ Ne~ pas~ omettre~ l'éditorial~ !\\(à~ faire~ figurer~
+ dans~ un~ \file*{\c__letgut_editorial_file_tl.tex}~
+ dans~ le~ dossier~ courant)
+ }
+ \tl_const:Nn \c__letgut_missing_infomations_tl {
+ Ne~ pas~ omettre~ les~ informations~ sur~
+ \c__letgut_gutenberg_tl{}~ !\\(dans~ un~
+ \file*{\c__letgut_informations_gutenberg_file_tl.tex}~
+ situé~ dans~ le~ dossier~ courant)
+ }
+ \tl_const:Nn \c__letgut_default_alert_box_color_tl {
+ gray9
+ }
+ \tl_const:Nn \c__letgut_default_allcolors_links_color_tl
+ {
+ teal!60!black
+ }
+ #+end_src
+
+**** Variables ones
+
+ #+begin_src latex
+ \tl_new:N \g__letgut_mark_tl
+ \tl_new:N \g__letgut_title_tl
+ \tl_new:N \l_letgut_last_name_tl
+ \tl_new:N \l_letgut_first_name_tl
+ \tl_new:N \l_letgut_title_tl
+ \tl_new:N \l__letgut_title_addon_tl
+ \tl_new:N \l__letgut_reference_text_tl
+ #+end_src
+
+*** Comma separated lists
+
+#+begin_src latex
+ \clist_new:N \g__letgut_pagecolor_clist
+ \clist_const:Nn \c__letgut_default_pagecolor_screen_clist
+ {1.0, 0.98, 0.94}
+ \clist_const:Nn \c__letgut_default_pagecolor_paper_clist
+ {1, 1, 1}
+#+end_src
+
+*** Sequences
+
+#+begin_src latex
+ \seq_new:N \l__letgut_first_last_names_items_seq
+#+end_src
+
+** Class options
+
+In order to provide class options, we load the \package{l3keys2e} which provides
+\LaTeXe{} option processing using \LaTeX3 keys:
+
+ #+begin_src latex
+ \RequirePackage{l3keys2e}
+ #+end_src
+
+We define the 2 load time options for the target audience:
+
+- ~for-readers~ (the default), for the “normal” “Lettre”,
+- ~for-authors~, (only) the author(s) of an article of the “Lettre”.
+
+#+begin_src latex
+ \keys_define:nn { letgut }
+ {
+ , for-readers .bool_gset:N = \g__letgut_for_readers_bool
+ , for-readers .initial:n = { true }
+ , for-readers .default:n = { true }
+ , for-authors .bool_gset_inverse:N = \g__letgut_for_readers_bool
+ }
+ \ProcessKeysOptions { letgut }
+#+end_src
+
+** Class and package loading
+
+The \letgutcls{} is based on the ~article~ class. It is by default two sided
+because of the alternating headers, and will by typeset with ~11pt~ as global
+font size.
+
+#+begin_src latex
+ \LoadClass[twoside,11pt]{article}
+#+end_src
+
+We now load some packages.
+
+- The \letgutcls{} will have to be used with LuaLaTeX. Hence the font selection
+ package for XeLaTeX and LuaLaTeX.
+ #+begin_src latex
+ \RequirePackage{fontspec}
+ #+end_src
+- For subliminal refinements towards typographical perfection.
+ #+begin_src latex
+ \RequirePackage[
+ , stretch=30
+ , shrink=25
+ , letterspace=150
+ ]{microtype}
+ #+end_src
+- Help in implementing paragraph layouts where the paragraphs are separated by
+ a vertical space instead of (or in addition to) indenting them.
+ #+begin_src latex
+ \RequirePackage{parskip}
+ #+end_src
+- Extensive control of page headers and footers in \LaTeXe.
+ #+begin_src latex
+ \RequirePackage{fancyhdr}
+ #+end_src
+- Flexible and complete interface to document dimensions.
+ #+begin_src latex
+ \RequirePackage[a4paper]{geometry}
+ #+end_src
+- Enhanced support for graphics.
+ #+begin_src latex
+\RequirePackage{graphicx}
+ #+end_src
+- Extending the array and tabular environments.
+ #+begin_src latex
+\RequirePackage{array}
+ #+end_src
+- Completely customisable TOCs.
+ #+begin_src latex
+\RequirePackage{etoc}
+ #+end_src
+- Control layout of itemize, enumerate, description, and design our own lists.
+ #+begin_src latex
+\RequirePackage{enumitem}
+ #+end_src
+- Select alternative section titles.
+ #+begin_src latex
+\RequirePackage{titlesec}
+ #+end_src
+- Several logos and ornaments.
+ #+begin_src latex
+\RequirePackage{fourier-orns}
+ #+end_src
+- Control float placement.
+ #+begin_src latex
+\RequirePackage[section,above]{placeins}
+ #+end_src
+- Sophisticated verbatim text.
+ #+begin_src latex
+\RequirePackage{fancyvrb}
+ #+end_src
+- Publication quality tables in LaTeX.
+ #+begin_src latex
+\RequirePackage{booktabs}
+ #+end_src
+- Context sensitive quotation facilities.
+ #+begin_src latex
+\RequirePackage{csquotes}
+ #+end_src
+- Mathematical tools to use with (and which loads) \package{amsmath}.
+ #+begin_src latex
+\RequirePackage[fleqn]{mathtools}
+ #+end_src
+- Better accessibility support for PDF files. This package is used because we
+ want the material added to the background (banner on the first page and draft
+ watermark) to be not selectable in order to let the reader who wants to copy
+ the interesting text be able to select it.
+#+begin_src latex
+ \RequirePackage{accsupp}
+#+end_src
+- A comprehensive (SI) units package.
+ #+begin_src latex
+ \RequirePackage{siunitx}
+ #+end_src
+- A collection of logos with bookmark support.
+ #+begin_src latex
+ \RequirePackage{hologo}
+ #+end_src
+- Driver-independent color extensions.
+ #+begin_src latex
+ \RequirePackage[table]{xcolor}
+ #+end_src
+- Coloured boxes, for LaTeX examples and theorems, etc.
+ #+begin_src latex
+\RequirePackage{tcolorbox}
+ #+end_src
+- Expandable macros to extract the data from references and allow counter
+ assignments or calculations.
+ #+begin_src latex
+\RequirePackage{refcount}
+ #+end_src
+- Select colors with proper WCAG color contrast.
+ #+begin_src latex
+ \RequirePackage{ninecolors}
+ #+end_src
+- Typeset tabulars and arrays with LaTeX3 (for the alert boxes typeset as
+ simple tabulars).
+ #+begin_src latex
+\RequirePackage{tabularray}
+ #+end_src
+- Multilingual support for Plain TeX or LaTeX.
+ #+begin_src latex
+\RequirePackage[english,french]{babel}
+ #+end_src
+- Intelligent page references.
+ #+begin_src latex
+\RequirePackage[nospace,french]{varioref}
+ #+end_src
+- Macros for Euro sign.
+ #+begin_src latex
+\RequirePackage[right]{eurosym}
+ #+end_src
+- Typeset source code listings using LaTeX.
+ #+begin_src latex
+\RequirePackage{listings}
+ #+end_src
+- Modifying the layout of floats.
+ #+begin_src latex
+\RequirePackage{floatrow}
+ #+end_src
+- Sophisticated Bibliographies in LaTeX.
+ #+begin_src latex
+ \RequirePackage[
+ sorting=none,
+ datamodel=letgut,
+ citestyle=letgut
+ ]{biblatex}
+ #+end_src
+- Typeset acronyms.
+ #+begin_src latex
+\RequirePackage{acro}
+ #+end_src
+
+The following packages have to be the last ones loaded. So we ensure this by
+loading them just before the begining of the document:
+#+begin_src latex
+\AddToHook{begindocument/before}{
+#+end_src
+- Extensive support for hypertext in LaTeX
+ #+begin_src latex
+ \RequirePackage{hyperref}
+ #+end_src
+- Adjusting the anchors of captions
+ #+begin_src latex
+ \RequirePackage[all]{hypcap}
+ #+end_src
+- Intelligent cross-referencing
+ #+begin_src latex
+ \RequirePackage[french]{cleveref}
+ #+end_src
+We close the ~\AddToHook{begindocument/before}~ argument.
+#+begin_src latex
+ }
+#+end_src
+
+** Settings for the loaded packages
+
+- We switch to the French typographic conventions for \package{siunitx}.
+ #+begin_src latex
+ \sisetup{
+ , locale=FR
+ , mode=text
+ }
+ #+end_src
+- Concerning floats, we ask:
+ - the caption text will be justified,
+ - the figures and their captions to be boxed (in order to distiguish them from
+ the current text),
+ - the tables to have their captions above them.
+ #+begin_src latex
+ \DeclareMarginSet{hangleft}{
+ \setfloatmargins{\hskip-\c__letgut_hoffset_dim}{\hfil}
+ }
+ \DeclareFloatVCode{__letgut_ruleabove}{
+ \par\rule{\hsize}{.8pt}\vskip4pt\par
+ }
+ \DeclareFloatVCode{__letgut_rulebelow}{
+ \par\vskip2pt\rule{\hsize}{.8pt}\par
+ }
+ \DeclareFloatStyle{__letgut_ruled}{
+ precode=__letgut_ruleabove,
+ postcode=__letgut_rulebelow,
+ % heightadjust=all,
+ floatwidth=.8\linewidth
+ }
+ \floatsetup{objectset=justified}
+ \floatsetup[figure]{
+ style=__letgut_ruled,
+ margins=hangleft,
+ capposition=beside,
+ capbesideposition={top,left},
+ floatwidth=0.85\textwidth
+ }
+ \floatsetup[table]{capposition=top}
+ #+end_src
+ Moreover, the tables will be entitled \enquote{tableau} instead of
+ \enquote{table}.
+ #+begin_src latex
+ \renewcommand*\frenchtablename{Tableau}
+ #+end_src
+- We fix some defaults for the listings : we define a style for all the listings
+ which resets all the \TeX{} control sequences/keywords and then load all the
+ basic (La)TeX dialects of TeX. But we start with a dialect which is missing in
+ the \package*{listings}.
+ #+begin_src latex
+ \lstdefinelanguage[classes]{TeX}[LaTeX]{TeX}{%
+ % Control sequences
+ moretexcs={%
+ abovecaptionskip,abstractname,appendix,appendixname,
+ arraycolsep,arrayrulewidth,author,backmatter,baselinestretch,
+ belowcaptionskip,bf,bibindent,bibname,bigskipamount,
+ bottomfraction,brokenpenalty,cal,chapter,chaptermark,
+ chaptername,clubpenalty,columnsep,columnseprule,contentsname,
+ date,dblfloatpagefraction,dblfloatsep,dbltextfloatsep,
+ dbltopfraction,descriptionlabel,displaywidowpenalty,
+ doublerulesep,evensidemargin,fboxrule,fboxsep,figurename,
+ floatpagefraction,floatsep,footins,footnoterule,footnotesep,
+ footnotesize,footskip,frontmatter,headheight,headsep,huge,Huge,
+ indexname,indexspace,interlinepenalty,intextsep,it,jot,
+ labelenumi,labelenumii,labelenumiii,labelenumiv,labelitemfont,
+ labelitemi,labelitemii,labelitemiii,labelitemiv,labelsep,
+ labelwidth,large,Large,LARGE,leftmargin,leftmargini,
+ leftmarginii,leftmarginiii,leftmarginiv,leftmarginv,
+ leftmarginvi,lineskip,listfigurename,listoffigures,
+ listoftables,listtablename,mainmatter,maketitle,marginparpush,
+ marginparsep,marginparwidth,maxdepth,medskipamount,mit,
+ newblock,normallineskip,normalsize,oddsidemargin,paragraph,
+ paragraphmark,parindent,parskip,part,partname,partopsep,
+ postdisplaypenalty,predisplaypenalty,refname,rm,sc,scriptsize,
+ section,sectionmark,sf,sl,small,smallskipamount,subitem,
+ subparagraph,subparagraphmark,subsection,subsectionmark,
+ subsubitem,subsubsection,subsubsectionmark,tabbingsep,
+ tabcolsep,tablename,tableofcontents,textfloatsep,textfraction,
+ textheight,textwidth,thechapter,theenumi,theenumii,theenumiii,
+ theenumiv,theequation,theparagraph,thepart,thesection,
+ thesubparagraph,thesubsection,thesubsubsection,tiny,title,
+ today,topfraction,topmargin,topskip,tt,widowpenalty,
+ },%
+ % Keywords of class 1 : keywords that contain other characters
+ % (since of the same class as the ones specified as
+ % 'otherkeywords')
+ morekeywords={%
+ %
+ },%
+ % Keywords of class 2 : environments names
+ morekeywords=[2]{%
+ abstract,description,figure,quotation,quote,table,
+ thebibliography,theindex,titlepage,verse%
+ },%
+ % Keywords of class 3 : mandatory arguments (not environments)
+ % & optional arguments which are keys (in key=value)
+ morekeywords=[3]{%
+ },%
+ % Keywords of class 4 : values of keys (in key=value)
+ morekeywords=[4]{%
+ },%
+ % Keywords of class 5 : arguments specifications (after “:”
+ % in expl3 syntax)
+ morekeywords=[5]{%
+ },%
+ % Keywords of class 6 : current package name (and possibly
+ % derived packages)
+ morekeywords=[6]{%
+ a0poster,aalok,aastex631,abntex2,achemso,acmart,acmconf,
+ active-conf,adfathesis,afparticle,afthesis,aguplus,aiaa-tc,
+ akklecture,akkscript,akktecdoc,akletter,myletter,ametsoc,
+ amsart,amsbook,amsdtx,amsldoc,amsproc,aomart,apa,apa6,
+ apa6e,apa7,arabart,arabbook,arabrep,arabrep1,articleingud,
+ asaetr,ascelike,asmeconf,asmejour,assignment,aucklandthesis,
+ bangorcsthesis,bangorexam,barticle,bbook,bletter,
+ bankstatement,article,book,letter,ltnews,ltxdoc,ltxguide,
+ minimal,proc,report,slides,source2edoc,basque-book,beamer,
+ beamerswitch,beaulivre,beilstein,argetabelle,bewerbung,
+ bgteubner,BHCexam,bitart,bitbook,bjfuthesis,BMSTU-IU8,
+ bookcover,bookest,bookshelf,br-lex,brandeis-dissertation,
+ brandeis-problemset,brandeis-thesis,buctcover,buctthesis,
+ bxjsarticle,bxjsbook,bxjsreport,bxjsslide,cascadilla,cd,
+ cd-cover,articoletteracdp,letteracdp,cesenaexam,cheatsheet,
+ chemmacros-manual,chletter,cje,cnbwp,cnltx-doc,codedoc,
+ colorart,colorbook,combine,cc,ConcProg,confproc,contracard,
+ courseoutline,coursepaper,cquthesis,csbulletin,csbulobalka,
+ csbulv1,ctexart,ctexbeamer,ctexbook,ctexrep,ctxdoc,curve,
+ cv4tw,cweb,idcc,ijdc-v14,ijdc-v9,dinbrief,disser,gost732,
+ dithesis,droit-fr,dtk,dvdcoll,easybook,ebsthesis,agecon,
+ ajae,apecon,ecca,erae,itaxpf,jrurstud,njf,oegatb,pocoec,
+ regstud,worlddev,ecv,einfart,ejpecp,elbioimp,elegantbook,
+ elegantnote,elegantpaper,elpres,cas-dc,cas-sc,elsarticle,
+ elteikthesis,emisa,emulateapj,erdc,eskd,eskdgraph,eskdtab,
+ eskdtext,estcpmm,europasscv,europecv,exam,exam-n,examdesign,
+ exesheet,extarticle,extbook,extletter,extproc,extreport,
+ facsimile,factura,fancyhandout,fancyslides,fbithesis,fcavtex,
+ fdudoc,fduthesis-en,fduthesis,fei,ffslides,fithesis,
+ fithesis2,fithesis3,fithesis4,flacards,flashcards,frletter,
+ g-brief,g-brief2,gaceta,gammas,gatech-thesis,gmdocc,
+ gradstudentresume,grant-afosr,grant-aro,grant-darpa,grant-doe,
+ grant-nih,grant-nrl,grant-nsf,grant-onr,grant,graphpaper,
+ gridslides,gsemthesis,guitartabs,gzt,gztarticle,h2020proposal,
+ hgbarticle,hgbreport,hgbthesis,harnon-cv,hausarbeit-jura,
+ hcart,hcletter,hcreport,hcslides,hecthese,hepthesis,hitec,
+ hithesis,hitreport,hitszthesis,hletter,hpsdiss,fsbispit,
+ huawei,hustthesis,icsv,IEEEconf,IEEEtran,ijmart,ijsra,
+ image-gallery,IMTEKda,inkpaper,invoice-class,iodhbwm,iscram,
+ isov2,isodoc,iwhdp,jacow,jlreq,jmlr,jmlrbook,jnuexam,jpsj2,
+ jura,jurabook,juraovw,juraurtl,kdgcoursetext,kdgmasterthesis,
+ kdpcover,kerntest,kluwer,knittingpattern,scrartcl,scrarticle,
+ scrbook,scrdoc,scrletter,scrlttr2,scrreport,scrreprt,komacv,
+ oblivoir-utf,oblivoir-xl,oblivoir,xoblivoir,ksp-thesis,l3doc,
+ labbook,leadsheet,leaflet,lebhart,lectures,letgut,lettre,limap,
+ limecv,lion-msc,lni,lps,lt3graph-packagedoc,ltxdockit,
+ ltxguidex,abstbook,beletter,flashcard,iagproc,cours,fiche,
+ matapli,matc3mem,mcmthesis,ltxmdf,medstarbeamer,meetingmins,
+ memoir,mensa-tex,mentis,metanorma,milog,minimart,minimbook,
+ mla,mluexercise,mnras,moderncv,modernposter,msu-thesis,
+ mucproc,mugsthesis,muling,musuos,muthesis,third-rep,mwart,
+ mwbk,mwrep,mycv,nature,ncc,nccproc,sibjnm,nddiss2e,
+ ndsu-thesis,newlfm,nih,nihbiosketch,njurepo,nlctdoc,nostarch,
+ nrc1,nrc2,artikel1,artikel2,artikel3,boek,boek3,brief,
+ rapport1,rapport3,nwejm,nwejmart,octavo,onrannual,
+ oup-authoring-template,journal,paper,papertex,pbsheet,pecha,
+ petiteannonce,philosophersimprint,pittetd,pkuthss,plari,play,
+ postcards,powerdot,FUpowerdot,ppr-prv,pracjourn,pressrelease,
+ proposal,reporting,dfgproposal,dfgreporting,euproposal,
+ eureporting,prosper,protocol,prtec,upmgr,wkmgr,pst-doc,
+ ptptex,qcm,quantumarticle,qyxf-book,ReadableCV,recipe,
+ RecipeBook,recipecard,refart,refrep,resphilosophica,revtex4-2,
+ revtex4,revtex4-1,rtklage,ryersonSGSThesis,ryethesis,sageep,
+ sapthesis,schuleab,schulein,schuleit,schulekl,schuleub,
+ schuleue,schullsg,schullzk,schulma-ab,schulma-gutachten,
+ schulma-klausur,schulma-komp,schulma-mdlprf,schulma-praes,
+ schwalbe,sciposter,screenplay,scrjrnl,sdapsclassic,sduthesis,
+ seminar,semproc,sesamanuel,seuthesix,sffms,cassete,etiketka,
+ shtthesis,caesar_book,sides,simplecv,simplivre,skbarticle,
+ skbbeamer,skbbook,skblncsbeamer,skblncsppt,skbmoderncv,skdoc,
+ skeyval-testclass,skrapport,smfart,smfbook,SPhdThesis,spie,
+ sr-vorl,sslides,stage,standalone,usthesis,hwexam,mikoslides,
+ omdoc,smglom,subfiles,suftesi,sugconf,tabriz-thesis,talk,
+ tcldoc,tclldoc,powersem,thesis-ekf,thesis-gwu,thuthesis,
+ tikz-kalender,tikzposter,tlc-article,TOPletter,toptesi,
+ tudabeamer,tudaexercise,tudaleaflet,tudaletter,tudaposter,
+ tudapub,tudasciposter,tudscrartcl,tudscrbook,tudscrdoc,
+ tudscrmanual,tudscrposter,tudscrreprt,tufte-book,tufte-handout,
+ ltugboat,ltugproc,tui,turabian,turabian-researchpaper,
+ turabian-thesis,my-thesis,ua-thesis,uafthesis,
+ uantwerpenbamathesis,uantwerpencoursetext,uantwerpenexam,
+ uantwerpenletter,uantwerpenphdthesis,uantwerpenreport,
+ ucalgmthesis,ucbthesis,ucdavisthesis,ucsmonograph,ucthesis,
+ udesoftec,uebungsblatt,uestcthesis,uhhassignment,uiucredborder,
+ uiucthesis,ulthese,legislation,umich-thesis,umthesis,
+ unam-thesis,unifith,unitn-bimrep,univie-ling-expose,
+ univie-ling-paper,univie-ling-thesis,univie-ling-wlg,
+ unizgklasa,uothesis,UoWthesis,upmethodology-document,URbeamer,
+ URletter,uspatent,ut-thesis,utexasthesis,uwmslide,uwthesis,
+ verifica,webquiz,willowtreebook,withargs-packagedoc,
+ wsemclassic,xduthesis,xebaposter,xmuthesis,xsim-manual,
+ yaletter,yathesis,ycbook,ydoc,york-thesis,
+ },%
+ otherkeywords={},%
+ alsoletter={0123456789-},%
+ alsodigit={},%
+ sensitive%
+ }[keywords,tex,comments]%
+ #+end_src
+
+ #+begin_src latex
+ \lstdefinestyle{__letgut_all_reset}{
+ basicstyle=\ttfamily,
+ language=TeX,%
+ texcs={},%
+ keywords={},%
+ keywords=[2]{},%
+ keywords=[3]{},%
+ keywords=[4]{},%
+ keywords=[5]{},%
+ otherkeywords={},%
+ alsoletter={},%
+ alsodigit={},%
+ alsolanguage=[AlLaTeX]TeX,%
+ alsolanguage=[LaTeX]TeX,%
+ alsolanguage=[plain]TeX,%
+ alsolanguage=[common]TeX,%
+ alsolanguage=[primitive]TeX,%
+ alsolanguage=[classes]TeX,%
+ #+end_src
+ Because of a current issue involving \package{parskip} and
+ \package{listings}
+ (\url{https://github.com/FrankMittelbach/fmitex-parskip/issues/3}), we have to
+ set the skip below the displayed listings to a zero length.
+ #+begin_src latex
+ belowskip=0pt,
+ }
+ \lstset{
+ style=__letgut_all_reset
+ }
+ #+end_src
+ This style is applied automatically at the beginning of each ~\input~
+ file. Hence, the keywords defined in a previous file (by loading some
+ peticular (La)TeX dialects, i.e. control sequences and keywords specific to
+ some class or packages) won't interfere with the ones of the current file.
+ #+begin_src latex
+ \AddToHook{cmd/input/before}{
+ \lstset{%
+ style=__letgut_all_reset,%
+ }
+ }
+ #+end_src
+- The ~\printbibliography~ command is redefined in order its ~heading~ is by
+ default set to ~subbibliography~.
+ #+begin_src latex
+ \NewCommandCopy{\__letgut_old_printbibliography}{
+ \printbibliography
+ }
+ \RenewDocumentCommand {\printbibliography} { O{} } {
+ \phantomsection
+ \__letgut_old_printbibliography[#1]
+ }
+ #+end_src
+ For printing the bibliography, we define two new bibheadings for the
+ structure levels ~\title~ and ~\subtitle~.
+ #+begin_src latex
+ \defbibheading{title}[\refname]{%
+ \title{#1}}
+ \defbibheading{subtitle}[\refname]{%
+ \subtitle{#1}}
+ #+end_src
+- The acronyms will be typset in footnote, with small caps shape. When they are
+ (English) foreign, it will be specified and the translation will be added.
+ #+begin_src latex
+ \acsetup{
+ first-style=footnote,
+ format/short = {\scshape},
+ format/foreign = {\em},
+ foreign/display,
+ locale/format = {\upshape},
+ locale/display,
+ }
+ #+end_src
+ Moreover, we redefine the private macro ~\acro_footnote:n~ of the
+ \package*{acro} in order to make the footnotes displaying the long forms of the
+ acronyms ended by a period (like ordinary footnotes).
+ #+begin_src latex
+ \cs_undefine:N \acro_footnote:n
+ \cs_new_protected:Npn \acro_footnote:n #1
+ {
+ \tl_set:Ne \l__acro_tmpa_tl {
+ \l__acro_fnpct_check_tl
+ }
+ \exp_last_unbraced:Nno
+ \footnote {#1.}
+ \l__acro_tmpa_tl
+ }
+ #+end_src
+
+ The following settings for packages that have to be the last ones loaded are
+ also done just before the begining of the document.
+
+#+begin_src latex
+ \AddToHook{begindocument/before}{
+#+end_src
+
+- We want the hyperlinks to be as unobtrusive as possible.
+ #+begin_src latex
+ \bool_if:NTF \g__letgut_paper_bool {
+ \hypersetup{draft}
+ }{
+ \hypersetup{%
+ colorlinks,%
+ allcolors={letgut_allcolors_links},%
+ }%
+ }
+ #+end_src
+
+ A preset of acronyms is input (if found).
+ #+begin_src latex
+ \file_if_exist:nT {\c__letgut_acronyms_file_tl}{
+ \file_input:n {\c__letgut_acronyms_file_tl}
+ }
+ #+end_src
+
+- Depending on some chosen class options, some packages have to be loaded,
+ notably before \package*{hyperref} is loaded, and actions are taken
+ accordingly.
+ - If the `draft` mode (default) is on, we load the \package*{lua-typo} which
+ highlights typographical flaws with LuaLaTeX. For the moment,
+ # this option is disabled if the `paper` option is enabled since enabling
+ # both
+ the \package*{lua-typo} isn't loaded since the `luacolor`
+ package it loads
+ #
+ currently does not work well in ~shipout/background~ (see
+ https://github.com/ho-tex/luacolor/issues/4).
+ #+begin_src latex
+ % % \bool_if:NF \g__letgut_paper_bool {
+ \bool_if:NT \g__letgut_draft_bool {
+ % \RequirePackage[All]{lua-typo}
+ \AddToHook{shipout/background}
+ {
+ \__letgut_unselectable:n {
+ \put(0.5\paperwidth,-0.5\paperheight)
+ {
+ \Huge
+ #+end_src
+ Currently, we can't use \package{l3color}'s ~\color_fill:n~[fn:1]
+ and we have to rely on \package{xcolor}'s ~\color~.
+ #+begin_src latex
+ % \color_fill:n {black!10}
+ \color{black!10}
+ \hbox_set:Nn \l_tmpa_box {
+ \fontsize{0.25\paperwidth}{0.3\paperwidth}
+ \selectfont
+ \c__letgut_draftwatermark_text_tl
+ }
+ \hbox_set:Nn \l_tmpb_box {
+ \hbox_overlap_center:n {
+ \box_use:N \l_tmpa_box
+ }
+ }
+ #+end_src
+ The draft watermak is rotated in order to be parallely slanted to the first
+ diagonal of the page (angle $=\arctan(\text{paper height}/\text{paper
+ width})$).
+ #+begin_src latex
+ \box_rotate:Nn \l_tmpb_box {
+ \fp_eval:n {
+ atand (
+ \dim_to_fp:n {\paperheight}
+ /
+ \dim_to_fp:n {\paperwidth}
+ )
+ }
+ }
+ \box_use:N \l_tmpb_box
+ }
+ }
+ }
+ #+end_src
+ Moreover, we want all the overfull boxes to be shown (as with
+ ~draft~ option of the standard classes).
+ #+begin_src latex
+ \setlength\overfullrule{5pt}
+ }
+ % % }
+#+end_src
+
+# - We proceed to some settings for the \package*{glossaries-extra}:
+# - the acronyms will be displayed in small caps, in footnotes,
+# - the acronym definitions in footnotes are terminated with a period, like
+# other footnotes,
+# - we load the file of the built-in glossaries and acronyms terms.
+#
+# Note that we don't make use of ~\makeglossaries~ since we don't need
+# glossaries files, since we don't make use of ~\printglossary~ (and friends)
+# since we don't need to display a glossary or a list of acronyms.
+# #+begin_src latex
+# \setabbreviationstyle[acronym]{short-sc-footnote}
+# \glsdisablehyper
+# \renewcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2.}}
+# \loadglsentries{letgut-acronyms}
+# #+end_src
+
+We close the ~\AddToHook{begindocument/before}~ argument.
+
+#+begin_src latex
+}
+#+end_src
+
+** Date handling
+
+#+begin_src latex
+ \int_new:N \g__letgut_date_month_int
+ \int_new:N \g__letgut_date_year_int
+
+ \int_gset:Nn \g__letgut_date_month_int {\the\month}
+ \int_gset:Nn \g__letgut_date_year_int {\the\year}
+
+ \tl_new:N \g__letgut_date_month_tl
+ \tl_new:N \g__letgut_date_tl
+
+ \cs_new_protected:Npn \__letgut_date_parse:n #1
+ {
+ \__letgut_if_is_iso_date:nTF {#1}
+ {
+ \__letgut_date_parse:www #1 \q_stop
+ }{
+ \msg_term:nnn{letgut}{Not~month~iso~date}{#1}
+ \tl_gset:Nn \g__letgut_date_tl { #1 }
+ }
+ }
+
+ \prg_new_protected_conditional:Npnn
+ \__letgut_if_is_iso_date:n #1 { T, F, TF }
+ {
+ \regex_match:nnTF { ^\d{4}-(\d{1,2}) } {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+ \prg_new_protected_conditional:Npnn
+ \__letgut_if_is_int:n #1 { T, F, TF }
+ {
+ \regex_match:nnTF { ^[\+\-]?[\d]+$ } {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+ \cs_new_protected:Npn \__letgut_month_name:n #1
+ {
+ % \text_titlecase_first:n {
+ \int_case:nnF
+ { #1 }
+ {
+ { 1 }{ janvier }
+ { 2 }{ février }
+ { 3 }{ mars }
+ { 4 }{ avril }
+ { 5 }{ mai }
+ { 6 }{ juin }
+ { 7 }{ juillet }
+ { 8 }{ août }
+ { 9 }{ septembre }
+ { 10 }{ octobre }
+ { 11 }{ novembre }
+ { 12 }{ décembre }
+ }
+ { Month~ Error! }
+ % }
+ }
+
+ \cs_new_protected:Npn \__letgut_date_parse:www #1-#2
+ \q_stop
+ {
+ \int_compare:nTF
+ {
+ \the\year <= #1 <= \the\year+1
+ #+end_src
+
+# >> (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ }{
+ \int_gset:Nn \g__letgut_date_year_int {#1}
+ }{
+ \int_gset:Nn \g__letgut_date_year_int {\the\year}
+ }
+ \__letgut_if_is_int:nTF {#2}
+ {
+ \int_compare:nTF
+ {
+ 1 <= #2 <= 12
+ #+end_src
+
+# >> (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ }
+ {\int_gset:Nn \g__letgut_date_month_int {#2}}
+ {\int_gset:Nn \g__letgut_date_month_int {\the\month}}
+ }{
+ \int_gset:Nn \g__letgut_date_month_int {\the\month}
+ }
+ \tl_gset:Nn \g__letgut_date_month_tl {
+ \__letgut_month_name:n { \g__letgut_date_month_int }
+ }
+ \tl_gset:Nn \g__letgut_date_tl {
+ \tl_use:N \g__letgut_date_month_tl
+ \c_space_tl
+ \int_use:N \g__letgut_date_year_int
+ }
+ }
+#+end_src
+
+** Page color default settings
+
+ By default, the page color will be the one linked to the ~screen~ option.
+
+#+begin_src latex
+ \pagecolor[rgb]{\c__letgut_default_pagecolor_screen_clist}
+ \clist_set_eq:NN \g__letgut_pagecolor_clist
+ \c__letgut_default_pagecolor_screen_clist
+#+end_src
+
+** Options
+
+These options look to need to be specified rather at the end (throws an error if
+defined before the ~\__letgut_date_parse:n~'s definition):
+
+- ~number~ for the number of the issue,
+- ~date~ for the date of the issue, either empty (hence the current (month)
+ date) or at the format ~YYYY-MM~ or as free input,
+- ~pagecolor~ (relevant only with the (default) ~screen~ load time option) for
+ a color of the page other than the default one,
+- ~membership-reminder~ that typesets a membership reminder on the first page,
+
+#+begin_src latex
+ \keys_define:nn { letgut/setup }
+ {
+ , draft .bool_gset:N = \g__letgut_draft_bool
+ , draft .initial:n = { true }
+ , draft .default:n = { true }
+ , final .bool_gset_inverse:N = \g__letgut_draft_bool
+ , number .int_gset:N = \g__letgut_number_int
+ , date .code:n = { \__letgut_date_parse:n { #1 } }
+ , date .initial:x = {\the\year-\the\month}
+ , paper .code:n = {
+ \bool_gset_true:N \g__letgut_paper_bool
+ \pagecolor[rgb]{\c__letgut_default_pagecolor_paper_clist}
+ \clist_set_eq:NN \g__letgut_pagecolor_clist
+ \c__letgut_default_pagecolor_paper_clist
+ }
+ , screen .bool_gset_inverse:N = \g__letgut_paper_bool
+ , pagecolor .initial:V
+ = \c__letgut_default_pagecolor_screen_clist
+ , pagecolor .code:n = {
+ \definecolor{letgut_pagecolor}{rgb}{#1}
+ \AddToHook{begindocument/before}
+ {
+ \bool_if:NTF \g__letgut_paper_bool {
+ \msg_warning:nnn{letgut}{
+ pagecolor~inoperative~with~paper~option
+ }{#1}
+ }{
+ \clist_gset:Nn \g__letgut_pagecolor_clist { #1 }
+ \pagecolor[rgb]{#1}
+ }
+ }
+ }
+ , allcolorslinks .code:n = {
+ \colorlet{letgut_allcolors_links}{#1}}
+ , allcolorslinks .initial:V
+ = \c__letgut_default_allcolors_links_color_tl
+ , membership-reminder .bool_gset:N
+ = \g__letgut_membership_reminder_bool
+ , membership-reminder .initial:n = { true }
+ , editorial .bool_gset:N = \g__letgut_editorial_bool
+ , editorial .initial:n = { true }
+ , informations .bool_gset:N = \g__letgut_informations_bool
+ , informations .initial:n = { true }
+ }
+#+end_src
+
+** Headers
+
+We now define the headers.
+
+- The distance between the baseline of the header text and the decorative line
+ in the header is made a little bit bigger.
+ #+begin_src latex
+ \renewcommand{\headruleskip}{
+ \c__letgut_head_rule_skip_dim
+ }
+ #+end_src
+- The decorative line width in the header is made a little bit bigger.
+ #+begin_src latex
+ \renewcommand{\headrulewidth}{
+ \c__letgut_head_rule_width_dim
+ }
+ #+end_src
+- The headers alternate between even and odd pages.
+ #+begin_src latex
+ \fancyhf{}
+ \fancyhead[RO,LE]{\thepage}
+ \fancyhead[RE,LO]{\g__letgut_mark_tl}
+ #+end_src
+- The headers are left offset
+ #+begin_src latex
+ \fancyheadoffset[L]{\c__letgut_hoffset_dim}
+ #+end_src
+- We load the default \package{fancyhdr}'s page style
+ #+begin_src latex
+ \pagestyle{fancy}
+#+end_src
+
+** Marginal notes
+ We want the marginal notes to be in the left margin.
+
+#+begin_src latex
+ \reversemarginpar
+#+end_src
+
+** Table of contents
+
+ The table of contents is customized:
+
+- only the titles of the articles are shown (but the bookmarks have their natural depth):
+#+begin_src latex
+ \etocsetnexttocdepth{0}
+ #+end_src
+- layout:
+ #+begin_src latex
+ \etocsetstyle {section}
+ {}
+ {\leavevmode\leftskip 2cm\relax}
+ {\normalsize%
+ \etocname~\dotfill~\etocpage\par
+ }
+ {}
+#+end_src
+- its title is dropped:
+#+begin_src latex
+ \renewcommand*\frenchcontentsname{}
+#+end_src
+
+** COMMENT Alerts
+
+ We create a box to display alerts.
+
+#+begin_src latex
+ \tcbuselibrary{xparse}
+ \DeclareTCBox{\alertbox}{}{
+ nobeforeafter,
+ colback=red!5!white,
+ colframe=red!75!black,
+ title={Attention !},
+ fonttitle=\bfseries,
+ before=\begin{center},
+ after=\end{center}
+ }
+#+end_src
+
+** Geometry of the document
+
+#+begin_src latex
+ \geometry{
+ asymmetric,
+ textheight=\c__letgut_textheight_dim,
+ textwidth=\c__letgut_textwidth_dim,
+ lmargin=\c__letgut_lmargin_dim,
+ tmargin=\c__letgut_tmargin_dim,
+ head=\c__letgut_head_dim,
+ headsep=\c__letgut_headsep_dim,
+ marginparwidth=\c__letgut_marginparwidth_dim,
+ % verbose,
+ % showframe
+ }
+#+end_src
+
+** Alert box
+
+#+begin_src latex
+ \cs_new_protected:Nn \__letgut_alert_box:nn
+ {
+ \noindent
+ \begin{tblr}{
+ width=\linewidth,
+ rowspec={Q[c,m,#1]},
+ colspec={|
+ #+end_src
+
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ >{\bfseries}X|
+ },
+ vlines,
+ hlines,
+ rowsep=2.5mm,
+ colsep=2.5mm
+ }
+ #2
+ \end{tblr}
+ \skip_vertical:N \c_zero_dim
+ }
+#+end_src
+
+** “Title” and marks
+
+ We redefine ~\@title~ in order to make it empty. Hence we can later test if
+ the ~\title~ has been populated by the user (thanks to ~\title~) and, if so,
+ we will (automatically) display on the first page and headers the provided
+ title instead of the number and the date (see below).
+#+begin_src latex
+ \tl_gclear:N \@title
+#+end_src
+
+At the end of preamble, we put the ~\@title~ (empty or populated by the
+user) into ~\g__letgut_@title_str~ for later tests.
+#+begin_src latex
+ \AddToHook{begindocument/before}
+ {
+ \str_set_eq:NN \g__letgut_@title_str \@title
+#+end_src
+
+The number is added only if it is
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+$>0$.
+
+ #+begin_src latex
+ \tl_gset:Nn \g__letgut_title_tl {
+ \int_compare:nNnT
+ \g__letgut_number_int
+ #+end_src
+
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ > \c_zero_int
+ {numéro~ \int_use:N\g__letgut_number_int{}~ --~ }
+ \g__letgut_date_tl
+ }
+ \str_if_empty:NTF \g__letgut_@title_str {
+ \tl_gset:Nn \g__letgut_mark_tl {
+ \textit{\c__letgut_La_lettre_gutenberg_tl}
+ }
+ }{
+ \tl_gset:Nn \g__letgut_mark_tl {
+ \g__letgut_@title_str
+ }
+ }
+ \tl_gput_right:Nn \g__letgut_mark_tl {
+ ,~\g__letgut_title_tl
+ }
+ }
+#+end_src
+
+** First page handling
+
+The first page is special as it should automatically contain certain elements:
+- the banner,
+- either the number and the date of the issue, or a given title,
+- the table of contents,
+- the editorial,
+- the membership reminder.
+
+The first page is inserted only is the target audience is the readers of the
+Lettre.
+
+#+begin_src latex
+ \bool_if:NT \g__letgut_for_readers_bool {
+#+end_src
+
+#+begin_src latex
+ \file_if_exist:nTF {\c__letgut_banner_file_tl.pdf}{
+ \AddToHookNext{shipout/background}
+ {
+ \begin{picture}(0,0)
+ \put(-2cm,-25.275cm){
+ \includegraphics[scale=0.96]{
+ \c__letgut_banner_file_tl.pdf
+ }
+ }
+ \end{picture}
+ }
+ }{
+ #+end_src
+
+The ~pagecolor~ option is possibly set (with ~\AddToHook{begindocument/before}~)
+and the page color chosen has to be used for the letters of the banner so the
+following code has to be postponed after the former (hence here
+~\AddToHook{begindocument}~ and with ~\AddToHook{begindocument/before}~).
+
+#+begin_src latex
+ \msg_term:nn{letgut}{Banner~file~not~provided}
+ \RequirePackage[pagecolor={\g__letgut_pagecolor_clist}]{
+ letgut-banner
+ }
+ }
+ #+end_src
+
+Here starts what is automatically added at the beginning of the document.
+
+#+begin_src latex
+ \AddToHook{begindocument/end}
+ {
+#+end_src
+
+- If a membership reminder is asked, we create an (alert) box containing the
+ corresponding text and reduce the textheight of this page of the height of
+ this box.
+ #+begin_src latex
+ \bool_if:NT \g__letgut_membership_reminder_bool {
+ \box_new:N \g__letgut_membership_reminder_box
+ \vbox_gset:Nn \g__letgut_membership_reminder_box {
+ \alertbox []{ \c__letgut_membership_reminder_tl }
+ }
+ \dim_gset:Nn
+ \g__letgut_membership_reminder_box_height_dim {
+ \box_ht:N \g__letgut_membership_reminder_box
+ }
+ \enlargethispage{
+ - \g__letgut_membership_reminder_box_height_dim
+ }
+ }
+ #+end_src
+- We want the text on the first page to not encroach on the horizontal bar of
+ the banner.
+ #+begin_src latex
+ \dim_const:Nn \c__letgut_first_page_shrink_dim {
+ \c__letgut_banner_thickness_dim
+ +
+ \c__letgut_tmargin_dim
+ +
+ \c__letgut_textheight_dim
+ -
+ .5\paperheight
+ -
+ .5\c__letgut_banner_height_dim
+ }
+ \enlargethispage{
+ - \c__letgut_first_page_shrink_dim
+ }
+ \enlargethispage{
+ - \baselineskip
+ }
+ #+end_src
+- If the user has specified a title, we make a (our own) title and use it and
+ the possibly provided author(s) for the metadata of the PDF; otherwise we
+ display the number and the date of the newsletter.
+ #+begin_src latex
+ \str_if_empty:NTF \g__letgut_@title_str {
+ \bool_gset_true:N \g__letgut_title_empty_bool
+ \begin{flushright}
+ \Huge
+ \text_titlecase_first:n { \g__letgut_title_tl }
+ \end{flushright}
+ \hypersetup{
+ pdftitle={
+ \c__letgut_Lettre_gutenberg_tl
+ \int_compare:nNnT
+ \g__letgut_number_int
+ #+end_src
+
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ > \c_zero_int
+ {
+ \c_space_tl~ \int_use:N \g__letgut_number_int
+ }
+ },
+ pdfauthor={
+ Association~
+ \c__letgut_gutenberg_tl
+ \c_space_tl
+ (éditeur)
+ },
+ }
+ \vspace*{1cm}
+ }{
+ \hypersetup{
+ pdftitle={\g__letgut_@title_str}
+ }
+ \tl_if_empty:NF \@author {
+ \hypersetup{
+ pdfauthor={\@author}
+ }
+ }
+ #+end_src
+ Here, we insert the title, but don't rely on ~\maketitle~ because it
+ lets to ~\relax~ the command ~\title~ which is used later as new sectionning
+ levels for the titles of the articles of the Lettre. So we emulate the
+ intersting part of the ~\maketitle~ command (borrowed from \file{article.cls}).
+ #+begin_src latex
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \end{center}%
+ \par
+ \vskip 1.5em
+ }
+ #+end_src
+- No headers on the first page. This has to be inserted after the previous
+ (customized) ~\maketitle~ since this command inserts a ~\newpage~ which would
+ ruin the effort of ~\thispagestyle{empty}~ if inserted before.
+ #+begin_src latex
+ \thispagestyle{empty}
+ #+end_src
+- The table of contents is automatically added and has a bookmark entry.
+ #+begin_src latex
+ \pdfbookmark[1]{
+ \c__letgut_contents_name_tl
+ }{
+ \c__letgut_contents_name_tl
+ }
+ \tableofcontents
+ #+end_src
+ Should a title be displayed, the table of contents would be added after it,
+ followed by a new page (otherwise, if ~\title~ used after ~\begin{document}~
+ sees its title on the front page, it will overflow onto the banner).
+ #+begin_src latex
+ \bool_if:NTF \g__letgut_title_empty_bool {
+ \vspace*{1.5cm}
+ }{
+ \newpage
+ }
+ #+end_src
+- Conditionally to the fact the ~editorial~ option is not set to ~false~: if the
+ \file*{editorial.tex} of the editorial is found, its content is input and
+ has a bookmark entry; otherwise, a warning is displayed.
+ #+begin_src latex
+ \bool_if:NTF \g__letgut_editorial_bool {
+ \file_if_exist:nTF {./\c__letgut_editorial_file_tl}{
+ \RenewDocumentCommand\author{ m } {
+ \__letgut_author:n { #1 }
+ }
+ \pdfbookmark[1]{Éditorial}{
+ \c__letgut_editorial_file_tl
+ }
+ \file_input:n {./\c__letgut_editorial_file_tl}
+ % % \int_set:N \l_tmpa_int {\pagenumber}
+ % % \int_compare:nNnT \l_tmpa_int = 1 { \newpage }
+ #+end_src
+
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ % \if\count{\pagenumber}>1
+ % \else
+ % \newpage
+ % \fi
+ }{
+ \msg_warning:nn{letgut}{Editorial~file~missing}
+ \alertbox{ \c__letgut_missing_editorial_tl }
+ \newpage
+ }
+ }{
+ % \newpage
+ }
+#+end_src
+
+We close the ~\AddToHook{begindocument/end}~ argument.
+
+#+begin_src latex
+ }
+#+end_src
+
+Membership reminder.
+
+#+begin_src latex
+ \AddToHook{begindocument}{
+ \bool_if:NT \g__letgut_membership_reminder_bool {
+ \AddToHookNext{shipout/background}
+ {
+ \put(1in,-1in){
+ \put(
+ \oddsidemargin,
+ - \topmargin
+ - \headheight
+ - \headsep
+ - \textheight
+ + \c__letgut_first_page_shrink_dim
+ + .5\baselineskip
+ ){
+ \box_use:N \g__letgut_membership_reminder_box
+ }
+ }
+ }
+ }
+ }
+#+end_src
+
+** Last page handling
+
+The last page is special: it should automatically contain some informations about
+\gutenberg.
+
+#+begin_src latex
+ \AddToHook{enddocument}
+ {
+#+end_src
+Conditionally to the fact the ~informations~ option is not set to ~false~: if the
+\file*{informations-gut.tex} which contains the informations about
+\gutenberg. Otherwise, a warning is displayed.
+ #+begin_src latex
+ \bool_if:NT \g__letgut_informations_bool {
+ \clearpage
+ \phantomsection
+ \file_if_exist:nTF
+ {./\c__letgut_informations_gutenberg_file_tl}{
+ \file_input:n {./\c__letgut_informations_gutenberg_file_tl}
+ }{
+ \msg_warning:nn{letgut}{Informations~file~missing}
+ \alertbox{ \c__letgut_missing_infomations_tl }
+ }
+ }
+ #+end_src
+
+We close the ~\AddToHook{enddocument}~ argument.
+
+#+begin_src latex
+ }
+#+end_src
+
+We close the boolean which tests whether the target audience is the readers or
+the author(s) of the “Lettre”.
+
+#+begin_src latex
+ }
+#+end_src
+
+** Sections, subsections, etc.
+
+*** Numbering
+ We want all the sections to be unnumbered.
+
+ #+begin_src latex
+ \setcounter{secnumdepth}{-10}
+ #+end_src
+
+*** Format
+
+- We create the new level ~\title~ for the titles of the articles. They are
+ displayed uppercased.
+ #+begin_src latex
+ \AddToHook{begindocument/before}{%
+ \titleclass{\title}{straight}[\part]
+ \titleformat{\title}{
+ \normalfont
+ \LARGE
+ \bfseries
+ \text_uppercase:n
+ }{}{1em}{
+ \aldineleft\c_space_tl
+ }{}
+ \etocsetlevel{title}{0}
+ \def\toclevel@title{0}%
+ \etocsetstyle {title}
+ {}
+ {
+ \leavevmode\leftskip 2cm\relax
+ }
+ {\mdseries\normalsize
+ \etocname
+ \nobreak\leaders\hbox~ to~ 1ex{\hss.}\hfill
+ \etocpage
+ \par}
+ {}
+ #+end_src
+- We also create the new level ~\subtitle~ for the subtitles of the
+ articles. They are dispayed uppercased (but in a smaller size than ~\title~).
+ #+begin_src latex
+ \titleclass{\subtitle}{straight}[\title]
+ \titleformat{\subtitle}{
+ \normalfont
+ \Large
+ \bfseries
+ \text_uppercase:n
+ }{}{1em}{}{}
+ \etocsetlevel{subtitle}{1}
+ \def\toclevel@subtitle{1}%
+ \def\toclevel@subtitle{1}
+ #+end_src
+- By default (that is when ~\subtitle~ is not used), the toc levels of the
+ sections, subsections, etc. are set to ~1~, ~2~, etc. But, when ~\subtitle~ is
+ used, since this level has toc level ~1~, the toc levels of the sections,
+ subsections, etc. have to be set to ~2~, ~3~, etc. And this has to be reset
+ each time ~\title~ and ~\subtitle~ are used.
+ #+begin_src latex
+ \AddToHook{cmd/title/before}{
+ \etocsetlevel{section}{1}
+ \def\toclevel@section{1}%
+ \etocsetlevel{subsection}{2}
+ \def\toclevel@subsection{2}%
+ \etocsetlevel{subsubsection}{3}
+ \def\toclevel@subsubsection{3}%
+ \etocsetlevel{paragraph}{4}
+ \def\toclevel@paragraph{4}%
+ \etocsetlevel{subparagraph}{5}
+ \def\toclevel@subparagraph{5}%
+ }
+ \AddToHook{cmd/subtitle/before}{
+ \etocsetlevel{section}{2}
+ \def\toclevel@section{2}%
+ \etocsetlevel{subsection}{3}
+ \def\toclevel@subsection{3}%
+ \etocsetlevel{subsubsection}{4}
+ \def\toclevel@subsubsection{4}%
+ \etocsetlevel{paragraph}{5}
+ \def\toclevel@paragraph{5}%
+ \etocsetlevel{subparagraph}{6}
+ \def\toclevel@subparagraph{6}%
+ }
+ #+end_src
+ # - The sections have the usual format, except that their titles are uppercase.
+ # #+begin_src latex
+ # \titleformat{\section}{
+ # \normalfont
+ # \Large
+ # \bfseries
+ # \text_uppercase:n
+ # % }{\thesection}{1em}{}{}
+ # #+end_src
+ - The (sub)paragraphs have the usual format, except that they are not
+ “runin” (\package{titlesec}'s package's terminology).
+ #+begin_src latex
+ \titleformat{\paragraph}{
+ \normalfont
+ \normalsize
+ \bfseries
+ }{\theparagraph}{1em}{}
+ \titleformat{\subparagraph}{
+ \normalfont
+ \normalsize
+ \bfseries
+ }{\thesubparagraph}{1em}{}
+ }
+ #+end_src
+- We modify the spacing, mainly by shifting the titles in the left margin (the
+ rest is borrowed from the standard classes).
+ #+begin_src latex
+ \titlespacing*{\title}
+ {\c__letgut_title_hoffset_dim}
+ {\c__letgut_before_title_title_skip}
+ {\c__letgut_after_title_title_skip}
+ \titlespacing*{\subtitle}
+ {\c__letgut_subtitle_hoffset_dim}
+ {\c__letgut_before_subtitle_title_skip}
+ {\c__letgut_after_subtitle_title_skip}
+ \titlespacing*{\section}
+ {\c__letgut_section_hoffset_dim}
+ {\c__letgut_before_section_title_skip}
+ {\c__letgut_after_section_title_skip}
+ \titlespacing*{\subsection}
+ {\c__letgut_subsection_hoffset_dim}
+ {\c__letgut_before_subsection_title_skip}
+ {\c__letgut_after_subsection_title_skip}
+ \titlespacing*{\subsubsection}
+ {\c__letgut_subsubsection_hoffset_dim}
+ {\c__letgut_before_subsubsection_title_skip}
+ {\c__letgut_after_subsubsection_title_skip}
+ \titlespacing*{\paragraph}
+ {\c__letgut_paragraph_hoffset_dim}
+ {\c__letgut_before_paragraph_title_skip}
+ {\c__letgut_after_paragraph_title_skip}
+ \titlespacing*{\subparagraph}
+ {\c__letgut_subparagraph_hoffset_dim}
+ {\c__letgut_before_subparagraph_title_skip}
+ {\c__letgut_after_subparagraph_title_skip}
+#+end_src
+
+** Document commands
+
+*** Setup
+
+We define the command that lets us specify the newsletter setup.
+
+#+begin_src latex
+\NewDocumentCommand \letgutsetup { m } {
+ \keys_set:nn { letgut/setup } { #1 }
+}
+#+end_src
+
+*** For the rubric dedicated to new stuffs appeared on \acs{ctan}
+
+ - We create a new type of list, dedicated to the new stuffs (classes, packages,
+ etc.) on CTAN and similar to a description list (except the label provided in
+ the optional argument of ~\item~ is automatically an argument of the
+ ~\package~ command).
+ #+begin_src latex
+ \cs_new_protected:Nn \__letgut_ctan_news_item:n {
+ \package{#1}~:
+ }
+ \newlist{ctannews}{description}{1}
+ \setlist[ctannews]{format=\__letgut_ctan_news_item:n}
+ #+end_src
+ The stuffs created by French speaking people are highlighted in a special
+ way and, for this, a starred variant of the ~\item~ command is provided. We
+ insert a systematic ~\phantomsection~ in order the cross-references to such
+ items are correct.
+ #+begin_src latex
+ \cs_new_protected:Npn \__letgut_item:nn #1 #2
+ {
+ \tl_if_empty:nTF {#2}
+ {
+ \__letgut_old_item
+ }{
+ \__letgut_old_item[#2]
+ }
+ \phantomsection
+ \IfBooleanT {#1}{
+ \mbox{}\marginpar[\mbox{}\hfill\francophony]{}
+ }
+ }
+ \NewCommandCopy{\__letgut_old_item}{\item}
+ \RenewDocumentCommand {\item} { s O{} } {
+ \__letgut_item:nn {#1}{#2}
+ }
+ #+end_src
+
+- Command that inserts the \enquote{francophony} logo.
+ #+begin_src latex
+ \NewDocumentCommand {\francophony} { } {
+ \raisebox{-1.5pt}{
+ \includegraphics[width=\f@size pt]{
+ Flag_of_La_Francophonie-crop
+ }
+ }
+ }
+ #+end_src
+
+*** Persons and authors
+
+For both persons and authors, the argument of:
+- a single individual is given as:
+ - \meta{Last name}, \meta{First name}
+ - and possibly \meta{Last name}, \meta{First name}, \meta{Title}
+- multiple individuals, the schemes for each of the individuals are the same of
+ a single one, separated by a semicolon.
+
+#+begin_src latex
+ \NewDocumentCommand {\person} { m } {
+ \__letgut_process_list:n {#1}
+ }
+ \cs_new_protected:Npn \__letgut_author:n #1
+ {
+ \nopagebreak
+ \begin{flushright}
+ \__letgut_process_list:n {#1}
+ \end{flushright}
+ }
+ \AddToHook{begindocument/end}{%
+ \RenewDocumentCommand\author{ m } {
+ \__letgut_author:n { #1 }
+ }
+ }
+ #+end_src
+
+ In the following ~\__letgut_titlecase_name~ control sequence, we parse last and
+ first names, splitting and unsplitting them at spaces and dashes (~-~) with
+ titlecasing in between.
+
+ #+begin_src latex
+\cs_new_protected:Npn \__letgut_titlecase_name:n #1
+{
+ \seq_set_split:Nnn \l_tmpa_seq { - } {#1}
+ \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \text_titlecase_first:n{ \text_lowercase:n {##1} }
+ }
+ \tl_set:Nx \l_tmpa_tl {\seq_use:Nn \l_tmpb_seq {-}}
+ \seq_clear:N \l_tmpa_seq
+ \seq_set_split:NnV \l_tmpa_seq { ~ } { \l_tmpa_tl }
+ \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \text_titlecase_first:n{##1}
+ }
+ \seq_use:Nn \l_tmpb_seq {~}
+}
+ #+end_src
+
+ The following control sequence splits a semi-colon separated list and each item
+ is splitted as a comma separated list.
+
+#+begin_src latex
+ \cs_new_protected:Nn \__letgut_person_last_name:n
+ {
+ {\scshape \__letgut_titlecase_name:n {#1}}
+ }
+ \cs_new_protected:Nn \__letgut_person_first_name_last_name:nn
+ {
+ \__letgut_titlecase_name:n {#1}
+ \c_space_tl
+ \__letgut_person_last_name:n {#2}
+ }
+ \cs_new_protected:Nn
+ \__letgut_person_first_name_last_name_title:nnn
+ {
+ \__letgut_person_first_name_last_name:nn {#1} {#2}
+ \c_space_tl
+ (#3)
+ }
+ \seq_new:N \l__letgut_items_seq
+ \cs_new_protected:Npn \__letgut_process_list:n #1
+ {
+ \seq_clear:N \l__letgut_items_seq
+ \seq_set_split:Nnn \l_tmpa_seq {and} {#1}
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \seq_set_from_clist:Nn \l_tmpb_seq {##1}
+ \seq_pop_left:NN \l_tmpb_seq \l_letgut_last_name_tl
+ \seq_pop_left:NN \l_tmpb_seq \l_letgut_first_name_tl
+ \seq_pop_left:NN \l_tmpb_seq \l_letgut_title_tl
+ \seq_put_right:Nx \l__letgut_items_seq {
+ \quark_if_no_value:NTF \l_letgut_first_name_tl {
+ \__letgut_person_last_name:n {
+ \l_letgut_last_name_tl
+ }
+ }{
+ \quark_if_no_value:NTF \l_letgut_title_tl {
+ \__letgut_person_first_name_last_name:nn
+ {\l_letgut_first_name_tl}
+ {\l_letgut_last_name_tl}
+ }{
+ \__letgut_person_first_name_last_name_title:nnn
+ {\l_letgut_first_name_tl}
+ {\l_letgut_last_name_tl}
+ {\l_letgut_title_tl}
+ }
+ }
+ }
+ }
+ \seq_use:Nnnn \l__letgut_items_seq {
+ \c_space_tl \str_use:N \& \c_space_tl
+ } { ,~ } { \c_space_tl \str_use:N \& \c_space_tl }
+ }
+ #+end_src
+
+*** Horizontal rule
+
+ #+begin_src latex
+ \NewDocumentCommand {\separator} { } {
+ \par
+ \skip_vertical:N 1em
+ \hrule
+ \skip_vertical:N 1em
+ }
+ #+end_src
+
+*** Alert boxes
+
+ #+begin_src latex
+ \colorlet {letgut_default_alert_box_color} {
+ \c__letgut_default_alert_box_color_tl
+ }
+ \NewDocumentCommand \alertbox {
+ O{letgut_default_alert_box_color} +m
+ } {
+ \__letgut_alert_box:nn { #1 }{ #2 }
+ }
+ #+end_src
+
+*** Typesetting of packages, classes, files and softwares.
+
+The ~\c__letgut_httpsprefix_tl~ comes from:
+
+https://github.com/latex3/hyperref/issues/188#issuecomment-826302843.
+
+ #+begin_src latex
+ \tl_const:Nx \c__letgut_httpsprefix_tl
+ {https\char_generate:nn{58}{12}//}
+ #+end_src
+ We define the font switches dediacted to each of packages and classes
+ (\TeX{} stuff), files and softwares.
+ #+begin_src latex
+ \tl_new:N \l__letgut__tex_stuff_font_switch_tl
+ \tl_new:N \l__letgut_files_font_switch_tl
+ \tl_new:N \l__letgut_softwares_font_switch_tl
+ \tl_set:Nn \l__letgut__tex_stuff_font_switch_tl {\sffamily}
+ \tl_set:Nn \l__letgut_files_font_switch_tl {\ttfamily}
+ \tl_set:Nn \l__letgut_softwares_font_switch_tl {\ttfamily}
+ #+end_src
+
+ #+begin_src latex
+ \cs_new_protected:Nn \__letgut_tex_stuff:nn
+ {
+ \IfNoValueTF {#1}
+ {
+ \href{
+ \c__letgut_httpsprefix_tl ctan.org/pkg/#2
+ }{
+ {\l__letgut__tex_stuff_font_switch_tl #2}
+ }
+ }{
+ \tl_if_empty:nTF {#1}
+ {
+ {\l__letgut__tex_stuff_font_switch_tl #2}
+ }{
+ \href{#1}{{\l__letgut__tex_stuff_font_switch_tl #2}}
+ }
+ }
+ }
+ \cs_new_protected:Nn \__letgut_software:nn
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ {\l__letgut_softwares_font_switch_tl #2}
+ }{
+ \href{#1}{{\l__letgut_softwares_font_switch_tl #2}}
+ }
+ }
+ \cs_new_protected:Nn \__letgut_file:n
+ {
+ {\l__letgut_files_font_switch_tl #1}
+ }
+ \NewDocumentCommand{\package}{ s o m O{package} } {
+ \IfBooleanT{#1}{
+ #4
+ \c_space_tl
+ }
+ \__letgut_tex_stuff:nn {#2}{#3}
+ }
+ \NewDocumentCommand{\class}{ s o m O{classe} } {
+ \IfBooleanT{#1}{
+ #4
+ \c_space_tl
+ }
+ \__letgut_tex_stuff:nn {#2}{#3}
+ }
+ \NewDocumentCommand{\file}{ s m O{fichier} } {
+ \IfBooleanT{#1}{
+ #3
+ \c_space_tl
+ }
+ \__letgut_file:n {#2}
+ }
+ \NewDocumentCommand {\software} { s O{} m O{logiciel} } {
+ \IfBooleanT{#1}{
+ #4
+ \c_space_tl
+ }
+ \__letgut_software:nn {#2}{#3}
+ }
+ #+end_src
+
+*** Names, etc.
+
+#+begin_src latex
+ \NewExpandableDocumentCommand { \gutenberg } { } {
+ \c__letgut_gutenberg_tl
+ }
+ \NewExpandableDocumentCommand { \gut } { } {
+ \c__letgut_gutenberg_tl
+ }
+ \NewExpandableDocumentCommand { \lettre } { } {
+ \c__letgut_Lettre_tl
+ }
+ \NewExpandableDocumentCommand { \lettregut } { } {
+ \lettre \c_space_tl \gutenberg
+ }
+ \NewExpandableDocumentCommand { \Cahier } { } {
+ \c__letgut_cahier_tl
+ }
+ \NewExpandableDocumentCommand { \Cahiers } { } {
+ \c__letgut_cahiers_tl
+ }
+ \NewExpandableDocumentCommand { \letgut } { } {
+ \class{letgut}
+ }
+ \NewExpandableDocumentCommand { \letgutcls } { } {
+ \class*{letgut}
+ }
+ \NewExpandableDocumentCommand { \tugboat } { } {
+ \c__letgut_tugboat_tl
+ }
+ \NewExpandableDocumentCommand { \knuth } { } {
+ \person{Knuth, Donald~ E.}
+ }
+ \NewExpandableDocumentCommand { \lamport } { } {
+ \person{Lamport, Leslie}
+ }
+#+end_src
+
+*** Foreign locutions
+
+#+begin_src latex
+ \cs_new_protected:Npn \__letgut_emphasis:n #1
+ {
+ \emph{#1}
+ }
+ \NewDocumentCommand { \foreignloc } { m } {
+ \__letgut_emphasis:n {#1}
+ }
+ \NewDocumentCommand { \latinloc } { m } {
+ \__letgut_emphasis:n {#1}
+ }
+#+end_src
+
+*** Bookmarks handling
+
+We disabling some commands when their arguments have to go to bookmarks.
+
+#+begin_src latex
+ \AddToHook{begindocument/end}{
+ \pdfstringdefDisableCommands{
+ \def\person#1{#1}
+ \def\author#1{#1}
+ \def\package#1{#1}
+ % \def\package*#1{package~#1}
+ \def\class#1{#1}
+ % \def\class*#1{classe~#1}
+ \def\file#1{#1}
+ % \def\file*#1{fichier~#1}
+ \def\software#1{#1}
+ % \def\software*#1{logiciel~#1}
+ \def\foreignloc#1{#1}
+ \def\lettre{Lettre}
+ \def\gutenberg{GUTenberg}
+ \def\gut{\gutenberg}
+ \def\lettregut{\lettre\c_space_tl\gutenberg}
+ \def\Cahier{Cahier}
+ \def\Cahiers{\Cahier s}
+ \def\letgut{letgut}
+ \def\letgutcls{classe~ letgut}
+ \def\knuth{Donald~ E.~ Knuth}
+ \def\lamport{Leslie~ Lamport}
+ \def\latinloc#1{#1}
+ }
+ }
+#+end_src
+
+*** Acronyms
+
+The following command let us define acronyms. The arguments are as follows:
+- ~#1~: optional argument that let us override the default settings of this
+ command,
+- ~#2~: the uppercase version of both the id and the short form of the acronym,
+- ~#3~: the long form (in French if #4 has ~-NoValue-~, in English otherwise),
+- ~#4~: the French translation of an English acronym.
+
+#+begin_src latex
+ \cs_new_protected:Nn \__letgut_acronym:nnnn
+ {
+ \AddToHook{begindocument/before}{
+ \IfValueTF {#4}{
+ \tl_if_empty:nTF {#4}{
+ \exp_args:Nx \DeclareAcronym{\text_lowercase:n {#2}}{
+ short = \text_lowercase:n {#2},
+ sort= #2,
+ long = {\emph{#3}},
+ extra-long = {anglais},
+ pdfstring = #2,
+ short-acc = #2,
+ #1
+ }
+ }{
+ \exp_args:Nx \DeclareAcronym{\text_lowercase:n {#2}}{
+ short = \text_lowercase:n {#2},
+ sort= #2,
+ long = {#4},
+ foreign = {#3},
+ foreign-babel = english,
+ foreign-locale = anglais,
+ pdfstring = #2,
+ short-acc = #2,
+ #1
+ }
+ }
+ }{
+ \exp_args:Nx \DeclareAcronym{\text_lowercase:n {#2}}{
+ short = \text_lowercase:n {#2},
+ sort= #2,
+ long = {#3},
+ pdfstring = #2,
+ short-acc = #2,
+ #1
+ }
+ }
+#+end_src
+The ⟨id⟩ of the acronym will automatically be the name of a public command
+(~\~​⟨id⟩) acting as ~\ac{id}~.
+#+begin_src latex
+ \exp_after:wN \cs_if_exist:cT { \text_lowercase:n {#2} } {
+ \msg_note:nnn{letgut}{Existing~command}{#2}
+ }
+ \exp_args:Nc \ProvideDocumentCommand
+ { \text_lowercase:n {#2} } { s } {
+ \IfBooleanTF {##1}{
+ \exp_args:Nx \acs { \text_lowercase:n {#2} }
+ }{
+ \exp_args:Nx \ac { \text_lowercase:n { #2 } }
+ }
+ }
+#+end_src
+We want the command ~\~​⟨id⟩ to work also in bookmarks (the resulting string will
+be the uppercased acronym).
+#+begin_src latex
+ \pdfstringdefDisableCommands
+ {
+ \exp_after:wN
+ \def\cs:w \text_lowercase:n {#2} \cs_end: { #2 }
+ }
+ }
+ }
+#+end_src
+
+The first occurrences of the acronyms will be displayed in their short forms,
+with the long ones in footnotes. But what about acronyms whom first occurrences
+arise within footnotes? We want the to be displayed as their short forms
+followed by their the long form in parentheses. For this, we have to add
+a boolean at the beginning (and reversed at the end) of the ~\footnote~ command
+to know whether we currently are in a footnote or not and display the acronym
+accordingly.
+
+#+begin_src latex
+ \NewCommandCopy{\__letgut_old_footnote}{\footnote}
+ \RenewDocumentCommand {\footnote} { m }{
+ \bool_set_true:N \l__letgut_in_footnote_bool
+ \__letgut_old_footnote { #1 }
+ \bool_set_false:N \l__letgut_in_footnote_bool
+ }
+#+end_src
+We change a bit both the ~footnote~ acro template, the ~description~ list
+template, and the macro which prints the locale.
+#+begin_src latex
+ \DeclareAcroProperty{extra-foreign}
+ \DeclareAcroProperty{extra-long}
+ \RenewAcroTemplate {footnote}
+ {
+ \acrowrite {short}
+ \acroiffirstT
+ {
+ #+end_src
+ If we are in a footnote, first occurrences of the acronyms are displayed
+ as “short (long)”. Otherwise, they are displayed as “short\footnote{long}”.
+ #+begin_src latex
+ \bool_if:NTF \l__letgut_in_footnote_bool {
+ \space
+ (
+ \acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ~ }
+ \acroifT {foreign} { \acrowrite {foreign} :~ }
+ \acrowrite {long}
+ \acrogroupcite
+ )
+ }{
+ \acfootnote
+ {
+ \acroifT {alt} {
+ \acrotranslate {or} ~ \acrowrite {alt} :~
+ }
+ \acroifT {foreign} { \acrowrite {foreign} }
+ \acrowrite {long}
+ \acroifT {extra-long} { ~ [\acrowrite {extra-long}] }
+ \acroifT {extra-foreign} {
+ \c_space_tl [\acrowrite {extra-foreign}]
+ }
+ \acrogroupcite
+ }
+ }
+ }
+ }
+ \RenewAcroTemplate[list]{description}{%
+ \acroheading
+ \acropreamble
+ \begin{description}
+ \acronymsmapF{%
+ \item[\acrowrite{short}\acroifT{alt}{/\acrowrite{alt}}]
+ \acroifT{foreign}{
+ \acrowrite{foreign}\acroifT{extra}{, }
+ }%
+ \acroifT{extra}{\acrowrite{extra}}%
+ \acroifanyT{foreign,extra}{\acspace (}%
+ \acrowrite{list}%
+ \acroifT {extra-foreign} {
+ , \c_space_tl \acrowrite {extra-foreign}
+ }
+ \acroifanyT{foreign,extra}{)}%
+ \acropagefill
+ \acropages
+ {\acrotranslate{page}\nobreakspace}
+ {\acrotranslate{pages}\nobreakspace}%
+ }
+ {\item\AcroRerun}
+ \end{description}
+ }
+ % #1: id
+ % #2: property
+ % #3: text
+ \cs_set_protected:Npn \acro_locale:nnn #1#2#3
+ {
+ \acro_if_foreign:nTF {#2}
+ {
+ \acro_if_locale:nnTF {#1} {#2}
+ {
+ \__acro_foreign_language:en
+ { \str_lowercase:e {
+ \acro_property_get:nn {#1} {foreign-babel}
+ }
+ }
+ {#3}
+ \bool_if:NTF \l__acro_list_bool
+ { \bool_if:NT \l__acro_list_show_locale_bool }
+ { \bool_if:NT \l__acro_show_locale_bool }
+ {
+ {
+ \l__acro_locale_format_tl
+ {
+ \acro_property_if_set:nnTF {#1} {
+ foreign-locale
+ }
+ {
+ \acspace
+ [
+ \acro_property_get:nn {#1} {
+ foreign-locale
+ }
+ ]
+ }{
+ \baselanguage
+ {
+ \acro_property_get:nn {#1} {
+ foreign-babel
+ }
+ }
+ }
+ }
+ }
+ :~
+ }
+ }
+ {#3}
+ }
+ {#3}
+ }
+#+end_src
+Now, the document command that let the user create acronyms.
+#+begin_src latex
+ \NewDocumentCommand{\letgutacro}{ O{} m m o }
+ {
+ \__letgut_acronym:nnnn {#1} {#2} {#3} {#4}
+ }
+#+end_src
+For printing the acronyms, we define two new heading templates for the structure
+levels ~\title~ and ~\subtitle~.
+#+begin_src latex
+\NewAcroTemplate[heading] {title}
+ { \title { \acrolistname } }
+\NewAcroTemplate[heading] {subtitle}
+ { \subtitle { \acrolistname } }
+#+end_src
+We make ~\letgutacro~ available only in the preamble part of the document
+(otherwise, no warning from \package{acro} but only the long form of the acronym
+is printed when used for the first time with ~\ac~).
+#+begin_src latex
+\@onlypreamble\letgutacro
+#+end_src
+
+** Bibliography
+
+We want the ~\citeauthor~ command to display, not only the last, but the
+full name of the authors.
+
+#+begin_src latex
+ \NewCommandCopy{\__letgut_old_citeauthor}{
+ \citeauthor
+ }
+ \RenewDocumentCommand {\citeauthor} { O{} O{} m } {
+ \AtNextCite{\DeclareNameAlias{labelname}{given-family}}
+ \__letgut_old_citeauthor[#1][#2]{#3}
+ }
+ #+end_src
+
+** Book reviews
+
+#+begin_src latex
+ \tl_new:N \g__letgut_bookreview_frontcover_tl
+ \tl_new:N \g__letgut_bookreview_bibkey_tl
+ #+end_src
+The keys options are created.
+ #+begin_src latex
+ \keys_define:nn { gzt/bookreview }
+ {
+ title .tl_gset:N = \g__letgut_bookreview_title_tl,
+ frontcover .tl_gset:N = \g__letgut_bookreview_frontcover_tl,
+ bibkey .tl_gset:N = \g__letgut_bookreview_bibkey_tl,
+ reviewer .tl_gset:N = \g__letgut_bookreview_reviewer_tl,
+ price .tl_gset:N = \g__letgut_bookreview_price_tl,
+ #+end_src
+
+All these options, when used, must receive a value.
+
+#+begin_src latex
+ title .value_required:n = true,
+ frontcover .value_required:n = true,
+ bibkey .value_required:n = true,
+ reviewer .value_required:n = true,
+ }
+#+end_src
+
+We create the new environment for the book reviews.
+
+#+begin_src latex
+ \cs_generate_variant:Nn \msg_warning:nnn { nnV }
+ \cs_generate_variant:Nn \msg_error:nnnn { nnVV }
+ \NewDocumentEnvironment{bookreview}{ m }
+ {
+ \keys_set:nn { gzt/bookreview } { #1 }
+ \section{\g__letgut_bookreview_title_tl}
+ \tl_if_empty:NTF \g__letgut_bookreview_frontcover_tl {
+ \msg_warning:nnV{letgut}{frontcover-missing}{
+ \g__letgut_bookreview_title_tl
+ }
+ }{
+#+end_src
+
+We check if the front cover file is available against the list of accepted
+extensions of the ~graphicx~ package.
+
+#+begin_src latex
+ \clist_map_inline:Nn \Gin@extensions {
+ \file_if_exist:nT{\g__letgut_bookreview_frontcover_tl##1}{
+ \bool_set_true:N \l_tmpa_bool
+ \clist_map_break:
+ }
+ }
+ \bool_if:NTF \l_tmpa_bool {
+ \marginpar{
+ \hspace*{\c__letgut_bookreview_frontcover_margin_sep_dim}
+ % \raggedleft
+ \raisebox{-\totalheight}{
+ \fbox{
+ \includegraphics[width=-\c__letgut_title_hoffset_dim]{
+ \g__letgut_bookreview_frontcover_tl
+ }
+ }
+ }
+ }
+ }{
+ \msg_error:nnVV
+ {letgut}
+ {frontcover-file-not-found}
+ {\g__letgut_bookreview_title_tl}
+ {\g__letgut_bookreview_frontcover_tl}
+ }
+ }
+ \noindent
+ \textsf{\fullcite{\g__letgut_bookreview_bibkey_tl}}
+ \tl_if_empty:NF \g__letgut_bookreview_price_tl{
+ .\c_space_tl\EUR{\g__letgut_bookreview_price_tl}
+ }
+ \par
+ }{
+ \exp_args:NV \author{\g__letgut_bookreview_reviewer_tl}
+ }
+#+end_src
+
+** Miscellanous
+
+- We specify the possible hyphenations of \enquote{\gutenberg}.
+#+begin_src latex
+ \hyphenation{GUT-enberg}
+#+end_src
+
+*** Non selectable text
+
+We create a control sequence that makes its argument not selectable in the
+PDF. This will be used notably for the line numbers of the listings and the
+watermarks.
+#+begin_src latex
+\cs_new_protected:Npn \__letgut_unselectable:n #1
+{
+ \BeginAccSupp{ActualText={}}#1\EndAccSupp{}
+}
+#+end_src
+
+*** Typesetting of code, etc.
+
+ We provide a ~\meta~ macro that (poorly) mimics the one of the
+ \package*{doc}. It is added at the very end of the preamble since other
+ package that provide a better definition of this macro may have been loaded
+ (e.g. \package{tcolorbox}).
+ #+begin_src latex
+ \colorlet {__letgut_meta} {
+ brown
+ }
+ \cs_new_protected:Nn \__letgut_meta:nn
+ {
+ \bgroup
+ \normalfont
+ \ttfamily
+ \itshape
+ \textcolor{#1}{$\langle$#2$\rangle$}
+ \egroup
+ }
+ \AddToHook{begindocument/before}{
+ \ProvideDocumentCommand{\meta}{ O{__letgut_meta} m } {
+ \__letgut_meta:nn {#1}{#2}
+ }
+ }
+ #+end_src
+
+** LaTeX listings and examples
+
+We first define some colors used in the listings and examples.
+
+#+begin_src latex
+ \definecolor{__letgut_backgroundCode}{cmyk}{0,0,0,0.04}
+ \definecolor{__letgut_borderCode}{cmyk}{0,0,0,0.2}
+ \definecolor{__letgut_foregroundLinenumber}{cmyk}{0,0,0,0.5}
+ \definecolor{__letgut_foregroundMention}{cmyk}{0,0,0,0}
+ \definecolor{__letgut_backgroundResult}{cmyk}{0,0,0,0}
+#+end_src
+
+We now define the colors for the syntax highlighting and define the style of our
+listings.
+
+#+begin_src latex
+ \colorlet{__letgut_texcs}{blue}
+ \colorlet{__letgut_comment}{gray}
+ \colorlet{__letgut_argument-specification-separator}{red}
+ \colorlet{__letgut_argument-specification}{cyan}
+ \colorlet{__letgut_mandatory-argument}{purple}
+ \colorlet{__letgut_environment}{teal}
+ \colorlet{__letgut_key}{__letgut_mandatory-argument}
+ \colorlet{__letgut_value}{violet}
+ \colorlet{__letgut_optional-argument}{__letgut_key}
+ \colorlet{__letgut_math}{green!50!black}
+ \lstset{%
+ texcsstyle=*\color{__letgut_texcs},
+ commentstyle=\color{__letgut_comment}\itshape,
+ keywordstyle= \color{__letgut_argument-specification-separator},
+ keywordstyle={[2]\color{__letgut_environment}},
+ keywordstyle={[3]\color{__letgut_key}},
+ keywordstyle={[4]\color{__letgut_value}},
+ keywordstyle={[5]\color{__letgut_argument-specification}},
+ keywordstyle={[6]\color{__letgut_key}},
+ escapechar=£,
+ literate=*%
+ {\\\\}{{{\color{__letgut_texcs}\textbackslash\textbackslash}}}{2}%
+ {\\[}{{\textcolor{__letgut_math}{\textbackslash[}}}{2}%
+ {\\]}{{\textcolor{__letgut_math}{\textbackslash]}}}{2}%
+ {$}{{\textcolor{__letgut_math}{\$}}}{1}%$
+ }
+#+end_src
+
+For the listings and examples, we rely on \package*{tcolorbox}, and more
+specifically on some of its libraries.
+
+#+begin_src latex
+ \tcbuselibrary{listings,xparse,breakable,skins}
+#+end_src
+
+The functions:
+
+- ~\__letgut_code_result_mention_box:n~ draws the mentions “code” and “résultat”
+ in the codes boxes and the possible corresponding results boxes,
+- ~\__letgut_title_code_result_box:n~ for the title of codes and the results
+ boxes: “Exemple” followed by the number of the example and, if a ~title addon~
+ option is provided, the specified title addon.
+
+#+begin_src latex
+ \cs_new_protected:Npn \__letgut_code_result_mention_box:nn #1 #2
+ {
+ \node[
+ minimum~ width=1cm,
+ minimum~ height=\c__letgut_height_mentions_dim,
+ outer~ sep=auto,
+ anchor=north~ east,
+ fill=__letgut_borderCode
+ ]~ at~ (#1)
+ {
+ \itshape
+ \small
+ \color{__letgut_foregroundMention}
+ \__letgut_unselectable:n {#2}
+ };
+ }
+ \cs_new_protected:Npn \__letgut_title_code_result_box:n #1
+ {
+ Exemple~ \thetcbcounter
+ \tl_if_empty:NF {#1} { \hypersetup{hidelinks} \c_space_tl :~#1 }
+ }
+ \cs_new_protected:Nn \__letgut_on_callout_page:nn
+ {
+ \tl_set:Nn \l_tmpa_int {\getpagerefnumber{#1}}
+ \tl_set:Nn \l_tmpb_int {\thepage}
+ \int_compare:nNnF {\l_tmpa_int} = {\l_tmpb_int}
+ {#2}
+ }
+#+end_src
+
+We define the style of the codes and the results boxes.
+
+#+begin_src latex
+ \tl_set:Nn \l__letgut_reference_text_tl {
+ Cf.~\vref{\g__letgut_label_ltx_example_str}.
+ }
+ \tcbset{
+ __letgut_code/.style={
+ listing~ options={
+ % style=tcblatex,
+ numbers=left,
+ numbersep=\c__letgut_number_sep_dim,
+ #+end_src
+ We want the line numbers to not be selectable, hence the ~\__letgut_unselectable:n~:.
+ #+begin_src latex
+ numberstyle=
+ \scriptsize
+ \ttfamily
+ \color{__letgut_foregroundLinenumber}
+ \__letgut_unselectable:n,
+ },
+ every~ float=\raggedleft,
+ colback=__letgut_backgroundCode,
+ breakable,
+ sharp~ corners,
+ boxrule=0.25mm,
+ colframe=__letgut_borderCode,
+ sidebyside~ align=top~ seam,
+ toprule~ at~ break=0mm,
+ bottomrule~ at~ break=0mm,
+ colbacktitle=__letgut_borderCode,
+ fonttitle=\sffamily\bfseries,
+ before~ title={
+ \tl_set:Nn \l__letgut__tex_stuff_font_switch_tl {\rmfamily}
+ },
+ #+end_src
+We define a custom \package*{tcolorbox}'s ~title addon~ option that let us
+specify an addon to the title which will added after the automatically
+generated title “Exemple \meta{number}”.
+ #+begin_src latex
+ title~ addon/.store~ in=\l__letgut_title_addon_tl,
+ title=\__letgut_title_code_result_box:n {\l__letgut_title_addon_tl},
+ #+end_src
+We define a custom \package*{tcolorbox}'s ~reference text~ option that let us
+override the text of the reference for the examples with code and result side by
+side that are floating and not being of their call out pages.
+ #+begin_src latex
+ reference~ text/.code={
+ \tl_set:Nn \l__letgut_reference_text_tl {##1}
+ },
+ #+end_src
+We define a custom \package*{tcolorbox}'s ~result width~ option that let us
+specify the width of the result which is ~\linewidth~ by default.
+ #+begin_src latex
+ result~ width/.store~ in=\l__letgut_result_width_dim,
+ result~ width=\linewidth,
+ },
+ __letgut_code_result/.style={
+ __letgut_code={#1},
+ bicolor,
+ colbacklower=__letgut_backgroundResult,
+ segmentation~ at~ break=false,
+ top=\c__letgut_height_mentions_dim,
+ middle=\c__letgut_height_mentions_dim,
+ #+end_src
+ We want the side by side code/result examples to automatically be floating.
+ #+begin_src latex
+ sidebyside@true/.code={%
+ \tcb@sidebysidetrue%
+ \tcb@isbreakablefalse%
+ \pgfkeysalso{floatplacement=ht}%
+ \pgfkeysalso{float}%
+ \pgfkeysalso{label={\g__letgut_label_ltx_example_str}}%
+ \tl_set:Nx \l_tmpa_tl {
+ \getpagerefnumber {
+ \g__letgut_callout_label_ltx_example_str
+ }
+ }
+ \tl_set:Nx \l_tmpb_tl {
+ \getpagerefnumber {
+ \g__letgut_label_ltx_example_str
+ }
+ }
+ \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+ {
+ \l__letgut_reference_text_tl
+ \tl_set:Nn \l__letgut_reference_text_tl {
+ Cf.~\vref{\g__letgut_label_ltx_example_str}.
+ }
+ \pgfkeysalso{
+ drop~ shadow=black,
+ grow~ to~ left~ by=4cm,
+ boxed~ title~ style={sharp~ corners},
+ }
+ \pgfkeysalso{after~ title~ app=\c_space_tl (cf.~page~\thepage)}
+ }
+ },%
+ overlay={
+ \iftcb@sidebyside
+ \__letgut_code_result_mention_box:nn {segmentation.north} {code}
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {résultat}
+ \else
+ \ifcase\tcbsegmentstate
+ % 0 = Box contains only an upper part
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {code}
+ \or%
+ % 1 = Box contains an upper and a lower part
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {code
+ #+end_src
+
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ \int_compare:nNnT {\thetcbbreakpart} > {1} {~(suite)}
+ }
+ \__letgut_code_result_mention_box:nn {
+ [yshift=.1mm]segmentation.east
+ } {résultat}
+ \else%
+ % 2 = Box contains only a lower part
+ \__letgut_code_result_mention_box:nn {interior.north~ east} {résultat
+ #+end_src
+
+# < (Just not to disturb the parentheses balancing
+# detection of my editor.)
+
+ #+begin_src latex
+ \int_compare:nNnT {\thetcbbreakpart} > {1} {~(suite)}
+ }
+ \fi
+ \fi
+ },
+ },
+ }
+#+end_src
+
+The \package*{tcolorbox} listings defined below make use of
+\package*{cleveref}'s features. But, since the latter package is loaded
+~\AddToHook{begindocument/before}~, the same is needed for these listings.
+
+#+begin_src latex
+\AddToHook{begindocument/before}{
+#+end_src
+
+We now define the environments that let us display:
+
+1. only LaTeX code:
+#+begin_src latex
+ \DeclareTCBListing[
+ auto~ counter,
+ crefname={exemple}{exemples}
+ ]{ltx-code}{ !O{} }{%
+ __letgut_code,
+ listing~ only,
+ #1%
+ }
+#+end_src
+1. both LaTeX code and its result:
+ 1. ordinary:
+#+begin_src latex
+ \DeclareTCBListing[
+ use~ counter~ from=ltx-code,
+ crefname={exemple}{exemples}
+ ]{ltx-code-result}{ !O{} }{%
+ __letgut_code_result,
+ #1%
+ }
+#+end_src
+ 2. with the result obtained externally:
+#+begin_src latex
+ \DeclareTCBListing[
+ use~ counter~ from=ltx-code,
+ crefname={exemple}{exemples}
+ ]{ltx-code-external-result}{ O{} m }{%
+ __letgut_code_result,
+ listing~ and~ comment,
+ image~ comment={width=\l__letgut_result_width_dim}{#2},
+ center~ lower,
+ #1%
+ }
+#+end_src
+
+#+begin_src latex
+}
+#+end_src
+
+The examples with code and result side by side will be floating but we want the
+ones being of their call out pages to have before and after them a reduced
+vertical glue (~\g__letgut_reduced_intextsep_dim~). Hence we store the original
+glue (~\intextsep~) in a custom one (~\g__letgut_orig_intextsep_dim~) in order
+to retrieve the original skip for floats other than these ones.
+
+#+begin_src latex
+ \skip_const:Nn \c__letgut_orig_intextsep_skip {\intextsep}
+ \skip_const:Nn \c__letgut_reduced_intextsep_skip {
+ 4\p@ \@plus .667\p@ \@minus .667\p@
+ }
+ #+end_src
+
+We now use hooks in order to...
+
+ #+begin_src latex
+ \AddToHook{env/ltx-code-result/before}{
+ \int_gincr:N \g__letgut_ltx_example_int
+ \str_set:Nx \g__letgut_label_ltx_example_str {
+ \c__letgut_label_ltx_example_str-
+ \int_use:N \g__letgut_ltx_example_int
+ }
+ \str_set:Nx \g__letgut_callout_label_ltx_example_str {
+ \c__letgut_callout_label_ltx_example_str-
+ \int_use:N \g__letgut_ltx_example_int
+ }
+ \label{\g__letgut_callout_label_ltx_example_str}
+ \tl_set:Nx \l_tmpa_tl {
+ \getpagerefnumber {
+ \g__letgut_callout_label_ltx_example_str
+ }
+ }
+ \tl_set:Nx \l_tmpb_tl {
+ \getpagerefnumber {
+ \g__letgut_label_ltx_example_str
+ }
+ }
+ \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+ {
+ \skip_set_eq:NN \intextsep \c__letgut_reduced_intextsep_skip
+ }
+ }
+#+end_src
+
+** Local config file
+
+Each issue of the Lettre requires certain local configurations: configuration
+dedicated to the issue in question, particular packages used in the articles,
+specific configurations of the \package*{listings}, etc. In order to not clutter
+the main \file*{.tex} of the Lettre, a local configuration file named
+\file{localconf.tex}, if present in the current directory, is automatically
+included at the end of the end of the preamble. And since this file is input in
+the current category régime (~\ExplSyntaxOn~), a ~\ExplSyntaxOff~ is
+automatically inserted at its beginning.
+
+#+begin_src latex
+ \file_if_exist:nT {./\c__letgut_local_config_file_tl}{
+ \AddToHook { file/before/./\c__letgut_local_config_file_tl } {
+ \ExplSyntaxOff
+ }
+ \file_input:n {./\c__letgut_local_config_file_tl}
+ }
+#+end_src
+
+We don't want the book review entry types to be listed in the bibliography
+(they appears only thanks to the ~bookreview~ environment).
+
+#+begin_src latex
+ \ExecuteBibliographyOptions[bookreview]{skipbib,skiplab}
+#+end_src
+
+#+begin_src latex
+ \endinput
+#+end_src
+
+* (biblatex) Data model
+
+We give the (\package{biblatex}) data model that enriches the default one for
+several purposes:
+- the books reviews,
+- the books advertisements.
+
+#+begin_src latex :tangle letgut.lbx :exports both
+ \ProvidesFile{letgut.lbx}[2022-03-18 v0.9 letgut localization]
+ \InheritBibliographyExtras{french}
+ \DeclareBibliographyStrings{
+ inherit = {french},
+ number = {{\no}{\no}},
+ volume = {{volume}{vol\adddot}},
+ volumes = {{volumes}{vol\adddot}},
+ }
+ #+end_src
+
+ We create the new bibliography driver ~bookreview~ (that seems to
+ create the corresponding new entry).
+
+ #+begin_src latex :tangle letgut.dbx :exports both
+ \ProvidesFile{letgut.dbx}[2022-03-18 v0.9 letgut data model macros]
+ \DeclareBibliographyDriver{bookreview}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit{\printdelim{nametitledelim}}
+ \newblock
+ \usebibmacro{maintitle+title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \printfield{edition}%
+ \newunit
+ \iffieldundef{maintitle}
+ {\printfield{volume}%
+ \printfield{part}}
+ {}%
+ \newunit
+ \printfield{volumes}%
+ \newunit\newblock
+ \usebibmacro{series+number}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \finentrypunct
+ \usebibmacro{finentry}}
+#+end_src
+
+We provide a specific ~biblatex~ citation style .
+
+#+begin_src latex :tangle letgut.cbx :exports both
+ \ProvidesFile{letgut.cbx}[2022-03-18 v0.9 letgut base citation style]
+ \RequireCitationStyle{numeric}
+#+end_src
+
+The books reviewed have their titles not only emphasized, but in bold face as
+well...
+
+#+begin_src latex :tangle letgut.cbx :exports both
+ \DeclareFieldFormat[bookreview]{title}{\textbf{\emph{#1}}}
+#+end_src
+
+... but not their subtitles.
+
+#+begin_src latex :tangle letgut.cbx :exports both
+ \renewbibmacro*{title}{%
+ \ifboolexpr{
+ test {\iffieldundef{title}}
+ and
+ test {\iffieldundef{subtitle}}
+ }
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \setunit{\subtitlepunct}}%
+ \printfield[emph]{subtitle}%
+ \newunit}%
+ \printfield{titleaddon}}
+#+end_src
+
+* Provided files
+
+** Example file of an issue of the newsletter
+
+ #+begin_src latex :tangle lettre-example.tex :exports both
+ \documentclass{letgut}
+
+ \letgutsetup{
+ % % Option booléenne pour la version finale de la Lettre.
+ % % L'option contraire`draft` (par défaut) affiche
+ % % « Brouillon » en filigrane et actionne le package
+ % % `lua-typo`.
+ %
+ % , final
+ %
+ % % Option coloriant le fond de la page d'une couleur
+ % % par défaut (`1.0, 0.98, 0.94` en « rgb ») mais
+ % % modifiable au moyen de l'option `pagecolor` ci-dessous.
+ %
+ % , paper
+ %
+ % % Numéro de la Lettre
+ %
+ , number=44
+ %
+ % % Date de la Lettre. Celle-ci est déduite de la
+ % % date du jour, mais peut être spécifiée sous la forme
+ % % AAAA-MM (avec garde-fous) ou librement
+ % % (p. ex. `date=Printemps 2021`).
+ %
+ % , date=2025-16
+ %
+ % % Couleur de la page, à spécifier selon le modèle « rgb ».
+ %
+ % , pagecolor={1.0, 0.1, 0.94}
+ %
+ % % Couleur des hyperliens, à spécifier selon le modèle
+ % % « named ».
+ %
+ % , allcolorslinks=cyan
+ %
+ % % Un (r)appel à cotisation est automatiquement ajouté
+ % % en 1re page. Si on ne le souhaite pas, il suffit de
+ % % passer l'option `membership-reminder=false`.
+ %
+ % , membership-reminder=false
+ %
+ % % Si un fichier `editorial.tex`, on s'en doute censé
+ % % contenir l'éditorial, est présent dans le répertoire
+ % % courant, son contenu est automatiquement ajouté en
+ % % 1re page. Si un tel fichier est absent du répertoire
+ % % courant, une alerte est affichée à la place, sauf si,
+ % % parce qu'on ne souhaite pas d'éditorial, on passe
+ % % l'option `editorial=false`.
+ %
+ % , editorial=false
+ %
+ % % Les informations concernant GUTenberg, si elles
+ % % figurent dans un fichier `informations-gut.tex`
+ % % présent dans le répertoire courant, sont
+ % % automatiquement ajoutées en dernière page.
+ % % Si on ne souhaite pas que figurent ces
+ % % informations, il suffit de passer l'option
+ % % `informations=false`.
+ %
+ % , informations=false
+ }
+
+ \setmainfont{TeX Gyre Schola} % Par exemple
+
+ \usepackage[maths=both]{duckuments}
+ \usepackage{mwe}
+
+ % \addbibresource{biblio.bib}
+
+ \begin{document}
+ \duckument
+ \end{document}
+
+ %%% Local Variables:
+ %%% mode: latex
+ %%% TeX-engine: luatex
+ %%% TeX-master: t
+ %%% End:
+ #+end_src
+
+** Example of an editorial
+
+ #+begin_src latex :tangle editorial.tex :exports both
+ Ceci est un intéressant éditorial de la \lettregut{}
+ dans lequel on peut causer de l'\ag{} et du \ca{}
+ de l'association. Il peut aussi y être question du \ctan.
+
+ \lipsum[1-5]
+
+ \begin{figure}[ht]
+ \centering
+ \includegraphics[width=.7\linewidth]{example-image}
+ \caption{Ducks ?}
+ \label{fig:ducks}
+ \end{figure}
+
+ \lipsum[6-10]
+ #+end_src
+
+** Informations about \gutenberg
+
+ #+begin_src latex :tangle informations-gut.tex :exports both
+ \enlargethispage{1.5cm}
+ \small
+ \vspace*{-1cm}
+ \hspace*{-1.5cm}%
+ \raisebox{-\height+0.7\baselineskip}{%
+ \begin{minipage}[t]{.6\textwidth}%\vspace{0pt}%
+ \includegraphics[width=\linewidth]{logo-gut.pdf}
+ \end{minipage}%
+ }%
+ \hfill%
+ \begin{minipage}[t]{.4\textwidth}%\vspace{0pt}%
+ \footnotesize\raggedleft%
+ Association \gut{}\\
+ 15 rue des Halles -- \textsc{bp} 74\\
+ 75001 Paris\\
+ France\\
+ \nolinkurl{secretariat@gutenberg.eu.org}
+ \end{minipage}%
+
+ \begin{description}
+ \item[Site internet :] \url{https://www.gutenberg.eu.org/}
+ \item[\Cahiers{} :] \url{http://cahiers.gutenberg.eu.org/}
+ \item[Problèmes techniques :]
+ \leavevmode
+ \begin{description}
+ \item[la liste \texttt{gut} :]
+ \url{https://www.gutenberg.eu.org/-Listes-de-diffusion-}
+ \item[le site \TeX nique de questions et réponses :]
+ \url{https://texnique.fr/}
+ \item[la foire aux questions :]
+ \url{https://faq.gutenberg.eu.org}
+ \end{description}
+ \end{description}
+ %
+ \alertbox{%
+ Cette association est la vôtre: faites-nous part de
+ vos idées, de vos envies, de vos préoccupations
+ à l'adresse \nolinkurl{secretariat@gutenberg.eu.org}.%
+ }
+
+ % \section[Association GUTenberg (tout sur l')]
+ % {Adhésion à l'association}
+ \title{Adhésion à l'association}
+ \label{letgut_label_adhesions}
+
+ \begin{itemize}
+ \item % Adhésions et abonnements
+ Les adhésions sont à renouveler en début d'année
+ pour l'année civile.
+ % \item Il n'y a pas de lettre de rappel, chaque membre
+ % doit faire son renouvellement annuel; %\hspace*{1em}
+ % merci de renvoyer spontanément le bulletin ci-dessous
+ % en début d'année.
+ \item Les administrations peuvent joindre un bon de commande
+ revêtu de la signature de la personne responsable ;
+ les étudiants doivent joindre un justificatif.
+ % \item Si vous souhaitez que vos coordonnées restent
+ % confidentielles, merci de le signaler.
+ \end{itemize}
+
+ \section{Tarifs \the\year}
+
+ Les membres de \gut\ peuvent adhérer à l'association
+ internationale, le \acf{tug}, et recevoir son bulletin
+ \emph{\acs{tug}boat} à un tarif préférentiel :
+ \begin{description}
+ \item[tarif normal :] \EUR{65} (au lieu de 85~\$)
+ \item[tarif étudiant :] \EUR{40} (au lieu de 55~\$)
+ \end{description}
+ % (\EUR{49,50}, étudiants et demandeurs d'emploi :
+ % \EUR{29}, au lieu de 85\$ et % 65\$). Voir
+ % \url{%
+ % https://www.gutenberg.eu.org/?Adherer-a-l-association%
+ % }.
+
+ \footnotesize
+ \begin{center}
+ \begin{tabular}{lr}
+ \toprule
+ \textbf{Type d'adhésion} & \textbf{Prix} \\
+ \midrule
+ Membre individuel & \EUR{30} \\
+ Membre individuel + adhésion \acs{tug} & \EUR{95} \\
+ Membre individuel étudiant/demandeur d'emploi & \EUR{15} \\
+ Membre individuel étudiant + adhésion \acs{tug} & \EUR{55} \\
+ Association d'étudiants & \EUR{65} \\
+ Organisme à but non lucratif & \EUR{130} \\
+ Organisme à but lucratif & \EUR{229} \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+
+ \section{Règlements}
+
+ Les règlements peuvent s'effectuer par :
+ \begin{itemize}
+ \item \textbf{virement bancaire}%
+ \footnote{Nous vous remercions de \textbf{privilégier}
+ le \textbf{virement bancaire}.\label{fn:1}} (IBAN :
+ FR76 1870 7000 3003 0191 3568 475)%
+ \leavevmode
+
+ \alertbox{%
+ Veillez à bien \emph{indiquer vos nom et prénom}
+ dans les références du virement !%
+ }
+ \item Paypal\footnotemark[\value{footnote}] :
+ \url{https://www.gutenberg.eu.org/?Adherer-en-ligne}
+ \item bulletin et chèque\footnotemark[\value{footnote}] :
+ \url{https://www.gutenberg.eu.org/?Adherer-a-l-association}
+ \end{itemize}
+
+ \vfill
+
+ \begin{center}
+ \begin{tblr}{
+ width=.75\linewidth,
+ colspec={
+ % < (Just not to disturb the parentheses
+ % balancing detection of my editor.)
+ >{\bfseries}r@{ }X
+ },
+ vline{1,3}={solid},
+ hline{1,7}={solid},
+ rowsep=0mm,
+ row{1} = {abovesep+=.25cm},
+ row{2} = {belowsep+=.125cm},
+ row{6} = {belowsep+=.25cm},
+ % colsep=2.5mm,
+ }
+ \SetCell[c=2]{c} \emph{La \lettregut}\\
+ \SetCell[c=2]{c} \mdseries Bulletin irrégulomestriel
+ de l'association \gut\\
+ Directeur de la publication :
+ & \person{Bideault, Patrick} \\
+ Comité de rédaction :
+ & {Patrick \bsc{Bideault}, Denis \bsc{Bitouzé}, \\
+ Céline \bsc{Chevalier} \& Maxime \bsc{Chupin}} \\
+ Adresse de la rédaction : &
+ {
+ Association \gut\\
+ 15 rue des Halles -- \textsc{bp} 74\\
+ 75001 Paris
+ }
+ \\
+ \acs{issn} : & 2742-6149 (version numérique)
+ \end{tblr}
+ \end{center}
+ \vfill
+ \mbox{}
+ \clearpage
+
+ %%% Local Variables:
+ %%% mode: latex
+ %%% End:
+ #+end_src
+
+* Footnotes
+
+[fn:1]See \url{https://github.com/ho-tex/luacolor/issues/4\#issuecomment-848774260}.
diff --git a/macros/luatex/latex/letgut/tex/Flag_of_La_Francophonie-crop.pdf b/macros/luatex/latex/letgut/tex/Flag_of_La_Francophonie-crop.pdf
new file mode 100644
index 0000000000..f57796b134
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/Flag_of_La_Francophonie-crop.pdf
Binary files differ
diff --git a/macros/luatex/latex/letgut/tex/informations-gut.tex b/macros/luatex/latex/letgut/tex/informations-gut.tex
new file mode 100644
index 0000000000..def4a25fce
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/informations-gut.tex
@@ -0,0 +1,155 @@
+\enlargethispage{1.5cm}
+\small
+\vspace*{-1cm}
+\hspace*{-1.5cm}%
+\raisebox{-\height+0.7\baselineskip}{%
+ \begin{minipage}[t]{.6\textwidth}%\vspace{0pt}%
+ \includegraphics[width=\linewidth]{logo-gut.pdf}
+ \end{minipage}%
+}%
+\hfill%
+\begin{minipage}[t]{.4\textwidth}%\vspace{0pt}%
+ \footnotesize\raggedleft%
+ Association \gut{}\\
+ 15 rue des Halles -- \textsc{bp} 74\\
+ 75001 Paris\\
+ France\\
+ \nolinkurl{secretariat@gutenberg.eu.org}
+\end{minipage}%
+
+\begin{description}
+\item[Site internet :] \url{https://www.gutenberg.eu.org/}
+\item[\Cahiers{} :] \url{http://cahiers.gutenberg.eu.org/}
+\item[Problèmes techniques :]
+ \leavevmode
+ \begin{description}
+ \item[la liste \texttt{gut} :]
+ \url{https://www.gutenberg.eu.org/-Listes-de-diffusion-}
+ \item[le site \TeX nique de questions et réponses :]
+ \url{https://texnique.fr/}
+ \item[la foire aux questions :]
+ \url{https://faq.gutenberg.eu.org}
+ \end{description}
+\end{description}
+%
+\alertbox{%
+ Cette association est la vôtre: faites-nous part de
+ vos idées, de vos envies, de vos préoccupations
+ à l'adresse \nolinkurl{secretariat@gutenberg.eu.org}.%
+}
+
+% \section[Association GUTenberg (tout sur l')]
+% {Adhésion à l'association}
+\title{Adhésion à l'association}
+\label{letgut_label_adhesions}
+
+\begin{itemize}
+\item % Adhésions et abonnements
+ Les adhésions sont à renouveler en début d'année
+ pour l'année civile.
+ % \item Il n'y a pas de lettre de rappel, chaque membre
+ % doit faire son renouvellement annuel; %\hspace*{1em}
+ % merci de renvoyer spontanément le bulletin ci-dessous
+ % en début d'année.
+\item Les administrations peuvent joindre un bon de commande
+ revêtu de la signature de la personne responsable ;
+ les étudiants doivent joindre un justificatif.
+ % \item Si vous souhaitez que vos coordonnées restent
+ % confidentielles, merci de le signaler.
+\end{itemize}
+
+\section{Tarifs \the\year}
+
+Les membres de \gut\ peuvent adhérer à l'association
+internationale, le \acf{tug}, et recevoir son bulletin
+\emph{\acs{tug}boat} à un tarif préférentiel :
+\begin{description}
+\item[tarif normal :] \EUR{65} (au lieu de 85~\$)
+\item[tarif étudiant :] \EUR{40} (au lieu de 55~\$)
+\end{description}
+% (\EUR{49,50}, étudiants et demandeurs d'emploi :
+% \EUR{29}, au lieu de 85\$ et % 65\$). Voir
+% \url{%
+% https://www.gutenberg.eu.org/?Adherer-a-l-association%
+% }.
+
+\footnotesize
+\begin{center}
+ \begin{tabular}{lr}
+ \toprule
+ \textbf{Type d'adhésion} & \textbf{Prix} \\
+ \midrule
+ Membre individuel & \EUR{30} \\
+ Membre individuel + adhésion \acs{tug} & \EUR{95} \\
+ Membre individuel étudiant/demandeur d'emploi & \EUR{15} \\
+ Membre individuel étudiant + adhésion \acs{tug} & \EUR{55} \\
+ Association d'étudiants & \EUR{65} \\
+ Organisme à but non lucratif & \EUR{130} \\
+ Organisme à but lucratif & \EUR{229} \\
+ \bottomrule
+ \end{tabular}
+\end{center}
+
+\section{Règlements}
+
+Les règlements peuvent s'effectuer par :
+\begin{itemize}
+\item \textbf{virement bancaire}%
+ \footnote{Nous vous remercions de \textbf{privilégier}
+ le \textbf{virement bancaire}.\label{fn:1}} (IBAN :
+ FR76 1870 7000 3003 0191 3568 475)%
+ \leavevmode
+
+ \alertbox{%
+ Veillez à bien \emph{indiquer vos nom et prénom}
+ dans les références du virement !%
+ }
+\item Paypal\footnotemark[\value{footnote}] :
+ \url{https://www.gutenberg.eu.org/?Adherer-en-ligne}
+\item bulletin et chèque\footnotemark[\value{footnote}] :
+ \url{https://www.gutenberg.eu.org/?Adherer-a-l-association}
+\end{itemize}
+
+\vfill
+
+\begin{center}
+ \begin{tblr}{
+ width=.75\linewidth,
+ colspec={
+ % < (Just not to disturb the parentheses
+ % balancing detection of my editor.)
+ >{\bfseries}r@{ }X
+ },
+ vline{1,3}={solid},
+ hline{1,7}={solid},
+ rowsep=0mm,
+ row{1} = {abovesep+=.25cm},
+ row{2} = {belowsep+=.125cm},
+ row{6} = {belowsep+=.25cm},
+ % colsep=2.5mm,
+ }
+ \SetCell[c=2]{c} \emph{La \lettregut}\\
+ \SetCell[c=2]{c} \mdseries Bulletin irrégulomestriel
+ de l'association \gut\\
+ Directeur de la publication :
+ & \person{Bideault, Patrick} \\
+ Comité de rédaction :
+ & {Patrick \bsc{Bideault}, Denis \bsc{Bitouzé}, \\
+ Céline \bsc{Chevalier} \& Maxime \bsc{Chupin}} \\
+ Adresse de la rédaction : &
+ {
+ Association \gut\\
+ 15 rue des Halles -- \textsc{bp} 74\\
+ 75001 Paris
+ }
+ \\
+ \acs{issn} : & 2742-6149 (version numérique)
+ \end{tblr}
+\end{center}
+\vfill
+\mbox{}
+\clearpage
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/macros/luatex/latex/letgut/tex/letgut-acronyms.tex b/macros/luatex/latex/letgut/tex/letgut-acronyms.tex
new file mode 100644
index 0000000000..eb9026f8bf
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/letgut-acronyms.tex
@@ -0,0 +1,198 @@
+%%%%%%%%%%%%%%%%%%%%%
+% Acronymes anglais %
+%%%%%%%%%%%%%%%%%%%%%
+\letgutacro
+{CTAN}
+{\href{https://www.ctan.org/}{Comprehensive \TeX{} Archive Network}}
+[réseau complet d'archives \TeX{}]
+
+\letgutacro
+{PDF}
+{Portable Document Format}
+[format de document portable]
+
+\letgutacro
+{URL}
+{Uniform Resource Locator}
+[localisateur uniforme de ressource]
+
+\letgutacro
+{ORCID}
+{Open Researcher and Contributor \textsc{id}}
+[identifiant ouvert pour chercheur et contributeur]
+
+\letgutacro[extra-foreign=souvent librement traduit en \enquote{foire aux questions}]
+{FAQ}
+{Frequently Asked Questions}
+[questions fréquemment posées]
+
+\letgutacro
+{SVG}
+{Scalable Vector Graphics}
+[graphiques vectoriels extensibles]
+
+\letgutacro
+{DNS}
+{Domain Name System}
+[système de noms de domaine]
+
+\letgutacro
+{VPS}
+{Virtual Private Server}
+[serveur dédié virtuel]
+
+\letgutacro
+{LDAP}
+{Lightweight Directory Access Protocol}
+[protocole d'accès à répertoire léger, sytème garantissant l'authentification
+d'utilisateurs de plusieurs services dispersés]
+
+\letgutacro
+{OTF}
+{Open Type Format}
+[]
+
+\letgutacro
+{DOI}
+{Digital Object Identifier}
+[identifiant numérique d'objet]
+
+\letgutacro
+{ISSN}
+{International Standard Serial Number}
+[numéro international normalisé des publications en série]
+
+\letgutacro
+{TUG}
+{\TeX{} User Group}
+[groupe (international) d'utilisateurs de \TeX{}]
+
+\letgutacro
+{TL}
+{\TeX{}~Live}
+[]
+
+\letgutacro
+{WCAG}
+{Web Content Accessibility Guidelines}
+[directives sur l'accessibilité du contenu Web]
+
+\letgutacro
+{HTML}
+{HyperText Markup Language}
+[langage de balises pour l'hypertexte]
+
+\letgutacro
+{CSS}
+{Cascading Style Sheets}
+[feuilles de style en cascade]
+
+\letgutacro
+{UTF}
+{Universal (Character Set) Transformation Format}
+[format de transformation (du jeu) universel (de caractères codés)]
+
+\letgutacro[short=\emph{Ti\emph{k}Z},short-format=\em,foreign-babel=german,foreign-locale=allemand]
+{TIKZ}
+{Ti\emph{k}Z ist \emph{kein} Zeichenprogramm}
+[Ti\emph{k}Z \emph{n'}est \emph{pas} un programme de dessin]
+
+\letgutacro
+{PGF}
+{Portable Graphics Format}
+[format de graphiques portables]
+
+\letgutacro
+{GPL}
+{\textsc{gnu} General Public License}
+[licence publique générale \textsc{gnu}]
+
+\letgutacro
+{OFL}
+{SIL Open Font License}
+[]
+
+\letgutacro
+{DVI}
+{DeVice-Independent}
+[indépendant du type de périphérique]
+
+\letgutacro
+{PS}
+{PostScript}
+[]
+
+\letgutacro
+{DVIPS}
+{\acs{dvi}-to-\acs{ps} (translator)}
+[(convertisseur) \acs{dvi} vers \acs{ps}]
+
+\letgutacro
+{IPA}
+{International Phonetic Alphabet}
+[alphabet phonétique international]
+
+\letgutacro
+{TIPA}
+{\TeX{} \acs{ipa} or Tokyo \acs{ipa}}
+[alphabet phonétique international]
+
+%%%%%%%%%%%%%%%%%%%%%%
+% Acronymes français %
+%%%%%%%%%%%%%%%%%%%%%%
+
+\letgutacro
+{SMAI}
+{\href{http://smai.emath.fr/}{Société de Mathématiques Appliquées et Industrielles}}
+
+\letgutacro
+{AG}
+{Assemblée Générale}
+
+\letgutacro
+{CA}
+{Conseil d'Administration}
+
+\letgutacro
+{SHS}
+{Sciences Humaines et Sociales}
+
+\letgutacro
+{IREM}
+{\href{https://www.univ-irem.fr/}{Instituts de Recherche sur l'Enseignement des Mathématiques}}
+
+\letgutacro
+{MEEF}
+{Métiers de l'Enseignement, de l'Éducation et de la Formation}
+
+\letgutacro
+{ECM}
+{\href{https://texnique.fr/osqa/faq/\#custom-id-ecm}{Exemple Complet Minimal}}
+
+\letgutacro
+{INSPÉ}
+{Instituts Nationaux Supérieurs du Professorat et de l'Éducation}
+
+\letgutacro[short=\textsc{gra}pp\textsc{a},short-format=\upshape]
+{GRAppA}
+{Groupe de recherche en Apprentissage Automatique}
+
+\letgutacro
+{BBB}
+{BigBlueButton}
+
+\letgutacro
+{CV}
+{Curriculum Vitæ}
+
+\letgutacro
+{RGPD}
+{Règlement Général sur la Protection des Données}
+
+\letgutacro
+{NDLR}
+{Notre de la Rédaction}
+
+%%% Local Variables:
+%%% mode: latex
+%%% End:
diff --git a/macros/luatex/latex/letgut/tex/letgut.cbx b/macros/luatex/latex/letgut/tex/letgut.cbx
new file mode 100644
index 0000000000..229c1f97c9
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/letgut.cbx
@@ -0,0 +1,16 @@
+\ProvidesFile{letgut.cbx}[2022-03-18 v0.9 letgut base citation style]
+\RequireCitationStyle{numeric}
+\DeclareFieldFormat[bookreview]{title}{\textbf{\emph{#1}}}
+\renewbibmacro*{title}{%
+ \ifboolexpr{
+ test {\iffieldundef{title}}
+ and
+ test {\iffieldundef{subtitle}}
+ }
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \setunit{\subtitlepunct}}%
+ \printfield[emph]{subtitle}%
+ \newunit}%
+ \printfield{titleaddon}}
diff --git a/macros/luatex/latex/letgut/tex/letgut.dbx b/macros/luatex/latex/letgut/tex/letgut.dbx
new file mode 100644
index 0000000000..980e08a909
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/letgut.dbx
@@ -0,0 +1,50 @@
+\ProvidesFile{letgut.dbx}[2022-03-18 v0.9 letgut data model macros]
+\DeclareBibliographyDriver{bookreview}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit{\printdelim{nametitledelim}}
+ \newblock
+ \usebibmacro{maintitle+title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \printfield{edition}%
+ \newunit
+ \iffieldundef{maintitle}
+ {\printfield{volume}%
+ \printfield{part}}
+ {}%
+ \newunit
+ \printfield{volumes}%
+ \newunit\newblock
+ \usebibmacro{series+number}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \finentrypunct
+ \usebibmacro{finentry}}
diff --git a/macros/luatex/latex/letgut/tex/letgut.lbx b/macros/luatex/latex/letgut/tex/letgut.lbx
new file mode 100644
index 0000000000..da57f1770c
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/letgut.lbx
@@ -0,0 +1,8 @@
+\ProvidesFile{letgut.lbx}[2022-03-18 v0.9 letgut localization]
+\InheritBibliographyExtras{french}
+\DeclareBibliographyStrings{
+ inherit = {french},
+ number = {{\no}{\no}},
+ volume = {{volume}{vol\adddot}},
+ volumes = {{volumes}{vol\adddot}},
+}
diff --git a/macros/luatex/latex/letgut/tex/logo-gut.pdf b/macros/luatex/latex/letgut/tex/logo-gut.pdf
new file mode 100644
index 0000000000..8483c6a56f
--- /dev/null
+++ b/macros/luatex/latex/letgut/tex/logo-gut.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/README.md b/macros/unicodetex/latex/beaulivre/README.md
index ef4890f201..c599286a26 100644
--- a/macros/unicodetex/latex/beaulivre/README.md
+++ b/macros/unicodetex/latex/beaulivre/README.md
@@ -1,7 +1,9 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# `beaulivre` : write you books in a colorful way
+**The current document class have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.**
+
`beaulivre` is a LaTeX class for typesetting books, which has a colorful
design.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
index e10f272aff..bba3284dd7 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 6cd7338b5a..04a0e75adf 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
@@ -1,4 +1,5 @@
-\documentclass[English,Chinese,French,JP,TC,allowbf]{beaulivre}
+\documentclass[English,Chinese,French,JP,TC,use boldface,simple name]{beaulivre}
+
%%================================
%% Import toolkit
@@ -37,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,19 +92,23 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\frontmatter
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\begin{tikzpicture}[overlay,remember picture]
- \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(25,-7)$);
- \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \fill [forestgreen!75!black] ($(current page.south west)$) rectangle ($(current page.north east)+(0,-7)$);
+ \fill [forestgreen!10!yellow!30] ($(current page.south west)$) rectangle ($(current page.north west)+(2.5,-7)$);
+ \fill [forestgreen!75!black] ($(current page.north west)$) rectangle ($(current page.north west)+(2.5,-7)$);
+ \fill [forestgreen!10!yellow!30] ($(current page.north east)$) rectangle ($(current page.north west)+(2.5,-7)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\hspace*{-.05em}以多彩的方式排版你的图书\\[10pt]\tiny 对应版本. \texttt{\beaulivre{} 2021/12/16}}};
- \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{许锦文}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年12月,巴黎}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{forestgreen!10!yellow!30}{\sffamily\beaulivre{}\\[5pt]\footnotesize\hspace*{-.05em}以多彩的方式排版你的图书\\[10pt]\tiny 对应版本. \texttt{\beaulivre{} \PackageVersion}}};
+ \node[text width=15em] at ($(current page.south)+(5,4)$) {\color{forestgreen!10!yellow!30}\hfill\fontsize{16pt}{0pt}\selectfont{许锦文}\\[1em]\hfill\fontsize{12pt}{0pt}\selectfont\TheDate{\PackageVersion}[only-year-month],巴黎};
\end{tikzpicture}%
\end{titlepage}%
-\cleardoublepage%
+
+\setcounter{page}{0}
\chapter{前言}
@@ -119,6 +124,10 @@
多语言支持、定理类环境、未完成标记等功能是由 \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
@@ -292,18 +301,14 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{puretext} 或 \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
-\clearpage
- \item \texttt{delaythms}
- \begin{itemize}
- \item 将定理类环境设定推迟到导言结尾。如果你希望定理类环境跟随自定义计数器编号,则应考虑这一选项。
- \end{itemize}
+% \clearpage
\item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器 (在启用 \texttt{delaythms} 选项的情况下)。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
+ \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
\item \texttt{regionalref}、\texttt{originalref}
\begin{itemize}
@@ -419,7 +424,7 @@ Référence du théorème: \cref{thm:abc}
\end{problem}
\medskip
-\clearpage
+% \clearpage
为了美观,相邻的定义环境会自动连在一起:
\begin{definition}
First definition.
@@ -429,71 +434,10 @@ Référence du théorème: \cref{thm:abc}
Second definition.
\end{definition}
-\LevelTwoTitle{定义新的定理型环境}
-
-若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-
-然后用下面五种方式之一定义这一环境:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义不编号的环境 \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},按顺序编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},与 \meta{numbered like} 计数器共用编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},在 \meta{numbered within} 计数器内编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item 将 \meta{name of environment} 与 \meta{existed environment} 或 \meta{existed environment}\lstinline|*| 等同。
- \item 这种方式通常在两种情况下比较有用:
- \begin{enumerate}
- \item 希望定义更简洁的名称。例如,使用 \lstinline|\CreateTheorem{thm}(theorem)|,便可以直接用名称 \texttt{thm} 来撰写定理。
- \item 希望去除某些环境的编号。例如,使用 \lstinline|\CreateTheorem{remark}(remark*)|,便可以去除 \texttt{remark} 环境的编号。
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- 其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
+ 请参阅 \textsf{create-theorem} 的说明文档以获知如何定义新的定理类环境。
\end{tip}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-
-\bigskip
-下面提供一个例子。这三行代码:
-
-\begin{code}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-\end{code}
-可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 section 内编号),它们支持在简体中文语境中使用,效果如下所示:
-
-\vspace{-.3\baselineskip}
-\begin{proofidea*}
- \lstinline|proofidea*| 环境。
-\end{proofidea*}
-\vspace{-.5\baselineskip}
-\begin{proofidea}
- \lstinline|proofidea| 环境。
-\end{proofidea}
-
\LevelTwoTitle{未完成标记}
你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
@@ -501,15 +445,10 @@ Référence du théorème: \cref{thm:abc}
\item \lstinline|\dnf| 或 \lstinline|\dnf<...>|。效果为:\dnf~或 \dnf<...>。\\其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\dnf}。
\end{itemize}
-类似的,还有 \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\bigskip
\LevelOneTitle{目前存在的问题}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item 对于字体的设置仍然不够完善。
\item 目录的设计还不够美观。
\item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \colorist{} (进而 \colorart{}、\lebhart{} 与 \colorbook{}、\beaulivre{}) 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
index 6b4dd2c071..fed476e1db 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 fa55565a37..32892aba4a 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
@@ -1,4 +1,5 @@
-\documentclass[English,Chinese,French,JP,TC,allowbf]{beaulivre}
+\documentclass[English,Chinese,French,JP,TC,use boldface,simple name]{beaulivre}
+
%%================================
%% Import toolkit
@@ -37,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,20 +92,23 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
\frontmatter
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\begin{tikzpicture}[overlay,remember picture]
- \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(25,-7)$);
- \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \fill [forestgreen!75!black] ($(current page.south west)$) rectangle ($(current page.north east)+(0,-7)$);
+ \fill [forestgreen!10!yellow!30] ($(current page.south west)$) rectangle ($(current page.north west)+(2.5,-7)$);
+ \fill [forestgreen!75!black] ($(current page.north west)$) rectangle ($(current page.north west)+(2.5,-7)$);
+ \fill [forestgreen!10!yellow!30] ($(current page.north east)$) rectangle ($(current page.north west)+(2.5,-7)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Write your books in \\a colorful way}\\[10pt]\tiny Corresponding to: \texttt{\beaulivre{} 2021/12/16}}};
- \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{\scshape Jinwen XU}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{December 2021, in Paris}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{forestgreen!10!yellow!30}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Write your books in \\a colorful way}\\[10pt]\tiny Corresponding to: \texttt{\beaulivre{} \PackageVersion}}};
+ \node[text width=15em] at ($(current page.south)+(5,4)$) {\color{forestgreen!10!yellow!30}\hfill\fontsize{16pt}{0pt}\selectfont{\scshape Jinwen XU}\\[1em]\hfill\fontsize{12pt}{0pt}\selectfont\TheDate{\PackageVersion}[only-year-month], in Paris};
\end{tikzpicture}%
\end{titlepage}%
-\cleardoublepage%
+
+\setcounter{page}{0}
\chapter{Preface}
@@ -120,6 +124,10 @@ This documentation is typeset using \beaulivre{} (with the option \texttt{allowb
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
@@ -134,7 +142,7 @@ In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
\item download and install the required fonts, see the section "On the default fonts".
- \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+ \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
@@ -294,17 +302,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -415,7 +419,7 @@ The following are the main styles of theorem-like environments:
\end{problem}
\medskip
-\clearpage
+% \clearpage
For aesthetics, adjacent definitions will be connected together automatically:
\begin{definition}
First definition.
@@ -425,76 +429,11 @@ For aesthetics, adjacent definitions will be connected together automatically:
Second definition.
\end{definition}
-\LevelTwoTitle{Define a new theorem-like environment}
-
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-
-For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-And then define this environment in one of following five ways:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
- \item This method is usually useful in the following two situations:
- \begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+ Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
\end{tip}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-
-\bigskip
-Here is an example. The following code:
-
-\begin{code}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-\end{code}
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within section) respectively. They can be used in English context.
-The effect is as follows:
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- The \lstinline|proofidea*| environment.
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- The \lstinline|proofidea| environment.
-\end{proofidea}
-
-\clearpage
+% \clearpage
\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -502,17 +441,11 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>
- The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\bigskip
\LevelOneTitle{Known issues}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item The font settings are still not perfect.
\item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
index 37699c2b05..a28199bffc 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 989f184e1e..320e0d72f4 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
@@ -1,4 +1,5 @@
-\documentclass[English,Chinese,French,JP,TC,allowbf]{beaulivre}
+\documentclass[English,Chinese,French,JP,TC,use boldface,simple name]{beaulivre}
+
%%================================
%% Import toolkit
@@ -37,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,19 +92,23 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\frontmatter
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\begin{tikzpicture}[overlay,remember picture]
- \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(25,-7)$);
- \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \fill [forestgreen!75!black] ($(current page.south west)$) rectangle ($(current page.north east)+(0,-7)$);
+ \fill [forestgreen!10!yellow!30] ($(current page.south west)$) rectangle ($(current page.north west)+(2.5,-7)$);
+ \fill [forestgreen!75!black] ($(current page.north west)$) rectangle ($(current page.north west)+(2.5,-7)$);
+ \fill [forestgreen!10!yellow!30] ($(current page.north east)$) rectangle ($(current page.north west)+(2.5,-7)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Écrivez vos livres \\de manière colorée}\\[10pt]\tiny Correspondant à : \texttt{\beaulivre{} 2021/12/16}}};
- \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{\scshape Jinwen XU}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{Décembre 2021, à Paris}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{forestgreen!10!yellow!30}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Écrivez vos livres \\de manière colorée}\\[10pt]\tiny Correspondant à : \texttt{\beaulivre{} \PackageVersion}}};
+ \node[text width=15em] at ($(current page.south)+(5,4)$) {\color{forestgreen!10!yellow!30}\hfill\fontsize{16pt}{0pt}\selectfont{\scshape Jinwen XU}\\[1em]\hfill\fontsize{12pt}{0pt}\selectfont\TheDate{\PackageVersion}[only-year-month], à Paris};
\end{tikzpicture}%
\end{titlepage}%
-\cleardoublepage%
+
+\setcounter{page}{0}
\chapter{Préface}
@@ -119,6 +124,10 @@ Cette documentation est composée à l'aide de \beaulivre{} (avec l'option \text
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
@@ -293,18 +302,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} ou \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
-\clearpage
- \item \texttt{delaythms}
- \begin{itemize}
- \item Reportez la définition des environnements de type théorème à la fin du préambule. Utilisez cette option si vous souhaitez que les environnements soient numérotés dans un compteur personnalisé.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{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}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule (avec l'option \texttt{delaythms} activée). Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -422,73 +426,10 @@ Pour l'esthétique, les définitions adjacentes seront reliées entre elles auto
Deuxième définition.
\end{definition}
-\LevelTwoTitle{Définir un nouvel environnement de type théorème}
-
-Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-Pour \meta{language name}, veuillez vous référer à la section sur la configuration de la langue. Lorsqu'il n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-Ensuite, créez cet environnement de l'une des cinq manières suivantes :
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} non numéroté
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans l'ordre 1, 2, 3, \dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté, qui partage le compteur \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans le compteur \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identifiez \meta{name of environment} avec \meta{existed environment} ou \meta{existed environment}\lstinline|*|.
- \item Cette méthode est généralement utile dans les deux situations suivantes :
- \begin{enumerate}
- \item Pour utiliser un nom plus concis. Par exemple, avec \lstinline|\CreateTheorem{thm}(theorem)|, on peut alors utiliser le nom \texttt{thm} pour écrire le théorème.
- \item Pour supprimer la numérotation de certains environnements. Par exemple, on peut supprimer la numérotation de l'environnement \texttt{remark} avec \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
+ Veuillez consulter la documentation du paquet \textsf{create-theorem} pour voir comment déclarer de nouveaux environnements de type théorème.
\end{tip}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-
-\bigskip
-Voici un exemple. Le code suivant :
-
-\begin{code}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-\end{code}
-définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant :
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- La environnement \lstinline|proofidea*| .
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- La environnement \lstinline|proofidea| .
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par example :
@@ -496,16 +437,11 @@ Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par exa
\item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
\end{itemize}
-De même, il y a aussi \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
-\end{itemize}
-
\bigskip
\LevelOneTitle{Problèmes connus}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item Les paramètres de police ne sont pas encore parfaits.
\item La conception de la table des matières est pas si belle.
\item Comme de nombreuses fonctionnalités sont basées sur la boîte à outils \ProjLib{}, \colorist{} (et donc \colorart{}, \lebhart{} et \colorbook{}, \beaulivre{}) hérite de tous ses problèmes. Pour plus de détails, veuillez vous référer à la section «~Problèmes connus~» de la documentation de \ProjLib{}.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index bc373dd57e..d90f081dca 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre.cls
+++ b/macros/unicodetex/latex/beaulivre/beaulivre.cls
@@ -2,7 +2,7 @@
%% This is file `beaulivre/beaulivre.cls',
%% generated with the docstrip utility.
-%% Copyright (C) 2021 by Jinwen XU
+%% Copyright (C) 2021-2022 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -16,551 +16,665 @@
%% 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\ProvidesClass{beaulivre}
- [2021/12/16 A colorful book style]
-\def\colorclass@baseclass{book}
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{
- family = @colorclass,
- prefix = @colorclass@,
-}
-\DeclareBoolOption[false]{draft}
-\DeclareBoolOption[false]{fast}
-\DeclareBoolOption[false]{useosf}
-\DeclareBoolOption[false]{lmodern}
-\DeclareBoolOption[false]{palatino}
-\DeclareBoolOption[false]{times}
-\DeclareBoolOption[false]{garamond}
-\DeclareBoolOption[false]{noto}
-\DeclareBoolOption[false]{biolinum}
-\DeclareBoolOption[false]{customfont}
-\DeclareStringOption{thmnum}[PJL@thmnum@default]
-
-\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
-\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
-\newif\if@colorclass@afourpaper\@colorclass@afourpaperfalse
-\DeclareVoidOption{a4paper}{\@colorclass@afourpapertrue}
-
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
-\ProcessKeyvalOptions*\relax
-\LoadClass{\colorclass@baseclass}
-
-\if@colorclass@draft
- \@colorclass@fasttrue
-\fi
-\if@colorclass@lmodern
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@palatino
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@times
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@garamond
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@noto
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@biolinum
- \@colorclass@customfonttrue
-\fi
+\RequirePackage{l3keys2e}
+\ProvidesExplClass
+ {beaulivre}
+ {2022/03/19} {}
+ {A colorful book style}
+
+\tl_const:Nn \l__colorclass_base_class_tl { book }
+
+
+\bool_new:N \l__colorclass_load_custom_font_file_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_bool
+
+\bool_new:N \l__colorclass_load_custom_font_file_latin_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_latin_bool
+
+\bool_new:N \l__colorclass_load_custom_font_file_cjk_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_cjk_bool
+
+\bool_new:N \l__colorclass_load_custom_font_file_math_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_math_bool
+
+\keys_define:nn { colorclass }
+ {
+ , draft .bool_set:N = \l__colorclass_fast_bool
+ , draft .initial:n = { false }
+ , fast .bool_set:N = \l__colorclass_fast_bool
+
+
+ , load custom font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { colorist.font.latin }
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { colorist.font.cjk }
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { colorist.font.math }
+ }
+ , load custom font file .default:n = { colorist.font }
+ , load~custom~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load~custom~font~file .default:n = { colorist.font }
+ , load-custom-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load-custom-font-file .default:n = { colorist.font }
+
+ , load custom latin font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { #1 }
+ }
+ , load custom latin font file .default:n = { colorist.font.latin }
+ , load~custom~latin~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { #1 }
+ }
+ , load~custom~latin~font~file .default:n = { colorist.font.latin }
+ , load-custom-latin-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { #1 }
+ }
+ , load-custom-latin-font-file .default:n = { colorist.font.latin }
+
+ , load custom cjk font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { #1 }
+ }
+ , load custom cjk font file .default:n = { colorist.font.cjk }
+ , load~custom~cjk~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { #1 }
+ }
+ , load~custom~cjk~font~file .default:n = { colorist.font.cjk }
+ , load-custom-cjk-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { #1 }
+ }
+ , load-custom-cjk-font-file .default:n = { colorist.font.cjk }
+
+ , load custom math font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { #1 }
+ }
+ , load custom math font file .default:n = { colorist.font.math }
+ , load~custom~math~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { #1 }
+ }
+ , load~custom~math~font~file .default:n = { colorist.font.math }
+ , load-custom-math-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { #1 }
+ }
+ , load-custom-math-font-file .default:n = { colorist.font.math }
+
+ , a4paper .bool_set:N = \l__colorclass_a_four_paper_bool
+ , a4paper .initial:n = { false }
+ , b5paper .bool_set:N = \l__colorclass_b_five_paper_bool
+ , b5paper .initial:n = { false }
+
+ , 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+ , 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+
+ , unknown .code:n = {
+ \PassOptionsToPackage { \CurrentOption } { colorist }
+ }
+ }
+\ProcessKeysOptions { colorclass }
+
+\LoadClass{\l__colorclass_base_class_tl}
%%================================
-%% Page layout
+%% Page layout
%%================================
-\RequirePackage{silence}
-\WarningFilter{geometry}{Over-specification in}
-\RequirePackage[heightrounded]{geometry}
-\geometry{
- papersize={8.5in,11in},
- % total={47em,66em},
- total={6.500in,9.130in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\if@colorclass@bfivepaper
-\geometry{
- b5paper,
- % total={40em,59em},
- total={5.535in,8.160in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-\if@colorclass@afourpaper
-\geometry{
- a4paper,
- % total={47em,70em},
- total={6.500in,9.685in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-
-\RequirePackage{indentfirst}
-
-\if@colorclass@fast
- \PassOptionsToPackage{fast}{colorist}
- \RequirePackage{draftwatermark}
- \DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
-\fi
-
-\RequirePackage{colorist}
+\RequirePackage { silence }
+\WarningFilter { geometry } { Over-specification }
+
+\PassOptionsToPackage { heightrounded } { geometry }
+\RequirePackage { geometry }
+
+\geometry
+ {
+ papersize = { 8.5in, 11in },
+ total = { 6.500in, 9.130in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+
+\bool_if:NT \l__colorclass_b_five_paper_bool
+ {
+ \geometry
+ {
+ b5paper,
+ total = { 5.535in, 8.160in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_a_four_paper_bool
+ {
+ \geometry
+ {
+ a4paper,
+ total = { 6.500in, 9.685in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_fast_bool
+ {
+ \PassOptionsToPackage { fast } { colorist }
+ \RequirePackage { draftwatermark }
+ \DraftwatermarkOptions { text = { \normalfont DRAFT }, color = paper!97!-paper }
+ }
+
+\RequirePackage { indentfirst }
+
+\RequirePackage { colorist }
+
+\hfuzz=2pt
+\vfuzz=2pt
%%================================
-%% Fonts
+%% Fonts
%%================================
-\if@colorclass@customfont\else
- \if@colorclass@fast
- \RequirePackage{mathpazo}
- \fi
-\fi
-
-\PassOptionsToPackage{no-math,quiet}{fontspec}
-\RequirePackage{fontspec}
-
-\IfFileExists{colorist-font.tex}{
- \input{colorist-font.tex}
-}{
-\IfFontExistsTF{Palatino Linotype}{%
- \setmainfont{Palatino Linotype}
- [\if@colorclass@useosf Numbers = OldStyle\fi]
-}{
- \setmainfont{TeXGyrePagellaX-Regular.otf}[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf,
- \if@colorclass@useosf Numbers = OldStyle\fi ]
-}
- \setsansfont{SourceSansPro-Regular.otf}[
- Scale = MatchLowercase ,
- BoldFont = SourceSansPro-Bold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-BoldIt.otf ]
- \setmonofont{NewCMMono10-Regular.otf}[
- Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ]
-}
-
-\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
-\RequirePackage{ctex}
-
-\IfFileExists{colorist-font.cjk.tex}{
- \input{colorist-font.cjk.tex}
-}{
-\IfFontExistsTF{SourceHanSerifSC-Regular}{%
- \setCJKmainfont{SourceHanSerifSC-Regular}[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ]
-}{
- \setCJKmainfont{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-
-\IfFontExistsTF{SourceHanSansSC-Regular}{%
- \setCJKsansfont{SourceHanSansSC-Regular}[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ]
-}{
- \setCJKsansfont{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-
-\IfFontExistsTF{SourceHanMonoSC-Regular}{%
- \setCJKmonofont{SourceHanMonoSC-Regular}[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ]
-}{
- \setCJKmonofont{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-
-\if@PJLlang@enable@CN
-\IfFontExistsTF{SourceHanSerifSC-Regular}{%
- \setCJKfamilyfont{SCmain}{SourceHanSerifSC-Regular}[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ]
-}{
- \setCJKfamilyfont{SCmain}{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\IfFontExistsTF{SourceHanSansSC-Regular}{%
- \setCJKfamilyfont{SCsans}{SourceHanSansSC-Regular}[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ]
-}{
- \setCJKfamilyfont{SCsans}{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-\IfFontExistsTF{SourceHanMonoSC-Regular}{%
- \setCJKfamilyfont{SCmono}{SourceHanMonoSC-Regular}[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ]
-}{
- \setCJKfamilyfont{SCmono}{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\fi
-
-\if@PJLlang@enable@TC
-\IfFontExistsTF{SourceHanSerifTC-Regular}{%
- \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ]
-}{
- \setCJKfamilyfont{TCmain}{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\IfFontExistsTF{SourceHanSansTC-Regular}{%
- \setCJKfamilyfont{TCsans}{SourceHanSansTC-Regular}[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ]
-}{
- \setCJKfamilyfont{TCsans}{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-\IfFontExistsTF{SourceHanMonoTC-Regular}{%
- \setCJKfamilyfont{TCmono}{SourceHanMonoTC-Regular}[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ]
-}{
- \setCJKfamilyfont{TCmono}{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\fi
-
-\if@PJLlang@enable@JP
-\IfFontExistsTF{SourceHanSerif-Regular}{%
- \setCJKfamilyfont{JPmain}{SourceHanSerif-Regular}[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ]
-}{
- \setCJKfamilyfont{JPmain}{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\IfFontExistsTF{SourceHanSans-Regular}{%
- \setCJKfamilyfont{JPsans}{SourceHanSans-Regular}[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ]
-}{
- \setCJKfamilyfont{JPsans}{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-\IfFontExistsTF{SourceHanMono-Regular}{%
- \setCJKfamilyfont{JPmono}{SourceHanMono-Regular}[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ]
-}{
- \setCJKfamilyfont{JPmono}{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\fi
-
-\WarningFilter{latexfont}{Font shape}
-\WarningFilter{latexfont}{Some font}
-
-\def\CJKsffamily{}
-\def\CJKttfamily{}
-
-\apptocmd{\sffamily}{\CJKsffamily}{}{\FAIL}
-\apptocmd{\ttfamily}{\CJKttfamily}{}{\FAIL}
-
-\if@PJLlang@enable@CN
-\gappto{\PJLlang@langconfig@CN}{%
- \def\CJKsffamily{\CJKfamily{SCsans}}%
- \def\CJKttfamily{\CJKfamily{SCmono}}%
- \CJKfamily{SCmain}%
-}
-\fi
-
-\if@PJLlang@enable@TC
-\gappto{\PJLlang@langconfig@TC}{%
- \def\CJKsffamily{\CJKfamily{TCsans}}%
- \def\CJKttfamily{\CJKfamily{TCmono}}%
- \CJKfamily{TCmain}%
-}
-\fi
-
-\if@PJLlang@enable@JP
-\gappto{\PJLlang@langconfig@JP}{%
- \def\CJKsffamily{\CJKfamily{JPsans}}%
- \def\CJKttfamily{\CJKfamily{JPmono}}%
- \CJKfamily{JPmain}%
-}
-\fi
-}
-
-\if@colorclass@customfont\else
-\if@colorclass@fast
-\RequirePackage{amssymb}
-\else
-\PassOptionsToPackage
- {warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math}
-\RequirePackage{unicode-math}
-\unimathsetup{math-style=ISO, partial=upright, nabla=upright}
-\setmathfont{Asana-Math.otf}
-\IfFontExistsTF{Neo Euler}{%
-\setmathfont[range={up/{Latin,latin,Greek,greek},
- bfup/{Latin,latin,Greek,greek},
- cal, bfcal, frak, bffrak,
- `(,`),`[,`],`\{,`\},`:,`=,\ne,\equiv,`/,\backslash,
- \in,\notin,\ni,\subset,\supset,\subseteq,\supseteq,
- \rightarrow,\leftarrow,\mapsto,\hookrightarrow,\hookleftarrow,
- \sum,\prod,\coprod,
- \sqrt,\int,\iint,\iiint,\oint},
- script-features={},
- sscript-features={},
- Scale = 1.05,
- ]{Neo Euler}
-}{}
-\setmathfont[range={\leq,\geq,\ll,\gg,\lll,\ggg,\leqslant,\geqslant},
- Scale = 0.95,
- ]{latinmodern-math.otf}
-\setmathfont[range={up/num, bfup/num}
- ]{texgyrepagella-math.otf}
-
-\AtBeginDocument{
-\let\mid@original\mid
-\renewcommand{\mid}{\hspace{-.2em}\mid@original\hspace{-.2em}}
-\let\nmid@original\nmid
-\renewcommand{\nmid}{\hspace{-.2em}\nmid@original\hspace{-.2em}}
-\renewcommand{\frac}[2]{\genfrac{}{}{}{}{
- \mathchoice
- {\raisebox{-.15em}{$\displaystyle #1$}}
- {\raisebox{-.15em}{$\textstyle #1$}}
- {\raisebox{-.08em}{$\scriptstyle #1$}}
- {\scriptscriptstyle #1}
-}{
- \mathchoice
- {\raisebox{.08em}{$\displaystyle #2$}}
- {\raisebox{.08em}{$\textstyle #2$}}
- {\raisebox{.05em}{$\scriptstyle #2$}}
- {\scriptscriptstyle #2}
-}}
-}
-
-\RequirePackage{tikz-cd}
-\newbox\xratbelow
-\newbox\xratabove
-\renewcommand{\xrightarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [->, baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) -- node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xleftarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [<-, baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) -- node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xleftrightarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [<->, baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) -- node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xhookrightarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/hookrightarrow] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xhookleftarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/hookleftarrow] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xmapsto}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/mapsto] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\newcommand{\xlongequal}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/equal] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-
-\AtBeginDocument{
-\renewcommand{\twoheadrightarrow}{%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/twoheadrightarrow] (.8em,0) ;}}
-
-\renewcommand{\twoheadleftarrow}{%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/twoheadleftarrow] (.8em,0) ;}}
-}
-\fi
-\fi
-
-\if@colorclass@lmodern
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \RequirePackage{cfr-lm}
- \else
- \RequirePackage{lmodern}
- \fi
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@palatino
- \RequirePackage{amssymb}
- \RequirePackage{mathpazo}
- \PassOptionsToPackage{defaultsups}{newpxtext}
- \RequirePackage{newpxtext}
- % \RequirePackage{newpxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.07}}
- \if@colorclass@useosf\useosf\fi
-\fi
-
-\if@colorclass@times
- \RequirePackage{amssymb}
- \PassOptionsToPackage{defaultsups}{newtxtext}
- \RequirePackage{newtxtext}
- \RequirePackage{newtxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.00}}
- \if@colorclass@useosf\useosf\fi
- \let\colorist@sffamily\relax
-\fi
-
-\if@colorclass@garamond
- \RequirePackage{amssymb}
- \if@colorclass@useosf\else
- \PassOptionsToPackage{lining}{ebgaramond}
- \fi
- \RequirePackage{ebgaramond-maths}
- \RequirePackage{ebgaramond}
- % \RequirePackage{garamondlibre}
- \PJLsetlinespacing{\setstretch{1.00}}
- \let\colorist@sffamily\relax
-\fi
-
-\if@colorclass@noto
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \PassOptionsToPackage{oldstyle}{notomath}
- \fi
- \RequirePackage{anyfontsize}
- \RequirePackage{notomath}
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@biolinum
- \RequirePackage{amssymb}
- % \RequirePackage{mathpazo}
- % \RequirePackage[sansmath]{libertinust1math}
- \ifPDFTeX
- \if@colorclass@useosf
- \PassOptionsToPackage{osf}{biolinum}
- \fi
- \RequirePackage{biolinum}
- \renewcommand*\familydefault{\biolinum@family}
- \else
- \PassOptionsToPackage{no-math}{fontspec}
- \RequirePackage{fontspec}
- \setmainfont{LinBiolinum_R.otf}[
- BoldFont = LinBiolinum_RB.otf ,
- ItalicFont = LinBiolinum_RI.otf ,
- BoldItalicFont = LinBiolinum_RBO.otf,
- \if@colorclass@useosf Numbers = OldStyle\fi ]
- \fi
- \PJLsetlinespacing{\setstretch{1.05}}
- \RequirePackage[italic,defaultmathsizes]{mathastext}
-\fi
-
-\def\PJL@font@alreadyset{}
-
-\PassOptionsToPackage{verbose=silent}{microtype}
-\RequirePackage{microtype}
-\PassOptionsToPackage{all}{nowidow}
-\RequirePackage{nowidow}
-\RequirePackage{embrac}
+\WarningFilter { latexfont } { Font~shape }
+\WarningFilter { latexfont } { Some~font }
+
+\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
+ {
+ \bool_if:NT #1
+ {
+ \exp_args:Nx \file_if_exist:nT { #2 }
+ {
+ \exp_args:Nx \file_input:n { #2 }
+ \use_none:nn
+ }
+ }
+ \use:n { #3 }
+ }
+
+\cs_new_protected:Nn \__colorclass_if_font_exist:nnn
+ {
+ \bool_if:NTF \l__colorclass_fast_bool
+ { #3 }
+ { \fontspec_font_if_exist:nTF { #1 } { #2 } { #3 } }
+ }
+
+\__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_bool { \l__colorclass_custom_font_file_str }
+ {
+ \RequirePackage { projlib-font }
+
+ \bool_if:NF \g_projlib_font_already_set_bool
+ {
+ \bool_if:NT \l__colorclass_fast_bool
+ {
+ \RequirePackage { mathpazo }
+ }
+
+ \PassOptionsToPackage { no-math,quiet } { fontspec }
+ \RequirePackage { fontspec }
+
+ \__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_latin_bool { \l__colorclass_custom_font_file_latin_str }
+ {
+ \__colorclass_if_font_exist:nnn { Palatino~Linotype }
+ {
+ \bool_if:NTF \l__projlib_font_useosf_bool
+ {
+ \setmainfont { Palatino~Linotype } [ Numbers = OldStyle ]
+ }
+ {
+ \setmainfont { Palatino~Linotype }
+ }
+ }
+ {
+ \bool_if:NTF \l__projlib_font_useosf_bool
+ {
+ \setmainfont { TeXGyrePagellaX-Regular.otf }
+ [
+ BoldFont = TeXGyrePagellaX-Bold.otf ,
+ ItalicFont = TeXGyrePagellaX-Italic.otf ,
+ BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Numbers = OldStyle ,
+ ]
+ }
+ {
+ \setmainfont { TeXGyrePagellaX-Regular.otf }
+ [
+ BoldFont = TeXGyrePagellaX-Bold.otf ,
+ ItalicFont = TeXGyrePagellaX-Italic.otf ,
+ BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ ]
+ }
+ }
+ \setsansfont { SourceSansPro-Regular.otf }
+ [
+ Scale = MatchLowercase ,
+ BoldFont = SourceSansPro-Bold.otf ,
+ ItalicFont = SourceSansPro-RegularIt.otf ,
+ BoldItalicFont = SourceSansPro-BoldIt.otf ,
+ ]
+ \setmonofont { NewCMMono10-Regular.otf }
+ [
+ Scale = 1.05 ,
+ BoldFont = NewCMMono10-Bold.otf ,
+ ItalicFont = NewCMMono10-Italic.otf ,
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ ]
+
+ \projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+ }
+ }
+
+ \PassOptionsToPackage { fontset = none, scheme = plain } { ctex }
+ \RequirePackage { ctex }
+
+ \__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_cjk_bool { \l__colorclass_custom_font_file_cjk_str }
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
+ {
+ \setCJKmainfont { SourceHanSerifSC-Regular }
+ [
+ BoldFont = SourceHanSerifSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifSC-Bold ,
+ ]
+ }
+ {
+ \setCJKmainfont { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+
+ \__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
+ {
+ \setCJKsansfont{SourceHanSansSC-Regular}
+ [
+ BoldFont = SourceHanSansSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansSC-Bold ,
+ ]
+ }
+ {
+ \setCJKsansfont { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+
+ \__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
+ {
+ \setCJKmonofont { SourceHanMonoSC-Regular }
+ [
+ BoldFont = SourceHanMonoSC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoSC-Medium ,
+ ]
+ }
+ {
+ \setCJKmonofont { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+
+ \bool_if:NT \g__projlib_language_enabled_schinese_bool
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
+ {
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ [
+ BoldFont = SourceHanSerifSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifSC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
+ {
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ [
+ BoldFont = SourceHanSansSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansSC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
+ {
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ [
+ BoldFont = SourceHanMonoSC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoSC-Medium ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { SCmono } { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ }
+
+ \bool_if:NT \g__projlib_language_enabled_tchinese_bool
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
+ {
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ [
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanSansTC-Regular }
+ {
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ [
+ BoldFont = SourceHanSansTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansTC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
+ {
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ [
+ BoldFont = SourceHanMonoTC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoTC-Medium ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { TCmono } { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ }
+
+ \bool_if:NT \g__projlib_language_enabled_japanese_bool
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerif-Regular }
+ {
+ \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ [
+ BoldFont = SourceHanSerif-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerif-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanSans-Regular }
+ {
+ \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ [
+ BoldFont = SourceHanSans-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSans-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanMono-Regular }
+ {
+ \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ [
+ BoldFont = SourceHanMono-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMono-Medium ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { JPmono } { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ }
+
+ \cs_new:Nn \colorclass_cjk_sffamily: {}
+ \cs_new:Nn \colorclass_cjk_ttfamily: {}
+
+ \hook_gput_code:nnn { cmd/sffamily/after } { colorclass } { \colorclass_cjk_sffamily: }
+ \hook_gput_code:nnn { cmd/ttfamily/after } { colorclass } { \colorclass_cjk_ttfamily: }
+
+ \AddLanguageSetting [schinese]
+ {
+ \cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { SCsans } }
+ \cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { SCmono } }
+ \CJKfamily { SCmain }
+ }
+ \AddLanguageSetting [tchinese]
+ {
+ \cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { TCsans } }
+ \cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { TCmono } }
+ \CJKfamily { TCmain }
+ }
+ \AddLanguageSetting [japanese]
+ {
+ \cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { JPsans } }
+ \cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { JPmono } }
+ \CJKfamily { JPmain }
+ }
+ }
+
+ \__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_math_bool { \l__colorclass_custom_font_file_math_str }
+ {
+ \bool_if:NF \g_projlib_font_already_set_bool
+ {
+ \bool_if:NTF \l__colorclass_fast_bool
+ {
+ \RequirePackage { amssymb }
+ }
+ {
+ \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math }
+ \RequirePackage { unicode-math }
+ \unimathsetup { math-style = ISO, partial = upright, nabla = upright }
+ \setmathfont { Asana-Math.otf }
+ \__colorclass_if_font_exist:nnn { Neo~Euler }
+ {
+ \setmathfont { Neo~Euler }
+ [
+ range = { up / { Latin, latin, Greek, greek },
+ bfup / { Latin, latin, Greek, greek },
+ cal, bfcal, frak, bffrak,
+ `(, `), `[, `], `\{, `\}, `:, `=, \ne, \equiv, `/, \backslash,
+ \in, \notin, \ni, \subset, \supset, \subseteq, \supseteq,
+ \rightarrow, \leftarrow, \leftrightarrow,
+ \longleftarrow, \longrightarrow, \longleftrightarrow,
+ \Leftarrow, \Rightarrow, \Leftrightarrow,
+ \Longleftarrow, \Longrightarrow, \Longleftrightarrow,
+ \nrightarrow, \nleftarrow, \nleftrightarrow,
+ \nLeftarrow, \nRightarrow, \nLeftrightarrow,
+ \mapsto, \hookrightarrow, \hookleftarrow,
+ \leftharpoonup, \rightharpoonup, \leftharpoondown, \rightharpoondown,
+ \rightleftharpoons, \leftrightharpoons,
+ \sum, \prod, \coprod,
+ \sqrt, \int, \iint, \iiint, \oint
+ },
+ script-features = {},
+ sscript-features = {},
+ Scale = 1.05,
+ ]
+ }{}
+ \setmathfont { latinmodern-math.otf }
+ [
+ range = { \leq, \geq, \ll, \gg, \lll, \ggg, \leqslant, \geqslant },
+ Scale = 0.95,
+ ]
+ \setmathfont { texgyrepagella-math.otf }
+ [
+ range = { up / num, bfup / num }
+ ]
+
+ \hook_gput_code:nnn { begindocument } { colorclass }
+ {
+ \NewCommandCopy \colorclass_backup_mid: \mid
+ \RenewDocumentCommand \mid {}
+ { \skip_horizontal:n {-.15em} \colorclass_backup_mid: \skip_horizontal:n {-.15em} }
+ \NewCommandCopy \colorclass_backup_nmid: \nmid
+ \RenewDocumentCommand \nmid {}
+ { \skip_horizontal:n {-.15em} \colorclass_backup_nmid: \skip_horizontal:n {-.15em} }
+ }
+
+ \RequirePackage { tikz-cd }
+
+ \box_new:N \l__colorclass_xarrows_above_box
+ \box_new:N \l__colorclass_xarrows_below_box
+ \dim_new:N \l__colorclass_xarrows_length_dim
+ \cs_new_protected:Nn \colorclass_xarrows_generic:nnnn
+ % #3 = option of \tikz
+ % #4 = edge of \draw
+ {
+ \hbox_set:Nn \l__colorclass_xarrows_below_box { \ensuremath { \scriptstyle #1 } }
+ \hbox_set:Nn \l__colorclass_xarrows_above_box { \ensuremath { \scriptstyle #2 } }
+ \dim_set:Nn \l__colorclass_xarrows_length_dim
+ { \dim_eval:n { \dim_max:nn { \box_wd:N \l__colorclass_xarrows_below_box } { \box_wd:N \l__colorclass_xarrows_above_box } + .8em } }
+ \mathrel
+ {
+ \tikz [ #3, baseline = -.55ex, every~node/.style = { inner~sep = 0pt } ]
+ \draw (0,0) #4
+ node [ below = 3pt ] { \box_use:N \l__colorclass_xarrows_below_box }
+ node [ above = 2pt ] { \box_use:N \l__colorclass_xarrows_above_box }
+ ( \l__colorclass_xarrows_length_dim ,0) ;
+ }
+ }
+
+ \RenewDocumentCommand \xrightarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } { -> } { -- }
+ }
+ \RenewDocumentCommand \xleftarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } { <- } { -- }
+ }
+ \RenewDocumentCommand \xleftrightarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } { <-> } { -- }
+ }
+ \RenewDocumentCommand \xhookrightarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/hookrightarrow ] }
+ }
+ \RenewDocumentCommand \xhookleftarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/hookleftarrow ] }
+ }
+ \RenewDocumentCommand \xmapsto { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/mapsto ] }
+ }
+ \NewDocumentCommand \xlongequal { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/equal ] }
+ }
+ \hook_gput_code:nnn { begindocument/end } { colorclass }
+ {
+ \RenewDocumentCommand \twoheadrightarrow {}
+ {
+ \colorclass_xarrows_generic:nnnn { \,\, } {} {} { edge [ commutative~diagrams/twoheadrightarrow ] }
+ }
+ \RenewDocumentCommand \twoheadleftarrow {}
+ {
+ \colorclass_xarrows_generic:nnnn { \,\, } {} {} { edge [ commutative~diagrams/twoheadleftarrow ] }
+ }
+ }
+ }
+ }
+ }
+ }
+
+\PassOptionsToPackage { all } { nowidow }
+\RequirePackage { nowidow }
+\RequirePackage { embrac }
%%================================
-%% Graphics
+%% Graphics
%%================================
-\RequirePackage{graphicx}
-\graphicspath{{images/}}
-\RequirePackage{wrapfig}
-\RequirePackage{float}
-\RequirePackage{caption}
-\captionsetup{font=small}
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
\endinput
%%
diff --git a/macros/unicodetex/latex/einfart/README.md b/macros/unicodetex/latex/einfart/README.md
index 591c2285c8..51bf0b5605 100644
--- a/macros/unicodetex/latex/einfart/README.md
+++ b/macros/unicodetex/latex/einfart/README.md
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# `einfart` : write you articles in a simple and clear way
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf b/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf
index 726b21ad8f..bbd317afb0 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 9126ab2048..d84fda88a6 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{einfart}
+\documentclass[classical, simple name]{einfart}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,11 +96,13 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\title{\einfart{},以极简主义风格排版你的文章}
\author{许锦文}
-\thanks{对应版本. \texttt{\einfart{} 2021/12/16}}
+\thanks{对应版本. \texttt{\einfart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{2021年12月,巴黎}
+\date{\TheDate{\PackageVersion}[only-year-month],巴黎}
\maketitle
@@ -113,6 +115,10 @@
\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}
@@ -153,7 +159,7 @@
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -177,7 +183,6 @@ Référence du théorème: \cref{thm:abc}
如果你觉得这个例子有些复杂,不要担心。现在我们来一点点地观察这个例子。
-\clearpage
\LevelThreeTitle{初始化部分}
\medskip
@@ -205,7 +210,7 @@ Référence du théorème: \cref{thm:abc}
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -238,7 +243,7 @@ Référence du théorème: \cref{thm:abc}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -334,7 +339,7 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
-\clearpage
+% \clearpage
\item \texttt{classical}
\begin{itemize}
\item 经典模式。使用这一选项时,将会启用较为古色古香的风格,如同当前的这篇说明文档一样。
@@ -347,17 +352,13 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{puretext} 或 \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item 将定理类环境设定推迟到导言结尾。如果你希望定理类环境跟随自定义计数器编号,则应考虑这一选项。
- \end{itemize}
\item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器 (在启用 \texttt{delaythms} 选项的情况下)。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
+ \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
\item \texttt{regionalref}、\texttt{originalref}
\begin{itemize}
@@ -444,72 +445,10 @@ Référence du théorème: \cref{thm:abc}
\UseLanguage{Chinese}
-\LevelTwoTitle{定义新的定理型环境}
-
-若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-
-然后用下面五种方式之一定义这一环境:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义不编号的环境 \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},按顺序编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},与 \meta{numbered like} 计数器共用编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},在 \meta{numbered within} 计数器内编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item 将 \meta{name of environment} 与 \meta{existed environment} 或 \meta{existed environment}\lstinline|*| 等同。
- \item 这种方式通常在两种情况下比较有用:
- \begin{enumerate}
- \item 希望定义更简洁的名称。例如,使用 \lstinline|\CreateTheorem{thm}(theorem)|,便可以直接用名称 \texttt{thm} 来撰写定理。
- \item 希望去除某些环境的编号。例如,使用 \lstinline|\CreateTheorem{remark}(remark*)|,便可以去除 \texttt{remark} 环境的编号。
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- 其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
+ 请参阅 \textsf{create-theorem} 的说明文档以获知如何定义新的定理类环境。
\end{tip}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\clearpage
-下面提供一个例子。这三行代码:
-
-\begin{code}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-
-可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示:
-
-\vspace{-.3\baselineskip}
-\begin{proofidea*}
- \lstinline|proofidea*| 环境。
-\end{proofidea*}
-\vspace{-.5\baselineskip}
-\begin{proofidea}
- \lstinline|proofidea| 环境。
-\end{proofidea}
-
\LevelTwoTitle{未完成标记}
你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
@@ -517,11 +456,6 @@ Référence du théorème: \cref{thm:abc}
\item \lstinline|\dnf| 或 \lstinline|\dnf<...>|。效果为:\dnf~或 \dnf<...>。\\其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\dnf}。
\end{itemize}
-类似的,还有 \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{文章标题、摘要与关键词}
\einfart{} 同时具有标准文档类与\AmS{} 文档类的一些特性。
@@ -588,7 +522,7 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{关于QED符号}
由于定理类环境中的字体和正文字体是一样的,为了方便看出定理类环境在哪里结束,在其结尾处放置了一个空心的QED符号。然而,如果你的定理是由公式或者列表结尾的,这个符号就无法自动地放在正确的位置。这时,你需要手动在公式或列表最后一个条目的后面加上 \lstinline|\qedhere|,以让QED符号显示到这一行的最后。
-\clearpage
+% \clearpage
\LevelOneTitle{目前存在的问题}
\begin{itemize}[itemsep=.6em]
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-en.pdf b/macros/unicodetex/latex/einfart/einfart-doc-en.pdf
index 71f3fef857..730b210a87 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 7b093e064d..357dba6cf1 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-en.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-en.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{einfart}
+\documentclass[classical, simple name]{einfart}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,11 +96,13 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\title{\einfart{}, write your articles in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\einfart{} 2021/12/16}}
+\thanks{Corresponding to: \texttt{\einfart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{December 2021, in Paris}
+\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
@@ -113,6 +115,10 @@
\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
@@ -124,7 +130,7 @@ In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{minimalist} and \texttt{projlib} are correctly installed in your \TeX{} system.
\item download and install the required fonts, see the section "On the default fonts".
- \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+ \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
@@ -153,7 +159,7 @@ Let's first look at a complete document.
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -177,7 +183,6 @@ Référence du théorème: \cref{thm:abc}
If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
-\clearpage
\LevelThreeTitle{Initialization}
\medskip
@@ -206,7 +211,7 @@ For detailed description of this command and more related commands, please refer
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -239,7 +244,7 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -335,7 +340,7 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\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}
-\clearpage
+% \clearpage
\item \texttt{classical}
\begin{itemize}
\item Classic mode. An antique-looking style will be used when this option is enabled, like in the current documentation.
@@ -348,17 +353,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -441,75 +442,10 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\LevelTwoTitle{Define a new theorem-like environment}
-
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-And then define this environment in one of following five ways:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
- \item This method is usually useful in the following two situations:
- \begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+ Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
\end{tip}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-Here is an example. The following code:
-
-\begin{code}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context.
-The effect is as follows:
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- The \lstinline|proofidea*| environment.
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- The \lstinline|proofidea| environment.
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -517,11 +453,6 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Title, abstract and keywords}
\einfart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -585,10 +516,8 @@ In \lstinline|\section| or \lstinline|\subsection| , if you wish to add footnote
\end{itemize}
This is a disadvantage brought about by the underline decoration of the title.
-\LevelThreeTitle{On the QED symbols}
-Since the font in the theorem-like environments is the same as that of the main text, in order to indicate where the environments end, a hollow QED symbol \simpleqedsymbol{} is placed at the end of the theorem-like environments. However, if your theorem ends with an equation or list (itemize, enumerate, description, etc.), this symbol cannot be automatically placed in the correct position. In this case, you need to manually add a \lstinline|\qedhere| at the end of your equation or the last entry of your list to make the QED symbol appear at the end of the line.
-\clearpage
+% \clearpage
\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf b/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf
index 824a41a673..2e8d62530d 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 d773e5ddda..33fa9c30c1 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{einfart}
+\documentclass[classical, simple name]{einfart}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,11 +96,13 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\title{\einfart{}, écrivez vos articles de manière simple et claire}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\einfart{} 2021/12/16}}
+\thanks{Correspondant à : \texttt{\einfart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{Décembre 2021, à Paris}
+\date{\TheDate{\PackageVersion}[only-year-month], à Paris}
\maketitle
@@ -113,6 +115,10 @@
\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
@@ -154,7 +160,7 @@ Regardons d'abord un document complet.
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -178,7 +184,6 @@ Référence du théorème: \cref{thm:abc}
Si vous trouvez cela un peu compliqué, ne vous inquiétez pas. Examinons maintenant cet exemple pièce par pièce.
-\clearpage
\LevelThreeTitle{Initialisation}
\medskip
@@ -206,7 +211,7 @@ Pour une description détaillée de cette commande et d'autres commandes associ
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -239,7 +244,7 @@ De plus, vous pouvez également écrire à la manière \AmS{}, c'est-à-dire :
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -346,17 +351,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} ou \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Reportez la définition des environnements de type théorème à la fin du préambule. Utilisez cette option si vous souhaitez que les environnements soient numérotés dans un compteur personnalisé.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{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}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule (avec l'option \texttt{delaythms} activée). Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -365,7 +366,7 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\end{itemize}
\end{itemize}
-\clearpage
+% \clearpage
\LevelOneTitle{Instructions par sujet}
\LevelTwoTitle{Configurer la langue}
@@ -438,75 +439,10 @@ Par défaut, lors du référencement, le nom du théorème correspond au context
\UseLanguage{French}
-\LevelTwoTitle{Définir un nouvel environnement de type théorème}
-
-Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-Pour \meta{language name}, veuillez vous référer à la section sur la configuration de la langue. Lorsqu'il n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-Ensuite, créez cet environnement de l'une des cinq manières suivantes :
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} non numéroté
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans l'ordre 1, 2, 3, \dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté, qui partage le compteur \meta{numbered like}
- \end{itemize}
-\clearpage
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans le compteur \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identifiez \meta{name of environment} avec \meta{existed environment} ou \meta{existed environment}\lstinline|*|.
- \item Cette méthode est généralement utile dans les deux situations suivantes :
- \begin{enumerate}
- \item Pour utiliser un nom plus concis. Par exemple, avec \lstinline|\CreateTheorem{thm}(theorem)|, on peut alors utiliser le nom \texttt{thm} pour écrire le théorème.
- \item Pour supprimer la numérotation de certains environnements. Par exemple, on peut supprimer la numérotation de l'environnement \texttt{remark} avec \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
+ Veuillez consulter la documentation du paquet \textsf{create-theorem} pour voir comment déclarer de nouveaux environnements de type théorème.
\end{tip}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-Voici un exemple. Le code suivant :
-
-\begin{code}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-
-définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la sous-section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant :
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- La environnement \lstinline|proofidea*| .
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- La environnement \lstinline|proofidea| .
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par example :
@@ -514,11 +450,6 @@ Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par exa
\item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
\end{itemize}
-De même, il y a aussi \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Titre, résumé et mots-clés}
\einfart{} possède à la fois les caractéristiques des classes standard et celles des classes \AmS{}.
@@ -569,7 +500,7 @@ Les informations sur l'auteur peuvent contenir plusieurs groupes, écrits comme
Parmi eux, l'ordre mutuel de \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| n'est pas important.
-\clearpage
+% \clearpage
\LevelTwoTitle{Divers}
\LevelThreeTitle{Les numéros de ligne}
@@ -583,8 +514,6 @@ Dans \lstinline|\section| ou \lstinline|\subsection| , si vous souhaitez ajouter
\end{itemize}
C'est un inconvénient provoqué par la décoration de soulignement du titre.
-\LevelThreeTitle{Les symboles QED}
-Puisque la police dans les environnements de type théorème est la même que celle du texte principal, afin d'indiquer où se terminent les environnements, un symbole QED creux \simpleqedsymbol{} est placé à la fin des environnements de type théorème. Cependant, si votre théorème se termine par une équation ou une liste (itemize, énumérer, description, etc.), ce symbole ne peut pas être automatiquement placé à la bonne position. Dans ce cas, vous devez ajouter manuellement un \lstinline|\qedhere| à la fin de votre équation ou la dernière entrée de votre liste pour faire apparaître le symbole QED en fin de ligne.
\LevelOneTitle{Problèmes connus}
diff --git a/macros/unicodetex/latex/einfart/einfart.cls b/macros/unicodetex/latex/einfart/einfart.cls
index 38fe5550d1..1700e3a245 100644
--- a/macros/unicodetex/latex/einfart/einfart.cls
+++ b/macros/unicodetex/latex/einfart/einfart.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{einfart}
- {2022/03/17} {}
+ {2022/03/19} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
diff --git a/macros/unicodetex/latex/lebhart/README.md b/macros/unicodetex/latex/lebhart/README.md
index 58a630c090..cc5fc82049 100644
--- a/macros/unicodetex/latex/lebhart/README.md
+++ b/macros/unicodetex/latex/lebhart/README.md
@@ -1,7 +1,9 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# `lebhart` : write you articles in a colorful way
+**The current document class have been rewritten with `expl3`. Please note that the documentations are not yet up-to-date. The syntax of some commands have been changed since the last version, especially the declaration of theorem-like environments by `\CreateTheorem`. For the moment, you can refer to the documentation of the package `create-theorem`.**
+
`lebhart` is a LaTeX class for typesetting articles, which has a colorful
design.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
index 3b96b01072..004a24d9c4 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 d0fd503426..48c6aef26f 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
@@ -1,4 +1,5 @@
-\documentclass[English,Chinese,French,allowbf]{lebhart}
+\documentclass[English,Chinese,French,use boldface,simple name]{lebhart}
+
%%================================
%% Import toolkit
@@ -37,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,11 +92,13 @@
%%================================
\begin{document}
-\title{{\normalfont\bfseries\color{maintext}\lebhart{}}\\以多彩的方式排版你的文章}
+\def\PackageVersion{2022/03/19}
+
+\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\以多彩的方式排版你的文章}
\author{许锦文}
-\thanks{对应版本. \texttt{\lebhart{} 2021/12/16}}
+\thanks{对应版本. \texttt{\lebhart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{2021年12月,巴黎}
+\date{\TheDate{\PackageVersion}[only-year-month],巴黎}
\maketitle
@@ -108,6 +111,10 @@
\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
@@ -148,7 +155,7 @@
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -197,7 +204,7 @@ Référence du théorème: \cref{thm:abc}
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -230,7 +237,7 @@ Référence du théorème: \cref{thm:abc}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -297,7 +304,7 @@ Référence du théorème: \cref{thm:abc}
-\clearpage
+% \clearpage
\LevelOneTitle{选项}
\lebhart{} 文档类有下面几个选项:
@@ -337,17 +344,13 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{puretext} 或 \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item 将定理类环境设定推迟到导言结尾。如果你希望定理类环境跟随自定义计数器编号,则应考虑这一选项。
- \end{itemize}
\item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器 (在启用 \texttt{delaythms} 选项的情况下)。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
+ \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
\item \texttt{regionalref}、\texttt{originalref}
\begin{itemize}
@@ -356,7 +359,7 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
\end{itemize}
-\clearpage
+% \clearpage
\LevelOneTitle{具体说明}
\LevelTwoTitle{语言设置}
@@ -471,71 +474,10 @@ Référence du théorème: \cref{thm:abc}
Second definition.
\end{definition}
-\LevelTwoTitle{定义新的定理型环境}
-
-若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-
-然后用下面五种方式之一定义这一环境:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义不编号的环境 \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},按顺序编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},与 \meta{numbered like} 计数器共用编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},在 \meta{numbered within} 计数器内编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item 将 \meta{name of environment} 与 \meta{existed environment} 或 \meta{existed environment}\lstinline|*| 等同。
- \item 这种方式通常在两种情况下比较有用:
- \begin{enumerate}
- \item 希望定义更简洁的名称。例如,使用 \lstinline|\CreateTheorem{thm}(theorem)|,便可以直接用名称 \texttt{thm} 来撰写定理。
- \item 希望去除某些环境的编号。例如,使用 \lstinline|\CreateTheorem{remark}(remark*)|,便可以去除 \texttt{remark} 环境的编号。
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- 其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
+ 请参阅 \textsf{create-theorem} 的说明文档以获知如何定义新的定理类环境。
\end{tip}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-下面提供一个例子。这三行代码:
-
-\begin{code}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示:
-
-\vspace{-.3\baselineskip}
-\begin{proofidea*}
- \lstinline|proofidea*| 环境。
-\end{proofidea*}
-\vspace{-.5\baselineskip}
-\begin{proofidea}
- \lstinline|proofidea| 环境。
-\end{proofidea}
-
\LevelTwoTitle{未完成标记}
你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
@@ -543,11 +485,6 @@ Référence du théorème: \cref{thm:abc}
\item \lstinline|\dnf| 或 \lstinline|\dnf<...>|。效果为:\dnf~或 \dnf<...>。\\其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\dnf}。
\end{itemize}
-类似的,还有 \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{文章标题、摘要与关键词}
\lebhart{} 同时具有标准文档类与\AmS{} 文档类的一些特性。
@@ -600,7 +537,7 @@ Référence du théorème: \cref{thm:abc}
\bigskip
\LevelOneTitle{目前存在的问题}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item 对于字体的设置仍然不够完善。
\item 目录的设计还不够美观。
\item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \colorist{} (进而 \colorart{}、\lebhart{} 与 \colorbook{}、\beaulivre{}) 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
index 43c34e8348..e00a100d4a 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 2844a4628d..d0f713ce91 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
@@ -1,4 +1,5 @@
-\documentclass[English,Chinese,French,allowbf]{lebhart}
+\documentclass[English,Chinese,French,use boldface,simple name]{lebhart}
+
%%================================
%% Import toolkit
@@ -37,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,11 +92,13 @@
%%================================
\begin{document}
-\title{{\normalfont\bfseries\color{maintext}\lebhart{}}\\write your articles in a colorful way}
+\def\PackageVersion{2022/03/19}
+
+\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\write your articles in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\lebhart{} 2021/12/16}}
+\thanks{Corresponding to: \texttt{\lebhart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{December 2021, in Paris}
+\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
@@ -108,6 +111,10 @@
\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
@@ -119,7 +126,7 @@ In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
\item download and install the required fonts, see the section "On the default fonts".
- \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+ \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
@@ -148,7 +155,7 @@ Let's first look at a complete document.
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -172,7 +179,6 @@ Référence du théorème: \cref{thm:abc}
If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
-\clearpage
\LevelThreeTitle{Initialization}
\begin{code}
@@ -198,7 +204,7 @@ For detailed description of this command and more related commands, please refer
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -231,7 +237,7 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -291,7 +297,7 @@ If you like the current document class, but want a more ``plain'' style, then yo
\end{tip}
-\clearpage
+% \clearpage
\LevelOneTitle{On the default fonts}
By default, this document class uses Palatino Linotype as the English main font; Source Han Serif, Source Han Sans and Source Han Mono as the Chinese main font, sans serif font and typewriter font; and partially uses Neo Euler as the math font. You need to download and install these fonts by yourself. The Source Han font series can be downloaded at \url{https://github.com/adobe-fonts} (It is recommended to download the Super-OTC version, so that the download size is smaller). Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. When the corresponding font is not installed, the font that comes with TeX Live will be used instead, and the effect may be discounted.
@@ -337,18 +343,14 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
- \end{itemize}
-\clearpage
+% \clearpage
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -466,75 +468,10 @@ For aesthetics, adjacent definitions will be connected together automatically:
Second definition.
\end{definition}
-\LevelTwoTitle{Define a new theorem-like environment}
-
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-
-For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-And then define this environment in one of following five ways:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
- \item This method is usually useful in the following two situations:
- \begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+ Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
\end{tip}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-Here is an example. The following code:
-
-\begin{code}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context.
-The effect is as follows:
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- The \lstinline|proofidea*| environment.
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- The \lstinline|proofidea| environment.
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -542,12 +479,6 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>
- The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Title, abstract and keywords}
\lebhart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -584,7 +515,7 @@ or written in the way of \AmS{} classes:
\maketitle
\end{code}
-\clearpage
+% \clearpage
The author information can contain multiple groups, written as:
\begin{code}
@@ -602,7 +533,7 @@ Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \ls
\bigskip
\LevelOneTitle{Known issues}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item The font settings are still not perfect.
\item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
index 8ab1768c98..2a8fc86453 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 fb66f76977..ffb3295012 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
@@ -1,4 +1,5 @@
-\documentclass[English,Chinese,French,allowbf]{lebhart}
+\documentclass[English,Chinese,French,use boldface,simple name]{lebhart}
+
%%================================
%% Import toolkit
@@ -37,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,11 +92,13 @@
%%================================
\begin{document}
-\title{{\normalfont\bfseries\color{maintext}\lebhart{}}\\écrivez vos articles de manière colorée}
+\def\PackageVersion{2022/03/19}
+
+\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\écrivez vos articles de manière colorée}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\lebhart{} 2021/12/16}}
+\thanks{Correspondant à : \texttt{\lebhart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{Décembre 2021, à Paris}
+\date{\TheDate{\PackageVersion}[only-year-month], à Paris}
\maketitle
@@ -108,6 +111,10 @@
\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
@@ -149,7 +156,7 @@ Regardons d'abord un document complet.
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
@@ -198,7 +205,7 @@ Pour une description détaillée de cette commande et d'autres commandes associ
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
@@ -231,7 +238,7 @@ De plus, vous pouvez également écrire à la manière \AmS{}, c'est-à-dire :
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
-\date{\PLdate{2022-04-01}}
+\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
@@ -337,17 +344,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} ou \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Reportez la définition des environnements de type théorème à la fin du préambule. Utilisez cette option si vous souhaitez que les environnements soient numérotés dans un compteur personnalisé.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{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}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule (avec l'option \texttt{delaythms} activée). Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -464,73 +467,10 @@ Pour l'esthétique, les définitions adjacentes seront reliées entre elles auto
Deuxième définition.
\end{definition}
-\LevelTwoTitle{Définir un nouvel environnement de type théorème}
-
-Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-Pour \meta{language name}, veuillez vous référer à la section sur la configuration de la langue. Lorsqu'il n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-Ensuite, créez cet environnement de l'une des cinq manières suivantes :
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} non numéroté
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans l'ordre 1, 2, 3, \dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté, qui partage le compteur \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans le compteur \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identifiez \meta{name of environment} avec \meta{existed environment} ou \meta{existed environment}\lstinline|*|.
- \item Cette méthode est généralement utile dans les deux situations suivantes :
- \begin{enumerate}
- \item Pour utiliser un nom plus concis. Par exemple, avec \lstinline|\CreateTheorem{thm}(theorem)|, on peut alors utiliser le nom \texttt{thm} pour écrire le théorème.
- \item Pour supprimer la numérotation de certains environnements. Par exemple, on peut supprimer la numérotation de l'environnement \texttt{remark} avec \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
+ Veuillez consulter la documentation du paquet \textsf{create-theorem} pour voir comment déclarer de nouveaux environnements de type théorème.
\end{tip}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-
-\bigskip
-Voici un exemple. Le code suivant :
-
-\begin{code}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<subsection>
-\end{code}
-définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la sous-section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant :
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- La environnement \lstinline|proofidea*| .
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- La environnement \lstinline|proofidea| .
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par example :
@@ -538,11 +478,6 @@ Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par exa
\item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
\end{itemize}
-De même, il y a aussi \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Titre, résumé et mots-clés}
\lebhart{} possède à la fois les caractéristiques des classes standard et celles des classes \AmS{}.
@@ -579,7 +514,7 @@ ou écrit à la manière des classes \AmS{} :
\maketitle
\end{code}
-\clearpage
+% \clearpage
Les informations sur l'auteur peuvent contenir plusieurs groupes, écrits comme suit :
\begin{code}
@@ -597,7 +532,7 @@ Parmi eux, l'ordre mutuel de \lstinline|\address|, \lstinline|\curraddr|, \lstin
\bigskip
\LevelOneTitle{Problèmes connus}
-\begin{itemize}[itemsep=.6em]
+\begin{itemize}
\item Les paramètres de police ne sont pas encore parfaits.
\item La conception de la table des matières est pas si belle.
\item Comme de nombreuses fonctionnalités sont basées sur la boîte à outils \ProjLib{}, \colorist{} (et donc \colorart{}, \lebhart{} et \colorbook{}, \beaulivre{}) hérite de tous ses problèmes. Pour plus de détails, veuillez vous référer à la section «~Problèmes connus~» de la documentation de \ProjLib{}.
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index 13b601abc1..4c033e6512 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -2,7 +2,7 @@
%% This is file `lebhart/lebhart.cls',
%% generated with the docstrip utility.
-%% Copyright (C) 2021 by Jinwen XU
+%% Copyright (C) 2021-2022 by Jinwen XU
%%
%% This is part of the colorist class series.
%%
@@ -16,551 +16,665 @@
%% 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\ProvidesClass{lebhart}
- [2021/12/16 A colorful article style]
-\def\colorclass@baseclass{article}
-\RequirePackage{kvoptions}
-\RequirePackage{etoolbox}
-\SetupKeyvalOptions{
- family = @colorclass,
- prefix = @colorclass@,
-}
-\DeclareBoolOption[false]{draft}
-\DeclareBoolOption[false]{fast}
-\DeclareBoolOption[false]{useosf}
-\DeclareBoolOption[false]{lmodern}
-\DeclareBoolOption[false]{palatino}
-\DeclareBoolOption[false]{times}
-\DeclareBoolOption[false]{garamond}
-\DeclareBoolOption[false]{noto}
-\DeclareBoolOption[false]{biolinum}
-\DeclareBoolOption[false]{customfont}
-\DeclareStringOption{thmnum}[PJL@thmnum@default]
-
-\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
-\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
-\newif\if@colorclass@afourpaper\@colorclass@afourpaperfalse
-\DeclareVoidOption{a4paper}{\@colorclass@afourpapertrue}
-
-\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
-\ProcessKeyvalOptions*\relax
-\LoadClass{\colorclass@baseclass}
-
-\if@colorclass@draft
- \@colorclass@fasttrue
-\fi
-\if@colorclass@lmodern
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@palatino
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@times
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@garamond
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@noto
- \@colorclass@customfonttrue
-\fi
-\if@colorclass@biolinum
- \@colorclass@customfonttrue
-\fi
+\RequirePackage{l3keys2e}
+\ProvidesExplClass
+ {lebhart}
+ {2022/03/19} {}
+ {A colorful article style}
+
+\tl_const:Nn \l__colorclass_base_class_tl { article }
+
+
+\bool_new:N \l__colorclass_load_custom_font_file_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_bool
+
+\bool_new:N \l__colorclass_load_custom_font_file_latin_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_latin_bool
+
+\bool_new:N \l__colorclass_load_custom_font_file_cjk_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_cjk_bool
+
+\bool_new:N \l__colorclass_load_custom_font_file_math_bool
+\bool_set_false:N \l__colorclass_load_custom_font_file_math_bool
+
+\keys_define:nn { colorclass }
+ {
+ , draft .bool_set:N = \l__colorclass_fast_bool
+ , draft .initial:n = { false }
+ , fast .bool_set:N = \l__colorclass_fast_bool
+
+
+ , load custom font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { colorist.font.latin }
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { colorist.font.cjk }
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { colorist.font.math }
+ }
+ , load custom font file .default:n = { colorist.font }
+ , load~custom~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load~custom~font~file .default:n = { colorist.font }
+ , load-custom-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_bool
+ \str_set:Nn \l__colorclass_custom_font_file_str { #1 }
+ }
+ , load-custom-font-file .default:n = { colorist.font }
+
+ , load custom latin font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { #1 }
+ }
+ , load custom latin font file .default:n = { colorist.font.latin }
+ , load~custom~latin~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { #1 }
+ }
+ , load~custom~latin~font~file .default:n = { colorist.font.latin }
+ , load-custom-latin-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_latin_bool
+ \str_set:Nn \l__colorclass_custom_font_file_latin_str { #1 }
+ }
+ , load-custom-latin-font-file .default:n = { colorist.font.latin }
+
+ , load custom cjk font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { #1 }
+ }
+ , load custom cjk font file .default:n = { colorist.font.cjk }
+ , load~custom~cjk~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { #1 }
+ }
+ , load~custom~cjk~font~file .default:n = { colorist.font.cjk }
+ , load-custom-cjk-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_cjk_bool
+ \str_set:Nn \l__colorclass_custom_font_file_cjk_str { #1 }
+ }
+ , load-custom-cjk-font-file .default:n = { colorist.font.cjk }
+
+ , load custom math font file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { #1 }
+ }
+ , load custom math font file .default:n = { colorist.font.math }
+ , load~custom~math~font~file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { #1 }
+ }
+ , load~custom~math~font~file .default:n = { colorist.font.math }
+ , load-custom-math-font-file .code:n = {
+ \bool_set_true:N \l__colorclass_load_custom_font_file_math_bool
+ \str_set:Nn \l__colorclass_custom_font_file_math_str { #1 }
+ }
+ , load-custom-math-font-file .default:n = { colorist.font.math }
+
+ , a4paper .bool_set:N = \l__colorclass_a_four_paper_bool
+ , a4paper .initial:n = { false }
+ , b5paper .bool_set:N = \l__colorclass_b_five_paper_bool
+ , b5paper .initial:n = { false }
+
+ , 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+ , 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+
+ , unknown .code:n = {
+ \PassOptionsToPackage { \CurrentOption } { colorist }
+ }
+ }
+\ProcessKeysOptions { colorclass }
+
+\LoadClass{\l__colorclass_base_class_tl}
%%================================
-%% Page layout
+%% Page layout
%%================================
-\RequirePackage{silence}
-\WarningFilter{geometry}{Over-specification in}
-\RequirePackage[heightrounded]{geometry}
-\geometry{
- papersize={8.5in,11in},
- % total={47em,66em},
- total={6.500in,9.130in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\if@colorclass@bfivepaper
-\geometry{
- b5paper,
- % total={40em,59em},
- total={5.535in,8.160in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-\if@colorclass@afourpaper
-\geometry{
- a4paper,
- % total={47em,70em},
- total={6.500in,9.685in},
- hmarginratio=1:1,
- vmarginratio=1:1,
- footnotesep=2em plus 2pt minus 2pt,
-}
-\fi
-
-\RequirePackage{indentfirst}
-
-\if@colorclass@fast
- \PassOptionsToPackage{fast}{colorist}
- \RequirePackage{draftwatermark}
- \DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
-\fi
-
-\RequirePackage{colorist}
+\RequirePackage { silence }
+\WarningFilter { geometry } { Over-specification }
+
+\PassOptionsToPackage { heightrounded } { geometry }
+\RequirePackage { geometry }
+
+\geometry
+ {
+ papersize = { 8.5in, 11in },
+ total = { 6.500in, 9.130in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+
+\bool_if:NT \l__colorclass_b_five_paper_bool
+ {
+ \geometry
+ {
+ b5paper,
+ total = { 5.535in, 8.160in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_a_four_paper_bool
+ {
+ \geometry
+ {
+ a4paper,
+ total = { 6.500in, 9.685in },
+ centering,
+ footnotesep = 2em plus 2pt minus 2pt,
+ }
+ }
+
+\bool_if:NT \l__colorclass_fast_bool
+ {
+ \PassOptionsToPackage { fast } { colorist }
+ \RequirePackage { draftwatermark }
+ \DraftwatermarkOptions { text = { \normalfont DRAFT }, color = paper!97!-paper }
+ }
+
+\RequirePackage { indentfirst }
+
+\RequirePackage { colorist }
+
+\hfuzz=2pt
+\vfuzz=2pt
%%================================
-%% Fonts
+%% Fonts
%%================================
-\if@colorclass@customfont\else
- \if@colorclass@fast
- \RequirePackage{mathpazo}
- \fi
-\fi
-
-\PassOptionsToPackage{no-math,quiet}{fontspec}
-\RequirePackage{fontspec}
-
-\IfFileExists{colorist-font.tex}{
- \input{colorist-font.tex}
-}{
-\IfFontExistsTF{Palatino Linotype}{%
- \setmainfont{Palatino Linotype}
- [\if@colorclass@useosf Numbers = OldStyle\fi]
-}{
- \setmainfont{TeXGyrePagellaX-Regular.otf}[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf,
- \if@colorclass@useosf Numbers = OldStyle\fi ]
-}
- \setsansfont{SourceSansPro-Regular.otf}[
- Scale = MatchLowercase ,
- BoldFont = SourceSansPro-Bold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-BoldIt.otf ]
- \setmonofont{NewCMMono10-Regular.otf}[
- Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ]
-}
-
-\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
-\RequirePackage{ctex}
-
-\IfFileExists{colorist-font.cjk.tex}{
- \input{colorist-font.cjk.tex}
-}{
-\IfFontExistsTF{SourceHanSerifSC-Regular}{%
- \setCJKmainfont{SourceHanSerifSC-Regular}[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ]
-}{
- \setCJKmainfont{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-
-\IfFontExistsTF{SourceHanSansSC-Regular}{%
- \setCJKsansfont{SourceHanSansSC-Regular}[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ]
-}{
- \setCJKsansfont{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-
-\IfFontExistsTF{SourceHanMonoSC-Regular}{%
- \setCJKmonofont{SourceHanMonoSC-Regular}[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ]
-}{
- \setCJKmonofont{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-
-\if@PJLlang@enable@CN
-\IfFontExistsTF{SourceHanSerifSC-Regular}{%
- \setCJKfamilyfont{SCmain}{SourceHanSerifSC-Regular}[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ]
-}{
- \setCJKfamilyfont{SCmain}{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\IfFontExistsTF{SourceHanSansSC-Regular}{%
- \setCJKfamilyfont{SCsans}{SourceHanSansSC-Regular}[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ]
-}{
- \setCJKfamilyfont{SCsans}{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-\IfFontExistsTF{SourceHanMonoSC-Regular}{%
- \setCJKfamilyfont{SCmono}{SourceHanMonoSC-Regular}[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ]
-}{
- \setCJKfamilyfont{SCmono}{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\fi
-
-\if@PJLlang@enable@TC
-\IfFontExistsTF{SourceHanSerifTC-Regular}{%
- \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ]
-}{
- \setCJKfamilyfont{TCmain}{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\IfFontExistsTF{SourceHanSansTC-Regular}{%
- \setCJKfamilyfont{TCsans}{SourceHanSansTC-Regular}[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ]
-}{
- \setCJKfamilyfont{TCsans}{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-\IfFontExistsTF{SourceHanMonoTC-Regular}{%
- \setCJKfamilyfont{TCmono}{SourceHanMonoTC-Regular}[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ]
-}{
- \setCJKfamilyfont{TCmono}{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\fi
-
-\if@PJLlang@enable@JP
-\IfFontExistsTF{SourceHanSerif-Regular}{%
- \setCJKfamilyfont{JPmain}{SourceHanSerif-Regular}[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ]
-}{
- \setCJKfamilyfont{JPmain}{FandolSong-Regular.otf}[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\IfFontExistsTF{SourceHanSans-Regular}{%
- \setCJKfamilyfont{JPsans}{SourceHanSans-Regular}[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ]
-}{
- \setCJKfamilyfont{JPsans}{FandolHei-Regular.otf}[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ]
-}
-\IfFontExistsTF{SourceHanMono-Regular}{%
- \setCJKfamilyfont{JPmono}{SourceHanMono-Regular}[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ]
-}{
- \setCJKfamilyfont{JPmono}{FandolFang-Regular.otf}[
- BoldFont = * ,
- BoldFeatures = {FakeBold=4} ,
- ItalicFont = * ,
- BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ]
-}
-\fi
-
-\WarningFilter{latexfont}{Font shape}
-\WarningFilter{latexfont}{Some font}
-
-\def\CJKsffamily{}
-\def\CJKttfamily{}
-
-\apptocmd{\sffamily}{\CJKsffamily}{}{\FAIL}
-\apptocmd{\ttfamily}{\CJKttfamily}{}{\FAIL}
-
-\if@PJLlang@enable@CN
-\gappto{\PJLlang@langconfig@CN}{%
- \def\CJKsffamily{\CJKfamily{SCsans}}%
- \def\CJKttfamily{\CJKfamily{SCmono}}%
- \CJKfamily{SCmain}%
-}
-\fi
-
-\if@PJLlang@enable@TC
-\gappto{\PJLlang@langconfig@TC}{%
- \def\CJKsffamily{\CJKfamily{TCsans}}%
- \def\CJKttfamily{\CJKfamily{TCmono}}%
- \CJKfamily{TCmain}%
-}
-\fi
-
-\if@PJLlang@enable@JP
-\gappto{\PJLlang@langconfig@JP}{%
- \def\CJKsffamily{\CJKfamily{JPsans}}%
- \def\CJKttfamily{\CJKfamily{JPmono}}%
- \CJKfamily{JPmain}%
-}
-\fi
-}
-
-\if@colorclass@customfont\else
-\if@colorclass@fast
-\RequirePackage{amssymb}
-\else
-\PassOptionsToPackage
- {warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math}
-\RequirePackage{unicode-math}
-\unimathsetup{math-style=ISO, partial=upright, nabla=upright}
-\setmathfont{Asana-Math.otf}
-\IfFontExistsTF{Neo Euler}{%
-\setmathfont[range={up/{Latin,latin,Greek,greek},
- bfup/{Latin,latin,Greek,greek},
- cal, bfcal, frak, bffrak,
- `(,`),`[,`],`\{,`\},`:,`=,\ne,\equiv,`/,\backslash,
- \in,\notin,\ni,\subset,\supset,\subseteq,\supseteq,
- \rightarrow,\leftarrow,\mapsto,\hookrightarrow,\hookleftarrow,
- \sum,\prod,\coprod,
- \sqrt,\int,\iint,\iiint,\oint},
- script-features={},
- sscript-features={},
- Scale = 1.05,
- ]{Neo Euler}
-}{}
-\setmathfont[range={\leq,\geq,\ll,\gg,\lll,\ggg,\leqslant,\geqslant},
- Scale = 0.95,
- ]{latinmodern-math.otf}
-\setmathfont[range={up/num, bfup/num}
- ]{texgyrepagella-math.otf}
-
-\AtBeginDocument{
-\let\mid@original\mid
-\renewcommand{\mid}{\hspace{-.2em}\mid@original\hspace{-.2em}}
-\let\nmid@original\nmid
-\renewcommand{\nmid}{\hspace{-.2em}\nmid@original\hspace{-.2em}}
-\renewcommand{\frac}[2]{\genfrac{}{}{}{}{
- \mathchoice
- {\raisebox{-.15em}{$\displaystyle #1$}}
- {\raisebox{-.15em}{$\textstyle #1$}}
- {\raisebox{-.08em}{$\scriptstyle #1$}}
- {\scriptscriptstyle #1}
-}{
- \mathchoice
- {\raisebox{.08em}{$\displaystyle #2$}}
- {\raisebox{.08em}{$\textstyle #2$}}
- {\raisebox{.05em}{$\scriptstyle #2$}}
- {\scriptscriptstyle #2}
-}}
-}
-
-\RequirePackage{tikz-cd}
-\newbox\xratbelow
-\newbox\xratabove
-\renewcommand{\xrightarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [->, baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) -- node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xleftarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [<-, baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) -- node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xleftrightarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [<->, baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) -- node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xhookrightarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/hookrightarrow] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xhookleftarrow}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/hookleftarrow] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\renewcommand{\xmapsto}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/mapsto] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-\newcommand{\xlongequal}[2][]{%
- \setbox\xratbelow=\hbox{\ensuremath{\scriptstyle #1}}%
- \setbox\xratabove=\hbox{\ensuremath{\scriptstyle #2}}%
- \pgfmathsetlengthmacro{\xratlen}{max(\wd\xratbelow, \wd\xratabove) + .8em}%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/equal] node[below=3pt] {\box\xratbelow}
- node[above=2pt] {\box\xratabove}
- (\xratlen,0) ;}}
-
-\AtBeginDocument{
-\renewcommand{\twoheadrightarrow}{%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/twoheadrightarrow] (.8em,0) ;}}
-
-\renewcommand{\twoheadleftarrow}{%
- \mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
- \draw (0,0) edge[commutative diagrams/twoheadleftarrow] (.8em,0) ;}}
-}
-\fi
-\fi
-
-\if@colorclass@lmodern
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \RequirePackage{cfr-lm}
- \else
- \RequirePackage{lmodern}
- \fi
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@palatino
- \RequirePackage{amssymb}
- \RequirePackage{mathpazo}
- \PassOptionsToPackage{defaultsups}{newpxtext}
- \RequirePackage{newpxtext}
- % \RequirePackage{newpxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.07}}
- \if@colorclass@useosf\useosf\fi
-\fi
-
-\if@colorclass@times
- \RequirePackage{amssymb}
- \PassOptionsToPackage{defaultsups}{newtxtext}
- \RequirePackage{newtxtext}
- \RequirePackage{newtxmath}
- \let\openbox\relax
- \PJLsetlinespacing{\setstretch{1.00}}
- \if@colorclass@useosf\useosf\fi
- \let\colorist@sffamily\relax
-\fi
-
-\if@colorclass@garamond
- \RequirePackage{amssymb}
- \if@colorclass@useosf\else
- \PassOptionsToPackage{lining}{ebgaramond}
- \fi
- \RequirePackage{ebgaramond-maths}
- \RequirePackage{ebgaramond}
- % \RequirePackage{garamondlibre}
- \PJLsetlinespacing{\setstretch{1.00}}
- \let\colorist@sffamily\relax
-\fi
-
-\if@colorclass@noto
- \RequirePackage{amssymb}
- \if@colorclass@useosf
- \PassOptionsToPackage{oldstyle}{notomath}
- \fi
- \RequirePackage{anyfontsize}
- \RequirePackage{notomath}
- \PJLsetlinespacing{\setstretch{1.00}}
-\fi
-
-\if@colorclass@biolinum
- \RequirePackage{amssymb}
- % \RequirePackage{mathpazo}
- % \RequirePackage[sansmath]{libertinust1math}
- \ifPDFTeX
- \if@colorclass@useosf
- \PassOptionsToPackage{osf}{biolinum}
- \fi
- \RequirePackage{biolinum}
- \renewcommand*\familydefault{\biolinum@family}
- \else
- \PassOptionsToPackage{no-math}{fontspec}
- \RequirePackage{fontspec}
- \setmainfont{LinBiolinum_R.otf}[
- BoldFont = LinBiolinum_RB.otf ,
- ItalicFont = LinBiolinum_RI.otf ,
- BoldItalicFont = LinBiolinum_RBO.otf,
- \if@colorclass@useosf Numbers = OldStyle\fi ]
- \fi
- \PJLsetlinespacing{\setstretch{1.05}}
- \RequirePackage[italic,defaultmathsizes]{mathastext}
-\fi
-
-\def\PJL@font@alreadyset{}
-
-\PassOptionsToPackage{verbose=silent}{microtype}
-\RequirePackage{microtype}
-\PassOptionsToPackage{all}{nowidow}
-\RequirePackage{nowidow}
-\RequirePackage{embrac}
+\WarningFilter { latexfont } { Font~shape }
+\WarningFilter { latexfont } { Some~font }
+
+\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
+ {
+ \bool_if:NT #1
+ {
+ \exp_args:Nx \file_if_exist:nT { #2 }
+ {
+ \exp_args:Nx \file_input:n { #2 }
+ \use_none:nn
+ }
+ }
+ \use:n { #3 }
+ }
+
+\cs_new_protected:Nn \__colorclass_if_font_exist:nnn
+ {
+ \bool_if:NTF \l__colorclass_fast_bool
+ { #3 }
+ { \fontspec_font_if_exist:nTF { #1 } { #2 } { #3 } }
+ }
+
+\__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_bool { \l__colorclass_custom_font_file_str }
+ {
+ \RequirePackage { projlib-font }
+
+ \bool_if:NF \g_projlib_font_already_set_bool
+ {
+ \bool_if:NT \l__colorclass_fast_bool
+ {
+ \RequirePackage { mathpazo }
+ }
+
+ \PassOptionsToPackage { no-math,quiet } { fontspec }
+ \RequirePackage { fontspec }
+
+ \__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_latin_bool { \l__colorclass_custom_font_file_latin_str }
+ {
+ \__colorclass_if_font_exist:nnn { Palatino~Linotype }
+ {
+ \bool_if:NTF \l__projlib_font_useosf_bool
+ {
+ \setmainfont { Palatino~Linotype } [ Numbers = OldStyle ]
+ }
+ {
+ \setmainfont { Palatino~Linotype }
+ }
+ }
+ {
+ \bool_if:NTF \l__projlib_font_useosf_bool
+ {
+ \setmainfont { TeXGyrePagellaX-Regular.otf }
+ [
+ BoldFont = TeXGyrePagellaX-Bold.otf ,
+ ItalicFont = TeXGyrePagellaX-Italic.otf ,
+ BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Numbers = OldStyle ,
+ ]
+ }
+ {
+ \setmainfont { TeXGyrePagellaX-Regular.otf }
+ [
+ BoldFont = TeXGyrePagellaX-Bold.otf ,
+ ItalicFont = TeXGyrePagellaX-Italic.otf ,
+ BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ ]
+ }
+ }
+ \setsansfont { SourceSansPro-Regular.otf }
+ [
+ Scale = MatchLowercase ,
+ BoldFont = SourceSansPro-Bold.otf ,
+ ItalicFont = SourceSansPro-RegularIt.otf ,
+ BoldItalicFont = SourceSansPro-BoldIt.otf ,
+ ]
+ \setmonofont { NewCMMono10-Regular.otf }
+ [
+ Scale = 1.05 ,
+ BoldFont = NewCMMono10-Bold.otf ,
+ ItalicFont = NewCMMono10-Italic.otf ,
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ ]
+
+ \projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+ }
+ }
+
+ \PassOptionsToPackage { fontset = none, scheme = plain } { ctex }
+ \RequirePackage { ctex }
+
+ \__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_cjk_bool { \l__colorclass_custom_font_file_cjk_str }
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
+ {
+ \setCJKmainfont { SourceHanSerifSC-Regular }
+ [
+ BoldFont = SourceHanSerifSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifSC-Bold ,
+ ]
+ }
+ {
+ \setCJKmainfont { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+
+ \__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
+ {
+ \setCJKsansfont{SourceHanSansSC-Regular}
+ [
+ BoldFont = SourceHanSansSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansSC-Bold ,
+ ]
+ }
+ {
+ \setCJKsansfont { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+
+ \__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
+ {
+ \setCJKmonofont { SourceHanMonoSC-Regular }
+ [
+ BoldFont = SourceHanMonoSC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoSC-Medium ,
+ ]
+ }
+ {
+ \setCJKmonofont { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+
+ \bool_if:NT \g__projlib_language_enabled_schinese_bool
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
+ {
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ [
+ BoldFont = SourceHanSerifSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifSC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
+ {
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ [
+ BoldFont = SourceHanSansSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansSC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
+ {
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ [
+ BoldFont = SourceHanMonoSC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoSC-Medium ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { SCmono } { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ }
+
+ \bool_if:NT \g__projlib_language_enabled_tchinese_bool
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
+ {
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ [
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanSansTC-Regular }
+ {
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ [
+ BoldFont = SourceHanSansTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansTC-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
+ {
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ [
+ BoldFont = SourceHanMonoTC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoTC-Medium ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { TCmono } { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ }
+
+ \bool_if:NT \g__projlib_language_enabled_japanese_bool
+ {
+ \__colorclass_if_font_exist:nnn { SourceHanSerif-Regular }
+ {
+ \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ [
+ BoldFont = SourceHanSerif-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerif-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ [
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanSans-Regular }
+ {
+ \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ [
+ BoldFont = SourceHanSans-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSans-Bold ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ [
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ,
+ ]
+ }
+ \__colorclass_if_font_exist:nnn { SourceHanMono-Regular }
+ {
+ \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ [
+ BoldFont = SourceHanMono-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMono-Medium ,
+ ]
+ }
+ {
+ \setCJKfamilyfont { JPmono } { FandolFang-Regular.otf }
+ [
+ BoldFont = * ,
+ BoldFeatures = { FakeBold = 4 } ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = { FakeBold = 4 } ,
+ ]
+ }
+ }
+
+ \cs_new:Nn \colorclass_cjk_sffamily: {}
+ \cs_new:Nn \colorclass_cjk_ttfamily: {}
+
+ \hook_gput_code:nnn { cmd/sffamily/after } { colorclass } { \colorclass_cjk_sffamily: }
+ \hook_gput_code:nnn { cmd/ttfamily/after } { colorclass } { \colorclass_cjk_ttfamily: }
+
+ \AddLanguageSetting [schinese]
+ {
+ \cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { SCsans } }
+ \cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { SCmono } }
+ \CJKfamily { SCmain }
+ }
+ \AddLanguageSetting [tchinese]
+ {
+ \cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { TCsans } }
+ \cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { TCmono } }
+ \CJKfamily { TCmain }
+ }
+ \AddLanguageSetting [japanese]
+ {
+ \cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { JPsans } }
+ \cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { JPmono } }
+ \CJKfamily { JPmain }
+ }
+ }
+
+ \__colorclass_load_file_or_config:Nnn \l__colorclass_load_custom_font_file_math_bool { \l__colorclass_custom_font_file_math_str }
+ {
+ \bool_if:NF \g_projlib_font_already_set_bool
+ {
+ \bool_if:NTF \l__colorclass_fast_bool
+ {
+ \RequirePackage { amssymb }
+ }
+ {
+ \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math }
+ \RequirePackage { unicode-math }
+ \unimathsetup { math-style = ISO, partial = upright, nabla = upright }
+ \setmathfont { Asana-Math.otf }
+ \__colorclass_if_font_exist:nnn { Neo~Euler }
+ {
+ \setmathfont { Neo~Euler }
+ [
+ range = { up / { Latin, latin, Greek, greek },
+ bfup / { Latin, latin, Greek, greek },
+ cal, bfcal, frak, bffrak,
+ `(, `), `[, `], `\{, `\}, `:, `=, \ne, \equiv, `/, \backslash,
+ \in, \notin, \ni, \subset, \supset, \subseteq, \supseteq,
+ \rightarrow, \leftarrow, \leftrightarrow,
+ \longleftarrow, \longrightarrow, \longleftrightarrow,
+ \Leftarrow, \Rightarrow, \Leftrightarrow,
+ \Longleftarrow, \Longrightarrow, \Longleftrightarrow,
+ \nrightarrow, \nleftarrow, \nleftrightarrow,
+ \nLeftarrow, \nRightarrow, \nLeftrightarrow,
+ \mapsto, \hookrightarrow, \hookleftarrow,
+ \leftharpoonup, \rightharpoonup, \leftharpoondown, \rightharpoondown,
+ \rightleftharpoons, \leftrightharpoons,
+ \sum, \prod, \coprod,
+ \sqrt, \int, \iint, \iiint, \oint
+ },
+ script-features = {},
+ sscript-features = {},
+ Scale = 1.05,
+ ]
+ }{}
+ \setmathfont { latinmodern-math.otf }
+ [
+ range = { \leq, \geq, \ll, \gg, \lll, \ggg, \leqslant, \geqslant },
+ Scale = 0.95,
+ ]
+ \setmathfont { texgyrepagella-math.otf }
+ [
+ range = { up / num, bfup / num }
+ ]
+
+ \hook_gput_code:nnn { begindocument } { colorclass }
+ {
+ \NewCommandCopy \colorclass_backup_mid: \mid
+ \RenewDocumentCommand \mid {}
+ { \skip_horizontal:n {-.15em} \colorclass_backup_mid: \skip_horizontal:n {-.15em} }
+ \NewCommandCopy \colorclass_backup_nmid: \nmid
+ \RenewDocumentCommand \nmid {}
+ { \skip_horizontal:n {-.15em} \colorclass_backup_nmid: \skip_horizontal:n {-.15em} }
+ }
+
+ \RequirePackage { tikz-cd }
+
+ \box_new:N \l__colorclass_xarrows_above_box
+ \box_new:N \l__colorclass_xarrows_below_box
+ \dim_new:N \l__colorclass_xarrows_length_dim
+ \cs_new_protected:Nn \colorclass_xarrows_generic:nnnn
+ % #3 = option of \tikz
+ % #4 = edge of \draw
+ {
+ \hbox_set:Nn \l__colorclass_xarrows_below_box { \ensuremath { \scriptstyle #1 } }
+ \hbox_set:Nn \l__colorclass_xarrows_above_box { \ensuremath { \scriptstyle #2 } }
+ \dim_set:Nn \l__colorclass_xarrows_length_dim
+ { \dim_eval:n { \dim_max:nn { \box_wd:N \l__colorclass_xarrows_below_box } { \box_wd:N \l__colorclass_xarrows_above_box } + .8em } }
+ \mathrel
+ {
+ \tikz [ #3, baseline = -.55ex, every~node/.style = { inner~sep = 0pt } ]
+ \draw (0,0) #4
+ node [ below = 3pt ] { \box_use:N \l__colorclass_xarrows_below_box }
+ node [ above = 2pt ] { \box_use:N \l__colorclass_xarrows_above_box }
+ ( \l__colorclass_xarrows_length_dim ,0) ;
+ }
+ }
+
+ \RenewDocumentCommand \xrightarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } { -> } { -- }
+ }
+ \RenewDocumentCommand \xleftarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } { <- } { -- }
+ }
+ \RenewDocumentCommand \xleftrightarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } { <-> } { -- }
+ }
+ \RenewDocumentCommand \xhookrightarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/hookrightarrow ] }
+ }
+ \RenewDocumentCommand \xhookleftarrow { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/hookleftarrow ] }
+ }
+ \RenewDocumentCommand \xmapsto { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/mapsto ] }
+ }
+ \NewDocumentCommand \xlongequal { O{} m }
+ {
+ \colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/equal ] }
+ }
+ \hook_gput_code:nnn { begindocument/end } { colorclass }
+ {
+ \RenewDocumentCommand \twoheadrightarrow {}
+ {
+ \colorclass_xarrows_generic:nnnn { \,\, } {} {} { edge [ commutative~diagrams/twoheadrightarrow ] }
+ }
+ \RenewDocumentCommand \twoheadleftarrow {}
+ {
+ \colorclass_xarrows_generic:nnnn { \,\, } {} {} { edge [ commutative~diagrams/twoheadleftarrow ] }
+ }
+ }
+ }
+ }
+ }
+ }
+
+\PassOptionsToPackage { all } { nowidow }
+\RequirePackage { nowidow }
+\RequirePackage { embrac }
%%================================
-%% Graphics
+%% Graphics
%%================================
-\RequirePackage{graphicx}
-\graphicspath{{images/}}
-\RequirePackage{wrapfig}
-\RequirePackage{float}
-\RequirePackage{caption}
-\captionsetup{font=small}
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
\endinput
%%
diff --git a/macros/unicodetex/latex/simplivre/README.md b/macros/unicodetex/latex/simplivre/README.md
index 0bb1398797..3d0c3a872c 100644
--- a/macros/unicodetex/latex/simplivre/README.md
+++ b/macros/unicodetex/latex/simplivre/README.md
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# `simplivre` : write you books in a simple and clear way
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf
index 86ab5be0e6..da3b855706 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 00f68d5292..ae245f756c 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{simplivre}
+\documentclass[use boldface, simple name]{simplivre}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,19 +96,23 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\frontmatter
+\LocallyStopLineNumbers
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\begin{tikzpicture}[overlay,remember picture]
- \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(21,-7)$);
- \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \fill [blue!50!cyan!50!black] ($(current page.south west)$) rectangle ($(current page.north west)+(21,-7)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\[5pt]\footnotesize\hspace*{-.05em}以极简主义风格排版你的图书\\[10pt]\tiny 对应版本. \texttt{\simplivre{} 2021/12/16}}};
- \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{许锦文}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年12月,巴黎}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\[5pt]\footnotesize\hspace*{-.05em}以极简主义风格排版你的图书\\[10pt]\tiny 对应版本. \texttt{\simplivre{} \PackageVersion}}};
+ \node[text width=15em] at ($(current page.south)+(3.5,3)$) {\color{white}\hfill\fontsize{16pt}{0pt}\selectfont{许锦文}\\[1em]\hfill\fontsize{12pt}{0pt}\selectfont\TheDate{\PackageVersion}[only-year-month],巴黎};
\end{tikzpicture}%
\end{titlepage}%
-\cleardoublepage%
+
+\setcounter{page}{0}
+
+\ResumeLineNumbers
\chapter{前言}
@@ -117,13 +121,17 @@
\simplivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
-这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \texttt{classical}),你可以把它看作一份简短的说明与演示。
+这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \texttt{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
@@ -305,22 +313,18 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}
\item 采用段首缩进而不是段间间距。
\end{itemize}
-\clearpage
+% \clearpage
\item \texttt{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{puretext} 或 \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item 将定理类环境设定推迟到导言结尾。如果你希望定理类环境跟随自定义计数器编号,则应考虑这一选项。
- \end{itemize}
\item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器 (在启用 \texttt{delaythms} 选项的情况下)。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
+ \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
\item \texttt{regionalref}、\texttt{originalref}
\begin{itemize}
@@ -409,73 +413,10 @@ Référence du théorème: \cref{thm:abc}
\UseLanguage{Chinese}
-\LevelTwoTitle{定义新的定理型环境}
-
-若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-
-\clearpage
-然后用下面五种方式之一定义这一环境:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义不编号的环境 \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},按顺序编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},与 \meta{numbered like} 计数器共用编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item 定义编号环境 \meta{name of environment},在 \meta{numbered within} 计数器内编号
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item 将 \meta{name of environment} 与 \meta{existed environment} 或 \meta{existed environment}\lstinline|*| 等同。
- \item 这种方式通常在两种情况下比较有用:
- \begin{enumerate}
- \item 希望定义更简洁的名称。例如,使用 \lstinline|\CreateTheorem{thm}(theorem)|,便可以直接用名称 \texttt{thm} 来撰写定理。
- \item 希望去除某些环境的编号。例如,使用 \lstinline|\CreateTheorem{remark}(remark*)|,便可以去除 \texttt{remark} 环境的编号。
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- 其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
+ 请参阅 \textsf{create-theorem} 的说明文档以获知如何定义新的定理类环境。
\end{tip}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-
-\clearpage
-下面提供一个例子。这三行代码:
-
-\begin{code}
-\NameTheorem[CN]{proofidea}{思路}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-\end{code}
-
-可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 section 内编号),它们支持在简体中文语境中使用,效果如下所示:
-
-\vspace{-.3\baselineskip}
-\begin{proofidea*}
- \lstinline|proofidea*| 环境。
-\end{proofidea*}
-\vspace{-.5\baselineskip}
-\begin{proofidea}
- \lstinline|proofidea| 环境。
-\end{proofidea}
-
\LevelTwoTitle{未完成标记}
你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
@@ -483,11 +424,6 @@ Référence du théorème: \cref{thm:abc}
\item \lstinline|\dnf| 或 \lstinline|\dnf<...>|。效果为:\dnf~或 \dnf<...>。\\其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\dnf}。
\end{itemize}
-类似的,还有 \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{其他}
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf
index a2367b6dd9..63f4596643 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 505ec733ac..f46490fde7 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{simplivre}
+\documentclass[use boldface, simple name]{simplivre}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,20 +96,24 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
+\LocallyStopLineNumbers
\frontmatter
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\begin{tikzpicture}[overlay,remember picture]
- \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(21,-7)$);
- \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \fill [blue!50!cyan!50!black] ($(current page.south west)$) rectangle ($(current page.north west)+(21,-7)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\[5pt]\footnotesize\textsc{Write your books in \\a simple and clear way}\\[10pt]\tiny Corresponding to: \texttt{\simplivre{} 2021/12/16}}};
- \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{\scshape Jinwen XU}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{December 2021, in Paris}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\[5pt]\footnotesize\textsc{Write your books in \\a simple and clear way}\\[10pt]\tiny Corresponding to: \texttt{\simplivre{} \PackageVersion}}};
+ \node[text width=15em] at ($(current page.south)+(3.5,3)$) {\color{white}\hfill\fontsize{16pt}{0pt}\selectfont{\scshape Jinwen XU}\\[1em]\hfill\fontsize{12pt}{0pt}\selectfont\TheDate{\PackageVersion}[only-year-month], in Paris};
\end{tikzpicture}%
\end{titlepage}%
-\cleardoublepage%
+
+\setcounter{page}{0}
+
+\ResumeLineNumbers
\chapter{Preface}
@@ -118,13 +122,17 @@
\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{classical}). You can think of it as a short introduction and demonstration.
+This documentation is typeset using \simplivre{} (with the option \texttt{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
@@ -139,7 +147,7 @@ In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{minimalist} and \texttt{projlib} are correctly installed in your \TeX{} system.
\item download and install the required fonts, see the section "On the default fonts".
- \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+ \item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
@@ -311,18 +319,14 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
-\clearpage
- \item \texttt{puretext} or \texttt{nothms}
+% \clearpage
+ \item \texttt{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -407,76 +411,11 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\LevelTwoTitle{Define a new theorem-like environment}
-
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-And then define this environment in one of following five ways:
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
- \item This method is usually useful in the following two situations:
- \begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+ Please refer to the documentation of the package \textsf{create-theorem} to see how to declare new theorem-like environments.
\end{tip}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-
-\bigskip
-Here is an example. The following code:
-
-\begin{code}
-\NameTheorem[EN]{proofidea}{Idea}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-\end{code}
-
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within section) respectively. They can be used in English context.
-The effect is as follows:
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- The \lstinline|proofidea*| environment.
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- The \lstinline|proofidea| environment.
-\end{proofidea}
-
-\clearpage
+% \clearpage
\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -484,11 +423,6 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Miscellaneous}
@@ -503,8 +437,6 @@ In \lstinline|\section| or \lstinline|\subsection| , if you wish to add footnote
\end{itemize}
This is a disadvantage brought about by the underline decoration of the title.
-\LevelThreeTitle{On the QED symbols}
-Since the font in the theorem-like environments is the same as that of the main text, in order to indicate where the environments end, a hollow QED symbol \simpleqedsymbol{} is placed at the end of the theorem-like environments. However, if your theorem ends with an equation or list (itemize, enumerate, description, etc.), this symbol cannot be automatically placed in the correct position. In this case, you need to manually add a \lstinline|\qedhere| at the end of your equation or the last entry of your list to make the QED symbol appear at the end of the line.
\LevelOneTitle{Known issues}
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf
index 9f64509b1a..082fae5283 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 7d17d1ea17..d61803acde 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
@@ -1,4 +1,4 @@
-\documentclass[classical]{simplivre}
+\documentclass[use boldface, simple name]{simplivre}
\linenumbers % Enable line numbers
@@ -39,7 +39,7 @@
\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,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,dnf,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -96,19 +96,23 @@
%%================================
\begin{document}
+\def\PackageVersion{2022/03/19}
+
\frontmatter
+\LocallyStopLineNumbers
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\begin{tikzpicture}[overlay,remember picture]
- \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(21,-7)$);
- \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \fill [blue!50!cyan!50!black] ($(current page.south west)$) rectangle ($(current page.north west)+(21,-7)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\[5pt]\footnotesize\textsc{Écrivez vos livres \\de manière simple et claire}\\[10pt]\tiny Correspondant à : \texttt{\simplivre{} 2021/12/16}}};
- \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{\scshape Jinwen XU}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{Décembre 2021, à Paris}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\[5pt]\footnotesize\textsc{Écrivez vos livres \\de manière simple et claire}\\[10pt]\tiny Correspondant à : \texttt{\simplivre{} \PackageVersion}}};
+ \node[text width=15em] at ($(current page.south)+(3.5,3)$) {\color{white}\hfill\fontsize{16pt}{0pt}\selectfont{\scshape Jinwen XU}\\[1em]\hfill\fontsize{12pt}{0pt}\selectfont\TheDate{\PackageVersion}[only-year-month], à Paris};
\end{tikzpicture}%
\end{titlepage}%
-\cleardoublepage%
+
+\setcounter{page}{0}
+
+\ResumeLineNumbers
\chapter{Préface}
@@ -117,13 +121,17 @@
\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{classical}). 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 \texttt{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
@@ -305,22 +313,18 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{itemize}
\item Utilisez l'indentation des paragraphes au lieu de l'espacement entre les paragraphes.
\end{itemize}
-\clearpage
+% \clearpage
\item \texttt{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{puretext} ou \texttt{nothms}
+ \item \texttt{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{delaythms}
- \begin{itemize}
- \item Reportez la définition des environnements de type théorème à la fin du préambule. Utilisez cette option si vous souhaitez que les environnements soient numérotés dans un compteur personnalisé.
- \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{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}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule (avec l'option \texttt{delaythms} activée). Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
+ \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}
\begin{itemize}
@@ -403,74 +407,10 @@ Par défaut, lors du référencement, le nom du théorème correspond au context
\UseLanguage{French}
-\LevelTwoTitle{Définir un nouvel environnement de type théorème}
-
-Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
-\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
-\end{itemize}
-Pour \meta{language name}, veuillez vous référer à la section sur la configuration de la langue. Lorsqu'il n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
-
-\medskip
-Ensuite, créez cet environnement de l'une des cinq manières suivantes :
-\begin{itemize}
- \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} non numéroté
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans l'ordre 1, 2, 3, \dots
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté, qui partage le compteur \meta{numbered like}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
- \begin{itemize}
- \item Définir un environnement \meta{name of environment} numéroté dans le compteur \meta{numbered within}
- \end{itemize}
- \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
- \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
- \begin{itemize}
- \item Identifiez \meta{name of environment} avec \meta{existed environment} ou \meta{existed environment}\lstinline|*|.
- \item Cette méthode est généralement utile dans les deux situations suivantes :
- \begin{enumerate}
- \item Pour utiliser un nom plus concis. Par exemple, avec \lstinline|\CreateTheorem{thm}(theorem)|, on peut alors utiliser le nom \texttt{thm} pour écrire le théorème.
- \item Pour supprimer la numérotation de certains environnements. Par exemple, on peut supprimer la numérotation de l'environnement \texttt{remark} avec \lstinline|\CreateTheorem{remark}(remark*)|.
- \end{enumerate}
- \end{itemize}
-\end{itemize}
-
\begin{tip}
- Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
+ Veuillez consulter la documentation du paquet \textsf{create-theorem} pour voir comment déclarer de nouveaux environnements de type théorème.
\end{tip}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-
-\bigskip
-Voici un exemple. Le code suivant :
-
-\begin{code}
-\NameTheorem[FR]{proofidea}{Idée}
-\CreateTheorem*{proofidea*}
-\CreateTheorem{proofidea}<section>
-\end{code}
-
-définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant :
-
-\vspace{-0.3\baselineskip}
-\begin{proofidea*}
- La environnement \lstinline|proofidea*| .
-\end{proofidea*}
-
-\vspace{-\baselineskip}
-\begin{proofidea}
- La environnement \lstinline|proofidea| .
-\end{proofidea}
-
\LevelTwoTitle{Draft mark}
Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par example :
@@ -478,11 +418,6 @@ Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par exa
\item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
\end{itemize}
-De même, il y a aussi \lstinline|\needgraph| :
-\begin{itemize}
- \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
-\end{itemize}
-
\LevelTwoTitle{Divers}
@@ -497,8 +432,6 @@ Dans \lstinline|\section| ou \lstinline|\subsection| , si vous souhaitez ajouter
\end{itemize}
C'est un inconvénient provoqué par la décoration de soulignement du titre.
-\LevelThreeTitle{Les symboles QED}
-Puisque la police dans les environnements de type théorème est la même que celle du texte principal, afin d'indiquer où se terminent les environnements, un symbole QED creux \simpleqedsymbol{} est placé à la fin des environnements de type théorème. Cependant, si votre théorème se termine par une équation ou une liste (itemize, énumérer, description, etc.), ce symbole ne peut pas être automatiquement placé à la bonne position. Dans ce cas, vous devez ajouter manuellement un \lstinline|\qedhere| à la fin de votre équation ou la dernière entrée de votre liste pour faire apparaître le symbole QED en fin de ligne.
\LevelOneTitle{Problèmes connus}
diff --git a/macros/unicodetex/latex/simplivre/simplivre.cls b/macros/unicodetex/latex/simplivre/simplivre.cls
index 7cac20b9ae..ad95aba1e0 100644
--- a/macros/unicodetex/latex/simplivre/simplivre.cls
+++ b/macros/unicodetex/latex/simplivre/simplivre.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{simplivre}
- {2022/03/17} {}
+ {2022/03/19} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }