summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/lebhart
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/lebhart')
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdfbin222939 -> 220301 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex125
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.pdfbin92143 -> 91176 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.tex125
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdfbin93425 -> 92970 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex126
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls323
7 files changed, 409 insertions, 290 deletions
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
index cde237718f..3b51e48fc9 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
index 55e53b41af..c5140be7d8 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\usepackage{xcolor}
+\usepackage{setspace}
+\definecolor{code-main}{RGB}{70,130,180}
+\definecolor{code-expl3}{RGB}{240,50,60}
+\definecolor{code-option}{RGB}{40,110,20}
+\definecolor{code-keys}{RGB}{100,130,150}
+\definecolor{code-comment}{RGB}{20,120,80}
+\definecolor{code-background}{gray}{0.99}
+\lstset{
+ language = [LaTeX]TeX,
+ basicstyle = \ttfamily,
+ keywordstyle = \color{code-main},
+ commentstyle = \color{code-comment},
+ showstringspaces = false,
+ breaklines = true,
+ frame = lines,
+ backgroundcolor = \color{code-background},
+ flexiblecolumns = true,
+ escapeinside = {(*}{*)},
+ alsoletter = {_,:},
+ % numbers = left,
+ % firstnumber = last,
+ numberstyle = \scriptsize\ttfamily,
+ stepnumber = 1,
+ numbersep = 5pt,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
+\lstset{% LaTeX2 commands
+ classoffset = 0,
+ texcsstyle =* \color{code-main},
+ moretexcs =
+ {
+ linenumbers,nolinenumbers,
+ part,parttext,chapter,section,subsection,subsubsection,
+ frontmatter,mainmatter,backmatter,
+ tableofcontents,
+ href,
+ color,
+ NameTheorem,CreateTheorem,
+ cref,
+ ProjLib,
+ DNF,
+ UseLanguage,UseOtherLanguage,AddLanguageSetting,
+ maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,
+ qedhere,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
+}
+\lstnewenvironment{code}{\setstretch{1.05}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+
+\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
%%================================
%% tip
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\以多彩的方式排版你的文章}
\author{许锦文}
@@ -106,7 +134,7 @@
\lebhart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
- 这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \texttt{use boldface}),你可以把它看作一份简短的说明与演示。
+ 这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。
\end{abstract}
@@ -286,13 +314,6 @@ Référence du théorème: \cref{thm:abc}
\end{tip}
-\begin{tip}
-如果你喜欢这个文档类,但又希望使用一种更加中规中矩的样式,那么不妨使用 \texttt{classical} 选项,就像这样:
-
-\begin{code}
-\documentclass[classical]{lebhart}
-\end{code}
-\end{tip}
\bigskip
@@ -308,13 +329,13 @@ Référence du théorème: \cref{thm:abc}
\lebhart{} 文档类有下面几个选项:
-\begin{itemize}
- \item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item 语言选项 \classoption{EN} / \classoption{english} / \classoption{English}、\classoption{FR} / \classoption{french} / \classoption{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
\item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
- \item \texttt{draft} 或 \texttt{fast}
+ \item \classoption{draft} 或 \classoption{fast}
\begin{itemize}
\item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
\begin{itemize}
@@ -326,35 +347,35 @@ Référence du théorème: \cref{thm:abc}
\begin{tip}
在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
\end{tip}
- \item \texttt{a4paper} 或 \texttt{b5paper}
+ \item \classoption{a4paper} 或 \classoption{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}、\classoption{times}、\classoption{garamond}、\classoption{noto}、\classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
- \item \texttt{useosf} 选项用来启用“旧式”数字。
+ \item \classoption{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
- \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}、\classoption{thmnum} 或 \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
- \item \texttt{regionalref}、\texttt{originalref}
+ \item \classoption{regionalref}、\classoption{originalref}
\begin{itemize}
- \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
- \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。
+ \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \classoption{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \classoption{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
+ \item 在 \classoption{fast} 模式下,\classoption{originalref} 将不起作用。
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
index 08043c1346..937cfd968a 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
index b40f05cdd0..57af583316 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\usepackage{xcolor}
+\usepackage{setspace}
+\definecolor{code-main}{RGB}{70,130,180}
+\definecolor{code-expl3}{RGB}{240,50,60}
+\definecolor{code-option}{RGB}{40,110,20}
+\definecolor{code-keys}{RGB}{100,130,150}
+\definecolor{code-comment}{RGB}{20,120,80}
+\definecolor{code-background}{gray}{0.99}
+\lstset{
+ language = [LaTeX]TeX,
+ basicstyle = \ttfamily,
+ keywordstyle = \color{code-main},
+ commentstyle = \color{code-comment},
+ showstringspaces = false,
+ breaklines = true,
+ frame = lines,
+ backgroundcolor = \color{code-background},
+ flexiblecolumns = true,
+ escapeinside = {(*}{*)},
+ alsoletter = {_,:},
+ % numbers = left,
+ % firstnumber = last,
+ numberstyle = \scriptsize\ttfamily,
+ stepnumber = 1,
+ numbersep = 5pt,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
+\lstset{% LaTeX2 commands
+ classoffset = 0,
+ texcsstyle =* \color{code-main},
+ moretexcs =
+ {
+ linenumbers,nolinenumbers,
+ part,parttext,chapter,section,subsection,subsubsection,
+ frontmatter,mainmatter,backmatter,
+ tableofcontents,
+ href,
+ color,
+ NameTheorem,CreateTheorem,
+ cref,
+ ProjLib,
+ DNF,
+ UseLanguage,UseOtherLanguage,AddLanguageSetting,
+ maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,
+ qedhere,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
+}
+\lstnewenvironment{code}{\setstretch{1.05}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+
+\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
%%================================
%% tip
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\write your articles in a colorful way}
\author{Jinwen XU}
@@ -106,7 +134,7 @@
\lebhart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \lebhart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
- This documentation is typeset using \lebhart{} (with the option \texttt{use boldface}). You can think of it as a short introduction and demonstration.
+ This documentation is typeset using \lebhart{} (with the option \classoption{use boldface}). You can think of it as a short introduction and demonstration.
\end{abstract}
@@ -287,13 +315,6 @@ or to use the \AmS{} class:
\end{tip}
-\begin{tip}
-If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
-
-\begin{code}
-\documentclass[classical]{lebhart}
-\end{code}
-\end{tip}
% \clearpage
@@ -307,13 +328,13 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\lebhart{} offers the following options:
-\begin{itemize}
- \item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item The language options \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
\begin{itemize}
\item For the option names of a specific language, please refer to \meta{language name} in the next section. The first specified language will be used as the default language.
\item The language options are optional, mainly for increasing the compilation speed. Without them the result would be the same, only slower.
\end{itemize}
- \item \texttt{draft} or \texttt{fast}
+ \item \classoption{draft} or \classoption{fast}
\begin{itemize}
\item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
\begin{itemize}
@@ -325,36 +346,36 @@ In addition, Source Code Pro is used as the English sans serif font, New Compute
\begin{tip}
During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
\end{tip}
- \item \texttt{a4paper} or \texttt{b5paper}
+ \item \classoption{a4paper} or \classoption{b5paper}
\begin{itemize}
\item Paper size options. The default paper size is 8.5in $\times$ 11in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item Font options. As the name suggest, font with corresponding name will be loaded.
- \item The \texttt{useosf} option is used to enable the old-style figures.
+ \item The \classoption{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Use the ``runin'' style for \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Pure text mode. Do not load theorem-like environments.
\end{itemize}
% \clearpage
- \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}, \classoption{thmnum} or \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}, \texttt{originalref}
+ \item \classoption{regionalref}, \classoption{originalref}
\begin{itemize}
- \item When referencing, whether the name of the theorem-like environment changes with the current language. The default is \texttt{regionalref}, \emph{i.e.}, the name corresponding to the current language is used; for example, when referencing a theorem-like environment in English context, the names "Theorem, Definition..." will be used no matter which language context the original environment is in. If \texttt{originalref} is enabled, then the name will always remain the same as the original place; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''.
- \item In \texttt{fast} mode, the option \texttt{originalref} will have no effect.
+ \item When referencing, whether the name of the theorem-like environment changes with the current language. The default is \classoption{regionalref}, \emph{i.e.}, the name corresponding to the current language is used; for example, when referencing a theorem-like environment in English context, the names "Theorem, Definition..." will be used no matter which language context the original environment is in. If \classoption{originalref} is enabled, then the name will always remain the same as the original place; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''.
+ \item In \classoption{fast} mode, the option \classoption{originalref} will have no effect.
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
index a94ea9c456..1e431ebd17 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
index 369644bf47..ec1631a991 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
@@ -16,38 +16,66 @@
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\usepackage{xcolor}
+\usepackage{setspace}
+\definecolor{code-main}{RGB}{70,130,180}
+\definecolor{code-expl3}{RGB}{240,50,60}
+\definecolor{code-option}{RGB}{40,110,20}
+\definecolor{code-keys}{RGB}{100,130,150}
+\definecolor{code-comment}{RGB}{20,120,80}
+\definecolor{code-background}{gray}{0.99}
+\lstset{
+ language = [LaTeX]TeX,
+ basicstyle = \ttfamily,
+ keywordstyle = \color{code-main},
+ commentstyle = \color{code-comment},
+ showstringspaces = false,
+ breaklines = true,
+ frame = lines,
+ backgroundcolor = \color{code-background},
+ flexiblecolumns = true,
+ escapeinside = {(*}{*)},
+ alsoletter = {_,:},
+ % numbers = left,
+ % firstnumber = last,
+ numberstyle = \scriptsize\ttfamily,
+ stepnumber = 1,
+ numbersep = 5pt,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
- }
+\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
+\lstset{% LaTeX2 commands
+ classoffset = 0,
+ texcsstyle =* \color{code-main},
+ moretexcs =
+ {
+ linenumbers,nolinenumbers,
+ part,parttext,chapter,section,subsection,subsubsection,
+ frontmatter,mainmatter,backmatter,
+ tableofcontents,
+ href,
+ color,
+ NameTheorem,CreateTheorem,
+ cref,
+ ProjLib,
+ DNF,
+ UseLanguage,UseOtherLanguage,AddLanguageSetting,
+ maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,
+ qedhere,
+ }
}
-\lstnewenvironment{code}%
-{\setstretch{1.07}%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
-}{}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
-}{}
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
+}
+\lstnewenvironment{code}{\setstretch{1.05}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+
+\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
%%================================
%% tip
@@ -91,7 +119,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/06/16}
+\def\PackageVersion{2022/09/03}
\title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\écrivez vos articles de manière colorée}
\author{Jinwen XU}
@@ -106,7 +134,7 @@
\lebhart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \lebhart{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
- Cette documentation est composée à l'aide de \lebhart{} (avec l'option \texttt{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+ Cette documentation est composée à l'aide de \lebhart{} (avec l'option \classoption{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\end{abstract}
@@ -287,14 +315,6 @@ ou utilisez la classe \AmS{} :
\vspace{-.5\baselineskip}
\end{tip}
-\begin{tip}
-Si vous aimez la classe de document actuelle, mais que vous souhaitez un style plus «~simple~», vous pouvez utiliser l'option \texttt{classical}, comme ceci :
-
-\begin{code}
-\documentclass[classical]{lebhart}
-\end{code}
-\vspace{-.5\baselineskip}
-\end{tip}
\LevelOneTitle{À propos des polices par défaut}
@@ -308,13 +328,13 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\lebhart{} propose les options suivantes :
-\begin{itemize}
- \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
+ \item Les options de langue \classoption{EN} / \classoption{english} / \classoption{English}, \classoption{FR} / \classoption{french} / \classoption{French}, etc.
\begin{itemize}
\item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
\item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
\end{itemize}
- \item \texttt{draft} ou \texttt{fast}
+ \item \classoption{draft} ou \classoption{fast}
\begin{itemize}
\item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
\begin{itemize}
@@ -326,35 +346,35 @@ De plus, Source Code Pro est utilisé comme police anglaise sans empattement, Ne
\begin{tip}
Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
\end{tip}
- \item \texttt{a4paper} ou \texttt{b5paper}
+ \item \classoption{a4paper} ou \classoption{b5paper}
\begin{itemize}
\item Options de format de papier. Le format de papier par défaut est 8.5 pouces $\times$ 11 pouces.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \classoption{palatino}, \classoption{times}, \classoption{garamond}, \classoption{noto}, \classoption{biolinum} ~$|$~ \classoption{useosf}
\begin{itemize}
\item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
- \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \item L'option \classoption{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{use boldface}
+ \item \classoption{use boldface}
\begin{itemize}
\item Afficher les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
\end{itemize}
- \item \texttt{runin}
+ \item \classoption{runin}
\begin{itemize}
\item Utilisez le style «~runin~» pour \lstinline|\subsubsection|
\end{itemize}
- \item \texttt{nothms}
+ \item \classoption{nothms}
\begin{itemize}
\item Mode texte pur. Ne pas définir les environnements de type théorème.
\end{itemize}
- \item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
+ \item \classoption{nothmnum}, \classoption{thmnum} ou \classoption{thmnum=}\meta{counter}
\begin{itemize}
\item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}, \texttt{originalref}
+ \item \classoption{regionalref}, \classoption{originalref}
\begin{itemize}
- \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \texttt{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \texttt{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
- \item En mode \texttt{fast}, l'option \texttt{originalref} n'aura aucun effet.
+ \item Lors du référencement, si le nom de l'environnement de type théorème change avec la langue actuelle. Par défaut \classoption{regionalref} est activé, c'est-à-dire que le nom correspondant à la langue courante est utilisé ; par exemple, lors du référencement d'un environnement de type théorème dans un contexte français, les noms «~Théorème, Définition ...~» seront utilisés quel que soit le contexte linguistique dans lequel se trouve l'environnement d'origine. Si \classoption{originalref} est activé, alors le nom restera toujours le même que l'environnement d'origine ; par exemple, lors du référencement d'un théorème écrit dans le contexte français, même si l'on est actuellement dans le contexte anglais, il sera toujours affiché comme «~Théorème~».
+ \item En mode \classoption{fast}, l'option \classoption{originalref} n'aura aucun effet.
\end{itemize}
\end{itemize}
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index 9635010f70..a78a85bccd 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -15,11 +15,10 @@
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{lebhart}
- {2022/06/16} {}
+ {2022/09/03} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -126,7 +125,7 @@
\PassOptionsToPackage { \CurrentOption } { colorist }
}
}
-\ProcessKeysOptions { colorclass }
+\ProcessKeyOptions [ colorclass ]
\LoadClass{\l__colorclass_base_class_tl}
@@ -183,9 +182,6 @@
\RequirePackage { colorist }
-\raggedbottom
-\hfuzz=2pt
-\vfuzz=2pt
%%================================
%% Fonts
@@ -193,6 +189,15 @@
\WarningFilter { latexfont } { Font~shape }
\WarningFilter { latexfont } { Some~font }
+\hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \IfPackageLoadedTF { biblatex }
+ {
+ \PassOptionsToPackage { biblatex } { embrac }
+ } {}
+ \RequirePackage { embrac }
+ }
+
\cs_new_protected:Nn \__colorclass_load_file_or_config:Nnn
{
\bool_if:NT #1
@@ -231,46 +236,62 @@
{
\bool_if:NTF \l__projlib_font_useosf_bool
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
Numbers = OldStyle ,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
Numbers = OldStyle ,
]
}
{
- \setmainfont { TeXGyrePagellaX-Regular.otf }
+ \setmainfont { TeXGyrePagellaX }
[
- BoldFont = TeXGyrePagellaX-Bold.otf ,
- ItalicFont = TeXGyrePagellaX-Italic.otf ,
- BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
]
- \setsansfont { SourceSansPro-Regular.otf }
+ \setsansfont { SourceSansPro }
[
- Scale = 1.05 ,
- BoldFont = SourceSansPro-Semibold.otf ,
- ItalicFont = SourceSansPro-RegularIt.otf ,
- BoldItalicFont = SourceSansPro-SemiboldIt.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Semibold,
+ ItalicFont = *-RegularIt,
+ BoldItalicFont = *-SemiboldIt,
+ WordSpace = {1.25, 1, 1} ,
]
}
- \setmonofont { NewCMMono10-Regular.otf }
+ \setmonofont { NewCMMono10 }
[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Bold.otf ,
- ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BoldOblique.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldOblique,
]
\projlib_language_set_linespacing_latin:n { \setstretch { 1.07 } }
+
+ \hook_gput_code:nnn { begindocument/before } { colorclass }
+ {
+ \RenewEmph{[}{]}
+ \RenewEmph{(}{)}
+ }
}
}
@@ -281,48 +302,55 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKmainfont { SourceHanSerifSC-Regular }
+ \setCJKmainfont { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKmainfont { FandolSong-Regular.otf }
+ \setCJKmainfont { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKsansfont{SourceHanSansSC-Regular}
+ \setCJKsansfont { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKsansfont { FandolHei-Regular.otf }
+ \setCJKsansfont { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKmonofont { SourceHanMonoSC-Regular }
+ \setCJKmonofont { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -340,46 +368,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifSC-Regular }
{
- \setCJKfamilyfont { SCmain } { SourceHanSerifSC-Regular }
+ \setCJKfamilyfont { SCmain } { SourceHanSerifSC }
[
- BoldFont = SourceHanSerifSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { SCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansSC-Regular }
{
- \setCJKfamilyfont { SCsans } { SourceHanSansSC-Regular }
+ \setCJKfamilyfont { SCsans } { SourceHanSansSC }
[
- BoldFont = SourceHanSansSC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansSC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { SCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { SCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoSC-Regular }
{
- \setCJKfamilyfont { SCmono } { SourceHanMonoSC-Regular }
+ \setCJKfamilyfont { SCmono } { SourceHanMonoSC }
[
- BoldFont = SourceHanMonoSC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoSC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -398,46 +433,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerifTC-Regular }
{
- \setCJKfamilyfont { TCmain } { SourceHanSerifTC-Regular }
+ \setCJKfamilyfont { TCmain } { SourceHanSerifTC }
[
- BoldFont = SourceHanSerifTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerifTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { TCmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSansTC-Regular }
{
- \setCJKfamilyfont { TCsans } { SourceHanSansTC-Regular }
+ \setCJKfamilyfont { TCsans } { SourceHanSansTC }
[
- BoldFont = SourceHanSansTC-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSansTC-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { TCsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { TCsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMonoTC-Regular }
{
- \setCJKfamilyfont { TCmono } { SourceHanMonoTC-Regular }
+ \setCJKfamilyfont { TCmono } { SourceHanMonoTC }
[
- BoldFont = SourceHanMonoTC-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMonoTC-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -456,46 +498,53 @@
{
\__colorclass_if_font_exist:nnn { SourceHanSerif-Regular }
{
- \setCJKfamilyfont { JPmain } { SourceHanSerif-Regular }
+ \setCJKfamilyfont { JPmain } { SourceHanSerif }
[
- BoldFont = SourceHanSerif-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSerif-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPmain } { FandolSong-Regular.otf }
+ \setCJKfamilyfont { JPmain } { FandolSong }
[
- BoldFont = FandolSong-Bold.otf ,
- ItalicFont = FandolKai-Regular.otf ,
- BoldItalicFont = FandolKai-Regular.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular ,
+ BoldItalicFont = FandolKai-Regular ,
BoldItalicFeatures = { FakeBold = 4 } ,
]
}
\__colorclass_if_font_exist:nnn { SourceHanSans-Regular }
{
- \setCJKfamilyfont { JPsans } { SourceHanSans-Regular }
+ \setCJKfamilyfont { JPsans } { SourceHanSans }
[
- BoldFont = SourceHanSans-Bold ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanSans-Bold ,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
{
- \setCJKfamilyfont { JPsans } { FandolHei-Regular.otf }
+ \setCJKfamilyfont { JPsans } { FandolHei }
[
- BoldFont = FandolHei-Bold.otf ,
- ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold,
]
}
\__colorclass_if_font_exist:nnn { SourceHanMono-Regular }
{
- \setCJKfamilyfont { JPmono } { SourceHanMono-Regular }
+ \setCJKfamilyfont { JPmono } { SourceHanMono }
[
- BoldFont = SourceHanMono-Medium ,
- ItalicFont = * ,
- BoldItalicFont = SourceHanMono-Medium ,
+ UprightFont = *-Regular,
+ BoldFont = *-Medium,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Medium,
]
}
{
@@ -547,9 +596,14 @@
\RequirePackage { unicode-math }
\unimathsetup { math-style = ISO, partial = upright, nabla = upright }
\setmathfont { KpMath-Regular.otf }
+ \setmathfont { KpMath-Regular.otf }
+ [
+ range = \amalg ,
+ Scale = 0.84625
+ ]
\setmathfont { KpMath-Sans.otf }
[
- range = { \sum, \prod, \coprod }
+ range = { \sum }
]
\setmathfont { latinmodern-math.otf }
[
@@ -583,8 +637,8 @@
\cs_gset_eq:NN \square \mdwhtsquare
}
- % A temporary hack proposed in https://tex.stackexchange.com/a/647789
- \hook_gput_code:nnn { begindocument } { minimclass }
+ % https://tex.stackexchange.com/a/647789
+ \hook_gput_code:nnn { begindocument } { colorclass }
{
\NewCommandCopy\unicodevdots\vdots
\RenewDocumentCommand{\vdots}{}{\mathrel{\loweredvdots}}
@@ -669,8 +723,30 @@
\char_set_catcode_active:n { `\· }
\cs_new_protected:Npn · { \ensuremath\cdot }
-\PassOptionsToPackage { all } { nowidow }
-\RequirePackage { nowidow }
+%%================================
+%% Graphics
+%%================================
+\RequirePackage { graphicx }
+\graphicspath { { images/ } }
+\RequirePackage { wrapfig }
+\RequirePackage { float }
+\RequirePackage { caption }
+\captionsetup { font = small }
+
+%%================================
+%% Icing on the cake
+%%================================
+\bool_if:NT \l__colorclass_fast_bool { \endinput }
+
+\sys_if_engine_luatex:TF
+ {
+ \RequirePackage { lua-widow-control }
+ \lwcsetup { balanced }
+ }
+ {
+ \PassOptionsToPackage { all } { nowidow }
+ \RequirePackage { nowidow }
+ }
\sys_if_engine_xetex:T
{
@@ -684,25 +760,6 @@
}
}
-\hook_gput_code:nnn { begindocument/before } { colorclass }
- {
- \IfPackageLoadedTF { biblatex }
- {
- \PassOptionsToPackage { biblatex } { embrac }
- } {}
- \RequirePackage { embrac }
- }
-
-%%================================
-%% Graphics
-%%================================
-\RequirePackage { graphicx }
-\graphicspath { { images/ } }
-\RequirePackage { wrapfig }
-\RequirePackage { float }
-\RequirePackage { caption }
-\captionsetup { font = small }
-
\endinput
%%
%% End of file `lebhart/lebhart.cls'.