texlive[59322] Master/texmf-dist: lebhart (23may21)

commits+karl at tug.org commits+karl at tug.org
Sun May 23 22:36:41 CEST 2021


Revision: 59322
          http://tug.org/svn/texlive?view=revision&revision=59322
Author:   karl
Date:     2021-05-23 22:36:40 +0200 (Sun, 23 May 2021)
Log Message:
-----------
lebhart (23may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/lebhart/README.md
    trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-cn.pdf
    trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-cn.tex
    trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-en.pdf
    trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-en.tex
    trunk/Master/texmf-dist/tex/latex/lebhart/lebhart.cls

Modified: trunk/Master/texmf-dist/doc/latex/lebhart/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lebhart/README.md	2021-05-23 20:36:27 UTC (rev 59321)
+++ trunk/Master/texmf-dist/doc/latex/lebhart/README.md	2021-05-23 20:36:40 UTC (rev 59322)
@@ -5,10 +5,11 @@
 `lebhart` is a LaTeX class for typesetting articles, which has a colorful
 design.
 
-Currently, it has native support to English, French and Chinese typesetting. And
-it may compile with either XeLaTeX or LuaLaTeX.
+Currently, it has native support to Chinese (simplified and traditional),
+English, French, German, Japanese and Russian typesetting. And it may compile
+with either XeLaTeX or LuaLaTeX.
 
-This is part of the colorist class series.
+This is part of the `colorist` class series.
 
 # License
 

Modified: trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-cn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-cn.tex	2021-05-23 20:36:27 UTC (rev 59321)
+++ trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-cn.tex	2021-05-23 20:36:40 UTC (rev 59322)
@@ -1,24 +1,26 @@
 %! TEX program = xelatex
-\PassOptionsToPackage{dvipsnames}{xcolor}
-\documentclass{lebhart}
+\documentclass[allowbf]{lebhart}
 
-\UseLanguage{Chinese}
-
 %%================================
-%% TeX logo 与 网址
+%% 引入工具集
 %%================================
-\usepackage{hologo}
-\usepackage{url}
+\usepackage{PJLtoolkit}
+\usepackage{longtable}  % breakable tables
+\usepackage{hologo}     % more TeX logo
 
+\UseLanguage{Chinese}
+
 %%================================
 %% 排版代码
 %%================================
 \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{RoyalBlue},
+    keywordstyle=\color{maintheme},
     basicstyle=\ttfamily,
-    commentstyle=\color{ForestGreen}\ttfamily,
+    commentstyle=\color{forestgreen}\ttfamily,
     stringstyle=\rmfamily,
     showstringspaces=false,
     breaklines=true,
@@ -31,67 +33,183 @@
     firstnumber=last,
 } 
 \providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{morekeywords=%
-    {CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,
-    linenumbers,nolinenumbers,subsection,maketitle
+\lstset{moretexcs=%
+    {color,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib
     }
 }
 \lstnewenvironment{code}% 
 {\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
 
-\providecommand{\colorist}{\textsf{colorist}}
-\providecommand{\colorart}{\textsf{colorart}}
-\providecommand{\colorbook}{\textsf{colorbook}}
-\providecommand{\lebhart}{\textsf{lebhart}}
-\providecommand{\beaulivre}{\textsf{beaulivre}}
+%%================================
+%% remind
+%%================================
+\usepackage[many]{tcolorbox}
+\newenvironment{remind}[1][提示]{%
+    \begin{tcolorbox}[breakable,
+        enhanced,
+        width = \textwidth,
+        colback = white, colbacktitle = paper,
+        colframe = gray!50, boxrule=0.2mm,
+        coltitle = black,
+        fonttitle = \sffamily,
+        attach boxed title to top left = {yshift=-\tcboxedtitleheight/2,  xshift=\tcboxedtitlewidth/4},
+        boxed title style = {boxrule=0pt, colframe=paper},
+        before skip = 0.3cm,
+        after skip = 0.3cm,
+        top = 3mm,
+        bottom = 3mm,
+        title={\sffamily #1}]%
+}{\end{tcolorbox}}
 
 %%================================
+%% 名称
+%%================================
+\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
+\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
+\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
+\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
+\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
+
+%%================================
 %% 正文
 %%================================
 \begin{document}
 
-\title{\lebhart{},以多彩的方式排版你的文章\thanks{对应版本. \texttt{\lebhart{} 2021/03/15}}}
-\author{锦文}
-\date{2021年3月,北京}
+\title{{\normalfont\textbf{\textsf{lebhart}}},以多彩的方式排版你的文章}
+\author{许锦文}
+\thanks{对应版本. \texttt{\lebhart{} 2021/05/24}}
+\date{2021年5月,北京}
 
 \maketitle
 
 \begin{abstract}
-    \lebhart{}是\colorist{}文档类系列的成员之一,整个系列包含用于排版文章的\colorart{}、\lebhart{}以及用于排版书的\colorbook{}、\beaulivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之多彩而不缭乱。
+    \lebhart{} 是 \colorist{} 文档类系列的成员之一,其名称取自于德文的lebhaft (活泼),并取了artikel (文章)的前三个字母组合而成。整个 \colorist{} 系列包含用于排版文章的 \colorart{}、\lebhart{} 以及用于排版书的 \colorbook{}、\beaulivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之多彩而不缭乱。
 
-    其中,\lebhart{}与\beaulivre{}支持英文、法文、中文三种语言,并且同一篇文档中三种语言可以很好地协调。由于采用了自定义字体,需要采用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 进行编译。
+    \lebhart{} 支持英文、法文、德文、中文、日文、俄文六种语言,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
     
-    这篇说明文档是用\lebhart{}排版的,你可以把它看作一份简短的说明与演示。
+    这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \texttt{allowbf}),你可以把它看作一份简短的说明与演示。
 \end{abstract}
 
-\begin{tcolorbox}[enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,boxrule=0pt,frame hidden]
-    由于\colorist{}主体是从\textsf{minimalist}系列修改而来的,因而一些页面元素还未完全重新设计,特别是目录、part和chapter的样式。这些内容会在将来逐渐加入。
-\end{tcolorbox}
-
 \tableofcontents
 
-\section{关于文档类的名称与选项}
+\bigskip\bigskip
+\begin{remind}
+    多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。
+\end{remind}
 
-\lebhart{}取自于德文的lebhaft (活泼),并取了artikel (文章)的前三个字母组合而成。
+\clearpage
+\section{初始化}
 
-\beaulivre{}取自于法文的beau (美丽),以及livre (书),由二者组合而成。
+\subsection{如何载入}
 
+只需要在第一行写:
+
+\begin{code}
+  \documentclass{lebhart}
+\end{code}
+
+即可使用 \lebhart{} 文档类。请注意,要使用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎才能编译。
+
+\subsection{选项}
+
+\lebhart{} 文档类有下面几个选项:
+
+\begin{itemize}
+    \item \texttt{draft} 或 \texttt{fast}
+        \begin{itemize}
+            \item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
+            \begin{itemize}
+                \item 使用较为简单的数学字体设置;
+                \item 不启用超链接;
+                \item 启用 \ProjLib{} 工具箱的快速模式。
+            \end{itemize}
+        \end{itemize}
+    \item \texttt{a4paper} 或 \texttt{b5paper}
+        \begin{itemize}
+            \item 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。
+        \end{itemize}
+    \item \texttt{allowbf}
+        \begin{itemize}
+            \item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
+        \end{itemize}
+\end{itemize}
+
+\begin{remind}
+    \begin{itemize}
+        \item 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅程度。在最后,可以把 \verb|fast| 标记去除,从而得到正式的版本。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
+    \end{itemize}
+\end{remind}
+
 \medskip
-你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是:
+\section{关于文档类中使用的字体}
+\lebhart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+
+\begin{remind}[字体演示]
+    \begin{itemize}
+        \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+        \item 中文主要字体,\textsf{中文无衬线字体}
+        \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}
+\end{remind}
+
+在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+
+\clearpage
+\section{使用说明}
+
+接下来介绍的许多功能是由 \ProjLib{} 工具箱提供的。这里只介绍了基本使用方法,更多细节可以直接参阅其用户文档。
+
+\medskip
+\subsection{语言设置}
+
+\lebhart{} 提供了多语言支持,包括简体中文、繁体中文、英文、法文、德文、日文、俄文。可以通过下列命令来选定语言:
 \begin{itemize}
-    \item 使用较为简单的数学字体设置;
-    \item 不使用hyperref;
-    \item 所有tcolorbox使用draft模式;
-    \item 使用polyglossia而不是babel来支持多语言。(使用polyglossia编译速度会略有提高,但目前对于中文的兼容不太完善,在它更加稳定后,将会考虑全面切换到polyglossia)
+    \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}|,用于指定语言,在其后将使用对应的语言设定。
+    \begin{itemize}
+        \item 既可以用于导言部分,也可以用于正文部分。在不指定语言时,默认选定 “English”。
+    \end{itemize}
+    \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|,用指定的语言的设定排版 \meta{content}。
+    \begin{itemize}
+        \item 相比较 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能够保持行距稳定。
+    \end{itemize}
 \end{itemize}
 
-在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅程度。在最后,可以把 \verb|fast| 标记去除,从而得到正式的版本。
+\meta{language name} 有下列选择:
+\begin{itemize}
+    \item 简体中文:\texttt{Chinese}、\texttt{chinese}、\texttt{SChinese}、\texttt{schinese}、\texttt{SimplifiedChinese} \\\hspace*{5em}或 \texttt{simplifiedchinese}
+    \item 繁体中文:\texttt{TChinese}、\texttt{tchinese}、\texttt{TraditionalChinese} 或 \texttt{traditionalchinese}
+    \item 英文:\texttt{English} 或 \texttt{english}
+    \item 法文:\texttt{French} 或 \texttt{french}
+    \item 德文:\texttt{German}、\texttt{german} 或 \texttt{ngerman}
+    \item 日文:\texttt{Japanese} 或 \texttt{japanese}
+    \item 俄文:\texttt{Russian} 或 \texttt{russian}
+\end{itemize}
 
-\section{一些使用说明}
+另外,还可以通过下面的方式来填加相应语言的设置:
+\begin{itemize}
+    \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
+    \begin{itemize}
+        \item 向所有支持的语言增加设置 \meta{settings}。
+    \end{itemize}
+    \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
+    \begin{itemize}
+        \item 向指定的语言 \meta{language name} 增加设置 \meta{settings}。
+    \end{itemize}
+\end{itemize}
+例如,\lstinline|\AddLanguageSetting(German){\color{orange}}| 可以让所有德语以橙色显示(当然,还需要再加上 \lstinline|\AddLanguageSetting{\color{black}}| 来修正其他语言的颜色)。
 
-\subsection{定理,以及引用}
+\medskip
+\subsection{定理类环境及其引用}
 
-定义、定理等环境已经被预定义,可以直接使用,例如:
+定义、定理等环境已经被预定义,可以直接使用。
+
+具体来说,预设的定理类环境包括:
+\texttt{assumption}、\texttt{axiom}、\texttt{conjecture}、\texttt{convention}、\texttt{corollary}、\texttt{definition}、\texttt{definition-proposition}、\texttt{definition-theorem}、\texttt{example}、\texttt{exercise}、\texttt{fact}、\texttt{hypothesis}、\texttt{lemma}、\texttt{notation}、\texttt{problem}、\texttt{property}、\texttt{proposition}、\texttt{question}、\texttt{remark}、\texttt{theorem},以及相应的带有星号 \lstinline|*| 的无编号版本。
+
+\medskip
+在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。
+
+\begin{remind}[例子]
 \begin{code}
   \begin{definition}[奇异物品] \label{def: strange} ...
 \end{code}
@@ -100,17 +218,23 @@
     这是奇异物品的定义。
 \end{definition}
 
-\begin{definition}[另一个定义]
-    不同的定义会自动粘结在一起,中间不会有空隙。
-\end{definition}
+\lstinline|\cref{def: strange}| 会显示为:\cref{def: strange}。
 
-引用时,可以直接使用智能引用 \lstinline|\cref{标签名称}|,例如:\lstinline|\cref{def: strange}| 会显示为:\cref{def: strange}。
+\medskip
+使用 \lstinline|\UseLanguage{English}| 后,定理会显示为:
 
+\UseLanguage{English}
+\begin{theorem}[Useless]\label{thm}
+    A theorem in English.
+\end{theorem}
+
+默认情况下,引用时,定理的名称总是与定理所在区域的语言匹配,例如,上面的定义在现在的英文模式下依然显示为中文:\cref{def: strange} 和 \cref{thm}。如果在引用时想让定理的名称与当前语境相匹配,可以在全局选项中加入 \texttt{regionalref}。
+\end{remind}
+
 \bigskip
-下面是定理类环境的其他几种样式:
-
+下面是定理类环境的几种主要样式:
 \begin{theorem}
-    Theorem style: theorem, proposition, lemma, corollary
+    Theorem style: theorem, proposition, lemma, corollary, ...
 \end{theorem}
 
 \begin{proof}
@@ -126,36 +250,96 @@
 \end{conjecture}
 
 \begin{example*}
-    Example style: example, fact
+    Example style: example, fact, ...
 \end{example*}
 
 \begin{problem}
-    Problem style
+    Problem style: problem, question, ...
 \end{problem}
 
+\medskip
+为了美观,相邻的定义环境会自动连在一起:
+\begin{definition}
+    First definition.
+\end{definition}
+
+\begin{definition}
+    Second definition.
+\end{definition}
+
+\UseLanguage{Chinese}
+
+\clearpage
 \subsection{定义新的定理型环境}
 
-首先定义这个环境在所用语言下的名称 \lstinline|\(name of environment)(language name)|,其中 \\\lstinline|(language name)| 是 \lstinline|EN|、\lstinline|FR|、\lstinline|CN| 等,然后用下面四种方式之一定义这一环境:
+若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称 \lstinline|\|\meta{name of environment}\meta{language abbr},其中 \meta{language abbr} 是语言的简写,分别为:
+\begin{longtable}{ll|ll}
+    \texttt{CN} & 简体中文  & \texttt{DE} & 德文\\
+    \texttt{TC} & 繁体中文  & \texttt{JP} & 日文\\
+    \texttt{EN} & 英文  & \texttt{RU} & 俄文\\
+    \texttt{FR} & 法文  & &\\
+\end{longtable}
+
+\vspace{-\baselineskip}
+\begin{remind}
+    如果要定义名称后带有星号 \lstinline|*| 的环境,那么在上面的 \meta{name of environment} 中不用写星号。
+\end{remind}
+
+然后用下面五种方式之一定义这一环境:
 \begin{itemize}
-    \item \lstinline|\CreateTheorem*{(name of environment)}|
-    \item \lstinline|\CreateTheorem{(name of environment)}[(numbered like)]|
-    \item \lstinline|\CreateTheorem{(name of environment)}<(numbered within)>|
-    \item \lstinline|\CreateTheorem{(name of environment)}|
+    \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
+        \begin{itemize}
+            \item 定义不编号的环境 \meta{name of environment}
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
+        \begin{itemize}
+            \item 定义编号环境 \meta{name of environment},按顺序编号
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
+        \begin{itemize}
+            \item 定义编号环境 \meta{name of environment},与 \meta{numbered like} 计数器共用编号
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
+        \begin{itemize}
+            \item 定义编号环境 \meta{name of environment},在 \meta{numbered within} 计数器内编号
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
+    \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
+        \begin{itemize}
+            \item 将 \meta{name of environment} 与 \meta{existed environment} 或 \meta{existed environment}\lstinline|*| 等同。
+            \item 这种方式通常在两种情况下比较有用:
+                \begin{enumerate}
+                    \item 希望定义更简洁的名称。例如,使用 \lstinline|\CreateTheorem{thm}(theorem)|,便可以直接用名称 \texttt{thm} 来撰写定理。
+                    \item 希望去除某些环境的编号。例如,使用 \lstinline|\CreateTheorem{remark}(remark*)|,便可以去除 \texttt{remark} 环境的编号。
+                \end{enumerate}
+        \end{itemize}
 \end{itemize}
 
+\begin{remind}
+    其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
+\end{remind}
+
 \def\proofideanameCN{思路}
-\CreateTheorem*{proofidea}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
 
-例如,
+\bigskip
+下面提供一个例子。这三行代码:
 
 \begin{code}
   \def\proofideanameCN{思路}
-  \CreateTheorem*{proofidea}
+  \CreateTheorem*{proofidea*}
+  \CreateTheorem{proofidea}<subsection>
 \end{code}
-可以定义不编号的环境 \lstinline|proofidea|,它支持在中文环境中使用,效果如下所示:
 
+可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示:
+
+\begin{proofidea*}
+    \lstinline|proofidea*| 环境。
+\end{proofidea*}
+
 \begin{proofidea}
-    ...
+    \lstinline|proofidea| 环境。
 \end{proofidea}
 
 \subsection{未完成标记}
@@ -162,96 +346,181 @@
 
 你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
 \begin{itemize}
-    \item \lstinline|\dnf|: \quad \dnf
-    \item \lstinline|\dnf<还需加入…>|: \quad \dnf<还需加入…>
+    \item \lstinline|\dnf| 或 \lstinline|\dnf<...>|。效果为:\dnf~或 \dnf<...>。\\其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\dnf}。
 \end{itemize}
 
 类似的,还有 \lstinline|\needgraph| :
 \begin{itemize}
-    \item \lstinline|\needgraph|: \needgraph
-    \item \lstinline|\needgraph<关于…>|: \needgraph<关于…>
+    \item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
 \end{itemize}
 
-\subsection{语言设置}
-可以随时使用 \lstinline|\UseLanguage{语言名称}| 更改语言,语言名称包括Chinese、English、French(首字母大小写随意,例如chinese亦可)。这样,各种指令和环境的效果也会随之变动。
 
-例如,使用 \lstinline|\UseLanguage{English}| 后,定理与未完成标记会显示为:
+\subsection{关于文章标题、摘要与关键词}
 
-\UseLanguage{English}
-\begin{theorem}[Useless]\label{thm}
-    Some theorem in English. \dnf
-\end{theorem}
+% 由于引入了 \ProjLib{} 工具箱的 \textsf{PJLamssim} 组件,
+\lebhart{} 同时具有标准文档类与\AmS{} 文档类的一些特性。
 
-引用时,定理的名称总是与定理所在区域的语言匹配,例如,开头的定义在现在的英文模式下依然显示为中文:\cref{def: strange} 和 \cref{thm}。
+因此,文章的标题部分既可以按照标准文档类 \textsf{article} 的写法来写:
 
-\UseLanguage{Chinese}
+\begin{code}
+  \title{(*\meta{title}*)}
+  \author{(*\meta{author}*)}
+  \date{(*\meta{date}*)}
+  \maketitle
+  \begin{abstract}
+      (*\meta{abstract}*)
+  \end{abstract}
+  \begin{keyword}
+      (*\meta{keywords}*)
+  \end{keyword}
+\end{code}
 
-\subsection{关于字体}
-\lebhart{}与\beaulivre{}使用Palatino Linotype作为英文字体,方正悠宋、悠黑简体作为中文字体,并部分使用了Neo Euler作为数学字体:
-\begin{itemize}
-    \item English main font. \textsf{English sans serif font}.
-    \item 中文主要字体,\textsf{中文无衬线字体}
-    \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 \]
+也可以按照 \AmS{} 文档类的方式来写:
+
+\begin{code}
+  \title{(*\meta{title}*)}
+  \author{(*\meta{author}*)}
+  \address{(*\meta{address}*)}
+  \email{(*\meta{email}*)}
+  \date{(*\meta{date}*)}
+  \keywords{(*\meta{keywords}*)}
+  \subjclass{(*\meta{subjclass}*)}
+  \begin{abstract}
+      (*\meta{abstract}*)
+  \end{abstract}
+  \maketitle
+\end{code}
+
+作者信息可以包含多组,输入方式为:
+
+\begin{code}
+  \author{(*\meta{author 1}*)}
+  \address{(*\meta{address 1}*)}
+  \email{(*\meta{email 1}*)}
+  \author{(*\meta{author 2}*)}
+  \address{(*\meta{address 2}*)}
+  \email{(*\meta{email 2}*)}
+  ...
+\end{code}
+
+其中 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 的相互顺序是不重要的。
+
+
+\medskip
+\section{目前存在的问题}
+
+\begin{itemize}[itemsep=.6em]
+    \item 目录、part、chapter 的设计依然有待改良。
+    \item 对于字体的设置仍然不够完善。
+    \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \lebhart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
+    \item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
+    \item 代码中仍有许多可优化之处。
 \end{itemize}
 
-其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。
 
-其他字体不是免费字体,需要自行购买使用(你可以在方正字库网站查询详细资料:\url{https://www.foundertype.com})。
+\UseLanguage{English}
 
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
-
+\clearpage
 \section{文档示例}
 
-\singlespacing
+\subsection{标准文档类写法}
 
-\begin{minipage}{0.45\textwidth}
+如果想采用标准文档类中的写法,可以参考下面的例子:
+
 \begin{code}
-%! TEX program = xelatex
-\documentclass[fast]{lebhart}
+\documentclass{lebhart}
+\usepackage{PJLtoolkit} % Load ProjLib toolkit
 
-\linenumbers
-\UseLanguage{French}
+\UseLanguage{French} % Use French from here
 
 \begin{document}
 
-\title{Titre}
-\author{Nom}
-\date{03 / 2021, Lieu}
+\title{Le Titre}
+\author{Auteur}
+\date{\PJLdate{2022-04-01}}
 
 \maketitle
 
-%% Texte ici
+\begin{abstract}
+    Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+\begin{keyword}
+    AAA, BBB, CCC, DDD, EEE
+\end{keyword}
 
+\section{Un théorème}
+
+%% Theorem-like environments can be used directly
+\begin{theorem}\label{thm:abc}
+    Ceci est un théorème.
+\end{theorem}
+
+Référence du théorème: \cref{thm:abc} 
+    % It is recommended to use clever reference
+
 \end{document}
 \end{code}
-\end{minipage}
-%
-\hfill
-%
-\begin{minipage}{0.45\textwidth}
+
+如果以后想切换到标准文档类,只需要将前两行换为:
+
 \begin{code}
-%! TEX program = xelatex
-\documentclass[fast]{lebhart}
+\documentclass{article}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{PJLtoolkit} % Load ProjLib toolkit
+\end{code}
 
-\linenumbers
-\UseLanguage{Chinese}
 
+\clearpage
+\subsection{\texorpdfstring{\AmS{}}{AMS} 文档类写法}
+
+如果日后有意切换到期刊模版,想采用 \AmS{} 文档类中的写法,可以参考下面的例子:
+
+\begin{code}
+\documentclass{lebhart}
+\usepackage{PJLtoolkit} % Load ProjLib toolkit
+
+\UseLanguage{French} % Use French from here
+
 \begin{document}
 
-\title{标题}
-\author{姓名}
-\date{2021年3月,地点}
+\title{Le Titre}
+\author{Auteur 1}
+\address{Adresse 1}
+\email{\href{Courriel 1}{Courriel 1}}
+\author{Auteur 1}
+\address{Adresse 1}
+\email{\href{Courriel 2}{Courriel 2}}
+\date{\PJLdate{2022-04-01}}
+\subjclass{*****}
+\keywords{...}
 
+\begin{abstract}
+    Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+
 \maketitle
 
-%% 正文部分
+\section{Première section}
 
+%% Theorem-like environments can be used directly
+\begin{theorem}\label{thm:abc}
+    Ceci est un théorème.
+\end{theorem}
+
+Référence du théorème: \cref{thm:abc} 
+    % It is recommended to use clever reference
+
 \end{document}
 \end{code}
-\end{minipage}
-\par
 
-\bigskip
-(\lstinline|\UseLanguage| 既可以放在导言中,也可以放在正文部分,并且可以按照需要反复使用)
+这样,若想切换到 \AmS{} 文档类,只需要将前两行换为:
 
+\begin{code}
+\documentclass{amsart}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{PJLtoolkit} % Load ProjLib toolkit
+\end{code}
+
 \end{document}

Modified: trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-en.tex	2021-05-23 20:36:27 UTC (rev 59321)
+++ trunk/Master/texmf-dist/doc/latex/lebhart/lebhart-doc-en.tex	2021-05-23 20:36:40 UTC (rev 59322)
@@ -1,22 +1,24 @@
 %! TEX program = xelatex
-\PassOptionsToPackage{dvipsnames}{xcolor}
-\documentclass{lebhart}
+\documentclass[allowbf]{lebhart}
 
 %%================================
-%% TeX logo and URL
+%% Import toolkit
 %%================================
-\usepackage{hologo}
-\usepackage{url}
+\usepackage{PJLtoolkit}
+\usepackage{longtable}  % breakable tables
+\usepackage{hologo}     % more TeX logo
 
 %%================================
 %% For typestting 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{RoyalBlue},
+    keywordstyle=\color{maintheme},
     basicstyle=\ttfamily,
-    commentstyle=\color{ForestGreen}\ttfamily,
+    commentstyle=\color{forestgreen}\ttfamily,
     stringstyle=\rmfamily,
     showstringspaces=false,
     breaklines=true,
@@ -29,85 +31,205 @@
     firstnumber=last,
 } 
 \providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{morekeywords=%
-    {CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,
-    linenumbers,nolinenumbers,subsection,maketitle
+\lstset{moretexcs=%
+    {linenumbers,nolinenumbers,subsection,
+    color,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib
     }
 }
 \lstnewenvironment{code}% 
 {\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
 
-\providecommand{\colorist}{\textsf{colorist}}
-\providecommand{\colorart}{\textsf{colorart}}
-\providecommand{\colorbook}{\textsf{colorbook}}
-\providecommand{\lebhart}{\textsf{lebhart}}
-\providecommand{\beaulivre}{\textsf{beaulivre}}
+%%================================
+%% remind
+%%================================
+\usepackage[many]{tcolorbox}
+\newenvironment{remind}[1][Remind]{%
+    \begin{tcolorbox}[breakable,
+        enhanced,
+        width = \textwidth,
+        colback = white, colbacktitle = paper,
+        colframe = gray!50, boxrule=0.2mm,
+        coltitle = black,
+        fonttitle = \sffamily,
+        attach boxed title to top left = {yshift=-\tcboxedtitleheight/2,  xshift=\tcboxedtitlewidth/4},
+        boxed title style = {boxrule=0pt, colframe=paper},
+        before skip = 0.3cm,
+        after skip = 0.3cm,
+        top = 3mm,
+        bottom = 3mm,
+        title={\sffamily #1}]%
+}{\end{tcolorbox}}
 
 %%================================
+%% Names
+%%================================
+\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
+\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
+\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
+\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
+\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
+
+%%================================
 %% Main text
 %%================================
 \begin{document}
 
-\title{\lebhart{}, write your articles in a colorful way\thanks{Corresponding to: \texttt{\lebhart{} 2021/03/15}}}
-\author{Jinwen}
-\date{March 2021, Beijing}
+\title{{\normalfont\textbf{\textsf{lebhart}}}, write your articles in a colorful way}
+\author{Jinwen XU}
+\thanks{Corresponding to: \texttt{\lebhart{} 2021/05/24}}
+\date{May 2021, Beijing}
 
 \maketitle
 
 \begin{abstract}
-    \lebhart{} is a member of the \colorist{} class series. The entire collection includes \colorart{} and \lebhart{} for typesetting articles and \colorbook{} and \beaulivre{} for typesetting books. My original intention in designing this series was to write drafts and notes that look colorful yet not dazzling.
+    \lebhart{} is a member of the \colorist{} class series. Its name is taken from German word ``lebhaft'' (``vividly''), combined with the first three letters of ``artikel'' (``article''). The entire collection includes \colorart{} and \lebhart{} for typesetting articles and \colorbook{} and \beaulivre{} for typesetting books. My original intention in designing this series was to write drafts and notes that look colorful yet not dazzling.
 
-    Among them, \lebhart{} and \beaulivre{} support three languages: English, French, and Chinese, and these three languages can be switched seamlessly in a single document. Due to the usage of custom fonts, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+    \lebhart{} supports six languages: English, French, German, Chinese, Japanese and Russian. 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{}. You can think of it as a short introduction and demonstration.
+    This documentation is typeset using \lebhart{} (with the option \texttt{allowbf}). You can think of it as a short introduction and demonstration.
 \end{abstract}
 
-\begin{tcolorbox}[enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,boxrule=0pt,frame hidden]
-    Since the main body of \colorist{} is modified from the \textsf{minimalist} series, some elements have not been completely redesigned yet, especially the TOC, part and chapter style. These will be added gradually in the future versions.
-\end{tcolorbox}
-
 \tableofcontents
 
-\section{On the naming and options}
+\bigskip
+\begin{remind}
+    Multi-language support, theorem-like environments, draft marks and some other features are provided by the \ProjLib{} toolkit. Here we only briefly discuss how to use it with this document class. For more detailed information, you can refer to the documentation of \ProjLib{}.
+\end{remind}
+
+
+\clearpage
+\section{Initialization}
+
+\subsection{How to load}
+
+One only needs to put
+\begin{code}
+  \documentclass{lebhart}
+\end{code}
+as the first line to use the \lebhart{} class. Please note that you need to use either \hologo{XeLaTeX} or \hologo{LuaLaTeX} engine to compile.
+
+\subsection{Options}
+
+\lebhart{} offers the following options: 
+
 \begin{itemize}
-    \item \lebhart{} is taken from German word ``lebhaft'' (``vividly''), combined with the first three letters of ``artikel'' (``article'').
-    \item \beaulivre{} is taken from French words ``beau'' (for ``beautiful'') and ``livre'' (for ``book'').
+    \item \texttt{draft} or \texttt{fast}
+        \begin{itemize}
+            \item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
+            \begin{itemize}
+                \item Use simpler math font configuration; 
+                \item Do not use hyperref; 
+                \item Enable the fast mode of \ProjLib{} toolkit.
+            \end{itemize}
+        \end{itemize}
+    \item \texttt{a4paper} or \texttt{b5paper}
+        \begin{itemize}
+            \item Optional paper size. The default paper size is 8.5in $\times$ 11in.
+        \end{itemize}
+    \item \texttt{allowbf}
+        \begin{itemize}
+            \item Allow boldface. When this option is enabled, the title, titles of all levels and names of theorem-like environments will be bolded.
+        \end{itemize}
 \end{itemize}
 
-You can use the option \verb|fast| to enable a fast but slightly rough version. The main differences are:
+\begin{remind}
+    \begin{itemize}
+        \item During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. At the end, one should remove the ``fast'' option to get the final version. When in \verb|fast| mode, there will be a watermark "DRAFT" to indicate that you are currently in the draft mode.
+    \end{itemize}
+\end{remind}
+
+\section{On the fonts}
+By default, \lebhart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts, 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 use them on your own. (For the Chinese fonts, visit FounderType's website for detail: \url{https://www.foundertype.com} ).
+
+\begin{remind}[Font demonstration]
+    \begin{itemize}
+        \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
+        \item 中文主要字体,\textsf{中文无衬线字体}
+        \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}
+\end{remind}
+
+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.
+
+\section{Some instructions}
+
+Many of the features described next are provided by the \ProjLib{} toolkit. Only the basic usage is mentioned here. For more details, please refer to its user documentation.
+
+\bigskip
+\subsection{Language configuration}
+
+\lebhart{} has multi-language support, including simplified Chinese, traditional Chinese, English, French, German, Japanese, and Russian. The language can be selected by the following macros:
+
 \begin{itemize}
-    \item Use simpler math font configuration; 
-    \item Do not use hyperref; 
-    \item Use draft mode for all tcolorboxes; 
-    \item Use polyglossia instead of babel to support multiple languages. (Using polyglossia will increase the compilation speed slightly, but the current compatibility with Chinese is not perfect. When it becomes more stable, I will consider fully switching to polyglossia)
+    \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding setting of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English" is selected by default.
+    \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, which uses the specified language settings to typeset \meta{content}. Compared with \lstinline|\UseLanguage|, it will not modify the line spacing, so line spacing would remain stable when CJK and Western texts are mixed.
 \end{itemize}
 
-During the writing stage of your document, it is recommended to use the \verb|fast| option to speed up compilation and improve the smoothness of your writing experience. At the end, you can remove the ``fast'' mark to get the final version.
+\meta{language name} can be:
+\begin{itemize}
+    \item Simplified Chinese: \texttt{Chinese}, \texttt{chinese}, \texttt{SChinese}, \texttt{schinese}, \texttt{SimplifiedChinese} or \texttt{simplifiedchinese}
+    \item Traditional Chinese: \texttt{TChinese}, \texttt{tchinese}, \texttt{TraditionalChinese} or \texttt{traditionalchinese}
+    \item English: \texttt{English} or \texttt{english}
+    \item French: \texttt{French} or \texttt{french}
+    \item German: \texttt{German}, \texttt{german} or \texttt{ngerman}
+    \item Japanese: \texttt{Japanese} or \texttt{japanese}
+    \item Russian: \texttt{Russian} or \texttt{russian}
+\end{itemize}
 
-\section{Some instructions}
+\medskip
+In addition, you can also add new settings to selected language:
+\begin{itemize}
+    \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
+    \begin{itemize}
+        \item Add \meta{settings} to all supported languages.
+    \end{itemize}
+    \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
+    \begin{itemize}
+        \item Add \meta{settings} to the selected language \meta{language name}.
+    \end{itemize}
+\end{itemize}
+For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).
 
+\bigskip
 \subsection{Theorems and how to reference them}
 
-Environments such as definitions and theorems have been pre-defined and can be used directly, for example:
+Environments such as definitions and theorems have been pre-defined and can be used directly. 
+
+More specifically, preset environments include: 
+\texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The display of these environments will change according to the current language.
+
+\medskip
+When referencing a theorem-like environment, it is recommended to use clever reference \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
+
+\clearpage
+\begin{remind}[Example]
 \begin{code}
   \begin{definition}[Strange things] \label{def: strange} ...
 \end{code}
+
 will produce
 \begin{definition}[Strange things]\label{def: strange}
-    This is the definition of some strange objects.
+    This is the definition of some strange objects. 
 \end{definition}
 
-\begin{definition}[Another definition]
-    Different definitions are automatically glued together, and there will be no gaps in between.
-\end{definition}
+\lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
 
-When referencing, you can directly use clever reference \lstinline|\cref{(label name)}|. For example, \lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
+\medskip
+After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
 
+\UseLanguage{French}
+\begin{theorem}[Inutile]\label{thm}
+    Un théorème en français.
+\end{theorem}
+
+By default, when referenced, the name of the theorem always matches the language of the context in which the theorem is located. For example, the definition above is still displayed in English in the current French mode: \cref{def: strange} and \cref{thm}. If you want the name of the theorem to match the current context when referencing, you can add \texttt{regionalref} to the global options.
+\end{remind}
+
+
 \bigskip
-The following are several other styles of theorem-like environments:
-
+The following are the main styles of theorem-like environments:
 \begin{theorem}
-    Theorem style: theorem, proposition, lemma, corollary
+    Theorem style: theorem, proposition, lemma, corollary, ...
 \end{theorem}
 
 \begin{proof}
@@ -123,35 +245,95 @@
 \end{conjecture}
 
 \begin{example*}
-    Example style: example, fact
+    Example style: example, fact, ...
 \end{example*}
 
 \begin{problem}
-    Problem style
+    Problem style: problem, question, ...
 \end{problem}
 
+\medskip
+For aesthetics, adjacent definitions will be connected together automatically:
+\begin{definition}
+    First definition.
+\end{definition}
+
+\begin{definition}
+    Second definition.
+\end{definition}
+
+\UseLanguage{English}
+
+\clearpage
 \subsection{Define a new theorem-like environment}
 
-First define the name of this environment in the language used: \lstinline|\(name of environment)(language name)|. Where \lstinline|(language name)| can be \lstinline|EN|, \lstinline|FR|, \lstinline|CN|, etc., and then define this environment in one of the following four ways:
+If you need to define a new theorem-like environment, you must first define the name of the environment in the language used: \lstinline|\|\meta{name of environment}\meta{language abbr}, where \meta{language abbr} is the abbreviation of language, which can be:
+% \vspace{-.5\baselineskip}
+\begin{longtable}{ll|ll}
+    \texttt{CN} & Simplified Chinese & \texttt{DE} & German\\
+    \texttt{TC} & Traditional Chinese & \texttt{JP} & Japanese\\
+    \texttt{EN} & English & \texttt{RU} & Russian\\
+    \texttt{FR} & French & &\\
+\end{longtable}
+
+\vspace{-.5\baselineskip}
+\begin{remind}
+    If you want to define an environment with an asterisk \lstinline|*| after the name, you don't need to write an asterisk in the \meta{name of environment} above. See the example below.
+\end{remind}
+
+And then define this environment in one of following five ways:
 \begin{itemize}
-    \item \lstinline|\CreateTheorem*{(name of environment)}|
-    \item \lstinline|\CreateTheorem{(name of environment)}[(numbered like)]|
-    \item \lstinline|\CreateTheorem{(name of environment)}<(numbered within)>|
-    \item \lstinline|\CreateTheorem{(name of environment)}|
+    \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
+        \begin{itemize}
+            \item Define an unnumbered environment \meta{name of environment}
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
+        \begin{itemize}
+            \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
+        \begin{itemize}
+            \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
+        \begin{itemize}
+            \item Define a numbered environment \meta{name of environment}, numbered within the \\counter \meta{numbered within}
+        \end{itemize}
+    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
+    \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
+        \begin{itemize}
+            \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
+            \item This method is usually useful in the following two situations:
+                \begin{enumerate}
+                    \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}|\\\lstinline|(theorem)|, one can then use the name \texttt{thm} to write theorem.
+                    \item To remove the numbering. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
+                \end{enumerate}
+        \end{itemize}
 \end{itemize}
 
+\begin{remind}
+    It uses \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
+\end{remind}
+
 \def\proofideanameEN{Idea}
-\CreateTheorem*{proofidea}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
 
-For example,
+\bigskip
+Here is an example. The following code:
 \begin{code}
   \def\proofideanameEN{Idea}
-  \CreateTheorem*{proofidea}
+  \CreateTheorem*{proofidea*}
+  \CreateTheorem{proofidea}<subsection>
 \end{code}
-defines an unnumbered environment \lstinline|proofidea|, which supports using in the English context, and the effect is as follows:
+defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context. The effect is as follows:
 
+\begin{proofidea*}
+    The \lstinline|proofidea*| environment.
+\end{proofidea*}
+
 \begin{proofidea}
-    ...
+    The \lstinline|proofidea| environment.
 \end{proofidea}
 
 \subsection{Draft mark}
@@ -158,94 +340,175 @@
 
 You can use \lstinline|\dnf| to mark the unfinished part. For example:
 \begin{itemize}
-    \item \lstinline|\dnf|: \quad \dnf
-    \item \lstinline|\dnf<Still need ...>|: \quad \dnf<Still need ...>
+    \item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
 \end{itemize}
 
-Similarly, there is \lstinline|\needgraph| :
+Similarly, there is \lstinline|\needgraph| : 
 \begin{itemize}
-    \item \lstinline|\needgraph|: \needgraph
-    \item \lstinline|\needgraph<About ...>|: \needgraph<About ...>
+    \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
 \end{itemize}
 
-\subsection{Language configuration}
-You can use \lstinline|\UseLanguage{(name of language))}| at any time to change the language, Language names include Chinese, English, French (the case of the first letter is arbitrary, for example, ``chinese'' is also acceptable). With this, the effects of various commands and environments will also change accordingly.
+\subsection{On the title, abstract and keywords}
 
-For example, after using \lstinline|\UseLanguage{French}|, the theorem and the draft mark will be displayed as:
+\lebhart{} has both the features of standard classes and that of the \AmS{} classes.
 
-\UseLanguage{French}
-\begin{theorem}[Inutile]\label{thm}
-    Un théorème en français. \dnf
-\end{theorem}
+Therefore, the title part can either be written in the usual way, in accordance with the standard class \textsf{article}:
 
-When referenced, the name of the theorem always matches the language of the region in which the theorem is located, for example, the definition of the beginning is still displayed in English in the current French mode: \cref{def: strange} and \cref{thm}. 
+\begin{code}
+  \title{(*\meta{title}*)}
+  \author{(*\meta{author}*)}
+  \date{(*\meta{date}*)}
+  \maketitle
+  \begin{abstract}
+      (*\meta{abstract}*)
+  \end{abstract}
+  \begin{keyword}
+      (*\meta{keywords}*)
+  \end{keyword}
+\end{code}
 
-\UseLanguage{English}
+or written in the way of \AmS{} classes:
 
-\subsection{On the fonts}
-\lebhart{} and \beaulivre{} use Palatino Linotype as the English font, FounderType's YouSong and YouHei Simplified as the Chinese fonts, and partially use Neo Euler as the mathematical font:
-\begin{itemize}
-    \item English main font. \textsf{English sans serif font}.
-    \item 中文主要字体, \textsf{中文无衬线字体}
-    \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}
+\begin{code}
+  \title{(*\meta{title}*)}
+  \author{(*\meta{author}*)}
+  \address{(*\meta{address}*)}
+  \email{(*\meta{email}*)}
+  \date{(*\meta{date}*)}
+  \keywords{(*\meta{keywords}*)}
+  \subjclass{(*\meta{subjclass}*)}
+  \begin{abstract}
+      (*\meta{abstract}*)
+  \end{abstract}
+  \maketitle
+\end{code}
 
-Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. Other fonts are not free, you need to purchase and use them on your own. (For the Chinese fonts, visit FounderType's website for detail: \url{https://www.foundertype.com} ).
+\clearpage %\medskip
+The author information can contain multiple groups, written as:
 
-When the corresponding font is not installed, the font that comes with TeX Live will be used instead, and the experience might be reduced.
+\begin{code}
+  \author{(*\meta{author 1}*)}
+  \address{(*\meta{address 1}*)}
+  \email{(*\meta{email 1}*)}
+  \author{(*\meta{author 2}*)}
+  \address{(*\meta{address 2}*)}
+  \email{(*\meta{email 2}*)}
+  ...
+\end{code}
 
+Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
+
+
+\section{Known issues}
+
+\begin{itemize}[itemsep=.6em]
+    \item The font settings are still not perfect.
+    \item Since many features are based on the \ProjLib{} toolkit, \lebhart{} inherits all its problems. For details, please refer to the "Known Issues" section of the \ProjLib{} documentation.
+    \item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
+    \item There are still many things that can be optimized in the code.
+\end{itemize}
+
+\clearpage
 \section{Document templates}
 
-\singlespacing
+\subsection{The standard way}
 
-\begin{minipage}{0.45\textwidth}
+If you want to write in the standard way, you can refer to the following example:
+
 \begin{code}
-%! TEX program = xelatex
-\documentclass[fast]{lebhart}
+\documentclass{lebhart}
+\usepackage{PJLtoolkit} % Load ProjLib toolkit
 
-\linenumbers
-\UseLanguage{French}
+\UseLanguage{French} % Use French from here
 
 \begin{document}
 
-\title{Titre}
-\author{Nom}
-\date{03 / 2021, Lieu}
+\title{Le Titre}
+\author{Auteur}
+\date{\PJLdate{2022-04-01}}
 
 \maketitle
 
-%% Texte ici
+\begin{abstract}
+    Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+\begin{keyword}
+    AAA, BBB, CCC, DDD, EEE
+\end{keyword}
 
+\section{Un théorème}
+
+%% Theorem-like environments can be used directly
+\begin{theorem}\label{thm:abc}
+    Ceci est un théorème.
+\end{theorem}
+
+Référence du théorème: \cref{thm:abc} 
+    % It is recommended to use clever reference
+
 \end{document}
 \end{code}
-\end{minipage}
-%
-\hfill
-%
-\begin{minipage}{0.45\textwidth}
+
+If you wish to switch to the standard class later, just replace the first two lines with:
+
 \begin{code}
-%! TEX program = xelatex
-\documentclass[fast]{lebhart}
+\documentclass{article}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{PJLtoolkit} % Load ProjLib toolkit
+\end{code}
 
-\linenumbers
-\UseLanguage{Chinese}
 
+\clearpage
+\subsection{The \texorpdfstring{\AmS{}}{AMS} way}
+
+If you intend to switch to the journal template in the future and thus want to use the writing style as in the \AmS{} classes, you can refer to the following example:
+
+\begin{code}
+\documentclass{lebhart}
+\usepackage{PJLtoolkit} % Load ProjLib toolkit
+
+\UseLanguage{French} % Use French from here
+
 \begin{document}
 
-\title{标题}
-\author{姓名}
-\date{2021年3月,地点}
+\title{Le Titre}
+\author{Auteur 1}
+\address{Adresse 1}
+\email{\href{Courriel 1}{Courriel 1}}
+\author{Auteur 1}
+\address{Adresse 1}
+\email{\href{Courriel 2}{Courriel 2}}
+\date{\PJLdate{2022-04-01}}
+\subjclass{*****}
+\keywords{...}
 
+\begin{abstract}
+    Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+
 \maketitle
 
-%% 正文部分
+\section{Première section}
 
+%% Theorem-like environments can be used directly
+\begin{theorem}\label{thm:abc}
+    Ceci est un théorème.
+\end{theorem}
+
+Référence du théorème: \cref{thm:abc} 
+    % It is recommended to use clever reference
+
 \end{document}
 \end{code}
-\end{minipage}
-\par
 
-\bigskip
-(\lstinline|\UseLanguage| can be placed either in the preamble or in the body part, and can be used repeatedly as needed)
+In this way, if you wish to switch to \AmS{} class later, just replace the first two lines with:
 
+\begin{code}
+\documentclass{amsart}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{PJLtoolkit} % Load ProjLib toolkit
+\end{code}
+
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/lebhart/lebhart.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lebhart/lebhart.cls	2021-05-23 20:36:27 UTC (rev 59321)
+++ trunk/Master/texmf-dist/tex/latex/lebhart/lebhart.cls	2021-05-23 20:36:40 UTC (rev 59322)
@@ -17,7 +17,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020-10-01]
 \ProvidesClass{lebhart}
-    [2021/03/15 A colorful article style]
+    [2021/05/24 A colorful article style]
 \def\colorclass at baseclass{article}
 \RequirePackage{kvoptions}
 \RequirePackage{etoolbox}
@@ -27,6 +27,12 @@
 }
 \DeclareBoolOption[false]{draft}
 \DeclareBoolOption[false]{fast}
+
+\newif\if at colorclass@bfivepaper\@colorclass at bfivepaperfalse
+\DeclareVoidOption{b5paper}{\@colorclass at bfivepapertrue}
+\newif\if at colorclass@afourpaper\@colorclass at afourpaperfalse
+\DeclareVoidOption{a4paper}{\@colorclass at afourpapertrue}
+
 \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass at baseclass}}
 \ProcessKeyvalOptions*\relax
 \LoadClass{\colorclass at baseclass}
@@ -37,9 +43,27 @@
 %%================================
 %% Page layout
 %%================================
+\RequirePackage{silence}
+\WarningFilter{geometry}{Over-specification in}
 \RequirePackage[heightrounded]{geometry}
 \geometry{
-    % papersize={8in,11in},
+    papersize={8.5in,11in},
+    total={47em,66em},
+    hmarginratio=1:1,
+    vmarginratio=1:1,
+    footnotesep=2em plus 2pt minus 2pt,
+}
+\if at colorclass@bfivepaper
+\geometry{
+    b5paper,
+    total={40em,59em},
+    hmarginratio=1:1,
+    vmarginratio=1:1,
+    footnotesep=2em plus 2pt minus 2pt,
+}
+\fi
+\if at colorclass@afourpaper
+\geometry{
     a4paper,
     total={47em,70em},
     hmarginratio=1:1,
@@ -46,15 +70,15 @@
     vmarginratio=1:1,
     footnotesep=2em plus 2pt minus 2pt,
 }
+\fi
 
 \RequirePackage{indentfirst}
 
 \if at colorclass@fast
     \PassOptionsToPackage{fast}{colorist}
+    \RequirePackage{draftwatermark}
+    \DraftwatermarkOptions{text={\normalfont DRAFT},colorspec=0.95}
 \fi
-\if at colorclass@fast
-    \PassOptionsToPackage{polyglossia}{colorist}
-\fi
 \RequirePackage{colorist}
 
 %%================================
@@ -71,27 +95,32 @@
 \IfFontExistsTF{Palatino Linotype}{%
     \setmainfont{Palatino Linotype}
 }{
-    \setmainfont{texgyrepagella-regular.otf}[
-        BoldFont       = texgyrepagella-bold.otf ,
-        ItalicFont     = texgyrepagella-italic.otf ,
-        BoldItalicFont = texgyrepagella-bolditalic.otf ]
+    \setmainfont{TeXGyrePagellaX-Regular.otf}[
+        BoldFont       = TeXGyrePagellaX-Bold.otf ,
+        ItalicFont     = TeXGyrePagellaX-Italic.otf ,
+        BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf ]
 }
     \setsansfont{SourceSansPro-Regular.otf}[
-        Scale          = MatchLowercase,
+        Scale          = MatchLowercase ,
         BoldFont       = SourceSansPro-Bold.otf ,
         ItalicFont     = SourceSansPro-RegularIt.otf ,
         BoldItalicFont = SourceSansPro-BoldIt.otf ]
+    \setmonofont{cmuntt.otf}[
+        Scale          = 1.05 ,
+        BoldFont       = cmuntb.otf ,
+        ItalicFont     = cmunst.otf ,
+        BoldItalicFont = cmuntb.otf ]
 
 %% Chinese fonts
 \PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
 \RequirePackage{ctex}
-\IfFontExistsTF{FZYouSongS 507R}{%
-    \setCJKmainfont{FZYouSongS 507R}[
-        BoldFont       = FZYouSongS 509R ,
-        BoldFeatures   = {FakeBold=2} ,
+\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
+    \setCJKmainfont{FZYOUSK_507R--GBK1-0}[
+        BoldFont       = FZYOUSK_509R--GBK1-0 ,
+        BoldFeatures   = {FakeBold=4} ,
         ItalicFont     = * ,
-        BoldItalicFont = FZYouSongS 509R ,
-        BoldItalicFeatures = {FakeBold=2} ,
+        BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
+        BoldItalicFeatures = {FakeBold=4} ,
         SmallCapsFont  = * ]
 }{
     \setCJKmainfont{FandolSong-Regular.otf}[
@@ -101,13 +130,13 @@
         BoldItalicFeatures = {FakeBold=4} ,
         SmallCapsFont  = * ]
 }
-\IfFontExistsTF{FZYouSongS 507R}{%
-    \setCJKmonofont{FZYouSongS 507R}[
-        BoldFont       = FZYouSongS 509R ,
-        BoldFeatures   = {FakeBold=2} ,
+\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
+    \setCJKmonofont{FZYOUSK_507R--GBK1-0}[
+        BoldFont       = FZYOUSK_509R--GBK1-0 ,
+        BoldFeatures   = {FakeBold=4} ,
         ItalicFont     = * ,
-        BoldItalicFont = FZYouSongS 509R ,
-        BoldItalicFeatures = {FakeBold=2} ,
+        BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
+        BoldItalicFeatures = {FakeBold=4} ,
         SmallCapsFont  = * ]
 }{
     \setCJKmonofont{FandolFang-Regular.otf}[
@@ -118,11 +147,12 @@
         BoldItalicFeatures = {FakeBold=4} ,
         SmallCapsFont  = * ]
 }
-\IfFontExistsTF{FZYouHeiS 506L}{%
-    \setCJKsansfont{FZYouHeiS 506L}[
-        BoldFont       = FZYouHeiS 509R,
+\IfFontExistsTF{FZYOUHK_506L--GBK1-0}{%
+    \setCJKsansfont{FZYOUHK_506L--GBK1-0}[
+        BoldFont       = FZYOUHK_509R--GBK1-0 ,
+        BoldFeatures   = {FakeBold=4} ,
         ItalicFont     = * ,
-        BoldItalicFont = FZYouHeiS 509R ,
+        BoldItalicFont = FZYOUHK_509R--GBK1-0 ,
         SmallCapsFont  = * ]
 }{
     \setCJKsansfont{FandolHei-Regular.otf}[
@@ -133,14 +163,16 @@
 }
 
 %% Math font
-\if at colorclass@fast\else
+\if at colorclass@fast
+\RequirePackage{amssymb}
+\else
 \PassOptionsToPackage
     {warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math}
 \RequirePackage{unicode-math}
-\unimathsetup{math-style=ISO}
+\unimathsetup{math-style=ISO, partial=upright, nabla=upright}
 \setmathfont{Asana-Math.otf}
 \IfFontExistsTF{Neo Euler}{%
-\setmathfont{Neo Euler} % From https://tex.stackexchange.com/a/425887
+\setmathfont{Neo Euler}
     [range={"0000-"0001,"0020-"007E,
             "00A0,"00A7-"00A8,"00AC,"00AF,"00B1,"00B4-"00B5,"00B7,
             "00D7,"00F7,
@@ -167,9 +199,22 @@
             "1D507-"1D50A,"1D50D-"1D514,"1D516-"1D51C,"1D51E-"1D537,
             "1D56C-"1D59F,"1D6A8-"1D6B8,"1D6BA-"1D6D2,"1D6D4-"1D6DD,
             "1D6DF,"1D6E1,"1D7CE-"1D7D7 }]
+\setmathfont[range=up/{greek,Greek}, script-features={}, sscript-features={}
+            ]{Neo Euler}
+\setmathfont[range=up/{latin,Latin}, script-features={}, sscript-features={}
+            ]{Neo Euler}
+\setmathfont[range={bfup/{latin, Latin, greek, Greek}, frak, bffrak, cal},
+             script-features={}, sscript-features={}
+            ]{Neo Euler}
+\setmathfont[range={up/num, bfup/num, it, bfit, scr, bfscr,
+                    sfup, sfit, bfsfup, bfsfit, tt}
+            ]{Asana-Math.otf}
+\setmathfont[range=bfcal, Scale=MatchUppercase, Alternate]{Asana-Math.otf}
 }{}
 \fi
 
+\def\PJL at font@alreadyset{}
+
 \RequirePackage[verbose=silent]{microtype}
 
 %%================================
@@ -178,7 +223,9 @@
 \RequirePackage{graphicx}
 \graphicspath{{images/}}
 \RequirePackage{wrapfig}
+\RequirePackage{float}
 \RequirePackage{caption}
+\captionsetup{font=small}
 
 %%================================
 %% Index
@@ -185,53 +232,6 @@
 %%================================
 \RequirePackage{imakeidx}
 
-%%================================
-%% Draft mark
-%%================================
-\def\dnfFont{\ttfamily}
-\def\needgraphFont{\ttfamily}
-
-\def\dnfTextEN{To be finished here}
-\def\needgraphTextEN{A graph is needed here}
-\def\dnfTextFR{À terminer ici}
-\def\needgraphTextFR{Il manque encore un graphique ici}
-\def\dnfTextCN{这里的内容尚未完成}
-\def\needgraphTextCN{这里需要一张图片}
-
-\definecolor{dnfColor}{RGB}{21,122,20}
-\definecolor{needgraphColor}{RGB}{70,130,180}
-
-\if at colorclass@fast
-    \newcommand{\plainBox}[2][-paper]{\textcolor{#1}{%
-    \setlength{\fboxsep}{1.5pt}%
-    \setlength{\fboxrule}{1.2pt}%
-    \fbox{#2}}}
-\else
-    \PassOptionsToPackage{many}{tcolorbox}
-    \RequirePackage{tcolorbox}
-    \newtcbox{\plainBox}[1][-paper]{enhanced jigsaw,%
-        on line, arc = 1.2pt, outer arc = 1pt,breakable,%
-        colframe = #1,colupper=#1,opacityback=0,%
-        boxsep = 1pt,boxrule = 1.2pt,%
-        left = 1pt, right = 1pt, top = 0pt, bottom = 0pt,%
-    }
-\fi
-
-\NewDocumentCommand{\dnf}{d<>}{%
-    \noindent\plainBox[dnfColor]%
-    {\normalfont\dnfFont\bfseries\small%
-    \csname dnfText\csname\languagename ABBR\endcsname\endcsname%
-    \IfNoValueF{#1}{ : #1}}%
-}
-\NewDocumentCommand{\needgraph}{d<>}{%
-    \par%
-    \centerline{\plainBox[needgraphColor]%
-    {\normalfont\needgraphFont\bfseries\small%
-    \csname needgraphText\csname\languagename ABBR\endcsname\endcsname%
-    \IfNoValueF{#1}{ : #1}}}%
-    \par%
-}
-
 \endinput
 %%
 %% End of file `lebhart/lebhart.cls'.



More information about the tex-live-commits mailing list.