summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/colorist/README.md30
-rw-r--r--macros/latex/contrib/colorist/colorart.cls2
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls2
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin95143 -> 94096 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex13
-rw-r--r--macros/latex/contrib/colorist/colorist.sty114
-rw-r--r--macros/latex/contrib/minimalist/README.md31
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin98659 -> 97767 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex22
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty162
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls4
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls4
-rw-r--r--macros/latex/contrib/nchairx/README.md34
-rw-r--r--macros/latex/contrib/nchairx/doc/chairxmath.pdfbin0 -> 446922 bytes
-rw-r--r--macros/latex/contrib/nchairx/doc/nchairx.pdfbin0 -> 684985 bytes
-rw-r--r--macros/latex/contrib/nchairx/logo/nchairxheader.pdfbin0 -> 5655 bytes
-rw-r--r--macros/latex/contrib/nchairx/logo/nchairxlogo.pdfbin0 -> 4272 bytes
-rw-r--r--macros/latex/contrib/nchairx/source/chairxDefaults.dtx74
-rw-r--r--macros/latex/contrib/nchairx/source/chairxDefaultsDoc.dtx60
-rw-r--r--macros/latex/contrib/nchairx/source/chairxEnv.dtx649
-rw-r--r--macros/latex/contrib/nchairx/source/chairxEnvDoc.dtx143
-rw-r--r--macros/latex/contrib/nchairx/source/chairxLogo.dtx48
-rw-r--r--macros/latex/contrib/nchairx/source/chairxLogoDoc.dtx45
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmath.dtx184
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmath.ins59
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathAlgebra.dtx383
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathAlgebraDoc.dtx270
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathAnalysis.dtx456
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathAnalysisDoc.dtx297
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathCategory.dtx141
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathCategoryDoc.dtx97
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathDecoration.dtx68
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathDecorationDoc.dtx60
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathDelimiters.dtx73
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathDelimitersDoc.dtx101
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathDiffgeo.dtx574
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathDiffgeoDoc.dtx362
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathFonts.dtx288
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathFontsDoc.dtx100
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathGeneral.dtx277
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathGeneralDoc.dtx184
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathLinalg.dtx196
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathLinalgDoc.dtx135
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathStatistics.dtx65
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathStatisticsDoc.dtx45
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathTopology.dtx146
-rw-r--r--macros/latex/contrib/nchairx/source/chairxmathTopologyDoc.dtx96
-rw-r--r--macros/latex/contrib/nchairx/source/nchairx.dtx369
-rw-r--r--macros/latex/contrib/nchairx/source/nchairx.ins63
-rw-r--r--macros/latex/contrib/readarray/readarray.pdfbin500598 -> 528752 bytes
-rw-r--r--macros/latex/contrib/readarray/readarray.sty415
-rw-r--r--macros/latex/contrib/readarray/readarray.tex476
-rw-r--r--macros/luatex/generic/lua-uni-algos/README.md6
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-algos.lua2
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-algos.pdfbin71584 -> 71964 bytes
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-algos.tex10
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-case.lua2
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-graphemes.lua2
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-normalize.lua358
-rw-r--r--macros/luatex/generic/lua-uni-algos/lua-uni-parse.lua2
-rw-r--r--macros/unicodetex/latex/beaulivre/README.md12
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdfbin327163 -> 334908 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex31
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdfbin199632 -> 222553 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex27
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdfbin203479 -> 225788 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex28
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls210
-rw-r--r--macros/unicodetex/latex/einfart/README.md12
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-cn.pdfbin259625 -> 248817 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-cn.tex36
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-en.pdfbin160194 -> 155992 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-en.tex27
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-fr.pdfbin166029 -> 162632 bytes
-rw-r--r--macros/unicodetex/latex/einfart/einfart-doc-fr.tex28
-rw-r--r--macros/unicodetex/latex/einfart/einfart.cls219
-rw-r--r--macros/unicodetex/latex/lebhart/README.md12
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdfbin297299 -> 278473 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex22
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.pdfbin163033 -> 157575 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.tex19
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdfbin169642 -> 164531 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex19
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls210
-rw-r--r--macros/unicodetex/latex/simplivre/README.md12
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdfbin291386 -> 307341 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex33
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-en.pdfbin189372 -> 210124 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-en.tex27
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdfbin192390 -> 212535 bytes
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex29
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre.cls219
92 files changed, 8154 insertions, 877 deletions
diff --git a/macros/latex/contrib/colorist/README.md b/macros/latex/contrib/colorist/README.md
index 05164cf1d0..2b54c97fa2 100644
--- a/macros/latex/contrib/colorist/README.md
+++ b/macros/latex/contrib/colorist/README.md
@@ -2,7 +2,9 @@
# `colorist` bundle: write you documents in a colorful way
-A collection of styles and classes that helps you typesetting articles and books
+## 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:
@@ -15,7 +17,7 @@ with a colorful design. It mainly consists of two parts.
(European and Brazilian) and Spanish typesetting.
-- Derivative part (they have separate pages on CTAN):
+- Derivative part:
- `lebhart.cls` : enhanced version of `colorart`
- `beaulivre.cls` : enhanced version of `colorbook`
@@ -25,6 +27,30 @@ with a colorful design. It mainly consists of two parts.
Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
typesetting, and also use more beautiful fonts.
+### How to get these files
+You can get the `.sty` and `.cls` files mentioned above simply by compiling
+`colorist.ins`:
+```
+latex colorist.ins
+```
+To get the `.tex` source files of the documentation, compile `colorist-doc.ins`:
+```
+latex colorist-doc.ins
+```
+
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 5d45070c7a..4f2a247c67 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorart}
- [2021/07/30 A colorful article style]
+ [2021/08/08 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 798ec0bcb3..cefcb450bb 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorbook}
- [2021/07/30 A colorful book style]
+ [2021/08/08 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 56badd7b1f..365d097b77 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 e17a0ba207..d0782450d0 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -93,9 +93,9 @@
\title{\colorist{}, write your articles or books in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} 2021/07/30}}
+\thanks{Corresponding to: \texttt{\colorist{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{July 2021, Beijing}
+\date{August 2021, Beijing}
\maketitle
@@ -116,6 +116,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}.
\end{itemize}
@@ -189,7 +190,6 @@ If you find this example a little complicated, don't worry. Let's now look at th
\LevelThreeTitle{Initialization}
-\medskip
\begin{code}
\documentclass{colorart}
\usepackage{ProjLib}
@@ -199,7 +199,6 @@ Initialization is straightforward. The first line loads the document class \colo
\LevelThreeTitle{Set the language}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -212,7 +211,6 @@ For detailed description of this command and more related commands, please refer
\LevelThreeTitle{Title, author information, abstract and keywords}
-\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
@@ -262,7 +260,6 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\LevelThreeTitle{Draft marks}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -271,7 +268,6 @@ When you have some places that have not yet been finished yet, you can mark them
\LevelThreeTitle{Theorem-like environments}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -488,7 +484,6 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\bigskip
The following are the main styles of theorem-like environments:
\begin{theorem}
Theorem style: theorem, proposition, lemma, corollary, ...
@@ -656,10 +651,12 @@ 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
\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
+ \item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 354006dc4b..f5f9766e09 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{colorist}
- [2021/07/30 A colorful style for articles and books]
+ [2021/08/08 A colorful style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -71,6 +71,7 @@
\ifdefined\c@chapter\IsBooktrue\else\IsBookfalse\fi
\let\colorist@sffamily\sffamily
+\let\colorist@scshape\scshape
\let\colorist@textsc\textsc
%%================================
@@ -79,7 +80,7 @@
\RequirePackage{anyfontsize}
\newcommand{\partfont}{\conditionalbfseries\colorist@sffamily}
-\newcommand{\chapfont}{\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}
@@ -169,7 +170,7 @@
\gappto{\PJLlang@langconfig@common}{%
\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}%
}
-\gappto{\PJLlang@langconfig@chinese}{%
+\gappto{\PJLlang@langconfig@schinese}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
\gappto{\PJLlang@langconfig@tchinese}{%
@@ -184,13 +185,25 @@
\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}[display]
{\partfont\filleft}
- {\partstring}
+ {%
+ \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}
- {\phantom{\MakeUppercase{\partname}}}
+ {%
+ \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}
@@ -207,63 +220,48 @@
}
%% Chapter
- \newlength{\colorist@chapboxwidth}
-
- \newcommand{\MakeChapBox}[2]{%
- \settowidth{\colorist@chapboxwidth}{#1}
- \begin{tcolorbox}[
- enhanced,
- skin = bicolor,
- frame engine = path,
- % sharp corners = all,
- width = 0.9\textwidth,
- top = 4mm, bottom = 4mm,
- arc = .5mm,
- sidebyside,
- frame hidden,
- boxrule = 0mm,
- lefthand width = 1.5\colorist@chapboxwidth,
- colupper = white,
- colback = maintheme!80!paper,
- colbacklower = maintheme!20!paper,
- sidebyside align=center,
- halign=center]
- \Huge #1%
- \tcblower%
- #2%
- \end{tcolorbox}%
+ \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{\MakeChapBoxSingle}[1]{%
+ \newcommand{\TheChapterSingle}[1]{%
\begin{tcolorbox}[
enhanced,
- width = 0.7\textwidth,
- % sharp corners = all,
- top = 4mm, bottom = 4mm,
- arc = .5mm,
- frame hidden,
- boxrule = 0mm,
- colback = maintheme!20!paper,
+ 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}
- {\filright\chapfont\huge} % Format
+ {\chapfont\huge} % Format
{} % Label
{0mm} % Sep
- {\MakeChapBox{\thechapter}{#1}} % Before-code
+ {\TheChapter{\thechapter}{#1}} % Before-code
\titlespacing*{name=\chapter}
{0em}{*2}{0em} % {left}{before-sep}{after-sep}
\titleformat{name=\chapter, numberless}
- {\filcenter\chapfont\huge} % Format
- {} % Label
- {0mm} % Sep
- {\MakeChapBoxSingle{#1}} % Before-code
+ {\filcenter\chapfont\huge}
+ {}
+ {0mm}
+ {\TheChapterSingle{#1}}
\titlespacing*{name=\chapter, numberless}
- {0em}{*2}{0em} % {left}{before-sep}{after-sep}
+ {0em}{*2}{0em}
%% Section
\titleformat{\section}
@@ -327,7 +325,7 @@
\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip}
\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip}
-\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.2\baselineskip}
+\titlespacing{\subsubsection}{0pt}{.6\baselineskip}{.3\baselineskip}
%%================================
%% TOC format
@@ -336,7 +334,7 @@
\titlecontents{part}
[0em]
{\addvspace{1.5pc}\filcenter\colorist@sffamily}
- {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase}
+ {{\normalfont\color{maintheme}\thecontentslabel}\nopagebreak\\\nopagebreak\uppercase}
{}
{} % without page number
[\addvspace{.5pc}]
@@ -360,10 +358,10 @@
{\hspace*{-2.75em}}
{\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\color{maintext!45!paper}\contentspage}
\titlecontents{subsubsection}
- [9em] % i.e., 7em (subsection) + 2em
+ [10em] % i.e., 7em (subsection) + 3em
{\normalfont\colorist@sffamily}
- {\contentslabel{2.75em}}
- {\hspace*{-2.75em}}
+ {\contentslabel{3.25em}}
+ {\hspace*{-3.25em}}
{\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\color{maintext!45!paper}\contentspage}
}{
\titlecontents{section}
@@ -375,11 +373,11 @@
\titlecontents{subsection}
[5em] % i.e., 2em (section) + 3em
{\addvspace{.15pc}\normalfont\colorist@sffamily}
- {\contentslabel{2.75em}}
- {\hspace*{-2.75em}}
+ {\contentslabel{2.25em}}
+ {\hspace*{-2.25em}}
{\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\color{maintext!45!paper}\contentspage}
\titlecontents{subsubsection}
- [7em] % i.e., 5em (subsection) + 2em
+ [8em] % i.e., 5em (subsection) + 3em
{\normalfont\colorist@sffamily}
{\contentslabel{2.75em}}
{\hspace*{-2.75em}}
@@ -750,8 +748,8 @@
\expandafter\def\csname definition-theoremnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\theoremnameRU}
\AtEndPreamble{
-\theoremstyle{basic}
\if@colorist@nothms\else
+\theoremstyle{basic}
\if@colorist@nothmnum
\CreateTheorem*{theorem}
\CreateTheorem*{lemma}
@@ -826,9 +824,13 @@
\fi
\CreateTheorem*{remark*}
\CreateTheorem*{observation*}
+
+\theoremstyle{simple}
\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}
@@ -1137,8 +1139,6 @@
}}
\fi
-\theoremstyle{simple}% as the default style for user-defined environments
-
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
@@ -1460,7 +1460,7 @@
%% Abstract style
%%================================
\renewenvironment{abstract}
-{\small{\centerline{\textsc{\conditionalbfseries\abstractname}}\vspace{-0.3\baselineskip}}
+{\small{\centerline{\textsc{\conditionalbfseries\sffamily\abstractname}}\vspace{-0.3\baselineskip}}
\color{maintext!80!paper}\begin{quotation}}
{\end{quotation}\medskip}
diff --git a/macros/latex/contrib/minimalist/README.md b/macros/latex/contrib/minimalist/README.md
index 7ff27be22e..41144c5769 100644
--- a/macros/latex/contrib/minimalist/README.md
+++ b/macros/latex/contrib/minimalist/README.md
@@ -2,7 +2,9 @@
# `minimalist` bundle: write you documents in a simple and clear way
-A collection of styles and classes that helps you typesetting articles and books
+## Introduction
+
+`minimalist` is a collection of styles and classes that helps you typesetting articles and books
with a simple and clear design. It mainly consists of two parts.
- Main part:
@@ -15,7 +17,7 @@ with a simple and clear design. It mainly consists of two parts.
(European and Brazilian) and Spanish typesetting.
-- Derivative part (they have separate pages on CTAN):
+- Derivative part:
- `einfart.cls` : more advanced class for typesetting articles
- `simplivre.cls` : more advanced class for typesetting books
@@ -25,6 +27,31 @@ with a simple and clear design. It mainly consists of two parts.
Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
typesetting, and also use more beautiful fonts.
+### How to get these files
+You can get the `.sty` and `.cls` files mentioned above simply by compiling
+`minimalist.ins`:
+```
+latex minimalist.ins
+```
+To get the `.tex` source files of the documentation, compile
+`minimalist-doc.ins`:
+```
+latex minimalist-doc.ins
+```
+
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
index b8120a55aa..51cb38acaf 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 f0d643ab63..bade46ae91 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ b/macros/latex/contrib/minimalist/minimalist-doc.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{minimart}
+\documentclass[English,Chinese,French,classical]{minimart}
\linenumbers % Enable line numbers
@@ -98,16 +98,16 @@
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\minimalist{} 2021/07/30}}
+\thanks{Corresponding to: \texttt{\minimalist{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{July 2021, Beijing}
+\date{August 2021, Beijing}
\maketitle
\begin{abstract}
\minimalist{} is a series of styles and classes for you to typeset your articles or books in a simple and clear manner. The original intention in designing this series was to write drafts and notes that look simple yet not shabby. With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication.
- Finally, this documentation is typeset using the \minimart{} class. You can think of it as a short introduction and demonstration.
+ Finally, this documentation is typeset using the \minimart{} class (with the option \texttt{classical}). You can think of it as a short introduction and demonstration.
\end{abstract}
@@ -121,6 +121,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}.
\end{itemize}
@@ -307,13 +308,6 @@ or to use the \AmS{} class:
\end{tip}
-\begin{tip}
-If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
-
-\begin{code}
-\documentclass[classical]{minimart}
-\end{code}
-\end{tip}
\clearpage
\LevelTwoTitle{Example - \minimbook}
@@ -389,11 +383,8 @@ In the next section, we will go through the options available.
\end{itemize}
\item \texttt{classical}
\begin{itemize}
- \item Classic mode. When this option is enabled, the style will become more regular: paragraphs are indented, the use of underlines are reduced, heading styles are changed, and the theorem styles will be much closer to common styles.
+ \item Classic mode. An antique-looking style will be used when this option is enabled, like in the current documentation.
\end{itemize}
- \begin{tip}
- \texttt{allowbf} + \texttt{classical} is probably a good choice if you prefer traditional style.
- \end{tip}
\item \texttt{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
@@ -413,6 +404,7 @@ In the next section, we will go through the options available.
\end{itemize}
\end{itemize}
+\clearpage
Additionally, \minimart{} and \minimbook{} offers the following options:
\begin{itemize}
\item \texttt{a4paper} or \texttt{b5paper}
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 9f972f569d..295019f1c9 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{minimalist}
- [2021/07/30 A simple and clear style for articles and books]
+ [2021/08/08 A simple and clear style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -81,15 +81,15 @@
\if@minimalist@classical
\newcommand{\partfont}{\conditionalbfseries\minimalist@titlefontshape}
\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape}
-\newcommand{\secfont}{\conditionalbfseries\minimalist@titlefontshape}
-\newcommand{\subsecfont}{\conditionalbfseries\minimalist@titlefontshape}
-\newcommand{\subsubsecfont}{\conditionalbfseries\minimalist@titlefontshape\itshape}
-\else
-\newcommand{\partfont}{\conditionalbfseries\minimalist@titlefontshape}
-\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape}
\newcommand{\secfont}{\conditionalbfseries}
\newcommand{\subsecfont}{\conditionalbfseries}
\newcommand{\subsubsecfont}{\conditionalbfseries\itshape}
+\else
+\newcommand{\partfont}{\conditionalbfseries\minimalist@titlefontshape}
+\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape}
+\newcommand{\secfont}{\conditionalbfseries\minimalist@titlefontshape}
+\newcommand{\subsecfont}{\conditionalbfseries\minimalist@titlefontshape}
+\newcommand{\subsubsecfont}{\conditionalbfseries\minimalist@titlefontshape\itshape}
\fi
%%================================
@@ -252,7 +252,7 @@
\gappto{\PJLlang@langconfig@common}{%
\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}%
}
-\gappto{\PJLlang@langconfig@chinese}{%
+\gappto{\PJLlang@langconfig@schinese}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
\gappto{\PJLlang@langconfig@tchinese}{%
@@ -344,14 +344,6 @@
%% Section
\if@minimalist@classical
-\newcommand\sec@decochar{}
-\titleformat{\section}
- {\LocallyStopLineNumbers%
- \secfont\centering}
- {\thesection}{.75em}
- {#1}
- [\ResumeLineNumbers]
-\else
\renewcommand\thesection{\arabic{section}}
\newcommand\seculine{\bgroup\markoverwith{\color{maintext!27!paper}%
\rule[-0.9ex]{2pt}{.6pt}\hspace{-2pt}\rule[-1.2ex]{2pt}{.6pt}}\ULon}
@@ -370,17 +362,18 @@
\secfont\centering}{}{0em}
{\seculine{#1}}
[\ResumeLineNumbers]
+\else
+\newcommand\sec@decochar{}
+\titleformat{\section}
+ {\LocallyStopLineNumbers%
+ \secfont\centering}
+ {\thesection}{.75em}
+ {#1}
+ [\ResumeLineNumbers]
\fi
%% Subsection
\if@minimalist@classical
-\titleformat{\subsection}
- {\LocallyStopLineNumbers%
- \subsecfont}
- {\thesubsection}{.75em}
- {#1}
- [\ResumeLineNumbers]
-\else
\renewcommand\thesubsection{%
\ifnum\c@section=0\else\arabic{section}.\fi\arabic{subsection}}
\newcommand\subseculine{\bgroup\markoverwith{\color{maintext!27!paper}%
@@ -395,6 +388,13 @@
\subsecfont}{}{0em}
{\subseculine{#1}}
[\ResumeLineNumbers]
+\else
+\titleformat{\subsection}
+ {\LocallyStopLineNumbers%
+ \subsecfont}
+ {\thesubsection}{.75em}
+ {#1}
+ [\ResumeLineNumbers]
\fi
%% Subsubsection
@@ -519,6 +519,23 @@
%%================================
\RequirePackage{amsthm}
\if@minimalist@classical
+\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}
+\else
\newtheoremstyle{simple}%
{}{}%
{\normalfont}{}%
@@ -526,23 +543,6 @@
{0pt}%
{{\conditionalbfseries\minimalist@titlefontshape\thmname{#1}\thmnumber{ #2}}%
{\color{maintext!50!paper}\thmnote{\hspace{.4em}\ensuremath{(\text{#3})}}}~~{\normalfont---}~~}
-\else
- \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}
\fi
\renewcommand{\qedsymbol}{%
@@ -788,19 +788,6 @@
\if@minimalist@classical
\renewcommand{\@maketitle}{%
\LocallyStopLineNumbers%
- \begin{center}%
- {\conditionalbfseries\minimalist@titlefontshape\large\@title}\\\bigskip%
- \color{maintext!80!paper}%
- {\small\scshape\@author}\\[2pt]%
- {\small\@date}%
- \end{center}%
- \ifx\@date\@empty\bigskip\fi%
- \bigskip\par%
- \ResumeLineNumbers%
-}
-\else
-\renewcommand{\@maketitle}{%
- \LocallyStopLineNumbers%
\noindent%
{\textcolor{maintext!27!paper}{\rule{\textwidth}{0.75pt}}}%
% \vspace{-\parskip}%
@@ -823,6 +810,19 @@
{\textcolor{maintext!27!paper}{\rule{\textwidth}{0.75pt}}\par}%
\ResumeLineNumbers%
}
+\else
+\renewcommand{\@maketitle}{%
+ \LocallyStopLineNumbers%
+ \begin{center}%
+ {\conditionalbfseries\minimalist@titlefontshape\large\@title}\\\bigskip%
+ \color{maintext!80!paper}%
+ {\small\scshape\@author}\\[2pt]%
+ {\small\@date}%
+ \end{center}%
+ \ifx\@date\@empty\bigskip\fi%
+ \bigskip\par%
+ \ResumeLineNumbers%
+}
\fi
\apptocmd{\maketitle}{\thispagestyle{fancy}}{}{\FAIL}
@@ -832,10 +832,10 @@
\if@minimalist@classical
\renewenvironment{abstract}{%
\LocallyStopLineNumbers%
- \vspace{-\baselineskip}%
- \begin{center}%
- \textsc{\conditionalbfseries\small\abstractname}\\%
- \vspace{-.3\baselineskip}%
+ \begin{flushright}%
+ \textsc{\conditionalbfseries\small\abstractname}\par%
+ \vspace{-\parskip}%
+ \vspace{-.25\baselineskip}%
\begin{minipage}[t]{.833\textwidth}%
\vspace{0pt}%
\color{maintext!80!paper}%
@@ -843,17 +843,17 @@
\parindent=2em
}{%
\end{minipage}%
- \end{center}%
- \medskip%
+ \end{flushright}%
+ \bigskip%
\ResumeLineNumbers%
}
\else
\renewenvironment{abstract}{%
\LocallyStopLineNumbers%
- \begin{flushright}%
- \textsc{\conditionalbfseries\small\abstractname}\par%
- \vspace{-\parskip}%
- \vspace{-.25\baselineskip}%
+ \vspace{-\baselineskip}%
+ \begin{center}%
+ \textsc{\conditionalbfseries\small\abstractname}\\%
+ \vspace{-.3\baselineskip}%
\begin{minipage}[t]{.833\textwidth}%
\vspace{0pt}%
\color{maintext!80!paper}%
@@ -861,8 +861,8 @@
\parindent=2em
}{%
\end{minipage}%
- \end{flushright}%
- \bigskip%
+ \end{center}%
+ \medskip%
\ResumeLineNumbers%
}
\fi
@@ -881,41 +881,41 @@
\if@minimalist@classical
\newenvironment{keyword}{%
\LocallyStopLineNumbers%
- \vspace{-.75\baselineskip}%
- \begin{center}%
- {\conditionalbfseries\small\csname keywordname\csname\languagename ABBR\endcsname\endcsname}\\%
- \vspace{-.3\baselineskip}%
+ \vspace{-.5\baselineskip}%
+ \begin{flushright}%
+ {\conditionalbfseries\small\csname keywordname\csname\languagename ABBR\endcsname\endcsname}\par%
+ \vspace{-\parskip}%
+ \vspace{-.30\baselineskip}%
\begin{minipage}[t]{.833\textwidth}%
\vspace{0pt}%
\color{maintext!80!paper}%
\footnotesize%
\parindent=2em
- \begin{center}%
+ \raggedleft%
}{%
- \end{center}%
\end{minipage}%
- \end{center}%
- \medskip%
+ \end{flushright}%
+ \bigskip%
\ResumeLineNumbers%
}
\else
\newenvironment{keyword}{%
\LocallyStopLineNumbers%
- \vspace{-.5\baselineskip}%
- \begin{flushright}%
- {\conditionalbfseries\small\csname keywordname\csname\languagename ABBR\endcsname\endcsname}\par%
- \vspace{-\parskip}%
- \vspace{-.30\baselineskip}%
+ \vspace{-.75\baselineskip}%
+ \begin{center}%
+ {\conditionalbfseries\small\csname keywordname\csname\languagename ABBR\endcsname\endcsname}\\%
+ \vspace{-.3\baselineskip}%
\begin{minipage}[t]{.833\textwidth}%
\vspace{0pt}%
\color{maintext!80!paper}%
\footnotesize%
\parindent=2em
- \raggedleft%
+ \begin{center}%
}{%
+ \end{center}%
\end{minipage}%
- \end{flushright}%
- \bigskip%
+ \end{center}%
+ \medskip%
\ResumeLineNumbers%
}
\fi
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index a8c8ae4754..263639cc1b 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{minimart}
- [2021/07/30 A simple and clear article style]
+ [2021/08/08 A simple and clear article style]
\def\minimclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -49,7 +49,7 @@
\if@minimclass@draft
\@minimclass@fasttrue
\fi
-\if@minimclass@classical
+\if@minimclass@classical\else
\@minimclass@useindenttrue
\fi
\if@minimclass@palatino
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index 68c787254a..3a53bfbc8d 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{minimbook}
- [2021/07/30 A simple and clear book style]
+ [2021/08/08 A simple and clear book style]
\def\minimclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -49,7 +49,7 @@
\if@minimclass@draft
\@minimclass@fasttrue
\fi
-\if@minimclass@classical
+\if@minimclass@classical\else
\@minimclass@useindenttrue
\fi
\if@minimclass@palatino
diff --git a/macros/latex/contrib/nchairx/README.md b/macros/latex/contrib/nchairx/README.md
new file mode 100644
index 0000000000..3f42fb5d78
--- /dev/null
+++ b/macros/latex/contrib/nchairx/README.md
@@ -0,0 +1,34 @@
+The nChairX-Style Package
+============================
+
+Overview
+--------
+
+The `nchairx` package has been developed by members of the chair for
+mathematical physics at the University of Wuerzburg as a collection
+of macros and predefined environments for quickly creating nice
+mathematical documents.
+
+Documentation
+-------------
+
+The primary documentation for `nchairx` is in provided as `nchairx.pdf`.
+Additionally, the file `chairxmath.pdf`contains the documentation only
+for the math macros included in the `chairxmath` package.
+
+
+Reporting Bugs
+--------------
+
+If you wish to report a problem or bug in the `nchairx` bundle
+please contact us via marvin.dippell@uni-wuerzburg.de.
+
+
+
+
+License
+-------
+
+The contents of this bundle are distributed under the [LaTeX Project
+Public License](https://www.latex-project.org/lppl/lppl-1-3c/),
+version 1.3c.
diff --git a/macros/latex/contrib/nchairx/doc/chairxmath.pdf b/macros/latex/contrib/nchairx/doc/chairxmath.pdf
new file mode 100644
index 0000000000..4182730e24
--- /dev/null
+++ b/macros/latex/contrib/nchairx/doc/chairxmath.pdf
Binary files differ
diff --git a/macros/latex/contrib/nchairx/doc/nchairx.pdf b/macros/latex/contrib/nchairx/doc/nchairx.pdf
new file mode 100644
index 0000000000..2ce178ffa3
--- /dev/null
+++ b/macros/latex/contrib/nchairx/doc/nchairx.pdf
Binary files differ
diff --git a/macros/latex/contrib/nchairx/logo/nchairxheader.pdf b/macros/latex/contrib/nchairx/logo/nchairxheader.pdf
new file mode 100644
index 0000000000..4c3a64ae95
--- /dev/null
+++ b/macros/latex/contrib/nchairx/logo/nchairxheader.pdf
Binary files differ
diff --git a/macros/latex/contrib/nchairx/logo/nchairxlogo.pdf b/macros/latex/contrib/nchairx/logo/nchairxlogo.pdf
new file mode 100644
index 0000000000..6a2451e042
--- /dev/null
+++ b/macros/latex/contrib/nchairx/logo/nchairxlogo.pdf
Binary files differ
diff --git a/macros/latex/contrib/nchairx/source/chairxDefaults.dtx b/macros/latex/contrib/nchairx/source/chairxDefaults.dtx
new file mode 100644
index 0000000000..4718b34feb
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxDefaults.dtx
@@ -0,0 +1,74 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of the default settings.
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for
+% structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxDefaultsDoc.dtx
+% \fi
+%
+% Equations with section numbers.
+%
+% \begin{macrocode}
+\numberwithin{equation}{section}
+\renewcommand{\theequation}{\thesection.\arabic{equation}}
+% \end{macrocode}
+%
+%
+% Page breaks allowed in long formulas by default.
+%
+% \begin{macrocode}
+\allowdisplaybreaks
+% \end{macrocode}
+%
+%
+% More space in arrays.
+%
+% \begin{macrocode}
+\renewcommand{\arraystretch}{1.2}
+% \end{macrocode}
+%
+%
+% Better spacing with |\left| and |\right| commands. Hack from
+% TeXExchange |https://tex.stackexchange.com/questions/2607/|
+%
+% \begin{macrocode}
+\let\originalleft\left
+\let\originalright\right
+\renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft}
+\renewcommand{\right}{\aftergroup\egroup\originalright}
+% \end{macrocode}
+%
+%
+% Empty left pages before new chapter. If not explicitly set to empty
+% the headers might be non-empty with empty content pages. This
+% typically looks rather weird. So the easiest way is to make the page
+% completely blank.
+%
+% \begin{macrocode}
+\renewcommand{\cleardoublepage}{\clearpage\ifodd\c@page\else\vspace*{\fill}\thispagestyle{empty}\newpage\fi}
+% \end{macrocode}
+%
diff --git a/macros/latex/contrib/nchairx/source/chairxDefaultsDoc.dtx b/macros/latex/contrib/nchairx/source/chairxDefaultsDoc.dtx
new file mode 100644
index 0000000000..6ed658a4f4
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxDefaultsDoc.dtx
@@ -0,0 +1,60 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of the environment handling.
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxDefaults.dtx
+%\fi
+%
+% Being a rather high level package, several over-all styling options
+% are set to new defaults. This includes several spacings, numbering
+% schemes etc. Currently, the most important changes are the
+% following:
+% \begin{itemize}
+% \item We redefine \verb|\mathbb| to use the fonts from the |bbm|
+% package, looks so much nicer: $\mathbb{R}$ and $\mathbb{C}$ but
+% also $\mathbb{k}$.
+% \item We redefine |\mathcal| to use the font |EulerScript| from the
+% |euler| package yielding $\mathcal{CLO}$ and we define
+% |\mathsrc| to use the script font |rsfso| from the |rfsfo|
+% package giving $\mathscr{ABCD}$. Please make sure that these
+% fonts are installed properly: with a recent \LaTeX-installation
+% this should be automatic.
+% \item Equation numbers are always with sections in front. In the
+% |book| class this leads to equation numbers having the chapter
+% number and the section number in front.
+% \item Displayed formulas are allowed to break over pages. As in
+% mathematical texts one has many (many!) long formulas this is
+% really necessary. Without allowing this by default a case by
+% case decision typically leads to sub-optimal results in page
+% breaks.
+% \item We set |\arraystretch| to the value |1.2| to have a bit more
+% space in arrays.
+% \item The |\left| and the |\right| commands in math mode have a
+% notoriously bad spacing. This is fixed by a hack from
+% TexExchange.
+% \item The command |\cleardoublepage| will produce empty headers on
+% an empty left page. This will only affect the behaviour in
+% classes with left/right pages like the book class. It generally
+% looks weird to have an empty left page containing just the page
+% number or some default header but nothing else.
+% \end{itemize}
diff --git a/macros/latex/contrib/nchairx/source/chairxEnv.dtx b/macros/latex/contrib/nchairx/source/chairxEnv.dtx
new file mode 100644
index 0000000000..8effebf5e6
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxEnv.dtx
@@ -0,0 +1,649 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of the environment handling.
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for
+% structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxEnvDoc.dtx
+% \fi
+%
+%
+% \begin{macro}{\claimch@irxname}
+% \begin{macro}{\conjecturech@irxname}
+% \begin{macro}{\conventionch@irxname}
+% \begin{macro}{\corollarych@irxname}
+% \begin{macro}{\definitionch@irxname}
+% \begin{macro}{\examplech@irxname}
+% \begin{macro}{\exercisech@irxname}
+% \begin{macro}{\hintch@irxname}
+% \begin{macro}{\lemmach@irxname}
+% \begin{macro}{\maintheoremch@irxname}
+% \begin{macro}{\notationch@irxname}
+% \begin{macro}{\proofch@irxname}
+% \begin{macro}{\propositionch@irxname}
+% \begin{macro}{\questionch@irxname}
+% \begin{macro}{\remarkch@irxname}
+% \begin{macro}{\subproofch@irxname}
+% \begin{macro}{\theoremch@irxname}
+%
+% First we define the names of the environments in English.
+% Currently we support German and English if the |babel| package
+% is loaded, insert more as you like.
+%
+% \begin{macrocode}
+\newcommand{\claimch@irxname}{Claim}
+\newcommand{\conjecturech@irxname}{Conjecture}
+\newcommand{\conventionch@irxname}{Convention}
+\newcommand{\corollarych@irxname}{Corollary}
+\newcommand{\definitionch@irxname}{Definition}
+\newcommand{\examplech@irxname}{Example}
+\newcommand{\exercisech@irxname}{Exercise}
+\newcommand{\hintch@irxname}{Hint}
+\newcommand{\lemmach@irxname}{Lemma}
+\newcommand{\maintheoremch@irxname}{Main Theorem}
+\newcommand{\notationch@irxname}{Notation}
+\newcommand{\proofch@irxname}{Proof}
+\newcommand{\propositionch@irxname}{Proposition}
+\newcommand{\questionch@irxname}{Question}
+\newcommand{\remarkch@irxname}{Remark}
+\newcommand{\subproofch@irxname}{Proof}
+\newcommand{\theoremch@irxname}{Theorem}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% If the |babel| package is loaded with the option for English we fill
+% them with the correct English words. Note that we also need the
+% |strings| option to make this work. Otherwise we do nothing.
+% Careful: no spaces allowed in the list!
+%
+% \begin{macrocode}
+\@ifpackagewith{babel}{english,strings}{%
+ \StartBabelCommands{english}{extras}
+ \SetString{\chapterch@irxname}{Chapter}
+ \SetString{\sectionch@irxname}{Section}
+ \SetString{\subsectionch@irxname}{Section}
+ \SetString{\subsubsectionch@irxname}{Section}
+ \SetString{\lemmach@irxname}{Lemma}
+ \SetString{\propositionch@irxname}{Proposition}
+ \SetString{\theoremch@irxname}{Theorem}
+ \SetString{\corollarych@irxname}{Corollary}
+ \SetString{\definitionch@irxname}{Definition}
+ \SetString{\claimch@irxname}{Claim}
+ \SetString{\examplech@irxname}{Example}
+ \SetString{\remarkch@irxname}{Remark}
+ \SetString{\questionch@irxname}{Question}
+ \SetString{\conjecturech@irxname}{Conjecture}
+ \SetString{\conventionch@irxname}{Convention}
+ \SetString{\exercisech@irxname}{Exercise}
+ \SetString{\maintheoremch@irxname}{Main Theorem}
+ \SetString{\notationch@irxname}{Notation}
+ \SetString{\proofch@irxname}{Proof}
+ \SetString{\subproofch@irxname}{Proof}
+ \SetString{\hintch@irxname}{Hint}
+ \EndBabelCommands
+}{}
+% \end{macrocode}
+%
+% Same thing in German.
+%
+% \begin{macrocode}
+\@ifpackagewith{babel}{german,strings}{%
+ \StartBabelCommands{german}{extras}
+ \SetString{\chapterch@irxname}{Kapitel}
+ \SetString{\sectionch@irxname}{Abschnitt}
+ \SetString{\subsectionch@irxname}{Abschnitt}
+ \SetString{\subsubsectionch@irxname}{Abschnitt}
+ \SetString{\lemmach@irxname}{Lemma}
+ \SetString{\propositionch@irxname}{Proposition}
+ \SetString{\theoremch@irxname}{Satz}
+ \SetString{\corollarych@irxname}{Korollar}
+ \SetString{\definitionch@irxname}{Definition}
+ \SetString{\claimch@irxname}{Behauptung}
+ \SetString{\examplech@irxname}{Beispiel}
+ \SetString{\remarkch@irxname}{Bemerkung}
+ \SetString{\questionch@irxname}{Frage}
+ \SetString{\conjecturech@irxname}{Vermutung}
+ \SetString{\conventionch@irxname}{Konvention}
+ \SetString{\exercisech@irxname}{\"Ubung}
+ \SetString{\maintheoremch@irxname}{Theorem}
+ \SetString{\notationch@irxname}{Notation}
+ \SetString{\proofch@irxname}{Beweis}
+ \SetString{\subproofch@irxname}{Beweis}
+ \SetString{\hintch@irxname}{Hinweis}
+ \EndBabelCommands
+}{}
+% \end{macrocode}
+%
+% Now we define the actual environments. We start with header in bold
+% and body in italic.
+%
+% \begin{macrocode}
+\theoremheaderfont{\normalfont\bfseries}
+\theorembodyfont{\itshape}
+% \end{macrocode}
+%
+% \begin{environment}{claim}
+% \begin{environment}{conjecture}
+% \begin{environment}{corollary}
+% \begin{environment}{definition}
+% \begin{environment}{lemma}
+% \begin{environment}{proposition}
+% \begin{environment}{theorem}
+%
+% Now those environments with this styling, all share the common
+% numbering scheme. In order to make |\autoref| work properly we
+% need to define alias counter. For each environment we also
+% define |\*autorefname|.
+%
+% \begin{macrocode}
+\newtheorem{claim}{\claimch@irxname}[section]
+\newtheorem*{nnclaim}{\claimch@irxname}
+\newaliascnt{conjecture}{claim}
+\newtheorem{conjecture}[conjecture]{\conjecturech@irxname}
+\newtheorem*{nnconjecture}{\conjecturech@irxname}
+\aliascntresetthe{conjecture}
+\newaliascnt{corollary}{claim}
+\newtheorem{corollary}[corollary]{\corollarych@irxname}
+\newtheorem*{nncorollary}{\corollarych@irxname}
+\aliascntresetthe{corollary}
+\newaliascnt{definition}{claim}
+\newtheorem{definition}[definition]{\definitionch@irxname}
+\newtheorem*{nndefinition}{\definitionch@irxname}
+\aliascntresetthe{definition}
+\newaliascnt{lemma}{claim}
+\newtheorem{lemma}[lemma]{\lemmach@irxname}
+\newtheorem*{nnlemma}{\lemmach@irxname}
+\aliascntresetthe{lemma}
+\newaliascnt{proposition}{claim}
+\newtheorem{proposition}[proposition]{\propositionch@irxname}
+\newtheorem*{nnproposition}{\propositionch@irxname}
+\aliascntresetthe{proposition}
+\newaliascnt{theorem}{claim}
+\newtheorem{theorem}[theorem]{\theoremch@irxname}
+\newtheorem*{nntheorem}{\theoremch@irxname}
+\aliascntresetthe{theorem}
+% \end{macrocode}
+%
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% Next we set the body font to roman.
+%
+% \begin{macrocode}
+\theorembodyfont{\rmfamily}
+% \end{macrocode}
+%
+% \begin{environment}{example}
+% \begin{environment}{convention}
+% \begin{environment}{notation}
+% \begin{environment}{question}
+% \begin{environment}{remark}
+%
+% And have some more environments, still numbered with the same
+% counter.
+%
+% \begin{macrocode}
+\newaliascnt{example}{claim}
+\newtheorem{example}[example]{\examplech@irxname}
+\newtheorem*{nnexample}{\examplech@irxname}
+\aliascntresetthe{example}
+\newaliascnt{convention}{claim}
+\newtheorem{convention}[convention]{\conventionch@irxname}
+\newtheorem*{nnconvention}{\conventionch@irxname}
+\aliascntresetthe{convention}
+\newaliascnt{notation}{claim}
+\newtheorem{notation}[notation]{\notationch@irxname}
+\newtheorem*{nnnotation}{\notationch@irxname}
+\aliascntresetthe{notation}
+\newaliascnt{question}{claim}
+\newtheorem{question}[question]{\questionch@irxname}
+\newtheorem*{nnquestion}{\questionch@irxname}
+\aliascntresetthe{question}
+\newaliascnt{remark}{claim}
+\newtheorem{remark}[remark]{\remarkch@irxname}
+\newtheorem*{nnremark}{\remarkch@irxname}
+\aliascntresetthe{remark}
+% \end{macrocode}
+%
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% \begin{environment}{exercise}
+%
+% The exercise environment has a separate counter.
+%
+% \begin{macrocode}
+\newtheorem{exercise}{\exercisech@irxname}[section]
+\newtheorem*{nnexercise}{\exercisech@irxname}
+% \end{macrocode}
+%
+% \end{environment}
+%
+% \begin{environment}{maintheorem}
+%
+% We change now for the main theorem styling
+%
+% \begin{macrocode}
+\theorembodyfont{\itshape}
+\theoremnumbering{Roman}
+\newtheorem{maintheorem}{\maintheoremch@irxname}
+\newtheorem*{nnmaintheorem}{\maintheoremch@irxname}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{proof}
+% \begin{environment}{subproof}
+%
+% The proof environments. We use the boxempty symbol from the AMSa
+% font.
+%
+% \begin{macrocode}
+\DeclareMathSymbol\ch@irxboxempty{\mathord}{AMSa}{"03}
+\theoremheaderfont{\scshape}
+\theorembodyfont{\normalfont}
+\theoremstyle{nonumberplain}
+\theoremseparator{:}
+\theoremsymbol{\hbox{$\ch@irxboxempty$}}
+\newtheorem{proof}{\proofch@irxname}
+\theoremsymbol{\hbox{$\triangledown$}}
+\newtheorem{subproof}{\proofch@irxname}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+% \begin{environment}{hint}
+%
+% The hint environment, without numbers and very small.
+%
+% \begin{macrocode}
+\newenvironment{hint}{\par\footnotesize\medskip\noindent\hintch@irxname: }{\par\smallskip\normalsize}
+% \end{macrocode}
+%
+% \end{environment}
+%
+% In the theorem titles only the ordinary text in boldface, not the
+% math formulas. Nice hack from David Carlisle via tex.stackexchange
+%
+% \begin{macrocode}
+\def\theorem@checkbold{}
+% \end{macrocode}
+%
+% To make these new environments compatible with the |\autoref|
+% macro of the |hyperref|-package, we need the following
+% |\*autorefname| commands.
+% \begin{macrocode}
+\providecommand{\claimautorefname}{\claimch@irxname}
+\providecommand{\conjectureautorefname}{\conjecturech@irxname}
+\providecommand{\conventionautorefname}{\conventionch@irxname}
+\providecommand{\corollaryautorefname}{\corollarych@irxname}
+\providecommand{\definitionautorefname}{\definitionch@irxname}
+\providecommand{\lemmaautorefname}{\lemmach@irxname}
+\providecommand{\propositionautorefname}{\propositionch@irxname}
+\providecommand{\exampleautorefname}{\examplech@irxname}
+\providecommand{\notationautorefname}{\notationch@irxname}
+\providecommand{\questionautorefname}{\questionch@irxname}
+\providecommand{\remarkautorefname}{\remarkch@irxname}
+\providecommand{\exerciseautorefname}{\exercisech@irxname}
+\providecommand{\thmautorefname}{\theoremch@irxname}
+\providecommand{\maintheoremautorefname}{\maintheoremch@irxname}
+% \end{macrocode}
+%
+% To redefine |\*autorefname| commands which are predefined in |hyperref|,
+% we need a little hack: to allow that |hyperref| is loaded after |nchairx|
+% we put these commands at the beginning of the document part.
+% \begin{macrocode}
+\AtBeginDocument{
+% \end{macrocode}
+% Now we fill the |\*autorefname| macros with the language specific names,
+% in order to guarantee compatibility with |babel|.
+% First in english
+% \begin{macrocode}
+\@ifpackagewith{babel}{english,strings}{%
+ \StartBabelCommands{english}{extras}
+ \SetString{\chapterautorefname}{\chapterch@irxname}
+ \SetString{\sectionautorefname}{\sectionch@irxname}
+ \SetString{\subsectionautorefname}{\subsectionch@irxname}
+ \SetString{\subsubsectionautorefname}{\subsubsectionch@irxname}
+ \SetString{\theoremautorefname}{\theoremch@irxname}
+ \EndBabelCommands
+}{}
+% \end{macrocode}
+% then in german
+% \begin{macrocode}
+\@ifpackagewith{babel}{german,strings}{%
+ \StartBabelCommands{german}{extras}
+ \SetString{\chapterautorefname}{\chapterch@irxname}
+ \SetString{\sectionautorefname}{\sectionch@irxname}
+ \SetString{\subsectionautorefname}{\subsectionch@irxname}
+ \SetString{\subsubsectionautorefname}{\subsubsectionch@irxname}
+ \SetString{\theoremautorefname}{\theoremch@irxname}
+ \EndBabelCommands
+}{}
+% \end{macrocode}
+% Close the |\AtBeginDocument| command.
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+%
+% \begin{environment}{claimlist}
+% \begin{environment}{conjecturelist}
+% \begin{environment}{conventionlist}
+% \begin{environment}{corollarylist}
+% \begin{environment}{definitionlist}
+% \begin{environment}{lemmalist}
+% \begin{environment}{propositionlist}
+% \begin{environment}{theoremlist}
+% \begin{environment}{prooflist}
+%
+% Next, we define list environments for all the above types of
+% math environments. They are build using the |enumitem| package
+% and use a rather compact appearance. Each math environment has
+% its own list, though all of them are equal at the moment.
+%
+% \begin{macrocode}
+\newenvironment{claimlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+\newenvironment{conjecturelist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+\newenvironment{conventionlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+}%
+{\endenumerate}
+\newenvironment{corollarylist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+ }%
+ {\endenumerate}
+\newenvironment{definitionlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+ }%
+ {\endenumerate}
+\newenvironment{lemmalist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+ }%
+ {\endenumerate}
+\newenvironment{propositionlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+ }%
+ {\endenumerate}
+\newenvironment{theoremlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+ }%
+ {\endenumerate}
+\newenvironment{prooflist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+}%
+{\endenumerate}
+% \end{macrocode}
+%
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% \begin{environment}{examplelist}
+% \begin{environment}{notationlist}
+% \begin{environment}{questionlist}
+% \begin{environment}{remarklist}
+%
+% Also for the following environments we have lists:
+%
+% \begin{macrocode}
+\newenvironment{examplelist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+\newenvironment{notationlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\enumerate}
+\newenvironment{questionlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+\newenvironment{remarklist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% \begin{environment}{exerciselist}
+%
+% For the exercises we also need a separate list.
+%
+% \begin{macrocode}
+\newenvironment{exerciselist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{maintheoremlist}
+%
+% And the main theorem might also consist of several parts which
+% we want to number.
+%
+% \begin{macrocode}
+\newenvironment{maintheoremlist}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]%
+ }%
+ {\endenumerate}
+% \end{macrocode}
+% \end{environment}
+%
+% We also provide compact versions of the lists in general (similar to
+% the |paralist| package)
+%
+% \begin{environment}{cptenum}
+% \begin{macrocode}
+\newenvironment{cptenum}[1][]{%
+ \enumerate[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ label=\textit{\roman*.)},
+ #1%
+ ]
+ }%
+ {\endenumerate}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{cptitem}
+% \begin{macrocode}
+\newenvironment{cptitem}[1][]{%
+ \begin{itemize}[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ #1%
+ ]
+ }%
+ {\end{itemize}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{cptdesc}
+% \begin{macrocode}
+\newenvironment{cptdesc}[1][]{%
+ \begin{description}[%
+ topsep = 0.2em,
+ partopsep = 0em,
+ itemsep = 0.2em,
+ parsep = 0.1em,
+ #1%
+ ]
+ }%
+ {\end{description}}
+% \end{macrocode}
+% \end{environment}
+%
diff --git a/macros/latex/contrib/nchairx/source/chairxEnvDoc.dtx b/macros/latex/contrib/nchairx/source/chairxEnvDoc.dtx
new file mode 100644
index 0000000000..a3ca72adcd
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxEnvDoc.dtx
@@ -0,0 +1,143 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of the environment handling.
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxEnv.dtx
+%\fi
+%
+% \subsubsection{The Predefined Environments}
+%\label{sec:doc_PredefinedEnvironments}
+%
+% The following theorem-like environments will be defined as standards
+% as they will be needed anyway. We use the |ntheorem| package
+% to do this and load it automatically with several options. Hence you
+% should not load it by hand with other options.
+%
+%
+\DescribeEnv{claim}
+\DescribeEnv{corollary}
+\DescribeEnv{definition}
+\DescribeEnv{lemma}
+\DescribeEnv{proposition}
+\DescribeEnv{theorem}
+% As usually needed we define the standard mathematical environments
+% |claim|, |corollary|, |definition|, |lemma|, |proposition|, and
+% |theorem| with a common appearance: titles in bold, body in
+% italic. The numbering will use a common counter including the
+% section counter.
+%
+%
+\DescribeEnv{conjecture}
+\DescribeEnv{convention}
+\DescribeEnv{example}
+\DescribeEnv{notation}
+\DescribeEnv{question}
+\DescribeEnv{remark}
+% The environments |conjecture|, |example|, |notation|, |question|,
+% and |remark| use the same counter as the above ones but have a body
+% in roman.
+%
+%
+\DescribeEnv{exercise}
+% The environment |exercise| has its own counter including the section
+% and is set in roman.
+%
+%
+\DescribeEnv{maintheorem}
+% We have a |maintheorem| environment which has no numbering at all:
+% this is useful for papers where there is one and only one main
+% theorem you want to place at a particular place, say in the
+% introduction.
+%
+%
+\DescribeEnv{nn<environment>}
+% For all these environments there is a non-numbered version |nn<environment>|.
+% So one can use e.g. |\begin{nntheorem} ... \end{nntheorem}| to get the theorem
+% environment as above, but without numbering.
+%
+% These environments are compatible with |autoref|. Hence using
+% \begin{quote}
+% |\autoref{label_to_<env-name>}|
+% \end{quote}
+% will give a linked reference to the
+% environment labelled with
+% \begin{quote}
+% |\label{label_to_<env-name>}|
+% \end{quote}
+% with a prefix depending on the type of environment. This also works
+% for chapters, sections, etc.
+% For non-numbered environments one should still use |\ref|.
+%
+%
+\DescribeEnv{proof}
+\DescribeEnv{subproof}
+% We have a |proof| and a |subproof| environment with an automatic
+% tombstone sign at their ends. The location of the tombstone signs is
+% maintained by the |ntheorem| package in a really good way. The
+% |proof| environment finishes with a box sign, the subproof with
+% $\triangledown$. The only catch is that one should not use the
+% commands |\[| and |\]| for equations without numbers in the proof
+% environment anymore: this causes errors as soon as one wants to
+% place a |\tag{$*$}| for these equations. Instead, one can achieve
+% this as follows:
+% \begin{center}
+% \begin{tabular}[l]{p{0.8\textwidth}}
+% |\begin{equation*}| \\
+% | E = mc^2|\\
+% | \tag{$*$}|\\
+% |\end{equation*}|
+% \end{tabular}
+% \end{center}
+% It seems that also some float environments (like |figure| or
+% |table|) at the end of the proof confuse the |ntheorem| package: you
+% should avoid this by placing the float outside of the |proof|
+% environment.
+%
+%
+\DescribeEnv{hint}
+% We have a |hint| environment to be used inside exercises: set in a
+% very small font and without numbering.
+%
+%
+\DescribeEnv{<environment>list}
+% We have special list environments |claimlist|, |conjecturelist|, |conventionlist|,
+% |corollarylist|, |definitionlist|, |examplelist|, |exerciselist|,
+% |lemmalist|, |maintheoremlist|, |notationlist|, |propositionlist|,
+% |questionlist|, |remarklist|, |theoremlist| and |prooflist| corresponding to the
+% above mathematical environments. They allow to control the
+% appearance of the item lists individually. The items will be
+% numbered in italic and can be referred to using the command
+% |\ref{item:MyLabel}|. Currently, all the lists are styled the same
+% way, but this can individually be changed easily. The lists are
+% build using the |enumitem| package.
+% You can use all options that are available by the |enumitem| package
+% also for these lists.
+%
+%
+% \DescribeEnv{cptenum}
+% \DescribeEnv{cptitem}
+% \DescribeEnv{cptdesc}
+% Beside these mathematical environments we also provide generic
+% compact lists: |cptenum|, |cptitem|, and |cptdesc| similar to the
+% lists from the |paralist| package.
+%
diff --git a/macros/latex/contrib/nchairx/source/chairxLogo.dtx b/macros/latex/contrib/nchairx/source/chairxLogo.dtx
new file mode 100644
index 0000000000..e645d2fe2c
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxLogo.dtx
@@ -0,0 +1,48 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of the environment handling.
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for
+% structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxEnvDoc.dtx
+% \fi
+%
+% The header logo with textwidth
+%
+%\begin{macro}{\nchairxheader}
+% \begin{macrocode}
+\newcommand{\nchairxheader}{\includegraphics[width=\textwidth]{nchairxheader.pdf}}
+% \end{macrocode}
+%\end{macro}
+%
+% The logo with variable width
+%
+%\begin{macro}{\nchairxlogo}
+% \begin{macrocode}
+\newcommand{\nchairxlogo}[1]{\includegraphics[width=#1]{nchairxlogo.pdf}}
+% \end{macrocode}
+%\end{macro}
+% \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxLogoDoc.dtx b/macros/latex/contrib/nchairx/source/chairxLogoDoc.dtx
new file mode 100644
index 0000000000..709e474f30
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxLogoDoc.dtx
@@ -0,0 +1,45 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of the environment handling.
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxEnv.dtx
+%\fi
+%
+% \DescribeMacro{\nchairxheader}
+% The \textsf{nChairX} package provides two macros for your personal
+% logo. With
+% \begin{center}
+% \begin{tabular}[l]{p{0.8\textwidth}}
+% \verb|\nchairxheader|
+% \end{tabular}
+% \end{center}
+% you obtain a header logo with the full textwidth. It uses the file
+% |nchairxheader.pdf| which has to be in your \LaTeX{} search path.
+%
+% \DescribeMacro{\nchairxlogo}
+% The other logo \verb|\nchairxlogo| is smaller and can be used with a
+% specific width as argument. It includes the file |nchairxlogo.pdf| which
+% has to be in the search path as well. The argument is the width in a valid
+% \LaTeX{} unit producing e.g. \nchairxlogo{3em}.
+%
+% \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmath.dtx b/macros/latex/contrib/nchairx/source/chairxmath.dtx
new file mode 100644
index 0000000000..f0a7660d52
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmath.dtx
@@ -0,0 +1,184 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% \fi
+%
+%\iffalse
+%<*chairxmath>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{chairxmath}
+ [2021/07/29 v1.0.0 First major release]
+
+%</chairxmath>
+%
+%<*driver>
+\documentclass{ltxdoc}
+
+\usepackage{chairxmath}
+\usepackage{xcolor}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{ifdraft}
+\usepackage{gitinfo2}
+\usepackage[linktoc=all]{hyperref}
+
+\EnableCrossrefs
+
+\CodelineIndex
+
+\RecordChanges
+
+% ˆˆA suppress indentation
+\setlength{\parindent}{0pt}
+
+\begin{document}
+ \DocInput{chairxmath.dtx}
+\end{document}
+%</driver>
+%\fi
+%
+% \CheckSum{1540}
+%
+% \changes{v0.1}{2018/02/27}{Initial test}
+% \changes{v0.9}{2019/02/21}{First official release}
+% \changes{v1.0.0}{2021/07/29}{First major release}
+%
+% \GetFileInfo{chairxmath.sty}
+%
+% \title{The \textsf{ChairX Math} package}
+% \author{ChairX \\
+% \ifdraft{Last changes by \gitAuthorName{} on \gitAuthorDate \\ }
+% \ifdraft{Git revision of nchairx:}
+% \ifdraft{\texttt{\gitAbbrevHash{}} {\gitReferences{}} \\ }
+% \ifdraft{}
+% Version \fileversion{} (\filedate) \\
+% \texttt{marvin.dippell@mathematik.uni-wuerzburg.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This is a part of the new ChairX package providing the famous
+% ChairX macros for mathematics.
+% \end{abstract}
+%
+% \setcounter{tocdepth}{2}
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% This package defines the new package |chairxmath|. It can be used as
+% a standalone version of the math macros from |nchairx| if the other
+% settings and defaults of |nchairx| are not needed or wanted.
+%
+% \section{Usage}
+%
+% \subsection{Fonts}
+% \input{chairxmathFontsDoc.dtx}
+%
+% \subsection{New Delimiters}
+% \input{chairxmathDelimitersDoc.dtx}
+%
+% \subsection{General Mathematics Macros}
+% \input{chairxmathGeneralDoc.dtx}
+%
+% \subsection{Algebra}
+% \input{chairxmathAlgebraDoc.dtx}
+%
+% \subsection{Analysis}
+% \input{chairxmathAnalysisDoc.dtx}
+%
+% \subsection{Category Theory}
+% \input{chairxmathCategoryDoc.dtx}
+%
+% \subsection{Differential Geometry}
+% \input{chairxmathDiffgeoDoc.dtx}
+%
+% \subsection{Linear Algebra}
+% \input{chairxmathLinalgDoc.dtx}
+%
+% \subsection{Statistics}
+% \input{chairxmathStatisticsDoc.dtx}
+%
+% \subsection{Topology}
+% \input{chairxmathTopologyDoc.dtx}
+%
+% \StopEventually{\PrintIndex \PrintChanges}
+%
+% \section{Implementation}
+% The following packages are required:
+% \begin{macrocode}
+\RequirePackage{amsmath}
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{amssymb}
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{mathtools}
+% \end{macrocode}
+% Grab only those fonts from stmry which we actually need
+% \begin{macrocode}
+\DeclareSymbolFont{stmry}{U}{stmry}{m}{n}
+\SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n}
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+% \end{macrocode}
+% Used for allowing key-value pairs as options.
+% \begin{macrocode}
+\RequirePackage{tensor}
+% \end{macrocode}
+% The |suffix| package allows to define $*$-versions of macros.
+% \begin{macrocode}
+\RequirePackage{suffix}
+% \end{macrocode}
+%
+%
+% In order to get the package options for |nchairx| working, the following needs to be defined.
+% \begin{macrocode}
+\newif\if@loadmath \@loadmathtrue
+% \end{macrocode}
+%
+% \subsection{Fonts}
+% \input{chairxmathFonts.dtx}
+%
+% \subsection{New Delimiters}
+% \input{chairxmathDelimiters.dtx}
+%
+% \subsection{General Mathematics Macros}
+% \input{chairxmathGeneral.dtx}
+%
+%\subsection{Algebra}
+%\input{chairxmathAlgebra.dtx}
+%
+%\subsection{Analysis}
+%\input{chairxmathAnalysis.dtx}
+%
+%\subsection{Category Theory}
+%\input{chairxmathCategory.dtx}
+%
+%\subsection{Differential Geometry}
+%\input{chairxmathDiffgeo.dtx}
+%
+%\subsection{Linear Algebra}
+%\input{chairxmathLinalg.dtx}
+%
+%\subsection{Statistics}
+%\input{chairxmathStatistics.dtx}
+%
+%\subsection{Topology}
+%\input{chairxmathTopology.dtx}
+%
+%
+% \Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmath.ins b/macros/latex/contrib/nchairx/source/chairxmath.ins
new file mode 100644
index 0000000000..5e62dc64e9
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmath.ins
@@ -0,0 +1,59 @@
+%%
+%% Copyright (C) 2018 by ChairX
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+\input docstrip.tex
+\keepsilent
+\usedir{tex/latex/chairxmath}
+\preamble
+This is a generated file.
+
+Copyright (C) 2018 by ChairX
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+
+LaTeX version 2005/12/01 or later.
+\endpreamble
+
+\generate{\file{chairxmath.sty}{
+ \from{chairxmath.dtx}{chairxmath}
+ \from{chairxmathFonts.dtx}{chairxmathFonts}
+ \from{chairxmathDelimiters.dtx}{chairxmathDelimiters}
+ \from{chairxmathDecoration.dtx}{chairxmathDecoration}
+ \from{chairxmathGeneral.dtx}{chairxmathGeneral}
+ \from{chairxmathAlgebra.dtx}{chairxmathAlgebra}
+ \from{chairxmathAnalysis.dtx}{chairxmathAnalysis}
+ \from{chairxmathCategory.dtx}{chairxmathCategory}
+ \from{chairxmathDiffgeo.dtx}{chairxmathDiffgeo}
+ \from{chairxmathLinalg.dtx}{chairxmathLinalg}
+ \from{chairxmathStatistics.dtx}{chairxmathStatistics}
+ \from{chairxmathTopology.dtx}{chairxmathTopology}
+ }}
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space chairxmath.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file chairxmath.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathAlgebra.dtx b/macros/latex/contrib/nchairx/source/chairxmathAlgebra.dtx
new file mode 100644
index 0000000000..548dc6dcd2
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathAlgebra.dtx
@@ -0,0 +1,383 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all algebra related macros.
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathAlgebraDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+%\subsubsection{Fonts for Rings and Things}
+%
+%\begin{macro}{\field}
+% \begin{macrocode}
+\newcommand{\field}[1]{\ch@irxfieldfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ring}
+% \begin{macrocode}
+\newcommand{\ring}[1]{\ch@irxringfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\group}
+% \begin{macrocode}
+\newcommand{\group}[1]{\ch@irxgroupfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\algebra}
+% \begin{macrocode}
+\newcommand{\algebra}[1]{\ch@irxalgebrafont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\module}
+% \begin{macrocode}
+\newcommand{\module}[1]{\ch@irxmodulefont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\liealg}
+% \begin{macrocode}
+\newcommand{\liealg}[1]{\ch@irxliealgfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\MC}
+% \begin{macrocode}
+\newcommand{\MC}{{\scriptscriptstyle\ch@irxscriptfont{MC}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\gerstenhaber}
+% \begin{macrocode}
+\newcommand{\gerstenhaber}[1] {\ch@irxgerstenhaberfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+% \subsubsection{Some Symbols needed in Algebra}
+%
+%\begin{macro}{\Pol}
+% \begin{macrocode}
+\newcommand{\Pol}{\ch@irxoperatorfont{Pol}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\lmult}
+% \begin{macrocode}
+\newcommand{\lmult}{\operatorname{\ch@irxoperatorfont{\ell}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rmult}
+% \begin{macrocode}
+\newcommand{\rmult}{\operatorname{\ch@irxoperatorfont{r}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Lmult}
+% \begin{macrocode}
+\newcommand{\Lmult}{\operatorname{\ch@irxoperatorfont{L}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Rmult}
+% \begin{macrocode}
+\newcommand{\Rmult}{\operatorname{\ch@irxoperatorfont{R}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Center}
+% Needs |mathrsfs| package.
+% \begin{macrocode}
+\newcommand{\Center}{\mathscr{Z}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ad}
+% \begin{macrocode}
+\newcommand{\ad}{\operatorname{\ch@irxoperatorfont{ad}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Ad}
+% \begin{macrocode}
+\newcommand{\Ad}{\operatorname{\ch@irxoperatorfont{Ad}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Conj}
+% \begin{macrocode}
+\newcommand{\Conj}{\operatorname{\ch@irxoperatorfont{Conj}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\acts}
+% \begin{macrocode}
+\newcommand{\acts}{\mathbin{\triangleright}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\racts}
+% \begin{macrocode}
+\newcommand{\racts}{\mathbin{\triangleleft}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Char}
+% \begin{macrocode}
+\newcommand{\Char}{\ch@irxoperatorfont{char}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\modulo}
+% \begin{macrocode}
+\newcommand{\modulo}{\operatorname{\ch@irxoperatorfont{mod}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Clifford}
+% \begin{macrocode}
+\newcommand{\Clifford}{\operatorname{\ch@irxoperatorfont{Cl}}}
+% \end{macrocode}
+%
+%\end{macro}
+%\begin{macro}{\cClifford}
+% \begin{macrocode}
+\newcommand{\cClifford}{\operatorname{\mathbb{C}\ch@irxoperatorfont{l}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Der}
+% \begin{macrocode}
+\newcommand{\Der}{\operatorname{\ch@irxoperatorfont{Der}}}
+\WithSuffix\newcommand\Der*{\decorate[^*]{\textrm{-}\Der}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\InnDer}
+% \begin{macrocode}
+\newcommand{\InnDer}{\operatorname{\ch@irxoperatorfont{InnDer}}}
+\WithSuffix\newcommand\InnDer*{\decorate[^*]{\textrm{-}\InnDer}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\OutDer}
+% \begin{macrocode}
+\newcommand{\OutDer}{\operatorname{\ch@irxoperatorfont{OutDer}}}
+\WithSuffix\newcommand\OutDer*{\decorate[^*]{\textrm{-}\OutDer}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\InnAut}
+% \begin{macrocode}
+\newcommand{\InnAut}{\operatorname{\ch@irxoperatorfont{InnAut}}}
+\WithSuffix\newcommand\InnAut*{\decorate[^*]{\textrm{-}\InnAut}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\OutAut}
+% \begin{macrocode}
+\newcommand{\OutAut}{\operatorname{\ch@irxoperatorfont{OutAut}}}
+\WithSuffix\newcommand\OutAut*{\decorate[^*]{\textrm{-}\OutAut}{}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\formal}
+% \begin{macrocode}
+\newcommand{\formal}[1]{\ch@irxllbbracket #1\ch@irxrrbbracket}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\laurent}
+% \begin{macrocode}
+\newcommand{\laurent}[1]{(\!(#1)\!)}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sweedler}
+% \begin{macrocode}
+\newcommand{\sweedler}[1]{{\scriptscriptstyle(#1)}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Categories from Algebra}
+%
+%\begin{macro}{\algebras}
+% \begin{macrocode}
+\newcommand{\algebras}{\categoryname{alg}}
+\WithSuffix\newcommand\algebras*{\decorate[^*]{\textrm{-}\algebras}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Algebras}
+% \begin{macrocode}
+\newcommand{\Algebras}{\categoryname{Alg}}
+\WithSuffix\newcommand\Algebras*{\decorate[^*]{\textrm{-}\Algebras}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\reps}
+% \begin{macrocode}
+\newcommand{\reps}{\categoryname{rep}}
+\WithSuffix\newcommand\reps*{\decorate[^*]{\textrm{-}\reps}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Reps}
+% \begin{macrocode}
+\newcommand{\Reps}{\categoryname{Rep}}
+\WithSuffix\newcommand\Reps*{\decorate[^*]{\textrm{-}\Reps}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\PoissonAlg}
+% \begin{macrocode}
+\newcommand{\PoissonAlg}{\categoryname{PoissonAlg}}
+\WithSuffix\newcommand\PoissonAlg*{\decorate[^*]{\textrm{-}\PoissonAlg}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\modules}
+% \begin{macrocode}
+\newcommand{\modules}{\categoryname{mod}}
+\WithSuffix\newcommand\modules*{\decorate[^*]{\textrm{-}\modules}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Leftmodules}
+% \begin{macrocode}
+\newcommand{\Leftmodules}[1]{{#1}\textsf{-}\categoryname{mod}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Rightmodules}
+% \begin{macrocode}
+\newcommand{\Rightmodules}[2][]{\categoryname{mod}_{#1}\textsf{-}{#2}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Modules}
+% \begin{macrocode}
+\newcommand{\Modules}{\categoryname{Mod}}
+\WithSuffix\newcommand\Modules*{\decorate[^*]{\textrm{-}\Modules}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\LeftModules}
+% \begin{macrocode}
+\newcommand{\LeftModules}[1]{{#1}\textsf{-}\categoryname{Mod}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\RightModules}
+% \begin{macrocode}
+\newcommand{\RightModules}[2][]{\categoryname{Mod}_{#1}\textsf{-}{#2}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Bimodules}
+% \begin{macrocode}
+\newcommand{\Bimodules}{\categoryname{Bimod}}
+\WithSuffix\newcommand\Bimodules*{\decorate[^*]{\textrm{-}\Bimodules}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Rings}
+% \begin{macrocode}
+\newcommand{\Rings}{\categoryname{Ring}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Groups}
+% \begin{macrocode}
+\newcommand{\Groups}{\categoryname{Group}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Ab}
+% \begin{macrocode}
+\newcommand{\Ab}{\categoryname{Ab}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Lattices}
+% \begin{macrocode}
+\newcommand{\Lattices}{\categoryname{Lattice}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Sets}
+% \begin{macrocode}
+\newcommand{\Sets}{\categoryname{Set}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Vect}
+% \begin{macrocode}
+\newcommand{\Vect}{\categoryname{Vect}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\LieAlgs}
+% \begin{macrocode}
+\newcommand{\LieAlgs}{\categoryname{LieAlg}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Posets}
+% \begin{macrocode}
+\newcommand{\Posets}{\categoryname{Poset}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Directed}
+% \begin{macrocode}
+\newcommand{\Directed}{\categoryname{Directed}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\GSets}
+% \begin{macrocode}
+\newcommand{\GSets}[1][{G}]{{#1}\textrm{-}\Sets}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Groupoids}
+% \begin{macrocode}
+\newcommand{\Groupoids}{\categoryname{Groupoid}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathAlgebraDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathAlgebraDoc.dtx
new file mode 100644
index 0000000000..f43cb7ae44
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathAlgebraDoc.dtx
@@ -0,0 +1,270 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all algebra related macros.
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathAlgebra.dtx
+%\fi
+%
+%\subsubsection{Fonts for Rings and Things}
+%
+%\DescribeMacro{\field}
+% Font for rings |\field{R}|: $\field{R}$\\
+% Uses |fieldfont|.
+%
+%\DescribeMacro{\ring}
+% Font for rings |\ring{C}|: $\ring{C}$\\
+% Uses |ringfont|.
+%
+%\DescribeMacro{\group}
+% Font for particular (matrix) groups |\group{SO}(3)|: $\group{SO}(3)$\\
+% Uses |groupfont|.
+%
+%\DescribeMacro{\algebra}
+% Font for algebras |\algebra{A}|: $\algebra{A}$\\
+% Uses |algebrafont|.
+%
+%\DescribeMacro{\module}
+% Font for modules |\module{M}|: $\module{M}$\\
+% Uses |modulefont|.
+%
+%\DescribeMacro{\liealg}
+% Font for Lie algebras |\liealg{g}|: $\liealg{g}$\\
+% Uses |liealgfont|.
+%
+%\DescribeMacro{\MC}
+% MC for Maurer-Cartan as a tiny index |\mu_\MC \in \liealg{g}^1|: $\mu_\MC \in \liealg{g}^1$\\
+% Uses |scriptfont|.
+%
+%\DescribeMacro{\gerstenhaber}
+% Font for Gerstenhaber algebras |\gerstenhaber{G}|: $\gerstenhaber{G}$\\
+% Uses |gerstenhaberfont|.
+%
+%\subsubsection{Some Symbols needed in Algebra}
+%
+%\DescribeMacro{\Pol}
+% Polynomials and polynomial functions |\Pol(T^*Q)|: $\Pol(T^*Q)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\lmult}
+% Left multiplications |\lmult_a|: $\lmult_a$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\rmult}
+% Right multiplications |\rmult_b|: $\rmult_b$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Lmult}
+% Left multiplications |\Lmult_a|: $\Lmult_a$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Rmult}
+% Right multiplications |\Rmult_b|: $\Rmult_b$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Center}
+% Center |\Center(\algebra{A})|: $\Center(\algebra{A})$
+%
+%\DescribeMacro{\ad}
+% Adjoint action (infinitesimal) |\ad(a)|: $\ad(a)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Ad}
+% Adjoint action |\Ad_g|: $\Ad_g$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Conj}
+% Conjugation |\Conj_g|: $\Conj_g$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\acts}
+% A generic (left) action map |g \acts a|: $g \acts a$
+%
+%\DescribeMacro{\racts}
+% A generic right action map |a \racts g|: $a \racts g$
+%
+%\DescribeMacro{\Char}
+% Characteristics of a field |\Char(\mathbb{k})|: $\Char(\mathbb{k})$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\modulo}
+% Yet another modulo |n \modulo 2|: $n \modulo 2$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Clifford}
+% Clifford algebra generated by a vector space and a bilinear form:
+% |\Clifford(V, h)|: $\Clifford(V, h)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\cClifford}
+% Complex Clifford algebra |\cClifford(V, h)|: $\cClifford(V, h)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Der}
+% ($*$-)Derivations |\Der(\algebra{A})|: $\Der(\algebra{A})$\\
+% |\Der*(\algebra{A})|: $\Der*(\algebra{A})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\InnDer}
+% Inner ($*$-)derivations |\InnDer(\algebra{A})|: $\InnDer(\algebra{A})$\\
+% |\InnDer*(\algebra{A})|: $\InnDer*(\algebra{A})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\OutDer}
+% Outer ($*$-)derivations |\OutDer(\algebra{A})|: $\OutDer(\algebra{A})$\\
+% |\OutDer*(\algebra{A})|: $\OutDer*(\algebra{A})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\InnAut}
+% Inner ($*$-)automorphisms |\InnAut(\algebra{A})|: $\InnAut(\algebra{A})$\\
+% |\InnAut*(\algebra{A})|: $\InnAut*(\algebra{A})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\OutAut}
+% Outer ($*$-)automorphisms |\OutAut(\algebra{A})|: $\OutAut(\algebra{A})$\\
+% |\OutAut*(\algebra{A})|: $\OutAut*(\algebra{A})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\formal}
+% Formal power series in some variables |V\formal{\lambda}|:
+% $V \formal{\lambda}$
+%
+% \DescribeMacro{\laurent}
+% Formal Laurent series in some variables |V\laurent{\lambda}|:
+% $V \laurent{\lambda}$
+%
+% \DescribeMacro{\sweedler}
+% Smaller index for Sweedler notation in Hopf algebra theory \\
+% |\Delta(a) = a_\sweedler{1} \tensor a_\sweedler{2}|:
+% $\Delta(a) = a_\sweedler{1} \tensor a_\sweedler{2}$
+%
+%\subsubsection{Categories from Algebra}
+%
+%\DescribeMacro{\algebras}
+% Category of algebras |\algebras|: $\algebras$ \\
+% Category of $*$-algebras |\algebras*|: $\algebras*$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Algebras}
+% Category of unital algebras |\Algebras|: $\Algebras$ \\
+% Category of unital $*$-algebras |\Algebras*|: $\Algebras*$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\reps}
+% Category of ($*$-)representations
+% |\reps_\algebra{C}(\algebra{B})|: $\reps_\algebra{C}(\algebra{B})$ \\
+% |\reps*_\algebra{C}(\algebra{B})|: $\reps*_\algebra{C}(\algebra{B})$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Reps}
+% Category of strongly non-degenerate ($^*$)-representations
+% |\Reps_\algebra{A}(\algebra{B})|:$\Reps_\algebra{A}(\algebra{B})$ \\
+% |\Reps*_\algebra{A}(\algebra{B})|:$\Reps*_\algebra{A}(\algebra{B})$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\PoissonAlg}
+% Category of ($*$-)Poisson algebras |\PoissonAlg|: $\PoissonAlg$ \\
+% |\PoissonAlg*|: $\PoissonAlg*$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\modules}
+% Category of (inner product) modules
+% |\modules_\algebra{A}(\algebra{B})|: $\modules_\algebra{A}(\algebra{B})$ \\
+% |\modules*_\algebra{A}(\algebra{B})|: $\modules*_\algebra{A}(\algebra{B})$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Leftmodules}
+% Category of left modules
+% |\Leftmodules{\algebra{A}}|: $\Leftmodules{\algebra{A}}$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Rightmodules}
+% Category of right modules with optional subscript
+% |\Rightmodules[\category{C}]{\algebra{A}}|: $\Rightmodules[\category{C}]{\algebra{A}}$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Modules}
+% Category of strongly non-degenerate (inner product) modules
+% |\Modules_\algebra{A}(\algebra{B})|: $\Modules_\algebra{A}(\algebra{B})$ \\
+% |\Modules*_\algebra{A}(\algebra{B})|: $\Modules*_\algebra{A}(\algebra{B})$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\LeftModules}
+% Category of strongly non-degenerate left modules
+% |\LeftModules{\algebra{A}}|: $\LeftModules{\algebra{A}}$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\RightModules}
+% Category of strongly non-degenerate right modules with optional subscript
+% |\RightModules{\algebra{A}}|: $\RightModules{\algebra{A}}$ or
+% |\RightModules[\category{C}]{\algebra{A}}|: $\RightModules[\category{C}]{\algebra{A}}$\\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Bimodules}
+% Category of (inner product) bimodules
+% |\Bimodules(\algebra{A},\algebra{B})|: $\Bimodules(\algebra{A},\algebra{B})$ \\
+% |\Bimodules*(\algebra{A},\algebra{B})|: $\Bimodules*(\algebra{A},\algebra{B})$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Rings}
+% Category of unital rings (meant to be associative) |\Rings|: $\Rings$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Groups}
+% Category of groups |\Groups|: $\Groups$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Ab}
+% Category of abelian groups |\Ab|: $\Ab$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Lattices}
+% Category of lattices |\Lattices|: $\Lattices$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Sets}
+% Category of sets |\Sets|: $\Sets$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Vect}
+% Category of vector spaces |\Vect|: $\Vect$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\LieAlgs}
+% Category of Lie algebras |\LieAlgs|: $\LieAlgs$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Posets}
+% Category of partially ordered sets |\Posets|: $\Posets$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Directed}
+% Category of directed sets |\Directed|: $\Directed$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\GSets}
+% Category of $G$-Sets |\GSets|: $\GSets$ and |\Gsets[H]|: $\GSets[H]$ \\
+% Uses |categorynamefont|.
+%
+%\DescribeMacro{\Groupoids}
+% Category of groupoids |\Groupoids|: $\Groupoids$ \\
+% Uses |categorynamefont|. \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathAnalysis.dtx b/macros/latex/contrib/nchairx/source/chairxmathAnalysis.dtx
new file mode 100644
index 0000000000..afe1848c9c
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathAnalysis.dtx
@@ -0,0 +1,456 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all analysis related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathAnalysisDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+% \subsubsection{General Analysis} \label{sec:GeneralMacrosAnalysis}
+%
+%\begin{macro}{\vol}
+% \begin{macrocode}
+\newcommand{\vol}{\ch@irxoperatorfont{vol}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\complete}
+% \begin{macrocode}
+\newcommand{\complete}[1]{\widehat{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Ball}
+% \begin{macrocode}
+\newcommand{\Ball}{\ch@irxoperatorfont{B}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\abs}
+% \begin{macrocode}
+\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\norm}
+% \begin{macrocode}
+\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\supnorm}
+% \begin{macrocode}
+\newcommand{\@supnormstar}[1]{\norm*{#1}_\infty}
+\newcommand{\@supnormnostar}[2][]{\norm[#1]{#2}_\infty}
+\newcommand{\supnorm}{\@ifstar\@supnormstar\@supnormnostar}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\expands}
+% \begin{macrocode}
+\newcommand{\expands}[1][2.5]{\mathrel{\scalebox{#1}[1.1]{$\sim$}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Pseudodifferential Operators}
+%
+% \begin{macro}{\std}
+% \begin{macrocode}
+\newcommand{\std}{{\scriptscriptstyle{\ch@irxscriptfont{std}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Weyl}
+% \begin{macrocode}
+\newcommand{\Weyl}{{\scriptscriptstyle{\ch@irxscriptfont{Weyl}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Op}
+% \begin{macrocode}
+\newcommand{\Op}{\operatorname{Op}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Opstd}
+% \begin{macrocode}
+\newcommand{\Opstd}{\operatorname{Op}_\std}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\OpWeyl}
+% \begin{macrocode}
+\newcommand{\OpWeyl}{\operatorname{Op}_\Weyl}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%\subsubsection{Function Spaces}
+%
+% \begin{macro}{\spacename}
+% \begin{macrocode}
+\newcommand{\spacename}[1]{\ch@irxspacefont{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\Bounded}
+% \begin{macrocode}
+\newcommand{\Bounded}{\ch@irxspacefont{B}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Continuous}
+% \begin{macrocode}
+\newcommand{\Continuous}{\ch@irxspacefont{C}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Contbound}
+% \begin{macrocode}
+\newcommand{\Contbound}{\Continuous_{\mathrm{b}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Fun}
+% \begin{macrocode}
+\newcommand{\Fun}[1][k]{\ch@irxspacefont{C}^{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Cinfty}
+% \begin{macrocode}
+\newcommand{\Cinfty}{\Fun[\infty]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Comega}
+% \begin{macrocode}
+\newcommand{\Comega}{\Fun[\omega]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Holomorphic}
+% \begin{macrocode}
+\newcommand{\Holomorphic}{\ch@irxspacefont{O}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\AntiHolomorphic}
+% \begin{macrocode}
+\newcommand{\AntiHolomorphic}{\cc{\Holomorphic}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Schwartz}
+% \begin{macrocode}
+\newcommand{\Schwartz}{\ch@irxspacefont{S}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Riemann}
+% \begin{macrocode}
+\newcommand{\Riemann}{\ch@irxspacefont{R}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Locally Convex Spaces}
+%
+%\begin{macro}{\singsupp}
+% \begin{macrocode}
+\newcommand{\singsupp}{\operatorname{sing\,supp}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\seminorm}
+% \begin{macrocode}
+\newcommand{\seminorm}[1]{\mathrm{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ord}
+% \begin{macrocode}
+\newcommand{\ord}{\operatorname{ord}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\conv}
+% \begin{macrocode}
+\newcommand{\conv}{\operatorname{conv}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\extreme}
+% \begin{macrocode}
+\newcommand{\extreme}{\operatorname{extreme}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Hilbert Spaces}
+%
+%\begin{macro}{\hilbert}
+% \begin{macrocode}
+\newcommand{\hilbert}[1]{\ch@irxhilbertfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\prehilb}
+% \begin{macrocode}
+\newcommand{\prehilb}[1]{\ch@irxprehilbfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Adjointable}
+% \begin{macrocode}
+\newcommand{\Adjointable}[1][{}]{\mathfrak{B}_{\scriptscriptstyle{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Finite}
+% \begin{macrocode}
+\newcommand{\Finite}[1][{}]{\mathfrak{F}_{\scriptscriptstyle{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Compact}
+% \begin{macrocode}
+\newcommand{\Compact}[1][{}]{\mathfrak{K}_{\scriptscriptstyle{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\opdomain}
+% \begin{macrocode}
+\newcommand{\opdomain}{\ch@irxhilbertfont{D}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\spec}
+% \begin{macrocode}
+\newcommand{\spec}{\operatorname{\ch@irxoperatorfont{spec}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\closure}
+% \begin{macrocode}
+\newcommand{\closure}[1]{\overline{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\res}
+% \begin{macrocode}
+\newcommand{\res}{\operatorname{\ch@irxoperatorfont{res}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Res}
+% \begin{macrocode}
+\newcommand{\Res}{\operatorname{\ch@irxoperatorfont{Res}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\specrad}
+% \begin{macrocode}
+\newcommand{\specrad}{\operatorname{\varrho}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\slim}
+% \begin{macrocode}
+\newcommand{\slim}{\operatorname*{\ch@irxoperatorfont{s-lim}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\wlim}
+% \begin{macrocode}
+\newcommand{\wlim}{\operatorname*{\ch@irxoperatorfont{w-lim}}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Dirac's bra and ket}
+%
+%\begin{macro}{\bra}
+%\begin{macro}{\ket}
+%\begin{macro}{\braket}
+%\begin{macro}{\ketbra}
+% \begin{macrocode}
+\DeclarePairedDelimiter{\ketbr@}{\vert}{\vert}
+\DeclarePairedDelimiter{\ket}{\vert}{\rangle}
+\DeclarePairedDelimiter{\bra}{\langle}{\vert}
+\newcommand{\braket}[3][]{\SP[#1]{#2 \,#1\vert\, #3}}
+\newcommand{\ketbra}[3][]{\ketbr@[#1]{#2 #1\rangle #1\langle #3}}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%
+%\subsubsection{Operator Algebras}
+%
+%\begin{macro}{\Spec}
+% \begin{macrocode}
+\newcommand{\Spec}{\operatorname{\ch@irxoperatorfont{Spec}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Rad}
+% \begin{macrocode}
+\newcommand{\Rad}{\operatorname{\ch@irxoperatorfont{Rad}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ind}
+% \begin{macrocode}
+\newcommand{\ind}{\operatorname{\ch@irxoperatorfont{ind}}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Measure Theory and Integration}
+%
+%\begin{macro}{\Measurable}
+% \begin{macrocode}
+\newcommand{\Measurable}{\ch@irxspacefont{M}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Meas}
+% \begin{macrocode}
+\newcommand{\Meas}{\ch@irxoperatorfont{Meas}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\BoundMeas}
+% \begin{macrocode}
+\newcommand{\BoundMeas}{\ch@irxspacefont{BM}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Lp}
+% \begin{macrocode}
+\newcommand{\Lp}[1][{p}]{\mathrm{L}^{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Lone}
+% \begin{macrocode}
+\newcommand{\Lone}{\Lp[1]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Ltwo}
+% \begin{macrocode}
+\newcommand{\Ltwo}{\Lp[2]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Linfty}
+% \begin{macrocode}
+\newcommand{\Linfty}{\Lp[\infty]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Intp}
+% \begin{macrocode}
+\newcommand{\Intp}[1][{p}]{\ch@irxspacefont{L}^{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Intone}
+% \begin{macrocode}
+\newcommand{\Intone}{\Intp[1]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Inttwo}
+% \begin{macrocode}
+\newcommand{\Inttwo}{\Intp[2]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Intinfty}
+% \begin{macrocode}
+\newcommand{\Intinfty}{\Intp[\infty]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\essrange}
+% \begin{macrocode}
+\newcommand{\essrange}{\operatorname{\ch@irxoperatorfont{ess\,range}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\esssup}
+% \begin{macrocode}
+\newcommand*{\esssup}{\operatorname*{\ch@irxoperatorfont{ess}\,\ch@irxoperatorfont{\sup}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\esssupnormstar}
+% \begin{macrocode}
+\newcommand{\@esssupnormstar}[1]{\norm*{#1}_{\esssup}}
+\newcommand{\@esssupnormnostar}[2][]{\norm[#1]{#2}_{\esssup}}
+\newcommand{\esssupnorm}{\@ifstar\@esssupnormstar\@esssupnormnostar}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ac}
+% \begin{macrocode}
+\newcommand{\ac}{\ch@irxscriptfont{ac}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\sing}
+% \begin{macrocode}
+\newcommand{\sing}{\ch@irxscriptfont{sing}}
+% \end{macrocode}
+%\end{macro}
+%
+% \subsubsection{Limits} \label{sec:Limits}
+%
+%\begin{macro}{\indlim}
+% \begin{macrocode}
+\newcommand{\indlim}{\operatorname*{{ind\,lim}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\projlim}
+% \begin{macrocode}
+\renewcommand{\projlim}{\operatorname*{{proj\,lim}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathAnalysisDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathAnalysisDoc.dtx
new file mode 100644
index 0000000000..43954d61d6
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathAnalysisDoc.dtx
@@ -0,0 +1,297 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all analysis related macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathAnalysis.dtx
+%\fi
+%
+%\subsubsection{General Anyalsis Macros} \label{sec:Doc_GeneralMacrosAnalysis}
+%
+% \DescribeMacro{\vol}
+% Volume |\vol|: $\vol$\\
+% Uses |operatorfont|
+%
+% \DescribeMacro{\complete}
+% Completion of some space |\complete{V}|: $\complete{V}$
+%
+% \DescribeMacro{\Ball}
+% Open ball |\Ball_{r}(p)|: $\Ball_{r}(p)$
+%
+% \DescribeMacro{\abs}
+% Generic absolute value |\abs{x}|: $\abs{x}$
+%
+% \DescribeMacro{\norm}
+% Generic norm |\norm{v}|: $\norm{v}$
+%
+% \DescribeMacro{\supnorm}
+% Supremum norm |\supnorm{f}|: $\supnorm{f}$
+%
+% \DescribeMacro{\expands}
+% Formal expansions |f(t) \stackrel{t \to 0}{\expands} t^k|:
+% $f(t) \stackrel{t \to 0}{\expands} t^k$, \\
+% or with optional stretching factor (default is 2.5) |a \expands[4] b|: $a \expands[4] b$.
+%
+%
+% \subsubsection{Pseudodifferential Operators}
+% \label{sec:Doc_PseudodifferentialOperators}
+%
+% \DescribeMacro{\std}
+% Standard ordering as small subscript |\sigma_\std|: $\sigma_\std$ \\
+% Uses |scriptfont|
+%
+% \DescribeMacro{\Weyl}
+% Weyl ordering as small subscript |\sigma_\Weyl|: $\sigma_\Weyl$ \\
+% Uses |scriptfont|
+%
+% \DescribeMacro{\Op}
+% Operator for a symbol |\Op(f)|: $\Op(f)$ \\
+% Uses |operatorfont|
+%
+% \DescribeMacro{\Opstd}
+% Standard ordered operator for a symbol |\Opstd(f)|: $\Opstd(f)$ \\
+% Uses |operatorfont|
+%
+% \DescribeMacro{\OpWeyl}
+% Weyl ordered operator for a symbol |\OpWeyl(f)|: $\OpWeyl(f)$ \\
+% Uses |operatorfont|
+%
+%
+%\subsubsection{Function Spaces}
+%
+% \DescribeMacro{\spacename}
+% Font for specific functional spaces |\spacename{F}(X)|: $\spacename{F}(X)$ \\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Bounded}
+% Bounded functions |\Bounded(X)|: $\Bounded(X)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Continuous}
+% Continuous functions |\Continuous(X)|: $\Continuous(X)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Contbound}
+% Continuous bounded functions |\Contbound(X)|: $\Contbound(X)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Fun}
+% $C^k$-functions (for $\Continuous$ use |\Continuous|) |\Fun(M)|: $\Fun(M)$ and |\Fun[\ell](M)|: $\Fun[\ell](M)$ \\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Cinfty}
+% Smooth functions |\Cinfty|: $\Cinfty(M)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Comega}
+% Real-analytic functions |\Comega|: $\Comega(M)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Holomorphic}
+% Holomorphic functions |\Holomorphic|: $\Holomorphic(U)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\AntiHolomorphic}
+% Anti-holomorphic functions |\AntiHolomorphic|: $\AntiHolomorphic(U)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Schwartz}
+% Schwartz space |\Schwartz|: $\Schwartz(\mathbb{R}^n)$\\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Riemann}
+% Riemann integrable functions |\Riemann([a, b])|: $\Riemann([a, b])$ \\
+% Uses |spacefont|.
+%
+% \subsubsection{Locally Convex Analysis and Distributions}
+%
+% \DescribeMacro{\singsupp}
+% Singular support of a distribution |\singsupp u|: $\singsupp u$
+%
+% \DescribeMacro{\seminorm}
+% Font for generic seminorm |\seminorm{p}|: $\seminorm{p}$
+%
+% \DescribeMacro{\ord}
+% Order of a distribution |\ord(u)|: $\ord(u)$
+%
+% \DescribeMacro{\conv}
+% Convex hull |\conv(A)|: $\conv(A)$
+%
+% \DescribeMacro{\extreme}
+% Extreme points |\extreme(A)|: $\extreme(A)$
+%
+% \subsubsection{Hilbert Spaces and Operators}
+%
+% \DescribeMacro{\hilbert}
+% Font for Hilbert spaces |\hilbert{H}|: $\hilbert{H}$ \\
+% Uses |hilbertfont|
+%
+% \DescribeMacro{\prehilb}
+% Font for pre-Hilbert spaces |\prehilb{H}|: $\prehilb{H}$ \\
+% Uses |prehilbfont|.
+%
+% \DescribeMacro{\Adjointable}
+% Adjointable operators |\Adjointable(\hilbert{H})|:
+% $\Adjointable(\hilbert{H})$ or with optional argument
+% |\Adjointable[\algebra{A}](\hilbert{H})|: $\Adjointable[\algebra{A}](\hilbert{H})$ if
+% we have a Hilbert module over an algebra $\algebra{A}$ instead.
+%
+% \DescribeMacro{\Finite}
+% Finite rank operators |\Finite(\hilbert{H})|: $\Finite(\hilbert{H})$
+% or with optional argument
+% |\Finite[\algebra{A}](\module{H})|: $\Finite[\algebra{A}](\module{H})$
+%
+% \DescribeMacro{\Compact}
+% Compact operators |\Compact(\hilbert{H})|: $\Compact(\hilbert{H})$
+% or with optional argument
+% |\Compact[\algebra{A}](\module{H})|: $\Compact[\algebra{A}](\module{H})$
+%
+% \DescribeMacro{\opdomain}
+% Domain of definition of an operator |\opdomain(A)|: $\opdomain(A)$ \\
+% Uses |\hilbertfont|.
+%
+% \DescribeMacro{\spec}
+% Spectrum of an operator |\spec(A)|: $\spec(A)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\closure}
+% Closure of an operator |\closure{A}|: $\closure{A}$
+%
+% \DescribeMacro{\res}
+% Resolvent set of an operator |\res(A)|: $\res(A)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Res}
+% Resolvent of an operator |\Res_z(A)|: $\Res_z(A)$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\specrad}
+% Spectral radius of an operator |\specrad(A)|: $\specrad(A)$
+%
+% \DescribeMacro{\slim}
+% Strong limit |\slim_{n \longrightarrow \infty} A_n|: $\slim_{n \longrightarrow \infty} A_n$
+%
+% \DescribeMacro{\wlim}
+% Weak limit |\wlim_{n \longrightarrow \infty} A_n|: $\wlim_{n \longrightarrow \infty} A_n$
+%
+% \subsubsection{Dirac's Bra and Ket Notation}
+%
+% \DescribeMacro{\bra}
+% Dirac bra |\bra{\psi}|: $\bra{\psi}$
+%
+% \DescribeMacro{\ket}
+% Dirac ket |\ket{\phi}|: $\ket{\phi}$
+%
+% \DescribeMacro{\braket}
+% Dirac braket |\braket{\phi}{\psi}|: $\braket{\phi}{\psi}$
+%
+% \DescribeMacro{\ketbra}
+% Dirac ketbra |\ketbra{\phi}{\psi}|: $\ketbra{\phi}{\psi}$
+%
+% \subsubsection{Operator Algebras}
+%
+% \DescribeMacro{\Spec}
+% Spectrum of an algebra |\Spec(\algebra{A})|: $\Spec(\algebra{A})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Rad}
+% Radical of an algebra |\Rad(\algebra{A})|: $\Rad(\algebra{A})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\ind}
+% Fredholm index (|\index| is already used!) |\ind(A)|: $\ind(A)$ \\
+% Uses |operatorfont|.
+%
+% \subsubsection{Measure Theory and Integration}
+%
+% Here we need various function space of integrable functions
+% (calligraphic ones) and the corresponding quotients by zero
+% functions (roman ones):
+%
+% \DescribeMacro{\Measurable}
+% Measurable functions |\Measurable(X)|: $\Measurable(X)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Meas}
+% Complex measures |\Meas(X)|: $\Meas(X)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\BoundMeas}
+% Bounded measurable functions |\BoundMeas(X)|: $\BoundMeas(X)$ \\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\Lp}
+% Equivalence classes of $p$-integrable functions ($p$ is an optional
+% argument) |\Lp(X)|: $\Lp(X)$ and |\Lp[q](X)|: $\Lp[q](X)$
+%
+% \DescribeMacro{\Lone}
+% Equivalence classes of integrable functions |\Lone(X)|: $\Lone(X)$
+%
+% \DescribeMacro{\Ltwo}
+% Equivalence classes of square integrable functions |\Ltwo(X)|: $\Ltwo(X)$
+%
+% \DescribeMacro{\Linfty}
+% Equivalence classes of essentially bounded functions |\Linfty(X)|: $\Linfty(X)$
+%
+% \DescribeMacro{\Intp}
+% Space of $p$-integrable functions |\Intp(X)|:
+% $\Intp(X)$ and with optional argument
+% |\Intp[q](X)|: $\Intp[q](X)$
+%
+% \DescribeMacro{\Intone}
+% Space of integrable functions |\Intone(X)|: $\Intone(X)$
+%
+% \DescribeMacro{\Inttwo}
+% Space of square integrable functions |\Inttwo(X)|: $\Inttwo(X)$
+%
+% \DescribeMacro{\Intinfty}
+% Space of essentially bounded functions |\Intinfty(X)|: $\Intinfty(X)$
+%
+% \DescribeMacro{\essrange}
+% Essential range |\essrange(f)|: $\essrange(f)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\esssup}
+% Essential supremum |\esssup(f)|: $\esssup(f)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\esssupnorm}
+% Essential supremum norm |\esssupnorm{f}|: $\esssupnorm{f}$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\ac}
+% Absolutely continuous part of a measure |\mu_\ac|: $\mu_\ac$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\sing}
+% Singular part of a measure |\mu_\sing|: $\mu_\sing$ \\
+% Uses |scriptfont|.
+%
+% \subsubsection{Limits} \label{sec:Doc_Limits}
+%
+%\DescribeMacro{\indlim}
+% Inductive (or direct) limit |\indlim_{i \in I} A_i|: $\indlim_{i \in I} A_i$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\projlim}
+% Projective (or inverse) limit |\projlim_{i \in I} A_i|: $\projlim_{i \in I} A_i$\\
+% Uses |operatorfont|. \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathCategory.dtx b/macros/latex/contrib/nchairx/source/chairxmathCategory.dtx
new file mode 100644
index 0000000000..cd50ca4b5f
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathCategory.dtx
@@ -0,0 +1,141 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all category theory related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathCategoryDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+% \subsubsection{General Category Theory}
+% General stuff for categories.
+%
+% \begin{macro}{\category}
+% \begin{macrocode}
+\newcommand{\category}[1]{\ch@irxcategoryfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\categoryname}
+% \begin{macrocode}
+\newcommand{\categoryname}[1]{\ch@irxcategorynamefont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\functor}
+% \begin{macrocode}
+\newcommand{\functor}[1]{\ch@irxfunctorfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\groupoid}
+% \begin{macrocode}
+\newcommand{\groupoid}[1]{\ch@irxgroupoidfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\source}
+% \begin{macrocode}
+\newcommand{\source}{\ch@irxoperatorfont{source}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\target}
+% \begin{macrocode}
+\newcommand{\target}{\ch@irxoperatorfont{target}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\unit}
+% \begin{macrocode}
+\newcommand{\unit}{\ch@irxoperatorfont{unit}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\opp}
+% \begin{macrocode}
+\newcommand{\opp}{\ch@irxscriptfont{opp}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\asso}
+% \begin{macrocode}
+\newcommand{\asso}{\ch@irxoperatorfont{asso}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Hom}
+% \begin{macrocode}
+\newcommand{\Hom}{\operatorname{\ch@irxoperatorfont{Hom}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\End}
+% \begin{macrocode}
+\newcommand{\End}{\operatorname{\ch@irxoperatorfont{End}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Aut}
+% \begin{macrocode}
+\newcommand{\Aut}{\operatorname{\ch@irxoperatorfont{Aut}}}
+\WithSuffix\newcommand\Aut*{\decorate[^*]{\textrm{-}\Aut}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Iso}
+% \begin{macrocode}
+\newcommand{\Iso}{\operatorname{\ch@irxoperatorfont{Iso}}}
+\WithSuffix\newcommand\Iso*{\decorate[^*]{\textrm{-}\Iso}{}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Obj}
+% \begin{macrocode}
+\newcommand{\Obj}{\operatorname{\ch@irxoperatorfont{Obj}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Morph}
+% \begin{macrocode}
+\newcommand{\Morph}{\operatorname{\ch@irxoperatorfont{Morph}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \subsubsection{Colimits}
+%
+%\begin{macro}{\colim}
+% \begin{macrocode}
+\newcommand{\colim}{\operatorname*{{colim}}}
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathCategoryDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathCategoryDoc.dtx
new file mode 100644
index 0000000000..56ca84d183
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathCategoryDoc.dtx
@@ -0,0 +1,97 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all category theory related macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathCategory.dtx
+%\fi
+%
+%
+% \subsubsection{General Category Theory}
+%
+% \DescribeMacro{\category}
+% Font for generic categories |\category{C}|: $\category{C}$ \\
+% Uses |categoryfont|.
+%
+% \DescribeMacro{\categoryname}
+% Font for specific categories |\categoryname{FinSet}|: $\categoryname{FinSet}$ \\
+% Uses |categorynamefont|.
+%
+% \DescribeMacro{\functor}
+% Font for functors |\functor{F}|: $\functor{F}$ \\
+% Uses |functorfont|.
+%
+% \DescribeMacro{\groupoid}
+% Font for groupoids |\groupoid{G}|: $\groupoid{G}$ \\
+% Uses |groupoidfont|.
+%
+% \DescribeMacro{\source}
+% Source of arrow |\source(f)|: $\source(f)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\target}
+% Target of arrow |\target(f)|: $\target(f)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\unit}
+% Unit map in groupoids |\unit\colon M \longrightarrow G|:
+% $\unit\colon M \longrightarrow G$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\opp}
+% Opposite category etc. |\category{C}^\opp|: $\category{C}^\opp$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\asso}
+% Natural transformation of associativity |\asso|: $\asso$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Hom}
+% Homomorphisms |\Hom(A, B)|: $\Hom(A, B)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\End}
+% Endomorphisms |\End(E)|: $\End(E)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Aut}
+% ($*$-)Automorphisms |\Aut(A)|: $\Aut(A)$ \\
+% |\Aut*(A)|: $\Aut*(A)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Iso}
+% ($*$-)Isomorphisms |\Iso(A, B)|: $\Iso(A, B)$ \\
+% |\Iso*(A, B)|: $\Iso*(A, B)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Obj}
+% Objects of a category |\Obj(\category{C})|: $\Obj(\category{C})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Morph}
+% Morphisms of a category |\Morph(a, b)|: $\Morph(a, b)$ \\
+% Uses |operatorfont|.
+%
+% \subsubsection{Colimits}
+%
+%\DescribeMacro{\colim}
+% Colimits of diagrams or functors: |\colim \functor{F}|: $\colim \functor{F}$
diff --git a/macros/latex/contrib/nchairx/source/chairxmathDecoration.dtx b/macros/latex/contrib/nchairx/source/chairxmathDecoration.dtx
new file mode 100644
index 0000000000..c5602717c4
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathDecoration.dtx
@@ -0,0 +1,68 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all category theory related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathGeneralDoc.dtx
+% \fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+% \subsubsection{Decoration}
+%
+% \begin{macro}{\decorate}
+% We use the tensor package of Philip G. Ratcliffe 2004/12/20 v2.1
+% tensor indices package (PGR) but overwrite the |\tensor| command
+% as this collides with our own version. Instead we provide the
+% |\decorate| macro which is identical to |\tensor| of the tensor
+% package.
+%
+% \begin{macrocode}
+\let\originaltensor\tensor
+\DeclareRobustCommand\decorate{\originaltensor}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\deco}
+% This is a simplified version of |\decorate| allowing only five positions to be filled.
+% \begin{macrocode}
+\newcommand{\deco}[5]{\decorate*[^{#1}_{#2}]{#3}{^{#4}_{#5}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\script}
+% Macro to access the |scriptfont|.
+% \begin{macrocode}
+\newcommand{\script}[1]{\ch@irxscriptfont{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathDecorationDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathDecorationDoc.dtx
new file mode 100644
index 0000000000..ebe57e1082
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathDecorationDoc.dtx
@@ -0,0 +1,60 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all general mathematics macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathGeneral.dtx
+%\fi
+%
+%
+% We use the |tensor| package and modify things slightly to fit our
+% needs: we provide a decoration command that allows to decorate
+% arbitrary math symbols from left and right, top and bottom with
+% other math symbols. This can be used to produce tensors with many
+% indices. However, this is far too useful to be restricted to tensors
+% only. The original |\tensor| macro from the |tensor package| is
+% still available under the name |\originaltensor|. Note, that the
+% |\tensor| command in |nchairx| is intended for the symbol of tensor
+% product, and not for decorating a symbol with indices.
+%
+% \DescribeMacro{\decorate}
+% Decorate a symbol from all sides. The option argument gives the
+% decoration in front of the symbol, the first argument the symbol,
+% the second (mandatory) argument the decoration after the symbol. For
+% each decoration several superscripts and subscripts can be used like
+% |\decorate[^a_b^c]{S}{_d^{rt}_e}|:
+% $\decorate[^a_b^c]{S}{_d^{rt}_e}$.
+%
+% \DescribeMacro{\deco}
+% We also provide a simpler version of |\decorate| called |\deco|
+% which takes five usual arguments and sets them as sub- and
+% superscripts before and after the middle symbol
+% |\deco{a}{b}{c}{d}{e}|:$\deco{a}{b}{c}{d}{e}$ This can be used to
+% define your own macros with decoration. E.g. for bimodules over
+% rings one could define
+% |\newcommand{\bimodule}[3]{\deco{}{\ring{#1}{\module{#2}}{}{\ring{#3}}}}|
+% which can then be used as |\bimodule{R}{E}{S}|:
+% $\deco{}{\ring{R}}{\module{E}}{}{\ring{S}}$.
+%
+% \DescribeMacro{\script}
+% Sets the argument in the |scriptfont| and hence allows to create macros
+% with fonts consistent with the other |nchairx| macros. \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathDelimiters.dtx b/macros/latex/contrib/nchairx/source/chairxmathDelimiters.dtx
new file mode 100644
index 0000000000..f707d6c74d
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathDelimiters.dtx
@@ -0,0 +1,73 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all category theory related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathDelimitersDoc.dtx
+% \fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+% \subsubsection{The New Delimiters} \label{sec:NewDelimiters}
+%
+% \begin{macro}{\vast}
+% \begin{macro}{\Vast}
+% \begin{macro}{\vastl}
+% \begin{macro}{\vastm}
+% \begin{macro}{\vastr}
+% \begin{macro}{\Vastl}
+% \begin{macro}{\Vastm}
+% \begin{macro}{\Vastr}
+%
+% Bigger than |\Bigg| commands for explicit re-sizing brackets and things
+% needs left/right version to work with |\DeclarePairedDelimiters|.
+% Hack from http://tex.stackexchange.com/questions/262061
+%
+% \begin{macrocode}
+\newcommand{\vast}{\bBigg@{4}}
+\newcommand{\Vast}{\bBigg@{5}}
+\newcommand{\vastl}{\mathopen\vast}
+\newcommand{\vastm}{\mathrel\vast}
+\newcommand{\vastr}{\mathclose\vast}
+\newcommand{\Vastl}{\mathopen\Vast}
+\newcommand{\Vastm}{\mathrel\Vast}
+\newcommand{\Vastr}{\mathclose\Vast}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathDelimitersDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathDelimitersDoc.dtx
new file mode 100644
index 0000000000..86b65d79e3
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathDelimitersDoc.dtx
@@ -0,0 +1,101 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of new delimiters.
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathDelimitersDoc.dtx
+%\fi
+%
+%
+% We use |\DeclarePairedDelimiters| to generate all kind of bracket
+% expressions of variable size as used e.g. in differential
+% geometry. This has the big advantage that one has two options to set
+% the size of the brackets: either with an explicit optional argument
+% |\big|, \ldots, |\Bigg|, |\vast|, or |\Vast| like
+% \begin{quote}
+% |\Schouten[\vast]{X, Y}|: $\Schouten[\vast]{X, Y}$
+% \end{quote}
+% or you can use the *-version which produces automatic sizes via
+% |\left| and |\right|.
+% \begin{quote}
+% |\abs*{\lim\limits_{n\to\infty} b_n}|
+% yields
+% $\abs*{\lim\limits_{n\to\infty} b_n}$
+% \end{quote}
+% Note, however, that this will typically result in sub-optimal
+% spacing. Also, the brackets turn out to be typically too large.
+%
+%
+% Note that using the bracket constructions with
+% |\DeclarePairedDelimiters| gives typically much better spacing than
+% doing things by hand:
+% \DeleteShortVerb{\|}
+% \begin{quote}
+% good \verb|\abs{\det(A)}|:
+% $\abs{\det(A)}$
+% \qquad
+% bad \verb+|\det(A)|+:
+% $|\det(A)|$
+% \end{quote}
+% \MakeShortVerb{\|}
+%
+%
+% \DescribeMacro{\vast}
+% \DescribeMacro{\Vast}
+% \DescribeMacro{\vastl}
+% \DescribeMacro{\vastm}
+% \DescribeMacro{\vastr}
+% \DescribeMacro{\Vastl}
+% \DescribeMacro{\Vastm}
+% \DescribeMacro{\Vastr}
+% In many formulas one needs large delimiters typically ranging from
+% |\big| to |\Bigg|. However, in very large formula constructions even
+% that is not enough. To have a systematic enlargement the following
+% delimiters sizes are introduced: |\vast| and |\Vast| together with
+% the corresponding helper macros |\vastl|, |\vastr|, |\vastm|,
+% |\Vastl|, |\Vastr|, and |\Vastm| needed to define pairs of
+% delimiters. They allow to produce large (pairs of) delimiters,
+% always provided that the corresponding font has the symbols in the
+% correct size.
+%
+%
+% The following commands allow for an option size argument:
+% \begin{itemize}
+% \item Absolute value |\abs|
+% \item Generic norm |\norm|
+% \item Supremum norm |\supnorm|
+% \item Essential supremum norm |\essupnorm|
+% \item Dirac ket |\ket|
+% \item Dirac bra |\bra|
+% \item Dirac ketbra |\ketbra|
+% \item Dirac braket |\braket|
+% \item Schouten bracket |\Schouten|
+% \item Nijenhuis-Richardson bracket |\NRbracket|
+% \item Frölicher-Nijenhuis bracket |\FNbracket|
+% \item Courant bracket |\Courant|
+% \item Dorfman bracket |\Dorfman|
+% \item Generic scalar product |\SP|
+% \item Generic inner product with decorations |\IP|
+% \item Restriction of a map |\at|
+% \item Étalé space of a presheaf |\etale|
+% \end{itemize}
+% \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathDiffgeo.dtx b/macros/latex/contrib/nchairx/source/chairxmathDiffgeo.dtx
new file mode 100644
index 0000000000..1acce1e09f
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathDiffgeo.dtx
@@ -0,0 +1,574 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all differential geometry related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathDiffgeoDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+% \subsubsection{General Differential Geometry} \label{sec:GeneralMacrosDiffGeo}
+%
+%\begin{macro}{\Lie}
+% \begin{macrocode}
+\newcommand{\Lie}{\mathscr{L}}
+% \end{macrocode}
+%\end{macro}
+%
+% A generic bracket as paired delimiter, used in several other macros
+%
+%\begin{macro}{\ch@irxbbracket}
+% \begin{macrocode}
+\DeclarePairedDelimiter{\ch@irxbracket}{[}{]}
+% \end{macrocode}
+% \end{macro}
+%
+% A generic double bracket as paired delimiter, used in several other macros
+%
+%\begin{macro}{\ch@irxbbracket}
+% \begin{macrocode}
+\DeclareMathDelimiter\ch@irxllbbracket{\mathopen}{stmry}{"4A}{stmry}{"71}
+\DeclareMathDelimiter\ch@irxrrbbracket{\mathclose}{stmry}{"4B}{stmry}{"79}
+\DeclarePairedDelimiter{\ch@irxbbracket}{\ch@irxllbbracket}{\ch@irxrrbbracket}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Schouten}
+% \begin{macrocode}
+\newcommand{\@schoutenstar}[1]{\ch@irxbbracket*{#1}_{\scriptscriptstyle\ch@irxscriptfont{S}}}
+\newcommand{\@schoutennostar}[2][]{\ch@irxbbracket[#1]{#2}_{\scriptscriptstyle\ch@irxscriptfont{S}}}
+\newcommand{\Schouten}{\@ifstar\@schoutenstar\@schoutennostar}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Forms}
+% \begin{macrocode}
+\newcommand{\Forms}{\Omega}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ZdR}
+% \begin{macrocode}
+\newcommand{\ZdR}{\ch@irxoperatorfont{Z}_{\scriptscriptstyle\mathrm{dR}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\BdR}
+% \begin{macrocode}
+\newcommand{\BdR}{\ch@irxoperatorfont{B}_{\scriptscriptstyle\ch@irxscriptfont{dR}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\HdR}
+% \begin{macrocode}
+\newcommand{\HdR}{\ch@irxoperatorfont{H}_{\scriptscriptstyle\ch@irxscriptfont{dR}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Diffeo}
+% \begin{macrocode}
+\newcommand{\Diffeo}{\operatorname{\ch@irxoperatorfont{Diffeo}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Diffop}
+% \begin{macrocode}
+\newcommand{\Diffop}{\operatorname{\ch@irxoperatorfont{DiffOp}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\loc}
+% \begin{macrocode}
+\newcommand{\loc}{\ch@irxscriptfont{loc}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\germ}
+% \begin{macrocode}
+\newcommand{\germ}{\operatorname{\ch@irxoperatorfont{germ}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\prol}
+% \begin{macrocode}
+\newcommand{\prol}{\ch@irxoperatorfont{prol}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\NRbracket}
+% \begin{macrocode}
+\newcommand{\@nrbracketstar}[1]{\ch@irxbracket*{#1}_{\scriptscriptstyle\ch@irxscriptfont{NR}}}
+\newcommand{\@nrbracketnostar}[2][]{\ch@irxbracket[#1]{#2}_{\scriptscriptstyle\ch@irxscriptfont{NR}}}
+\newcommand{\NRbracket}{\@ifstar\@nrbracketstar\@nrbracketnostar}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\FNbracket}
+% \begin{macrocode}
+\newcommand{\@fnbracketstar}[1]{\ch@irxbracket*{#1}_{\scriptscriptstyle\ch@irxscriptfont{FN}}}
+\newcommand{\@fnbracketnostar}[2][]{\ch@irxbracket[#1]{#2}_{\scriptscriptstyle\ch@irxscriptfont{FN}}}
+\newcommand{\FNbracket}{\@ifstar\@fnbracketstar\@fnbracketnostar}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\Manifold}
+% \begin{macrocode}
+\newcommand{\Manifolds}{\categoryname{\categoryname{Manifold}}}
+% \end{macrocode}
+% \end{macro}
+%
+%\subsubsection{Lie Groups and Principal Fiber Bundles}
+%
+%\begin{macro}{\lefttriv}
+% \begin{macrocode}
+\newcommand{\lefttriv}{\ch@irxoperatorfont{left}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\righttriv}
+% \begin{macrocode}
+\newcommand{\righttriv}{\ch@irxoperatorfont{right}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Gau}
+% \begin{macrocode}
+\newcommand{\Gau}{\operatorname{\ch@irxoperatorfont{Gau}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Conn}
+% \begin{macrocode}
+\newcommand{\Conn}{\operatorname{\ch@irxoperatorfont{Conn}}}
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\ratio}
+% \begin{macrocode}
+\newcommand{\ratio}{\ch@irxoperatorfont{r}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Parallel}
+% \begin{macrocode}
+\newcommand{\Parallel}{\operatorname{\ch@irxoperatorfont{P}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\CE}
+% \begin{macrocode}
+\newcommand{\CE}{{\scriptscriptstyle{\ch@irxscriptfont{CE}}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\HCE}
+% \begin{macrocode}
+\newcommand{\HCE}{\ch@irxoperatorfont{H}_\CE}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fund}
+% \begin{macrocode}
+\newcommand{\fund}{\ch@irxoperatorfont{fund}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Universal}
+% \begin{macrocode}
+\newcommand{\Universal}{\operatorname{\ch@irxoperatorfont{U}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\BCH}
+% \begin{macrocode}
+\newcommand{\BCH}{\ch@irxscriptfont{\scriptscriptstyle{BCH}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LieGroups}
+% \begin{macrocode}
+\newcommand{\LieGroups}{\categoryname{\categoryname{LieGroup}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Principal}
+% \begin{macrocode}
+\newcommand{\Principal}{\categoryname{\categoryname{Principal}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\GPrincipal}
+% \begin{macrocode}
+\newcommand{\GPrincipal}[1][G]{#1\categoryname{\textrm{-}\categoryname{Principal}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Fiber}
+% \begin{macrocode}
+\newcommand{\Fiber}{\categoryname{Fiber}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FFiber}
+% \begin{macrocode}
+\newcommand{\FFiber}[1][F]{#1\categoryname{\textrm{-}\categoryname{Fiber}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Pin}
+% \begin{macrocode}
+\newcommand{\Pin}{\group{Pin}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Spin}
+% \begin{macrocode}
+\newcommand{\Spin}{\group{Spin}}
+% \end{macrocode}
+% \end{macro}
+
+%
+%\subsubsection{(Pseudo) Riemannian Geometry }
+%
+%\begin{macro}{\nablaLC}
+% \begin{macrocode}
+\newcommand{\nablaLC}{\nabla^{\scriptscriptstyle\ch@irxscriptfont{LC}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Laplace}
+% \begin{macrocode}
+\newcommand{\Laplace}{\Delta}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dAlembert}
+% \begin{macrocode}
+\DeclareMathSymbol\dAlembert{\mathord}{AMSa}{"03}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\feynman}
+% \begin{macrocode}
+\newcommand{\feynman}[1]{\ooalign{$#1$\cr\hidewidth$\raise0.19ex\hbox{/}$\hidewidth\cr}}
+% \end{macrocode}
+%\end{macro}
+
+%\begin{macro}{\Dirac}
+% \begin{macrocode}
+\newcommand{\Dirac}{\feynman{D}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rotation}
+% \begin{macrocode}
+\newcommand{\rotation}{\operatorname{\ch@irxoperatorfont{rot}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\curl}
+% \begin{macrocode}
+\newcommand{\curl}{\operatorname{\ch@irxoperatorfont{curl}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\divergence}
+% \begin{macrocode}
+\newcommand{\divergence}{\operatorname{\ch@irxoperatorfont{div}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\gradient}
+% \begin{macrocode}
+\newcommand{\gradient}{\operatorname{\ch@irxoperatorfont{grad}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Tor}
+% \begin{macrocode}
+\newcommand{\Tor}{\operatorname{\ch@irxoperatorfont{Tor}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Ric}
+% \begin{macrocode}
+\newcommand{\Ric}{\operatorname{\ch@irxoperatorfont{Ric}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\scal}
+% \begin{macrocode}
+\newcommand{\scal}{\operatorname{\ch@irxoperatorfont{scal}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Riem}
+% \begin{macrocode}
+\newcommand{\Riem}{\operatorname{\ch@irxoperatorfont{Riem}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Hessian}
+% \begin{macrocode}
+\newcommand{\Hessian}{\ch@irxoperatorfont{Hessian}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\hodge}
+% \begin{macrocode}
+\newcommand{\hodge}{\operatorname{\star}}
+% \end{macrocode}
+%\end{macro}
+%
+%\subsubsection{Complex Geometry}
+%
+%\begin{macro}{\Nijenhuis}
+% \begin{macrocode}
+\newcommand{\Nijenhuis}{\operatorname{\ch@irxoperatorfont{Nij}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\del}
+% \begin{macrocode}
+\newcommand{\del}{\mathop{}\!\partial}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\delbar}
+% \begin{macrocode}
+\newcommand{\delbar}{\mathop{}\!\cc{\partial}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\FS}
+% \begin{macrocode}
+\newcommand{\FS}{{\scriptscriptstyle{\ch@irxscriptfont{FS}}}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Vector Bundles}
+%
+% \begin{macro}{\Lift}
+% \begin{macrocode}
+\newcommand{\Lift}{{\scriptscriptstyle{\ch@irxscriptfont{Lift}}}}
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\ver}
+% \begin{macrocode}
+\newcommand{\ver}{\ch@irxscriptfont{ver}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\hor}
+% \begin{macrocode}
+\newcommand{\hor}{\ch@irxscriptfont{hor}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Ver}
+% \begin{macrocode}
+\newcommand{\Ver}{\operatorname{\ch@irxoperatorfont{Ver}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Hor}
+% \begin{macrocode}
+\newcommand{\Hor}{\operatorname{\ch@irxoperatorfont{Hor}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Sec}
+% \begin{macrocode}
+\newcommand{\Sec}[1][k]{\Gamma^{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Secinfty}
+% \begin{macrocode}
+\newcommand{\Secinfty}{\Sec[\infty]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\HolSec}
+% \begin{macrocode}
+\newcommand{\HolSec}{\Sec[]_{\ch@irxscriptfont{hol}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SymD}
+% \begin{macrocode}
+\newcommand{\SymD}{\mathop{}\!\ch@irxoperatorfont{D}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Densities}
+% \begin{macrocode}
+\newcommand{\Densities}[1][n]{\abs{\Lambda^{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\MeasurableSections}
+% \begin{macrocode}
+\newcommand{\MeasurableSections}{\ch@irxspacefont{M}\Sec[]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\IntpSections}
+% \begin{macrocode}
+\newcommand{\IntpSections}[1][p]{\Intp[#1]\Sec[]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\IntegrableSections}
+% \begin{macrocode}
+\newcommand{\IntegrableSections}{\IntpSections[1]}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Translation}
+% \begin{macrocode}
+\newcommand{\Translation}{\ch@irxoperatorfont{T}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\frames}
+% \begin{macrocode}
+\newcommand{\frames}[1]{\ch@irxoperatorfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Frames}
+% \begin{macrocode}
+\newcommand{\Frames}{\operatorname{\ch@irxoperatorfont{Frames}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\FDiff}
+% \begin{macrocode}
+\newcommand{\FDiff}{\ch@irxoperatorfont{F}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Symplectic and Poisson Geometry}
+%
+%\begin{macro}{\Sympl}
+% \begin{macrocode}
+\newcommand{\Sympl}{\operatorname{\ch@irxgroupfont{Sympl}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Jacobiator}
+% \begin{macrocode}
+\newcommand{\Jacobiator}[1][\pi]{\operatorname{\ch@irxoperatorfont{Jac}}_{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\red}
+% \begin{macrocode}
+\newcommand{\red}{\ch@irxscriptfont{red}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Hess}
+% \begin{macrocode}
+\newcommand{\Hess}{\ch@irxoperatorfont{Hess}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\KKS}
+% \begin{macrocode}
+\newcommand{\KKS}{{\scriptscriptstyle\ch@irxscriptfont{KKS}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Courant}
+% \begin{macrocode}
+\newcommand{\@courantstar}[1]{\ch@irxbbracket*{#1}_{\scriptscriptstyle\ch@irxscriptfont{C}}}
+\newcommand{\@courantnostar}[2][]{\ch@irxbbracket[#1]{#2}_{\scriptscriptstyle\ch@irxscriptfont{C}}}
+\newcommand{\Courant}{\@ifstar\@courantstar\@courantnostar}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Dorfman}
+% \begin{macrocode}
+\newcommand{\@dorfmanstar}[1]{\ch@irxbbracket*{#1}_{\scriptscriptstyle\ch@irxscriptfont{D}}}
+\newcommand{\@dorfmannostar}[2][]{\ch@irxbbracket[#1]{#2}_{\scriptscriptstyle\ch@irxscriptfont{D}}}
+\newcommand{\Dorfman}{\@ifstar\@dorfmanstar\@dorfmannostar}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Dir}
+% \begin{macrocode}
+\newcommand{\Dir}{\operatorname{\ch@irxoperatorfont{Dir}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Forward}
+% \begin{macrocode}
+\newcommand{\Forward}{\mathcal{F}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Backward}
+% \begin{macrocode}
+\newcommand{\Backward}{\mathcal{B}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Tangent}
+% \begin{macrocode}
+\newcommand{\Tangent}{\mathbb{T}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\MWreduction}
+% \begin{macrocode}
+\newcommand{\MWreduction}{\big/\!\!\big/}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Mon}
+% \begin{macrocode}
+\newcommand{\Mon}{\ch@irxoperatorfont{Mon}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Hol}
+% \begin{macrocode}
+\newcommand{\Hol}{\ch@irxoperatorfont{Hol}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathDiffgeoDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathDiffgeoDoc.dtx
new file mode 100644
index 0000000000..922f1acaca
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathDiffgeoDoc.dtx
@@ -0,0 +1,362 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all differential geometry related macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathDiffgeo.dtx
+%\fi
+%
+%\subsubsection{General Macros in Differential Geometry} \label{sec:Doc_GeneralMacrosDiffGeo}
+%
+% \DescribeMacro{\Lie}
+% Lie derivative |\Lie_X f|: $\Lie_X f$
+%
+% \DescribeMacro{\Schouten}
+% Schouten bracket |\Schouten{X,Y}|: $\Schouten{X, Y}$.
+%
+% \DescribeMacro{\Forms}
+% Differential forms |\Forms(M)|: $\Forms(M)$
+%
+% \DescribeMacro{\ZdR}
+% DeRham cocycles |\ZdR(M, \mathbb{C})|: $\ZdR(M, \mathbb{C})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\BdR}
+% DeRham coboundaries |\BdR(M, \mathbb{C})|: $\BdR(M, \mathbb{C})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\HdR}
+% DeRham cohomology |\HdR(M, \mathbb{C})|: $\HdR(M, \mathbb{C})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Diffeo}
+% Diffeomorphism group |\Diffeo(M)|: $\Diffeo(M)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Diffop}
+% Differential operators |\Diffop(M)|: $\Diffop(M)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\loc}
+% To be used as an index |M_\loc|: $M_\loc$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\germ}
+% Germs of functions |\germ_p(f)|: $\germ_p(f)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\prol}
+% Prolongation map |\prol(f)|: $\prol(f)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\NRbracket}
+% Nijenhuis-Richardson bracket |\NRbracket{a, b}|: $\NRbracket{a, b}$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\FNbracket}
+% Fröhlicher-Nijenhuis bracket |\FNbracket{a, b}|: $\FNbracket{a, b}$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\Manifolds}
+% The category of manifolds |\Manifolds|: $\Manifolds$ \\
+% Uses |categorynamefont|
+%
+%\subsubsection{Lie Groups and Principal Fiber Bundles}
+%
+% \DescribeMacro{\lefttriv}
+% Left trivialization |\lefttriv|: $\lefttriv$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\righttriv}
+% Right trivialization |\righttriv|: $\righttriv$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Gau}
+% Gauge group |\Gau(P)|: $\Gau(P)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Conn}
+% Connection one-forms |\Conn(P)|: $\Conn(P)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\ratio}
+% Ratio map of principal fiber bundle |\ratio(u, v)|: $\ratio(u, v)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Parallel}
+% Parallel transport |\Parallel_{0 \to 1, \gamma}(v)|: $\Parallel_{0 \to 1, \gamma}(v)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\CE}
+% Chevalley-Eilenberg as index |C_\CE|: $C_\CE$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\HCE}
+% Chevalley-Eilenberg cohomology |\HCE(\liealg{g})|: $\HCE(\liealg{g})$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\fund}
+% Trivialization by fundamental vector fields |\fund|: $\fund$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Universal}
+% Universal enveloping algebra |\Universal{\liealg{g}}|: $\Universal(\liealg{g})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\BCH}
+% BCH as small index |\sigma_\BCH|: $\sigma_\BCH$\\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\LieGroups}
+% The category of Lie groups |\LieGroups|: $\LieGroups$ \\
+% Uses |categorynamefont|.
+%
+% \DescribeMacro{\Principal}
+% The category of principal bundles |\Principal|: $\Principal$ \\
+% Uses |categorynamefont|.
+%
+% \DescribeMacro{\GPrincipal}
+% The category of $G$-principal bundles |\GPrincipal|: $\GPrincipal$ \\
+% or with optional structure group |\GPrincipal[H]|: $\GPrincipal[H]$ \\
+% Uses |categorynamefont|.
+%
+% \DescribeMacro{\Fiber}
+% The category of fiber bundles |\Fiber|: $\Fiber$
+% Uses |categorynamefont|.
+%
+% \DescribeMacro{\FFiber}
+% The category of fiber bundles with typical fiber |\FFiber|:
+% $\FFiber$ \\
+% or with specified typical fiber |\FFiber[X]|: $\FFiber[X]$ \\
+% Uses |categorynamefont|.
+%
+% \DescribeMacro{\Pin}
+% The pin group |\Pin(q, p)|: $\Pin(p, q)$ \\
+% Uses |groupfont|.
+%
+% \DescribeMacro{\Spin}
+% The spin group |\Spin(q, p)|: $\Spin(p, q)$ \\
+% Uses |groupfont|.
+%
+%\subsubsection{(Pseudo-) Riemannian Geometry}
+%
+% \DescribeMacro{\nablaLC}
+% Levi-Civita covariant derivative |\nablaLC_X Y|: $\nablaLC_X Y$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\Laplace}
+% Laplace operator |\Laplace f|: $\Laplace f$
+%
+% \DescribeMacro{\dAlembert}
+% D'Alembert operator |\dAlembert u|: $\dAlembert u$
+%
+% \DescribeMacro{\feynman}
+% Feynman slash notation |\feynman{D} = \feynman{A} + \feynman{\partial}|:
+% $\feynman{D} = \feynman{A} + \feynman{\partial}$
+%
+% \DescribeMacro{\Dirac}
+% Dirac operator |\Dirac u|: $\Dirac u$
+%
+% \DescribeMacro{\rotation}
+% Rotation (i.e. curl) of a vector field |\rotation(X)|: $\rotation(X)$. Not to be confused with $\textrm{grün}(X)$. \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\curl}
+% Curl of a vector field |\curl \vec{X}|: $\curl \vec{X}$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\divergence}
+% Divergence of a vector field |\divergence(X)|: $\divergence(X)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\gradient}
+% Gradient of a function |\gradient f|: $\gradient f$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Tor}
+% Torsion of a covariant derivative |\Tor (X, Y)|: $\Tor (X, Y)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Ric}
+% Ricci curvature |\Ric (X, Y)|: $\Ric (X, Y)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\scal}
+% Scalar curvature |\scal|: $\scal$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Riem}
+% The set of Riemannian metrics (linear and on manifolds) |\Riem(M)|: $\Riem(M)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Hessian}
+% Hessian of a function |\Hessian(f) \in \Secinfty(\Sym^2T^*M)|: $\Hessian(f) \in \Secinfty(\Sym^2T^*M)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\hodge}
+% Hodge star operator |\alpha \mapsto \hodge\alpha|: $\alpha \mapsto \hodge\alpha$
+%
+%\subsubsection{Complex Geometry}
+%
+% \DescribeMacro{\Nijenhuis}
+% Nijenhuis operator |\Nijenhuis(X, Y)|: $\Nijenhuis(X, Y)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\del}
+% Dolbeault operator |\del \omega|: $\del \omega$
+%
+% \DescribeMacro{\delbar}
+% CC of Dolbeault operator |\delbar\alpha|: $\delbar\alpha$
+%
+% \DescribeMacro{\FS}
+% Fubini Study as very small index |\omega_\FS|: $\omega_\FS$ \\
+% Uses |scriptfont|.
+%
+%\subsubsection{Vector Bundles}
+%
+% \DescribeMacro{\Lift}
+% Generic lift of something |\nabla^\Lift|: $\nabla^\Lift$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\ver}
+% Vertical lift |X^\ver|: $X^\ver$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\hor}
+% Horizontal lift |X^\hor|: $X^\hor$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\Ver}
+% Vertical subbundle |\Ver(E)|: $\Ver(E)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Hor}
+% Horizontal subbundle |\Hor(E)|: $\Hor(E)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Sec}
+% $C^k$-sections |\Sec(E)|: $\Sec(E)$ and |\Sec[2](E)|: $\Sec[2](E)$
+%
+% \DescribeMacro{\Secinfty}
+% Smooth sections |\Secinfty(E)|: $\Secinfty(E)$
+%
+% \DescribeMacro{\HolSec}
+% Holomorphic sections |\HolSec(U, E)|: $\HolSec(U, E)$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\SymD}
+% Symmetrized covariant derivative |\SymD^n f|: $\SymD^n f$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Densities}
+% Densities of a vector bundle of rank $n$ or specific rank |\Densities TM|: $\Densities TM$
+% and |\Densities[k]^\alpha E|: $\Densities[k]^\alpha E$.
+%
+% \DescribeMacro{\MeasurableSections}
+% Measurable sections |\MeasurableSections(E)|: $\MeasurableSections(E)$ \\
+% Uses |spacefont|.
+%
+% \DescribeMacro{\IntpSections}
+% $p$-Integrable Sections |\IntpSections(\Densities T^*M)|: $\IntpSections(\Densities T^*M)$
+% or with optional argument |\IntpSections[q](\Densities T^*M)|: $\IntpSections[q](\Densities T^*M)$.
+%
+% \DescribeMacro{\IntegrableSections}
+% Integrable sections |\IntegrableSections(\Densities T^*M)|: $\IntegrableSections(\Densities T^*M)$
+%
+% \DescribeMacro{\Translation}
+% Fiber translations |\Translation_A|: $\Translation_A$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\frames}
+% Font for local frames |\frames{e}_1, \ldots, \frames{e}_k|: $\frames{e}_1, \ldots, \frames{e}_k$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Frames}
+% Frame bundle of a vector bundle |\Frames(E) \longrightarrow M|:\\
+% $\Frames(E) \longrightarrow M$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\FDiff}
+% Fiber derivative |\FDiff L|: $\FDiff L$ \\
+% Uses |operatorfont|.
+%
+%\subsubsection{Symplectic and Poisson Geometry}
+%
+% \DescribeMacro{\Sympl}
+% Symplectomorphism group |\Sympl(M, \omega)|: $\Sympl(M, \omega)$ \\
+% Uses |groupfont|.
+%
+% \DescribeMacro{\Jacobiator}
+% Jacobiator |\Jacobiator|: $\Jacobiator$
+% and |\Jacobiator[\nu]|: $\Jacobiator[\nu]$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\red}
+% Reduced as an index |M_\red|: $M_\red$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\Hess}
+% Hess map |\Hess|: $\Hess(\nabla)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\KKS}
+% KKS as tiny index |\{f, g\}_\KKS|: $\{f, g\}_\KKS$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\Courant}
+% Courant bracket |\Courant{a, b}|: $\Courant{a, b}$ \\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\Dorfman}
+% Dorfman bracket |\Dorfman{(x, \xi), (y, \eta)}|:
+% $\Dorfman{(x, \xi), (y, \eta)}$ \\
+% Uses |scriptfont|
+%
+% \DescribeMacro{\Dir}
+% (Linear) Dirac structures |\Dir(V)|: $\Dir(V)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Forward}
+% Forward map |\Forward(\phi)|: $\Forward(\phi)$
+%
+% \DescribeMacro{\Backward}
+% Backward map |\Backward(\phi)|: $\Backward(\phi)$
+%
+% \DescribeMacro{\Tangent}
+% Generalized tangent bundle/map |\Tangent M|: $\Tangent M$
+%
+% \DescribeMacro{\MWreduction}
+% Marsden-Weinstein reduction |M \MWreduction G|: $M \MWreduction G$
+%
+% \DescribeMacro{\Mon}
+% Monodromy groupoid |\Mon(M)|: $\Mon(M)$ \\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\Hol}
+% Holonomy groupoid |\Hol(M)|: $\Hol(M)$ \\
+% Uses |operatorfont|.
+%
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: "nchairx"
+% End:
diff --git a/macros/latex/contrib/nchairx/source/chairxmathFonts.dtx b/macros/latex/contrib/nchairx/source/chairxmathFonts.dtx
new file mode 100644
index 0000000000..64b4dafd10
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathFonts.dtx
@@ -0,0 +1,288 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all algebra related macros.
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathFontsDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+%
+% We provide several font names for easier usage and
+% customization. The fonts are used in our macro definitions and can
+% be changed by according to the individual needs.
+%
+%
+%
+% \subsubsection{Default Values for some Math Fonts}
+%
+%
+% \begin{macro}{\mathbb}
+%
+% Redefine |\mathbb| to use the nicer |\mathbbm|.
+%
+% \begin{macrocode}
+\DeclareMathAlphabet{\ch@airxmathbbm}{U}{bbm}{m}{n}
+\SetMathAlphabet\ch@airxmathbbm{bold}{U}{bbm}{bx}{n}
+\renewcommand{\mathbb}[1]{\ch@airxmathbbm{#1}}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\mathscr}
+%
+% We load a script font and provide the command |\mathscr|
+%
+% \begin{macrocode}
+\DeclareMathAlphabet{\mathscr}{U}{rsfso}{m}{n}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\mathcal}
+%
+% We redefine the |\mathcal| command using the Euler font.
+%
+% \begin{macrocode}
+\DeclareSymbolFont{EulerScript}{U}{eus}{m}{n}
+\SetSymbolFont{EulerScript}{bold}{U}{eus}{b}{n}
+\DeclareSymbolFontAlphabet\mathcal{EulerScript}
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+% \subsubsection{Setting Fonts for Various Math Groups}
+%
+% Definitions of fonts for the different groups.
+%
+% \begin{macro}{\ch@irxalgebrafont}
+% \begin{macro}{\ch@irxbasisfont}
+% \begin{macro}{\ch@irxcategoryfont}
+% \begin{macro}{\ch@irxcategorynamefont}
+% \begin{macro}{\ch@irxfieldfont}
+% \begin{macro}{\ch@irxfilterfont}
+% \begin{macro}{\ch@irxfunctorfont}
+% \begin{macro}{\ch@irxgerstenhaberfont}
+% \begin{macro}{\ch@irxgroupfont}
+% \begin{macro}{\ch@irxgroupoidfont}
+% \begin{macro}{\ch@irxhilbertfont}
+% \begin{macro}{\ch@irxliealgfont}
+% \begin{macro}{\ch@irxmodulefont}
+% \begin{macro}{\ch@irxprehilbfont}
+% \begin{macro}{\ch@irxoperatorfont}
+% \begin{macro}{\ch@irxringfont}
+% \begin{macro}{\ch@irxscriptfont}
+% \begin{macro}{\ch@irxsheaffont}
+% \begin{macro}{\ch@irxspacesfont}
+% \begin{macro}{\ch@irxtopologyfont}
+%
+% We use |xkeyval| to define keys setting the different font
+% groups. These keys can be used for the macro |\chairxfonts|.
+% We use |\providecommand| to create the font macros if they do
+% not already exist.
+%
+% \begin{macrocode}
+\define@key[chairx]{fonts}{algebrafont}{
+ \providecommand{\ch@irxalgebrafont}[1]{ }
+ \renewcommand{\ch@irxalgebrafont}{#1}
+}
+\define@key[chairx]{fonts}{basisfont}{
+ \providecommand{\ch@irxbasisfont}[1]{ }
+ \renewcommand{\ch@irxbasisfont}{#1}
+}
+\define@key[chairx]{fonts}{categoryfont}{
+ \providecommand{\ch@irxcategoryfont}[1]{ }
+ \renewcommand{\ch@irxcategoryfont}{#1}
+}
+\define@key[chairx]{fonts}{categorynamefont}{
+ \providecommand{\ch@irxcategorynamefont}[1]{ }
+ \renewcommand{\ch@irxcategorynamefont}{#1}
+}
+\define@key[chairx]{fonts}{fieldfont}{
+ \providecommand{\ch@irxfieldfont}[1]{ }
+ \renewcommand{\ch@irxfieldfont}{#1}
+}
+\define@key[chairx]{fonts}{filterfont}{
+ \providecommand{\ch@irxfilterfont}[1]{ }
+ \renewcommand{\ch@irxfilterfont}{#1}
+}
+\define@key[chairx]{fonts}{functorfont}{
+ \providecommand{\ch@irxfunctorfont}[1]{ }
+ \renewcommand{\ch@irxfunctorfont}{#1}
+}
+\define@key[chairx]{fonts}{gerstenhaberfont}{
+ \providecommand{\ch@irxgerstenhaberfont}[1]{ }
+ \renewcommand{\ch@irxgerstenhaberfont}{#1}
+}
+\define@key[chairx]{fonts}{groupfont}{
+ \providecommand{\ch@irxgroupfont}[1]{ }
+ \renewcommand{\ch@irxgroupfont}{#1}
+}
+\define@key[chairx]{fonts}{groupoidfont}{
+ \providecommand{\ch@irxgroupoidfont}[1]{ }
+ \renewcommand{\ch@irxgroupoidfont}{#1}
+}
+\define@key[chairx]{fonts}{hilbertfont}{
+ \providecommand{\ch@irxhilbertfont}[1]{ }
+ \renewcommand{\ch@irxhilbertfont}{#1}
+}
+\define@key[chairx]{fonts}{liealgfont}{
+ \providecommand{\ch@irxliealgfont}[1]{ }
+ \renewcommand{\ch@irxliealgfont}{#1}
+}
+\define@key[chairx]{fonts}{modulefont}{
+ \providecommand{\ch@irxmodulefont}[1]{ }
+ \renewcommand{\ch@irxmodulefont}{#1}
+}
+\define@key[chairx]{fonts}{prehilbfont}{
+ \providecommand{\ch@irxprehilbfont}[1]{ }
+ \renewcommand{\ch@irxprehilbfont}{#1}
+}
+% \end{macrocode}
+%
+% Here we need to change the default operatorfont in order to get the
+% chairxoperatorfont also for |\operatorname| and
+% |\DeclareMathOperator|. Note that redefining |\operator@font| with
+% a symbol alphabet and not a symbol font forces us to use an
+% additional bracket in all definitions using |\operatorname| and
+% |\DeclareMathOperator|.
+%
+% \begin{macrocode}
+\define@key[chairx]{fonts}{operatorfont}{
+ \providecommand{\ch@irxoperatorfont}[1]{ }
+ \renewcommand{\ch@irxoperatorfont}{#1}
+}
+\define@key[chairx]{fonts}{ringfont}{
+ \providecommand{\ch@irxringfont}[1]{ }
+ \renewcommand{\ch@irxringfont}{#1}
+}
+\define@key[chairx]{fonts}{scriptfont}{
+ \providecommand{\ch@irxscriptfont}[1]{ }
+ \renewcommand{\ch@irxscriptfont}{#1}
+}
+\define@key[chairx]{fonts}{sheaffont}{
+ \providecommand{\ch@irxsheaffont}[1]{ }
+ \renewcommand{\ch@irxsheaffont}{#1}
+}
+\define@key[chairx]{fonts}{spacefont}{
+ \providecommand{\ch@irxspacefont}[1]{ }
+ \renewcommand{\ch@irxspacefont}{#1}
+}
+\define@key[chairx]{fonts}{topologyfont}{
+ \providecommand{\ch@irxtopologyfont}[1]{ }
+ \renewcommand{\ch@irxtopologyfont}{#1}
+}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\chairxfonts}
+%
+% Command for setting the fonts.
+%
+% \begin{macrocode}
+\newcommand{\chairxfonts}[1]{
+ \setkeys[chairx]{fonts}{#1}
+}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% We use the following default settings for fonts.
+%
+% \begin{macrocode}
+\chairxfonts{
+ algebrafont = \mathscr,
+ basisfont = \mathit,
+ categoryfont = \mathfrak,
+ categorynamefont = \mathsf,
+ fieldfont = \mathbb,
+ filterfont = \mathfrak,
+ functorfont = \mathsf,
+ groupfont = \mathrm,
+ groupoidfont = \mathfrak,
+ gerstenhaberfont = \mathfrak,
+ hilbertfont = \mathfrak,
+ liealgfont = \mathfrak,
+ modulefont = \mathscr,
+ prehilbfont = \mathcal,
+ operatorfont = \mathrm,
+ ringfont = \mathsf,
+ scriptfont = \mathrm,
+ sheaffont = \mathscr,
+ spacefont = \mathscr,
+ topologyfont = \mathscr
+}
+% \end{macrocode}
+%
+% code for grabbing a single glyph from some random font without
+% investing a new math alphabet: use only the wrapper macro as
+% |\ch@irxmathsymbol[mathtype]{fontname}{glyph}| with |mathtype| being
+% the optional type of the symbol with default being|\mathord|,
+% |fontname| the name of the font where the symbol is to be found and
+% |glyph| the number of the symbol inside the specified font.
+%
+% \begin{macrocode}
+\newcommand{\ch@irxfont}[1]{\fontfamily{#1}\fontencoding{U}\fontseries{m}\fontshape{n}\selectfont}
+\newcommand{\ch@irxsymbol}[2]{{\ch@irxfont{#1}\char#2}}
+\newcommand\ch@irxmathsymbol[3][\mathord]{%
+ #1{\ch@irxm@thsymbol{#2}{#3}}}
+\def\ch@irxm@thsymbol#1#2{\mathchoice
+ {\@ch@irxm@thsymbol{#1}{#2}\tf@size}
+ {\@ch@irxm@thsymbol{#1}{#2}\tf@size}
+ {\@ch@irxm@thsymbol{#1}{#2}\sf@size}
+ {\@ch@irxm@thsymbol{#1}{#2}\ssf@size}}
+\def\@ch@irxm@thsymbol#1#2#3{\mbox{\fontsize{#3}{#3}\ch@irxsymbol{#1}{#2}}}
+%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathFontsDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathFontsDoc.dtx
new file mode 100644
index 0000000000..1b728bc90c
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathFontsDoc.dtx
@@ -0,0 +1,100 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all algebra related macros.
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathFonts.dtx
+%\fi
+%
+% The package uses different fonts for different groups of macros. The
+% font used for a particular macro is mentioned in the description of
+% that macro. The groups of fonts are:
+% \begin{itemize}
+% \item |algebrafont| for generic algebras.\\
+% Can be accessed via |\algebra|.\\
+% Default font: |\mathscr|
+% \item |basisfont| for bases of vector spaces.\\
+% Can be accessed via |\basis|.\\
+% Default font: |\mathit|
+% \item |categoryfont| for generic categories.\\
+% Can be accessed via |\category|.\\
+% Default font: |\mathfrak|
+% \item |categorynamefont| for predefined categories.\\
+% Can be accessed via |\categoryname|.\\
+% Default font: |\mathsf|
+% \item |fieldfont| for generic fields.\\
+% Can be accessed via |\field|.\\
+% Default font: |\mathbb|
+% \item |filterfont| for generic filters.\\
+% Can be accessed via |\filter|.\\
+% Default font: |\mathfrak|
+% \item |functorfont| for generic functors.\\
+% Can be accessed via |\functor|.\\
+% Default font: |\mathsf|
+% \item |gerstenhaberfont| for generic Gerstenhaber algebras.\\
+% Can be accessed via |\gerstenhaber|.\\
+% Default font: |\mathfrak|
+% \item |groupfont| for the matrix groups.\\
+% Can be accessed via |\group|.\\
+% Default font: |\mathrm|
+% \item |groupoidfont| for generic groupoids.\\
+% Can be accessed via |\groupoid|.\\
+% Default font: |\mathfrak|
+% \item |hilbertfont| for Hilbert spaces.\\
+% Can be accessed via |\hilbert|.\\
+% Default font: |\mathfrak|
+% \item |liealgfont| for generic Lie algebras.\\
+% Can be accessed via |\liealg|.\\
+% Default font: |\mathfrak|
+% \item |modulefont| for generic modules.\\
+% Can be accessed via |\module|.\\
+% Default font: |\mathscr|
+% \item |prehilbfont| for pre-Hilbert space.\\
+% Can be accessed via |\prehilb|.\\
+% Default font: |\mathcal|
+% \item |operatorfont| for most common operators.\\
+% Can be accessed via |\operator|.\\
+% Default font: |\mathrm|
+% \item |ringfont| for generic rings.\\
+% Can be accessed via |\ring|.\\
+% Default font: |\mathsf|
+% \item |scriptfont| for subscripts.\\
+% Can be accessed via |\script|.\\
+% Default font: |\mathrm|
+% \item |sheaffont| for generic sheaves.\\
+% Can be accessed via |\sheaf|.\\
+% Default font: |\mathscr|
+% \item |spacesfont| for predefined function spaces, e.g. |\Bounded| \\
+% Default font: |\mathscr|
+% \item |topologyfont| for generic topologies.\\
+% Can be accessed via |\topology|\\
+% Default font: |\mathscr|
+% \end{itemize}
+%
+% \DescribeMacro{\chairxfonts}
+% The |\chairxfonts| macro can be used to redefine the fonts of the
+% different groups of macros. It takes as argument a comma separated
+% list of group names and the new font macros, e.g.
+% \begin{verbatim}
+% \chairxfonts{algebrafont = \mathfrak, scriptfont = \mathrm}
+% \end{verbatim}
+% \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathGeneral.dtx b/macros/latex/contrib/nchairx/source/chairxmathGeneral.dtx
new file mode 100644
index 0000000000..1859cad269
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathGeneral.dtx
@@ -0,0 +1,277 @@
+% \iffalse meta-
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all category theory related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathGeneralDoc.dtx
+% \fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+% \subsubsection{General Math Commands} \label{sec:GeneralMathCommands}
+%
+%\begin{macro}{\I}
+% \begin{macrocode}
+\newcommand{\I}{\mathrm{i}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\E}
+% \begin{macrocode}
+\newcommand{\E}{\mathrm{e}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\D}
+% \begin{macrocode}
+\newcommand{\D}{\mathop{}\!\mathrm{d}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\cc}
+% \begin{macrocode}
+\newcommand{\cc}[1]{\overline{{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\sign}
+% \begin{macrocode}
+\newcommand{\sign}{\operatorname{\ch@irxoperatorfont{sign}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\RE}
+% \begin{macrocode}
+\newcommand{\RE}{\operatorname{\ch@irxoperatorfont{Re}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\IM}
+% \begin{macrocode}
+\newcommand{\IM}{\operatorname{\ch@irxoperatorfont{Im}}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\Unit}
+% \begin{macrocode}
+\newcommand{\Unit}{\mathbb{1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\const}
+% \begin{macrocode}
+\newcommand{\const}{\operatorname{\mathit{const}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\canonical}
+% \begin{macrocode}
+\newcommand{\canonical}{\ch@irxscriptfont{can}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\pt}
+% \begin{macrocode}
+\newcommand{\pt}{\ch@irxoperatorfont{pt}}
+% \end{macrocode}
+%\end{macro}
+%
+%\subsubsection{Restrictions} \label{sec:Restrictions}
+%
+%\begin{macro}{\at}
+% \begin{macrocode}
+\newcommand{\at}[2][\big]{#1\vert_{#2}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+% \subsubsection{Maps and Related Stuff} \label{sec:MapsandRelatedStuff}
+%
+%\begin{macro}{\Map}
+% \begin{macrocode}
+\newcommand{\Map}{\ch@irxoperatorfont{Map}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Bij}
+% \begin{macrocode}
+\newcommand{\Bij}{\ch@irxoperatorfont{Bij}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\argument}
+% \begin{macrocode}
+\newcommand{\argument}{\,\cdot\,}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\domain}
+% \begin{macrocode}
+\newcommand{\domain}{\operatorname{\ch@irxoperatorfont{dom}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\range}
+% \begin{macrocode}
+\newcommand{\range}{\operatorname{\ch@irxoperatorfont{range}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\id}
+% \begin{macrocode}
+\newcommand{\id}{\operatorname{\ch@irxoperatorfont{id}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\pr}
+% \begin{macrocode}
+\newcommand{\pr}{\operatorname{\ch@irxoperatorfont{pr}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\inv}
+% \begin{macrocode}
+\newcommand{\inv}{\operatorname{\ch@irxoperatorfont{inv}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ev}
+% \begin{macrocode}
+\newcommand{\ev}{\operatorname{\ch@irxoperatorfont{ev}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\image}
+% \begin{macrocode}
+\newcommand{\image}{\operatorname{\ch@irxoperatorfont{im}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\graph}
+% \begin{macrocode}
+\newcommand{\graph}{\operatorname{\ch@irxoperatorfont{graph}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\coimage}
+% \begin{macrocode}
+\newcommand{\coimage}{\operatorname{\ch@irxoperatorfont{coim}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\coker}
+% \begin{macrocode}
+\newcommand{\coker}{\operatorname{\ch@irxoperatorfont{coker}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\operator}
+% \begin{macrocode}
+\newcommand{\operator}[1]{\operatorname{\ch@irxoperatorfont{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \subsubsection{Relations} \label{sec:Relations}
+%
+%\begin{macro}{\later}
+% \begin{macrocode}
+\newcommand{\later}{\mathrel{\succcurlyeq}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\earlier}
+% \begin{macrocode}
+\newcommand{\earlier}{\mathrel{\preccurlyeq}}
+% \end{macrocode}
+%\end{macro}
+%
+%\subsubsection{Sums and Products}
+%
+%\begin{macro}{\bigop}
+% To define sum-like operators that are scaled up in displaystyle we define the following command taken
+% from tex.stackexchange.com/questions/23432/how-to-create-my-own-math-operator-with-limits
+% \begin{macrocode}
+\DeclareRobustCommand\big@p[2][1]{%
+ \mathop{\vphantom{\sum}\mathpalette\bigop@{{#1}{#2}}}\slimits@
+}
+\newcommand{\bigop@}[2]{\bigop@@#1#2}
+\newcommand{\bigop@@}[3]{%
+ \vcenter{
+ \sbox\z@{$#1\sum$}
+ \hbox{\resizebox{\ifx#1\displaystyle#2\fi\dimexpr\ht\z@+\dp\z@}{!}{$\m@th#3$}}
+ }
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\bigplus}
+% The command |\DOTSB| is used for correct behaviour of |\dots| before or after the command.
+% \begin{macrocode}
+\newcommand{\bigplus}{\DOTSB\big@p{+}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\bigtimes}
+% \begin{macrocode}
+\newcommand{\bigtimes}{\DOTSB\big@p{\times}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\biprod}
+% \begin{macrocode}
+\newcommand{\biprod}{\DOTSB\big@p{\mathrel{\prod\hspace{-0.4cm}\coprod}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \subsubsection{Labels} \label{sec:Labels}
+%
+% Smiley from |wasysym|
+%
+% \begin{macro}{\smiley}
+% \begin{macrocode}
+\newcommand{\smiley}{\ch@irxmathsymbol[\mathord]{wasy}{44}}
+% \end{macrocode}
+% \end{macro}
+%
+% Frownie from |wasysym|
+%
+% \begin{macro}{\frownie}
+% \begin{macrocode}
+\newcommand{\frownie}{\ch@irxmathsymbol[\mathord]{wasy}{47}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\heart}
+% \begin{macrocode}
+\newcommand{\heart}{\heartsuit}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathGeneralDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathGeneralDoc.dtx
new file mode 100644
index 0000000000..cdf52653b6
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathGeneralDoc.dtx
@@ -0,0 +1,184 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all general mathematics macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathGeneral.dtx
+%\fi
+%
+% \subsubsection{General Math Commands} \label{sec:Doc_GeneralMathCommands}
+%
+% \DescribeMacro{\I}
+% Imaginary unit |\I|: $\I$
+%
+%\DescribeMacro{\E}
+% Euler number |\E|: $\E$
+%
+%\DescribeMacro{\D}
+% Differential |\D x|: $\D x$
+%
+%\DescribeMacro{\cc}
+% Complex conjugation |z \mapsto \cc{z}|: $z \mapsto \cc{z}$
+%
+%\DescribeMacro{\sign}
+% Signum |\sign \sigma|: $\sign \sigma$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\RE}
+% Real part (the standard symbols are sooo ugly) |\RE(z)|: $\RE(z)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\IM}
+% Imaginary part |\IM(z)|: $\IM(z)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Unit}
+% Unit element |\Unit|: $\Unit$
+%
+%\DescribeMacro{\const}
+% Generic constant |\const|: $\const$ \\
+% Uses |mathit| as font.
+%
+%\DescribeMacro{\canonical}
+% Subscript for canonical |\omega_\canonical|: $\omega_\canonical$ \\
+% Uses |scriptfont|.
+%
+%\DescribeMacro{\pt}
+% A single point |\{\pt\}|: $\{\pt\}$ \\
+% Uses |operatorfont|
+%
+%\subsubsection{Restrictions} \label{sec:Doc_Restrictions}
+%
+%\DescribeMacro{\at}
+% Restriction of a map to a subset |f\at{U}|: $f\at{U}$
+% or with optional size |f\at[\Big]{U}|: $f\at[\Big]{U}$. \\
+% Default size is |\big|.
+%
+% \subsubsection{Maps and Related Stuff} \label{sec:Doc_MapsandRelatedStuff}
+%
+%\DescribeMacro{\Map}
+% Space of maps |\Map(X, Y)|: $\Map(X, Y)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Bij}
+% Space of bijections |\Bij(X, Y)|: $\Bij(X, Y)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\argument}
+% Generic argument of a map |f(\argument)|: $f(\argument)$
+%
+%\DescribeMacro{\domain}
+% Domain of a map |\domain(\phi)|: $\domain(\phi)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\range}
+% Range of a map |\range(\phi)|: $\range(\phi)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\id}
+% Identity map |\id|: $\id$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\pr}
+% Generic projection |\pr \colon E \to M|: $\pr \colon E \to M$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\inv}
+% Inversion map |\inv \colon g \mapsto g^{-1}|: $\inv \colon g \mapsto g^{-1}$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\ev}
+% Evaluation map |\ev \colon V \tensor V^* \to \mathbb{k}|: $\ev \colon V \tensor V^* \to \mathbb{k}$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\image}
+% Image of a map |\image(f)|: $\image(f)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\graph}
+% Graph of a map |\graph(f)|: $\graph(f)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\coimage}
+% Coimage of a map |\coimage(f)|: $\coimage(f)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\coker}
+% Cokernel of a map |\coker(f)|: $\coker(f)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\operator}
+% This macro allows to construct own mathematical operators
+% whose fonts are consistent with the predefined operators of |nchairx|
+% |\operator{asso}|: $\operator{asso}$\\
+% Uses |operatorfont|.
+%
+% \subsubsection{Relations} \label{sec:Doc_Relations}
+%
+%\DescribeMacro{\later}
+% Later in a directed set |i \later j|: $i \later j$
+
+%\DescribeMacro{\earlier}
+% Earlier in a directed set |i \earlier j|: $i \earlier j$
+%
+%\subsubsection{Big Sums and Products}
+%
+%\DescribeMacro{\bigplus}
+% A big plus sign that can be decorated with limits. Similar to the usual sum it can be used inline
+%|\bigplus_{k=1}^n V_k|: $\bigplus_{k=1}^n V_k$
+% and in displaystyle:
+% \begin{equation*}
+% \bigplus_{k=1}^n V_k
+% \end{equation*}
+%
+%\DescribeMacro{\bigtimes}
+% A big times sign that can be decorated with limits. Similar to the usual sum it can be used inline
+%|\bigtimes_{k=1}^n V_k|: $\bigtimes_{k=1}^n V_k$
+% and in displaystyle:
+% \begin{equation*}
+% \bigtimes_{k=1}^n V_k
+% \end{equation*}
+%
+%\DescribeMacro{\biprod}
+% A biproduct sign that can be decorated with limits. Similar to the usual sum it can be used inline
+%|\biprod_{k=1}^n V_k|: $\biprod_{k=1}^n V_k$
+% and in displaystyle:
+% \begin{equation*}
+% \biprod_{k=1}^n V_k
+% \end{equation*}
+%
+% \subsubsection{Labels} \label{sec:Doc_Labels}
+%
+% In proofs we sometimes want to label an equation by a symbol and
+% not by an equation number. Typical choices are of course ($*$) or
+% ($**$). But as proofs become longer, some additional labels are nice
+% to have:
+%
+% \DescribeMacro{\smiley}
+% A smiley |\smiley| $\smiley$
+%
+% \DescribeMacro{\frownie}
+% A frownie |\frownie| $\frownie$
+%
+% \DescribeMacro{\heart}
+% A heart |\heart| $\heart$
+% \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathLinalg.dtx b/macros/latex/contrib/nchairx/source/chairxmathLinalg.dtx
new file mode 100644
index 0000000000..21f84c5ad2
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathLinalg.dtx
@@ -0,0 +1,196 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all linear algebra related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathLinalgDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+%\subsubsection{General Linear Algebra}
+%
+%\begin{macro}{\tr}
+% \begin{macrocode}
+\newcommand{\tr}{\operatorname{\ch@irxoperatorfont{tr}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\rank}
+% \begin{macrocode}
+\newcommand{\rank}{\operatorname{\ch@irxoperatorfont{rank}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\codim}
+% \begin{macrocode}
+\newcommand{\codim}{\operatorname{\ch@irxoperatorfont{codim}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\diag}
+% \begin{macrocode}
+\newcommand{\diag}{\operatorname{\ch@irxoperatorfont{diag}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Trans}
+% \begin{macrocode}
+\newcommand{\Trans}{{\ch@irxscriptfont{\scriptscriptstyle{T}}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Mat}
+% \begin{macrocode}
+\newcommand{\Mat}{\ch@irxoperatorfont{M}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\SymMat}
+% \begin{macrocode}
+\newcommand{\SymMat}{\ch@irxoperatorfont{SymMat}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ann}
+% \begin{macrocode}
+\newcommand{\ann}{\ch@irxscriptfont{ann}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Span}
+% \begin{macrocode}
+\newcommand{\Span}[1][]{\operatorname{\ch@irxoperatorfont{span}_{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\basis}
+% \begin{macrocode}
+\newcommand{\basis}[1]{\ch@irxbasisfont{#1}}
+% \end{macrocode}
+%\end{macro}
+%
+%\subsubsection{Tensors}
+%
+%\begin{macro}{\tensor}
+% \begin{macrocode}
+\renewcommand{\tensor}[1][{}]{\mathbin{\otimes_{\scriptscriptstyle{#1}}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Tensor}
+% \begin{macrocode}
+\newcommand{\Tensor}{\ch@irxoperatorfont{T}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Anti}
+% \begin{macrocode}
+\newcommand{\Anti}{\Lambda}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Sym}
+% \begin{macrocode}
+\newcommand{\Sym}{\ch@irxoperatorfont{S}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Symmetrizer}
+% \begin{macrocode}
+\newcommand{\Symmetrizer}{\operatorname{\ch@irxoperatorfont{Sym}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\AntiSymmetrizer}
+% \begin{macrocode}
+\newcommand{\AntiSymmetrizer}{\operatorname{\ch@irxoperatorfont{Alt}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\ins}
+% \begin{macrocode}
+\newcommand{\ins}{\operatorname{\ch@irxoperatorfont{i}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\jns}
+% \begin{macrocode}
+\newcommand{\jns}{\operatorname{\ch@irxoperatorfont{j}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\insa}
+% \begin{macrocode}
+\newcommand{\insa}{\ins_{\ch@irxscriptfont{a}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\inss}
+% \begin{macrocode}
+\newcommand{\inss}{\ins_{\ch@irxscriptfont{s}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\degs}
+% \begin{macrocode}
+\newcommand{\degs}{\ch@irxoperatorfont{deg}_{\ch@irxscriptfont{s}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dega}
+% \begin{macrocode}
+\newcommand{\dega}{\ch@irxoperatorfont{deg}_{\ch@irxscriptfont{a}}}
+% \end{macrocode}
+%\end{macro}
+%
+%
+%\subsubsection{Inner Products}
+%
+%\begin{macro}{\SP}
+% \begin{macrocode}
+\DeclarePairedDelimiter{\SP} {\langle}{\rangle}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\littlepara}
+% \begin{macrocode}
+\newcommand{\littlepara}{{\scriptscriptstyle\parallel}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\IP}
+% \begin{macrocode}
+\newcommand{\IP}[6][{}]{\decorate*[^{#2}_{#3}]{\SP[#1]{#4}}{^{#5}_{#6}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathLinalgDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathLinalgDoc.dtx
new file mode 100644
index 0000000000..0f9c787e4f
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathLinalgDoc.dtx
@@ -0,0 +1,135 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all linear algebra related macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathLinalg.dtx
+%\fi
+%
+%\subsubsection{General Linear Algebra}
+%
+%\DescribeMacro{\tr}
+% Trace of a linear map |\tr(A)|: $\tr(A)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\rank}
+% Rank of a linear map |\rank(A)|: $\rank(A)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\codim}
+% Codimension |\codim U|: $\codim U$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\diag}
+% Diagonal (for filling matrices etc.) |\diag(1,-1, -1)|: $\diag(1,-1, -1)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Trans}
+% Transposition of matrices |A^\Trans|: $A^\Trans$ \\
+% Uses |scriptfont|.
+%
+%\DescribeMacro{\Mat}
+% Matrices |\Mat_n(\mathbb{R})|: $\Mat_n(\mathbb{R})$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\SymMat}
+% Symmetric matrices |\SymMat_n(\mathbb{R})|: $\SymMat_n(\mathbb{R})$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\ann}
+% Annihilator of a subspace |U^\ann|: $U^\ann$ \\
+% Uses |scriptfont|.
+%
+%\DescribeMacro{\Span}
+% Span of something |\Span\{v, u\}|: $\Span\{v, u\}$
+% and with optional argument
+% |\Span[\mathbb{C}]\{v,u\}|: $\Span[\mathbb{C}]\{v,u\}$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\basis}
+% Font for basis vectors |\basis{e}_i|: $\basis{e}_i$ \\
+% Uses |basisfont|.
+%
+%\subsubsection{Tensors}
+%
+%\DescribeMacro{\tensor}
+% Generic tensor product over some ring |a \tensor b|: $a \tensor b$.\\
+% With optional subscript |V \tensor[\algebra{A}] U|: $V \tensor[\algebra{A}] U$
+%
+%\DescribeMacro{\Tensor}
+% Tensor powers, tensor algebra |\Tensor^\bullet(V)|: $\Tensor^\bullet(V)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Anti}
+% Antisymmetric tensor powers, Grassmann algebra |\Anti(V)|: $\Anti(V)$
+%
+%\DescribeMacro{\Sym}
+% Symmetric tensor powers, symmetric algebra |\Sym^\bullet(V)|: $\Sym^\bullet(V)$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Symmetrizer}
+% Symmetrizer |\Symmetrizer_n|: $\Symmetrizer_n$
+%
+%\DescribeMacro{\AntiSymmetrizer}
+% Anti-symmetrizer |\AntiSymmetrizer|: $\AntiSymmetrizer$
+%
+%\DescribeMacro{\ins}
+% Generic insertion map |\ins_X|: $\ins_X$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\jns}
+% Generic right insertion map |\jns_X|: $\jns_X$ \\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\insa}
+% Antisymmetric insertion map |\insa(X)|: $\insa(X)$ \\
+% Uses |operatorfont|, |scriptfont|.
+%
+%\DescribeMacro{\inss}
+% Symmetric insertion map |\inss(v)|: $\inss(v)$ \\
+% Uses |operatorfont|, |scriptfont|.
+%
+%\DescribeMacro{\dega}
+% Antisymmetric degree |\dega(a) = ka|: $\dega(a) = ka$ \\
+% Uses |operatorfont|, |scriptfont|.
+%
+%\DescribeMacro{\degs}
+% Symmetric degree |\degs(X) = \ell X|: $\degs(X) = \ell X$ \\
+% Uses |operatorfont|, |scriptfont|.
+%
+%\subsubsection{Inner Products}
+%
+%\DescribeMacro{\SP}
+% Simple scalar product |\SP{x, y}|: $\SP{x, y}$.
+%
+%\DescribeMacro{\littlepara}
+% Small parallel to be used as a subscript |v_\littlepara|: $v_\littlepara$
+%
+%\DescribeMacro{\IP}
+% Generic inner product with five arguments to decorate it |\IP[]{}{}{}{}{}| and an optional argument to adjust the size:
+%\[
+%\IP[\big]{}{B}{z, w}{\perp}{R}
+%\quad
+%\textrm{and}
+%\quad
+%\IP[\Big]{\perp}{\algebra{B}}{\prod x_i, y}{\prime}{\algebra{A}}
+%\]
diff --git a/macros/latex/contrib/nchairx/source/chairxmathStatistics.dtx b/macros/latex/contrib/nchairx/source/chairxmathStatistics.dtx
new file mode 100644
index 0000000000..0a6337059e
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathStatistics.dtx
@@ -0,0 +1,65 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all statistics related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathStatisticsDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+%\subsubsection{General Statistics}
+%
+%\begin{macro}{\EX}
+% \begin{macrocode}
+\newcommand{\EX}{\operatorname{\ch@irxoperatorfont{E}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Var}
+% \begin{macrocode}
+\newcommand{\Var}{\operatorname{\ch@irxoperatorfont{Var}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Cov}
+% \begin{macrocode}
+\newcommand{\Cov}{\operatorname{\ch@irxoperatorfont{Cov}}}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\Cor}
+% \begin{macrocode}
+\newcommand{\Cor}{\operatorname{\ch@irxoperatorfont{Cor}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathStatisticsDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathStatisticsDoc.dtx
new file mode 100644
index 0000000000..96550eb121
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathStatisticsDoc.dtx
@@ -0,0 +1,45 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all statistics related macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathStatistics.dtx
+%\fi
+%
+%\subsubsection{Macros for General Statistics}
+%
+%\DescribeMacro{\EX}
+% Expectation value |\EX_\omega(A)|: $\EX_\omega(A)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Var}
+% Variance |\Var(a)|: $\Var(a)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Cov}
+% Covariance |\Cov_\omega(a, b)|: $\Cov_\omega(a, b)$\\
+% Uses |operatorfont|.
+%
+%\DescribeMacro{\Cor}
+% Correlation |\Cor(a, b)|: $\Cor(a, b)$\\
+% Uses |operatorfont|.
+% \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathTopology.dtx b/macros/latex/contrib/nchairx/source/chairxmathTopology.dtx
new file mode 100644
index 0000000000..b360d1acc1
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathTopology.dtx
@@ -0,0 +1,146 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the implementation of all topology related macros .
+%
+% Macros have to be described by (delete the first %)
+% %\begin{macro}{\macro}
+% % Description of the implementation.
+% % \begin{macrocode}
+%\newcommand{\macro}[] {}
+% % \end{macrocode}
+% %\end{macro}
+%
+% The implementation and description will appear in the implementation
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The documentation of the macros defined here has to be written in
+% chairxmathTopologyDoc.dtx
+%\fi
+%
+% First we check of macros should be included:
+% \begin{macrocode}
+\if@loadmath
+% \end{macrocode}
+%
+%\subsubsection{General Topology}
+%
+% \begin{macro}{\cl}
+% \begin{macrocode}
+\newcommand{\cl}{\ch@irxscriptfont{cl}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\scl}
+% \begin{macrocode}
+\newcommand{\scl}{\ch@irxscriptfont{scl}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\interior}
+% \begin{macrocode}
+\newcommand{\interior}{\circ}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\boundary}
+% \begin{macrocode}
+\newcommand{\boundary}{\partial}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\supp}
+% \begin{macrocode}
+\newcommand{\supp}{\operatorname{\ch@irxoperatorfont{supp}}}
+% \end{macrocode}
+%\end{macro}
+%
+% \begin{macro}{\dist}
+% \begin{macrocode}
+\newcommand{\dist}{\operatorname{\ch@irxoperatorfont{dist}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\topology}
+% \begin{macrocode}
+\newcommand{\topology}[1]{\ch@irxtopologyfont{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\filter}
+% \begin{macrocode}
+\newcommand{\filter}[1]{\ch@irxfilterfont{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sheaf}
+% \begin{macrocode}
+\newcommand{\sheaf}[1]{\ch@irxsheaffont{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Sections}
+% \begin{macrocode}
+\newcommand{\Sections}{\operatorname{\ch@irxoperatorfont{Sections}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HOM}
+% \begin{macrocode}
+\newcommand{\HOM}{\operatorname{\ch@irxsheaffont{H}\!\mathit{om}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\etale}
+% \begin{macrocode}
+\DeclarePairedDelimiter{\etale}{\lvert}{\rvert}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Categories from Topology}
+%
+% \begin{macro}{\topological}
+% \begin{macrocode}
+\newcommand{\topological}{\categoryname{top}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Topological}
+% \begin{macrocode}
+\newcommand{\Topological}{\categoryname{Top}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Sheaves}
+% \begin{macrocode}
+\newcommand{\Sheaves}{\categoryname{Sheaves}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\PreSheaves}
+% \begin{macrocode}
+\newcommand{\PreSheaves}{\categoryname{PreSheaves}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Etale}
+% \begin{macrocode}
+\newcommand{\Etale}{\categoryname{Etale}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode} \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/chairxmathTopologyDoc.dtx b/macros/latex/contrib/nchairx/source/chairxmathTopologyDoc.dtx
new file mode 100644
index 0000000000..60eb653ba7
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/chairxmathTopologyDoc.dtx
@@ -0,0 +1,96 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This file contains the documentation of all topology related macros .
+%
+% Macros have to be described by (delete the first %)
+% \DescribeMacro{\macro}
+% Description and usage of the macro.
+%
+% The description will appear in the usage
+% part of the documentation. Use \subsubsection{} etc. for structuring.
+%
+% The implementation of the macros defined here has to be written in
+% chairxmathTopology.dtx
+%\fi
+%
+%\subsubsection{Macros for Topology}
+%
+% \DescribeMacro{\cl}
+% Topological closure |X^\cl|: $X^\cl$\\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\scl}
+% Sequential closure |A^\scl|: $A^\scl$\\
+% Uses |scriptfont|.
+%
+% \DescribeMacro{\interior}
+% Open interior |A^\interior|: $A^\interior$
+%
+% \DescribeMacro{\boundary}
+% Boundary of a subset |\boundary A|: $\boundary A$
+%
+% \DescribeMacro{\supp}
+% Support of a function |\supp f|: $\supp f$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\dist}
+% Distance |\dist(p, A)|: $\dist(p, A)$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\topology}
+% Font for topology |\topology{M}|: $\topology{M}$\\
+% Uses |topologyfont|.
+%
+% \DescribeMacro{\filter}
+% Font for filter |\filter{F}|: $\filter{F}$\\
+% Uses |filterfont|.
+%
+% \DescribeMacro{\sheaf}
+% Font for sheaves |\sheaf{F}|: $\sheaf{F}$\\
+% Uses |sheaffont|.
+%
+% \DescribeMacro{\Sections}
+% Discontinuous sections of a presheaf |\Sections(\sheaf{F})|: $\Sections(\sheaf{F})$\\
+% Uses |operatorfont|.
+%
+% \DescribeMacro{\HOM}
+% Sheaf of morphisms between sheaves |\HOM(\sheaf{F}, \sheaf{G})|: $\HOM(\sheaf{F}, \sheaf{G})$\\
+% Uses |sheaffont| and |\mathit|.
+%
+% \DescribeMacro{\etale}
+% Étalé space of presheaf |\etale{\sheaf{F}}|: $\etale{\sheaf{F}}$.
+%
+%
+% \subsubsection{Categories from Topology}
+%
+% \DescribeMacro{\topological}
+% Category of topological spaces |\topological|: $\topological$ \\
+% Uses |categoryname|.
+%
+% \DescribeMacro{\Topological}
+% Category of Hausdorff topological spaces |\Topological|: $\Topological$ \\
+% Uses |categoryname|.
+%
+% \DescribeMacro{\Sheaves}
+% Category of sheaves over a space |\Sheaves(M)|: $\Sheaves(M)$ \\
+% Uses |categoryname|.
+%
+% \DescribeMacro{\PreSheaves}
+% Category of presheaves over a space |\PreSheaves(M)|: $\PreSheaves(M)$ \\
+% Uses |categoryname|.
+%
+% \DescribeMacro{\Etale}
+% Category of étalé spaces over a space |\Etale(M)|: $\Etale(M)$ \\
+% Uses |categoryname|.
diff --git a/macros/latex/contrib/nchairx/source/nchairx.dtx b/macros/latex/contrib/nchairx/source/nchairx.dtx
new file mode 100644
index 0000000000..3350a15508
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/nchairx.dtx
@@ -0,0 +1,369 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 - 2021 by ChairX
+%
+ % 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.
+%
+% \fi
+%
+%\iffalse
+%<*nchairx>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{nchairx}
+ [2021/07/29 v1.0.0 First major release]
+%</nchairx>
+%
+%<*driver>
+\documentclass{ltxdoc}
+
+\usepackage[english,german,strings]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{nchairx}
+\usepackage{ifdraft}
+\usepackage{gitinfo2}
+\usepackage[linktoc=all]{hyperref}
+
+\EnableCrossrefs
+
+\CodelineIndex
+
+\RecordChanges
+
+\begin{document}
+ \DocInput{nchairx.dtx}
+\end{document}
+%</driver>
+%\fi
+%
+% \CheckSum{2012}
+%
+% \changes{v0.1}{2018/02/27}{Initial test}
+% \changes{v0.9}{2019/02/21}{First official release}
+% \changes{v1.0.0}{2021/07/29}{First major release}
+%
+% \GetFileInfo{nchairx.sty}
+%
+% \title{The \textsf{nChairX} package}
+% \author{ChairX \\
+% \ifdraft{Last changes by \gitAuthorName{} on \gitAuthorDate \\ }
+% \ifdraft{Git revision of nchairx:}
+% \ifdraft{\texttt{\gitAbbrevHash{}} {\gitReferences{}} \\ }
+% \ifdraft{}
+% Version \fileversion{} (\filedate) \\
+% \texttt{marvin.dippell@mathematik.uni-wuerzburg.com}}
+%
+% \maketitle
+%
+% \selectlanguage{english}
+%
+% \begin{abstract}
+% This is a part of the new nChairX package providing the famous
+% ChairX style.
+% \end{abstract}
+%
+% \setcounter{tocdepth}{2}
+% \tableofcontents
+%
+% \section{Introduction}
+% This package defines the New ChairX style. Based on previous
+% versions we provide a major clean-up with many additional features
+% and easier handling. The style file is a rather high-level style
+% file providing many standard environments needed in math, many
+% macros needed in differential geometry, algebra, and analysis and
+% some other useful tools. The style file includes several other
+% packages and sets various defaults. There is a companion package
+% called |chairxmath| which only defines the math-related macros but
+% avoids setting environments etc.
+%
+%
+% \section{Usage}
+% \label{sec:Usage}
+%
+% To use the package you have to include it as usual by
+% \begin{center}
+% \begin{tabular}[l]{p{0.8\textwidth}}
+% \verb|\usepackage{nchairx}|
+% \end{tabular}
+% \end{center}
+% and specify some options if needed.
+%
+%
+% \subsection{Package Options}
+%
+% \DescribeMacro{noMath} The math
+% macros of the |nchairx| package can be excluded with the option |noMath|.
+% This can be used if one does not need the math macros of |nchairx| and there occur
+% clashes with other packages or macros, but the environments and other settings of
+% |nchairx| are still desired.
+%
+% \subsection{Setting the Defaults}
+% \label{sec:SettingDefaults}
+%
+% \input{chairxDefaultsDoc.dtx}
+%
+%
+% \subsection{Supporting many Languages}
+% \label{sec:LanguageSupport}
+%
+% For the use of other languages than English (our default) the
+% options of the |babel| package are respected. The important keywords
+% of \textsf{nChairX} (essentially the names of the environments) will
+% then be translated accordingly. In order to enable this you have to
+% load |babel| with the additional language you intend to use, e.g.
+% \begin{center}
+% \begin{tabular}[l]{p{0.8\textwidth}}
+% \verb|\usepackage[german,strings]{babel}|
+% \end{tabular}
+% \end{center}
+% \emph{before} you load |nchairx|.
+% Currently, only German is supported beside English. Then you can
+% switch between the languages inside one document with
+% |\selectlanguage{language}| to get the correct names of the
+% keywords. When loading several languages it is always a good idea
+% to place an explicit |\selectlanguage{language}| at the beginning of
+% the document to set the stage correctly. Note that you have to use
+% the |strings| option for babel as well.
+%
+%
+% \subsection{Environments}
+% \label{sec:Environments}
+%
+% The \textsf{nChairX} package provides many predefined mathematical
+% environments like definitions, theorems etc. The styling is fairly
+% standard. The names of the environments are language sensitive based
+% on the |babel| package.
+%
+% \input{chairxEnvDoc.dtx}
+%
+%
+% \subsection{Logo Support}
+% \label{sec:LogoSupport}
+%
+% \input{chairxLogoDoc.dtx}
+%
+%
+% \section{The Math Macros}
+%
+% One of the main purposes of |nchairx| is to provide several (in
+% fact, many) new math macros needed in various situations: we have
+% support for many things in differential geometry, algebra, and
+% functional analysis. The math macros can be used independently of
+% the full |nchairx| package under the name |chairxmath|. However,
+% |nchairx| always includes the math macros.
+%
+% \subsection{The Handling of the Fonts}
+% \input{chairxmathFontsDoc.dtx}
+%
+% \subsection{New Delimiter Sizes}
+% \input{chairxmathDelimitersDoc.dtx}
+%
+% \subsection{Decoration}
+% \input{chairxmathDecorationDoc.dtx}
+%
+% \setlength{\parindent}{0pt}
+%
+% \subsection{General Mathematics Macros}
+% \input{chairxmathGeneralDoc.dtx}
+%
+% \subsection{Algebra}
+% \input{chairxmathAlgebraDoc.dtx}
+%
+% \subsection{Analysis}
+% \input{chairxmathAnalysisDoc.dtx}
+%
+% \subsection{Category Theory}
+% \input{chairxmathCategoryDoc.dtx}
+%
+% \subsection{Differential Geometry}
+% \input{chairxmathDiffgeoDoc.dtx}
+%
+% \subsection{Linear Algebra}
+% \input{chairxmathLinalgDoc.dtx}
+%
+% \subsection{Statistics}
+% \input{chairxmathStatisticsDoc.dtx}
+%
+% \subsection{Topology}
+% \input{chairxmathTopologyDoc.dtx}
+%
+% \section{Known Bugs and Conflicts}
+%
+% There are several conflicts possible since |nchairx| loads a number
+% of other packages, some with explicit options needed to obtain the
+% aspired functionality. In this case, it can not be avoided that the
+% packages is loaded via |nchairx|.
+% \begin{itemize}
+% \item The package |xkeyval| is loaded without options. This is
+% necessary for many reasons like internal processing of ifs etc.
+% \item The package |amsmath| and |amssymb| are loaded. This can
+% sometimes yield unexpected conflicts with packages overwriting
+% commands from these two packages.
+% \item We define a smiley symbol from the |wasysym| font. This gives
+% a conflict with the |wasysym| package.
+% \item We load the |tensor| package and overwrite the |\tensor|
+% command of that package. The original macro is available under
+% |\originaltensor| and as identical macro |\decorate|.
+% \item We load |ntheorem| with specified options. This is unavoidable
+% to have the correct behaviour of our environments.
+% \item The theorem lists from the |ntheorem| package seem to crash
+% with the |babel| names we use for the actual environments. A
+% workaround for this is e.g.
+% \begin{quote}
+% |\makeatletter \listtheorems{definitions} \makeatother|
+% \end{quote}
+% to get the list of definitions.
+% \end{itemize}
+%
+% \StopEventually{\PrintIndex \PrintChanges}
+%
+%
+% \section{Implementation}
+% \label{sec:Implementation}
+%
+%
+% \subsection{Processing the Options}
+%
+% Before including other packages we make sure that we can use
+% key-value pairs as options using |xkeyval|
+%
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+% \end{macrocode}
+%
+% Before including other required packages we have to process the
+% options that might alter the options given to these packages.
+%
+% First we create ifs for later use.
+%
+% \begin{macrocode}
+\newif\if@loadmath \@loadmathtrue
+% \end{macrocode}
+%
+% Define option for excluding math macros
+%
+% \begin{macrocode}
+\DeclareOptionX[chairx]<math>{noMath}{
+ \@loadmathfalse
+}
+% \end{macrocode}
+%
+% Process options for the style file
+%
+% \begin{macrocode}
+\ProcessOptionsX[chairx]<math>
+% \end{macrocode}
+%
+% \subsection{Required Packages}
+%
+% After processing the options we can now load the other required
+% packages. The following packages are required for the correct usage
+% of |nchairx|. We include them with some mandatory options.
+%
+% We will need several things from |amsmath| and |amssymb|.
+%
+% \begin{macrocode}
+\RequirePackage{amsmath}
+\RequirePackage{amssymb}
+% \end{macrocode}
+%
+% The |suffix| package allows to define $*$-versions of macros.
+%
+% \begin{macrocode}
+\RequirePackage{suffix}
+% \end{macrocode}
+%
+% The |mathtools| package provides so many nice things to type-set
+% math. Always a good idea to include this. In particular, we will
+% need the |\DeclarePairedDelimiter| command a lot.
+%
+% \begin{macrocode}
+\RequirePackage{mathtools}
+% \end{macrocode}
+%
+% The |ntheorem| package is used to define math environments of
+% various type. We need this package with particular options to make
+% the proof environment work correctly. Note that the proof
+% environment of |ntheorem| places the end-of-proof in a much better
+% way than every other available option.
+%
+% \begin{macrocode}
+\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
+% \end{macrocode}
+%
+% The |graphicx| package is useful for many things. We need it for our
+% logo support to include pdf-files
+% \begin{macrocode}
+\RequirePackage{graphicx}
+% \end{macrocode}
+%
+% The |enumitem| package is now used to generate the enumerated lists
+% of items for the math environments. This allows various fine-tuning
+% and additional functionality for referring to items in lists.
+%
+% \begin{macrocode}
+\RequirePackage{enumitem}
+% \end{macrocode}
+%
+% The |tensor| package is used to place symbols at all possible
+% positions around one central symbol
+% \begin{macrocode}
+\RequirePackage{tensor}
+% \end{macrocode}
+%
+% Some additional fonts and symbols from |stmaryrd|: we only load the
+% font and grab those symbols we actually need to keep things easy.
+%
+% \begin{macrocode}
+\DeclareSymbolFont{stmry}{U}{stmry}{m}{n}
+\SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n}
+% \end{macrocode}
+%
+% Last we need |aliascnt| to allow the usage of |\autoref|.
+%
+% \begin{macrocode}
+\RequirePackage{aliascnt}
+% \end{macrocode}
+%
+% \subsection{The Handling of the Fonts}
+% \input{chairxmathFonts.dtx}
+%
+%
+% \subsection{Setting some Defaults}
+% \input{chairxDefaults.dtx}
+%
+%
+% \subsection{Environments}
+% \input{chairxEnv.dtx}
+%
+%
+% \subsection{Logo Support}
+% \input{chairxLogo.dtx}
+%
+%
+% \subsection{The Math Macros}
+%
+% Include the math macros in alphabetical order of the file names.
+%
+% \input{chairxmathDelimiters.dtx}
+% \input{chairxmathDecoration.dtx}
+% \input{chairxmathGeneral.dtx}
+% \input{chairxmathAlgebra.dtx}
+% \input{chairxmathAnalysis.dtx}
+% \input{chairxmathCategory.dtx}
+% \input{chairxmathDiffgeo.dtx}
+% \input{chairxmathLinalg.dtx}
+% \input{chairxmathStatistics.dtx}
+% \input{chairxmathTopology.dtx}
+%
+% \begin{macrocode}
+% \end{macrocode}
+%
+% \Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/nchairx/source/nchairx.ins b/macros/latex/contrib/nchairx/source/nchairx.ins
new file mode 100644
index 0000000000..2da716a457
--- /dev/null
+++ b/macros/latex/contrib/nchairx/source/nchairx.ins
@@ -0,0 +1,63 @@
+%%
+%% Copyright (C) 2018 by ChairX
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+\input docstrip.tex
+\keepsilent
+\usedir{./}
+\preamble
+This is a generated file.
+
+Copyright (C) 2018 by ChairX
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+
+LaTeX version 2005/12/01 or later.
+\endpreamble
+
+\generate{\file{nchairx.sty}{
+ \from{nchairx.dtx}{nchairx}
+ \from{chairxDefaults.dtx}{chairxDefaults}
+ \from{chairxEnv.dtx}{chairxEnv}
+ \from{chairxLogo.dtx}{chairxLogo}
+ \from{chairxmathFonts.dtx}{chairxmathFonts}
+ \from{chairxmathDelimiters.dtx}{chairxmathDelimiters}
+ \from{chairxmathDecoration.dtx}{chairxmathDecoration}
+ \from{chairxmathGeneral.dtx}{chairxmathGeneral}
+ \from{chairxmathAlgebra.dtx}{chairxmathAlgebra}
+ \from{chairxmathAnalysis.dtx}{chairxmathAnalysis}
+ \from{chairxmathCategory.dtx}{chairxmathCategory}
+ \from{chairxmathDiffgeo.dtx}{chairxmathDiffgeo}
+ \from{chairxmathLinalg.dtx}{chairxmathLinalg}
+ \from{chairxmathStatistics.dtx}{chairxmathStatistics}
+ \from{chairxmathTopology.dtx}{chairxmathTopology}
+ }
+}
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space nchairx.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file nchairx.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/readarray/readarray.pdf b/macros/latex/contrib/readarray/readarray.pdf
index d5dec32e1c..5b8f2b4dbd 100644
--- a/macros/latex/contrib/readarray/readarray.pdf
+++ b/macros/latex/contrib/readarray/readarray.pdf
Binary files differ
diff --git a/macros/latex/contrib/readarray/readarray.sty b/macros/latex/contrib/readarray/readarray.sty
index 562fca3323..fb6c2ba90d 100644
--- a/macros/latex/contrib/readarray/readarray.sty
+++ b/macros/latex/contrib/readarray/readarray.sty
@@ -1,5 +1,5 @@
-\def\readarrayPackageVersion{2.0}
-\def\readarrayPackageDate{2016/11/07}
+\def\readarrayPackageVersion{3.0}
+\def\readarrayPackageDate{2021/08/08}
\ProvidesPackage{readarray}
[\readarrayPackageDate\ \readarrayPackageVersion\ %
Routines for inputting 2D and 3D array data and recalling it on an
@@ -33,7 +33,10 @@ element-by-element basis.]
% -Deprecated \Arrayijk, \arrayijk, \Arrayij, & \arrayij. Direct
% access now preferred, e.g., \xyz[2,3,1].
% -Deprecated most other commands in favor of a more natural syntax.
-\RequirePackage{ifthen}
+% v3.0 (2021-08-05)
+% -Added features: \setvalue, \initarray, \mergearray, \typesetarray
+% -Allowed for \readarrayendlinechar to be set other than 9
+\RequirePackage{forloop}
\RequirePackage{listofitems}[2016-10-22]
%
\newcounter{@index}
@@ -42,13 +45,12 @@ element-by-element basis.]
\newcounter{@col}
\newcounter{use@args}
\newcounter{@record}
-\newcounter{arg@index}
-\newcounter{break@count}
\newcounter{index@count}
-\newcounter{loop@count}
\newtoks\Arg@toks
\newtoks\@arrayident@toks
\newread\rdar@file
+\newcount\readarrayendlinechar
+\edef\readarraybackslash{\expandafter\@firstoftwo\string\\}
%
\newcommand\readdef[2]{\@readdef{#1}{#2}{ArrayRecord}}
%
@@ -59,61 +61,57 @@ element-by-element basis.]
\expandafter\ra@TermB\expandafter{\@arrayident}%
}
%
-\newcommand\readarray{\@ifstar{\read@array@newsyntax[*]}{\read@array@newsyntax[]}}
+\newcommand\readarray{\@ifstar
+ {\read@array@newsyntax[*]}{\read@array@newsyntax[]}}
%
\def\arraytomacro#1[#2]#3{%
- \edef\@arrayident{\rdar@macroname#1[#2]}%
- \@arrayident@toks=\expandafter\expandafter\expandafter{\csname\@arrayident\endcsname}%
+ \@arrayident@toks=\expandafter\expandafter\expandafter
+ {\csname\rdar@macroname#1[#2]\endcsname}%
\expandafter\def\expandafter#3\expandafter{\the\@arrayident@toks}%
}
%
\newcommand\readarraysepchar[1]{\def\read@array@sepchar{#1}}
%
-\def\nocheckbounds{\def\rootmacro@aux##1##2##3{##1%
+\def\nocheckbounds{\def\rootmacro@aux##1##2{\csname##1[##2]\endcsname%
}\typeout{readarray: bounds checking OFF}%
}
%
-\def\checkbounds{\def\rootmacro@aux##1##2##3{##1%
- \expandafter\ifx##1\relax\readarrayboundfailmsg%
- \setbox0=\hbox{\typeout{readarray Warning: ##1 out of bounds.}}%
+\def\checkbounds{\def\rootmacro@aux##1##2{%
+ \ifcsname##1[##2]\endcsname\csname##1[##2]\endcsname\else%
+ \readarrayboundfailmsg%
+ \typeout{readarray Warning: \readarraybackslash##1[##2] undefined.}%
\fi%
}\typeout{readarray: bounds checking ON}%
}
%
-\def\hypercheckbounds{\def\rootmacro@aux##1##2##3{##1%
- \expandafter\ifx##1\relax\readarrayboundfailmsg%
- \typeout{readarray Warning: ##1 out of bounds:}%
- \fi%
- \setcounter{index@count}{0}%
- \parse@index##3,\relax%
- \setcounter{loop@count}{0}%
- \whiledo{\value{loop@count}<\value{index@count}}{%
- \stepcounter{loop@count}%
- \ifnum\csname parsed@index[\theloop@count]\endcsname<0%
- \relax\typeout{\nonposmessage{##2}{##3}}\fi%
- }%
- \ifnum \value{index@count}=1\relax%
- \ifnum\csname parsed@index[1]\endcsname>%
- \csname##2CELLS\endcsname\relax\typeout{\recordmessage{##2}{##3}}\fi%
- \fi
- \ifnum \value{index@count}=2\relax%
- \ifnum\csname parsed@index[1]\endcsname>%
- \csname##2ROWS\endcsname\relax\typeout{\rowmessage{##2}{%
- \csname parsed@index[1]\endcsname}}\fi%
- \ifnum\csname parsed@index[2]\endcsname>%
- \csname##2COLS\endcsname\relax\typeout{\colmessage{##2}{%
- \csname parsed@index[2]\endcsname}}\fi%
- \fi
- \ifnum \value{index@count}=3\relax%
- \ifnum\csname parsed@index[1]\endcsname>%
- \csname##2PLANES\endcsname\relax\typeout{\planemessage{##2}{%
- \csname parsed@index[1]\endcsname}}\fi%
- \ifnum\csname parsed@index[2]\endcsname>%
- \csname##2ROWS\endcsname\relax\typeout{\rowmessage{##2}{%
- \csname parsed@index[2]\endcsname}}\fi%
- \ifnum\csname parsed@index[2]\endcsname>%
- \csname##2COLS\endcsname\relax\typeout{\colmessage{##2}{%
- \csname parsed@index[3]\endcsname}}\fi%
+\def\hypercheckbounds{\def\rootmacro@aux##1##2{%
+ \ifcsname##1[##2]\endcsname\csname##1[##2]\endcsname\else
+ \readarrayboundfailmsg%
+ \typeout{readarray Warning: \readarraybackslash##1[##2] undefined:}%
+ \setcounter{index@count}{0}%
+ \parse@index##2,\relax%
+ \forloop{@index}{1}{\value{@index}<\numexpr\theindex@count+1}{%
+ \ifnum\parsed@index[\the@index]<1%
+ \relax\typeout{ \nonpos@message{##1}{##2}}\fi%
+ }%
+ \ifnum \value{index@count}=1\relax%
+ \ifnum\parsed@index[1]>\csname##1CELLS\endcsname\relax
+ \typeout{ \record@message{##1}{##2}}\fi%
+ \fi
+ \ifnum \value{index@count}=2\relax%
+ \ifnum\parsed@index[1]>\csname##1ROWS\endcsname\relax
+ \typeout{ \row@message{##1}{\parsed@index[1]}}\fi%
+ \ifnum\parsed@index[2]>\csname##1COLS\endcsname\relax
+ \typeout{ \col@message{##1}{\parsed@index[2]}}\fi%
+ \fi
+ \ifnum \value{index@count}=3\relax%
+ \ifnum\parsed@index[1]>\csname##1PLANES\endcsname\relax
+ \typeout{ \plane@message{##1}{\parsed@index[1]}}\fi%
+ \ifnum\parsed@index[2]>\csname##1ROWS\endcsname\relax
+ \typeout{ \row@message{##1}{\parsed@index[2]}}\fi%
+ \ifnum\parsed@index[3]>\csname##1COLS\endcsname\relax
+ \typeout{ \col@message{##1}{\parsed@index[3]}}\fi%
+ \fi%
\fi%
}\typeout{readarray: bounds hyperchecking ON}%
}
@@ -122,30 +120,30 @@ element-by-element basis.]
%
\def\getArg@toks[#1]{\Arg@toks\expandafter\expandafter\expandafter{\Arg@list[#1]}}
%
-\newcommand\@readdef[3]{%
+\def\@readdef#1#2#3{%
\clear@array{#3}%
\edef\former@recordcount{\csname #3CELLS\endcsname}%
\def\first@row{T}%
\def\first@plane{T}%
- \catcode\endlinechar=9 %
+ \catcode\endlinechar=\readarrayendlinechar\relax %
\def#2{}%
\setcounter{@record}{0}%
\openin\rdar@file=#1%
\loop\unless\ifeof\rdar@file%
- \read\rdar@file to\rdar@fileline % Reads a line of the file into \rdar@fileline%
+ \read\rdar@file to\rdar@fileline % Reads file line into \rdar@fileline%
\addtocounter{@record}{1}%
\expandafter\g@addto@macro\expandafter#2\expandafter{\rdar@fileline}%
- \ifthenelse{\equal{\rdar@fileline}{}}{}{\expandafter\g@addto@macro%
- \expandafter#2\expandafter{\read@array@sepchar}}%
+ \ifx\rdar@fileline\empty\else\expandafter\g@addto@macro%
+ \expandafter#2\expandafter{\read@array@sepchar}\fi%
\if T\first@row\read@array{#2}\setcounter{@col}{\numexpr(\Arg@listlen-1)}%
\edef\ncols{\arabic{@col}}\def\first@row{F}\setcounter{@row}{1}%
\else%
\if T\first@plane%
- \ifthenelse{\equal{\rdar@fileline}{}}{%
+ \ifx\rdar@fileline\empty
\edef\nrows{\arabic{@row}}\def\first@plane{F}%
- }{%
+ \else
\addtocounter{@row}{1}%
- }%
+ \fi
\fi%
\fi%
\def\record@name{\csname #3[\the@record]\endcsname}%
@@ -163,18 +161,17 @@ element-by-element basis.]
}
%
\def\read@array@newsyntax[#1]#2#3[#4,#5]{%
- \edef\@arrayident{\rdar@macroname#3}%
\setcounter{index@count}{0}%
\parse@index#5,\relax%
\ifnum\value{index@count}=1\relax%
- \def\ra@TermA{\readArrayij#1{#2}}%
- \edef\ra@TermB{{\@arrayident}{\csname parsed@index[1]\endcsname}}%
+ \def\ra@TermA{\read@Arrayij[#1]{#2}}%
+ \edef\ra@TermB{{\rdar@macroname#3}{\parsed@index[1]}}%
\expandafter\ra@TermA\ra@TermB%
\else
\ifnum\value{index@count}=2\relax%
- \def\ra@TermA{\readArrayijk#1{#2}}%
- \edef\ra@TermB{{\@arrayident}{\csname parsed@index[1]\endcsname}%
- {\csname parsed@index[2]\endcsname}}%
+ \def\ra@TermA{\read@Arrayijk[#1]{#2}}%
+ \edef\ra@TermB{{\rdar@macroname#3}{\parsed@index[1]}%
+ {\parsed@index[2]}}%
\expandafter\ra@TermA\ra@TermB%
\fi\fi
}
@@ -184,29 +181,27 @@ element-by-element basis.]
\read@array[#1]{#2}%
\setcounter{@plane}{\numexpr(\Arg@listlen/#5/#4)}%
\setcounter{use@args}{\numexpr\arabic{@plane}*#4*#5}%
- \ifthenelse{\arabic{use@args} > \Arg@listlen}{%
+ \ifnum\arabic{use@args} > \Arg@listlen\relax
\addtocounter{@plane}{-1}%
\setcounter{use@args}{\numexpr\arabic{@plane}*#4*#5}%
- }{}%
+ \fi%
\expandafter\edef\csname#3PLANES\endcsname{\arabic{@plane}}%
\expandafter\edef\csname#3ROWS\endcsname{#4}%
\expandafter\edef\csname#3COLS\endcsname{#5}%
\expandafter\edef\csname#3CELLS\endcsname{\arabic{use@args}}%
- \setcounter{@index}{0}%
\setcounter{@plane}{1}%
\setcounter{@row}{1}%
\setcounter{@col}{0}%
- \whiledo{\value{@index} < \value{use@args}}{%
- \addtocounter{@index}{1}%
+ \forloop{@index}{1}{\value{@index} < \numexpr\value{use@args}+1}{%
\addtocounter{@col}{1}%
- \ifthenelse{\value{@col} > #5}%
- {\addtocounter{@row}{1}%
- \addtocounter{@col}{-#5}}%
- {}%
- \ifthenelse{\value{@row} > #4}%
- {\addtocounter{@plane}{1}%
- \addtocounter{@row}{-#4}}%
- {}%
+ \ifnum\value{@col} > #5\relax
+ \addtocounter{@row}{1}%
+ \addtocounter{@col}{-#5}%
+ \fi
+ \ifnum\value{@row} > #4\relax
+ \addtocounter{@plane}{1}%
+ \addtocounter{@row}{-#4}%
+ \fi
\def\arg@name{\csname#3[\the@plane,\the@row,\the@col]\endcsname}%
\getArg@toks[\the@index]%
\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter%
@@ -220,24 +215,22 @@ element-by-element basis.]
\read@array[#1]{#2}%
\setcounter{@row}{\numexpr(\Arg@listlen/#4)}%
\setcounter{use@args}{\numexpr\arabic{@row}*#4}%
- \ifthenelse{\arabic{use@args} > \Arg@listlen}{%
+ \ifnum\arabic{use@args} > \Arg@listlen\relax
\addtocounter{@row}{-1}%
\setcounter{use@args}{\numexpr\arabic{@row}*#4}%
- }{}%
+ \fi
\expandafter\edef\csname#3PLANES\endcsname{0}%
\expandafter\edef\csname#3ROWS\endcsname{\arabic{@row}}%
\expandafter\edef\csname#3COLS\endcsname{#4}%
\expandafter\edef\csname#3CELLS\endcsname{\arabic{use@args}}%
- \setcounter{@index}{0}%
\setcounter{@row}{1}%
\setcounter{@col}{0}%
- \whiledo{\value{@index} < \value{use@args}}{%
- \addtocounter{@index}{1}%
+ \forloop{@index}{1}{\value{@index} < \numexpr\value{use@args}+1}{%
\addtocounter{@col}{1}%
- \ifthenelse{\value{@col} > #4}%
- {\addtocounter{@row}{1}%
- \addtocounter{@col}{-#4}}%
- {}%
+ \ifnum\value{@col} > #4\relax
+ \addtocounter{@row}{1}%
+ \addtocounter{@col}{-#4}%
+ \fi
\def\arg@name{\csname#3[\the@row,\the@col]\endcsname}%
\getArg@toks[\the@index]%
\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter%
@@ -246,44 +239,163 @@ element-by-element basis.]
\define@rootmacro{#3}%
}
%
-\newcommand\clear@array[1]{%
- \expandafter\ifx\csname #1\endcsname\relax\else%
- \setcounter{@row}{0}%
- \whiledo{\value{@row}<\csname #1ROWS\endcsname}{%
- \stepcounter{@row}%
+\newcommand\read@array[2][]{%
+ \bgroup%
+ \ifx\empty\read@array@sepchar
+ \setsepchar{\empty}%
+ \else
+ \expandafter\setsepchar\expandafter{\read@array@sepchar}%
+ \fi
+ \greadlist#1\Arg@list{#2}%
+ \egroup%
+ \edef\Arg@listCELLS{\Arg@listlen}%
+}
+%
+\def\clear@array#1{%
+ \ifcsname #1\endcsname%
+ \forloop{@row}{1}{\value{@row}<\numexpr\csname #1ROWS\endcsname+1}{%
\ifnum\csname #1COLS\endcsname=0\relax%
- \expandafter\let\csname #1[\the@row]\endcsname\relax%
+ \expandafter\let\csname #1[\the@row]\endcsname\undefined%
\else
- \setcounter{@col}{0}%
- \whiledo{\value{@col}<\csname #1COLS\endcsname}{%
- \stepcounter{@col}%
+ \forloop{@col}{1}{\value{@col}<\numexpr\csname #1COLS\endcsname+1}{%
\ifnum\csname #1PLANES\endcsname=0\relax%
- \expandafter\let\csname #1[\the@row,\the@col]\endcsname\relax%
+ \expandafter\let\csname #1[\the@row,\the@col]\endcsname
+ \undefined%
\else
- \setcounter{@plane}{0}%
- \whiledo{\value{@plane}<\csname #1PLANES\endcsname}{%
- \stepcounter{@plane}%
+ \forloop{@plane}{1}{\value{@plane}<\numexpr\csname #1PLANES\endcsname+1}{%
\expandafter%
- \let\csname #1[\the@plane,\the@row,\the@col]\endcsname\relax%
+ \let\csname #1[\the@plane,\the@row,\the@col]\endcsname
+ \undefined%
}%
\fi%
}%
\fi%
}%
+ \expandafter\let\csname #1PLANES\endcsname\undefined
+ \expandafter\let\csname #1ROWS\endcsname\undefined
+ \expandafter\let\csname #1PLANES\endcsname\undefined
+ \expandafter\let\csname #1\endcsname\undefined
\fi%
}
%
-\newcommand\read@array[2][]{%
- \bgroup%
- \expandafter\setsepchar\expandafter{\read@array@sepchar}%
- \greadlist#1\Arg@list{#2}%
- \egroup%
- \edef\Arg@listCELLS{\Arg@listlen}%
+\def\setvalue#1[#2]#3{%
+ \ifcsname\rdar@macroname#1[#2]\endcsname
+ \expandafter\def\csname\rdar@macroname#1[#2]\endcsname{#3}%
+ \else
+ \typeout{readarray Warning (setvalue = #3):
+ \readarraybackslash\rdar@macroname#1[#2] undefined.}%
+ \fi%
+}
+%
+\def\readarray@initializedata#1[#2]#3{%
+ \expandafter\def\csname
+ \rdar@macroname#1[#2]\expandafter\endcsname\expandafter{#3}%
+}
+%
+\def\initarray#1[#2]{%
+ \edef\@tmp{\rdar@macroname#1}%
+ \expandafter\clear@array\expandafter{\@tmp}%
+ \expandafter\define@rootmacro\expandafter{\@tmp}%
+ \setcounter{index@count}{0}%
+ \parse@index#2,\relax
+ \ifnum\value{index@count}=2\relax
+ \setcounter{use@args}{\numexpr\parsed@index[1]*\parsed@index[2]}
+ \expandafter\def\csname\@tmp PLANES\endcsname{0}
+ \expandafter\edef\csname\@tmp ROWS\endcsname{\parsed@index[1]}
+ \expandafter\edef\csname\@tmp COLS\endcsname{\parsed@index[2]}
+ \expandafter\edef\csname\@tmp CELLS\endcsname{\theuse@args}
+ \forloop{@row}{1}{\value{@row}<\numexpr\parsed@index[1]+1}{%
+ \forloop{@col}{1}{\value{@col}<\numexpr\parsed@index[2]+1}{%
+ \readarray@initializedata#1[\the@row,\the@col]{\readarrayinitvalue}}}
+ \else
+ \ifnum\value{index@count}=3\relax
+ \setcounter{use@args}{\numexpr\parsed@index[1]*
+ \parsed@index[2]*\parsed@index[3]}
+ \expandafter\edef\csname\@tmp PLANES\endcsname{\parsed@index[1]}
+ \expandafter\edef\csname\@tmp ROWS\endcsname{\parsed@index[2]}
+ \expandafter\edef\csname\@tmp COLS\endcsname{\parsed@index[3]}
+ \expandafter\edef\csname\@tmp CELLS\endcsname{\theuse@args}
+ \forloop{@plane}{1}{\value{@plane}<\numexpr\parsed@index[1]+1}{%
+ \forloop{@row}{1}{\value{@row}<\numexpr\parsed@index[2]+1}{%
+ \forloop{@col}{1}{\value{@col}<\numexpr\parsed@index[3]+1}{%
+ \readarray@initializedata#1[\the@plane,\the@row,\the@col]{%
+ \readarrayinitvalue}}}}
+ \else
+ [initarray ERROR: 2-D or 3-D arrays only]
+ \fi
+ \fi
+}
+%
+\def\mergearray#1#2[#3]{%
+ \setcounter{index@count}{0}%
+ \parse@index#3,\relax
+ \ifnum\value{index@count}=2\relax
+ \forloop{@row}{1}{\value{@row}<
+ \numexpr\csname\rdar@macroname#1ROWS\endcsname+1}{%
+ \forloop{@col}{1}{\value{@col}<
+ \numexpr\csname\rdar@macroname#1COLS\endcsname+1}{%
+ \edef\tmpA{\the\numexpr\the@row+\parsed@index[1]-1,%
+ \the\numexpr\the@col+\parsed@index[2]-1}%
+ \edef\tmpB{\csname\rdar@macroname#1[\the@row,\the@col]\endcsname}%
+ \def\tmpC{\setvalue#2[\tmpA]}%
+ \expandafter\tmpC\expandafter{\tmpB}}}%
+ \else
+ \ifnum\value{index@count}=3\relax
+ \forloop{@plane}{1}{\value{@plane}<
+ \numexpr\csname\rdar@macroname#1PLANES\endcsname+1}{%
+ \forloop{@row}{1}{\value{@row}<
+ \numexpr\csname\rdar@macroname#1ROWS\endcsname+1}{%
+ \forloop{@col}{1}{\value{@col}<
+ \numexpr\csname\rdar@macroname#1COLS\endcsname+1}{%
+ \edef\tmpA{\the\numexpr\the@plane+\parsed@index[1]-1,%
+ \the\numexpr\the@row+\parsed@index[2]-1,%
+ \the\numexpr\the@col+\parsed@index[3]-1}%
+ \edef\tmpB{\csname\rdar@macroname#1%
+ [\the@plane,\the@row,\the@col]\endcsname}%
+ \def\tmpC{\setvalue#2[\tmpA]}%
+ \expandafter\tmpC\expandafter{\tmpB}}}}%
+ \else
+ [mergearray ERROR: 2-D or 3-D arrays only]
+ \fi
+ \fi
+}
+%
+\def\addtoArg@toks#1{\Arg@toks\expandafter{\the\Arg@toks#1}}
+\def\xaddtoArg@toks#1{\expandafter\addtoArg@toks\expandafter{#1}}
+\def\xxaddtoArg@toks#1{\expandafter\xaddtoArg@toks\expandafter{#1}}
+%
+\def\typesetarray#1{\noindent\Arg@toks{}%
+ \ifnum\csname\rdar@macroname#1PLANES\endcsname>0\relax
+ \forloop{@plane}{1}{\value{@plane}<
+ \numexpr\csname\rdar@macroname#1PLANES\endcsname+1}{%
+ \ifnum\the@plane=1 \else\xaddtoArg@toks{\typesetplanesepchar}\fi%
+ \forloop{@row}{1}{\value{@row}<
+ \numexpr\csname\rdar@macroname#1ROWS\endcsname+1}{%
+ \ifnum\the@row=1 \else\xaddtoArg@toks{\typesetrowsepchar}\fi%
+ \forloop{@col}{1}{\value{@col}<
+ \numexpr\csname\rdar@macroname#1COLS\endcsname+1}{%
+ \ifnum\the@col=1 \else\xaddtoArg@toks{\typesetcolsepchar}\fi%
+ \xaddtoArg@toks{\expandafter\typesetcell\expandafter
+ {\csname\rdar@macroname#1[\the@plane,\the@row,\the@col]\endcsname}}}%
+ }%
+ }%
+ \else
+ \forloop{@row}{1}{\value{@row}<
+ \numexpr\csname\rdar@macroname#1ROWS\endcsname+1}{%
+ \ifnum\the@row=1 \else\xaddtoArg@toks{\typesetrowsepchar}\fi%
+ \forloop{@col}{1}{\value{@col}<
+ \numexpr\csname\rdar@macroname#1COLS\endcsname+1}{%
+ \ifnum\the@col=1 \else\xaddtoArg@toks{\typesetcolsepchar}\fi%
+ \xaddtoArg@toks{\expandafter\typesetcell\expandafter
+ {\csname\rdar@macroname#1[\the@row,\the@col]\endcsname}}%
+ }%
+ }%
+ \fi
+ \the\Arg@toks
}
%
\def\define@rootmacro#1{%
- \expandafter\def\csname#1\endcsname[##1]{%
- \expandafter\rootmacro@aux\csname #1[##1]\endcsname{#1}{##1}}%
+ \expandafter\def\csname#1\endcsname[##1]{\rootmacro@aux{#1}{##1}}%
}
%
\def\parse@index#1,#2\relax{%
@@ -291,21 +403,43 @@ element-by-element basis.]
\expandafter\gdef\csname parsed@index[\theindex@count]\endcsname{#1}%
\ifx\relax#2\relax\else\parse@index#2\relax\fi%
}
+%
+\def\parsed@index[#1]{\csname parsed@index[#1]\endcsname}
+%
% INITIALIZATION
+% ON \readdef, SEP CHAR INSERTED AFTER EACH RECORD;
+% ON \readarray, SEP CHAR SERVES AS DATA-FIELD SEPARATOR
\readarraysepchar{ }
-\nocheckbounds
+% ON \readdef, IGNORE END-LINE CHARS BY DEFAULT (NORMAL LaTeX MODE = 5)
+\readarrayendlinechar=9
+% DEFAULT CELL DATA FOR \initarray
+\def\readarrayinitvalue{-}
+% DEFAULT FIELD SEPARATORS FOR \typesetarray
+\def\typesetplanesepchar{\\---\\}
+\def\typesetrowsepchar{\\}
+\def\typesetcolsepchar{,}
+% DEFAULT CELL FORMATTING ON \typesetarray
+\def\typesetcell#1{#1}
%
-\def\nonposmessage#1#2{Negative index [#2] impermissable for #1.}
-\def\recordmessage#1#2{RECORD=#2 exceeds bounds(=\csname#1CELLS\endcsname) for #1.}
-\def\planemessage#1#2{PLANE=#2 exceeds bounds(=\csname#1PLANES\endcsname) for #1.}
-\def\rowmessage#1#2{ROW=#2 exceeds bounds(=\csname#1ROWS\endcsname) for #1.}
-\def\colmessage#1#2{COL=#2 exceeds bounds(=\csname#1COLS\endcsname) for #1.}
+\nocheckbounds% DEFAULT IS NO BOUNDS CHECKING
%
-\def\the@showargs@rule{\kern.2pt\rule{.8ex}{1.6ex}\hspace{.2pt}}%
-\def\readarrayboundfailmsg{?}% DISPLAYED WHEN ARRAY CALL OUT OF BOUNDS
+\def\nonpos@message#1#2{Nonpositive index [#2] prohibited for \ra@nm#1.}
+\def\record@message#1#2{%
+ RECORD=#2 exceeds bounds(=\csname#1CELLS\endcsname) for \ra@nm#1.}
+\def\plane@message#1#2{%
+ PLANE=#2 exceeds bounds(=\csname#1PLANES\endcsname) for \ra@nm#1.}
+\def\row@message#1#2{%
+ ROW=#2 exceeds bounds(=\csname#1ROWS\endcsname) for \ra@nm#1.}
+\def\col@message#1#2{%
+ COL=#2 exceeds bounds(=\csname#1COLS\endcsname) for \ra@nm#1.}
+%
+\def\readarrayboundfailmsg{?}% WHEN ARRAY CALL OUT OF BOUNDS, IF BOUNDS CHECKING ON
+\def\ra@nm#1.{\readarraybackslash#1.}
%
-% SUPPORT/DEBUG ROUTINES
+% SUPPORT/DEBUG ROUTINES
+% (THESE ARE DEPRECATED...CONSIDER USING \typesetarray AS AN ALTERNATIVE)
%
+\def\the@showargs@rule{\kern.2pt\rule{.8ex}{1.6ex}\hspace{.2pt}}%
% \arraydump INITIALIZATIONS
\def\row@spacer{\\}
\def\row@msg{\the@showargs@rule\hfill{\scriptsize\scshape$<$\row@sign~\arabic{@row}$>$}}
@@ -315,32 +449,27 @@ element-by-element basis.]
\def\close@out{}
%
\newcommand\arraydump[1]{%
- \edef\@arrayident{\rdar@macroname#1}%
- \expandafter\ifx\csname\@arrayident\endcsname\relax\else%
- \edef\ra@TmpA{\csname\@arrayident PLANES\endcsname}%
- \edef\ra@TmpB{\csname\@arrayident COLS\endcsname}%
+ \expandafter\ifx\csname\rdar@macroname#1\endcsname\relax\else%
+ \edef\ra@TmpA{\csname\rdar@macroname#1PLANES\endcsname}%
+ \edef\ra@TmpB{\csname\rdar@macroname#1COLS\endcsname}%
\def\ra@rank{3-D}%
\ifnum\ra@TmpA=0\relax\def\ra@TmpA{1}\def\plane@sign{\mbox{}}\def\ra@rank{2-D}%
\else\def\plane@sign{{\scriptsize\scshape Plane \arabic{@plane}}}\fi%
\ifnum\ra@TmpB=0\relax\def\ra@TmpB{1}\def\row@sign{Record}\def\ra@rank{1-D}%
\else\def\row@sign{Row}\fi%
\par\noindent\header@msg%
- \setcounter{@plane}{0}%
- \whiledo{\value{@plane}<\ra@TmpA}{%
- \stepcounter{@plane}%
+ \forloop{@plane}{1}{\value{@plane}<\numexpr\ra@TmpA+1}{%
\plane@msg%
- \setcounter{@row}{0}%
- \whiledo{\value{@row}<\csname\@arrayident ROWS\endcsname}{%
- \ifnum\value{@row}=0\relax\else\row@spacer\fi%
- \stepcounter{@row}%
- \setcounter{@col}{0}%
- \whiledo{\value{@col}<\ra@TmpB}{%
+ \forloop{@row}{1}{\value{@row}<
+ \numexpr\csname\rdar@macroname#1ROWS\endcsname+1}{%
+ \ifnum\value{@row}=1\relax\else\row@spacer\fi%
+ \forloop{@col}{1}{\value{@col}<
+ \numexpr\ra@TmpB+1}{%
\the@showargs@rule%
- \stepcounter{@col}%
- \ifnum\csname\@arrayident COLS\endcsname=0\relax%
+ \ifnum\csname\rdar@macroname#1COLS\endcsname=0\relax%
#1[\the@row]%
\else%
- \ifnum\csname\@arrayident PLANES\endcsname=0\relax%
+ \ifnum\csname\rdar@macroname#1PLANES\endcsname=0\relax%
#1[\the@row,\the@col]%
\else%
#1[\the@plane,\the@row,\the@col]%
@@ -355,13 +484,35 @@ element-by-element basis.]
\newcommand\scalardump[1]{\bgroup%
\def\row@spacer{}%
\def\row@msg{}%
- \def\header@msg{{\bfseries\csname\@arrayident CELLS\endcsname\ ELEMENTS:}%
+ \def\header@msg{{\bfseries\csname\rdar@macroname####1CELLS\endcsname\ ELEMENTS:}%
~\hrulefill\mbox{}\\}%
\def\last@row{}%
\def\plane@msg{}%
\def\close@out{\the@showargs@rule\\}%
\arraydump#1\egroup%
}
+
+\endinput
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMANDS THAT WERE DEPRECATED IN v2.0 (2016-11-10), NOT BEING IN THE PREFERRED
+PACKAGE SYNTAX, THAT HAVE BEEN ELIMINATED in v3.0 (2021)
+CODE PROVIDED BELOW AS A COPY/PASTE LAST RESORT FOR STRAGGLERS
+
+\usepackage{ifthen}
%
% DEPRECATED COMMANDS (NOT PREFERRED EMBODIMENT OF PACKAGE SYNTAX)
%
@@ -422,6 +573,4 @@ element-by-element basis.]
\Arg@list[\value{@index}]}%
}%
}
-\endinput
-
diff --git a/macros/latex/contrib/readarray/readarray.tex b/macros/latex/contrib/readarray/readarray.tex
index 8376958419..bd9a4aa114 100644
--- a/macros/latex/contrib/readarray/readarray.tex
+++ b/macros/latex/contrib/readarray/readarray.tex
@@ -1,26 +1,5 @@
\documentclass{article}
-%% Copyright 2013 Steven B. Segletes
-%
-% 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.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Steven B. Segletes.
-% Revisions:
-% v1.01 Documentation revision
-% v1.1 Added \csname record\roman{@row}\endcsname to \readdef
-% v1.2 -Corrected the [truncated] LPPL license info
-% -Added \arrayij and \arrayijk, which can be put into \edef
-% -Used \romannumeral in preference to \roman{}, when possible,
-% to avoid unnecessary use of counters.
-% v1.3 -Moved \newread outside of \readdef, so as not to exhaust the
-% 16 allotted file streams (Thanks to Ken Kubota for the tip).
+
\usepackage{tabstackengine}[2016-10-04]
\usepackage{lmodern}
\usepackage[T1]{fontenc}
@@ -32,8 +11,7 @@
\def\cmd#1{\texttt{\string\ \unskip#1}}
\usepackage{readarray}
\usepackage{verbatimbox}
-\usepackage{filecontents}
-\begin{filecontents*}{file1data.txt}
+\begin{filecontents*}[overwrite]{file1data.txt}
A111 A112 A113 A114
A121 A122 A123 A124
A131 A132 A133 A134
@@ -42,7 +20,7 @@ A211 A212 A213 A214
A221 A222 A223 A224
A231 A232 A233 A234
\end{filecontents*}
-\begin{filecontents*}{file2data.txt}
+\begin{filecontents*}[overwrite]{file2data.txt}
\def{\dataA}{%
A111 A112 A113 A114
A121 A122 A123 A124
@@ -53,7 +31,7 @@ A221 A222 A223 A224
A231 A232 A233 A234
}
\end{filecontents*}
-\begin{filecontents*}{file3data.txt}
+\begin{filecontents*}[overwrite]{file3data.txt}
\textit{am} , \textit{are}, have \textit{been}, have \textit{been}
\textit{are}, \textit{are} , have \textit{been}, have \textit{been}
\textit{is} , \textit{are} , has \textit{been} , have \textit{been}
@@ -80,28 +58,44 @@ will \textit{be}, will \textit{be}, will have \textit{been}, will have \textit{b
\rule{0em}{.7em}\small Routines for inputting formatted array data and
recalling it on an element-by-element basis.\\
\rule{0em}{2.7em}\large Steven B. Segletes\\
-steven.b.segletes.civ@mail.mil\\
+SSegletes@verizon.net\\
\rule{0em}{1.7em}\readarrayPackageDate\\
V\readarrayPackageVersion
\end{center}
-\section*{Comments About Version 2.0}
+\subsection*{Comments About Version 3.0}
-Version 2.0 of the \rdar{} package has brought major changes,
+\vspace{-5pt}
+Version 3.0 of \rdar{} introduces several new features.
+Arrays can be initialized with the \vb|\initarray| command,
+ rather than being read from a file.
+With \vb|\setvalue|, the tokens of individual
+ array cells can be revised on demand.
+The contents of one array can be merged into another
+ by way of the \vb|\mergearray| command.
+The \vb|\typesetarray| command allows for versatile ways
+ to format your array output, including by way
+ of \vb|tabular| environments.
+The way end-of-line characters can be handled on a data-read
+ is made more versatile with this package version.
+There are many new things here---check them out.\vspace{-10pt}
+
+
+\subsubsection*{Comments About Version 2.0}
+
+\vspace{-5pt}
+Version 2.0 of the \rdar{} package brought major changes,
including a \textit{new and improved} syntax.
Functionally, the data-reading/parsing code of the package
- has been revised to use the powerful \loi{} package.
+ was revised to use the powerful \loi{} package.
This has two primary advantages: 1) the data that is read is no
longer expanded prior to the read, so that macros can be read
and stored in the data arrays using their unexpanded tokens; and 2)
list separators other than a space may now be employed
to parse the data into array cells.
-
-While a newer preferred syntax has been introduced for reading and
- recalling arrays, the deprecated syntax is still supported.
The user will also note other small changes, such as the fact that errors
arising from array-boundary violations now appear in the log file
- rather than the document itself.
+ rather than the document itself.\vspace{-10pt}
\section{Description and Commands}
@@ -117,7 +111,6 @@ Note: for 1-D arrays that are to be simply parsed on the basis of a
to do this, without the help of this package.
}
-\clearpage
The commands included in this package help the user to input data, define
it in terms of array elements, and recall those elements at will. Those
commands are:
@@ -127,8 +120,9 @@ commands are:
\textup{To place file data into a data macro:}\\
\rl\vb|\readdef{|filename\vb|}\|data-macro\\
\textup{To place file data into a 1-D file-record array:}\\
-\rl\vb|\readrecordarray{|filename\vb|}\|array-identifier\\
-\textup{To parse a data macro and place the results into a 2-D or 3-D array:}\\
+\rl\vb|\readrecordarray{|filename\vb|}\|array-identifier%
+ \hfill\textup{(1-D)}\\
+\textup{To parse a data macro and place the results into a new 2-D or 3-D array:}\\
\rl\vb|\readarray\|data-macro\vb|\|array-identifier\vb|[-,|columns\vb|]|%
\hfill\textup{(2-D)}\\
\rl\vb|\readarray\|data-macro\vb|\|array-identifier\vb|[-,|rows\vb|,|columns\vb|]|%
@@ -138,28 +132,60 @@ commands are:
\hfill\textup{(2-D)}\\
\rl\vb|\readarray*\|data-macro\vb|\|array-identifier\vb|[-,|rows\vb|,|columns\vb|]|%
\hfill\textup{(3-D)}\\
-\textup{Recall data from indexed array cell:}\\
+\textup{To create a new array, each cell initialized to a default
+ value:}\\
+\rl\vb|\initarray\|array-identifier\vb|[|rows\vb|,|columns\vb|]|%
+ \hfill\textup{(2-D)}\\
+\rl\vb|\initarray\|array-identifier\vb|[|planes\vb|,|rows\vb|,|columns%
+ \vb|]|\hfill\textup{(3-D)}\\
+\textup{To merge each cell of one array into another:}\\
+\rl\vb|\mergearray\|from-array-id\vb|\|to-array-id\vb|[|row\vb|,|%
+ column\vb|]|\hfill\textup{(2-D)}\\
+\rl\vb|\mergearray\|from-array-id\vb|\|to-array-id\vb|[|plane\vb|,|%
+ row\vb|,|column\vb|]|\hfill\textup{(3-D)}\\
+\textup{To typeset an array:}\\
+\rl\vb|\typesetarray\|array-identifier\hfill\textup{(2-D/3-D)}\\
+\textup{Recall (typeset) data from indexed array cell:}\\
\rl\vb|\|array-identifier\vb|[|row\vb|,|column\vb|]|%
\hfill\textup{(2-D)}\\
\rl\vb|\|array-identifier\vb|[|plane\vb|,|row\vb|,|column\vb|]|%
\hfill\textup{(3-D)}\\
\textup{To place the actual tokens of an array cell into a macro:}\\
-\rl\vb|\arraytomacro\|array-identifier\vb|[-,|columns\vb|]\|macro%
+\rl\vb|\arraytomacro\|array-identifier\vb|[|row\vb|,|column\vb|]\|macro%
\hfill\textup{(2-D)}\\
-\rl\vb|\arraytomacro\|array-identifier\vb|[-,|rows\vb|,|columns\vb|]\|macro%
- \hfill\textup{(3-D)}\\
-\textup{To change the array-parsing separator character:}\\
+\rl\vb|\arraytomacro\|array-identifier\vb|[|plane\vb|,|row\vb|,|column%
+ \vb|]\|macro\hfill\textup{(3-D)}\\
+\textup{To manually (re)set the value of an existing array cell:}\\
+\rl\vb|\setvalue\|array-identifier\vb|[|row\vb|,|column\vb|]{|%
+ value\vb|}|\hfill\textup{(2-D)}\\
+\rl\vb|\setvalue\|array-identifier\vb|[|plane\vb|,|row\vb|,|column\vb|]{|%
+ value\vb|}|\hfill\textup{(3-D)}\\
+\textup{To change the array-parsing separator for}
+ \vb|\readdef| \textup{and/or} \vb|\readarray|\textup{:}\\
\rl\vb|\readarraysepchar{|parsing-separator-char\vb|}|\\
+\textup{To change the default (=9) end-of-line catcode for}
+ \vb|\readdef|\textup{:}\\
+\rl\vb|\readarrayendlinechar=|end-of-line-catcode\\
+\textup{To redefine default cell initialization for} \vb|\initarray|
+ \textup{:}\\
+\rl\vb|\renewcommand\readarrayinitvalue{|value\vb|}|\\
+\textup{To redefine default cell format in} \vb|\typesetarray|\textup{:}\\
+\rl\vb|\renewcommand\typesetcell[1]{|format-for-\#1\vb|}|\\
+\textup{To redefine default plane, row, column separator formats for}
+ \vb|\typesetarray|\textup{:}\\
+\rl\vb|\renewcommand\typesetplanesepchar{|format\vb|}|\\
+\rl\vb|\renewcommand\typesetrowsepchar{|format\vb|}|\\
+\rl\vb|\renewcommand\typesetcolsepchar{|format\vb|}|\\
\textup{To select the level of bounds checking on array cell recall:}\\
\rl\vb|\nocheckbounds|\hfill OR\hfill%
\vb|\checkbounds|\hfill OR\hfill%
\vb|\hypercheckbounds|
\upshape
-In these commands, \cmd{}\textit{data-macro} is a command sequence into
+In these commands, \cmd{}\textit{data-macro} is a control sequence into
which the contents of \texttt{filename} are set into a \cmd{def}.
-The \textit{array-identifier} is a sequence of
- (catcode 11) letters that identify the array.
+The \cmd{}\textit{array-identifier} is the array into which cell data is
+ inserted.
The starred version of the commands are used if, during the array
creation, it is desired to automatically excise the array data of
leading and trailing spaces.
@@ -197,7 +223,7 @@ Individual records of the original file, from the most recent
In addition to the strings of fixed name created during the
\cmd{readdef}, there are various strings created during
the \cmd{readarray} whose name is a function of the
- \textit{array-identifier}, such as
+ \cmd{}\textit{array-identifier}, such as
\itshape
\rl\vb|\|array-identifier\vb|CELLS|\\
@@ -205,23 +231,10 @@ In addition to the strings of fixed name created during the
\rl\vb|\|array-identifier\vb|ROWS|\\
\rl\vb|\|array-identifier\vb|COLS|\upshape
-where \textit{array-identifier} is the alphabetic-character string by which
+where \cmd{}\textit{array-identifier} is the name
you have designated a particular array.
Their meaning will be discussed later in this document.
-Support routines which are generally not required directly by
-the user for the specification and recall of data arrays, but which are
-useful for debugging include
-the following:
-
-\itshape
-
-\rl\vb|\arraydump\|array-identifier\\%
-\rl\vb|\scalardump\|array-identifier%
-\upshape
-
-These macros print out the complete array, in either a structured or
- unstructured form, respectively.
\section{Data Structure}
@@ -229,7 +242,7 @@ The first requirement is to lay out a format for the data interface to
this package.
The {\rdar} package is set up to digest data separated by a user-defined
separator character.
-The default separator is a space character but, as of V2.0, the separator
+The default separator is a space character but the separator
may be specified by way of \vb|\readarraysepchar{|\textit{separator}\vb|}|.
The format for the data organization to be digested is as follows,
for 2-D arrays:
@@ -307,6 +320,41 @@ However, two things have been accomplished: 1) the file contents are \cmd{def}'e
into the data macro \cmd{dataA}; and 2) they are also placed into a 1-D
file record array, \cmd{ArrayRecord}.
+Regarding the point that end-of-line characters are replaced
+ with a data separator, these are controlled by two separate
+ mechanisms, each with its own control.
+First, end-of-lines are, by default discarded---this is accomplished
+ internally with \rdar{} setting \vb|\endlinechar| equal to 9,
+ during the \vb|\readdef|.
+This is not the native \LaTeX{} behavior.
+In \LaTeX{}, end-of-lines are converted into spaces, unless
+ preempted with a \vb|%| character or a line-ending control
+ sequence.
+To recover the \LaTeX{} way of treating end-of-lines, the
+ count \vb|\readarrayendlinechar| is provided, which can
+ be set in the manner desired for subsequent invocations
+ of \vb|\readdef|.
+For example, \vb|\readarrayendlinechar=5 | will change
+ subsequent treatment of end-of-line characters to the normal
+ \LaTeX{} treatment.
+
+The second aspect regarding end-of-lines is the data
+ separator inserted when the end-of-line is
+ reached. This is one of the functions of the
+ \vb|\readarraysepchar| macro, the argument to which
+ is the separator inserted into the read, when
+ end-of-line is encountered during a \vb|\readdef|.
+If you don't want any record separators inserted during
+ the \vb|\readdef|, one may set \vb|\readarraysepchar{}|.
+Note, however, that an empty \rdar{} sepchar, while valid
+ during a \vb|\readdef|, is meaningless during a
+ \vb|\readarray| invocation, since it would like to
+ use the sepchar to parse the data.
+Therefore, an empty sepchar should be redefined to
+ a meaningful value prior to invoking \vb|\readarray|.
+See section~\ref{s:sepchar} for more information on the
+ separator character.
+
There is no
\textit{requirement} that the input file be organized with structured rows
of data corresponding to individual file records, nor that blank
@@ -407,7 +455,7 @@ If an array name is reutilized, its prior definitions are cleared,
reutilization.
-\subsection{Creating 2-D and 3-D Arrays}
+\subsection{Creating 2-D and 3-D Arrays from Data}
The \cmd{readarray}\margcmd{readarray} command, used to convert
raw parsable data into data arrays,
@@ -424,10 +472,6 @@ There is a starred version of the command, \cmd{readarray*}, which is used
This option, is only relevant when the data separator is not already a
space.
-If an array name is reutilized, its prior definitions are cleared,
- so that ``old'' data is not inadvertantly retrieved following the
- reutilization.
-
\subsubsection{2-D Arrays}
\begin{sloppypar}
@@ -489,21 +533,66 @@ Data from the 2nd plane, 1st row, 2nd column can be obtained via
If, perchance, a row or plane is only partially defined by
\cmd{readarray}, the partial data is discarded from the array.
-\subsubsection{Array Parsing Separator}
+\subsubsection{Array Parsing Separator\label{s:sepchar}}
While it may be easily envisioned that the array data is numerical, this
need not be the case.
The array data may be text, and even formatted text.
-Furthermore, one may introduce space characters into the data of
- individual cells simply by resetting the \rdar{} parsing separator
- to something other than the default space, ``~''.
-This can be done, for example employing a comma as the separator,
- by way of \vb|\readarraysepchar{,}|.\margcmd{readarraysepchar}
+A key setting, either when inputting information from a file
+ by way of \vb|\readdef| or when parsing a \vb|\def|'ed
+ argument into an array by way of \vb|\readarray|, is the
+ macro \vb|\readarraysepchar|.\margcmd{readarraysepchar}
+
+The value of \vb|\readarraysepchar| is used in distinct
+ ways for \vb|\readdef| and \vb|\readarray|.
+For \vb|\readdef|, the separator is inserted into the
+ \vb|\data-macro|
+ definition whenever an end-line-char (end of record)
+ is encountered.
+For the subsequent \vb|\readarray| (with or without a \vb|*|), the
+ \vb|\readarraysepchar| is used to separate the data
+ contained in the \vb|\data-macro| into individual cell
+ data that will be placed into the \vb|\array-identifier|.
+
+For example, if your data file is comma separated, but the
+ last item of data in each record is not followed by a
+ trailing comma, setting \vb|\readarraysepchar{,}| will
+ assure that the comma gets inserted into the
+ \vb|\data-macro| after each record, during the
+ \vb|\readdef|.
+This will preclude confusion of the last item of
+ each record with the first item of the subsequent
+ record when the \vb|\readarray| is executed.
+
+If the trailing comma were present in the data file,
+ then \vb|\readarraysepchar{}| could be set for the
+ \vb|\readdef|, to avoid inserting an extra comma.
+However, it would have to be reset to a comma before
+ executing the \vb|\readarray|, in order to parse
+ the data using the comma to separate cell data.
+
+Finally, if one wished to employ lists rather than
+ arrays (wherein each row could have a variable
+ number of columns, for example), then one could
+ set \vb|\readarraysepchar{\\}| prior to the
+ \vb|\readdef|, so as to insert a \vb|\\| macro
+ between each record.
+Then, if the file data were otherwise comma separated,
+ one could use the \loi{} tools rather than \rdar{}
+ to absorb the data as a list, rather than an array.
+In this case, \vb|\setsepchar{\\/,}| would set a
+ two-tier nested parsing for \loi{}.
+Then, \vb|\readlist\|\textit{listname}\vb|{\|%
+ \textit{data-macro}\vb|}| would read the data into
+ a list, with a variable column dimension for each row,
+ based on the number of commas in each file record.
+
Note also, using the facilities of the underlying \loi{} package,
that compound separators are possible.
-For example, \textit{either} a comma \textit{or} a period may be used
+For example, when employing \vb|\readarray|.
+ \textit{either} a comma \textit{or} a period may be used
for the data parsing, by specifying a
\textbf{logical-OR} (\vb+||+) separated list: \vb:\readarraysepchar{,||.}:.
Similarly, a multicharacter separator is possible, so that setting
@@ -528,9 +617,18 @@ The sequence of commands
\readdef{file3data.txt}\dataC
\readarray*\dataC\tobeConjugation[-,\nrows,\ncols]
-will employ a comma separator to parse the file.
-It will then create a 3-D array using data from the file, placed into the
- array \cmd{tobeConjugation}.
+will read the file into \vb|\dataC|, adding a comma between
+ records.
+It will then employ a comma separator to parse the file.
+As a result, it will create a 3-D array using data from the
+ \vb|\dataC| macro, and create a parsed array by the name of
+ \cmd{tobeConjugation}.
+During the \vb|\readdef|, it will have been gleaned that the file
+ is arranged with 4 columns (stored in \vb|\ncols|) and
+ 3 rows per plane (stored in \vb|\nrows|).
+These row \& column specifications could be manually overridden
+ merely by specifying actual numbers in the bracketed argument to
+ \vb|\readarray|.
Leading/trailing spaces will be removed from the data, with the use of the
star form of the \cmd{readarray} command.
Data can then be directly accessed, so that, for example
@@ -545,8 +643,69 @@ The 3-D array metrics are \cmd{tobeConjugationPLANES},
\tobeConjugationCELLS.
respectively.
-
-\section{Recalling Data from Array Structures}
+\section{Initializing an Array Structure}
+
+With the \vb|readarray| macro described above, data can be
+ introduced into an array structure that is specifically created
+ to receive the data.
+However, sometimes, an array placeholder must be defined before
+ knowing exactly what will eventually reside there.
+For this purpose, that package provides \vb|\initarray|.
+ \margcmd{initarray}
+
+With a command like \vb|\initarray\z[3,4]|, a 2-D array identified
+ as \vb|\z| is created with 3 rows and 4 columns.
+Each cell is initialized with a standard value (default
+ \vb|-|).
+However, the standard initialization value may be changed,
+ for example, to a \vb|0| with an invocation of
+ \vb|\renewcommand\readarrayinitvalue{0}|.%
+ \margcmd{readarrayinitvalue}
+
+\section{Manually Setting Array-Cell Data}
+
+While \vb|\readarray| and \vb|\initarray| are used to create
+ new arrays and to populate their cells with content, we here
+ examine a way to update or change the content of a single existing
+ array cell.
+The command \vb|\setvalue|\margcmd{setvalue} is used to place
+ content into an existing array cell.
+Let us assume that the array \vb|\z| was created as a
+ 2-D array of size 3 rows by 4 columns.
+The command \vb|\setvalue\z[2,3]{xyz}| will replace the
+ existing content of the array's 2nd row and 3rd column
+ with the tokens \vb|xyz|.
+All other cells in the \vb|\z| array will remain as they
+ were; the pre-existing content of cell \vb|\z[2,3]|, once
+ replaced, will no longer be available.
+
+
+\section{Merging Data from Separate Arrays}
+
+The command \vb|\setvalue| was described as a way to replace
+ the contents of a single cell in an array.
+Here, we describe a way to replace the contents of multiple
+ cells at once, in the form of merging two arrays with the
+ macro \vb|\mergearray|\margcmd{mergearray}.
+This command sets up a loop of repeated invocations of
+ \vb|\setarray|.
+
+Let's assume that we had created arrays
+ \vb|\Q[10,10]| and \vb|\R[3,2]|.
+The command
+ \vb|\mergarray\R\Q[6,3]| will overlay the contents of
+ \vb|\R|'s 3x2 cells into the \vb|\Q| cells, beginning with
+ \vb|\Q[6,3]|.
+The overlay will, therefore, include the cells: \vb|[6,3]|, \vb|[6,4]|,
+ \vb|[7,3]|, \vb|[7,4]|, \vb|[8,3]|, and \vb|[8,4]|.
+If the overlay of the \textit{from-array} causes the bounds in
+ the \textit{to-array} to be exceeded, no copy is made of those
+ cells.
+However, a warning will be noted in the log file if error
+ checking is enabled.
+
+
+\section{Recalling Cell Data from Array Structures}
\begin{sloppypar}
While one must specify the number of columns and/or rows associated
@@ -597,6 +756,74 @@ is given by
which yields ``\tobeConjugation[3,2,4]''.
+\section{Typesetting Whole Arrays}
+
+Often, one wishes not just to recall the contents of a single
+ cell, but to recall a whole array for the purposes of typesetting.
+The command \vb|\typesetarray| does just that.
+Let us create an array \vb|\Q[2,2,2]| whose cell \vb|[i,j,k]| contains
+ the tokens ``($i,j,k$)'', where $i$, $j$ and $k$ denote a particular
+ plane, row and column of \vb|\Q|.
+If one invokes \vb|\typesetarray\Q|\margcmd{typesetarray}, the default
+ dump of the array will be:
+
+\initarray\Q[2,2,2]
+\setvalue\Q[1,1,1]{(1,1,1)}
+\setvalue\Q[1,2,1]{(1,2,1)}
+\setvalue\Q[1,1,2]{(1,1,2)}
+\setvalue\Q[1,2,2]{(1,2,2)}
+\setvalue\Q[2,1,1]{(2,1,1)}
+\setvalue\Q[2,2,1]{(2,2,1)}
+\setvalue\Q[2,1,2]{(2,1,2)}
+\setvalue\Q[2,2,2]{(2,2,2)}
+\typesetarray\Q
+
+The presentation of the array is governed by four defined macros,
+ whose definitions can be renewed:\\
+ \vb|\typesetplanesepchar| (default \vb|\\---\\|),\\
+ \vb|\typesetrowsepchar| (default \vb|\\|),\\
+ \vb|\typesetcolsepchar| (default \vb|,|) and\\
+ \vb|\typesetcell|,\\
+ the last of which takes 1 argument (the cell content) and, by
+ default, presents it unaltered.
+One can see that the default treatment separates columns with
+ a comma, performs a linefeed between each row, and
+ inserts an em-dash on a line by itself between each plane, which
+ is exactly how \vb|\Q| was presented above.
+
+However, these defaults can be renewed to produce a different
+ visual format, for example, that obtainable from a \vb|tabular|
+ environment.
+For example, upon issuing these renewals
+\begin{verbatim}
+\renewcommand\typesetplanesepchar{\\\hline}
+\renewcommand\typesetrowsepchar{\\}
+\renewcommand\typesetcolsepchar{&}
+\renewcommand\typesetcell[1]{\scriptsize\textbf{#1}}
+\end{verbatim}
+one may insert the \vb|\typesetarray| inside a \vb|\tabular|
+ and it will format according to those rules:
+\begin{verbatim}
+\begin{tabular}{cc}
+\hline
+\typesetarray\Q\\
+\hline
+\end{tabular}
+\end{verbatim}
+yielding the following output:
+\renewcommand\typesetplanesepchar{\\\hline}
+\renewcommand\typesetrowsepchar{\\}
+\renewcommand\typesetcolsepchar{&}
+\renewcommand\typesetcell[1]{\scriptsize\textbf{#1}}
+\begin{tabular}{cc}
+\hline
+\typesetarray\Q\\
+\hline
+\end{tabular}
+.
+
+%@@@
+
\section{Bounds Checking}
While the user is developing his or her application involving the {\rdar}
@@ -637,7 +864,7 @@ Results may be also expanded even with \cmd{checkbounds}
However, with \cmd{hypercheckbounds} set, full
expansion of array cells is no longer possible.
-\section{Accessing Array Cells if No Expansion is Required}
+\section{Transfer Array Cell Tokens to Macro}
With the normal use of \cmd{\rmfamily\itshape array-identifier} syntax
for accessing array cells,
@@ -652,68 +879,27 @@ The command takes the array name and index as the initial arguments followed
So, for example \vb|\arraytomacro\tobeConjugation[2,2,3]\thiscell| will
place the cell's original tokens in the macro \cmd{thiscell}.
-Upon detokenization, \cmd{thiscell} contains
+Upon detokenization, the macro \cmd{thiscell} contains
\arraytomacro\tobeConjugation[2,2,3]\thiscell
``\texttt{\detokenize\expandafter{\thiscell}}''.
-\section{Support Routines}
-
-The package provides two commands that can help one understand how a
- data set has been parsed into an array.
-Both of these commands dump the specified array to the document.
-In the case of \cmd{arraydump}\margcmd{arraydump}, the array is formatted
- in the structure of the array, broken up by columns, rows, and planes.
-In the case of \cmd{scalardump}\margcmd{scalardump}, however, the elements
- of the array are dumped sequentially, without reference to the array's
- heirarchy.
-
-For the case of 1-D record array \cmd{oneD} employed in prior sections, for
- example, the invocations of
-\rl\vb|\arraydump\oneD|\\
-\rl\vb|\scalardump\oneD|
+\section{Deprecated and Defunct Features}
-results in
-
-\arraydump\oneD
-\scalardump\oneD
-
-\clearpage
-
-The \cmd{twoD} equivalent, resulting from parsing the same data file as
- a 2-D, rather than a 1-D record array, is
-
-\rl\vb|\arraydump\twoD|\\
-\rl\vb|\scalardump\twoD|
-
-\arraydump\twoD
-\scalardump\twoD
-
-For the case of the 3-D array (earlier read as \cmd{threeD}),
-the \cmd{arraydump} would appear as
-
-\rl\vb|\arraydump\threeD|\\
-\rl\vb|\scalardump\threeD|
-
-\arraydump\threeD
-\scalardump\threeD
-
-Note that the \cmd{scalardump} of \cmd{threeD} is indistinguishable from
- that of \cmd{twoD}, since both arrays are comprised of the same data
- cells, though arrayed into different plane/row/column structures.
-
-\clearpage
-For comparison, the \cmd{arraydump} of \cmd{tobeConjugation} is
+\textbf{Deprecated}
-\arraydump\tobeConjugation
+The following commands are supplied, but are no longer the preferred
+embodiment of package syntax.
+\rl\vb|\arraydump|\\
+\rl\vb|\scalardump|
-\section{Deprecated, Vestigial, and Defunct Features}
+To replace the function of these, \vb|\typesetarray| is
+ the preferred embodiment.
-\textbf{Deprecated}
+\textbf{Defunct}
-The following commands are supplied, but are no longer the preferred
-embodiment of package syntax.
+The following macros are no longer supported.
\itshape
\rl\vb|\copyrecords{|array-identifier\vb|}|%
@@ -733,43 +919,15 @@ embodiment of package syntax.
\rl\vb|\arrayij{|array-identifier\vb|}{|row\vb|}{|column\vb|}|\\
\rl\vb|\arrayijk{|array-identifier\vb|}{|plane\vb|}{|row\vb|}{|%
column\vb|}|\upshape
-
-\textbf{Vestigial}
-
-The following support macros are provided but no longer recommended.
-Their capability is more fully served by way of the \loi{} package.
-
\itshape
\rl\vb|\getargsC{\|macro {\upshape or} string\vb|}|\\
\rl\vb|\arg|index\\
\rl\vb|\narg|\\
\rl\vb|\showargs|%
-\upshape
-
-Note that whereas \cmd{getargs} could previously (pre-V2.0 \rdar) employ
- only a space as the parsing separator, \cmd{getargs} now respects the
- currently set value of separator, as (re)defined by \cmd{readarraysepchar}.
-
-\textbf{Defunct}
-
-The following macros are no longer supported.
-
-\itshape
\rl\vb|\converttilde|\\
\rl\vb|\record|index
\upshape
-Since the package now supports arbitrary parsing separators,
- there is no need for the function of \cmd{converttilde}.
-However, were one desiring to parse, while treating hard spaces as spaces,
- this can be simply achieved under V2.0 \rdar{} by setting the
- parsing character as either a space or a hard space, using
- \vb:readarraysepchar{ ||~}:.
-Likewise, the indirect addressing (using a romannumeral \textit{index})
- provided by the internal command \cmd{record}\textit{index} is fully
- superceded by the ability to directly address any record of \rdar's
- 1-D record arrays.
-
\section{Acknowledgements}
diff --git a/macros/luatex/generic/lua-uni-algos/README.md b/macros/luatex/generic/lua-uni-algos/README.md
index 239d76212a..71f4ecb2e4 100644
--- a/macros/luatex/generic/lua-uni-algos/README.md
+++ b/macros/luatex/generic/lua-uni-algos/README.md
@@ -1,12 +1,12 @@
# The lua-uni-algos Package
-Version: v0.3
+Version: v0.4
-Date: 2021-07-05
+Date: 2021-08-08
Author: Marcel Krüger
-License: LPPL v1.3c
+License: LPPL v1.3
A collection of small Lua modules implementing some if the most generic Unicode algorithms for use with LuaTeX.
This package tries to reduce duplicated work by collecting a set of small utilities which can be used be useful for many LuaTeX packages dealing with Unicode strings.
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-algos.lua b/macros/luatex/generic/lua-uni-algos/lua-uni-algos.lua
index 34581f1a74..d965fc2d30 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-algos.lua
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-algos.lua
@@ -1,5 +1,5 @@
-- lua-uni-algos.lua
--- Copyright 2020 Marcel Krüger
+-- Copyright 2020--2021 Marcel Krüger
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-algos.pdf b/macros/luatex/generic/lua-uni-algos/lua-uni-algos.pdf
index 38265c35d3..38b6213798 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-algos.pdf
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-algos.pdf
Binary files differ
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-algos.tex b/macros/luatex/generic/lua-uni-algos/lua-uni-algos.tex
index 58ae2fabc6..2b290c7b7c 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-algos.tex
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-algos.tex
@@ -2,7 +2,7 @@
\usepackage{doc, shortvrb, metalogo, hyperref, fontspec}
% \setmainfont{Noto Serif}
% \setmonofont{FreeMono}
-\title{Unicode algorithms for Lua\TeX\thanks{This document corresponds to \pkg{lua-uni-algos} v0.3.}}
+\title{Unicode algorithms for Lua\TeX\thanks{This document corresponds to \pkg{lua-uni-algos} v0.4.}}
\author{Marcel Krüger\thanks{E-Mail: \href{mailto:tex@2krueger.de}{\nolinkurl{tex@2krueger.de}}}}
\MakeShortVerb\|
\newcommand\pkg{\texttt}
@@ -51,12 +51,18 @@ NFKD: Äpfel...
(This example is shown in Latin Modern Mono which has the (for this purpose) very useful property of not handling combining character very well.
In a well-behaving font, the `...C` and `...D` lines should look the same.)
-Additionally for NFC direct normalization of Lua\TeX\ node lists is supported.
+Additionally for direct normalization of Lua\TeX\ node lists is supported.
There are two functions |normalize.node.NFC| and |normalize.direct.NFC| taking upto four parameters: The first parameter is the head of the node list to be converted.
The second parameter is the font id of the affected character nodes. Only non-protected glyph nodes of the specified font will be normalized. Pass |nil| for the font
to normalize without respecting the font in the process. The third parameter is an optional table. If it is not |nil|, normalization is supressed if it might add glyph
which map to |false| (or |nil|) in this table. If the forth argument is |true|, normalization will never join two glyph nodes with different attributes.
+For NFD and NFKD equivalent functions exists without the last parameter (since they never compose nodes, they never have to deal with composing nodes with different
+attributes.
+
+NFKC is not supported for node list normalization since the author is not convinced that there is any usecase for it. (Probably there isn't any usecase for node list
+NFKD normalization either, but that was easy to implement while NFKC would need separate data tables.
+
\section{Case folding}
For case folding load the Lua module |lua-uni-case|.
You can either load it directly with
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-case.lua b/macros/luatex/generic/lua-uni-algos/lua-uni-case.lua
index 9014258696..33088155ae 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-case.lua
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-case.lua
@@ -1,5 +1,5 @@
-- lua-uni-graphemes.lua
--- Copyright 2020 Marcel Krüger
+-- Copyright 2020--2021 Marcel Krüger
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-graphemes.lua b/macros/luatex/generic/lua-uni-algos/lua-uni-graphemes.lua
index 5c7efc28c1..73ea8008d7 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-graphemes.lua
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-graphemes.lua
@@ -1,5 +1,5 @@
-- lua-uni-graphemes.lua
--- Copyright 2020 Marcel Krüger
+-- Copyright 2020--2021 Marcel Krüger
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-normalize.lua b/macros/luatex/generic/lua-uni-algos/lua-uni-normalize.lua
index e2c247202d..d54b82032b 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-normalize.lua
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-normalize.lua
@@ -1,5 +1,5 @@
-- lua-uni-normalize.lua
--- Copyright 2020 Marcel Krüger
+-- Copyright 2020--2021 Marcel Krüger
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -21,8 +21,10 @@ local char = utf8.char
local codes = utf8.codes
local unpack = table.unpack
-kpse.set_program_name'kpsewhich'
-local ccc, composition_mapping, decomposition_mapping, compatibility_mapping do
+if tex.initialize then
+ kpse.set_program_name'kpsewhich'
+end
+local ccc, composition_mapping, decomposition_mapping, compatibility_mapping, nfc_qc do
local function doubleset(ts, key, v1, kind, v2)
ts[1][key] = v1
ts[3][key] = v2
@@ -73,6 +75,30 @@ local ccc, composition_mapping, decomposition_mapping, compatibility_mapping do
[0x1D1BF] = true, [0x1D1C0] = true,
}
+ -- We map for NFC_QC:
+ -- No -> false
+ -- Maybe -> true
+ -- Yes -> nil
+ -- since Yes should be the default.
+ nfc_qc = {}
+ for cp, decomp in next, decomposition_mapping do
+ if ccc[cp] or ccc[decomp[1]] then
+ nfc_qc[cp] = false
+ elseif #decomp == 1 then
+ nfc_qc[cp] = false
+ elseif composition_exclusions[cp] then
+ nfc_qc[cp] = false
+ else
+ nfc_qc[decomp[2]] = true
+ end
+ end
+ for i=0x1161, 0x1175 do
+ nfc_qc[i] = true
+ end
+ for i=0x11A8, 0x11C2 do
+ nfc_qc[i] = true
+ end
+
for cp, decomp in next, decomposition_mapping do
if #decomp > 1 and not (composition_exclusions[cp] or ccc[decomp[1]]) then
local mapping = composition_mapping[decomp[1]]
@@ -144,6 +170,25 @@ local ccc, composition_mapping, decomposition_mapping, compatibility_mapping do
for cp, decomp in next, compatibility_mapping do
fixup_decomp(cp, decomp)
end
+
+ --[[ To verify that nfc_qc is correctly generated
+ local ref_nfc_qc = p.parse_file('DerivedNormalizationProps', l.Cf(
+ l.Ct'' * (
+ l.Cg(p.fields(p.codepoint_range,
+ 'NFC_QC',
+ 'N' * l.Cc(false) + 'M' * l.Cc(true))) + p.ignore_line
+ )^0 * -1, p.multiset))
+ for k,v in next, ref_nfc_qc do
+ if nfc_qc[k] ~= v then
+ print('MISMATCH1', k, v, nfc_qc[k])
+ end
+ end
+ for k,v in next, nfc_qc do
+ if ref_nfc_qc[k] ~= v then
+ print('MISMATCH2', k, v)
+ end
+ end
+ ]]
end
local function ccc_reorder(codepoints, i, j, k)
@@ -270,81 +315,111 @@ local function to_nfkc(s)
return to_nfc_generic(s, compatibility_mapping)
end
+if tex.initialize then
+ return {
+ NFD = to_nfd,
+ NFC = to_nfc,
+ NFKD = to_nfkd,
+ NFKC = to_nfkc,
+ }
+end
+
+local direct = node.direct
+local node_new = direct.new
+local node_copy = direct.copy
+local is_char = direct.is_char
+local setchar = direct.setchar
+local insert_after = direct.insert_after
+local insert_before = direct.insert_before
+local getnext = direct.getnext
+local remove = direct.remove
+local free = direct.free
+local getattrlist = direct.getattributelist
+local getprev = direct.getprev
+local setprev = direct.setprev
+local getboth = direct.getboth
+local setlink = direct.setlink
+
-- allowed_characters only works reliably if it's closed under canonical decomposition mappings
-- but it should fail in reasonable ways as long as it's at least closed under full canonical decompositions
+--
+-- This could be adapted to NFKC as above except that we would either need to handle Hangul syllables
+-- while iterating over starter_decomposition or adapt ~5 entries in compatibility_mapping to not decompose the syllables.
+-- We don't do this currently since I don't see a usecase for NFKC normalized nodes.
local function nodes_to_nfc(head, f, allowed_characters, preserve_attr)
if not head then return head end
- local tmp_node = node.new'temp'
+ local tmp_node = node_new'temp'
-- This is more complicated since we want to ensure that nodes (including their attributes and properties) are preserved whenever possible
--
-- We use three passes:
- -- 1. Decompose composition exclusions etc.
+ -- 1&2. Decompose everything with NFC_Quick_Check == No and reorder marks
+ local last_ccc
local n = head
+ local prev = getprev(head)
+ setlink(tmp_node, head)
+ local require_work
while n do
- local char = node.is_char(n, f)
+ local char = is_char(n, f)
if char then
- local decomposed = decomposition_mapping[char]
- if decomposed then
- local compose_lookup = composition_mapping[decomposed[1]]
- if not (compose_lookup and compose_lookup[decomposed[2]]) then
- local available = true
- if allowed_characters then
- -- This is probably buggy for werd fonts
- for i=1, #decomposed do
- if not allowed_characters[decomposed[i]] then
- available = false
- break
- end
+ local qc = nfc_qc[char]
+ if qc == false then
+ local decomposed = decomposition_mapping[char]
+ local available = true
+ if allowed_characters then
+ -- This is probably buggy for weird fonts
+ for i=1, #decomposed do
+ if not allowed_characters[decomposed[i]] then
+ available = false
+ break
end
end
- if available then
- -- Here we never want to compose again, so we can decompose directly
- n.char = decomposed[1]
- for i=2, #decomposed do
- local nn = node.copy(n)
- nn.char = decomposed[i]
- node.insert_after(head, n, nn)
- n = nn
- end
+ end
+ if available then
+ -- Here we never want to compose again, so we can decompose directly
+ local n = n
+ char = decomposed[1]
+ qc = nfc_qc[char]
+ setchar(n, char)
+ for i=2, #decomposed do
+ local nn = node_copy(n)
+ setchar(nn, decomposed[i])
+ insert_after(head, n, nn)
+ n = nn
end
end
end
- end
- n = n.next
- end
- -- 2. Reorder marks
- local last_ccc
- n = head
- local prev = head.prev
- tmp_node.next, head.prev = head, tmp_node
- while n do
- local char = node.is_char(n, f)
- if char then
+ -- Now reorder marks. The goal here is to reduce the overhead
+ -- in the common case that no reordering is needed
local this_ccc = ccc[char]
if last_ccc and this_ccc and last_ccc > this_ccc then
local nn = n
while nn ~= tmp_node do
- nn = nn.prev
- local nn_char = node.is_char(nn, f)
+ nn = getprev(nn)
+ local nn_char = is_char(nn, f)
if not nn_char then break end
local nn_ccc = ccc[nn_char]
if not nn_ccc or nn_ccc <= this_ccc then break end
end
- local before, after = n.prev, n.next
- node.insert_after(head, nn, n)
- before.next = after
- if after then after.prev = before end
+ local before, after = getboth(n)
+ insert_after(head, nn, n)
+ setlink(before, after)
n = after
else
- n = n.next
+ n = getnext(n)
last_ccc = this_ccc
end
+ require_work = require_work or qc
else
- n = n.next
+ n = getnext(n)
last_ccc = nil
end
end
- head, head.prev = tmp_node.next, prev
+ head = getnext(tmp_node)
+ setprev(head, prev)
+ if not require_work then
+ free(tmp_node)
+ return head
+ end
-- 3. The rest: Maybe decompose and then compose again
local starter_n, starter, lookup
local starter_decomposition
@@ -352,20 +427,21 @@ local function nodes_to_nfc(head, f, allowed_characters, preserve_attr)
local i -- index into starter_decomposition
local i_ccc
n = head
- node.insert_after(head, nil, tmp_node)
+ insert_after(head, nil, tmp_node)
repeat
- local char = node.is_char(n, f)
+ local char = is_char(n, f)
local this_ccc = ccc[char] or 300
+ local is_composed -- Did we generate char through composition?
while i and i_ccc <= this_ccc do
local new_starter = lookup and lookup[starter_decomposition[i]]
if new_starter and (not allowed_characters or allowed_characters[new_starter]) then
starter = new_starter
- starter_n.char = starter
+ setchar(starter_n, starter)
lookup = composition_mapping[starter]
else
- local nn = node.copy(starter_n)
- nn.char = starter_decomposition[i]
- node.insert_before(head, n, nn)
+ local nn = node_copy(starter_n)
+ setchar(nn, starter_decomposition[i])
+ insert_before(head, n, nn)
last_ccc = i_ccc
end
i = i + 1
@@ -379,13 +455,14 @@ local function nodes_to_nfc(head, f, allowed_characters, preserve_attr)
if char then
if lookup and (this_ccc == 300) == (this_ccc == last_ccc) then
local new_starter = lookup[char]
- if new_starter and (not allowed_characters or allowed_characters[new_starter]) and (not preserve_attr or starter_n.attr == n.attr) then
- local last = n.prev
- node.remove(head, n)
- node.free(n)
+ if new_starter and (not allowed_characters or allowed_characters[new_starter]) and (not preserve_attr or getattrlist(starter_n) == getattrlist(n)) then
+ local last = getprev(n)
+ remove(head, n)
+ free(n)
n = last
starter = new_starter
- starter_n.char, char = starter, starter
+ setchar(starter_n, starter)
+ char, is_composed = starter, true
lookup = composition_mapping[starter]
else
last_ccc = this_ccc
@@ -394,21 +471,23 @@ local function nodes_to_nfc(head, f, allowed_characters, preserve_attr)
elseif not lookup and this_ccc == 300 and last_ccc == 300 then
if starter >= 0x1100 and starter <= 0x1112 and char >= 0x1161 and char <= 0x1175 then -- L + V -> LV
local new_starter = ((starter - 0x1100) * 21 + char - 0x1161) * 28 + 0xAC00
- if (not allowed_characters or allowed_characters[new_starter]) and (not preserve_attr or starter_n.attr == n.attr) then
- node.remove(head, n)
- node.free(n)
- starter = starter
- starter_n.char, char = starter, starter
+ if (not allowed_characters or allowed_characters[new_starter]) and (not preserve_attr or getattrlist(starter_n) == getattrlist(n)) then
+ remove(head, n)
+ free(n)
+ starter = new_starter
+ setchar(starter_n, starter)
+ char, is_composed = starter, true
lookup = composition_mapping[starter]
n = starter_n
end
elseif char >= 0x11A8 and char <= 0x11C2 and starter >= 0xAC00 and starter <= 0xD7A3 and (starter-0xAC00) % 28 == 0 then -- LV + T -> LVT
local new_starter = starter + char - 0x11A7
- if (not allowed_characters or allowed_characters[new_starter]) and (not preserve_attr or starter_n.attr == n.attr) then
- node.remove(head, n)
- node.free(n)
+ if (not allowed_characters or allowed_characters[new_starter]) and (not preserve_attr or getattrlist(starter_n) == getattrlist(n)) then
+ remove(head, n)
+ free(n)
starter = new_starter
- starter_n.char, char = starter, starter
+ setchar(starter_n, starter)
+ char, is_composed = starter, true
lookup = composition_mapping[starter]
n = starter_n
end
@@ -418,38 +497,141 @@ local function nodes_to_nfc(head, f, allowed_characters, preserve_attr)
end
if this_ccc == 300 then
starter_n = n
- starter_decomposition = decomposition_mapping[char]
- if allowed_characters and starter_decomposition then
- for i=1, #starter_decomposition do
- if not allowed_characters[starter_decomposition[i]] then
- starter_decomposition = nil
- break
+ if is_composed then -- If we just composed starter, we don't want to decompose it again
+ starter = char
+ else
+ starter_decomposition = decomposition_mapping[char]
+ if allowed_characters and starter_decomposition then
+ for i=1, #starter_decomposition do
+ if not allowed_characters[starter_decomposition[i]] then
+ starter_decomposition = nil
+ break
+ end
end
end
+ starter = starter_decomposition and starter_decomposition[1] or char
+ setchar(starter_n, starter)
+ if starter_decomposition then
+ i, i_ccc = 2, ccc[starter_decomposition[2]] or 300
+ else
+ i, i_ccc = nil
+ end
end
- starter = starter_decomposition and starter_decomposition[1] or char
- starter_n.char = starter
lookup = composition_mapping[starter]
- if starter_decomposition then
- i, i_ccc = 2, ccc[starter_decomposition[2]] or 300
- else
- i, i_ccc = nil
- end
end
else
starter, lookup, last_ccc, last_decomposition, i, i_ccc = nil
end
if n == tmp_node then
- node.remove(head, tmp_node)
+ remove(head, tmp_node)
break
end
- n = n.next
+ n = getnext(n)
until false
- node.free(tmp_node)
+ free(tmp_node)
return head
end
-local todirect, tonode = node.direct.todirect, node.direct.tonode
+-- This is almost the same as the first loop from nodes_to_nfc, just without checking for NFC_QC and decomposing everything instead.
+-- Also we have to decompose Hangul syllables.
+-- No preserve_attr parameter since we never compose.
+local function nodes_to_nfd_generic(decomposition_mapping, head, f, allowed_characters)
+ if not head then return head end
+ local tmp_node = node_new'temp'
+ -- This is more complicated since we want to ensure that nodes (including their attributes and properties) are preserved whenever possible
+ --
+ -- We use three passes:
+ -- 1&2. Decompose everything with NFC_Quick_Check == No and reorder marks
+ local last_ccc
+ local n = head
+ local prev = getprev(head)
+ setlink(tmp_node, head)
+ while n do
+ local char = is_char(n, f)
+ if char then
+ local decomposed = decomposition_mapping[char]
+ if decomposed then
+ local available = true
+ if allowed_characters then
+ -- This is probably buggy for weird fonts
+ for i=1, #decomposed do
+ if not allowed_characters[decomposed[i]] then
+ available = false
+ break
+ end
+ end
+ end
+ if available then
+ local n = n
+ char = decomposed[1]
+ setchar(n, char)
+ for i=2, #decomposed do
+ local nn = node_copy(n)
+ setchar(nn, decomposed[i])
+ insert_after(head, n, nn)
+ n = nn
+ end
+ end
+ elseif char >= 0xAC00 and char <= 0xD7A3 then -- Hangul clusters. In this case we update n since we never need to reorder them anyway
+ local c = char - 0xAC00
+ local t = 0x11A7 + c % 28
+ c = c // 28
+ local l = 0x1100 + c // 21
+ local v = 0x1161 + c % 21
+ if not allowed_characters or (allowed_characters[l] and allowed_characters[v] and (t == 0x11A7 or allowed_characters[t])) then
+ setchar(n, l)
+ local nn = node_copy(n)
+ setchar(nn, v)
+ insert_after(head, n, nn)
+ n = nn
+ char = v
+ if t ~= 0x11A7 then
+ nn = node_copy(n)
+ setchar(nn, t)
+ insert_after(head, n, nn)
+ n = nn
+ char = t
+ end
+ end
+ end
+ -- Now reorder marks. The goal here is to reduce the overhead
+ -- in the common case that no reordering is needed
+ local this_ccc = ccc[char]
+ if last_ccc and this_ccc and last_ccc > this_ccc then
+ local nn = n
+ while nn ~= tmp_node do
+ nn = getprev(nn)
+ local nn_char = is_char(nn, f)
+ if not nn_char then break end
+ local nn_ccc = ccc[nn_char]
+ if not nn_ccc or nn_ccc <= this_ccc then break end
+ end
+ local before, after = getboth(n)
+ insert_after(head, nn, n)
+ setlink(before, after)
+ n = after
+ else
+ n = getnext(n)
+ last_ccc = this_ccc
+ end
+ else
+ n = getnext(n)
+ last_ccc = nil
+ end
+ end
+ head = getnext(tmp_node)
+ setprev(head, prev)
+ free(tmp_node)
+ return head
+end
+local function nodes_to_nfd(head, f, allowed_characters)
+ return nodes_to_nfd_generic(decomposition_mapping, head, f, allowed_characters)
+end
+local function nodes_to_nfkd(head, f, allowed_characters)
+ return nodes_to_nfd_generic(compatibility_mapping, head, f, allowed_characters)
+end
+
+local todirect, tonode = direct.todirect, direct.tonode
return {
NFD = to_nfd,
@@ -457,10 +639,14 @@ return {
NFKD = to_nfkd,
NFKC = to_nfkc,
node = {
- NFC = nodes_to_nfc,
+ NFC = function(head, ...) return tonode(nodes_to_nfc(todirect(head), ...)) end,
+ NFD = function(head, ...) return tonode(nodes_to_nfd(todirect(head), ...)) end,
+ NFKD = function(head, ...) return tonode(nodes_to_nfkd(todirect(head), ...)) end,
},
direct = {
- NFC = function(head, ...) return todirect(nodes_to_nfc(tonode(head), ...)) end,
+ NFC = nodes_to_nfc,
+ NFD = nodes_to_nfd,
+ NFKD = nodes_to_nfkd,
},
}
-- print(require'inspect'{to_nfd{0x1E0A}, to_nfc{0x1E0A}})
diff --git a/macros/luatex/generic/lua-uni-algos/lua-uni-parse.lua b/macros/luatex/generic/lua-uni-algos/lua-uni-parse.lua
index a264a2573e..0ac3610dd4 100644
--- a/macros/luatex/generic/lua-uni-algos/lua-uni-parse.lua
+++ b/macros/luatex/generic/lua-uni-algos/lua-uni-parse.lua
@@ -1,5 +1,5 @@
-- lua-uni-parse.lua
--- Copyright 2020 Marcel Krüger
+-- Copyright 2020--2021 Marcel Krüger
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/unicodetex/latex/beaulivre/README.md b/macros/unicodetex/latex/beaulivre/README.md
index 6ce33dbfcd..ef4890f201 100644
--- a/macros/unicodetex/latex/beaulivre/README.md
+++ b/macros/unicodetex/latex/beaulivre/README.md
@@ -12,6 +12,18 @@ LuaLaTeX.
This is part of the `colorist` class series.
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
index 8c426be01c..9a424fac03 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 c35b32fa52..e88c128659 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French,allowbf]{beaulivre}
+\documentclass[English,Chinese,French,JP,TC,allowbf]{beaulivre}
%%================================
%% Import toolkit
@@ -98,9 +98,9 @@
\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)$);
\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/07/30}}};
+ \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/08/08}}};
\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年7月,北京}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年8月,北京}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -131,6 +131,7 @@
为了使用这篇文档中提到的文档类,你需要:
\begin{itemize}
\item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{colorist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
+ \item 下载并安装所需的字体,参考“关于默认字体”这一节。
\item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
\end{itemize}
@@ -199,7 +200,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{初始化部分}
-\medskip
\begin{code}
\documentclass{beaulivre}
\usepackage{ProjLib}
@@ -209,7 +209,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{设定语言}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -221,7 +220,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{未完成标记}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -229,7 +227,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{定理类环境}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -243,16 +240,18 @@ Référence du théorème: \cref{thm:abc}
\LevelOneTitle{关于默认字体}
-\lebhart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+本文档类中默认使用 Palatino Linotype 作为英文主字体,思源宋体、思源黑体、思源等宽作为中文主字体、无衬线字体以及等宽字体,并部分使用了 Neo Euler 作为数学字体。这些字体需要用户自行下载安装。其中,思源字体系列可在 \url{https://github.com/adobe-fonts} 下载 (推荐下载 Super-OTC 版本,这样下载的体积较小)。Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+
+另外,还使用了 Source Code Pro 作为英文无衬线字体、New Computer Modern Mono 作为英文等宽字体,以及 Asana Math、Tex Gyre Pagella Math、Latin Modern Math 数学字体中的部分符号。这些字体在 TeX Live 或 MikTeX 中已经提供,无需自行下载安装。
\begin{itemize}
- \item English main font. \textsf{English sans serif font}.
- \item 中文主要字体,\textsf{中文无衬线字体}
+ \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+ \item 简体中文主要字体,\textsf{简体中文无衬线字体},\texttt{简体中文等宽字体}
+ \item \UseOtherLanguage{TC}{繁體中文主要字體,\textsf{繁體中文無襯線字體},\texttt{繁體中文等寬字體}}
+ \item \UseOtherLanguage{JP}{日本語のメインフォント、\textsf{日本語のサンセリフフォント}、\texttt{日本語の等幅フォント}}
\item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
-
\LevelOneTitle{选项}
@@ -297,6 +296,7 @@ Référence du théorème: \cref{thm:abc}
\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{chapter} (书) 或 \texttt{section} (文章) 编号。
@@ -322,7 +322,7 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
\item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|,用指定的语言的设定排版 \meta{content}。
\begin{itemize}
- \item 相比较 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能够保持行距稳定。
+ \item 相比 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能保持行距稳定。
\end{itemize}
\end{itemize}
@@ -503,11 +503,12 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
+\clearpage
\LevelOneTitle{目前存在的问题}
-
\begin{itemize}[itemsep=.6em]
\item 对于字体的设置仍然不够完善。
- \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \lebhart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
+ \item 目录的设计还不够美观。
+ \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \colorist{} (进而 \colorart{}、\lebhart{} 与 \colorbook{}、\beaulivre{}) 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
\item 代码中仍有许多可优化之处。
\end{itemize}
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
index e4fdbcee1e..cd375b2d73 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 ad2b800694..0a3216291c 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French,allowbf]{beaulivre}
+\documentclass[English,Chinese,French,JP,TC,allowbf]{beaulivre}
%%================================
%% Import toolkit
@@ -99,9 +99,9 @@
\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)$);
\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/07/30}}};
+ \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/08/08}}};
\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}{July 2021, Beijing}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{August 2021, Beijing}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -133,6 +133,7 @@ This documentation is typeset using \beaulivre{} (with the option \texttt{allowb
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}.
\end{itemize}
@@ -200,7 +201,6 @@ If you find this example a little complicated, don't worry. Let's now look at th
\LevelThreeTitle{Initialization}
-\medskip
\begin{code}
\documentclass{beaulivre}
\usepackage{ProjLib}
@@ -210,7 +210,6 @@ Initialization is straightforward. The first line loads the document class \beau
\LevelThreeTitle{Set the language}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -223,7 +222,6 @@ For detailed description of this command and more related commands, please refer
\LevelThreeTitle{Draft marks}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -232,7 +230,6 @@ When you have some places that have not yet been finished yet, you can mark them
\LevelThreeTitle{Theorem-like environments}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -246,16 +243,18 @@ Commonly used theorem-like environments have been pre-defined. Also, when refere
\LevelOneTitle{On the default fonts}
-By default, \lebhart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts\footnote{For detail, pleaser visit FounderType's website: \url{https://www.foundertype.com}.}, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own.
+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.
+
+In addition, Source Code Pro is used as the English sans serif font, New Computer Modern Mono as the English monospace font, as well as some symbols in the mathematical fonts of Asana Math, Tex Gyre Pagella Math, and Latin Modern Math. These fonts are already available in TeX Live or MikTeX, which means you don't need to install them yourself.
\begin{itemize}
- \item English main font. \textsf{English sans serif font}.
- \item 中文主要字体, \textsf{中文无衬线字体}
+ \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+ \item 简体中文主要字体,\textsf{简体中文无衬线字体},\texttt{简体中文等宽字体}
+ \item \UseOtherLanguage{TC}{繁體中文主要字體,\textsf{繁體中文無襯線字體},\texttt{繁體中文等寬字體}}
+ \item \UseOtherLanguage{JP}{日本語のメインフォント、\textsf{日本語のサンセリフフォント}、\texttt{日本語の等幅フォント}}
\item Math demonstration: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
-
\LevelOneTitle{The options}
\beaulivre{} offers the following options:
@@ -387,7 +386,6 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\bigskip
The following are the main styles of theorem-like environments:
\begin{theorem}
Theorem style: theorem, proposition, lemma, corollary, ...
@@ -414,6 +412,7 @@ The following are the main styles of theorem-like environments:
\end{problem}
\medskip
+\clearpage
For aesthetics, adjacent definitions will be connected together automatically:
\begin{definition}
First definition.
@@ -506,10 +505,12 @@ Similarly, there is \lstinline|\needgraph| :
\end{itemize}
+\clearpage
\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
+ \item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
index f439a8670f..4f3c8cfae7 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 f03ceceb19..9b0ad02fc8 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French,allowbf]{beaulivre}
+\documentclass[English,Chinese,French,JP,TC,allowbf]{beaulivre}
%%================================
%% Import toolkit
@@ -98,9 +98,9 @@
\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)$);
\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/07/30}}};
+ \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/08/08}}};
\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}{Juillet 2021, à Pékin}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{Août 2021, à Pékin}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -132,6 +132,7 @@ Cette documentation est composée à l'aide de \beaulivre{} (avec l'option \text
Pour utiliser les classes de documents décrites ici, vous devez :
\begin{itemize}
\item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{colorist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
+ \item télécharger et installer les polices requises, voir «~À propos des polices par défaut~».
\item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
\end{itemize}
@@ -200,7 +201,6 @@ Si vous trouvez cela un peu compliqué, ne vous inquiétez pas. Examinons mainte
\LevelThreeTitle{Initialisation}
-\medskip
\begin{code}
\documentclass{beaulivre}
\usepackage{ProjLib}
@@ -210,7 +210,6 @@ L'initialisation est simple. La première ligne ajoute la classe de document \be
\LevelThreeTitle{Choisir la langue}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -222,7 +221,6 @@ Pour une description détaillée de cette commande et d'autres commandes associ
\LevelThreeTitle{Marques de brouillon}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -230,7 +228,6 @@ Lorsque vous avez des endroits qui ne sont pas encore finis, vous pouvez les mar
\LevelThreeTitle{Environnements de type théorème}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -244,16 +241,18 @@ Les environnements de type théorème couramment utilisés ont été prédéfini
\LevelOneTitle{À propos des polices par défaut}
-Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise, YouSong et YouHei GBK de FounderType comme polices chinoises\footnote{Pour plus de détails, veuillez visiter le site web de FounderType : \url{https://www.foundertype.com}.}, et utilise partiellement Neo Euler comme police mathématique. Parmi eux, Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Les autres polices ne sont pas gratuites, vous devez les acheter et les installer vous-même.
+Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise principale; Source Han Serif, Source Han Sans et Source Han Mono comme police chinoise principale, sans empattement et monospace; et utilise partiellement Neo Euler comme police mathématique. Vous devez télécharger et installer ces polices vous-même. La série de polices Source Han peut être téléchargée sur \url{https://github.com/adobe-fonts} (il est recommandé de télécharger la version Super-OTC, afin que la taille de téléchargement soit plus petite). Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Lorsque la police correspondante n'est pas installée, la police fournie avec TeX Live sera utilisée à la place et l'effet peut être réduit.
+
+De plus, Source Code Pro est utilisé comme police anglaise sans empattement, New Computer Modern Mono comme police anglaise monospace, ainsi que certains symboles dans les polices mathématiques Asana Math, Tex Gyre Pagella Math et Latin Modern Math. Ces polices sont déjà disponibles dans TeX Live ou MikTeX, ce qui signifie que vous n'avez pas besoin de les installer vous-même.
\begin{itemize}
- \item English main font. \textsf{English sans serif font}.
- \item 中文主要字体, \textsf{中文无衬线字体}
+ \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+ \item 简体中文主要字体,\textsf{简体中文无衬线字体},\texttt{简体中文等宽字体}
+ \item \UseOtherLanguage{TC}{繁體中文主要字體,\textsf{繁體中文無襯線字體},\texttt{繁體中文等寬字體}}
+ \item \UseOtherLanguage{JP}{日本語のメインフォント、\textsf{日本語のサンセリフフォント}、\texttt{日本語の等幅フォント}}
\item Démonstration de maths : \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-Lorsque la police correspondante n'est pas installée, les polices fournies avec TeX Live seront utilisées à la place. Dans ce cas, l'expérience peut être réduite.
-
\LevelOneTitle{Les options}
@@ -287,7 +286,7 @@ Lorsque la police correspondante n'est pas installée, les polices fournies avec
\end{itemize}
\item \texttt{allowbf}
\begin{itemize}
- \item Pour activer les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
+ \item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
\item \texttt{runin}
\begin{itemize}
@@ -382,7 +381,6 @@ Par défaut, lors du référencement, le nom du théorème correspond au context
\UseLanguage{French}
-\bigskip
Voici les principaux styles d'environnements de type théorème :
\begin{theorem}
Style de théorème : theorem, proposition, lemma, corollary, ...
@@ -498,10 +496,12 @@ De même, il y a aussi \lstinline|\needgraph| :
\end{itemize}
+\clearpage
\LevelOneTitle{Problèmes connus}
\begin{itemize}[itemsep=.6em]
\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{}.
\item Le mécanisme de gestion des erreurs est incomplet : pas de messages correspondants lorsque certains problèmes surviennent.
\item Il y a encore beaucoup de choses qui peuvent être optimisées dans le code.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index d6f3ef19c4..52192ad71a 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre.cls
+++ b/macros/unicodetex/latex/beaulivre/beaulivre.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{beaulivre}
- [2021/07/30 A colorful book style]
+ [2021/08/08 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -116,6 +116,10 @@
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
+
+\IfFileExists{colorist-font.tex}{
+ \input{colorist-font.tex}
+}{
\IfFontExistsTF{Palatino Linotype}{%
\setmainfont{Palatino Linotype}
[\if@colorclass@useosf Numbers = OldStyle\fi]
@@ -133,59 +137,205 @@
BoldItalicFont = SourceSansPro-BoldIt.otf ]
\setmonofont{NewCMMono10-Regular.otf}[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Book.otf ,
+ BoldFont = NewCMMono10-Bold.otf ,
ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BookItalic.otf ]
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ]
+}
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
-\WarningFilter{everysel}{Everysel is no longer required}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmainfont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFileExists{colorist-font.cjk.tex}{
+ \input{colorist-font.cjk.tex}
+}{
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKmainfont{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFont = SourceHanSerifSC-Bold ]
}{
\setCJKmainfont{FandolSong-Regular.otf}[
BoldFont = FandolSong-Bold.otf ,
ItalicFont = FandolKai-Regular.otf ,
BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmonofont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFontExistsTF{SourceHanSansSC-Regular}{%
+ \setCJKsansfont{SourceHanSansSC-Regular}[
+ BoldFont = SourceHanSansSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ 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} ,
- SmallCapsFont = * ]
+ 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{FZYOUHK_506L--GBK1-0}{%
- \setCJKsansfont{FZYOUHK_506L--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
+\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 = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\if@PJLlang@enable@TC
+\IfFontExistsTF{SourceHanSerifTC-Regular}{%
+ \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ]
}{
- \setCJKsansfont{FandolHei-Regular.otf}[
+ \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 ,
- SmallCapsFont = * ]
+ 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@schinese}{%
+ \def\CJKsffamily{\CJKfamily{SCsans}}%
+ \def\CJKttfamily{\CJKfamily{SCmono}}%
+ \CJKfamily{SCmain}%
+}
+\fi
+
+\if@PJLlang@enable@TC
+\gappto{\PJLlang@langconfig@tchinese}{%
+ \def\CJKsffamily{\CJKfamily{TCsans}}%
+ \def\CJKttfamily{\CJKfamily{TCmono}}%
+ \CJKfamily{TCmain}%
+}
+\fi
+
+\if@PJLlang@enable@JP
+\gappto{\PJLlang@langconfig@japanese}{%
+ \def\CJKsffamily{\CJKfamily{JPsans}}%
+ \def\CJKttfamily{\CJKfamily{JPmono}}%
+ \CJKfamily{JPmain}%
+}
+\fi
}
\if@colorclass@customfont\else
diff --git a/macros/unicodetex/latex/einfart/README.md b/macros/unicodetex/latex/einfart/README.md
index fcbc608e99..18ef21279f 100644
--- a/macros/unicodetex/latex/einfart/README.md
+++ b/macros/unicodetex/latex/einfart/README.md
@@ -12,6 +12,18 @@ LuaLaTeX.
This is part of the `minimalist` class series.
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf b/macros/unicodetex/latex/einfart/einfart-doc-cn.pdf
index 7fcbd334a6..4a9d85038c 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 dee95dcf6c..a85ce320bb 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-cn.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{einfart}
+\documentclass[English,Chinese,French,classical]{einfart}
\linenumbers % Enable line numbers
@@ -98,9 +98,9 @@
\title{\einfart{},以极简主义风格排版你的文章}
\author{许锦文}
-\thanks{对应版本. \texttt{\einfart{} 2021/07/30}}
+\thanks{对应版本. \texttt{\einfart{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{2021年7月,北京}
+\date{2021年8月,北京}
\maketitle
@@ -109,7 +109,7 @@
\einfart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
- 这篇说明文档即是用 \einfart{} 排版的,你可以把它看作一份简短的说明与演示。
+ 这篇说明文档即是用 \einfart{} 排版的 (使用了参数 \texttt{classical}),你可以把它看作一份简短的说明与演示。
\end{abstract}
@@ -122,7 +122,8 @@
为了使用这篇文档中提到的文档类,你需要:
\begin{itemize}
\item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{minimalist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
- \item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
+ \item 下载并安装所需的字体,参考“关于默认字体”这一节。
+ \item 熟悉 \LaTeX{} 的基本使用方式,且会用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
\end{itemize}
@@ -289,20 +290,13 @@ Référence du théorème: \cref{thm:abc}
\end{tip}
-\begin{tip}
-如果你喜欢这个文档类,但又希望使用一种更加中规中矩的样式,那么不妨使用 \texttt{classical} 选项,就像这样:
-
-\begin{code}
-\documentclass[classical]{einfart}
-\end{code}
-\end{tip}
\LevelOneTitle{关于默认字体}
-\einfart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+本文档类中默认使用 Palatino Linotype 作为英文主字体,思源宋体、思源黑体、思源等宽作为中文主字体、无衬线字体以及等宽字体,并部分使用了 Neo Euler 作为数学字体。这些字体需要用户自行下载安装。其中,思源字体系列可在 \url{https://github.com/adobe-fonts} 下载 (推荐下载 Super-OTC 版本,这样下载的体积较小)。Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+另外,还使用了 Source Code Pro 作为英文无衬线字体、New Computer Modern Mono 作为英文等宽字体,以及 Asana Math、Tex Gyre Pagella Math、Latin Modern Math 数学字体中的部分符号。这些字体在 TeX Live 或 MikTeX 中已经提供,无需自行下载安装。
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
\LevelOneTitle{选项}
@@ -336,18 +330,15 @@ Référence du théorème: \cref{thm:abc}
\item 字体选项。顾名思义,会加载相应名称的字体。
\item \texttt{useosf} 选项用来启用“旧式”数字。
\end{itemize}
-\clearpage
\item \texttt{allowbf}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
+\clearpage
\item \texttt{classical}
\begin{itemize}
- \item 经典模式。启用这一选项时,样式会变得更加中规中矩:段落呈首行缩进样式、各类下划线减少、标题样式改变、定理类环境的样式也会更贴近常见的设置。
+ \item 经典模式。使用这一选项时,将会启用较为古色古香的风格,如同当前的这篇说明文档一样。
\end{itemize}
- \begin{tip}
- 如果你喜欢更加传统的样式,\texttt{allowbf} + \texttt{classical} 是一个不错的搭配。
- \end{tip}
\item \texttt{useindent}
\begin{itemize}
\item 采用段首缩进而不是段间间距。
@@ -383,11 +374,10 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
\item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|,用指定的语言的设定排版 \meta{content}。
\begin{itemize}
- \item 相比较 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能够保持行距稳定。
+ \item 相比 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能保持行距稳定。
\end{itemize}
\end{itemize}
-\clearpage
\meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可):
\begin{itemize}
\item 简体中文:\texttt{CN}、\texttt{Chinese}、\texttt{SChinese} 或 \texttt{SimplifiedChinese}
@@ -496,7 +486,6 @@ Référence du théorème: \cref{thm:abc}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
-\clearpage
下面提供一个例子。这三行代码:
\begin{code}
@@ -547,7 +536,6 @@ Référence du théorème: \cref{thm:abc}
\end{keyword}
\end{code}
-\clearpage
也可以按照 \AmS{} 文档类的方式来写:
\begin{code}
@@ -599,7 +587,7 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}[itemsep=.6em]
\item 对于字体的设置仍然不够完善。
- \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \einfart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
+ \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \minimalist{} (进而 \minimart{}、\einfart{} 与 \minimbook{}、\simplivre{}) 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
\item 代码中仍有许多可优化之处。
\end{itemize}
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-en.pdf b/macros/unicodetex/latex/einfart/einfart-doc-en.pdf
index adf25e9f1c..51d90706b1 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 f045982205..2a5d47d28b 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-en.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-en.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{einfart}
+\documentclass[English,Chinese,French,classical]{einfart}
\linenumbers % Enable line numbers
@@ -98,9 +98,9 @@
\title{\einfart{}, write your articles in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\einfart{} 2021/07/30}}
+\thanks{Corresponding to: \texttt{\einfart{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{July 2021, Beijing}
+\date{August 2021, Beijing}
\maketitle
@@ -109,7 +109,7 @@
\einfart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \einfart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
- This documentation is typeset using \einfart{}. You can think of it as a short introduction and demonstration.
+ This documentation is typeset using \einfart{} (with the option \texttt{classical}). You can think of it as a short introduction and demonstration.
\end{abstract}
@@ -123,6 +123,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}.
\end{itemize}
@@ -291,20 +292,13 @@ or to use the \AmS{} class:
\end{tip}
-\begin{tip}
-If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
-
-\begin{code}
-\documentclass[classical]{einfart}
-\end{code}
-\end{tip}
\LevelOneTitle{On the default fonts}
-By default, \einfart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts\footnote{For detail, pleaser visit FounderType's website: \url{https://www.foundertype.com}.}, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own.
+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.
+In addition, Source Code Pro is used as the English sans serif font, New Computer Modern Mono as the English monospace font, as well as some symbols in the mathematical fonts of Asana Math, Tex Gyre Pagella Math, and Latin Modern Math. These fonts are already available in TeX Live or MikTeX, which means you don't need to install them yourself.
-When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
\LevelOneTitle{The options}
@@ -337,18 +331,15 @@ When the corresponding font is not installed, fonts that comes with TeX Live wil
\item Font options. As the name suggest, font with corresponding name will be loaded.
\item The \texttt{useosf} option is used to enable the old-style figures.
\end{itemize}
-\clearpage
\item \texttt{allowbf}
\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
\item \texttt{classical}
\begin{itemize}
- \item Classic mode. When this option is enabled, the style will become more regular: paragraphs are indented, the use of underlines are reduced, heading styles are changed, and the theorem styles will be much closer to common styles.
+ \item Classic mode. An antique-looking style will be used when this option is enabled, like in the current documentation.
\end{itemize}
- \begin{tip}
- \texttt{allowbf} + \texttt{classical} is probably a good choice if you prefer traditional style.
- \end{tip}
\item \texttt{useindent}
\begin{itemize}
\item Use paragraph indentation instead of inter-paragraph spacing.
diff --git a/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf b/macros/unicodetex/latex/einfart/einfart-doc-fr.pdf
index 31b54f5776..7c3ae37bb0 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 babf19604f..56fb74bfef 100644
--- a/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
+++ b/macros/unicodetex/latex/einfart/einfart-doc-fr.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{einfart}
+\documentclass[English,Chinese,French,classical]{einfart}
\linenumbers % Enable line numbers
@@ -98,9 +98,9 @@
\title{\einfart{}, écrivez vos articles de manière simple et claire}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\einfart{} 2021/07/30}}
+\thanks{Correspondant à : \texttt{\einfart{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{Juillet 2021, à Pékin}
+\date{Août 2021, à Pékin}
\maketitle
@@ -109,7 +109,7 @@
\einfart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \einfart{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
- Cette documentation est composée à l'aide de \einfart{}. Vous pouvez le considérer comme une courte introduction et une démonstration.
+ Cette documentation est composée à l'aide de \einfart{} (avec l'option \texttt{classical}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\end{abstract}
@@ -123,6 +123,7 @@
Pour utiliser les classes de documents décrites ici, vous devez :
\begin{itemize}
\item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{minimalist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
+ \item télécharger et installer les polices requises, voir «~À propos des polices par défaut~».
\item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
\end{itemize}
@@ -290,21 +291,13 @@ ou utilisez la classe \AmS{} :
\vspace{-.5\baselineskip}
\end{tip}
-\begin{tip}
-Si vous aimez la classe de document actuelle, mais que vous souhaitez un style plus «~simple~», vous pouvez utiliser l'option \texttt{classical}, comme ceci :
-
-\begin{code}
-\documentclass[classical]{einfart}
-\end{code}
-\vspace{-.5\baselineskip}
-\end{tip}
\LevelOneTitle{À propos des polices par défaut}
-Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise, YouSong et YouHei GBK de FounderType comme polices chinoises\footnote{Pour plus de détails, veuillez visiter le site web de FounderType : \url{https://www.foundertype.com}.}, et utilise partiellement Neo Euler comme police mathématique. Parmi eux, Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Les autres polices ne sont pas gratuites, vous devez les acheter et les installer vous-même.
+Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise principale; Source Han Serif, Source Han Sans et Source Han Mono comme police chinoise principale, sans empattement et monospace; et utilise partiellement Neo Euler comme police mathématique. Vous devez télécharger et installer ces polices vous-même. La série de polices Source Han peut être téléchargée sur \url{https://github.com/adobe-fonts} (il est recommandé de télécharger la version Super-OTC, afin que la taille de téléchargement soit plus petite). Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Lorsque la police correspondante n'est pas installée, la police fournie avec TeX Live sera utilisée à la place et l'effet peut être réduit.
+De plus, Source Code Pro est utilisé comme police anglaise sans empattement, New Computer Modern Mono comme police anglaise monospace, ainsi que certains symboles dans les polices mathématiques Asana Math, Tex Gyre Pagella Math et Latin Modern Math. Ces polices sont déjà disponibles dans TeX Live ou MikTeX, ce qui signifie que vous n'avez pas besoin de les installer vous-même.
-Lorsque la police correspondante n'est pas installée, les polices fournies avec TeX Live seront utilisées à la place. Dans ce cas, l'expérience peut être réduite.
\LevelOneTitle{Les options}
@@ -339,15 +332,12 @@ Lorsque la police correspondante n'est pas installée, les polices fournies avec
\end{itemize}
\item \texttt{allowbf}
\begin{itemize}
- \item Pour activer les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
+ \item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
\item \texttt{classical}
\begin{itemize}
- \item Mode classique. Lorsque cette option est utilisée, le style deviendra plus régulier : les paragraphes sont en retrait, l'utilisation de soulignements est réduite, les styles de titres sont modifiés et les styles de théorème seront beaucoup plus proches des styles par défaut.
+ \item Mode classique. Un style antique sera utilisé lorsque cette option est activée, comme dans la documentation actuelle.
\end{itemize}
- \begin{tip}
- \texttt{allowbf} + \texttt{classical} est probablement un bon choix si vous préférez le style traditionnel.
- \end{tip}
\item \texttt{useindent}
\begin{itemize}
\item Utilisez l'indentation des paragraphes au lieu de l'espacement entre les paragraphes.
diff --git a/macros/unicodetex/latex/einfart/einfart.cls b/macros/unicodetex/latex/einfart/einfart.cls
index c4d8d43f01..905e16569c 100644
--- a/macros/unicodetex/latex/einfart/einfart.cls
+++ b/macros/unicodetex/latex/einfart/einfart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{einfart}
- [2021/07/30 A simple and clear article style]
+ [2021/08/08 A simple and clear article style]
\def\minimclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -49,7 +49,7 @@
\if@minimclass@draft
\@minimclass@fasttrue
\fi
-\if@minimclass@classical
+\if@minimclass@classical\else
\@minimclass@useindenttrue
\fi
\if@minimclass@palatino
@@ -123,6 +123,10 @@
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
+
+\IfFileExists{minimalist-font.tex}{
+ \input{minimalist-font.tex}
+}{
\IfFontExistsTF{Palatino Linotype}{%
\setmainfont{Palatino Linotype}
[\if@minimclass@useosf Numbers = OldStyle\fi]
@@ -140,73 +144,208 @@
BoldItalicFont = SourceSansPro-BoldIt.otf ]
\setmonofont{NewCMMono10-Regular.otf}[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Book.otf ,
+ BoldFont = NewCMMono10-Bold.otf ,
ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BookItalic.otf ]
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ]
+}
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
-\WarningFilter{everysel}{Everysel is no longer required}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmainfont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFileExists{minimalist-font.cjk.tex}{
+ \input{minimalist-font.cjk.tex}
+}{
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKmainfont{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFont = SourceHanSerifSC-Bold ]
}{
\setCJKmainfont{FandolSong-Regular.otf}[
BoldFont = FandolSong-Bold.otf ,
ItalicFont = FandolKai-Regular.otf ,
BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmonofont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFontExistsTF{SourceHanSansSC-Regular}{%
+ \setCJKsansfont{SourceHanSansSC-Regular}[
+ BoldFont = SourceHanSansSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ 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} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUHK_508R--GBK1-0}{%
- \setCJKsansfont{FZYOUHK_508R--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\if@PJLlang@enable@CN
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKfamilyfont{SCmain}{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
- \setCJKfamilyfont{zhhei}{FZYOUHK_508R--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
+ 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 = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\if@PJLlang@enable@TC
+\IfFontExistsTF{SourceHanSerifTC-Regular}{%
+ \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ]
}{
- \setCJKsansfont{FandolHei-Regular.otf}[
+ \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 ,
- SmallCapsFont = * ]
- \setCJKfamilyfont{zhhei}{FandolHei-Regular.otf}[
+ 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 ,
- SmallCapsFont = * ]
+ 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@schinese}{%
+ \def\CJKsffamily{\CJKfamily{SCsans}}%
+ \def\CJKttfamily{\CJKfamily{SCmono}}%
+ \CJKfamily{SCmain}%
+}
+\fi
+
+\if@PJLlang@enable@TC
+\gappto{\PJLlang@langconfig@tchinese}{%
+ \def\CJKsffamily{\CJKfamily{TCsans}}%
+ \def\CJKttfamily{\CJKfamily{TCmono}}%
+ \CJKfamily{TCmain}%
}
+\fi
-\def\minimalist@titlefontshape{\CJKfamily{zhhei}}
+\if@PJLlang@enable@JP
+\gappto{\PJLlang@langconfig@japanese}{%
+ \def\CJKsffamily{\CJKfamily{JPsans}}%
+ \def\CJKttfamily{\CJKfamily{JPmono}}%
+ \CJKfamily{JPmain}%
+}
+\fi
+
+\def\minimalist@titlefontshape{\CJKsffamily}
+}
\if@minimclass@customfont\else
\if@minimclass@fast
diff --git a/macros/unicodetex/latex/lebhart/README.md b/macros/unicodetex/latex/lebhart/README.md
index b9092c4e26..58a630c090 100644
--- a/macros/unicodetex/latex/lebhart/README.md
+++ b/macros/unicodetex/latex/lebhart/README.md
@@ -12,6 +12,18 @@ LuaLaTeX.
This is part of the `colorist` class series.
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
index 901de1da7f..72f790aea3 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 d2a638335e..8842620602 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
@@ -93,9 +93,9 @@
\title{\lebhart{},以多彩的方式排版你的文章}
\author{许锦文}
-\thanks{对应版本. \texttt{\lebhart{} 2021/07/30}}
+\thanks{对应版本. \texttt{\lebhart{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{2021年7月,北京}
+\date{2021年8月,北京}
\maketitle
@@ -117,6 +117,7 @@
为了使用这篇文档中提到的文档类,你需要:
\begin{itemize}
\item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{colorist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
+ \item 下载并安装所需的字体,参考“关于默认字体”这一节。
\item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
\end{itemize}
@@ -174,7 +175,6 @@ Référence du théorème: \cref{thm:abc}
\bigskip
\LevelThreeTitle{初始化部分}
-\medskip
\begin{code}
\documentclass{lebhart}
\usepackage{ProjLib}
@@ -184,7 +184,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{设定语言}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -195,7 +194,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{标题,作者信息,摘要与关键词}
-\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
@@ -245,7 +243,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{未完成标记}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -253,7 +250,6 @@ Référence du théorème: \cref{thm:abc}
\LevelThreeTitle{定理类环境}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -295,10 +291,10 @@ Référence du théorème: \cref{thm:abc}
\bigskip
\LevelOneTitle{关于默认字体}
-\lebhart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+本文档类中默认使用 Palatino Linotype 作为英文主字体,思源宋体、思源黑体、思源等宽作为中文主字体、无衬线字体以及等宽字体,并部分使用了 Neo Euler 作为数学字体。这些字体需要用户自行下载安装。其中,思源字体系列可在 \url{https://github.com/adobe-fonts} 下载 (推荐下载 Super-OTC 版本,这样下载的体积较小)。Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+另外,还使用了 Source Code Pro 作为英文无衬线字体、New Computer Modern Mono 作为英文等宽字体,以及 Asana Math、Tex Gyre Pagella Math、Latin Modern Math 数学字体中的部分符号。这些字体在 TeX Live 或 MikTeX 中已经提供,无需自行下载安装。
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
\clearpage
@@ -345,6 +341,7 @@ Référence du théorème: \cref{thm:abc}
\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{chapter} (书) 或 \texttt{section} (文章) 编号。
@@ -369,7 +366,7 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
\item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|,用指定的语言的设定排版 \meta{content}。
\begin{itemize}
- \item 相比较 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能够保持行距稳定。
+ \item 相比 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能保持行距稳定。
\end{itemize}
\end{itemize}
@@ -598,11 +595,12 @@ Référence du théorème: \cref{thm:abc}
其中 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 的相互顺序是不重要的。
+\clearpage
\LevelOneTitle{目前存在的问题}
-
\begin{itemize}[itemsep=.6em]
\item 对于字体的设置仍然不够完善。
- \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \lebhart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
+ \item 目录的设计还不够美观。
+ \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \colorist{} (进而 \colorart{}、\lebhart{} 与 \colorbook{}、\beaulivre{}) 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
\item 代码中仍有许多可优化之处。
\end{itemize}
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
index 8228d9d692..b15c888de7 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 81de6613b0..c5bb60d42d 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
@@ -93,9 +93,9 @@
\title{\lebhart{}, write your articles in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\lebhart{} 2021/07/30}}
+\thanks{Corresponding to: \texttt{\lebhart{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{July 2021, Beijing}
+\date{August 2021, Beijing}
\maketitle
@@ -118,6 +118,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}.
\end{itemize}
@@ -174,7 +175,6 @@ If you find this example a little complicated, don't worry. Let's now look at th
\clearpage
\LevelThreeTitle{Initialization}
-\medskip
\begin{code}
\documentclass{lebhart}
\usepackage{ProjLib}
@@ -184,7 +184,6 @@ Initialization is straightforward. The first line loads the document class \lebh
\LevelThreeTitle{Set the language}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -196,7 +195,6 @@ For detailed description of this command and more related commands, please refer
\LevelThreeTitle{Title, author information, abstract and keywords}
-\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
@@ -246,7 +244,6 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\LevelThreeTitle{Draft marks}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -255,7 +252,6 @@ When you have some places that have not yet been finished yet, you can mark them
\LevelThreeTitle{Theorem-like environments}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -295,11 +291,12 @@ If you like the current document class, but want a more ``plain'' style, then yo
\end{tip}
+\clearpage
\LevelOneTitle{On the default fonts}
-By default, \lebhart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts\footnote{For detail, pleaser visit FounderType's website: \url{https://www.foundertype.com}.}, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own.
+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.
+In addition, Source Code Pro is used as the English sans serif font, New Computer Modern Mono as the English monospace font, as well as some symbols in the mathematical fonts of Asana Math, Tex Gyre Pagella Math, and Latin Modern Math. These fonts are already available in TeX Live or MikTeX, which means you don't need to install them yourself.
-When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
\LevelOneTitle{The options}
@@ -344,6 +341,7 @@ When the corresponding font is not installed, fonts that comes with TeX Live wil
\begin{itemize}
\item Pure text mode. Does not load theorem-like environments.
\end{itemize}
+\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. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
@@ -429,7 +427,6 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\bigskip
The following are the main styles of theorem-like environments:
\begin{theorem}
Theorem style: theorem, proposition, lemma, corollary, ...
@@ -597,10 +594,12 @@ 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
\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
+ \item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
index 1056ba7174..9de3f3c801 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 26be646198..f86fec6d47 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
@@ -93,9 +93,9 @@
\title{\lebhart{}, écrivez vos articles de manière colorée}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\lebhart{} 2021/07/30}}
+\thanks{Correspondant à : \texttt{\lebhart{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{Juillet 2021, à Pékin}
+\date{Août 2021, à Pékin}
\maketitle
@@ -118,6 +118,7 @@
Pour utiliser les classes de documents décrites ici, vous devez :
\begin{itemize}
\item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{colorist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
+ \item télécharger et installer les polices requises, voir «~À propos des polices par défaut~».
\item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
\end{itemize}
@@ -175,7 +176,6 @@ Si vous trouvez cela un peu compliqué, ne vous inquiétez pas. Examinons mainte
\bigskip
\LevelThreeTitle{Initialisation}
-\medskip
\begin{code}
\documentclass{lebhart}
\usepackage{ProjLib}
@@ -185,7 +185,6 @@ L'initialisation est simple. La première ligne ajoute la classe de document \le
\LevelThreeTitle{Choisir la langue}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -196,7 +195,6 @@ Pour une description détaillée de cette commande et d'autres commandes associ
\LevelThreeTitle{Titre, informations sur l'auteur, résumé et mots-clés}
-\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
@@ -246,7 +244,6 @@ De plus, vous pouvez également écrire à la manière \AmS{}, c'est-à-dire :
\LevelThreeTitle{Marques de brouillon}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -254,7 +251,6 @@ Lorsque vous avez des endroits qui ne sont pas encore finis, vous pouvez les mar
\LevelThreeTitle{Environnements de type théorème}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -296,10 +292,10 @@ Si vous aimez la classe de document actuelle, mais que vous souhaitez un style p
\LevelOneTitle{À propos des polices par défaut}
-Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise, YouSong et YouHei GBK de FounderType comme polices chinoises\footnote{Pour plus de détails, veuillez visiter le site web de FounderType : \url{https://www.foundertype.com}.}, et utilise partiellement Neo Euler comme police mathématique. Parmi eux, Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Les autres polices ne sont pas gratuites, vous devez les acheter et les installer vous-même.
+Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise principale; Source Han Serif, Source Han Sans et Source Han Mono comme police chinoise principale, sans empattement et monospace; et utilise partiellement Neo Euler comme police mathématique. Vous devez télécharger et installer ces polices vous-même. La série de polices Source Han peut être téléchargée sur \url{https://github.com/adobe-fonts} (il est recommandé de télécharger la version Super-OTC, afin que la taille de téléchargement soit plus petite). Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Lorsque la police correspondante n'est pas installée, la police fournie avec TeX Live sera utilisée à la place et l'effet peut être réduit.
+De plus, Source Code Pro est utilisé comme police anglaise sans empattement, New Computer Modern Mono comme police anglaise monospace, ainsi que certains symboles dans les polices mathématiques Asana Math, Tex Gyre Pagella Math et Latin Modern Math. Ces polices sont déjà disponibles dans TeX Live ou MikTeX, ce qui signifie que vous n'avez pas besoin de les installer vous-même.
-Lorsque la police correspondante n'est pas installée, les polices fournies avec TeX Live seront utilisées à la place. Dans ce cas, l'expérience peut être réduite.
\LevelOneTitle{Les options}
@@ -334,7 +330,7 @@ Lorsque la police correspondante n'est pas installée, les polices fournies avec
\end{itemize}
\item \texttt{allowbf}
\begin{itemize}
- \item Pour activer les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
+ \item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
\item \texttt{runin}
\begin{itemize}
@@ -428,7 +424,6 @@ Par défaut, lors du référencement, le nom du théorème correspond au context
\UseLanguage{French}
-\bigskip
Voici les principaux styles d'environnements de type théorème :
\begin{theorem}
Style de théorème : theorem, proposition, lemma, corollary, ...
@@ -594,10 +589,12 @@ 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
\LevelOneTitle{Problèmes connus}
\begin{itemize}[itemsep=.6em]
\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{}.
\item Le mécanisme de gestion des erreurs est incomplet : pas de messages correspondants lorsque certains problèmes surviennent.
\item Il y a encore beaucoup de choses qui peuvent être optimisées dans le code.
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index f7e3535e48..0c298b39da 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{lebhart}
- [2021/07/30 A colorful article style]
+ [2021/08/08 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -116,6 +116,10 @@
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
+
+\IfFileExists{colorist-font.tex}{
+ \input{colorist-font.tex}
+}{
\IfFontExistsTF{Palatino Linotype}{%
\setmainfont{Palatino Linotype}
[\if@colorclass@useosf Numbers = OldStyle\fi]
@@ -133,59 +137,205 @@
BoldItalicFont = SourceSansPro-BoldIt.otf ]
\setmonofont{NewCMMono10-Regular.otf}[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Book.otf ,
+ BoldFont = NewCMMono10-Bold.otf ,
ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BookItalic.otf ]
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ]
+}
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
-\WarningFilter{everysel}{Everysel is no longer required}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmainfont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFileExists{colorist-font.cjk.tex}{
+ \input{colorist-font.cjk.tex}
+}{
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKmainfont{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFont = SourceHanSerifSC-Bold ]
}{
\setCJKmainfont{FandolSong-Regular.otf}[
BoldFont = FandolSong-Bold.otf ,
ItalicFont = FandolKai-Regular.otf ,
BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmonofont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFontExistsTF{SourceHanSansSC-Regular}{%
+ \setCJKsansfont{SourceHanSansSC-Regular}[
+ BoldFont = SourceHanSansSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ 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} ,
- SmallCapsFont = * ]
+ 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{FZYOUHK_506L--GBK1-0}{%
- \setCJKsansfont{FZYOUHK_506L--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
+\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 = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\if@PJLlang@enable@TC
+\IfFontExistsTF{SourceHanSerifTC-Regular}{%
+ \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ]
}{
- \setCJKsansfont{FandolHei-Regular.otf}[
+ \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 ,
- SmallCapsFont = * ]
+ 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@schinese}{%
+ \def\CJKsffamily{\CJKfamily{SCsans}}%
+ \def\CJKttfamily{\CJKfamily{SCmono}}%
+ \CJKfamily{SCmain}%
+}
+\fi
+
+\if@PJLlang@enable@TC
+\gappto{\PJLlang@langconfig@tchinese}{%
+ \def\CJKsffamily{\CJKfamily{TCsans}}%
+ \def\CJKttfamily{\CJKfamily{TCmono}}%
+ \CJKfamily{TCmain}%
+}
+\fi
+
+\if@PJLlang@enable@JP
+\gappto{\PJLlang@langconfig@japanese}{%
+ \def\CJKsffamily{\CJKfamily{JPsans}}%
+ \def\CJKttfamily{\CJKfamily{JPmono}}%
+ \CJKfamily{JPmain}%
+}
+\fi
}
\if@colorclass@customfont\else
diff --git a/macros/unicodetex/latex/simplivre/README.md b/macros/unicodetex/latex/simplivre/README.md
index 51b089deb2..6ec7912598 100644
--- a/macros/unicodetex/latex/simplivre/README.md
+++ b/macros/unicodetex/latex/simplivre/README.md
@@ -12,6 +12,18 @@ LuaLaTeX.
This is part of the `minimalist` class series.
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.pdf
index e001af026c..dd48064f2f 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 2903b75df8..704dd4f1cf 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{simplivre}
+\documentclass[English,Chinese,French,JP,TC,classical]{simplivre}
\linenumbers % Enable line numbers
@@ -103,9 +103,9 @@
\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)$);
\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/07/30}}};
+ \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/08/08}}};
\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年7月,北京}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年8月,北京}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -117,7 +117,7 @@
\simplivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
-这篇说明文档即是用 \simplivre{} 排版的,你可以把它看作一份简短的说明与演示。
+这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \texttt{classical}),你可以把它看作一份简短的说明与演示。
\bigskip
\begin{tip}
@@ -136,7 +136,8 @@
为了使用这篇文档中提到的文档类,你需要:
\begin{itemize}
\item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{minimalist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
- \item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
+ \item 下载并安装所需的字体,参考“关于默认字体”这一节。
+ \item 熟悉 \LaTeX{} 的基本使用方式,且会用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
\end{itemize}
@@ -248,16 +249,18 @@ Référence du théorème: \cref{thm:abc}
\LevelOneTitle{关于默认字体}
-\einfart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+本文档类中默认使用 Palatino Linotype 作为英文主字体,思源宋体、思源黑体、思源等宽作为中文主字体、无衬线字体以及等宽字体,并部分使用了 Neo Euler 作为数学字体。这些字体需要用户自行下载安装。其中,思源字体系列可在 \url{https://github.com/adobe-fonts} 下载 (推荐下载 Super-OTC 版本,这样下载的体积较小)。Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+
+另外,还使用了 Source Code Pro 作为英文无衬线字体、New Computer Modern Mono 作为英文等宽字体,以及 Asana Math、Tex Gyre Pagella Math、Latin Modern Math 数学字体中的部分符号。这些字体在 TeX Live 或 MikTeX 中已经提供,无需自行下载安装。
\begin{itemize}
- \item English main font. \textsf{English sans serif font}.
- \item 中文主要字体,\textsf{中文无衬线字体}
+ \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+ \item 简体中文主要字体,\textsf{简体中文无衬线字体},\texttt{简体中文等宽字体}
+ \item \UseOtherLanguage{TC}{繁體中文主要字體,\textsf{繁體中文無襯線字體},\texttt{繁體中文等寬字體}}
+ \item \UseOtherLanguage{JP}{日本語のメインフォント、\textsf{日本語のサンセリフフォント}、\texttt{日本語の等幅フォント}}
\item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
-
\LevelOneTitle{选项}
@@ -296,15 +299,13 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
\item \texttt{classical}
\begin{itemize}
- \item 经典模式。启用这一选项时,样式会变得更加中规中矩:段落呈首行缩进样式、各类下划线减少、标题样式改变、定理类环境的样式也会更贴近常见的设置。
+ \item 经典模式。使用这一选项时,将会启用较为古色古香的风格,如同当前的这篇说明文档一样。
\end{itemize}
- \begin{tip}
- 如果你喜欢更加传统的样式,\texttt{allowbf} + \texttt{classical} 是一个不错的搭配。
- \end{tip}
\item \texttt{useindent}
\begin{itemize}
\item 采用段首缩进而不是段间间距。
\end{itemize}
+\clearpage
\item \texttt{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
@@ -338,7 +339,7 @@ Référence du théorème: \cref{thm:abc}
\end{itemize}
\item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|,用指定的语言的设定排版 \meta{content}。
\begin{itemize}
- \item 相比较 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能够保持行距稳定。
+ \item 相比 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能保持行距稳定。
\end{itemize}
\end{itemize}
@@ -503,7 +504,7 @@ Référence du théorème: \cref{thm:abc}
\begin{itemize}[itemsep=.6em]
\item 对于字体的设置仍然不够完善。
- \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \einfart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
+ \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \minimalist{} (进而 \minimart{}、\einfart{} 与 \minimbook{}、\simplivre{}) 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
\item 代码中仍有许多可优化之处。
\end{itemize}
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-en.pdf
index 24bd3a3881..8c5b66c703 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 3aa96bc4d9..2e840f47dc 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-en.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{simplivre}
+\documentclass[English,Chinese,French,JP,TC,classical]{simplivre}
\linenumbers % Enable line numbers
@@ -104,9 +104,9 @@
\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)$);
\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/07/30}}};
+ \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/08/08}}};
\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}{July 2021, Beijing}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{August 2021, Beijing}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -118,7 +118,7 @@
\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{}. You can think of it as a short introduction and demonstration.
+This documentation is typeset using \simplivre{} (with the option \texttt{classical}). You can think of it as a short introduction and demonstration.
\bigskip
\begin{tip}
@@ -138,6 +138,7 @@ This documentation is typeset using \simplivre{}. You can think of it as a short
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}.
\end{itemize}
@@ -251,16 +252,18 @@ Commonly used theorem-like environments have been pre-defined. Also, when refere
\LevelOneTitle{On the default fonts}
-By default, \einfart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts\footnote{For detail, pleaser visit FounderType's website: \url{https://www.foundertype.com}.}, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own.
+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.
+
+In addition, Source Code Pro is used as the English sans serif font, New Computer Modern Mono as the English monospace font, as well as some symbols in the mathematical fonts of Asana Math, Tex Gyre Pagella Math, and Latin Modern Math. These fonts are already available in TeX Live or MikTeX, which means you don't need to install them yourself.
\begin{itemize}
- \item English main font. \textsf{English sans serif font}.
- \item 中文主要字体, \textsf{中文无衬线字体}
+ \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+ \item 简体中文主要字体,\textsf{简体中文无衬线字体},\texttt{简体中文等宽字体}
+ \item \UseOtherLanguage{TC}{繁體中文主要字體,\textsf{繁體中文無襯線字體},\texttt{繁體中文等寬字體}}
+ \item \UseOtherLanguage{JP}{日本語のメインフォント、\textsf{日本語のサンセリフフォント}、\texttt{日本語の等幅フォント}}
\item Math demonstration: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
-
\LevelOneTitle{The options}
\simplivre{} offers the following options:
@@ -298,11 +301,8 @@ When the corresponding font is not installed, fonts that comes with TeX Live wil
\end{itemize}
\item \texttt{classical}
\begin{itemize}
- \item Classic mode. When this option is enabled, the style will become more regular: paragraphs are indented, the use of underlines are reduced, heading styles are changed, and the theorem styles will be much closer to common styles.
+ \item Classic mode. An antique-looking style will be used when this option is enabled, like in the current documentation.
\end{itemize}
- \begin{tip}
- \texttt{allowbf} + \texttt{classical} is probably a good choice if you prefer traditional style.
- \end{tip}
\item \texttt{useindent}
\begin{itemize}
\item Use paragraph indentation instead of inter-paragraph spacing.
@@ -311,6 +311,7 @@ When the corresponding font is not installed, fonts that comes with TeX Live wil
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
+\clearpage
\item \texttt{puretext} or \texttt{nothms}
\begin{itemize}
\item Pure text mode. Does not load theorem-like environments.
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.pdf
index d5edaaa596..87556d62e2 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 fb2364ec43..536e51ab6b 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-fr.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French]{simplivre}
+\documentclass[English,Chinese,French,JP,TC,classical]{simplivre}
\linenumbers % Enable line numbers
@@ -103,9 +103,9 @@
\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)$);
\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/07/30}}};
+ \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/08/08}}};
\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}{Juillet 2021, à Pékin}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{Août 2021, à Pékin}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -117,7 +117,7 @@
\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{}. 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{classical}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\bigskip
\begin{tip}
@@ -137,6 +137,7 @@ Cette documentation est composée à l'aide de \simplivre{}. Vous pouvez le cons
Pour utiliser les classes de documents décrites ici, vous devez :
\begin{itemize}
\item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{minimalist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
+ \item télécharger et installer les polices requises, voir «~À propos des polices par défaut~».
\item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
\end{itemize}
@@ -249,16 +250,18 @@ Les environnements de type théorème couramment utilisés ont été prédéfini
\LevelOneTitle{À propos des polices par défaut}
-Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise, YouSong et YouHei GBK de FounderType comme polices chinoises\footnote{Pour plus de détails, veuillez visiter le site web de FounderType : \url{https://www.foundertype.com}.}, et utilise partiellement Neo Euler comme police mathématique. Parmi eux, Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Les autres polices ne sont pas gratuites, vous devez les acheter et les installer vous-même.
+Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise principale; Source Han Serif, Source Han Sans et Source Han Mono comme police chinoise principale, sans empattement et monospace; et utilise partiellement Neo Euler comme police mathématique. Vous devez télécharger et installer ces polices vous-même. La série de polices Source Han peut être téléchargée sur \url{https://github.com/adobe-fonts} (il est recommandé de télécharger la version Super-OTC, afin que la taille de téléchargement soit plus petite). Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Lorsque la police correspondante n'est pas installée, la police fournie avec TeX Live sera utilisée à la place et l'effet peut être réduit.
+
+De plus, Source Code Pro est utilisé comme police anglaise sans empattement, New Computer Modern Mono comme police anglaise monospace, ainsi que certains symboles dans les polices mathématiques Asana Math, Tex Gyre Pagella Math et Latin Modern Math. Ces polices sont déjà disponibles dans TeX Live ou MikTeX, ce qui signifie que vous n'avez pas besoin de les installer vous-même.
\begin{itemize}
- \item English main font. \textsf{English sans serif font}.
- \item 中文主要字体, \textsf{中文无衬线字体}
+ \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+ \item 简体中文主要字体,\textsf{简体中文无衬线字体},\texttt{简体中文等宽字体}
+ \item \UseOtherLanguage{TC}{繁體中文主要字體,\textsf{繁體中文無襯線字體},\texttt{繁體中文等寬字體}}
+ \item \UseOtherLanguage{JP}{日本語のメインフォント、\textsf{日本語のサンセリフフォント}、\texttt{日本語の等幅フォント}}
\item Démonstration de maths : \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-Lorsque la police correspondante n'est pas installée, les polices fournies avec TeX Live seront utilisées à la place. Dans ce cas, l'expérience peut être réduite.
-
\LevelOneTitle{Les options}
@@ -292,19 +295,17 @@ Lorsque la police correspondante n'est pas installée, les polices fournies avec
\end{itemize}
\item \texttt{allowbf}
\begin{itemize}
- \item Pour activer les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
+ \item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
\item \texttt{classical}
\begin{itemize}
- \item Mode classique. Lorsque cette option est utilisée, le style deviendra plus régulier : les paragraphes sont en retrait, l'utilisation de soulignements est réduite, les styles de titres sont modifiés et les styles de théorème seront beaucoup plus proches des styles par défaut.
+ \item Mode classique. Un style antique sera utilisé lorsque cette option est activée, comme dans la documentation actuelle.
\end{itemize}
- \begin{tip}
- \texttt{allowbf} + \texttt{classical} est probablement un bon choix si vous préférez le style traditionnel.
- \end{tip}
\item \texttt{useindent}
\begin{itemize}
\item Utilisez l'indentation des paragraphes au lieu de l'espacement entre les paragraphes.
\end{itemize}
+\clearpage
\item \texttt{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
diff --git a/macros/unicodetex/latex/simplivre/simplivre.cls b/macros/unicodetex/latex/simplivre/simplivre.cls
index f8359a10c4..c3d1466997 100644
--- a/macros/unicodetex/latex/simplivre/simplivre.cls
+++ b/macros/unicodetex/latex/simplivre/simplivre.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{simplivre}
- [2021/07/30 A simple and clear book style]
+ [2021/08/08 A simple and clear book style]
\def\minimclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -49,7 +49,7 @@
\if@minimclass@draft
\@minimclass@fasttrue
\fi
-\if@minimclass@classical
+\if@minimclass@classical\else
\@minimclass@useindenttrue
\fi
\if@minimclass@palatino
@@ -123,6 +123,10 @@
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
+
+\IfFileExists{minimalist-font.tex}{
+ \input{minimalist-font.tex}
+}{
\IfFontExistsTF{Palatino Linotype}{%
\setmainfont{Palatino Linotype}
[\if@minimclass@useosf Numbers = OldStyle\fi]
@@ -140,73 +144,208 @@
BoldItalicFont = SourceSansPro-BoldIt.otf ]
\setmonofont{NewCMMono10-Regular.otf}[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Book.otf ,
+ BoldFont = NewCMMono10-Bold.otf ,
ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BookItalic.otf ]
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ]
+}
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
-\WarningFilter{everysel}{Everysel is no longer required}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmainfont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFileExists{minimalist-font.cjk.tex}{
+ \input{minimalist-font.cjk.tex}
+}{
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKmainfont{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFont = SourceHanSerifSC-Bold ]
}{
\setCJKmainfont{FandolSong-Regular.otf}[
BoldFont = FandolSong-Bold.otf ,
ItalicFont = FandolKai-Regular.otf ,
BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmonofont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFontExistsTF{SourceHanSansSC-Regular}{%
+ \setCJKsansfont{SourceHanSansSC-Regular}[
+ BoldFont = SourceHanSansSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ 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} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUHK_508R--GBK1-0}{%
- \setCJKsansfont{FZYOUHK_508R--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\if@PJLlang@enable@CN
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKfamilyfont{SCmain}{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
- \setCJKfamilyfont{zhhei}{FZYOUHK_508R--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
+ 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 = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\if@PJLlang@enable@TC
+\IfFontExistsTF{SourceHanSerifTC-Regular}{%
+ \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ]
}{
- \setCJKsansfont{FandolHei-Regular.otf}[
+ \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 ,
- SmallCapsFont = * ]
- \setCJKfamilyfont{zhhei}{FandolHei-Regular.otf}[
+ 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 ,
- SmallCapsFont = * ]
+ 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@schinese}{%
+ \def\CJKsffamily{\CJKfamily{SCsans}}%
+ \def\CJKttfamily{\CJKfamily{SCmono}}%
+ \CJKfamily{SCmain}%
+}
+\fi
+
+\if@PJLlang@enable@TC
+\gappto{\PJLlang@langconfig@tchinese}{%
+ \def\CJKsffamily{\CJKfamily{TCsans}}%
+ \def\CJKttfamily{\CJKfamily{TCmono}}%
+ \CJKfamily{TCmain}%
}
+\fi
-\def\minimalist@titlefontshape{\CJKfamily{zhhei}}
+\if@PJLlang@enable@JP
+\gappto{\PJLlang@langconfig@japanese}{%
+ \def\CJKsffamily{\CJKfamily{JPsans}}%
+ \def\CJKttfamily{\CJKfamily{JPmono}}%
+ \CJKfamily{JPmain}%
+}
+\fi
+
+\def\minimalist@titlefontshape{\CJKsffamily}
+}
\if@minimclass@customfont\else
\if@minimclass@fast