summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-31 03:00:52 +0000
committerNorbert Preining <norbert@preining.info>2021-07-31 03:00:52 +0000
commit6476d9b56070f64c62d6a81514c0c9b25aad1eda (patch)
treebbcbbc5af76f023abb6d36c84ae8a2c2e46dc601 /macros/latex
parent83b88676e8526454a292a894c5f30451eb75b828 (diff)
CTAN sync 202107310300
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/colorist/colorart.cls16
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls16
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin93735 -> 95143 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex32
-rw-r--r--macros/latex/contrib/colorist/colorist.sty46
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx1371
-rw-r--r--macros/latex/contrib/easybook/easybook.ins2
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin597644 -> 552330 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex1144
-rw-r--r--macros/latex/contrib/macrolist/README.md2
-rw-r--r--macros/latex/contrib/macrolist/macrolist.dtx142
-rw-r--r--macros/latex/contrib/macrolist/macrolist.pdfbin192674 -> 193608 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin97030 -> 98659 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex20
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty36
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls16
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls16
-rw-r--r--macros/latex/contrib/palette/README.md4
-rw-r--r--macros/latex/contrib/palette/palette.dtx48
-rw-r--r--macros/latex/contrib/palette/palette.pdfbin180652 -> 182340 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin323652 -> 325472 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin201179 -> 202001 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-fr.pdfbin203142 -> 204097 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc.dtx54
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx592
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin65446 -> 65290 bytes
-rw-r--r--macros/latex/contrib/spbmark/spbmark.sty2
-rw-r--r--macros/latex/contrib/spbmark/spbmark.tex13
-rw-r--r--macros/latex/contrib/vhistory/CHANGES19
-rw-r--r--macros/latex/contrib/vhistory/CHANGES.md33
-rw-r--r--macros/latex/contrib/vhistory/README37
-rw-r--r--macros/latex/contrib/vhistory/README.md17
-rw-r--r--macros/latex/contrib/vhistory/doc/de_beispiel.tex2
-rw-r--r--macros/latex/contrib/vhistory/doc/de_vhistory.tex10
-rw-r--r--macros/latex/contrib/vhistory/doc/en_example.tex2
-rw-r--r--macros/latex/contrib/vhistory/doc/en_vhistory.tex10
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_set_example.pdfbin74513 -> 79106 bytes
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_set_example.tex2
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_de.pdfbin167148 -> 179877 bytes
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_de.tex2
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_en.pdfbin161460 -> 174185 bytes
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_en.tex2
-rw-r--r--macros/latex/contrib/vhistory/sets.sty1
-rw-r--r--macros/latex/contrib/vhistory/vhistory.sty76
44 files changed, 1880 insertions, 1905 deletions
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 64c68139bd..5d45070c7a 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorart}
- [2021/07/27 A colorful article style]
+ [2021/07/30 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -31,6 +31,7 @@
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
+\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
@@ -55,6 +56,9 @@
\if@colorclass@garamond
\@colorclass@customfonttrue
\fi
+\if@colorclass@noto
+ \@colorclass@customfonttrue
+\fi
\if@colorclass@biolinum
\@colorclass@customfonttrue
\fi
@@ -149,6 +153,16 @@
\let\colorist@textsc\relax
\fi
+\if@colorclass@noto
+ \RequirePackage{amssymb}
+ \if@colorclass@useosf
+ \PassOptionsToPackage{oldstyle}{notomath}
+ \fi
+ \RequirePackage{anyfontsize}
+ \RequirePackage{notomath}
+ \PJLsetlinespacing{\setstretch{1.00}}
+\fi
+
\if@colorclass@biolinum
\RequirePackage{amssymb}
% \RequirePackage{mathpazo}
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 45efb1360c..798ec0bcb3 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorbook}
- [2021/07/27 A colorful book style]
+ [2021/07/30 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -31,6 +31,7 @@
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
+\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
@@ -55,6 +56,9 @@
\if@colorclass@garamond
\@colorclass@customfonttrue
\fi
+\if@colorclass@noto
+ \@colorclass@customfonttrue
+\fi
\if@colorclass@biolinum
\@colorclass@customfonttrue
\fi
@@ -149,6 +153,16 @@
\let\colorist@textsc\relax
\fi
+\if@colorclass@noto
+ \RequirePackage{amssymb}
+ \if@colorclass@useosf
+ \PassOptionsToPackage{oldstyle}{notomath}
+ \fi
+ \RequirePackage{anyfontsize}
+ \RequirePackage{notomath}
+ \PJLsetlinespacing{\setstretch{1.00}}
+\fi
+
\if@colorclass@biolinum
\RequirePackage{amssymb}
% \RequirePackage{mathpazo}
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 0a038390b7..56badd7b1f 100644
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ b/macros/latex/contrib/colorist/colorist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
index f8bea775a1..e17a0ba207 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -1,16 +1,4 @@
-\documentclass[English,Chinese,French,allowbf,puretext]{colorart}
-
-\theoremstyle{basic}
-\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}[definition]
-\CreateTheorem{conjecture}[definition]
-\CreateTheorem*{example*}
-\CreateTheorem{problem}[definition]
-
-\theoremstyle{emphasis}
-\CreateTheorem{remark}<highest>
-
-\theoremstyle{simple}
+\documentclass[English,Chinese,French,allowbf]{colorart}
%%================================
%% Import toolkit
@@ -105,7 +93,7 @@
\title{\colorist{}, write your articles or books in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} 2021/07/27}}
+\thanks{Corresponding to: \texttt{\colorist{} 2021/07/30}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{July 2021, Beijing}
@@ -322,6 +310,7 @@ If you like the current document class, but want a more ``plain'' style, then yo
\end{code}
\end{tip}
+\vspace{1.5\baselineskip}
\LevelTwoTitle{Example - \colorbook}
Now let's look at an example of \colorbook{} (the same works for \beaulivre{}).
@@ -366,6 +355,7 @@ There is no much differences with \colorart{}, only that the title and author in
In the next section, we will go through the options available.
+\clearpage
\LevelOneTitle{The options}
\colorist{} offers the following options:
@@ -400,9 +390,14 @@ In the next section, we will go through the options available.
\begin{itemize}
\item Pure text mode. Does not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}
+ \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered.
+ \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \end{itemize}
+ \item \texttt{regionalref}, \texttt{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.
\end{itemize}
\end{itemize}
@@ -412,7 +407,7 @@ Additionally, \colorart{} and \colorbook{} offers the following options:
\begin{itemize}
\item Optional paper size. The default paper size is 8.5in $\times$ 11in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{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.
@@ -488,7 +483,7 @@ After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
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.
+By default, when referenced, the name of the theorem matches the current context. For example, the definition above will be displayed in French in the current French context: \cref{def: strange,thm}. If you want the name of the theorem to always match the language of the context in which the theorem is located, you can add \texttt{originalref} to the global options.
\end{tip}
\UseLanguage{English}
@@ -535,6 +530,7 @@ If you need to define a new theorem-like environment, you must first define the
\begin{itemize}
\item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
\end{itemize}
+
For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
\medskip
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index ddc6055a05..354006dc4b 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{colorist}
- [2021/07/27 A colorful style for articles and books]
+ [2021/07/30 A colorful style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -29,10 +29,16 @@
\DeclareBoolOption[false]{puretext}
\DeclareBoolOption[false]{nothms}
\DeclareBoolOption[false]{nothmnum}
+\DeclareStringOption{thmnum}[colorist@thmnum@default]
+\DeclareBoolOption[true]{regionalref}
+\DeclareBoolOption[false]{originalref}
\DeclareBoolOption[false]{allowbf}
\DeclareBoolOption[false]{runin}
\ProcessKeyvalOptions*\relax
+\if@colorist@originalref
+ \@colorist@regionalreffalse
+\fi
\if@colorist@draft
\@colorist@fasttrue
\fi
@@ -40,6 +46,21 @@
\@colorist@nothmstrue
\fi
+\if@colorist@fast
+ \PassOptionsToPackage{fast}{PJLdraft}
+ \PassOptionsToPackage{fast}{PJLthm}
+\fi
+\expandafter\ifstrempty\expandafter{\@colorist@thmnum}{}{
+ \expandafter\ifstrequal\expandafter{\@colorist@thmnum}{colorist@thmnum@default}{
+ \PassOptionsToPackage{thmnum}{PJLthm}
+ }{
+ \PassOptionsToPackage{thmnum=\@colorist@thmnum}{PJLthm}
+ }
+}
+\if@colorist@regionalref\else
+ \PassOptionsToPackage{originalref}{PJLthm}
+\fi
+
\if@colorist@allowbf
\newcommand{\conditionalbfseries}{\bfseries\colorlet{PJLtempcolor}{.}\color{PJLtempcolor!90!paper}}
\else
@@ -728,12 +749,8 @@
\expandafter\def\csname definition-propositionnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\propositionnameRU}
\expandafter\def\csname definition-theoremnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\theoremnameRU}
+\AtEndPreamble{
\theoremstyle{basic}
-\ifbool{IsBook}{
- \newaliascnt{highest}{chapter}
-}{
- \newaliascnt{highest}{section}
-}
\if@colorist@nothms\else
\if@colorist@nothmnum
\CreateTheorem*{theorem}
@@ -746,7 +763,7 @@
\CreateTheorem*{fact}
\CreateTheorem*{conjecture}
\else
-\CreateTheorem{theorem}<highest>
+\CreateTheorem@thmnum{theorem}
\CreateTheorem{lemma}[theorem]
\CreateTheorem{proposition}[theorem]
\CreateTheorem{corollary}[theorem]
@@ -804,14 +821,13 @@
\CreateTheorem*{remark}
\CreateTheorem*{observation}
\else
-\CreateTheorem{remark}<highest>
-\CreateTheorem{observation}<highest>
+\CreateTheorem@thmnum{remark}
+\CreateTheorem@thmnum{observation}
\fi
\CreateTheorem*{remark*}
\CreateTheorem*{observation*}
\fi
-
-\numberwithin{equation}{highest}
+}
\creflabelformat{PJLtheorem}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
\creflabelformat{PJLlemma}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
@@ -1287,27 +1303,35 @@
\tcolorboxenvironment{question}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{question*}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{exercise}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{exercise*}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{remark}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{remark*}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{observation}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{observation*}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ top=0mm,bottom=0mm,
opacityframe=0,opacityback=0,lines before break=3}
\ExplSyntaxOn
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index d044cbf4b0..3e61fa0833 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -1,4 +1,3 @@
-% \iffalse meta-comment
%
% Copyright (C) 2021 by Qu Yi <quee123@foxmail.com>
%
@@ -6,1365 +5,10 @@
% conditions of the CC-BY 4.0 License.
% The latest version of this license is in
% https://creativecommons.org/licenses/by/4.0/legalcode
-% \fi
-%
-% \iffalse
-%<*driver>
-\documentclass[fontset = fandol]{ctxdoc}
-\OnlyDescription
-\hypersetup{linkcolor = violet}
-\begin{document}
- \DocInput{\jobname.dtx}
- \IndexLayout
- \PrintChanges
- \PrintIndex
-\end{document}
-%</driver>
-% \fi
-%
-% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
-% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.25}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
-% \changes{v1.25}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
-%
-% \title{\sffamily easybook 文档类手册}
-% \author{瞿毅}
-% \date{2021/07/26\hskip 1em\relax v1.27R\thanks{\url{https://gitee.com/texl3/easybook}}}
-%
-% \maketitle
-% \begin{abstract}
-% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,同时兼具 \cls{book} 与 \cls{article} 文档类的用途,它的基础宏包 \pkg{easybase} 还可以搭配 \CTeX 和标准文档类使用。\cls{easybook} 考虑了一些细节并载入一些几乎必备的宏包进行包装和改进,提供多个命令和接口可以使用户简便地进行设置。它适用于排版中英文学位论文、学术书籍或者是笔记。
-% \end{abstract}
-% \tableofcontents
-%
-% \clearpage
-% \section{使用说明}
-% 您在使用 \cls{easybook} 文档类编写文档前可能需要满足以下的条件:
-% \begin{itemize}
-% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
-% \item 由于用到了一些 \LaTeX 和宏包较新的功能,建议安装最新的 \TeX 发行版,例如 \TeX~Live 2021 或 \hologo{MiKTeX} 21.2 之后的版本。
-% \item 虽然手册对基本用法做了介绍,但这并不是入门教程,所涉及到宏包的用法与命令也需要有了解。您应当具有一定的 \LaTeX 使用基础,可以在 \TeX 综合网站 \href{https://www.ctan.org/}{CTAN} 查看相关资源。
-% \end{itemize}
-%
-% \subsection{基本用法}
-% 以下一份简单的 \TeX 文档演示了 \cls{easybook} 的最基本用法,在导言区进行宏包载入与文档设置,一些详细的使用样例会不定期上传在 \href{https://www.latexstudio.net/}{\LaTeX 工作室} 的网站。
-% \begin{frameverb}
-% \documentclass{easybook}
-%
-% \ctexset{键值列表}
-% \usepackage{宏包列表}
-%
-% \begin{document}
-% \chapter{欢迎}
-% \section{Welcome to easybook}
-% Hello, \LaTeX
-% \end{document}
-% \end{frameverb}
-%
-% 或者直接使用 \pkg{easybase} 宏包,目前适用于 \cls{ctexbook}、\cls{ctexrep}、\cls{ctexart} 以及标准文档类。它的宏包选项有 \opt{class}、\opt{draft}、\opt{paper} 和 \opt{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在\textbf{标准文档类}后载入时还可以使用 \pkg{ctex} 宏包的选项,将会传递给 \pkg{ctex} 宏包。
-% \begin{frameverb}
-% \documentclass{ctexbook}
-%
-% \usepackage{easybase}
-% \ctexset{键值列表}
-%
-% \usepackage{宏包列表}
-%
-% \begin{document}
-% \chapter{欢迎}
-% \section{Welcome to easybook}
-% Hello, \LaTeX
-% \end{document}
-% \end{frameverb}
-%
-% \subsection{编译方式}
-% 假设您的 \TeX 源文件名为 \opt{easybook.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行:
-% \begin{frameverb}
-% xelatex -shell-escape easybook
-% bibtex easybook
-% makeindex easybook
-% xelatex -shell-escape easybook
-% xelatex -shell-escape easybook
-% \end{frameverb}
-% 当然也可以使用 \opt{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\
-% \ding{72} 需要注意正确\textbf{编译索引}要增加 \opt{-shell-escape} 命令行选项。
-%
-% \section{文档类选项}
-% \label{sec:document class options}
-% 标准文档类与 \CTeX 文档类的选项和命令同样适用于本文档,除此之外选项分为两类:
-% \begin{itemize}
-% \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
-% \item 带有 \exptarget\expstar{} 号的选项,需要通过 \CTeX 宏集提供的用户接口命令 \tn{ctexset} 或节 \ref{sec:interface options} 中此选项所属模块接口命令设定。
-% \end{itemize}
-%
-% \begin{function}[rEXP,added = 2021-01-05]{draft}
-% 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不载入 \pkg{tcolorbox} 宏包使用盒子环境也会提高编译速度,详情见小节 \ref{subsec:box}。
-% \end{function}
-%
-% \begin{function}[rEXP,added = 2021-01-05]{newline}
-% 部分和章标题的样式为另起一行,符合一般英文书籍的习惯。类似下面的效果:
-% \begin{flushleft}\sffamily\LARGE
-% Chapter 1\vskip 1.3pc
-% This is a title
-% \end{flushleft}
-% \end{function}
-%
-% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-04-08]{scheme}
-% \begin{syntax}
-% scheme = <(chinese)|plain>
-% \end{syntax}
-% \opt{scheme} 代表文档的主题,扩展了此选项在 \CTeX 文档类中原有的作用范围,\opt{plain} 选项可使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1}变为\textbf{Table 1.1}。
-% \end{function}
-%
-% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-04-29]{enmode}
-% 同时开启 \opt{newline} 和 \opt{scheme = plain} 选项以符合英文原生风格。
-% \end{function}
-%
-% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
-% \begin{syntax}
-% paper = <(a4paper)|b5paper|c5paper|letterpaper|...>
-% \end{syntax}
-% 设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
-% \end{function}
-%
-% \begin{function}[rEXP,added = 2021-01-08,updated = 2021-04-20]{config}
-% \begin{syntax}
-% config = <配置文件名>
-% \end{syntax}
-% \opt{config} 为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
-% \changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
-% \end{function}
-%
-% \begin{function}[rEXP,added = 2021-06-15]{floatpage}
-% \begin{syntax}
-% floatpage = <true|(false)>
-% \end{syntax}
-% 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
-% \changes{v1.26}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
-% \end{function}
-%
-% \subsection{中文字体}
-% \begin{function}[rEXP,added = 2021-07-12]{cjkfont}
-% \begin{syntax}
-% cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
-% \end{syntax}
-% 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
-% \changes{v1.27R}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
-% \end{function}
-%
-% 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
-% \begin{ctexexam}
-% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
-% \setCJKsansfont{SimHei}
-% \setCJKmonofont{FangSong}
-% \newCJKfontfamily[song]\songti{SimSun}
-% \end{ctexexam}
-%
-% \subsection{英文字体}
-% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-07-12]{font}
-% \begin{syntax}
-% font = <noto|garamond|times|libertine|palatino||(auto)|>
-% \end{syntax}
-% 预置的英文字体相关配置方案如下表所示,这些字体已经包含在了 \TeX~Live 发行版中,所以通常不需要再专门安装。如果您想使用其他英文字体,可以使用 \pkg{fontspec} 宏包的相关命令进行设置。
-% \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
-% \end{function}
-%
-% \begin{center}
-% \begin{tabular}{cccc}
-% \toprule
-% & \sffamily{正文字体} & \sffamily{无衬线字体} & \sffamily{等宽字体} \\
-% \midrule
-% \opt{noto} & Noto Serif & Noto Sans & Noto Sans Mono \\
-% \opt{garamond} & EB Garamond & Libertinus Sans & LM Mono \\
-% \opt{palatino} & TG Pagella & Libertinus Sans & LM Mono \\
-% \opt{libertine} & TG Pagella & Libertinus Sans & LM Mono \\
-% \opt{times} & XITS & TG Heros & TG Cursor \\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-%
-% \subsection{article 模式}
-% \begin{function}[rEXP,added = 2021-03-16]{class}
-% \begin{syntax}
-% class = <(book)|article>
-% \end{syntax}
-% 使用 \cls{easybook} 文档类可以有两种模式,默认为 book 模式。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时节 \ref{sec:document command} 中目录命令的 \opt{chapter} 选项会失效,将以 \opt{section} 标题级别输出目录。也可以使用 \opt{book} 或 \opt{article} 选项指定文档类型。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则宏包选项 \opt{book} 会失效。
-% \changes{v1.23}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
-% \end{function}
-%
-% \section{文档命令}
-% \label{sec:document command}
-% \subsection{文区命令}
-% \begin{function}[added = 2021-02-20,updated = 2021-07-25]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage,\blankpagestyle}
-% \begin{syntax}
-% \tn{frontmatter*}\oarg{编号格式|(Roman)}
-% \tn{mainmatter*}
-% \tn{backmatter}
-% \tn{cleardoublepage}\oarg{页面风格|(empty)}
-% \tn{blankpagestyle}\marg{页面风格}
-% \end{syntax}
-% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从 1 开始计数的阿拉伯数字,它们带有星号的变体命令不使用 \tn{cleardoublepage} 命令。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。
-% \changes{v1.23}{2021/02/20}{重新定义文档结构划分命令。}
-% \end{function}
-%
-% 清双页命令 \tn{cleardoublepage} 可以确保下一页文本总在奇数页开始,在奇数页使用它会产生空白偶数页。文区命令 \tn{frontmatter} 和 \tn{mainmatter} 会用到清双页命令,在启用文类选项 \opt{openright} 时标题命令 \tn{part} 和 \tn{chapter} 也会用到清双页命令。此时可以使用 \tn{blankpagestyle} 命令全局指定多出空白页的默认页面风格,或使用可选参数局部指定。默认的风格为 \opt{empty},即空的页眉页脚。
-%
-% \subsection{目录命令}
-% \begin{function}[added = 2021-02-20,updated = 2021-06-06]{\tableofcontents,\listoffigures,\listoftables,\listoflstlistings}
-% \begin{syntax}
-% \tn{tableofcontents+}\oarg{键值列表}\parg{附加代码}
-% \tn{listoffigures*+}\oarg{键值列表}
-% \tn{listoftables*+}\oarg{键值列表}
-% \tn{listoflstlistings*+}\oarg{键值列表}
-% \end{syntax}
-% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflstlistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有 + 号的目录命令可以使当前标题编号。\tn{tableofcontents+} 的 + 号含义则是输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令。可选参数的 \meta{键值列表} 如下:
-% \changes{v1.25}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
-% \end{function}
-%
-% \begin{function}{multoc,columns,title,format,aftertitle,pagestyle,chapter,section}
-% \begin{syntax}
-% multoc = <true|(false)>
-% columns = <目录栏数|(2)>
-% title = \{<中文目录标题>,<英文目录标题>\}
-% format = <目录标题格式>
-% aftertitle = <目录标题后的代码>
-% pagestyle = <标题页的页面格式>
-% \end{syntax}
-% \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否多栏排版,栏数默认为双栏,可使用 \opt{columns} 更改。\opt{title} 选项用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录,与 \tn{tableofcontents+} 配合输出。
-% \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
-% \changes{v1.24}{2021/04/04}{目录命令的可选参数增加标题选项 \opt{title}。}
-% \changes{v1.25}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
-% \end{function}
-%
-% 在书籍模式且 \opt{chapter} 选项开启或者文章模式的情况下,\opt{format} 用于设置目录标题的格式,\opt{aftertitle} 选项的代码将被插入到目录标题内容之后,\opt{pagestyle} 是目录标题所在页的页面格式,除此之外还支持 \opt{ctexset/chapter} 或 \opt{ctexset/section} 所有的章节标题样式选项。\opt{chapter} 选项使目录标题按照 chapter 级别输出,\opt{section} 选项使目录标题按照 section 级别输出,默认为 chapter 级别。
-%
-% \subsection{标题命令}
-% \begin{function}[added = 2021-05-05,updated = 2021-06-13]{\bichapter,\bisection,\bisubsection}
-% \begin{syntax}
-% \tn{bichapter*}\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}
-% \tn{bisection*}\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}
-% \tn{bisubsection*}\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}
-% \end{syntax}
-% 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有 bichapter、bisection 和 bisubsection 三个计数器,并对应 \tn{the}\meta{计数器} 的值,可以用于 \opt{binumber} 选项更改英文目录中的编号。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。
-% \changes{v1.25}{2021/05/05}{增加与双语目录配合的标题命令。}
-% \end{function}
-%
-% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式默认是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下:
-% \begin{function}{chapter/biname,chapter/binmuber}
-% \begin{syntax}
-% biname = \{<英文目录前名字|(Chapter\tn{space})>,<英文目录后名字>\}
-% binmuber = <英文目录数字输出命令|(\tn{arabic\{chapter\}})>
-% \end{syntax}
-% 类似 \CTeX 的 \opt{name} 和 \opt{nmuber} 选项,它们用于设置主文区 \tn{bichapter} 等标题命令在英文目录中的前后名字与编号,目前只支持通常改变名字与编号的 chapter 级别。
-% \end{function}
-%
-% \begin{function}[added = 2021-05-05,updated = 2021-06-13]{\appendix,\BeforeAddBitoc}
-% \begin{syntax}
-% \tn{appendix}[<英文附录目录前名字>,<英文附录目录后名字>]\parg{英文附录目录数字输出命令}
-% \tn{BeforeAddBitoc*}\marg{加入目录英文标题前的代码}
-% \end{syntax}
-% \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。
-% \changes{v1.26}{2021/06/13}{增加调整英文目录格式的钩子 \tn{BeforeAddBitoc}。}
-% \end{function}
-%
-% \tn{BeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。
-%
-% \subsection{上标和下标}
-% \begin{function}[added = 2021-06-26]{\super,\sub,\supersub,\textsuperscript,\textsubscript}
-% \begin{syntax}
-% \tn{super*}\oarg{垂直偏移|(0pt)}[<高度>,<深度>]\parg{格式代码}\marg{内容}\oarg{水平偏移|(0pt)}
-% \tn{sub*}\oarg{垂直偏移|(0pt)}[<高度>,<深度>]\parg{格式代码}\marg{内容}\oarg{水平偏移|(0pt)}
-% \tn{supersub*}\oarg{上下标间距|(0.3ex)}\oarg{对齐方式|(l)|c|r}\parg{上标代码}
-% \ \marg{上标内容}\marg{下标内容}
-% \ \oarg{水平偏移|(0pt)}\parg{下标代码}
-% \end{syntax}
-% 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
-% \changes{v1.26}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
-% \end{function}
-%
-% 默认没有垂直和水平偏移,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。上标和下标命令还分别具有更简短的等价命令 \tn{sp}、\tn{sb} 和 \tn{spb}。
-%
-% \section{接口选项}
-% \label{sec:interface options}
-% \begin{function}[added = 2021-01-05]{\ctexset}
-% \begin{syntax}
-% \tn{ctexset}\marg{键值列表}
-% \end{syntax}
-% \cls{easybook} 扩展了 \CTeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名:
-% \begin{center}
-% \begin{tabular}{*{5}{c}}
-% \toprule
-% \hyperref[subsec:style]{风格} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
-% style & subfont & spread & refset & bibset \\
-% \midrule
-% \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
-% thmset & geoset & hdrset & tocset & \\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-% \end{function}
-%
-% \subsection{风格}
-% \label{subsec:style}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-07-03]{color,color-all,multoc,withpart,footwith,rulewidth,uppercase,figurepath}
-% \begin{syntax}
-% color = <(none)|seaside|energy|cyberpunk>
-% color-all = <HTML颜色代码>
-% multoc = <true|(false)>
-% withpart = <true|(false)>
-% footwith = <part|(chapter)|page>
-% rulewidth = <线宽|(0.75pt)>
-% uppercase = <(true)|false>
-% figurepath = \{\{<路径名1>\}\{<路径名2>\}\}
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{style/...}
-% \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-% \changes{v1.23}{2021/02/02}{noto 风格的数学字体独立出来,可自定义设置。}
-% \changes{v1.23}{2021/02/09}{增加控制页面横线粗细的选项 \opt{rulewidth}。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[color] 预置了四种主题颜色,默认主题 \opt{none} 为黑白页面,主题颜色不包括超链接。
-% \begin{function}{\DeclareThemeColor}
-% \begin{syntax}
-% \tn{DeclareThemeColor}\{<风格名称>,<ctex@frame>,<ctex@emph>,<ctex@verb>\}
-% \end{syntax}
-% 可以使用 \tn{DeclareThemeColor} 命令声明新的主题颜色,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成主题颜色。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
-% \changes{v1.26}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
-% \end{function}
-% \item[color-all] 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
-% \item[multoc] 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
-% \item[withpart] 使章跟随每一部分编号,默认不跟随。
-% \item[footwith] 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从 1 开始。
-% \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
-% \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
-% \item[figurepath] 设置插入图片的文件夹路径名,可以有多个路径名,但需要包含在括号内作为间隔,即使只有一个路径。
-% \end{optdesc}
-%
-% \subsubsection{连接符}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-07-02]{figure-con,table-con,listing-con,equation-con,number-con}
-% \begin{syntax}
-% figure-con = <图片连接符|(.)>
-% table-con = <表格连接符|(.)>
-% listing-con = <代码连接符|(.)>
-% equation-con = <公式连接符|(.)>
-% number-con = <连接符|(.)>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{style/...} \\
-% 上面几个选项用于设置相应编号的连接符,\opt{number-con} 统一设置所有编号的连接符。
-% \changes{v1.23}{2021/03/15}{增加控制编号连接符的选项。}
-% \end{function}
-%
-% \subsubsection{上下标全局设置}
-% \label{subsubsec:super-sub-script}
-% \begin{function}[EXP,added = 2021-06-26,updated = 2021-07-24]{super-vshift,super-hshift,sub-vshift,sub-hshift,super-format,sub-format}
-% \begin{syntax}
-% super-vshift = <刚性长度|(0pt)>
-% super-hshift = <刚性长度|(0pt)>
-% sub-vshift = <刚性长度|(0pt)>
-% sub-hshift = <刚性长度|(0pt)>
-% super-format = <上标格式>
-% sub-format = <下标格式>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{style/...} \\
-% 可以使用 \tn{spbset} 命令设置上述选项,以上各个选项的参数对应 \tn{super} 或 \tn{sub} 上标下标命令的参数。其中 \meta{刚性长度} 为上标或下标的垂直和水平偏移量,\meta{上标格式} 和 \meta{下标格式} 为上标和下标的格式代码。
-% \end{function}
-%
-% \begin{function}[EXP,added = 2021-06-26,updated = 2021-07-24]{supersub-hshift,supersub-format,supersubsep,supersubalign}
-% \begin{syntax}
-% supersub-hshift = <刚性长度|(0pt)>
-% supersub-format = \{<上标格式>,<下标格式>\}
-% supersubsep = <刚性长度|(0.3ex)>
-% supersubalign = <(l)|c|r>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{style/...} \\
-% 可以使用 \tn{spbset} 命令设置上述选项,以上各个选项的参数对应 \tn{supersub} 上下标命令的参数。\opt{supersubsep} 选项是上下标的垂直间距,\opt{supersubalign} 选项则是上下标的水平对齐方式,有左对齐、居中对齐和右对齐三种。\opt{supersub-format} 选项分别设置上下标的格式,以英文逗号分隔为前后部分,也可以只有前部分,表示上标的格式。
-% \end{function}
-%
-% \subsection{超链接}
-% \label{subsec:hyperlinks}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-07-03]{linktype,linkcolor,linkcol-all,linktoc}
-% \begin{syntax}
-% linktype = <(edge)|colors|none>
-% linkcolor = <fresh|cutepink|(navyblue)|crimson>
-% linkcol-all = <HTML颜色代码>
-% linktoc = <none|section|page|(all)>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{refset/...} \\
-% \opt{refset} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
-% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-% \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
-% \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
-% \changes{v1.25}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[linktype] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接变为彩色,预置了四种颜色样式。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
-% \item[linkcolor] 超链接颜色样式。
-% \begin{function}{\DeclareLinkColor}
-% \begin{syntax}
-% \tn{DeclareLinkColor}\{<风格名称>,<ctex@link>,<ctex@url>,<ctex@cite>\}
-% \end{syntax}
-% 可以使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成超链接颜色。
-% \changes{v1.26}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
-% \end{function}
-% \item[linkcol-all] 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
-% \item[linktoc] 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
-% \end{optdesc}
-%
-% \subsection{行距}
-% \label{subsec:spacing}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-05-17]{line,table,math,caption,footnote,spread-all}
-% \begin{syntax}
-% line = <数值|(1.3)>
-% table = <数值|(1.05)>
-% math = <数值|(1.05)>
-% caption = <数值|(1.1)>
-% footnote = <数值|(1.1)>
-% spread-all = <数值|(empty)>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{spread/...} \\
-% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为:
-% \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-% \changes{v1.23}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[line] 正文行距,\CTeX 原有的行距选项 \opt{linespread} 失效。
-% \item[table] 表格行距,对传统表格环境 \env{tabular}、\env{tabularx} 以及 \pkg{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \opt{stretch} 选项设置行距。
-% \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
-% \item[caption] 图表代码标题行距。
-% \item[footnote] 脚注整体内容的行距,可以使用 \opt{fntext-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同。
-% \begin{ctexexam}
-% \spread{footnote = 1.3}
-% \hdrset{fntext-form = \linespread{1.2}\selectfont}
-% \end{ctexexam}
-% \item[spread-all] 统一设置上述各种行距。
-% \end{optdesc}
-%
-% \subsection{其它字体}
-% \label{subsec:other font}
-% \begin{function}[EXP,added = 2021-01-08,updated = 2021-05-19]{table-cap,figure-cap,listing-cap,footnote,marginpar,math}
-% \begin{syntax}
-% table-cap = <(\tn{sffamily}\tn{small})>
-% figure-cap = <(\tn{sffamily}\tn{small})>
-% listing-cap = <(\tn{sffamily}\tn{small})>
-% footnote = <(\tn{rmfamily})>
-% marginpar = <(\tn{rmfamily}\tn{footnotesize})>
-% math = <(times)|noto|notosans|nc|stix|charter|garamond|libertine|none>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{subfont/...}
-% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-% \changes{v1.23}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-% \changes{v1.25}{2021/05/31}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[table-cap] 表格标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[figure-cap] 图片标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[listing-cap] 代码标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[footnote] 设置脚注标记与内容的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[marginpar] 边注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[math] 选择合适的数学字体,将会加载 \pkg{newtxmath} 和 \pkg{bm} 宏包。使用选项 \opt{none} 时可以使用 \pkg{unicode-math} 等其它数学字体宏包定义字体。
-% \end{optdesc}
-%
-% \subsection{参考文献}
-% \label{subsec:reference}
-% \begin{function}[EXP,added = 2021-01-11,updated = 2021-06-13]{backend,bib-style,cite-style,datafile}
-% \begin{syntax}
-% backend = <(bibtex)|biblatex>
-% bib-style = <(numerical)|authoryear|其它格式>
-% cite-style = <标注风格>
-% datafile = <参考文献数据库名>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{bibset/...}
-% \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-% \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
-% \changes{v1.24}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
-% \changes{v1.25}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献\footnote{使用 \hologo{BibTeX} 引擎时加载 \pkg{natbib} 宏包,使用 \hologo{biber} 时将加载 \pkg{biblatex} 宏包。}。
-% \item[bib-style] 参考文献格式为中国的参考文献推荐标准 GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
-% \item[cite-style] 标注参考文献的风格,选项 \opt{backend = bibtex} 下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,选项 \opt{backend = biblatex} 下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
-% \item[datafile] 参考文献数据库的文件名,可以是单个文件也可以是以括号包裹并以英文逗号分隔的文件列表,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,若不在当前文件夹名称需要包含路径。不设置参考文献数据库名时 \opt{bibset} 中的选项会失效,即不自动载入 \pkg{natbib} 或 \pkg{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。
-% \end{optdesc}
-%
-% \subsubsection{配置参考文献}
-% \begin{function}[added = 2021-01-11,updated = 2021-04-09]{\printbibliography}
-% \begin{syntax}
-% \tn{printbibliography}\oarg{键值列表}
-% \end{syntax}
-% 两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下:
-% \end{function}
-%
-% \begin{function}{heading,title,prenote,section,type,filter}
-% \begin{syntax}
-% heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
-% title = <参考文献标题名>
-% prenote = <参考文献前注>
-% section = <整数|(0)>
-% type = <条目类型>
-% filter = <过滤器名>
-% \end{syntax}
-% \end{function}
-% \begin{optdesc}
-% \item[heading] 参考文献通常有一个章标题或者节标题,该选项选择由 \tn{defbibheading} 定义的标题名。缺省状态下使用标题名 \opt{bibintoc}。
-% \item[title] 如果标题定义支持的话,该选项覆盖由 \opt{heading} 选项提供的缺省标题名。
-% \item[prenote] 该选项选择由 \tn{defbibnote} 所定义的前注,缺省状态下不打印任何前注。
-% \item[section] 只打印在指定文节中引用的条目。该参考文献节从 1 开始编号,所有在 \env{refsection} 环境外给出的引用标记为第零节。
-% \item[type] 指定条目的打印类型。
-% \item[filter] 使用由 \tn{defbibfilter} 定义的 \opt{filter} 来过滤条目。
-% \end{optdesc}
-%
-% 可能一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg{biblatex} 宏包的例子:
-% \begin{ctexexam}
-% \usepackage[style = numeric]{biblatex}
-% \addbibresource{myrefs.bib}
-% \defbibheading{bibliography}[参考文献] % 定义参考文献标题
-% {\chapter*{#1}\markboth{#1}{#1}}
-% \end{ctexexam}
-%
-% \subsection{定理样式}
-% \label{subsec:theorem of style}
-% \begin{function}[EXP,added = 2021-01-12,updated = 2021-07-01]{thmbox,within,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost,headformat,brackets}
-% \begin{syntax}
-% thmbox = <true|(false)>
-% within = <(chapter)|section|其它环境|空置>
-% headpunct = <(empty)>
-% bodyfont = <(empty)>
-% notefont = <(empty)>
-% headfont = <(\tn{color}\{ctex@emph\}\tn{sffamily})>
-% headindent = <刚性长度|(0em)>
-% spaceabove = <弹性长度|(0.75ex plus .1ex)>
-% spacebelow = <弹性长度|(0.75ex plus .1ex)>
-% spacepost = <刚性长度|(1em)>
-% headformat = <(\tn{NAME}\tn{space}\tn{NUMBER}\tn{NOTE})>
-% brackets = \{<左括号>,<右括号>\}
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{thmset/...}
-% \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-% \changes{v1.26}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[thmbox] 开启定理环境盒子的边框,需载入 \pkg{tcolorbox} 宏包才生效。这个选项与 \pkg{thmtools} 中并不一致,\pkg{thmtools} 的同名选项包括 \opt{L}、\opt{M} 和 \opt{S} 三个参数。
-% \item[within] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
-% \item[headpunct] 定理标题末尾后的标记,在换行符或第一段内容的间隔之前。
-% \item[bodyfont] 定理内容部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[notefont] 定理题注部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[headfont] 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
-% \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
-% \item[spaceabove] 定理环境前的间距,使用 \pkg{tcolorbox} 的环境包装后被覆盖。
-% \item[spacebelow] 定理环境后的间距,使用 \pkg{tcolorbox} 的环境包装后被覆盖。
-% \item[spacepost] 定理标题后与第一段内容的间距。
-% \item[headformat] 定理开头部分各组成元素的排列和格式,这个选项一般不需要使用,其中 \tn{NAME}、\tn{NUMBER} 和 \tn{NOTE} 分别代表标题、编号和题注。
-% \item[brackets] 设置行间公式编号标签的括号,以英文逗号分隔,分别为左右括号。
-% \end{optdesc}
-%
-% \subsubsection{新建定理样式}
-% \begin{function}[added = 2021-01-12,updated = 2021-07-13]{\declaretheorem,\DeclareTheorem,\declaretheoremstyle}
-% \begin{syntax}
-% \tn{declaretheorem}\oarg{键值列表}\marg{定理环境名}\oarg{键值列表}
-% \tn{DeclareTheorem}\marg{定理环境名}\oarg{英文标题}\marg{中文标题}\parg{盒子样式|(tc-theorem)}\oarg{键值列表}
-% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}\oarg{键值列表}
-% \end{syntax}
-% 文档类已预置 8 个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这三个命令,由 \pkg{thmtools} 提供支持,其中两个命令各自前后可选参数的 \meta{键值列表} 是等效的,用法与它们的同名命令一致。
-% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{DeclareTheorem}。}
-% \changes{v1.26}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[\tn{declaretheorem}] 定义新的定理类环境,\tn{newtheorem} 命令与它等效。\meta{键值列表} 中常用的选项如下:
-% \begin{function}{name,numbered,numberlike,style}
-% \begin{syntax}
-% name = <定理环境标题>
-% numbered = <no|(yes)|unless unique>
-% numberlike = <定理环境名>
-% style = <定理样式名>
-% \end{syntax}
-% \end{function}
-% \begin{optdesc}
-% \item[name] 定理标题的默认值是环境的名称,并且首字母大写(英文标题)。
-% \item[numbered] 定理可以被编号、不被编号或者只有在文档中多次出现时才被编号。
-% \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
-% \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
-% \end{optdesc}
-% \item[\tn{DeclareTheorem}] \tn{DeclareTheorem} 是更便捷的定理命令,它定义一个新的定理环境,\meta{键值列表} 支持的选项与 \tn{declaretheorem} 相同,但它们的区别有:
-% \begin{itemize}
-% \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的环境名。
-% \item 自动定义交叉引用的格式,引用标签前缀为定理名称。
-% \item 定理盒子选项 \opt{thmbox} 仍然生效,盒子样式选项是用于设置定理盒子样式的名称,它需要 \pkg{tcolorbox} 的 \tn{tcbset} 接口命令或 \tn{tcbappstyle} 设定,默认为 \opt{tc-theorem}。
-% \item 默认使用 \opt{easy-theorem} 定理样式,可在最后一个选项使用 \opt{style} 更改样式。
-% \end{itemize}
-% \item[\tn{declaretheoremstyle}] 定义新的定理样式,\meta{键值列表} 中包括上述定理样式以及 \tn{declaretheorem} 的所有选项。
-% \end{optdesc}
-%
-% 下面简单列举定理命令的用法,预置定理的样式为 \opt{easy-theorem},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样:
-% \begin{ctexexam}
-% \DeclareTheorem{定理环境名}{中文标题}[style = easy-theorem]
-% \declaretheorem[style = easy-theorem,name = 定理名]{定理环境名}
-% \end{ctexexam}
-%
-% \tn{declaretheorem} 定义的定理环境需要手动增加盒子边框:
-% \begin{ctexexam}
-% \tcolorboxenvironment{定理环境名}{tc-theorem}
-% \end{ctexexam}
-%
-% 使用 \tn{tcbappstyle} 命令调整开启定理盒子时默认的样式,第一个参数为 \opt{theorem},关于命令的介绍在小节 \ref{subsec:box}。
-% \begin{ctexexam}
-% \tcbappstyle{theorem}{colback = GreenYellow}
-% \end{ctexexam}
-%
-% 定义一个新的定理样式可用于 \tn{declaretheorem} 的 \opt{style} 选项:
-% \begin{ctexexam}
-% \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5em]{定理样式名}
-% \end{ctexexam}
-%
-% \subsection{页面尺寸}
-% \label{subsec:page margins}
-% \begin{function}[EXP,added = 2021-01-13,updated = 2021-06-02]{headruleskip,footruleskip,left,top,hmargin,textwidth,includehead}
-% \begin{syntax}
-% headruleskip = <页眉线间距>
-% footruleskip = <页脚线间距>
-% left = <页面左边距>
-% top = <页面上边距>
-% hmargin = \{<左边距>,<右边距>\}
-% textwidth = <页面文本区宽度>
-% includehead = <true|(false)>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{geoset/...} \\
-% 预置的页面尺寸与 \cls{Word} 的默认值接近,\opt{geoset} 会将前两个之外的选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且 \meta{键值列表} 的选项与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
-% \changes{v1.21}{2021/01/13}{增加配置页面尺寸的选项。}
-% \end{function}
-%
-% \begin{ctexexam}
-% \geoset
-% {
-% headruleskip = 3pt,
-% top = 2.5cm,
-% bottom = 2.5cm,
-% left = 3.2cm,
-% right = 3.2cm,
-% ignoreall
-% }
-% \end{ctexexam}
-%
-% \subsection{页眉页脚}
-% \label{subsec:header and footer}
-% \begin{function}[EXP,added = 2021-01-13,updated = 2021-06-14]{head-foot,chap-mark,sec-mark,subsec-mark,chap-label,sec-label,subsec-label,headrule,footrule,footnoterule}
-% \begin{syntax}
-% head-foot = <页眉页脚中的内容>
-% chap-mark = <\tn{chaptermark} 标志命令的内容>
-% sec-mark = <\tn{sectionmark} 标志命令的内容>
-% subsec-mark = <\tn{subsectionmark} 标志命令的内容>
-% chap-label = <\tn{chaptermark} 标志命令的标签>
-% sec-label = <\tn{sectionmark} 标志命令的标签>
-% subsec-label = <\tn{subsectionmark} 标志命令的标签>
-% headrule = <页眉横线格式>
-% footrule = <页脚横线格式>
-% footnoterule = <脚注横线格式>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
-% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持。在 book 模式时使用章节页眉标志内容选项 \opt{chap-mark} 和 \opt{sec-mark},在 article 模式时使用 \opt{sec-mark} 和 \opt{subsec-mark} 选项,这与标准文档类的行为一致,标志内容中参数 \#1 代表当前章、节或小节的标题。也可以直接重新定义这些标志命令,但此时 \opt{style/uppercase} 选项失效,这时可以用例如 \tn{MakeUppercase} 命令来设置标志内容的大小写。
-% \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
-% \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-% \changes{v1.23}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 标志选项。}
-% \changes{v1.23}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
-% \changes{v1.24}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 article 模式生效。}
-% \end{function}
-%
-% 标签选项 \opt{chap-label}、\opt{sec-label} 和 \opt{subsec-label} 用于设置标志命令中的标签,包括标题编号和与标题内容之间的距离,它们比标志命令内容的选项更常用,可选参数是编号,必选参数是距离命令:
-% \begin{ctexexam}
-% \hdrset
-% {
-% chap-label = [\thechapter]{\hspace{1em}},
-% sec-mark = \CTEXifname{\CTEXthesection——}{}#1
-% }
-% \end{ctexexam}
-%
-% \opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个选项可以使用 \tn{hrule} \opt{width} \meta{长度} \opt{height} \meta{高度} 或下述 \tn{markrule} 命令来绘制横线,脚注线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
-%
-% \begin{function}[added = 2021-01-13,updated = 2021-07-25]{\easyhead,\easyfoot,\markboth,\markright,\markrule}
-% \begin{syntax}
-% \tn{easyhead}\oarg{位置}\marg{内容}
-% \tn{easyfoot}\oarg{位置}\marg{内容}
-% \tn{markboth}\marg{左页页眉内容}\marg{右页页眉内容}
-% \tn{markright}\marg{右页页眉内容}
-% \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
-% \end{syntax}
-% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共 12 个部分,可选参数中 \opt{E} 和 \opt{O} 代表偶数和奇数,\opt{L}、\opt{C} 和 \opt{R} 代表左、中和右部分。单面打印时,含有偶数的选项无效。
-% \changes{v1.26}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
-% \end{function}
-%
-% \tn{markboth} 和 \tn{markright} 这两个命令用于手动设置页眉内容,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉标志。上述标志命令内容的选项便是基于这两个命令。如果是单面排版,则 \meta{左页页眉内容} 无效。
-%
-% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 + 号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
-% \begin{ctexexam}
-% \hdrset
-% {
-% head-foot =
-% {
-% \easyhead[ER]{\leftmark}
-% \easyhead[OL]{\rightmark}
-% \easyhead[EL,OR]{\textbf{\thepage}}
-% },
-% headrule = \markrule(DarkViolet){0.5pt}[2pt+2pt]
-% }
-% \end{ctexexam}
-%
-% \subsubsection{脚注格式}
-% \begin{function}[EXP,added = 2021-05-12,updated = 2021-07-14]{fnmargin,fnparskip,fnparindent,footnotetype,fnmark-pos,fnmark-num,fnmark-num,fnmark-form,fntext-form,afterfnmark}
-% \begin{syntax}
-% fnmargin = <刚性长度|(0.75em)>
-% fnparskip = <弹性长度|(0ex)>
-% fnparindent = <刚性长度|(2em)>
-% footnotetype = <(hang)|default|bottom>
-% fnmark-pos = <normal|(super)>
-% fnmark-num = <(plain)|pifont|pifont*|pifont-sans|pifont-sans*>
-% fnmark-form = <格式代码>
-% fntext-form = <格式代码>
-% afterfnmark = <格式代码>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
-% \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。}
-% \changes{v1.27R}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[fnmargin] 脚注首段缩进距离,等于长度 \tn{footnoteindent} 的值。
-% \item[fnparskip] 脚注段落间距,等于长度 \tn{footparskip} 的值。
-% \item[fnparindent] 脚注段落缩进,等于长度 \tn{footparindent} 的值。
-% \item[footnotetype] 脚注的类型,悬挂缩进 \opt{hang} 是默认值,\opt{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\opt{bottom} 使脚注始终位于页面底端。这是个复合选项,\opt{bottom} 可以与前两种类型重复或复合使用:
-% \begin{ctexexam}
-% \hdrset{footnotetype = default,footnotetype = bottom}
-% \hdrset{footnotetype = {hang,bottom}}
-% \end{ctexexam}
-% \item[fnmark-pos] 设置脚注编号的位置,正常文本或是上标形式。
-% \item[fnmark-num] 脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。
-% \item[fnmark-form] 脚注标记的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注标记,一般配合 \opt{fnmark-num = plain} 使用。
-% \item[fntext-form] 脚注内容的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注内容。
-% \item[afterfnmark] 脚注标记后的代码,由于脚注标记处于水平盒子中,它一般用于设置标记与文本间的距离。
-% \end{optdesc}
-%
-% \subsection{目录样式}
-% \label{subsec:catalog style}
-% \begin{function}[EXP,added = 2021-01-13,updated = 2021-05-14]{format,format+,indent,rule,numsep}
-% \begin{syntax}
-% format = <目录标题格式>
-% format += <目录标题格式>
-% indent = <目录标题左边缩进>
-% rule = <目录引导线样式>
-% numsep = <编号后间距|(1em)>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{tocset/(level)/...} \\
-% \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{(level)} 代表 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection}、\opt{figure}、\opt{table} 和 \opt{lstlisting} 级别的目录,而使用 \opt{list} 级别可以统一设置图片、表格和代码目录的样式。
-% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
-% \changes{v1.24}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
-% \changes{v1.25}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
-% \end{function}
-%
-% \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令,带有加号的 \opt{format+} 选项用于在已有的格式命令后附加内容。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
-%
-% \begin{function}[added = 2021-01-13,updated = 2021-06-11]{\tocrule,\CTEXnumberline}
-% \begin{syntax}
-% \tn{tocrule}*\oarg{引导点间距|(0.7pc)}\parg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
-% \tn{CTEXnumberline}\marg{编号级别}
-% \end{syntax}
-% \tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用。带有星号的命令会使当前级别的目录引导线右边与页码连接而不是对齐。引导点间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体和距离等,最后一个格式命令可以带有一个参数,这个参数接受页码编号。
-% \end{function}
-%
-% \tn{CTEXnumberline} 命令用于在 \CTeX 文档类的 \opt{tocline} 选项中设置目录标签的编号,它已经被重新定义,使得目录编号后间距选项 \opt{numsep} 仍然有效。\meta{编号级别} 为 \opt{chapter} 和 \opt{section} 等,也可用参数 \#1 代替当前级别类型,标题名用参数 \#2 代替一般不变。
-% \begin{ctexexam}
-% \tocset
-% {
-% chapter =
-% {
-% format = \addvspace{8pt}\large,
-% indent = 1.5em,
-% rule = \tocrule[0.6pc](1.1){.}[\zihao{5}]
-% }
-% }
-% \end{ctexexam}
-%
-% \begin{function}[EXP,added = 2021-01-13,updated = 2021-05-14]{level/belowoffset,lolskip,tocline-fig,tocline-tab,tocline-lst,belowoffset,line-align,hang,numsep-all,indent-all,rule-all}
-% \begin{syntax}
-% belowoffset = <长度|(0pc)>
-% lolskip = <长度|(0.8pc)>
-% tocline-fig = <图片目录标签>
-% tocline-tab = <表格目录标签>
-% tocline-lst = <代码目录标签>
-% belowoffset = <长度|(-1pc)>
-% line-align = <(true)|false>
-% hang = <true|(false)>
-% numsep-all = <编号后间距|(1em)>
-% indent-all = <目录标题左边缩进>
-% rule-all = <目录引导线样式>
-% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{tocset/(level)/...} 或 \opt{tocset/...}
-% \changes{v1.24}{2021/04/05}{可以设置图、表和代码目录的标签。}
-% \changes{v1.24}{2021/04/06}{增加目录引导线右边对齐方式 \opt{line-align}。}
-% \changes{v1.24}{2021/04/19}{给目录增加 \opt{hang} 样式选项。}
-% \changes{v1.24}{2021/05/01}{给目录增加 \opt{format+} 和 \opt{rule-all} 选项。}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[lolskip] \opt{lolskip} 是代码目录中章之间的代码标题的距离,与 \CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认为 \opt{0.8pc},在 article 模式中此选项失效。
-% \item[belowoffset] \opt{belowoffset} 选项为主文档目录标题下方的间距补偿,一般为负值,用于抵消 \opt{format} 中额外的垂直间距。\opt{(level)} 中的 \opt{belowoffset} 与之意义类似,代表 \opt{figure}、\opt{table} 和 \opt{lstlisting} 三个级别,也可以使用 \opt{list} 统一设置,一般为正值。
-% \item[tocline] 目录标签整体使用 \opt{tocline} 设置,在图表标签的参数中 \#1 代表编号,代码标签中则是 \tn{thelstlisting} 代表编号,标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子:
-% \begin{ctexexam}
-% \tocset
-% {
-% hang = false,
-% tocline-fig = 图 #1\hspace{1em},
-% tocline-lst = 代码\thelstlisting\hspace{1em}
-% }
-% \end{ctexexam}
-% \item[line-align] \opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。
-% \item[hang] \opt{hang} 选项使目录标题为悬挂缩进形式,缩进距离为编号及其与标题间距的长度,但此时目录编号会失去超链接。
-% \item[numsep-all] 统一设置所有有编号的标题在目录中编号与标题的间距。
-% \item[indent-all] 统一设置所有级别的目录标题左边缩进。
-% \item[rule-all] 统一设置所有级别的目录引导线样式。
-% \end{optdesc}
-%
-% \section{常用环境}
-%
-% \subsection{公式}
-% \begin{function}[added = 2021-01-05]{equation,multline,gather,align}
-% \begin{syntax}
-% \tn{begin}\marg{环境名}
-% \ <行间公式>
-% \tn{end}\marg{环境名}
-% \end{syntax}
-% \pkg{amsmath} 宏包提供了一系列行间数学环境,它们可以排布各种对齐或不对齐的公式组。\env{multline} 环境用于一行无法放下的长公式,\env{gather} 环境用于每行居中的公式组,\env{align} 环境用于多列对齐的公式组。
-% \end{function}
-%
-% \subsection{表格}
-% \begin{function}[added = 2021-05-17]{tblr,tabularx,tabular}
-% \begin{syntax}
-% \tn{begin}\marg{环境名}\marg{环境选项}
-% \ <表格内容>
-% \tn{end}\marg{环境名}
-% \end{syntax}
-% \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法:
-% \changes{v1.25}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
-% \end{function}
-%
-% \begin{ctexexam}
-% \begin{tblr}
-% {
-% colspec = {X[2,l]XX[LimeGreen]X},
-% rowspec = {Q[t]Q[m]Q[b,Magenta]Q[t]Q[m]Q[b]},
-% hline{1,6} = {1pt,solid},
-% hline{3-5} = {LightBlue,dashed},
-% vline{1,5} = {3-4}{dotted},
-% rows = {1cm,abovesep = 2pt}
-% }
-% Alpha & Beta & Gamma & Delta \\
-% Epsilon & Zeta & Eta & Theta \\
-% Iota & Kappa & \SetCell[r=2]{h,c,Cyan}Lambda & Mu \\
-% Nu & Xi & Omicron & Pi \\
-% Rho & Sigma & Tau & Upsilon
-% \end{tblr}
-% \end{ctexexam}
-%
-% \subsection{列表}
-% \begin{function}[added = 2021-01-05,updated = 2021-04-08]{enumerate,enumerate*,itemize,itemize*,description,description*}
-% \begin{syntax}
-% \tn{begin}\marg{环境名}\oarg{键值列表}
-% \ \tn{item} <列表内容>
-% \tn{end}\marg{环境名}
-% \end{syntax}
-% \pkg{enumitem} 宏包为系统预置的三种列表环境即排序列表 \env{enumerate}、常规列表 \env{itemize} 和 主题列表 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置三种列表格式,或者直接使用可选参数的 \meta{键值列表},具体选项见 \pkg{enumitem} 宏包文档。
-%
-% 已为三种列表预置了三个级别,同种列表或不同种列表间的不同级别可相互嵌套,可以使用短编号的形式,带有星号的环境为行内列表。默认列表标签与标准文档类一致,下面举几个更改列表标签以及其它格式的例子:
-% \changes{v1.24}{2021/04/08}{重新优化列表环境的配置。}
-% \end{function}
-%
-% \begin{ctexexam}
-% \setlist{nosep} % 取消所有列表额外的垂直间距
-% \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
-% \begin{itemize}[label = \textbullet]
-% \begin{description}[font = \sffamily\bfseries,style = nextline]
-% \end{ctexexam}
-%
-% \subsection{定理}
-% \label{subsec:theorem}
-% \begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
-% \begin{syntax}
-% \tn{begin}\marg{环境名}\oarg{定理题注}
-% \ <定理内容>
-% \tn{end}\marg{环境名}
-% \end{syntax}
-% 这些是预置的定理环境,可使用选项 \opt{thmset/thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改边框样式见小节 \ref{subsec:theorem of style}。环境名对应的定理标题名如下:
-% \begin{center}
-% \begin{tabular}{*{8}{c}}
-% \toprule
-% theorem & definition & lemma & corollary & proposition & example & remark & proof \\
-% 定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明 \\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-% \end{function}
-%
-% \subsection{悬挂缩进}
-% \begin{function}[added = 2021-07-11]{\hangpara,hangparas}
-% \begin{syntax}
-% \tn{hangpara}\marg{缩进长度}\marg{缩进开始行数}
-% \tn{begin}\{hangparas\}\marg{缩进长度}\marg{缩进开始行数}
-% \ <段落内容>
-% \tn{end}\{hangparas\}
-% \end{syntax}
-% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27R}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
-% \end{function}
-%
-% \subsection{代码}
-% \begin{function}[added = 2021-01-05]{\lstinline,lstlisting,lstlistlistingname,lstlistingname}
-% \begin{syntax}
-% \tn{lstinline}\oarg{键值列表}\marg{行内代码}
-% \tn{begin}\{lstlisting\}\oarg{键值列表}
-% \ <行间代码>
-% \tn{end}\{lstlisting\}
-% \end{syntax}
-% 加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,预置的代码样式名为 \opt{easy-listings}。\opt{lstlistlistingname} 和 \opt{lstlistingname} 分别是代码目录名与代码环境标题名,与 \CTeX 使用手册标题汉化一节类似,可使用 \tn{ctexset} 直接修改。
-% \end{function}
-%
-% \subsection{习题}
-% \label{subsec:exercise}
-% \begin{function}[added = 2021-01-05,updated = 2021-07-25]{exercise}
-% \begin{syntax}
-% \tn{begin}\{exercise\}*+\oarg{键值列表1}\parg{键值列表2}\oarg{键值列表3}
-% \ \tn{item} <习题内容>
-% \tn{end}\{exercise\}
-% \end{syntax}
-% 习题环境的标题使用 \tn{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 + 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \opt{label} 选项失效。
-% \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
-% \end{function}
-%
-% \meta{键值列表2} 为 \pkg{tcolorbox} 的盒子样式选项,例如 \opt{boxsep} 和 \opt{fontupper} 等,也可以使用下述 \opt{tcolorbox} 选项。\meta{键值列表3} 的选项与 \pkg{enumitem} 的排序列表相同,也可以使用下述 \opt{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \opt{number} 选项代替。\meta{键值列表1} 也用于设置标题样式,包含的选项如下:
-% \begin{function}{color,title,number,numsep,tcolorbox,enumitem,label}
-% \begin{syntax}
-% color = <标题背景颜色名|(DeepSkyBlue)>
-% title = <环境标题>
-% number = <习题编号格式|(1.)>
-% numsep = <编号与标题的间距|(0.5em)>
-% tcolorbox = \{<键值列表2>\}
-% enumitem = \{<键值列表3>\}
-% label = <标签内容>
-% \end{syntax}
-% \opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。
-% \end{function}
-%
-% \begin{function}{\setexercise,\setexerlist,\exerprologue,\tcphantomifname}
-% \begin{syntax}
-% \tn{setexercise}\marg{键值列表1}
-% \tn{setexerlist}\marg{键值列表3}
-% \tn{exerprologue}\marg{序言内容}
-% \tn{tcphantomifname}\marg{编号代码}\marg{不编号代码}
-% \end{syntax}
-% \tn{setexercise} 命令可以全局设置上述习题综合选项 \meta{键值列表1} 的默认值。\tn{setexerlist} 命令用于设置习题条目选项 \meta{键值列表3} 的值。\tn{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。
-% \end{function}
-%
-% 在这里可以使用 \tn{tcbappstyle} 命令设置标题选项 \meta{键值列表2} 的值,第一个参数为 \opt{exercise}。\tn{tcphantomifname} 根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \tn{addcontentsline} 命令将习题标题加入目录。
-% \begin{ctexexam}
-% \tcphantomifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{}
-% \tcbappstyle{exercise}{boxsep = 5pt}
-% \exerprologue{习题前的一段文本}
-% \begin{exercise}+[color = LightSkyBlue](after skip = 2pc)[itemsep = 1ex]
-% \item 第一题
-% \item 第二题
-% \end{exercise}
-% \end{ctexexam}
-%
-% \subsection{盒子}
-% \label{subsec:box}
-% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。
-%
-% \begin{function}[added = 2021-07-25]{\tcbappstyle}
-% \begin{syntax}
-% \tn{tcbappstyle*}\marg{风格名称}\marg{键值列表}
-% \end{syntax}
-% 这是一个 \pkg{tcolorbox} 宏包盒子风格定义命令,带有星号的命令可以\textbf{新建或重置}一个名为 \opt{tc-}\meta{风格名称} 的盒子风格,否则是修改\textbf{已存在}的风格。这个命令可以调整以下即将介绍的预置盒子风格,对于预置盒子来说参数 \meta{风格名称} 即为它们对应的环境或命令名。
-% \end{function}
-%
-% \begin{ctexexam}
-% \tcbappstyle*{mytcb} % 新建一个盒子风格tc-mytcb
-% {
-% colback = Snow,colframe = LimeGreen,coltext = Coral,
-% fontupper = \bfseries,arc = 6pt,
-% boxrule = 5pt,boxsep = 5pt,
-% borderline = {2pt}{2pt}{white}
-% }
-% \newtcolorbox{mytcbox}[1][]{enhanced,tc-mytcb,title = #1}
-% \begin{tcolorbox}[tc-mytcb,enhanced]
-% 盒子内容1
-% \end{tcolorbox}
-% \begin{mytcbox}[盒子标题]
-% 盒子内容2
-% \end{mytcbox}
-% \end{ctexexam}
-%
-% \subsubsection{摘要盒子}
-% \begin{function}[added = 2021-01-05,updated = 2021-05-02]{\setoutlinelist,outline}
-% \begin{syntax}
-% \tn{setoutlinelist}\marg{键值列表1}
-% \tn{begin}\{outline\}\oarg{键值列表1}\parg{标题名称}\oarg{键值列表2}
-% \ \tn{item} <摘要内容>
-% \tn{end}\{outline\}
-% \end{syntax}
-% 摘要盒子 \env{outline} 可用于章前摘要,它的标题是可选参数,默认标题是摘要。\meta{键值列表1} 与 \pkg{enumitem} 宏包中列表配置选项相同,可以设置摘要条目的各种距离,使用 \tn{setoutlinelist} 命令对它进行全局设置。\meta{键值列表2} 是摘要盒子样式选项,可以使用 \tn{tcbappstyle} 命令对它进行全局设置,命令第一个参数为 \opt{outline}。
-% \end{function}
-%
-% \begin{ctexexam}
-% \tcbappstyle{outline}{arc = 6pt}
-% \begin{outline}[leftmargin = *](摘要标题)
-% \item 摘要内容1
-% \item 摘要内容2
-% \end{outline}
-% \end{ctexexam}
-%
-% \subsubsection{段落盒子}
-% \begin{function}[added = 2021-01-05,updated = 2021-04-19]{easybox}
-% \begin{syntax}
-% \tn{begin}\{easybox\}*\oarg{颜色名|(Khaki)}\parg{段落标题}\oarg{配置选项}
-% \ <盒子内容>
-% \tn{end}\{easybox\}
-% \end{syntax}
-% 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。如果 \meta{配置选项} 较长且希望在原有基础上更改为全局固定的样式,可以使用 \tn{tcbappstyle} 命令设置,命令第一个参数为 \opt{easybox}。
-% \end{function}
-%
-% \begin{ctexexam}
-% \begin{easybox}*[DarkCyan](段落标题)
-% 上半盒子内容
-% \tcblower % 盒子上下部分分界线
-% 下半盒子内容
-% \end{easybox}
-% \end{ctexexam}
-%
-% \begin{function}[added = 2021-04-19]{ebparbox}
-% \begin{syntax}
-% \tn{begin}\{ebparbox\}*\oarg{颜色名|(DarkSlateBlue)}\parg{段落标题}\oarg{配置选项}
-% \ <盒子内容>
-% \tn{end}\{ebparbox\}
-% \end{syntax}
-% 环境 \env{ebparbox} 用法与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。
-% \changes{v1.24}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。}
-% \end{function}
-%
-% \subsubsection{行内盒子}
-% \begin{function}[added = 2021-03-13,updated = 2021-07-13]{\eblink,\ebemph,\ebfbox}
-% \begin{syntax}
-% \tn{eblink}\oarg{颜色名|(Aqua)}\marg{内容}\oarg{配置选项}
-% \tn{ebemph}\oarg{颜色名|(DarkSeaGreen)}\marg{内容}\oarg{配置选项}
-% \tn{ebfbox}\oarg{颜色名|(Lime)}\marg{内容}\oarg{配置选项}
-% \end{syntax}
-% 使用 \pkg{tcolorbox} 预置了三个参数选项相同的行内盒子,它们均为抄录命令。盒子 \opt{eblink} 具有类似超链接边框的效果,盒子 \opt{ebemph} 具有模糊边缘类似高亮的效果,盒子 \opt{ebfbox} 则有直角边缘并带有上下框线。
-% \end{function}
-%
-% \section{更多用法}
-%
-% \subsection{物理量}
-% \begin{function}[added = 2021-01-05,updated = 2021-05-18]{\num,\unit,\qty,\qtyrange}
-% \begin{syntax}
-% \tn{num}\oarg{键值列表}\marg{数字}
-% \tn{unit}\oarg{键值列表}\marg{单位}
-% \tn{qty}\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}
-% \tn{qtyrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
-% \end{syntax}
-% \pkg{siunitx} 宏包的 \tn{num} 命令可以输出以科学计数法表示的数值,单位格式化命令 \tn{unit} 包含文字项目(例如字母或数字)时,使用 . 和 \~{} 放置在单元乘积中间,并使用 \_ 和 \^{} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。而 \tn{qty} 命令可用来输出带有单位的量,\tn{qtyrange} 可以输出带有范围和单位的量。
-% \changes{v1.25}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
-% \end{function}
-%
-% \begin{ctexexam}
-% \numproduct{-21x3e5}
-% \unit{mL~min^{-1}}
-% \qty{5}{\mole}
-% \qtyrange[unit-color = green]{1.5}{4}{kg}
-% \end{ctexexam}
-%
-% \subsection{计数器}
-% \begin{function}[added = 2021-06-30]{\newcounter,\UseCounter}
-% \begin{syntax}
-% \tn{newcounter}\marg{计数器}\oarg{父计数器}
-% \tn{UseCounter*}\oarg{父计数器}\parg{编号|(arabic)}\marg{计数器}\marg{内容}\oarg{分隔符|(.)}\parg{数值}
-% \end{syntax}
-% \tn{newcounter} 是 \LaTeX 自带的创建计数器命令,\tn{UseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \tn{the}\meta{父计数器}\meta{分隔符}\tn{the}\meta{计数器}\meta{内容} 输出当前内容。
-% \changes{v1.26}{2021/06/30}{增加计数器使用命令 \tn{UseCounter}。}
-% \end{function}
-%
-% 需要注意的是 \tn{UseCounter} 仅具有\textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。
-%
-% 在一定的场合下可能用到 \tn{UseCounter} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器,使用 \tn{labelformat} 设置计数器的引用标签需添加 eb@:
-% \begin{ctexexam}
-% \labelformat{eb@theorem}{定理 #1}
-% \newcommand{\theoremhead}[1]
-% {定理 \UseCounter[chapter]{theorem}{\hspace{1em}#1}}
-% \theoremhead{定理标题}\label{thm:theorem}
-% \end{ctexexam}
-%
-% \subsection{图表题注}
-% \begin{function}[added = 2021-07-25]{\caption,\captionof,\bicaption}
-% \begin{syntax}
-% \tn{caption*}\oarg{目录标题}\marg{标题}
-% \tn{captionof*}\marg{题注类型}\oarg{目录标题}\marg{标题}
-% \tn{bicaption*}\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2}
-% \end{syntax}
-% 题注命令 \tn{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env{figure} 和 \env{table} 中使用,在浮动环境外可以使用 \tn{captionof} 命令,第一个参数指定题注类型。\tn{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg{bicaption} 宏包,具体用法见说明文档。
-% \end{function}
-%
-% \subsection{化学式}
-% \begin{function}[added = 2021-01-05]{\ch,\chemfig}
-% \begin{syntax}
-% \tn{ch}\oarg{键值列表}\marg{化学式}
-% \tn{chemfig}\oarg{键值列表}\marg{化学式}
-% \end{syntax}
-% 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐在导言区载入 \pkg{chemfig} 宏包,使用 \tn{chemfig} 命令完成。
-% \end{function}
-%
-% \subsection{公式符号对照}
-% \begin{function}[added = 2021-07-22]{\seteqcomp,\seteqcomplist,\symb,eqcomp}
-% \begin{syntax}
-% \tn{seteqcomp}\marg{键值列表1}
-% \tn{seteqcomplist}\marg{键值列表2}
-% \tn{symb*}\marg{符号}\oarg{引导符}
-% \tn{begin}\{eqcomp\}\oarg{键值列表1}\parg{键值列表2}
-% \ \tn{symb}\marg{符号}\oarg{引导符}<说明文字>
-% \tn{end}\{eqcomp\}
-% \end{syntax}
-% 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表的 \meta{键值列表2} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。\meta{键值列表1} 也可以使用 \tn{seteqcomp} 全局设置,它的选项如下:
-% \changes{v1.27R}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。}
-% \end{function}
-%
-% \begin{function}{width,delim,space,item-align,delim-align,enumitem,intro,font,mode}
-% \begin{syntax}
-% width = <符号宽度|(2em)>
-% delim = <引导符|(——)>
-% space = <符号间隙|(0.25em)>
-% item-align = <l|c|(r)>
-% delim-align = <l|(c)|r>
-% enumitem = \{<键值列表2>\}
-% intro = <首行文字>
-% font = <符号字体>
-% mode = <(math)|text>
-% \end{syntax}
-% \end{function}
-%
-% \begin{optdesc}
-% \item[width] 设置适当的符号宽度可以防止文字重叠和边界溢出等问题。
-% \item[delim] 符号对照的引导符,\tn{symb} 的 \meta{引导符} 和对齐方式是基于这个符号的宽度。
-% \item[space] 符号间隙为引导符两侧与符号和说明文字间的距离。
-% \item[item-align] 符号的对齐方式,分为左(\opt{l})、中(\opt{c})和右(\opt{r})三种对齐方式。
-% \item[delim-align] 引导符的对齐方式,分为左(\opt{l})、中(\opt{c})和右(\opt{r})三种对齐方式。
-% \item[enumitem] 可以使用选项 \opt{enumitem} 或命令 \tn{seteqcomplist} 调整对照列表的水平垂直间距。
-% \item[intro] 符号对照的说明文字,应当为简短的几个字,只显示在第一行,其后为悬挂缩进的对照列表。
-% \item[font] 符号的字体,数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。
-% \item[mode] 符号字体模式,可以为数学字体或者文本字体。
-% \end{optdesc}
-%
-% \subsection{引用}
-% \begin{function}[added = 2021-01-05,updated = 2021-07-15]{\ref,\footref,\labelformat}
-% \begin{syntax}
-% \tn{ref}\marg{标签}
-% \tn{footref}\marg{脚注标签}
-% \tn{labelformat}\marg{计数器}\marg{标签引用格式}
-% \end{syntax}
-% 使用 \tn{ref} 命令引用 \tn{label} 设置的标签,将会检测临近计数器并添加相应的前缀,比如图表、章节标题和定理等。\tn{footref} 对自动编号的脚注进行引用,为上标形式与脚注标记一致。\tn{labelformat} 可以设置标签引用格式,第二个参数中 \#1 代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。
-% \changes{v1.24}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
-% \end{function}
-%
-% \subsubsection{索引}
-% \begin{function}[added = 2021-05-01,updated = 2021-07-11]{\makeindex,\index,\printindex}
-% \begin{syntax}
-% \tn{makeindex}\oarg{键值列表}
-% \tn{index}\oarg{索引名}\marg{标签}
-% \tn{printindex*+}\oarg{键值列表}\parg{索引名}
-% \end{syntax}
-% \pkg{imakeidx} 宏包提供了索引的功能,重新定义了它的 \tn{printindex} 命令用于生成索引目录,\meta{键值列表} 及选项与节 \ref{sec:document command} 相同,但是原本接口命令 \tn{indexsetup} 的部分选项失效。使用 \tn{makeindex} 命令开启索引收集,输出不同的索引目录时使用 \meta{索引名} 选项。
-% \changes{v1.24}{2021/05/01}{重新定义 \tn{printindex} 命令与文档适配。}
-% \end{function}
-%
-% \subsubsection{自定义脚注}
-% \begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
-% \begin{syntax}
-% \tn{Footnote}\marg{标记}\marg{脚注文本}
-% \tn{Footnotetext}\marg{标记}\marg{脚注文本}
-% \tn{Footnotemark}\marg{标记}
-% \end{syntax}
-% 这些是自定义 \meta{标记} 且不影响正常编号的脚注命令,用法与它们对应首字母小写的命令类似。如果 \meta{标记} 为空,那么将会使用上一个脚注标记。
-% \end{function}
-%
-% \begin{ctexexam}
-% \Footnote{*}{这是可以自定义标记的脚注。}
-% \end{ctexexam}
-%
-% \subsubsection{边注}
-% \begin{function}[added = 2021-01-05]{\marginnote}
-% \begin{syntax}
-% \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
-% \end{syntax}
-% 命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
-% \end{function}
-%
-% \newcommand{\passto}[1]{\ttfamily[#1]}
-% \section{依赖的宏包}
-% 以下为 \pkg{easybase} 直接调用的关键宏包,方括号内为宏包已使用的选项。紫色的宏包表示截至当前在 \TeX~Live 2021 中存在更新,旧版本并不影响使用。带有 \ding{81} 符号的宏包并未载入它们,仅做了一些预配置,可在导言区手动载入以实现相关的功能。
-% \begin{description}[font = \normalfont\sffamily]
-% \item[amsmath] 提供 \LaTeX 中的数学功能。
-% \item[\color{violet}ctex\passto{heading}] 提供中文排版的通用框架。
-% \item[chemformula] 提供了对化学式进行排版的命令。
-% \item[caption] 在浮动环境中自定义题注。
-% \item[enumitem\passto{shortlabels,inline}] 提供列表环境的布局控制。
-% \item[fancyhdr] 广泛控制页面的页眉和页脚。
-% \item[graphicx] 增强了对图形插入的支持。
-% \item[geometry] 灵活完整的页面尺寸设置。
-% \item[hyperref] 处理交叉引用命令以及在文档中生成超文本链接。
-% \item[listings] 可以在 \LaTeX 中排版程序/编程代码。
-% \item[marginnote] 增强了边注输出的功能。
-% \item[multicol] 混合单栏和多栏排版。
-% \item[\color{violet}newtxmath\passto{upint}] 提供多种数学字体。
-% \item[pdfpages] 在 \LaTeX 中插入 pdf 文档。
-% \item[\color{violet}spbmark\passto{ctex}] 定制上标和下标的格式。
-% \item[\color{violet}siunitx] 全面的国际标准单位支持。
-% \item[setspace] 提供对文档中行间距的支持。
-% \item[\color{violet}tabularray] 完全分离表格的内容和样式,并且可以通过键值方式完全设置表格。
-% \item[thmtools] 用于通常需要的排版定理支持。
-% \item[titletoc] 设置目录中的标题格式。
-% \item[ulem\passto{normalem}] 提供可断行多样式的下划线命令。
-% \item[xcolor\passto{svgnames}] 提供任意颜色的设定与混合。
-% \item[\ding{81} bicaption\passto{list = off}] 提供图表的双语题注。
-% \item[\ding{81} imakeidx] 可以让文档同时生成和排版一个或多个索引。
-% \item[\ding{81} mathtools] 增强 \pkg{amsmath} 的数学功能。
-% \item[\color{violet}\ding{81} tcolorbox\passto{many}] 为带有标题线的彩色和带框文本框提供了一个环境。
-% \item[\ding{81} unicode-math] 处理使用 unicode 编码的数学字体。
-% \end{description}
-%
-% \newcommand{\urlprefix}{\newline\hspace*{\fill}}
-% \let\OldUrl\url
-% \renewcommand{\url}[2][]{{\small\textit{#1}~\OldUrl{#2}}}
-% \begin{thebibliography}{99}
-% \bibitem{CTeX}
-% \textsc{CTEX.ORG}.
-% \newblock \textit{\CTeX 宏集手册} [EB/OL].
-% \newblock version 2.5.7,
-% \newblock (2021-06-20)
-% \urlprefix\url{https://ctan.org/pkg/ctex}
-%
-% \bibitem{fduthesis}
-% 曾祥东.
-% \newblock \textit{\pkg{fduthesis}: 复旦大学论文模板} [EB/OL].
-% \newblock version 0.7e,
-% \newblock (2020-08-30)
-% \urlprefix\url{https://github.com/stone-zeng/fduthesis}
-%
-% \bibitem{source3}
-% \textsc{The \LaTeX~Project Team}.
-% \newblock \textit{The \hologo{LaTeX3} Interfaces} [CP/OL].
-% \newblock (2020-10-27)
-% \urlprefix\url{https://ctan.org/pkg/l3kernel}
-%
-% \bibitem{source2e}
-% \textsc{The \LaTeX~Project Team}.
-% \newblock \textit{The \hologo{LaTeX2e} Sources} [CP/OL].
-% \newblock (2020-10-01)
-% \urlprefix\url{https://ctan.org/pkg/source2e}
-%
-% \bibitem{胡伟2017latex2e}
-% 胡伟.
-% \newblock \textit{\hologo{LaTeX2e} 文类和宏包学习手册} [M].
-% \newblock 北京: 清华大学出版社, 2017
-%
-% \bibitem{刘海洋2013latex入门}
-% 刘海洋.
-% \newblock \textit{\LaTeX 入门} [M].
-% \newblock 北京: 电子工业出版社, 2013
-%
-% \bibitem{footmisc}
-% Robin Fairbairns.
-% \newblock \textit{The \pkg{footmisc} package} [EB/OL].
-% \newblock version 5.5b,
-% \newblock (2011-06-06)
-% \urlprefix\url{https://ctan.org/pkg/footmisc}
-%
-% \bibitem{thmtools}
-% Dr. Ulrich M. Schwarz, Yukai Chou.
-% \newblock \textit{The \pkg{thmtools} package} [EB/OL].
-% \newblock version 0.72,
-% \newblock (2020-08-01)
-% \urlprefix\url{https://ctan.org/pkg/thmtools}
-%
-% \bibitem{fancyhdr}
-% Pieter van Oostrum.
-% \newblock \textit{The \pkg{fancyhdr} package} [EB/OL].
-% \newblock version 4.0.1,
-% \newblock (2020-01-28)
-% \urlprefix\url{https://ctan.org/pkg/fancyhdr}
-%
-% \bibitem{caption}
-% Axel Sommerfeldt.
-% \newblock \textit{The \pkg{caption} package} [EB/OL].
-% \newblock version 3.5,
-% \newblock (2020-08-30)
-% \urlprefix\url{https://ctan.org/pkg/caption}
-%
-% \bibitem{titletoc}
-% Javier Bezos.
-% \newblock \textit{The \pkg{titletoc} package} [EB/OL].
-% \newblock version 2.13,
-% \newblock (2019-10-16)
-% \urlprefix\url{https://ctan.org/pkg/titletoc}
-%
-% \bibitem{tcolorbox}
-% Thomas F. Sturm.
-% \newblock \textit{The \pkg{tcolorbox} package} [EB/OL].
-% \newblock version 4.51,
-% \newblock (2021-06-14)
-% \urlprefix\url{https://ctan.org/pkg/tcolorbox}
-%
-% \bibitem{enumitem}
-% Javier Bezos.
-% \newblock \textit{The \pkg{enumitem} package} [EB/OL].
-% \newblock version 3.9,
-% \newblock (2019-06-20)
-% \urlprefix\url{https://ctan.org/pkg/enumitem}
-%
-% \bibitem{biblatex}
-% Philipp Lehman, Philip Kime.
-% \newblock \textit{The \pkg{biblatex} package} [EB/OL].
-% \newblock version 3.16,
-% \newblock (2020-12-31)
-% \urlprefix\url{https://ctan.org/pkg/biblatex}
-%
-% \bibitem{eqexpl}
-% Konstantin Morenko.
-% \newblock \textit{The \pkg{eqexpl} package} [EB/OL].
-% \newblock version 1.1,
-% \newblock (2019-07-01)
-% \urlprefix\url{https://ctan.org/pkg/eqexpl}
-%
-% \bibitem{xmuthesis}
-% Camuse Cao.
-% \newblock \textit{\pkg{xmuthesis}: 厦门大学论文模板} [EB/OL].
-% \newblock version 0.4.1,
-% \newblock (2020-10-09)
-% \urlprefix\url{https://github.com/CamuseCao/XMU-thesis}
-%
-% \bibitem{whuthesis}
-% WHUTUG.
-% \newblock \textit{\pkg{whuthesis}: 武汉大学论文模板} [EB/OL].
-% \newblock version 0.6d,
-% \newblock (2021-05-20)
-% \urlprefix\url{https://github.com/whutug/whu-thesis}
-% \end{thebibliography}
-%
-% \StopEventually{}
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/26}{1.27R}
+\ProvidesExplClass{easybook}{2021/07/30}{1.28}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1648,7 +292,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/26}{1.27R}
+\ProvidesExplPackage{easybase}{2021/07/30}{1.28}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1985,7 +629,7 @@
\cs_gset_eq:NN \easyhead \fancyhead
\cs_gset_eq:NN \easyfoot \fancyfoot
\NewDocumentCommand{\markrule}
- {O{\textwidth}D(){ctex@frame}m>{\SplitArgument{1}{+}}O{}}
+ {O{\textwidth}D(){ctex@frame}m>{\SplitArgument{1}{!}}O{}}
{\eb_draw_markrule:nnnnn {#1} {#2} {#3} #4}
\cs_new_protected:Npn \eb_draw_markrule:nnnnn #1#2#3#4#5
{
@@ -2033,7 +677,7 @@
footrule .initial:n = { },
footnoterule .tl_gset:N = \footnoterule,
footnoterule .initial:n =
- { \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[+2.6pt] }
+ { \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[!2.6pt] }
}
\cs_set_eq:NN \eb_mark_uppercase:n \text_uppercase:n
@@ -3398,7 +2042,7 @@
\lstdefinestyle{easy-listings}
{
language = [LaTeX]TeX,
- texcsstyle = {*},
+ texcsstyle = *\color{ctex@verb}\bfseries,
basicstyle =
{
\ttfamily
@@ -3612,7 +2256,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/26}{1.27R}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/30}{1.28}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
@@ -3795,5 +2439,4 @@
{fuzzy~halo = 2pt~with~#1,tc-ebemph,#3}{#2}
\DeclareTotalTCBox{\eblink}{O{Aqua}vO{}}
{colback = #1,colframe = #1,tc-eblink,#3}{#2}
-%</tcolorbox>
-\endinput \ No newline at end of file
+%</tcolorbox> \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/easybook.ins b/macros/latex/contrib/easybook/easybook.ins
index 496edcba6c..6b343c15fe 100644
--- a/macros/latex/contrib/easybook/easybook.ins
+++ b/macros/latex/contrib/easybook/easybook.ins
@@ -5,7 +5,7 @@
% conditions of the CC-BY 4.0 License.
% The latest version of this license is in
% https://creativecommons.org/licenses/by/4.0/legalcode
-\input ctxdocstrip
+\input l3docstrip
\keepsilent
\askforoverwritefalse
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 378b887f07..1da8d293a7 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
new file mode 100644
index 0000000000..1f85ee17da
--- /dev/null
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -0,0 +1,1144 @@
+\documentclass[load-preamble+]{cnltx-doc}
+
+\usepackage[fontset = fandol]{ctex}
+\usepackage
+ {
+ hologo,pifont,booktabs,enumitem,colortbl,
+ fancyvrb-ex,geometry,indentfirst
+ }
+\setcnltx
+ {
+ name = easybook,
+ title = EASYBOOK 使用手册,
+ version = v1.28,
+ date = 2021/07/30,
+ authors = 瞿毅,
+ info = 排版简体中文学位论文和书籍,
+ email = quee123@foxmail.com,
+ url = https://gitee.com/texl3/easybook,
+ abstract =
+ {
+ \cls*{easybook} 是基于 \cls*{ctexbook} 书籍文档类创建以极简为风格的模板,同时兼具 \cls*{book} 与 \cls*{article} 文档类的用途,它的基础宏包 \pkg*{easybase} 还可以搭配 C\TeX 和标准文档类使用。\cls*{easybook} 考虑了一些细节并载入一些几乎必备的宏包进行包装和改进,提供多个命令和接口可以使用户简便地进行设置。它适用于排版中英文学位论文、学术书籍或者是笔记。
+ },
+ code-only,
+ arg-format = \normalfont\small\itshape,
+ abstract-format = \small,
+ color-scheme = blue,
+ title-format = \huge\sffamily,
+ add-frame-options = {innerleftmargin = 2em},
+ listings-options = {numbers = none}
+ }
+\KOMAoptions{headsepline = 0.6pt}
+\setfootnoterule[0.6pt]{0.4\columnwidth}
+\addtokomafont{headsepline}{\color{cnltxblue}}
+\addtokomafont{footnoterule}{\color{cnltxblue}}
+\addtokomafont{section}{\normalfont\sffamily}
+\addtokomafont{subsection}{\normalfont\sffamily}
+\addtokomafont{subsubsection}{\normalfont\sffamily}
+\DeclareTOCStyleEntry[entryformat = \sffamily]{default}{section}
+\geometry{margin = 1in,marginparwidth = 0.65in}
+\setlist{nosep,labelindent = \parindent,leftmargin = *,labelsep = 0.5em}
+\setlist[itemize,1]{label = \small\color{cnltxblue}\textbullet}
+\newnote*{\change}[2][]{Introduced in #2\newline\ifblank{#1}{}{Changed in #1}}
+\arrayrulecolor{cnltxblue}
+\setcounter{tocdepth}{2}
+
+\ExplSyntaxOn\makeatletter
+\NewDocumentCommand{\passto}{smm}
+ {\IfBooleanF{#1}{\color{cnltxblue}}#3\ifblank{#2}{}{\ttfamily[#2]}}
+\newcommand{\splitmeta}[2][\texttt{,}]
+ {
+ \clist_map_inline:nn {#2}
+ { \clist_put_right:Nn \l_tmpa_clist { \meta{##1} } }
+ \clist_use:Nn \l_tmpa_clist {#1}
+ }
+\newcommand{\newsplitarg}[4][\splitmeta]
+ {
+ \newcommand{#2}[1]
+ {\code{\textcolor{argument}{#3\textnormal{#1{##1}}#4}}}
+ }
+\NewDocumentCommand{\kvsplit}{st-mm}
+ {
+ \item\code
+ {
+ \option{#3}\cnltx@isvalue
+ \IfBooleanTF{#2}{#4}{\IfBooleanTF{#1}{\Marg{#4}}{\splitmarg{#4}}}
+ }
+ }
+\newsplitarg{\splitoarg}{[}{]}
+\newsplitarg{\splitdarg}{(}{)}
+\newsplitarg{\splitmarg}{\{}{\}}
+\newcommand{\spemmeta}{\splitmeta[\texttt{!}]}
+\newsplitarg[\spemmeta]{\spemcoarg}{[}{]}
+\renewcommand{\cnltx@package@abstract@width}{0.85\linewidth}
+\newcommand{\noitemsep}{\setlength{\itemsep}{0ex}}
+\renewcommand{\cmltx@list@setup}
+ {
+ \setlength{\leftmargin}{0em}
+ \setlength{\labelwidth}{2em}
+ \setlength{\itemindent}{-1em}
+ \setlength{\labelsep}{0em}
+ \setlength{\topsep}{0.75ex}
+ \setlength{\itemsep}{0.75ex}
+ \setlength{\listparindent}{2em}
+ \setlength{\partopsep}{0ex}
+ \setlength{\parsep}{0ex}
+ }
+\newcounter{ctexexam}
+\define@key{FV}{labelref}{\def\ctexexamlabelref{\label{#1}}}
+\let\ctexexamlabelref\empty
+\DefineVerbatimEnvironment{frameverb}{Verbatim}
+ {
+ baselinestretch = 1.2,gobble = 2,fontsize = \small,
+ rulecolor = \color{cnltxblue},framerule = 0.6pt,
+ frame = single,framesep = 10pt,
+ listparameters =
+ {
+ \setlength{\topsep}{\bigskipamount}
+ \appto\FV@EndList{\nointerlineskip}
+ }
+ }
+\DefineVerbatimEnvironment{ctexexam}{Verbatim}
+ {
+ baselinestretch = 1.2,gobble = 2,fontsize = \small,
+ rulecolor = \color{cnltxblue},framerule = 0.6pt,
+ frame = single,framesep = 10pt,
+ label = \rule{0pt}{12pt}\textnormal{\bfseries 例 \arabic{ctexexam}},
+ listparameters =
+ {
+ \setlength{\topsep}{\bigskipamount}
+ \refstepcounter{ctexexam}\ctexexamlabelref
+ \appto\FV@EndList{\nointerlineskip}
+ }
+ }
+\makeatother\ExplSyntaxOff
+
+\begin{document}
+
+\clearpage
+\section{使用说明}
+您在使用 \cls*{easybook} 文档类编写文档前可能需要满足以下的条件:
+\begin{itemize}
+ \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
+ \item 由于用到了一些 \LaTeX 和宏包较新的功能,建议安装最新的 \TeX 发行版,例如 \TeX~Live 2021 或 \hologo{MiKTeX} 21.2 之后的版本。
+ \item 虽然手册对基本用法做了介绍,但这并不是入门教程,所涉及到宏包的用法与命令也需要有了解。您应当具有一定的 \LaTeX 使用基础,可以在 \TeX 综合网站 \href{https://www.ctan.org/}{CTAN} 查看相关资源。
+\end{itemize}
+
+\subsection{基本用法}
+以下一份简单的 \TeX 文档演示了 \cls*{easybook} 的最基本用法,在导言区进行宏包载入与文档设置,一些详细的使用样例会不定期上传在 \href{https://www.latexstudio.net/}{\LaTeX 工作室} 的网站。
+\begin{frameverb}
+ \documentclass{easybook}
+
+ \ctexset{键值列表}
+ \usepackage{宏包列表}
+
+ \begin{document}
+ \chapter{欢迎}
+ \section{Welcome to easybook}
+ Hello, \LaTeX
+ \end{document}
+\end{frameverb}
+
+或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类。它的宏包选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。
+\begin{frameverb}
+ \documentclass{ctexbook}
+
+ \usepackage{easybase}
+ \ctexset{键值列表}
+
+ \usepackage{宏包列表}
+
+ \begin{document}
+ \chapter{欢迎}
+ \section{Welcome to easybook}
+ Hello, \LaTeX
+ \end{document}
+\end{frameverb}
+
+\subsection{编译方式}
+假设您的 \TeX 源文件名为 \code{easybook.tex},需要使用参考文献和索引功能,并使用 \hologo{XeLaTeX} 和 \hologo{BibTeX} 引擎编译文档,那么需要在命令行中执行:
+\begin{frameverb}
+ xelatex -shell-escape easybook
+ bibtex easybook
+ makeindex easybook
+ xelatex -shell-escape easybook
+ xelatex -shell-escape easybook
+\end{frameverb}
+当然也可以使用 \code{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\
+\ding{72} 需要注意正确\textbf{编译索引}要增加 \code{-shell-escape} 命令行选项。
+
+\section{文档类选项}
+\label{sec:document class options}
+\begin{options}
+ \opt{draft}\Default!
+ 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不载入 \pkg*{tcolorbox} 宏包使用盒子环境也会提高编译速度,详情见小节 \ref{subsec:box}。
+ \opt{newline}\Default!
+ 部分和章标题的样式为另起一行,符合一般英文书籍的习惯。
+ \keychoice{scheme}{chinese,plain}\Default{chinese}
+ \option{scheme} 代表文档的主题,扩展了此选项在 C\TeX 文档类中原有的作用范围,\option{plain} 选项可使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。
+ \opt{enmode}\Default!
+ 同时开启 \option{newline} 和 \keyis-{scheme}{plain} 选项以符合英文原生风格。
+ \keychoice{scheme}{a4paper,b5paper,c5paper,letterpaper,其它纸张}\Default{a4paper}
+ 设置页面大小,交给 \pkg*{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \option*{b5paper} 和 \keyis*-{zihao}{5},选项 \option*{a4paper} 和 \keyis*-{zihao}{-4} 配合。
+ \keyval-{config}{配置文件名}
+ \option{config} 为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \code{tex}、\code{def} 和 \code{cfg}。
+ \keybool{floatpage}\Default{true}
+ 开启这个选项后浮动环境 \env*{table} 和 \env*{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
+\end{options}
+
+\subsection{中文字体}
+\begin{options}
+ \keychoice{cjkfont}{adobe,fandol,founder,mac,macnew,macold,ubuntu,windows,none}\Default
+ 中文字体采用 C\TeX 宏集包含的字库并与其一致,具体配置方案可以查看 C\TeX 使用手册。它与 \option*{fontset} 选项是等效的,如果没有指定 \option{cjkfont} 的值,将会自动检测操作系统并选择相应的字体。
+\end{options}
+
+如果需要使用其它中文字体,可以在启用选项 \keyis-{cjkfont}{none} 后,再使用 \pkg*{xeCJK} 宏包的相关命令设置字体以及声明字体族:
+\begin{ctexexam}
+ \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
+ \setCJKsansfont{SimHei}
+ \setCJKmonofont{FangSong}
+ \newCJKfontfamily[song]\songti{SimSun}
+\end{ctexexam}
+
+\subsection{英文字体}
+\begin{options}
+ \keychoice{font}{noto,garamond,times,libertine,palatino,auto}\Default{auto}
+ 预置的英文字体相关配置方案如下表所示,这些字体已经包含在了 \TeX~Live 发行版中,所以通常不需要再专门安装。如果您想使用其他英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
+ \begin{center}
+ \begin{tabular}{cccc}
+ \toprule
+ & \sffamily{正文字体} & \sffamily{无衬线字体} & \sffamily{等宽字体} \\
+ \midrule[0.6pt]
+ \code{noto} & Noto Serif & Noto Sans & Noto Sans Mono \\
+ \code{garamond} & EB Garamond & Libertinus Sans & LM Mono \\
+ \code{palatino} & TG Pagella & Libertinus Sans & LM Mono \\
+ \code{libertine} & TG Pagella & Libertinus Sans & LM Mono \\
+ \code{times} & XITS & TG Heros & TG Cursor \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+\end{options}
+
+\subsection{article 模式}
+\begin{options}
+ \keychoice{class}{book,article}\Default{book}
+ 使用 \cls*{easybook} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \option{article} 会变为 \option*{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令,此时节 \ref{sec:document command} 中目录命令的 \option{chapter} 选项会失效,将以 \option{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。
+ \opt{book}\Default
+ 开启 \cls*{book} 模式,与 \keyis*-{class}{book} 等效。
+ \opt{article}\Default
+ 开启 \cls*{article} 模式,与 \keyis*-{class}{article} 等效。
+\end{options}
+
+\section{文档命令}
+\label{sec:document command}
+
+\subsection{文区命令}
+\begin{commands}
+ \command{frontmatter}[\sarg\oarg{编号格式}]\Default{Roman}
+ 前言区命令,使部分和章标题不编号,带有星号的变体命令不使用 \cs{cleardoublepage} 命令。页码 \meta{编号格式} 可设置为例如 \code{roman}、\code{Alph} 等格式。
+ \command{mainmatter}[\sarg]
+ 文区命令,章标题正常编号且页码为从 1 开始计数的阿拉伯数字,带有星号的变体命令不使用 \cs{cleardoublepage} 清双页命令。
+ \command{backmatter} 后记区命令,页码格式与编号保持不变,章标题不编号。
+ \command{cleardoublepage}[\oarg{页面风格}]\Default{empty}
+ 清双页命令可以确保下一页文本总在奇数页开始,在奇数页使用它会产生空白偶数页。文区命令 \cs{frontmatter} 和 \cs{mainmatter} 会用到清双页命令,在启用文类选项 \option*{openright} 时标题命令 \cs*{part} 和 \cs*{chapter} 也会用到清双页命令。
+ \command{blankpagestyle}[\marg{页面风格}]
+ 空白页面风格命令全局指定多出空白页的默认页面风格,或使用可选参数局部指定。默认的风格为 \code{empty},即空的页眉页脚。
+\end{commands}
+
+\subsection{目录命令}
+\begin{commands}
+ \command{tableofcontents}[\parg\oarg{键值列表}\darg{附加代码}]
+ 主文档目录命令。带有 \parg{} 号参数的命令输出双语目录,需要与双语目录标题命令 \cs{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令
+ \command{listoffigures}[\sarg\parg\oarg{键值列表}]
+ 输出图片目录命令。带有星号的目录命令不将标题添加进主文档目录,带有 \parg{} 号的目录命令可以使当前标题编号。
+ \command{listoftables}[\sarg\parg\oarg{键值列表}]
+ 输出表格目录命令。带有星号的目录命令不将标题添加进主文档目录,带有 \parg{} 号的目录命令可以使当前标题编号。
+ \command{listoflstlistings}[\sarg\parg\oarg{键值列表}]
+ 输出代码目录命令。带有星号的目录命令不将标题添加进主文档目录,带有 \parg{} 号的目录命令可以使当前标题编号。以上命令可选参数的 \meta{键值列表} 如下:
+\end{commands}
+
+\begin{options}
+ \opt{chapter}\Default!
+ 使目录标题按照 \code{chapter} 级别输出,这是默认级别。
+ \opt{section}\Default!
+ 使目录标题按照 \code{section} 级别输出。
+ \keybool{multoc}\Default{false}
+ 与 \code{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否多栏排版,栏数默认为双栏,可使用 \option{columns} 更改。
+ \keyval-{columns}{目录栏数}\Default{2}
+ 设置目录的栏数,仅在 \keyis-{multoc}{true} 时有效,默认为双栏。
+ \kvsplit{title}{中文目录标题,英文目录标题}\Default
+ 用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录 \cs*{tableofcontents+} 命令。
+ \keyval-{format}{目录标题格式}\Default
+ 在书籍模式且 \option{chapter} 选项开启或者文章模式的情况下,\option{format} 用于设置目录标题的格式。
+ \keyval-{aftertitle}{目录标题格式}\Default
+ 目录标题文本之后插入的代码。
+ \keyval-{pagestyle}{标题页的页面格式}\Default{empty}
+ 目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 C\TeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。
+\end{options}
+
+\subsection{标题命令}
+\change[2021-06-13]{2021-05-05}
+双语目录标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{binumber} 选项更改英文目录中的编号。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。
+\begin{commands}
+ \command{bichapter}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
+ \code{chapter} 级别的双语目录标题命令,具有独立的 \code{bichapter} 计数器。
+ \command{bisection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
+ \code{section} 级别的双语目录标题命令,具有独立的 \code{bisection} 计数器。
+ \command{bisubsection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
+ \code{subsection} 级别的双语目录标题命令,具有独立的 \code{bisubsection} 计数器。
+\end{commands}
+
+它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录的格式是一致的,共享使用 \cs*{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下:
+\begin{options}
+ \kvsplit{biname}{英文目录前名字,英文目录后名字}\Module{chapter}\Default{Chapter\cs*{space}}
+ 更改英文目录 \code{chapter} 级别的标题编号前后名字,类似 C\TeX 的 \option*{name} 选项。
+ \keyval-{binmuber}{英文目录数字输出命令}\Module{chapter}\Default{\cs*{arabic}\Marg{chapter}}
+ 更改英文目录 \code{chapter} 级别的标题编号输出格式,类似 C\TeX 的 \option*{nuber} 选项。
+\end{options}
+
+\begin{commands}
+ \command{appendix}[\splitoarg{前名字,后名字}\darg{数字输出命令}]
+ \change[2021-06-13]{2021-05-05}
+ 附录开始命令,其后的章节标题变为附录形式。英文目录中附录标题的 \meta{前名字} 为英文附录目录前名字,\meta{后名字} 为英文附录目录后名字。前后名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。\meta{数字输出命令} 为附录标题在英文目录中的编号命令。
+ \command{BeforeAddBitoc}[\sarg\marg{加入目录英文标题前的代码}]
+ 作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \cs{bichapter} 等命令前生效。
+\end{commands}
+
+\subsection{上标和下标}
+上标和下标的功能来自 \pkg*{spbmark} 宏包,\cs{super}、\cs{sub} 和 \cs{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
+\begin{commands}
+ \command{super}[\sarg\oarg{垂直偏移}\splitoarg{高度,深度}\darg{格式代码}\marg{内容}\oarg{水平偏移}]
+ 上标命令,与简短命令 \cs{sp} 等效。水平和垂直偏移进行距离微调,可以为带有长度单位的正值或负值,为正值时代表向上或向右移动,否则相反,默认均为 \code{0pt}。\meta{格式代码} 可以插入字体或颜色等命令,代码中的最后一个命令可以接受一个为上标或下标的参数。
+ \command{sub}[\sarg\oarg{垂直偏移}\splitoarg{高度,深度}\darg{格式代码}\marg{内容}\oarg{水平偏移}]
+ 下标命令,与简短命令 \cs{sp} 等效。水平和垂直偏移为正值时代表向下或向右移动,否则相反。其它用法和参数与上标命令 \cs{super} 类似。
+ \command{supersub}[\sarg\oarg{间距}\darg{对齐方式}\marg{上标内容}\marg{下标内容}\oarg{水平偏移}\splitdarg{上标代码,下标代码}]
+ 同时输出上标和下标的命令。\meta{间距} 为上下标的垂直间距,\meta{对齐方式} 是下标的水平对齐方式,参数与 \option{supersubalign} 相同,\meta{水平偏移} 默认为 \code{0pt}。
+\end{commands}
+
+\section{接口选项}
+\label{sec:interface options}
+\begin{commands}
+ \command*{ctexset}[\marg{键值列表}]
+ \cls*{easybook} 扩展了 C\TeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \cs*{ctexset} 的路径,也是相关模块的接口命令名:
+ \begin{center}
+ \begin{tabular}{*{5}{c}}
+ \toprule
+ \hyperref[subsec:style]{风格} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
+ style & subfont & spread & refset & bibset \\
+ \midrule[0.6pt]
+ \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
+ thmset & geoset & hdrset & tocset & \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+\end{commands}
+
+\subsection{风格}
+\label{subsec:style}
+\begin{options}
+ \keychoice{color}{none,seaside,energy,cyberpunk}\Module{style}\Default{none}
+ \change[2021-07-03]{2021-01-05}
+ 预置了四种主题颜色,默认主题 \code{none} 为黑白页面,主题颜色不包括超链接。
+ \begin{commands}
+ \command{DeclareThemeColor}[\splitmarg{风格名称,ctex@frame,ctex@emph,ctex@verb}]
+ 可以使用 \cs{DeclareThemeColor} 命令声明新的主题颜色,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成主题颜色。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
+ \end{commands}
+ \keyval-{color-all}{HTML颜色代码}\Default
+ 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
+ \keybool{multoc}\Default{false}
+ 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
+ \keybool{withpart}\Default{false}
+ 使章跟随每一部分编号,默认不跟随。
+ \keychoice{footwith}{part,chapter,page}\Default{chapter}
+ 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从 1 开始。
+ \keyval-{rulewidth}{线宽}\Default{0.75pt}
+ 调整页眉、定理盒子以及代码框线条的粗细。
+ \keybool{uppercase}\Default{true}
+ 使用 \cs*{rightmark} 及 \cs*{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
+ \kvsplit*{figurepath}{\meta{路径名1}\code{\}}\code{\{}\meta{路径名2}}\Default
+ 设置插入图片的文件夹路径名,可以有多个路径名,每个路径包含在括号分隔,只有一个路径时需要包含在两层括号内。
+\end{options}
+
+\subsubsection{连接符}
+\begin{options}
+ \keyval-{figure-con}{图片连接符}\Module{style}\Default{\Marg{.}}
+ \change[2021-07-02]{2021-01-05}
+ 设置图片题注编号的连接符。
+ \keyval-{table-con}{表格连接符}\Default{\Marg{.}}
+ 设置表格题注编号的连接符。
+ \keyval-{listing-con}{代码连接符}\Default{\Marg{.}}
+ 设置代码题注编号的连接符。
+ \keyval-{equation-con}{公式连接符}\Default{\Marg{.}}
+ 设置公式题注编号的连接符。
+ \keyval-{number-con}{连接符}\Default{\Marg{.}}
+ 统一设置上述所有编号的连接符。
+\end{options}
+
+\subsubsection{上下标全局设置}
+\label{subsubsec:super-sub-script}
+\begin{options}
+ \keyval-{super-vshift}{刚性长度}\Default{0pt}
+ 上标垂直偏移量,对应 \cs{super} 命令的参数 \meta{垂直偏移}。
+ \keyval-{super-hshift}{刚性长度}\Default{0pt}
+ 上标水平偏移量,对应 \cs{super} 命令的参数 \meta{水平偏移}。
+ \keyval-{sub-vshift}{刚性长度}\Default{0pt}
+ 下标垂直偏移量,对应 \cs{sub} 命令的参数 \meta{垂直偏移}。
+ \keyval-{sub-hshift}{刚性长度}\Default{0pt}
+ 下标水平偏移量,对应 \cs{sub} 命令的参数 \meta{水平偏移}。
+ \keyval-{super-format}{上标格式}\Default
+ 上标的格式,对应 \cs{super} 命令的参数 \meta{格式代码}。
+ \keyval-{sub-format}{下标格式}\Default
+ 下标的格式,对应 \cs{sub} 命令的参数 \meta{格式代码}。
+ \keyval-{supersub-hshift}{刚性长度}\Default{0pt}
+ 上下标水平偏移量,对应 \cs{supersub} 命令的参数 \meta{水平偏移}。
+ \kvsplit{supersub-format}{上标格式,下标格式}\Default
+ 上下标格式,对应 \cs{supersub} 命令的参数 \splitmeta{上标格式,下标格式}。以英文逗号分隔为前后部分,也可以只有前部分,表示上标的格式。
+ \keyval-{supersubsep}{刚性长度}\Default{0.3ex}
+ 上下标垂直间距,对应 \cs{supersub} 命令的参数 \meta{间距}。
+ \keychoice{supersubalign}{l,c,r}\Default{l}
+ 上下标的水平对齐方式,有左对齐、居中对齐和右对齐三种 \meta{对齐方式}。
+\end{options}
+
+\subsection{超链接}
+\label{subsec:hyperlinks}
+\module*{refset} 将超链接选项(包括以上选项)交给 \pkg*{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \cs*{hypersetup} 支持的多数选项可用。
+\begin{options}
+ \keychoice{linktype}{edge,colors,none}\Module{refset}\Default{edge}
+ \change[2021-07-03]{2021-01-05}
+ 使超链接为边框形式,\option{various} 使超链接变为彩色,预置了四种颜色样式。\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。
+ \keychoice{linkcolor}{fresh,cutepink,navyblue,crimson}\Default{navyblue}
+ 超链接颜色样式,预置了四种超链接颜色风格。
+ \begin{commands}
+ \command{DeclareLinkColor}[\splitmarg{风格名称,ctex@link,ctex@url,ctex@cite}]
+ 可以使用 \cs{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成超链接颜色。
+ \end{commands}
+ \keyval-{linkcol-all}{HTML颜色代码}\Default
+ 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
+ \keychoice{linktoc}{none,section,page,all}\Default{all}
+ 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
+\end{options}
+
+\subsection{行距}
+\label{subsec:spacing}
+行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。各行距既可在导言区全局设置也可正文中设置对后面生效。
+\begin{options}
+ \keyval-{line}{数值}\Module{spread}\Default{1.3}
+ \change[2021-05-17]{2021-01-05}
+ 正文行距,C\TeX 原有的行距选项 \option*{linespread} 失效。
+ \keyval-{table}{数值}\Default{1.05}
+ 表格行距,对传统表格环境 \env*{tabular}、\env*{tabularx} 以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距。
+ \keyval-{math}{数值}\Default{1.05}
+ 数学环境行距,包括 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包附带的环境,但并未加载 \pkg*{mathtools} 宏包。
+ \keyval-{caption}{数值}\Default{1.1}
+ 图片、表格和代码题注的行距。
+ \keyval-{footnote}{数值}\Default{1.1}
+ 脚注整体内容的行距,可以使用 \option{fntext-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同。
+ \begin{ctexexam}
+ \spread{footnote = 1.3}
+ \hdrset{fntext-form = \linespread{1.2}\selectfont}
+ \end{ctexexam}
+ \keyval-{spread-all}{数值}\Default
+ 统一设置上述各种行距。
+\end{options}
+
+\subsection{其它字体}
+\label{subsec:other font}
+\begin{options}
+ \keyval-{table-cap}{字体命令}\Module{subfont}\Default{\cs*{sffamily}\cs*{small}}
+ \change[2021-05-19]{2021-01-08}
+ 表格标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{figure-cap}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
+ 图片标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{listing-cap}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
+ 代码标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{footnote}{字体命令}\Default{\cs*{rmfamily}}
+ 设置脚注标记与内容的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{marginpar}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}}
+ 边注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keychoice{math}{times,noto,notosans,nc,stix,charter,garamond,libertine,none}\Default{times}
+ 选择合适的数学字体,将会加载 \pkg*{newtxmath} 和 \pkg*{bm} 宏包。使用选项 \code{none} 时可以使用 \pkg*{unicode-math} 等其它数学字体宏包定义字体。
+\end{options}
+
+\subsection{参考文献}
+\label{subsec:reference}
+\begin{options}
+ \keychoice{backend}{bibtex,biblatex}\Module{bibset}\Default{bibtex}
+ \change[2021-06-13]{2021-01-11}
+ 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献\footnote{使用 \hologo{BibTeX} 引擎时加载 \pkg*{natbib} 宏包,使用 \hologo{biber} 时将加载 \pkg*{biblatex} 宏包。}。
+ \keychoice{bib-style}{numerical,authoryear,其它格式}\Default{numerical}
+ 参考文献格式为中国的参考文献推荐标准 GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \code{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg*{biblatex} 宏包支持的参考文献风格名称。
+ \keyval-{cite-style}{标注风格}\Default
+ 标注参考文献的风格,选项 \keyis-{backend}{bibtex} 下可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,选项 \keyis-{backend}{biblatex} 下可使用 \pkg*{biblatex} 宏包支持的标注风格名称。
+ \keyval-{datafile}{参考文献数据库名}\Default
+ 参考文献数据库的文件名,可以是单个文件也可以是以括号包裹并以英文逗号分隔的文件列表,使用 \hologo{biber} 处理时要带有 \code{bib} 后缀,若不在当前文件夹名称需要包含路径。不设置参考文献数据库名时 \module*{bibset} 中的选项会失效,即不自动载入 \pkg*{natbib} 或 \pkg*{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。
+\end{options}
+
+\subsubsection{配置参考文献}
+\begin{commands}
+ \command{printbibliography}[\oarg{键值列表}]
+ \change[2021-04-09]{2021-01-11}
+ 两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下:
+\end{commands}
+
+\begin{options}
+ \keychoice*{heading}{bibliography,subbibliography,bibintoc,subbibintoc}\Default{bibintoc}
+ 参考文献通常有一个章标题或者节标题,该选项选择由 \cs*{defbibheading} 定义的标题名。
+ \keyval*-{title}{参考文献标题名}\Default
+ 如果标题定义支持的话,该选项覆盖由 \option*{heading} 选项提供的缺省标题名。
+ \keyval*-{prenote}{参考文献前注}\Default
+ 该选项选择由 \cs*{defbibnote} 所定义的前注,缺省状态下不打印任何前注。
+ \keyval*-{section}{整数}\Default{0}
+ 只打印在指定文节中引用的条目。该参考文献节从 1 开始编号,所有在 \env*{refsection} 环境外给出的引用标记为第零节。
+ \keyval*-{type}{条目类型}\Default
+ 指定条目的打印类型。
+ \keyval*-{filter}{过滤器名}\Default
+ 使用由 \cs*{defbibfilter} 定义的 \option*{filter} 来过滤条目。
+\end{options}
+
+可能一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg*{biblatex} 宏包的例子:
+\begin{ctexexam}
+ \usepackage[style = numeric]{biblatex}
+ \addbibresource{myrefs.bib}
+ \defbibheading{bibliography}[参考文献] % 定义参考文献标题
+ {\chapter*{#1}\markboth{#1}{#1}}
+\end{ctexexam}
+
+\subsection{定理样式}
+\label{subsec:theorem of style}
+\begin{options}
+ \keybool{thmbox}\Module{thmset}\Default{false}
+ \change[2021-07-01]{2021-01-12}
+ 开启定理环境盒子的边框,需载入 \pkg*{tcolorbox} 宏包才生效。这个选项与 \pkg*{thmtools} 中并不一致,\pkg*{thmtools} 的同名选项包括 \code{L}、\code{M} 和 \code{S} 三个参数。
+ \keychoice{within}{chapter,section,其它环境,空置}\Default{chapter}
+ 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
+ \keyval-{headpunct}{字体命令}\Default{false}
+ 定理标题末尾后的标记,在换行符或第一段内容的间隔之前。
+ \keyval-{bodyfont}{字体命令}\Default{chapter}
+ 定理内容部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{notefont}{字体命令}\Default
+ 定理题注部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keychoice{headfont}{字体命令}\Default
+ 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{headindent}{刚性长度}\Default{0em}
+ 定理标题的缩进,默认无缩进,可用 \cs*{parindent} 命令设置为段落缩进。
+ \keyval-{spaceabove}{弹性长度}\Default{0.75ex plus .1ex}
+ 定理环境前的间距,使用 \pkg*{tcolorbox} 的环境包装后被覆盖。
+ \keyval-{spacebelow}{弹性长度}\Default{0.75ex plus .1ex}
+ 定理环境后的间距,使用 \pkg*{tcolorbox} 的环境包装后被覆盖。
+ \keyval-{spacepost}{刚性长度}\Default{1em}
+ 定理标题后与第一段内容的间距。
+ \keyval-{headformat}{标题格式}\Default{\cs*{NAME}\cs*{space}\cs*{NUMBER}\cs*{NOTE}}
+ 定理开头部分各组成元素的排列和格式,这个选项一般不需要使用,其中 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表标题、编号和题注。
+ \kvsplit{brackets}{左括号,右括号}\Default{\Marg{(,)}}
+ 设置行间公式编号标签的括号,以英文逗号分隔,分别为左右括号。
+\end{options}
+
+\subsubsection{新建定理样式}
+文档类已预置 8 个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这三个命令,由 \pkg*{thmtools} 提供支持。
+\begin{commands}
+ \command{declaretheorem}[\oarg{键值列表1}\marg{定理环境名}\oarg{键值列表2}]
+ \change[2021-07-13]{2021-01-12}
+ 定义新的定理类环境,\cs{newtheorem} 命令与它等效。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,用法与它们的同名命令一致。\meta{键值列表} 中常用的选项如下:
+ \begin{options}
+ \keyval*-{name}{定理环境标题}
+ 定理标题的默认值是环境的名称,并且首字母大写(英文标题)。
+ \keychoice*{numbered}{no,yes,unless unique}
+ 定理可以被编号、不被编号或者只有在文档中多次出现时才被编号。
+ \keyval*-{numberlike}{定理环境名}
+ 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
+ \keyval*-{style}{定理样式名}
+ 用 \cs{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
+ \end{options}
+ \command{DeclareTheorem}[\marg{定理环境名}\oarg{英文标题}\marg{中文标题}\darg{盒子样式}\oarg{键值列表}]
+ \cs{DeclareTheorem} 是更便捷的定理命令,它定义一个新的定理环境,与 \cs{declaretheorem} 命令 \meta{键值列表} 支持的选项相同,但它们的区别有:
+ \begin{itemize}
+ \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的环境名。
+ \item 自动定义交叉引用的格式,引用标签前缀为定理名称。
+ \item 定理盒子选项 \option{thmbox} 仍然生效,盒子样式选项是用于设置定理盒子样式的名称,它需要 \pkg*{tcolorbox} 的 \cs*{tcbset} 接口命令或 \cs{tcbappstyle} 设定,默认为 \code{tc-theorem}。
+ \item 默认使用 \code{easy-theorem} 定理样式,可在最后一个选项使用 \option*{style} 更改样式。
+ \end{itemize}
+ \command{declaretheoremstyle}[\oarg{键值列表1}\marg{定理样式名}\oarg{键值列表2}]
+ 定义新的定理样式,\meta{键值列表} 中包括上述定理样式以及 \cs{declaretheorem} 的所有选项。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,用法与它们的同名命令一致。
+\end{commands}
+
+下面简单列举定理命令的用法,预置定理的样式为 \code{easy-theorem},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样:
+\begin{ctexexam}
+ \DeclareTheorem{定理环境名}{中文标题}[style = easy-theorem]
+ \declaretheorem[style = easy-theorem,name = 定理名]{定理环境名}
+\end{ctexexam}
+
+\cs{declaretheorem} 定义的定理环境需要手动增加盒子边框:
+\begin{ctexexam}
+ \tcolorboxenvironment{定理环境名}{tc-theorem}
+\end{ctexexam}
+
+使用 \cs{tcbappstyle} 命令调整开启定理盒子时默认的样式,第一个参数为 \code{theorem},关于命令的介绍在小节 \ref{subsec:box}。
+\begin{ctexexam}
+ \tcbappstyle{theorem}{colback = GreenYellow}
+\end{ctexexam}
+
+定义一个新的定理样式可用于 \cs{declaretheorem} 的 \option*{style} 选项:
+\begin{ctexexam}
+ \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5em]{定理样式名}
+\end{ctexexam}
+
+\subsection{页面尺寸}
+\label{subsec:page margins}
+预置的页面尺寸与 \cls*{Word} 的默认值接近,\module*{geoset} 会将前两个之外的选项交给 \pkg*{geometry} 宏包接口命令 \cs*{geometry} 处理,并且 \meta{键值列表} 的选项与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。
+\begin{options}\noitemsep
+ \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*
+ \keyval-{footruleskip}{页脚线间距}\Default*
+ \change[2021-06-02]{2021-01-13}
+ \keyval*-{left}{页面左边距}\Default*{3.17cm}
+ \keyval*-{top}{页面上边距}\Default*{2.54cm}
+ \keyval*-{hmargin}{左边距,右边距}\Default*
+ \keyval*-{textwidth}{页面文本区宽度}\Default*
+ \keybool*{includehead}\Default*{false}
+ \begin{ctexexam}
+ \geoset
+ {
+ headruleskip = 3pt,
+ top = 2.5cm,
+ bottom = 2.5cm,
+ left = 3.2cm,
+ right = 3.2cm,
+ ignoreall
+ }
+ \end{ctexexam}
+\end{options}
+
+\subsection{页眉页脚}
+\label{subsec:header and footer}
+\module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。在 \cls*{book} 模式时使用章节页眉标志内容选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致,标志内容中参数 \code{\#1} 代表当前章、节或小节的标题。也可以直接重新定义这些标志命令,但此时 \module*{style/}\option{uppercase} 选项失效,这时可以用例如 \cs*{MakeUppercase} 命令来设置标志内容的大小写。
+\begin{options}
+ \keyval-{head-foot}{页眉页脚代码}\Module{hdrset}
+ \change[2021-06-14]{2021-01-13}
+ 设置页眉页脚的格式,使用 \pkg*{fancyhdr} 支持的 \cs*{fancyhead} 和 \cs*{fancyhead} 等命令,或在正文中使用这些命令改变其后的页面风格。
+ \keyval-{chap-mark}{标题标记}
+ \cs*{chaptermark} 标题标记命令的内容,包括了标签选项 \option{chap-label} 的内容。
+ \keyval-{sec-mark}{标题标记}
+ \cs*{sectionmark} 标题标记命令的内容,包括了标签选项 \option{sec-label} 的内容。
+ \keyval-{subsec-mark}{标题标记}
+ \cs*{subsectionmark} 标题标记命令的内容,包括了标签选项 \option{subsec-label} 的内容。
+ \kvsplit-{chap-label}{\oarg{编号}\marg{距离命令}}\Default{\cs*{hspace}\Marg{1em}}
+ \cs*{chaptermark} 标题标记命令内容的标签,比标记命令内容选项更常用,可选参数是页眉的标题编号形式,必选参数是编号与标题之间的距离命令:
+ \begin{ctexexam}
+ \hdrset
+ {
+ chap-label = [\thechapter]{\hspace{1em}},
+ sec-mark = C\TeXifname{C\TeXthesection——}{}#1
+ }
+ \end{ctexexam}
+ \kvsplit-{sec-label}{\oarg{编号}\marg{距离命令}}\Default{\cs*{hspace}\Marg{1em}}
+ \cs*{sectionmark} 标题标记命令内容的标签,用法与 \option{chap-label} 类似。
+ \kvsplit-{subsec-label}{\oarg{编号}\marg{距离命令}}\Default{\cs*{hspace}\Marg{1em}}
+ \cs*{subsectionmark} 标题标记命令内容的标签,用法与 \option{chap-label} 类似。
+ \keyval-{headrule}{横线命令}
+ 绘制页眉横线的选项,可以使用 \cs*{hrule}、\cs*{rule} 或下述 \cs{markrule} 等画线命令来绘制横线。手动绘制横线时线条粗细选项 \code{style/rulewidth} 会失效。
+ \keyval-{footrule}{横线命令}\Default
+ 绘制页脚横线的选项,可以使用 \cs*{hrule}、\cs*{rule} 或下述 \cs{markrule} 等画线命令来绘制横线。
+ \keyval-{footnoterule}{横线命令}
+ 绘制脚注横线的选项,可以使用 \cs*{hrule}、\cs*{rule} 或下述 \cs{markrule} 等画线命令来绘制横线。
+\end{options}
+
+\begin{commands}\noitemsep
+ \command{easyhead}[\oarg{位置}\marg{内容}]\default{}
+ \change[2021-07-25]{2021-01-13}
+ \command{easyfoot}[\oarg{位置}\marg{内容}]
+ 命令 \cs{easyhead} 和 \cs{easyfoot} 的使用方法与 \cs{fancyhead} 和 \cs{fancyfoot} 完全相同,它们需要在 \option{head-foot} 选项中使用,设置的是一个名为 \code{fancy} 的页面风格。\pkg*{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共 12 个部分,可选参数中 \code{E} 和 \code{O} 代表偶数和奇数,\code{L}、\code{C} 和 \code{R} 代表左、中和右部分。单面打印时,含有偶数位置的命令无效。
+\end{commands}
+
+\begin{commands}\noitemsep
+ \command*{markboth}[\marg{左页页眉内容}\marg{右页页眉内容}]\default{}
+ \command*{markright}[\marg{右页页眉内容}]
+ \cs*{markboth} 和 \cs*{markright} 这两个命令用于手动设置页眉内容,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉标志。上述标志命令内容的选项便是基于这两个命令。如果是单面排版,则 \meta{左页页眉内容} 无效。
+\end{commands}
+
+\begin{commands}
+ \command{markrule}[\oarg{长度}\darg{颜色名}\marg{线宽}\spemcoarg{上间距,下间距}]
+ 命令 \cs{markrule} 用于绘制页眉页脚横线,\meta{长度} 默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 \code{!} 号分开,若只有一部分则表示 \meta{上间距},这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
+ \begin{ctexexam}
+ \hdrset
+ {
+ head-foot =
+ {
+ \easyhead[ER]{\leftmark}
+ \easyhead[OL]{\rightmark}
+ \easyhead[EL,OR]{\textbf{\thepage}}
+ },
+ headrule = \markrule(Darkcnltxblue){0.5pt}[2pt!2pt]
+ }
+ \end{ctexexam}
+\end{commands}
+
+\subsubsection{脚注格式}
+\begin{options}
+ \keyval-{fnmargin}{刚性长度}\Module{hdrset}\Default{0.75em}
+ \change[2021-07-14]{2021-05-12}\
+ 脚注首段缩进距离,等于长度 \cs{footnoteindent} 的值.
+ \keyval-{fnparskip}{弹性长度}\Default{0ex}
+ 脚注段落间距,等于长度 \cs{footparskip} 的值。
+ \keyval-{fnparindent}{刚性长度}\Default{2em}
+ 脚注段落缩进,等于长度 \cs{footparindent} 的值。
+ \keychoice{footnotetype}{hang,default,bottom}\Default{hang}
+ 脚注的类型,悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。这是个复合选项,\option{bottom} 可以与前两种类型重复或复合使用:
+ \begin{ctexexam}
+ \hdrset{footnotetype = default,footnotetype = bottom}
+ \hdrset{footnotetype = {hang,bottom}}
+ \end{ctexexam}
+ \keychoice{fnmark-pos}{normal,super}\Default{super}
+ 设置脚注编号的位置,正常文本或是上标形式。
+ \keychoice{fnmark-num}{plain,pifont,pifont*,pifont-sans,pifont-sans*}\Default{plain}
+ 脚注编号的格式,默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。
+ \keyval-{fnmark-form}{格式代码}\Default{格式代码}
+ 脚注标记的格式,在此设置字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注标记,一般配合 \keyis-{fnmark-num}{plain} 使用。
+ \keyval-{fntext-form}{格式代码}\Default{格式代码}
+ 脚注内容的格式,在此设置字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注内容。
+ \keyval-{afterfnmark}{格式代码}\Default{格式代码}
+ 脚注标记后的代码,由于脚注标记处于水平盒子中,它一般用于设置标记与文本间的距离。
+\end{options}
+
+\subsection{目录样式}
+\label{subsec:catalog style}
+\module*{tocset} 将目录样式交给 \pkg*{titletoc} 处理,\code{level} 代表 \code{part}、\code{chapter}、\code{section}、\code{subsection}、\code{figure}、\code{table} 和 \code{lstlisting} 级别的目录,而使用 \code{list} 级别可以统一设置图片、表格和代码目录的样式。
+\begin{options}
+ \keyval-{format}{目录标题格式}\Module{/(level)}
+ \change[2021-05-14]{2021-01-13}
+ 目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \cs*{addvspace} 命令。
+ \keyval-{format+}{目录标题格式}
+ 与 \option{format} 用法一样,在已有的格式命令后附加内容。
+ \keyval-{indent}{刚性长度}
+ 目录中的标题左边缩进距离,通常标题级别越低缩进越大。
+ \keyval-{rule}{目录引导线样式}
+ \option{rule} 选项中一般应当使用 \cs{tocrule} 命令,将会在接下来介绍。
+ \keyval-{numsep}{刚性长度}\Default{1em}
+ 有编号的标题在目录中编号与标题的间距,默认距离统一为 \code{1em}。
+\end{options}
+
+\begin{commands}
+ \command{tocrule}[\sarg\oarg{引导点间距}\parg{引导点大小}\marg{引导点}\oarg{页码格式}]
+ \change[2021-06-11]{2021-01-13}
+ \cs{tocrule} 命令生成目录引导线,需要在 \option{rule} 选项中使用。带有星号的命令会使当前级别的目录引导线右边与页码连接而不是对齐。引导点间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \cs*{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体和距离等,最后一个格式命令可以带有一个参数,这个参数接受页码编号。
+ \command*{CTEXnumberline}[\marg{编号级别}]
+ \cs*{CTEXnumberline} 命令用于在 C\TeX 文档类的 \option*{tocline} 选项中设置目录标签的编号,它已经被重新定义,使得目录编号后间距选项 \option{numsep} 仍然有效。\meta{编号级别} 为 \code{chapter} 和 \code{section} 等,也可用参数 \code{\#1} 代替当前级别类型,标题名用参数 \code{\#2} 代替一般不变。
+ \begin{ctexexam}
+ \tocset
+ {
+ chapter =
+ {
+ format = \addvspace{8pt}\large,
+ indent = 1.5em,
+ rule = \tocrule[0.6pc](1.1){.}[\zihao{5}]
+ }
+ }
+ \end{ctexexam}
+\end{commands}
+
+\begin{options}
+ \keyval-{belowoffset}{长度}\Module{tocset}\Default{-1pc}
+ 主文档目录标题下方的间距补偿,一般为负值,用于抵消 \option{format} 中额外的垂直间距。
+ \keyval-{belowoffset}{长度}\Module{/(level)}\Default{0pc}
+ 与之上面选项的意义类似,代表 \code{figure}、\code{table} 和 \code{lstlisting} 三个级别,也可以使用 \code{list} 统一设置,一般为正值。
+ \keyval-{lolskip}{长度}\Module{tocset}\Default{0.8pc}
+ \change[2021-05-14]{2021-01-13}
+ 代码目录中章之间的代码标题的距离,与 C\TeX 的表格目录和图片目录中章之间的标题距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,它们的值均默认为 \code{0.8pc},在 \cls*{article} 模式中此选项失效。
+ \keyval-{tocline-fig}{图片目录标签}
+ 图片目录标签,选项参数中 \code{\#1} 代表编号,还可包含标签名称,默认标签名称与图片题注名称一致。
+ \keyval-{tocline-tab}{表格目录标签}
+ 表格目录标签,选项参数中 \code{\#1} 代表编号,还可包含标签名称,默认标签名称与表格题注名称一致。
+ \keyval-{tocline-lst}{代码目录标签}
+ 代码目录标签,选项参数中 \cs*{thelstlisting} 代表编号,还可包含标签名称,默认标签名称与代码题注名称一致。
+ \begin{ctexexam}
+ \tocset
+ {
+ hang = false,
+ tocline-fig = 图 #1\hspace{1em},
+ tocline-lst = 代码\thelstlisting\hspace{1em}
+ }
+ \end{ctexexam}
+ \keybool{line-align}\Default{true}
+ \option{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。
+ \keybool{hang}\Default{false}
+ \option{hang} 选项使目录标题为悬挂缩进形式,缩进距离为编号及其与标题间距的长度,但此时目录编号会失去超链接。
+ \keyval-{numsep-all}{刚性长度}\Default{1em}
+ 统一设置所有有编号的标题在目录中编号与标题的间距。
+ \keyval-{indent-all}{刚性长度}
+ 统一设置所有级别的目录标题左边缩进。
+ \keyval-{rule-all}{目录引导线样式}
+ 统一设置所有级别的目录引导线样式。
+\end{options}
+
+\section{常用环境}
+
+\subsection{公式}
+\begin{environments}\noitemsep
+ \environment*{equation}\default{}
+ \environment*{multline}\default{}
+ \environment*{gather}\default{}
+ \environment*{align}
+ \pkg*{amsmath} 宏包提供了一系列行间数学环境,它们可以排布各种对齐或不对齐的公式组。\env*{multline} 环境用于一行无法放下的长公式,\env*{gather} 环境用于每行居中的公式组,\env*{align} 环境用于多列对齐的公式组。
+\end{environments}
+
+\subsection{表格}
+\begin{environments}\noitemsep
+ \environment*{tabularx}[\marg{长度}\marg{列格式}]\default{}
+ \environment*{tabular}[\marg{列格式}]\default{}
+ \environment{tblr}[\marg{键值列表}]
+ \pkg*{tabularray} 是一个较新的宏包,不仅提供了 \pkg*{tabularx}、\pkg*{multirow}、和 \pkg*{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法:
+ \begin{ctexexam}
+ \begin{tblr}
+ {
+ colspec = {X[2,l]XX[LimeGreen]X},
+ rowspec = {Q[t]Q[m]Q[b,Magenta]Q[t]Q[m]Q[b]},
+ hline{1,6} = {1pt,solid},
+ hline{3-5} = {LightBlue,dashed},
+ vline{1,5} = {3-4}{dotted},
+ rows = {1cm,abovesep = 2pt}
+ }
+ Alpha & Beta & Gamma & Delta \\
+ Epsilon & Zeta & Eta & Theta \\
+ Iota & Kappa & \SetCell[r=2]{h,c,Cyan}Lambda & Mu \\
+ Nu & Xi & Omicron & Pi \\
+ Rho & Sigma & Tau & Upsilon
+ \end{tblr}
+ \end{ctexexam}
+\end{environments}
+
+\subsection{列表}
+\pkg*{enumitem} 宏包为系统预置的三种列表环境即排序列表 \env{enumerate}、常规列表 \env{itemize} 和 主题列表 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \cs*{setlist} 命令设置三种列表格式,或者直接使用可选参数的 \meta{键值列表},具体选项见 \pkg*{enumitem} 宏包文档。
+\begin{environments}\noitemsep
+ \environment*{enumerate}[\oarg{键值列表}]\default{}
+ \environment*{itemize}[\oarg{键值列表}]\default{}
+ \environment*{description}[\oarg{键值列表}]
+ 已为三种列表预置了三个级别,同种列表或不同种列表间的不同级别可相互嵌套,可以使用短编号的形式,带有星号的环境为行内列表。默认列表标签与标准文档类一致,下面举几个更改列表标签以及其它格式的例子:
+ \begin{ctexexam}
+ \setlist{nosep} % 取消所有列表额外的垂直间距
+ \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
+ \begin{itemize}[label = \textbullet]
+ \begin{description}[font = \sffamily\bfseries,style = nextline]
+ \end{ctexexam}
+\end{environments}
+
+\subsection{定理}
+\label{subsec:theorem}
+\begin{environments}\noitemsep
+ \environment{theorem}\default{}
+ \environment{definition}\default{}
+ \environment{lemma}\default{}
+ \environment{corollary}\default{}
+ \environment{proposition}\default{}
+ \environment{example}\default{}
+ \environment{remark}\default{}
+ \environment{proof}
+ 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改边框样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理标题名如下:
+ \begin{center}
+ \begin{tabular}{*{8}{c}}
+ \toprule
+ theorem & definition & lemma & corollary & proposition & example & remark & proof \\
+ 定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明 \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+\end{environments}
+
+\subsection{悬挂缩进}
+\change{2021-07-11}
+\begin{commands}
+ \command{hangpara}[\marg{缩进长度}\marg{缩进开始行数}]
+ 悬挂缩进命令 \cs{hangpara} 使其后的一个段落保持悬挂缩进,参数与 \env{hangparas} 环境相同,不过只有一个段落。
+\end{commands}
+\begin{environments}
+ \environment{hangparas}[\marg{缩进长度}\marg{缩进开始行数}]
+ 悬挂缩进环境 \env{hangparas} 有两个必选参数,使其中的段落均保持悬挂缩进。每个段落的缩进将以 \meta{缩进长度} 从 \meta{缩进开始行数} 开始。
+\end{environments}
+
+\subsection{代码}
+\pkg*{listings} 宏包提供了大量选项对代码格式进行高度定制,代码格式可使用 \cs*{lstset} 命令全局设置,预置的代码风格 \option*{style} 为 \code{easy-listings}。
+\begin{commands}
+ \command{lstinline}[\oarg{键值列表}\marg{行内代码}]
+ 行内代码抄录命令,较 \cs*{verb} 命令有较大改进,具有代码语言和样式支持。
+\end{commands}
+\begin{environments}
+ \environment{lstlisting}[\oarg{键值列表}]
+ 行间代码抄录环境,支持多种语言库,默认使用 \code{LaTeX} 代码语言,使用可选参数局部设置代码格式。
+\end{environments}
+\begin{options}\noitemsep
+ \keyval-{lstlistlistingname}{代码目录标题名}\default{}
+ \keyval-{lstlistingname}{代码题注标题名}
+ \option*{lstlistlistingname} 和 \option*{lstlistingname} 分别是代码目录名与代码环境题注名,与 C\TeX 使用手册标题汉化一节类似,可使用 \cs*{ctexset} 接口命令直接修改。
+\end{options}
+
+\subsection{习题}
+\label{subsec:exercise}
+\begin{environments}
+ \environment{exercise}[\sarg\parg\oarg{键值列表1}\darg{键值列表2}\oarg{键值列表3}]
+ \change[2021-07-25]{2021-01-05}
+ 习题环境的标题使用 \cs*{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 \parg{} 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \option{label} 选项失效。\par
+
+ \meta{键值列表2} 包括 \pkg*{tcolorbox} 的盒子样式选项,例如 \option*{boxsep} 和 \option*{fontupper} 等,也可以使用下述 \option{tcolorbox} 选项。在这里可以使用 \cs{tcbappstyle} 命令设置标题选项 \meta{键值列表2} 的值,第一个参数为 \code{exercise}。
+ \begin{ctexexam}
+ \tcphantomifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{}
+ \tcbappstyle{exercise}{boxsep = 5pt}
+ \exerprologue{习题前的一段文本}
+ \begin{exercise}+[color = LightSkyBlue](after skip = 2pc)[itemsep = 1ex]
+ \item 第一题
+ \item 第二题
+ \end{exercise}
+ \end{ctexexam}
+\end{environments}
+
+\begin{commands}
+ \command{setexercise}[\marg{键值列表1}]
+ \cs{setexercise} 命令用于全局设置上述习题环境 \env{exercise} 标题样式可选参数中 \meta{键值列表1} 的默认值,包含的选项如下:
+ \begin{options}
+ \keyval-{color}{标题背景颜色名}\Default{DeepSkyBlue}
+ 习题标题盒子背景颜色,可以使用 \pkg*{xcolor} 自定义颜色或使用色库。
+ \keyval-{title}{环境标题}\Default{习题}
+ 习题的标题,可以匹配中英文模式,习题环境使用 \parg{} 参数时无效。
+ \keyval-{number}{习题编号格式}\Default{\Marg{1.}}
+ 标题编号输出选项 \option{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。
+ \keyval-{numsep}{编号与标题的间距}\Default{0.5em}
+ 习题标题编号与后方标题文本的间距,习题环境使用星号参数时无效。
+ \keyval-{tcolorbox}{键值列表2}
+ 局部传递 \pkg*{tcolorbox} 宏包的格式选项给习题标题(如果存在)。
+ \keyval-{enumitem}{键值列表3}
+ 局部传递 \pkg*{enumitem} 宏包的格式选项给习题条目列表。
+ \keyval-{label}{标签内容}
+ 设置习题环境的引用标签,它与标签格式命令 \cs{labelformat} 对应的计数器是 \code{eb@exercise}。
+ \end{options}
+ \command{setexerlist}[\marg{键值列表3}]
+ \meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。
+ \cs{setexerlist} 命令用于设置习题条目选项 \meta{键值列表3} 的值。
+ \command{exerprologue}[\marg{序言内容}]
+ 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。
+ \command{tcphantomifname}[\marg{编号代码}\marg{不编号代码}]
+ \cs{tcphantomifname} 根据使用 \pkg*{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \cs*{addcontentsline} 命令将习题标题加入目录。
+\end{commands}
+
+\subsection{盒子}
+\label{subsec:box}
+使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg*{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。
+
+\begin{commands}
+ \command{tcbappstyle}[\sarg\marg{风格名称}\marg{键值列表}]
+ \change{2021-07-25}
+ 这是一个 \pkg*{tcolorbox} 宏包盒子风格定义命令,带有星号的命令可以\textbf{新建或重置}一个名为 \code{tc-}\meta{风格名称} 的盒子风格,否则是修改\textbf{已存在}的风格。这个命令可以调整以下即将介绍的预置盒子风格,对于预置盒子来说参数 \meta{风格名称} 即为它们对应的环境或命令名。
+ \begin{ctexexam}
+ \tcbappstyle*{mytcb} % 新建一个盒子风格tc-mytcb
+ {
+ colback = Snow,colframe = LimeGreen,coltext = Coral,
+ fontupper = \bfseries,arc = 6pt,
+ boxrule = 5pt,boxsep = 5pt,
+ borderline = {2pt}{2pt}{white}
+ }
+ \newtcolorbox{mytcbox}[1][]{enhanced,tc-mytcb,title = #1}
+ \begin{tcolorbox}[tc-mytcb,enhanced]
+ 盒子内容1
+ \end{tcolorbox}
+ \begin{mytcbox}[盒子标题]
+ 盒子内容2
+ \end{mytcbox}
+ \end{ctexexam}
+\end{commands}
+
+\subsubsection{摘要盒子}
+\begin{environments}
+ \environment{outline}[\oarg{键值列表1}\darg{标题名称}\oarg{键值列表2}]
+ 摘要盒子 \env{outline} 可用于章前摘要,它的标题是可选参数,默认标题是摘要。\meta{键值列表2} 是摘要盒子样式选项,可以使用 \cs{tcbappstyle} 命令对它进行全局设置,命令第一个参数为 \code{outline}。
+\end{environments}
+\begin{commands}
+ \command{setoutlinelist}[\marg{键值列表1}]
+ \meta{键值列表1} 与 \pkg*{enumitem} 宏包中列表配置选项相同,可以设置摘要条目的各种距离,要对它进行全局设置可以使用 \cs{setoutlinelist} 命令。
+ \begin{ctexexam}
+ \tcbappstyle{outline}{arc = 6pt}
+ \begin{outline}[leftmargin = *](摘要标题)
+ \item 摘要内容1
+ \item 摘要内容2
+ \end{outline}
+ \end{ctexexam}
+\end{commands}
+
+\subsubsection{段落盒子}
+\begin{environments}
+ \environment{easybox}[\sarg\oarg{颜色名}\darg{段落标题}\oarg{配置选项}]
+ 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。如果 \meta{配置选项} 较长且希望在原有基础上更改为全局固定的样式,可以使用 \cs{tcbappstyle} 命令设置,命令第一个参数为 \code{easybox}。
+ \begin{ctexexam}
+ \begin{easybox}*[DarkCyan](段落标题)
+ 上半盒子内容
+ \tcblower % 盒子上下部分分界线
+ 下半盒子内容
+ \end{easybox}
+ \end{ctexexam}
+ \environment{ebparbox}[\sarg\oarg{颜色名}\darg{段落标题}\oarg{配置选项}]
+ 环境 \env{ebparbox} 用法与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。
+\end{environments}
+
+\subsubsection{行内盒子}
+\begin{commands}
+ \command{eblink}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
+ 使用 \pkg*{tcolorbox} 预置了三个参数选项相同的行内盒子,它们均为抄录命令。盒子 \cs{eblink} 具有类似超链接边框的效果。
+ \command{ebemph}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
+ 盒子 \cs{ebemph} 具有模糊边缘类似高亮的效果。
+ \command{ebfbox}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
+ 盒子 \cs{ebfbox} 则有直角边缘并带有上下框线。
+\end{commands}
+
+\section{更多用法}
+
+\subsection{物理量}
+\begin{commands}
+ \command*{num}[\oarg{键值列表}\marg{数字}]
+ \pkg*{siunitx} 宏包的 \cs*{num} 命令可以输出以科学计数法表示的数值。
+ \command*{unit}[\oarg{键值列表}\marg{单位}]
+ 单位格式化命令 \cs*{unit} 包含文字元素(例如字母或数字)时,使用 \Marg{.} 和 \code{\~{}} 放置在单元乘积中间,并使用 \code{\_} 和 \code{\^{}} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。
+ \command*{qty}[\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}]
+ \cs*{qty} 命令可用来输出带有单位的量。
+ \command*{qtyrange}[\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}]
+ \cs*{qtyrange} 可以输出带有范围和单位的量。
+ \begin{ctexexam}
+ \numproduct{-21x3e5}
+ \unit{mL~min^{-1}}
+ \qty{5}{\mole}
+ \qtyrange[unit-color = green]{1.5}{4}{kg}
+ \end{ctexexam}
+\end{commands}
+
+\subsection{计数器}
+\begin{commands}\noitemsep
+ \command{newcounter}[\marg{计数器}\oarg{父计数器}]\default{}
+ \command{UseCounter}[\sarg\oarg{父计数器}\darg{编号}\marg{计数器}\marg{内容}\oarg{分隔符}]
+ \cs{newcounter} 是 \LaTeX 自带的创建计数器命令,\cs{UseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \cs*{the}\meta{父计数器}\meta{分隔符}\cs*{the}\meta{计数器}\meta{内容} 输出当前内容。
+ 需要注意的是 \cs{UseCounter} 仅具有\textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 \code{arabic} 和 \code{alpha} 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。
+\end{commands}
+
+在一定的场合下可能用到 \cs{UseCounter} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器,使用 \cs{labelformat} 设置计数器的引用标签需添加 \code{eb@}:
+\begin{ctexexam}
+ \labelformat{eb@theorem}{定理 #1}
+ \newcommand{\theoremhead}[1]
+ {定理 \UseCounter[chapter]{theorem}{\hspace{1em}#1}}
+ \theoremhead{定理标题}\label{thm:theorem}
+\end{ctexexam}
+
+\subsection{图表题注}
+\begin{commands}\noitemsep
+ \command{caption}[\sarg\oarg{目录标题}\marg{标题}]\default{}
+ \command{captionof}[\sarg\marg{题注类型}\oarg{目录标题}\marg{标题}]\default{}
+ \command{bicaption}[\sarg\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2}]
+ 题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env*{figure} 和 \env*{table} 中使用,在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定题注类型。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
+\end{commands}
+
+\subsection{化学式}
+\begin{commands}\noitemsep
+ \command*{ch}[\oarg{键值列表}\marg{化学式}]\default{}
+ \command*{chemfig}[\oarg{键值列表}\marg{化学式}]
+ 除了以普通公式的方式,化学式还可用 \pkg*{chemformula} 实现,无机化学式使用 \cs*{ch} 命令书写。有机化学式推荐在导言区载入 \pkg*{chemfig} 宏包,使用 \cs*{chemfig} 命令完成。
+\end{commands}
+
+\subsection{公式符号对照}
+\change{2021-07-22}
+\begin{environments}
+ \environment{eqcomp}[\oarg{键值列表1}\darg{键值列表2}]
+ 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。对照列表的 \meta{键值列表2} 与 \pkg*{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。
+\end{environments}
+
+\begin{commands}
+ \command{symb}[\sarg\marg{符号}\oarg{引导符}]
+ \cs{symb} 类似列表条目 \cs*{item},需要在环境内使用,带有星号的命令可在文本段落单独使用。
+ \command{seteqcomplist}[\marg{键值列表2}]
+ 对照列表条目格式的 \meta{键值列表2} 可以使用 \cs{seteqcomplist} 全局设置。
+ \command{seteqcomp}[\marg{键值列表1}]
+ 对照环境的 \meta{键值列表1} 可以使用 \cs{seteqcomp} 全局设置,它的选项如下:
+ \begin{options}
+ \keyval-{width}{符号宽度}\Default{2em}
+ 设置适当的符号宽度可以防止文字重叠和边界溢出等问题。
+ \keyval-{delim}{引导符}\Default{——}
+ 符号对照的引导符,\cs{symb} 的 \meta{引导符} 和对齐方式是基于这个符号的宽度。
+ \keyval-{space}{符号间隙}\Default{0.25em}
+ 符号间隙为引导符两侧与符号和说明文字间的距离。
+ \keychoice{item-align}{l,c,r}\Default{r}
+ 符号的对齐方式,分为左(\code{l})、中(\code{c})和右(\code{r})三种对齐方式。
+ \keychoice{delim-align}{l,c,r}\Default{c}
+ 引导符的对齐方式,分为左(\code{l})、中(\code{c})和右(\code{r})三种对齐方式。
+ \keyval-{enumitem}{键值列表2}
+ 可以使用选项 \option{enumitem} 或命令 \cs{seteqcomplist} 调整对照列表的水平垂直间距。
+ \keyval-{intro}{首行文字}\Default
+ 符号对照的说明文字,应当为简短的几个字,只显示在第一行,其后为悬挂缩进的对照列表。
+ \keyval-{font}{符号字体}\Default
+ 符号的字体,数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。
+ \keychoice{mode}{math,text}\Default{math}
+ 符号字体模式,可以为数学字体或者文本字体。
+ \end{options}
+\end{commands}
+
+\subsection{引用}
+\begin{commands}
+ \command{ref}[\marg{标签}]
+ 使用 \cs*{ref} 命令引用 \cs*{label} 设置的标签,将会检测临近计数器并添加相应的前缀,比如图表、章节标题和定理等。
+ \command{footref}[\marg{脚注标签}]
+ \cs{footref} 对自动编号的脚注进行引用,为上标形式与脚注标记一致。
+ \command{labelformat}[\marg{计数器}\marg{标签引用格式}]
+ \cs{labelformat} 可以设置标签引用格式,第二个参数中 \code{\#1} 代表 \cs*{the}\meta{计数器},可以设置引用序号的前缀和后缀。
+\end{commands}
+
+\subsubsection{索引}
+\begin{commands}
+ \command{printindex}[\sarg\parg\oarg{键值列表}\darg{索引名}]
+ \pkg*{imakeidx} 宏包提供了索引的功能,重新定义了它的 \cs{printindex} 命令用于生成索引目录,\meta{键值列表} 及选项与节 \ref{sec:document command} 相同,但是原本接口命令 \cs*{indexsetup} 的部分选项失效。
+ \command*{index}[\oarg{索引名}\marg{标签}]
+ 索引标签命令 \cs*{index} 的 \meta{索引名} 与索引输出命令 \cs{printindex} 一致,可以存在多个索引目录。
+ \command{makeindex}[\oarg{键值列表}]
+ 使用 \cs{makeindex} 命令开启索引收集,输出不同的索引目录时使用 \meta{索引名} 选项。
+\end{commands}
+
+\subsubsection{自定义脚注}
+\begin{commands}\noitemsep
+ \command{Footnote}[\marg{标记}\marg{脚注文本}]\default{}
+ \command{Footnotetext}[\marg{标记}\marg{脚注文本}]\default{}
+ \command{Footnotemark}[\marg{标记}]
+ 这些是自定义 \meta{标记} 且不影响正常编号的脚注命令,用法与它们对应首字母小写的命令类似。如果 \meta{标记} 为空,那么将会使用上一个脚注标记。
+ \begin{ctexexam}
+ \Footnote{*}{这是可以自定义标记的脚注。}
+ \end{ctexexam}
+\end{commands}
+
+\subsubsection{边注}
+\begin{commands}
+ \command{marginnote}[\oarg{左文本}\marg{右文本}\oarg{垂直偏移}]
+ 命令 \cs{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
+\end{commands}
+
+\section{依赖的宏包}
+以下为 \pkg*{easybase} 直接调用的关键宏包,方括号内为宏包已使用的选项。蓝色的宏包表示截至当前在 \TeX~Live 2021 中存在更新,旧版本并不影响使用。带有 \ding{81} 符号的宏包并未载入它们,仅做了一些预配置,可在导言区手动载入以实现相关的功能。
+\begin{description}[font = \normalfont\sffamily]
+ \item[amsmath] 提供 \LaTeX 中的数学功能。
+ \item[\passto{heading}{ctex}] 提供中文排版的通用框架。
+ \item[chemformula] 提供了对化学式进行排版的命令。
+ \item[caption] 在浮动环境中自定义题注。
+ \item[\passto*{shortlabels,inline}{enumitem}] 提供列表环境的布局控制。
+ \item[fancyhdr] 广泛控制页面的页眉和页脚。
+ \item[graphicx] 增强了对图形插入的支持。
+ \item[geometry] 灵活完整的页面尺寸设置。
+ \item[\color{cnltxblue}hyperref] 处理交叉引用命令以及在文档中生成超文本链接。
+ \item[listings] 可以在 \LaTeX 中排版程序/编程代码。
+ \item[marginnote] 增强了边注输出的功能。
+ \item[multicol] 混合单栏和多栏排版。
+ \item[\passto{upint}{newtxmath}] 提供多种数学字体。
+ \item[pdfpages] 在 \LaTeX 中插入 \code{pdf} 文档。
+ \item[\passto{ctex}{spbmark}] 定制上标和下标的格式。
+ \item[\color{cnltxblue}siunitx] 全面的国际标准单位支持。
+ \item[setspace] 提供对文档中行间距的支持。
+ \item[\color{cnltxblue}tabularray] 完全分离表格的内容和样式,并且可以通过键值方式完全设置表格。
+ \item[thmtools] 用于通常需要的排版定理支持。
+ \item[titletoc] 设置目录中的标题格式。
+ \item[\passto*{normalem}{ulem}] 提供可断行多样式的下划线命令。
+ \item[\passto*{svgnames}{xcolor}] 提供任意颜色的设定与混合。
+ \item[\ding{81} \passto{list = off}{bicaption}] 提供图表的双语题注。
+ \item[\ding{81} imakeidx] 可以让文档同时生成和排版一个或多个索引。
+ \item[\ding{81} mathtools] 增强 \pkg*{amsmath} 的数学功能。
+ \item[\color{cnltxblue}\ding{81} \passto{many}{tcolorbox}] 为带有标题线的彩色和带框文本框提供了一个环境。
+ \item[\ding{81} unicode-math] 处理使用 \code{unicode} 编码的数学字体。
+\end{description}
+
+\nocite{*}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/macrolist/README.md b/macros/latex/contrib/macrolist/README.md
index 01a19cad01..8aa1f2490a 100644
--- a/macros/latex/contrib/macrolist/README.md
+++ b/macros/latex/contrib/macrolist/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package macrolist - version 1.2.1 (2021/07/25)
+# The LaTeX package macrolist - version 2.0.0 (2021/07/29)
> Copyright (C) 2021 Dennis Chen <proofprogram@gmail.com>
>
diff --git a/macros/latex/contrib/macrolist/macrolist.dtx b/macros/latex/contrib/macrolist/macrolist.dtx
index 59d3041f3f..5074875ff0 100644
--- a/macros/latex/contrib/macrolist/macrolist.dtx
+++ b/macros/latex/contrib/macrolist/macrolist.dtx
@@ -16,7 +16,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{macrolist}[2021/07/25 v1.2.1 Create lists of macros and perform operations on them]
+\ProvidesPackage{macrolist}[2021/07/29 v2.0.0 Create lists of macros and perform operations on them]
\RequirePackage{pgffor}
%</package>
@@ -35,6 +35,7 @@
%</driver>
% \fi
%
+% \changes{v2.0.0}{2021/07/29}{Add ``macro'' in front of each external command (to avoid conflicts with etoolbox)}
% \changes{v1.0.2}{2021/07/17}{Print changelog in documentation}
% \changes{v1.0.2}{2021/07/17}{Added comment markers to remove pars and fix spacing in listforeach}
% \changes{v1.0.1}{2021/07/16}{Make a couple of defs and lets global to prevent scoping issues}
@@ -52,19 +53,19 @@
% \maketitle
%
% \begin{abstract}
-% The \textsf{macrolist} package allows you to create lists and manipulate them, with utilities such as |\listforeach| and an implementation of arr.join() from Javascript. Contrary to the name of the package, non-macros and groups of macros can be put into an item of the list.
+% The \textsf{macrolist} package allows you to create lists and manipulate them, with utilities such as |\macrolistforeach| and an implementation of arr.join() from Javascript. Contrary to the name of the package, non-macros and groups of macros can be put into an item of the list.
% \end{abstract}
%
% \section{Usage}
% The scope of lists is always global. This provides the most consistency and functionality for developers in places that are usually local (part of a group), such as environments and loops.
%
-% \DescribeMacro{\newlist}
-% To create a list, pass in |\newlist{listname}| to create a list with the name \textsf{listname}.
+% \DescribeMacro{\macronewlist}
+% To create a list, pass in |\macronewlist{listname}| to create a list with the name \textsf{listname}.
%
% The package checks that \textsf{listname} is not the name of another list, and will throw an error if another list \textsf{listname} has already been defined.
%
% \iffalse
-\newcommand{\newlist}[1]{
+\newcommand{\macronewlist}[1]{
\ifcsname c@macrolist@list@#1\endcsname
\PackageError{macrolist}{The list '#1' is already defined}{}
\else
@@ -75,41 +76,42 @@
% \fi
%
% \changes{v1.1.0}{2021/07/22}{Add listexists}
-% \DescribeMacro{\listexists}
-% Writing |\listexists{listname}{true}{false}| will execute \textsf{true} if \textsf{listname} exists and \textsf{false} otherwise.
+% \DescribeMacro{\macrolistexists}
+% Writing |\macrolistexists{listname}{true}{false}| will execute \textsf{true} if \textsf{listname} exists and \textsf{false} otherwise.
%
% \iffalse
-\newcommand{\listexists}[3]{\ifcsname c@macrolist@list@#1\endcsname#2\else#3\fi}
+\newcommand{\macrolistexists}[3]{\ifcsname c@macrolist@list@#1\endcsname#2\else#3\fi}
% \fi
%
-% \DescribeMacro{\listelement}
+% \DescribeMacro{\macrolistelement}
%
-% To execute the \textsf{i}th element of \textsf{listname}, write |\listelement{listname}{i}|. Note that \textit{lists are 1-indexed}, meaning the first element is numbered 1, the second element numbered 2, and so on.
+% To execute the \textsf{i}th element of \textsf{listname}, write |\macrolistelement{listname}{i}|. Note that \textit{lists are 1-indexed}, meaning the first element is numbered 1, the second element numbered 2, and so on.
%
% An error will be thrown if \textsf{listname} is not a defined list, if \textsf{i} is empty, or if \textsf{i} is greater than the size of the list.
%
% \iffalse
-\newcommand{\listelement}[2]{%
+\newcommand{\macrolistelement}[2]{%
\macrolist@inbounds{#1}{#2}%
\csname macrolist@list@#1\the\numexpr #2\relax\endcsname%
}
% \fi
+% \changes{}
% \changes{v1.2.1}{2021/07/25}{Fix behavior of listindexof and listcontains for empty lists}
% \changes{v1.2.0}{2021/07/23}{Add listindexof and listcontains}
-% \DescribeMacro{\listindexof}
+% \DescribeMacro{\macrolistindexof}
%
-% This works similar to \textsf{indexof} in almost any ordinary programming language. Write |\listindexof{list}{element}| to get the index of where \textsf{element} first appears in \textsf{list}. If it never does, then the macro will expand to \textsf{0}.
+% This works similar to \textsf{indexof} in almost any ordinary programming language. Write |\macrolistindexof{list}{element}| to get the index of where \textsf{element} first appears in \textsf{list}. If it never does, then the macro will expand to \textsf{0}.
%
-% The command uses |\ifx| instead of |\if|; this means that if you have |\macro| as an element with the definition \textsf{this is a macro} (assuming that \textsf{this is a macro} is not an element itself), then |\listindexof{listname}{this is a macro}| will expand to \textsf{0}.
+% The command uses |\ifx| instead of |\if|; this means that if you have |\macro| as an element with the definition \textsf{this is a macro} (assuming that \textsf{this is a macro} is not an element itself), then |\macrolistindexof{listname}{this is a macro}| will expand to \textsf{0}.
%
% Because of the implementation of this macro, it can't actually be parsed as a number. (See the `Limitations' section for more information.)
% \iffalse
-\newcommand{\listindexof}[2]{%
+\newcommand{\macrolistindexof}[2]{%
\def\macrolist@listindex{0}%
\macrolist@exists{#1}%
- \ifnum\listsize{#1}>0\relax
+ \ifnum\macrolistsize{#1}>0\relax
\def\macrolist@el{#2}%
- \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{%
+ \macrolistforeach{#1}{\macrolist@listindexel}[\macrolistsize{#1}][1]{%
\ifx\macrolist@el\macrolist@listindexel
\xdef\macrolist@listindex{\macrolist@index}%
\fi
@@ -120,17 +122,17 @@
}
% \fi
%
-% \DescribeMacro{\listcontains}
+% \DescribeMacro{\macrolistcontains}
%
-% Writing |\listcontains{listname}{element}{true branch}{false branch}| checks whether list \textsf{listname} contains \textsf{element}, executing \textsf{true branch} if it does and \textsf{false branch} if it does not.
+% Writing |\macrolistcontains{listname}{element}{true branch}{false branch}| checks whether list \textsf{listname} contains \textsf{element}, executing \textsf{true branch} if it does and \textsf{false branch} if it does not.
%
% \iffalse
-\newcommand{\listcontains}[4]{%
+\newcommand{\macrolistcontains}[4]{%
\def\macrolist@listindex{0}%
\macrolist@exists{#1}%
- \ifnum\listsize{#1}>0\relax
+ \ifnum\macrolistsize{#1}>0\relax
\def\macrolist@el{#2}%
- \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{%
+ \macrolistforeach{#1}{\macrolist@listindexel}[\macrolistsize{#1}][1]{%
\ifx\macrolist@el\macrolist@listindexel
\xdef\macrolist@listindex{\macrolist@index}%
\fi
@@ -144,28 +146,28 @@
}
% \fi
%
-% \DescribeMacro{\listadd}
+% \DescribeMacro{\macrolistadd}
%
-% To add something to the list \textsf{listname}, pass in |\listadd{listname}[position]{element}|, where \textsf{position} is an optional argument. If nothing is passed in for \textsf{position}, then by default \textsf{element} will be added to the end of the list.
+% To add something to the list \textsf{listname}, pass in |\macrolistadd{listname}[position]{element}|, where \textsf{position} is an optional argument. If nothing is passed in for \textsf{position}, then by default \textsf{element} will be added to the end of the list.
%
% \iffalse
-\newcommand{\listadd}[1]{
+\newcommand{\macrolistadd}[1]{
\macrolist@exists{#1}
\def\macrolist@currlist{#1}
\macrolist@listadd
}
-%% We write \listadd this way such that the optional argument will be positioned correctly
+%% We write \macrolistadd this way such that the optional argument will be positioned correctly
\newcommand{\macrolist@listadd}[2][]{
\stepcounter{macrolist@list@\macrolist@currlist}
\if\relax\detokenize{#1}\relax
- \expandafter\gdef\csname macrolist@list@\macrolist@currlist\listsize{\macrolist@currlist}\endcsname{#2}
+ \expandafter\gdef\csname macrolist@list@\macrolist@currlist\macrolistsize{\macrolist@currlist}\endcsname{#2}
\else
\expandafter\ifnum\csname themacrolist@list@\macrolist@currlist\endcsname=#1
- \expandafter\gdef\csname macrolist@list@\macrolist@currlist\listsize{\macrolist@currlist}\endcsname{#2}
+ \expandafter\gdef\csname macrolist@list@\macrolist@currlist\macrolistsize{\macrolist@currlist}\endcsname{#2}
\else
\macrolist@inbounds{\macrolist@currlist}{#1}
- \foreach \macrolist@index in {\listsize{\macrolist@currlist}, ...,\the\numexpr #1+1\relax} {
+ \foreach \macrolist@index in {\macrolistsize{\macrolist@currlist}, ...,\the\numexpr #1+1\relax} {
\global\expandafter\let\csname macrolist@list@\macrolist@currlist\macrolist@index\expandafter\endcsname\csname macrolist@list@\macrolist@currlist\the\numexpr\macrolist@index-1\relax\endcsname
}
\expandafter\gdef\csname macrolist@list@\macrolist@currlist#1\endcsname{#2}
@@ -174,47 +176,47 @@
}
% \fi
%
-% \DescribeMacro{\listremove}
+% \DescribeMacro{\macrolistremove}
%
-% To remove an element in a list, write |\listremove{listname}{index}|.
+% To remove an element in a list, write |\macrolistremove{listname}{index}|.
%
% \iffalse
-\newcommand{\listremove}[2]{
+\newcommand{\macrolistremove}[2]{
\macrolist@inbounds{#1}{#2}
- \ifnum\numexpr#2\relax=\listsize{#1}
+ \ifnum\numexpr#2\relax=\macrolistsize{#1}
\else
- \foreach \macrolist@index in {#2, ..., \the\numexpr\listsize{#1}-1\relax} {
+ \foreach \macrolist@index in {#2, ..., \the\numexpr\macrolistsize{#1}-1\relax} {
\global\expandafter\let\csname macrolist@list@#1\macrolist@index\expandafter\endcsname\csname macrolist@list@#1\the\numexpr\macrolist@index+1\endcsname
}
\fi
- \global\expandafter\let\csname macrolist@list@#1\listsize{#1}\endcsname\relax
+ \global\expandafter\let\csname macrolist@list@#1\macrolistsize{#1}\endcsname\relax
\addtocounter{macrolist@list@#1}{-1}
}
% \fi
%
-% \DescribeMacro{\listremovelast}
+% \DescribeMacro{\macrolistremovelast}
%
-% To remove the last element in a list, write |\listremovelast{listname}|. This behaves like C++'s |pop_back|.
+% To remove the last element in a list, write |\macrolistremovelast{listname}|. This behaves like C++'s |pop_back|.
%
% \iffalse
-\newcommand{\listremovelast}[1]{
+\newcommand{\macrolistremovelast}[1]{
\macrolist@exists{#1}
- \global\expandafter\let\csname macrolist@list@#1\listsize{#1}\endcsname\relax
+ \global\expandafter\let\csname macrolist@list@#1\macrolistsize{#1}\endcsname\relax
\addtocounter{macrolist@list@#1}{-1}
}
% \fi
%
-% \DescribeMacro{\listclear}
+% \DescribeMacro{\macrolistclear}
%
-% To clear a list, write |\listclear{listname}|.
+% To clear a list, write |\macrolistclear{listname}|.
%
% \iffalse
-\newcommand{\listclear}[2]{
+\newcommand{\macrolistclear}[2]{
\macrolist@inbounds{#1}{#2}
- \foreach \macrolist@index in {1, ..., \listsize{#1}} {
+ \foreach \macrolist@index in {1, ..., \macrolistsize{#1}} {
\global\expandafter\let\csname \macrolist@list@#1\macrolist@index\endcsname\relax
}
@@ -222,36 +224,36 @@
}
% \fi
%
-% \DescribeMacro{\listsize}
+% \DescribeMacro{\macrolistsize}
%
-% To get the size of a list, write |\listsize{listname}|.
+% To get the size of a list, write |\macrolistsize{listname}|.
%
% \iffalse
-\newcommand*{\listsize}[1]{%
+\newcommand*{\macrolistsize}[1]{%
\macrolist@exists{#1}%
\csname themacrolist@list@#1\endcsname
}
% \fi
%
-% \DescribeMacro{\listforeach}
+% \DescribeMacro{\macrolistforeach}
% \changes{v1.1.1}{2021/07/23}{Fix foreach doc by removing incorrect begin}
%
% To write a for each loop, write
% \begin{verbatim}
-%\listforeach{listname}{\element}[begin][end]{action}
+%\macrolistforeach{listname}{\element}[begin][end]{action}
% \end{verbatim}
%
%
-% Note that begin and end are optional arguments, and by default, they take the values \textsf{1} and |\listsize{listname}|. If you pass in \textsf{begin}, you must also pass in \textsf{end}.
+% Note that begin and end are optional arguments, and by default, they take the values \textsf{1} and |\macrolistsize{listname}|. If you pass in \textsf{begin}, you must also pass in \textsf{end}.
%
% \iffalse
-\newcommand{\listforeach}[2]
+\newcommand{\macrolistforeach}[2]
{%
\def\macrolist@foreachstart{0}% Reset
% This is used to make optional arguments line up correctly
%
\def\macrolist@start{1}%
- \def\macrolist@end{\listsize{#1}}%
+ \def\macrolist@end{\macrolistsize{#1}}%
\def\macrolist@listname{#1}%
\def\macrolist@element{#2}%
\macrolist@listforeachi
@@ -281,11 +283,11 @@
%
\macrolist@exists{\macrolist@listname}%
%
- \ifnum\numexpr\macrolist@start\relax>\listsize{\macrolist@listname}%
+ \ifnum\numexpr\macrolist@start\relax>\macrolistsize{\macrolist@listname}%
\PackageError{macrolist}{The starting index of the loop is out of the bounds of list '\macrolist@listname'}{}
\fi
%
- \ifnum\numexpr\macrolist@end\relax>\listsize{\macrolist@listname}
+ \ifnum\numexpr\macrolist@end\relax>\macrolistsize{\macrolist@listname}
\PackageError{macrolist}{The ending index of the loop is out of the bounds of list '\macrolist@listname'}{}
\fi
%
@@ -296,17 +298,17 @@
}
% \fi
%
-% \DescribeMacro{\listjoin}
+% \DescribeMacro{\macrolistjoin}
%
-% Executing |\listjoin{listname}{joiner}| returns all of the elements separated by \textsf{joiner}. This behaves like Javascript's \textsf{arr.join()}.
+% Executing |\macrolistjoin{listname}{joiner}| returns all of the elements separated by \textsf{joiner}. This behaves like Javascript's \textsf{arr.join()}.
%
% \iffalse
-\newcommand{\listjoin}[2]{%
- \ifnum\listsize{#1}>1
- \listforeach{#1}{\macrolist@joinelement}[1][\listsize{#1}-1]{\macrolist@joinelement#2}%
+\newcommand{\macrolistjoin}[2]{%
+ \ifnum\macrolistsize{#1}>1
+ \macrolistforeach{#1}{\macrolist@joinelement}[1][\macrolistsize{#1}-1]{\macrolist@joinelement#2}%
\fi
- \ifnum\listsize{#1}>0
- \listelement{#1}{\listsize{#1}}%
+ \ifnum\macrolistsize{#1}>0
+ \macrolistelement{#1}{\macrolistsize{#1}}%
\fi
}
% \fi
@@ -320,28 +322,28 @@
%
%\begin{document}
%
-%\newlist{mylist}
-%\listadd{mylist}{Some text}
+%\macronewlist{mylist}
+%\macrolistadd{mylist}{Some text}
%% List: Some text
%
%\newcommand\macro{This is a macro}
%
-%\listadd{mylist}{\macro}
+%\macrolistadd{mylist}{\macro}
%% List: Some text, \macro
%
-%\listelement{mylist}{1}
+%\macrolistelement{mylist}{1}
%% Prints out "Some text"
%
-%\listadd{mylist}[1]{Element inserted into beginning}
+%\macrolistadd{mylist}[1]{Element inserted into beginning}
%% List: Element inserted into beginning, Some text, \macro
%
-%\listremove{mylist}{1}
+%\macrolistremove{mylist}{1}
%% List: Some text, \macro
%
-%\listforeach{mylist}{\element}{We're printing out \textbf{\element}. }
+%\macrolistforeach{mylist}{\element}{We're printing out \textbf{\element}. }
%% We're printing out \textbf{Some text}. We're printing out \textbf{\macro}.
%
-%\listjoin{mylist}{, }
+%\macrolistjoin{mylist}{, }
%% Some text, \macro
%
%\end{document}
@@ -349,7 +351,7 @@
%
% \section{Limitations}
%
-% The |\listindexof| macro cannot be parsed as a number. This is because we have to compare each element of the list to the passed in element and requires storing the index in a macro, which requires some unexpandable macros. (This is why we do not directly use |\listindexof| when defining |\listcontains|.)
+% The |\macrolistindexof| macro cannot be parsed as a number. This is because we have to compare each element of the list to the passed in element and requires storing the index in a macro, which requires some unexpandable macros. (This is why we do not directly use |\macrolistindexof| when defining |\macrolistcontains|.)
%
% \section{Implementation details}
%
@@ -382,7 +384,7 @@
}{Pass in a number to the second argument of your command.}
\fi
%
- \ifnum\numexpr#2 \relax>\listsize{#1}
+ \ifnum\numexpr#2 \relax>\macrolistsize{#1}
\PackageError{macrolist}
{Index out of bounds}
{The number you have passed in to the second argument of your command\MessageBreak
diff --git a/macros/latex/contrib/macrolist/macrolist.pdf b/macros/latex/contrib/macrolist/macrolist.pdf
index 204fa35c1c..156a8323f3 100644
--- a/macros/latex/contrib/macrolist/macrolist.pdf
+++ b/macros/latex/contrib/macrolist/macrolist.pdf
Binary files differ
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
index c5aeb079d6..b8120a55aa 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.pdf
+++ b/macros/latex/contrib/minimalist/minimalist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.tex b/macros/latex/contrib/minimalist/minimalist-doc.tex
index be388ef8c8..f0d643ab63 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ b/macros/latex/contrib/minimalist/minimalist-doc.tex
@@ -1,7 +1,4 @@
-\documentclass[English,Chinese,French,puretext]{minimart}
-
-\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}[definition]
+\documentclass[English,Chinese,French]{minimart}
\linenumbers % Enable line numbers
@@ -101,7 +98,7 @@
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\minimalist{} 2021/07/27}}
+\thanks{Corresponding to: \texttt{\minimalist{} 2021/07/30}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{July 2021, Beijing}
@@ -405,9 +402,14 @@ In the next section, we will go through the options available.
\begin{itemize}
\item Pure text mode. Does not load theorem-like environments.
\end{itemize}
- \item \texttt{nothmnum}
+ \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
+ \begin{itemize}
+ \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \end{itemize}
+ \item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
- \item Theorem-like environments will not be numbered.
+ \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.
\end{itemize}
\end{itemize}
@@ -417,7 +419,7 @@ Additionally, \minimart{} and \minimbook{} offers the following options:
\begin{itemize}
\item Optional paper size. The default paper size is 7in $\times$ 10in.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{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.
@@ -497,7 +499,7 @@ After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
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.
+By default, when referenced, the name of the theorem matches the current context. For example, the definition above will be displayed in French in the current French context: \cref{def: strange,thm}. If you want the name of the theorem to always match the language of the context in which the theorem is located, you can add \texttt{originalref} to the global options.
\end{tip}
\UseLanguage{English}
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 9ae2e948b5..9f972f569d 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{minimalist}
- [2021/07/27 A simple and clear style for articles and books]
+ [2021/07/30 A simple and clear style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -29,11 +29,17 @@
\DeclareBoolOption[false]{puretext}
\DeclareBoolOption[false]{nothms}
\DeclareBoolOption[false]{nothmnum}
+\DeclareStringOption{thmnum}[minimalist@thmnum@default]
+\DeclareBoolOption[true]{regionalref}
+\DeclareBoolOption[false]{originalref}
\DeclareBoolOption[false]{allowbf}
\DeclareBoolOption[false]{classical}
\DeclareBoolOption[false]{runin}
\ProcessKeyvalOptions*\relax
+\if@minimalist@originalref
+ \@minimalist@regionalreffalse
+\fi
\if@minimalist@draft
\@minimalist@fasttrue
\fi
@@ -41,6 +47,21 @@
\@minimalist@nothmstrue
\fi
+\if@minimalist@fast
+ \PassOptionsToPackage{fast}{PJLdraft}
+ \PassOptionsToPackage{fast}{PJLthm}
+\fi
+\expandafter\ifstrempty\expandafter{\@minimalist@thmnum}{}{
+ \expandafter\ifstrequal\expandafter{\@minimalist@thmnum}{minimalist@thmnum@default}{
+ \PassOptionsToPackage{thmnum}{PJLthm}
+ }{
+ \PassOptionsToPackage{thmnum=\@minimalist@thmnum}{PJLthm}
+ }
+}
+\if@minimalist@regionalref\else
+ \PassOptionsToPackage{originalref}{PJLthm}
+\fi
+
\if@minimalist@allowbf
\newcommand{\conditionalbfseries}{\bfseries\colorlet{PJLtempcolor}{.}\color{PJLtempcolor!83!paper}}
\else
@@ -681,12 +702,8 @@
\pretocmd{\remarknameES}{\itshape}{}{\FAIL}
\pretocmd{\observationnameES}{\itshape}{}{\FAIL}
+\AtEndPreamble{
\theoremstyle{simple}
-\ifbool{IsBook}{
- \newaliascnt{highest}{chapter}
-}{
- \newaliascnt{highest}{section}
-}
\if@minimalist@nothms\else
\if@minimalist@nothmnum
\CreateTheorem*{theorem}
@@ -699,7 +716,7 @@
\CreateTheorem*{fact}
\CreateTheorem*{conjecture}
\else
-\CreateTheorem{theorem}<highest>
+\CreateTheorem@thmnum{theorem}
\CreateTheorem{lemma}[theorem]
\CreateTheorem{proposition}[theorem]
\CreateTheorem{corollary}[theorem]
@@ -755,12 +772,13 @@
\CreateTheorem*{remark}
\CreateTheorem*{observation}
\else
-\CreateTheorem{remark}<highest>
-\CreateTheorem{observation}<highest>
+\CreateTheorem@thmnum{remark}
+\CreateTheorem@thmnum{observation}
\fi
\CreateTheorem*{remark*}
\CreateTheorem*{observation*}
\fi
+}
\ifbool{IsBook}{}{%
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 8953e92b7c..a8c8ae4754 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{minimart}
- [2021/07/27 A simple and clear article style]
+ [2021/07/30 A simple and clear article style]
\def\minimclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -33,6 +33,7 @@
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
+\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
@@ -60,6 +61,9 @@
\if@minimclass@garamond
\@minimclass@customfonttrue
\fi
+\if@minimclass@noto
+ \@minimclass@customfonttrue
+\fi
\if@minimclass@biolinum
\@minimclass@customfonttrue
\fi
@@ -154,6 +158,16 @@
\PJLsetlinespacing{\setstretch{1.00}}
\fi
+\if@minimclass@noto
+ \RequirePackage{amssymb}
+ \if@minimclass@useosf
+ \PassOptionsToPackage{oldstyle}{notomath}
+ \fi
+ \RequirePackage{anyfontsize}
+ \RequirePackage{notomath}
+ \PJLsetlinespacing{\setstretch{1.00}}
+\fi
+
\if@minimclass@biolinum
\RequirePackage{amssymb}
% \RequirePackage{mathpazo}
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index 83a16c03f4..68c787254a 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{minimbook}
- [2021/07/27 A simple and clear book style]
+ [2021/07/30 A simple and clear book style]
\def\minimclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -33,6 +33,7 @@
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
+\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
@@ -60,6 +61,9 @@
\if@minimclass@garamond
\@minimclass@customfonttrue
\fi
+\if@minimclass@noto
+ \@minimclass@customfonttrue
+\fi
\if@minimclass@biolinum
\@minimclass@customfonttrue
\fi
@@ -154,6 +158,16 @@
\PJLsetlinespacing{\setstretch{1.00}}
\fi
+\if@minimclass@noto
+ \RequirePackage{amssymb}
+ \if@minimclass@useosf
+ \PassOptionsToPackage{oldstyle}{notomath}
+ \fi
+ \RequirePackage{anyfontsize}
+ \RequirePackage{notomath}
+ \PJLsetlinespacing{\setstretch{1.00}}
+\fi
+
\if@minimclass@biolinum
\RequirePackage{amssymb}
% \RequirePackage{mathpazo}
diff --git a/macros/latex/contrib/palette/README.md b/macros/latex/contrib/palette/README.md
index ad51848050..f46fee937a 100644
--- a/macros/latex/contrib/palette/README.md
+++ b/macros/latex/contrib/palette/README.md
@@ -1,8 +1,8 @@
-# The LaTeX package palette - version 1.0.0 (2021/07/27)
+# The LaTeX package palette - version 1.1.0 (2021/07/29)
**palette** provides the ability to create custom color palettes and symbol palettes ("symbol suites"), and swap one palette in for another easily. It also allows the user to create a variable that represents the selected palette, and provides checks in case the variable represents a palette that does not exist.
-The package is split into `colorpalette` and `symbolsuite`.
+The package is split into `colorpalette` and `symbolpalette`.
## Installation instructions
diff --git a/macros/latex/contrib/palette/palette.dtx b/macros/latex/contrib/palette/palette.dtx
index b66fc4875e..d4e09f3d8a 100644
--- a/macros/latex/contrib/palette/palette.dtx
+++ b/macros/latex/contrib/palette/palette.dtx
@@ -17,11 +17,11 @@
\iffalse
%</internal>
%<*readme>
-# The LaTeX package palette - version 1.0.0 (2021/07/27)
+# The LaTeX package palette - version 1.1.0 (2021/07/29)
**palette** provides the ability to create custom color palettes and symbol palettes ("symbol suites"), and swap one palette in for another easily. It also allows the user to create a variable that represents the selected palette, and provides checks in case the variable represents a palette that does not exist.
-The package is split into `colorpalette` and `symbolsuite`.
+The package is split into `colorpalette` and `symbolpalette`.
## Installation instructions
@@ -123,14 +123,14 @@ This package consists of the file palette.dtx,
%
%<color|symbol>\NeedsTeXFormat{LaTeX2e}
%<color>\ProvidesPackage{colorpalette}
-%<symbol>\ProvidesPackage{symbolsuite}
-%<color|symbol>[2021/07/27 v1.0.0 Create palettes for colors and symbols]
+%<symbol>\ProvidesPackage{symbolpalette}
+%<color|symbol>[2021/07/29 v1.1.0 Create palettes for colors and symbols]
%<color>\RequirePackage{xcolor}
%<*color|symbol>
\RequirePackage{macrolist}
%</color|symbol>
%<*driver>
-\ProvidesFile{\jobname.dtx}[2021/07/27 v1.0.0 Create palettes for colors and symbols]
+\ProvidesFile{\jobname.dtx}[2021/07/29 v1.1.0 Create palettes for colors and symbols]
\documentclass{ltxdoc}
\EnableCrossrefs
@@ -147,6 +147,7 @@ This package consists of the file palette.dtx,
%
% \GetFileInfo{\jobname.dtx}
%
+% \changes{v1.1.0}{2021/07/29}{Update macrolist (to get compatibility with etoolbox)}
% \changes{v1.0.0}{2021/07/27}{Initial version}
%
% \title{\textsf{palette} -- Create palettes for colors and symbols}
@@ -160,7 +161,7 @@ This package consists of the file palette.dtx,
% \end{abstract}
%
% \section{Overview}
-% We will go over the basic structure of the user interface in broad terms first (i.e. no macros or environments yet). We will use \textsf{colorpalette} as our example here, but \textsf{symbolsuite} behaves virtually identically.
+% We will go over the basic structure of the user interface in broad terms first (i.e. no macros or environments yet). We will use \textsf{colorpalette} as our example here, but \textsf{symbolpalette} behaves virtually identically.
%
% First, the user can create palette \emph{themes}, which are independent from each other. Then, you can add colors to themes. Finally, you can make a palette associated with a theme and set its colors.
%
@@ -174,8 +175,8 @@ This package consists of the file palette.dtx,
% \iffalse
%<*color>
\newcommand\newpalettetheme[1]{
- \newlist{colorpalette@theme@#1@palettes}
- \newlist{colorpalette@theme@#1@colors}
+ \macronewlist{colorpalette@theme@#1@palettes}
+ \macronewlist{colorpalette@theme@#1@colors}
}
%</color>
% \fi
@@ -186,7 +187,7 @@ This package consists of the file palette.dtx,
%<*color>
\newcommand\addcolortotheme[2]{
\colorpalette@themecheck{#1}
- \listadd{colorpalette@theme@#1@colors}{#2}
+ \macrolistadd{colorpalette@theme@#1@colors}{#2}
}
%</color>
% \fi
@@ -201,7 +202,7 @@ This package consists of the file palette.dtx,
\newcommand\newpalette[2]{
% Check that the theme exists
\colorpalette@themecheck{#1}
- \listadd{colorpalette@theme@#1@palettes}{#2}
+ \macrolistadd{colorpalette@theme@#1@palettes}{#2}
}
%</color>
% \fi
@@ -266,9 +267,9 @@ This package consists of the file palette.dtx,
% \subsection{Error Messages}
% \iffalse
%<*color>
-\newcommand\colorpalette@themecheck[1]{\listexists{colorpalette@theme@#1@palettes}{}{\colorpalette@error@theme{#1}}}
-\newcommand\colorpalette@palettecheck[2]{\listcontains{colorpalette@theme@#1@palettes}{#2}{}{\colorpalette@error@palette{#1}{#2}}}
-\newcommand\colorpalette@colorcheck[2]{\listcontains{colorpalette@theme@#1@colors}{#2}{}{\colorpalette@error@color{#1}{#2}}}
+\newcommand\colorpalette@themecheck[1]{\macrolistexists{colorpalette@theme@#1@palettes}{}{\colorpalette@error@theme{#1}}}
+\newcommand\colorpalette@palettecheck[2]{\macrolistcontains{colorpalette@theme@#1@palettes}{#2}{}{\colorpalette@error@palette{#1}{#2}}}
+\newcommand\colorpalette@colorcheck[2]{\macrolistcontains{colorpalette@theme@#1@colors}{#2}{}{\colorpalette@error@color{#1}{#2}}}
%</color>
% \fi
%
@@ -307,8 +308,8 @@ This package consists of the file palette.dtx,
% \iffalse
%<*symbol>
\newcommand\newsuitetheme[1]{
- \newlist{symbolsuite@theme@#1@suites}
- \newlist{symbolsuite@theme@#1@symbols}
+ \macronewlist{symbolsuite@theme@#1@suites}
+ \macronewlist{symbolsuite@theme@#1@symbols}
}
%</symbol>
% \fi
@@ -319,7 +320,7 @@ This package consists of the file palette.dtx,
%<*symbol>
\newcommand\addsymboltotheme[2]{
\symbolsuite@themecheck{#1}
- \listadd{symbolsuite@theme@#1@symbols}{#2}
+ \macrolistadd{symbolsuite@theme@#1@symbols}{#2}
}
%</symbol>
% \fi
@@ -333,7 +334,7 @@ This package consists of the file palette.dtx,
%<*symbol>
\newcommand\newsuite[2]{
\symbolsuite@themecheck{#1}
- \listadd{symbolsuite@theme@#1@suites}{#2}
+ \macrolistadd{symbolsuite@theme@#1@suites}{#2}
}
%</symbol>
% \fi
@@ -373,9 +374,9 @@ This package consists of the file palette.dtx,
% \subsection{Error Messages}
% \iffalse
%<*symbol>
-\newcommand\symbolsuite@themecheck[1]{\listexists{symbolsuite@theme@#1@suites}{}{\symbolsuite@error@theme{#1}}}
-\newcommand\symbolsuite@suitecheck[2]{\listcontains{symbolsuite@theme@#1@suites}{#2}{}{\symbolsuite@error@suite{#1}{#2}}}
-\newcommand\symbolsuite@symbolcheck[2]{\listcontains{symbolsuite@theme@#1@symbols}{#2}{}{\symbolsuite@error@symbol{#1}{#2}}}
+\newcommand\symbolsuite@themecheck[1]{\macrolistexists{symbolsuite@theme@#1@suites}{}{\symbolsuite@error@theme{#1}}}
+\newcommand\symbolsuite@suitecheck[2]{\macrolistcontains{symbolsuite@theme@#1@suites}{#2}{}{\symbolsuite@error@suite{#1}{#2}}}
+\newcommand\symbolsuite@symbolcheck[2]{\macrolistcontains{symbolsuite@theme@#1@symbols}{#2}{}{\symbolsuite@error@symbol{#1}{#2}}}
%</symbol>
% \fi
%
@@ -383,21 +384,22 @@ This package consists of the file palette.dtx,
% \begin{verbatim}The palette passed in is not a defined palette of theme `#1'\end{verbatim}
% where |#1| is the name of the theme.
% \iffalse
-%<symbol>\newcommand\symbolsuite@error@theme[1]{\PackageError{symbolsuite}{The theme `#1' passed in is not defined}{}}
+%<symbol>\newcommand\symbolsuite@error@theme[1]{\PackageError{symbolpalette}{The theme `#1' passed in is not defined}{}}
% \fi
%
% If a suite that does not belong to a theme is passed in, the following error will be thrown:
% \begin{verbatim}The suite `#2' passed in is not a defined suite of theme `#1'\end{verbatim}
% where |#1| is the name of the theme and |#2| is the name of the suite.
% \iffalse
-%<symbol>\newcommand\symbolsuite@error@suite[2]{\PackageError{symbolsuite}{The suite `#2' passed in is not a defined suite of theme `#1'}{}}
+%<symbol>\newcommand\symbolsuite@error@suite[2]{\PackageError{symbolpalette}{The suite `#2' passed in is not a defined suite of theme `#1'}{}}
% \fi
%
% If a symbol that does not belong to a theme is passed in, the following error will be thrown:
% \begin{verbatim}The symbol `#2' passed in is not a defined symbol of theme `#1'\end{verbatim}
% where |#1| is the name of the theme and |#2| is the name of the symbol.
+% \changes{v1.0.1}{2020/07/28}{Make error message refer to symbol, not color}
% \iffalse
-%<symbol>\newcommand\symbolsuite@error@symbol[2]{\PackageError{symbolsuite}{The symbol `#2' passed in is not a defined color of theme `#1'}{}}
+%<symbol>\newcommand\symbolsuite@error@symbol[2]{\PackageError{symbolpalette}{The symbol `#2' passed in is not a defined symbol of theme `#1'}{}}
% \fi
% \Finale
%
diff --git a/macros/latex/contrib/palette/palette.pdf b/macros/latex/contrib/palette/palette.pdf
index 12a95fc0b7..041375249e 100644
--- a/macros/latex/contrib/palette/palette.pdf
+++ b/macros/latex/contrib/palette/palette.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index fe8a0f459a..bc47e1c0c6 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index b86cc30b19..18f374500e 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
index ad837cfa82..1b11d43a80 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc.dtx b/macros/latex/contrib/projlib/ProjLib-doc.dtx
index aafece21f6..05c3977be8 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc.dtx
+++ b/macros/latex/contrib/projlib/ProjLib-doc.dtx
@@ -108,7 +108,7 @@
%<*ProjLib-doc-cn>
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/07/27}}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/07/30}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{2021年7月,北京}
%</ProjLib-doc-cn>
@@ -116,7 +116,7 @@
%<*ProjLib-doc-en>
\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/07/27}}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/07/30}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{July 2021, Beijing}
%</ProjLib-doc-en>
@@ -124,9 +124,9 @@
%<*ProjLib-doc-fr>
\title{La boîte à outils~\,\ProjLib{}\\[.3\baselineskip]\normalsize Manuel d'utilisation}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\ProjLib{}~2021/07/27}}
+\thanks{Correspondant à : \texttt{\ProjLib{}~2021/07/30}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{juillet 2021, à Pékin}
+\date{Juillet 2021, à Pékin}
%</ProjLib-doc-fr>
\maketitle
@@ -210,7 +210,7 @@ The \ProjLib{} toolkit is composed of the main package \ProjLibPackage{} and a s
Le nom \ProjLib{} peut être considéré comme l'abréviation de \emph{Project Library} en anglais ou de \emph{Projet Libre} en français (l'auteur préfère l'interprétation française). Son objectif principal est de fournir un support multilingue et des environnements de type théorème avec des références intelligentes. De plus, certaines fonctionnalités supplémentaires sont fournies, telles que le bloc auteur amélioré, les marques de brouillon, les symboles mathématiques et les raccourcis, etc.
-La boîte à outils \ProjLib{} est composée du package principal \ProjLibPackage{} et d'une série de composants dont les noms commencent par l'abréviation « PJL ». Vous pouvez apprendre à l'utiliser à travers les exemples d'utilisation dans la section suivante.
+La boîte à outils \ProjLib{} est composée du package principal \ProjLibPackage{} et d'une série de composants dont les noms commencent par l'abréviation «~PJL~». Vous pouvez apprendre à l'utiliser à travers les exemples d'utilisation dans la section suivante.
%</ProjLib-doc-fr>
%<*ProjLib-doc-cn>
@@ -594,12 +594,12 @@ Les environnements de type théorème couramment utilisés ont été prédéfini
\begin{itemize}
\item 快速模式。功能会适当缩减,但能够提高编译速度,建议在撰写阶段使用。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
\item \texttt{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{nothms}、\texttt{nothmnum}、\texttt{regionalref}
+ \item \texttt{nothms}、\texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}、\texttt{regionalref}、\texttt{originalref}
\begin{itemize}
\item 来自用于设置定理类环境的组件 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。
\end{itemize}
@@ -624,12 +624,12 @@ Les environnements de type théorème couramment utilisés ont été prédéfini
\begin{itemize}
\item Fast mode. The functionality will be appropriately reduced to get faster compilation speed, recommended to use during the writing stage.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
\begin{itemize}
\item Font options. As the names suggest, font with corresponding name will be loaded.
\item The \texttt{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{nothms}, \texttt{nothmnum}, \texttt{regionalref}
+ \item \texttt{nothms}, \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}, \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
\item Options from the component \PJLthm{} used for setting theorem-like environments, please refer to the section on this package for details.
\end{itemize}
@@ -654,12 +654,12 @@ In addition, there are also some options of the components that should be passed
\begin{itemize}
\item Mode brouillon. La fonctionnalité sera réduite de manière appropriée pour obtenir une vitesse de compilation plus rapide, recommandée à utiliser pendant la phase de brouillon.
\end{itemize}
- \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
\begin{itemize}
\item Options de police. Comme les noms l'indiquent, la police avec le nom correspondant sera utilisée.
\item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{nothms}, \texttt{nothmnum}, \texttt{regionalref}
+ \item \texttt{nothms}, \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}, \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
\item Options du composant \PJLthm{} utilisé pour définir des environnements de type théorème, veuillez vous référer à la section sur ce package pour plus de détails.
\end{itemize}
@@ -792,7 +792,7 @@ For details on how to select a language, please refer to the section on \PJLlang
%<*ProjLib-doc-fr>
\subsection{PJLdate : traitement de date-heure}
-\PJLdatePackage{} propose la macro \lstinline|\PLdate|\meta{yyyy-mm-dd} (ou \lstinline|\PJLdate|\meta{yyyy-mm-dd}) pour convertir \meta{yyyy-mm-dd} dans le format de date de la langue actuellement sélectionnée. Par exemple, dans le contexte français actuel, \lstinline|\PLdate{2022-04-01}| deviendrait « \PLdate{2022-04-01} », tandis que dans le contexte anglais « \UseOtherLanguage{English}{\PLdate{2022-04-01}} ».
+\PJLdatePackage{} propose la macro \lstinline|\PLdate|\meta{yyyy-mm-dd} (ou \lstinline|\PJLdate|\meta{yyyy-mm-dd}) pour convertir \meta{yyyy-mm-dd} dans le format de date de la langue actuellement sélectionnée. Par exemple, dans le contexte français actuel, \lstinline|\PLdate{2022-04-01}| deviendrait «~\PLdate{2022-04-01}~», tandis que dans le contexte anglais «~\UseOtherLanguage{English}{\PLdate{2022-04-01}}~».
Pour plus de détails sur la façon de sélectionner une langue, veuillez vous référer à la section sur \PJLlang{}.
%</ProjLib-doc-fr>
@@ -1286,13 +1286,14 @@ Il est recommandé de les passer comme options globales de la classe de document
\begin{itemize}
\item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。
\end{itemize}
- \item \texttt{nothmnum}
+ \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item 使定理类环境均不编号。
+ \item 使定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
- \item \texttt{regionalref}
+ \item \texttt{regionalref}、\texttt{originalref}
\begin{itemize}
- \item 在智能引用时,定理类环境的名称随当前语言而变化(默认情况下,引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem)。在 \texttt{fast} 模式下,这一选项默认启用。
+ \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。
+ \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。
\end{itemize}
\end{itemize}
@@ -1391,13 +1392,14 @@ Il est recommandé de les passer comme options globales de la classe de document
\begin{itemize}
\item Theorem-like environments will not be defined. You may use this option if you wish to apply your own theorem styles.
\end{itemize}
- \item \texttt{nothmnum}
+ \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered.
+ \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
\end{itemize}
- \item \texttt{regionalref}
+ \item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
- \item When referencing, name of the theorem-like environment will change with the current language (by default, the name will always remain the same; 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''). In \texttt{fast} mode, this option is automatically enabled.
+ \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.
\end{itemize}
\end{itemize}
@@ -1498,18 +1500,19 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm
\begin{itemize}
\item Les environnements de type théorème ne seront pas définis. Vous pouvez utiliser cette option si vous souhaitez appliquer vos propres styles de théorème.
\end{itemize}
- \item \texttt{nothmnum}
+ \item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Les environnements de type théorème ne seront pas numérotés.
+ \item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule. 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}
+ \item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
- \item Lors du référencement, le nom de l'environnement de type théorème changera avec la langue actuelle (par défaut, le nom restera toujours le même ; par exemple, lors du référencement d'un théorème écrit dans le contexte anglais, même si l'on est actuellement dans le contexte français , il sera toujours affiché comme « Theorem »). En mode \texttt{fast}, cette option est automatiquement activée.
+ \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.
\end{itemize}
\end{itemize}
\medskip
-Les environnements prédéfinis incluent : \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{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, et la version non numérotée correspondante avec un astérisque \lstinline|*| dans le nom. Les titres changeront avec la langue actuelle. Par exemple, \texttt{theorem} sera affiché comme « Theorem » en mode anglais et « Théorème » en mode français. Pour plus de détails sur la façon de sélectionner une langue, veuillez vous référer à la section sur \PJLlang{}.
+Les environnements prédéfinis incluent : \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{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, et la version non numérotée correspondante avec un astérisque \lstinline|*| dans le nom. Les titres changeront avec la langue actuelle. Par exemple, \texttt{theorem} sera affiché comme «~Theorem~» en mode anglais et «~Théorème~» en mode français. Pour plus de détails sur la façon de sélectionner une langue, veuillez vous référer à la section sur \PJLlang{}.
\begin{tip}
Lors du référencement d'un environnement de type théorème, il est recommandé d'utiliser \lstinline|\cref{|\meta{label}\texttt{\}}. De cette façon, il n'est pas nécessaire d'écrire explicitement le nom de l'environnement correspondant à chaque fois.
@@ -1522,7 +1525,6 @@ Si vous avez besoin de définir un nouvel environnement de type théorème, vous
\end{itemize}
Pour \meta{language name}, veuillez vous référer à la section sur \PJLlang{}. Lorsque \meta{language name} n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc, \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
-\clearpage
Ensuite, créez cet environnement de l'une des cinq manières suivantes :
\vspace{-.3\baselineskip}
\begin{itemize}
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 59be20a95b..583e08f3cb 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -18,47 +18,47 @@
%
%<*ProjLib>
\ProvidesPackage{ProjLib}
- [2021/07/27 The collective interface of ProjLib toolkit]
+ [2021/07/30 The collective interface of ProjLib toolkit]
%</ProjLib>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/07/27 Enhanced author information block]
+ [2021/07/30 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/07/27 Convert yyyy-mm-dd to normal datetime format]
+ [2021/07/30 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/07/27 Some useful macros for the draft stage]
+ [2021/07/30 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/07/27 Multi-language configuration]
+ [2021/07/30 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/07/27 The ProjLib logo]
+ [2021/07/30 The ProjLib logo]
%</PJLlogo>
%
%<*PJLmath>
\ProvidesPackage{PJLmath}
- [2021/07/27 Useful math macros and shortcuts]
+ [2021/07/30 Useful math macros and shortcuts]
%</PJLmath>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/07/27 Paper style configuration]
+ [2021/07/30 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/07/27 Theorem setup and configuration]
+ [2021/07/30 Theorem setup and configuration]
%</PJLthm>
%
%# 下面两行引入宏包的代码是所有文件共用的。
@@ -1005,269 +1005,269 @@
%%================================
%# 常见代数结构的捷径
%# Shortcuts for commonly used algebraic structures
-\def\N{\ensuremath{\mathbb{N}}}
-\def\Z{\ensuremath{\mathbb{Z}}}
-\def\Q{\ensuremath{\mathbb{Q}}}
-\def\R{\ensuremath{\mathbb{R}}}
-\def\C{\ensuremath{\mathbb{C}}}
-\def\F{\ensuremath{\mathbb{F}}}
-\def\A{\ensuremath{\mathbb{A}}}
+\providecommand{\N}{\ensuremath{\mathbb{N}}}
+\providecommand{\Z}{\ensuremath{\mathbb{Z}}}
+\providecommand{\Q}{\ensuremath{\mathbb{Q}}}
+\providecommand{\R}{\ensuremath{\mathbb{R}}}
+\providecommand{\C}{\ensuremath{\mathbb{C}}}
+\providecommand{\F}{\ensuremath{\mathbb{F}}}
+\providecommand{\A}{\ensuremath{\mathbb{A}}}
%# mathbb 的捷径
%# Shortcuts for blackboard bold face
-\def\bb#1{\ensuremath{\mathbb{#1}}}
-\def\bbA{\ensuremath{\mathbb{A}}}
-\def\bbB{\ensuremath{\mathbb{B}}}
-\def\bbC{\ensuremath{\mathbb{C}}}
-\def\bbD{\ensuremath{\mathbb{D}}}
-\def\bbE{\ensuremath{\mathbb{E}}}
-\def\bbF{\ensuremath{\mathbb{F}}}
-\def\bbG{\ensuremath{\mathbb{G}}}
-\def\bbH{\ensuremath{\mathbb{H}}}
-\def\bbI{\ensuremath{\mathbb{I}}}
-\def\bbJ{\ensuremath{\mathbb{J}}}
-\def\bbK{\ensuremath{\mathbb{K}}}
-\def\bbL{\ensuremath{\mathbb{L}}}
-\def\bbM{\ensuremath{\mathbb{M}}}
-\def\bbN{\ensuremath{\mathbb{N}}}
-\def\bbO{\ensuremath{\mathbb{O}}}
-\def\bbP{\ensuremath{\mathbb{P}}}
-\def\bbQ{\ensuremath{\mathbb{Q}}}
-\def\bbR{\ensuremath{\mathbb{R}}}
-\def\bbS{\ensuremath{\mathbb{S}}}
-\def\bbT{\ensuremath{\mathbb{T}}}
-\def\bbU{\ensuremath{\mathbb{U}}}
-\def\bbV{\ensuremath{\mathbb{V}}}
-\def\bbW{\ensuremath{\mathbb{W}}}
-\def\bbX{\ensuremath{\mathbb{X}}}
-\def\bbY{\ensuremath{\mathbb{Y}}}
-\def\bbZ{\ensuremath{\mathbb{Z}}}
+\providecommand{\bb}[1]{\ensuremath{\mathbb{#1}}}
+\providecommand{\bbA}{\ensuremath{\mathbb{A}}}
+\providecommand{\bbB}{\ensuremath{\mathbb{B}}}
+\providecommand{\bbC}{\ensuremath{\mathbb{C}}}
+\providecommand{\bbD}{\ensuremath{\mathbb{D}}}
+\providecommand{\bbE}{\ensuremath{\mathbb{E}}}
+\providecommand{\bbF}{\ensuremath{\mathbb{F}}}
+\providecommand{\bbG}{\ensuremath{\mathbb{G}}}
+\providecommand{\bbH}{\ensuremath{\mathbb{H}}}
+\providecommand{\bbI}{\ensuremath{\mathbb{I}}}
+\providecommand{\bbJ}{\ensuremath{\mathbb{J}}}
+\providecommand{\bbK}{\ensuremath{\mathbb{K}}}
+\providecommand{\bbL}{\ensuremath{\mathbb{L}}}
+\providecommand{\bbM}{\ensuremath{\mathbb{M}}}
+\providecommand{\bbN}{\ensuremath{\mathbb{N}}}
+\providecommand{\bbO}{\ensuremath{\mathbb{O}}}
+\providecommand{\bbP}{\ensuremath{\mathbb{P}}}
+\providecommand{\bbQ}{\ensuremath{\mathbb{Q}}}
+\providecommand{\bbR}{\ensuremath{\mathbb{R}}}
+\providecommand{\bbS}{\ensuremath{\mathbb{S}}}
+\providecommand{\bbT}{\ensuremath{\mathbb{T}}}
+\providecommand{\bbU}{\ensuremath{\mathbb{U}}}
+\providecommand{\bbV}{\ensuremath{\mathbb{V}}}
+\providecommand{\bbW}{\ensuremath{\mathbb{W}}}
+\providecommand{\bbX}{\ensuremath{\mathbb{X}}}
+\providecommand{\bbY}{\ensuremath{\mathbb{Y}}}
+\providecommand{\bbZ}{\ensuremath{\mathbb{Z}}}
%# mathcal 的捷径
%# Shortcuts for calligraphic shape
-\def\mc#1{\ensuremath{\mathcal{#1}}}
-\def\mcA{\ensuremath{\mathcal{A}}}
-\def\mcB{\ensuremath{\mathcal{B}}}
-\def\mcC{\ensuremath{\mathcal{C}}}
-\def\mcD{\ensuremath{\mathcal{D}}}
-\def\mcE{\ensuremath{\mathcal{E}}}
-\def\mcF{\ensuremath{\mathcal{F}}}
-\def\mcG{\ensuremath{\mathcal{G}}}
-\def\mcH{\ensuremath{\mathcal{H}}}
-\def\mcI{\ensuremath{\mathcal{I}}}
-\def\mcJ{\ensuremath{\mathcal{J}}}
-\def\mcK{\ensuremath{\mathcal{K}}}
-\def\mcL{\ensuremath{\mathcal{L}}}
-\def\mcM{\ensuremath{\mathcal{M}}}
-\def\mcN{\ensuremath{\mathcal{N}}}
-\def\mcO{\ensuremath{\mathcal{O}}}
-\def\mcP{\ensuremath{\mathcal{P}}}
-\def\mcQ{\ensuremath{\mathcal{Q}}}
-\def\mcR{\ensuremath{\mathcal{R}}}
-\def\mcS{\ensuremath{\mathcal{S}}}
-\def\mcT{\ensuremath{\mathcal{T}}}
-\def\mcU{\ensuremath{\mathcal{U}}}
-\def\mcV{\ensuremath{\mathcal{V}}}
-\def\mcW{\ensuremath{\mathcal{W}}}
-\def\mcX{\ensuremath{\mathcal{X}}}
-\def\mcY{\ensuremath{\mathcal{Y}}}
-\def\mcZ{\ensuremath{\mathcal{Z}}}
-
-\def\cal#1{\ensuremath{\mathcal{#1}}}
-\def\calA{\ensuremath{\mathcal{A}}}
-\def\calB{\ensuremath{\mathcal{B}}}
-\def\calC{\ensuremath{\mathcal{C}}}
-\def\calD{\ensuremath{\mathcal{D}}}
-\def\calE{\ensuremath{\mathcal{E}}}
-\def\calF{\ensuremath{\mathcal{F}}}
-\def\calG{\ensuremath{\mathcal{G}}}
-\def\calH{\ensuremath{\mathcal{H}}}
-\def\calI{\ensuremath{\mathcal{I}}}
-\def\calJ{\ensuremath{\mathcal{J}}}
-\def\calK{\ensuremath{\mathcal{K}}}
-\def\calL{\ensuremath{\mathcal{L}}}
-\def\calM{\ensuremath{\mathcal{M}}}
-\def\calN{\ensuremath{\mathcal{N}}}
-\def\calO{\ensuremath{\mathcal{O}}}
-\def\calP{\ensuremath{\mathcal{P}}}
-\def\calQ{\ensuremath{\mathcal{Q}}}
-\def\calR{\ensuremath{\mathcal{R}}}
-\def\calS{\ensuremath{\mathcal{S}}}
-\def\calT{\ensuremath{\mathcal{T}}}
-\def\calU{\ensuremath{\mathcal{U}}}
-\def\calV{\ensuremath{\mathcal{V}}}
-\def\calW{\ensuremath{\mathcal{W}}}
-\def\calX{\ensuremath{\mathcal{X}}}
-\def\calY{\ensuremath{\mathcal{Y}}}
-\def\calZ{\ensuremath{\mathcal{Z}}}
+\providecommand{\mc}[1]{\ensuremath{\mathcal{#1}}}
+\providecommand{\mcA}{\ensuremath{\mathcal{A}}}
+\providecommand{\mcB}{\ensuremath{\mathcal{B}}}
+\providecommand{\mcC}{\ensuremath{\mathcal{C}}}
+\providecommand{\mcD}{\ensuremath{\mathcal{D}}}
+\providecommand{\mcE}{\ensuremath{\mathcal{E}}}
+\providecommand{\mcF}{\ensuremath{\mathcal{F}}}
+\providecommand{\mcG}{\ensuremath{\mathcal{G}}}
+\providecommand{\mcH}{\ensuremath{\mathcal{H}}}
+\providecommand{\mcI}{\ensuremath{\mathcal{I}}}
+\providecommand{\mcJ}{\ensuremath{\mathcal{J}}}
+\providecommand{\mcK}{\ensuremath{\mathcal{K}}}
+\providecommand{\mcL}{\ensuremath{\mathcal{L}}}
+\providecommand{\mcM}{\ensuremath{\mathcal{M}}}
+\providecommand{\mcN}{\ensuremath{\mathcal{N}}}
+\providecommand{\mcO}{\ensuremath{\mathcal{O}}}
+\providecommand{\mcP}{\ensuremath{\mathcal{P}}}
+\providecommand{\mcQ}{\ensuremath{\mathcal{Q}}}
+\providecommand{\mcR}{\ensuremath{\mathcal{R}}}
+\providecommand{\mcS}{\ensuremath{\mathcal{S}}}
+\providecommand{\mcT}{\ensuremath{\mathcal{T}}}
+\providecommand{\mcU}{\ensuremath{\mathcal{U}}}
+\providecommand{\mcV}{\ensuremath{\mathcal{V}}}
+\providecommand{\mcW}{\ensuremath{\mathcal{W}}}
+\providecommand{\mcX}{\ensuremath{\mathcal{X}}}
+\providecommand{\mcY}{\ensuremath{\mathcal{Y}}}
+\providecommand{\mcZ}{\ensuremath{\mathcal{Z}}}
+
+\providecommand{\cal}[1]{\ensuremath{\mathcal{#1}}}
+\providecommand{\calA}{\ensuremath{\mathcal{A}}}
+\providecommand{\calB}{\ensuremath{\mathcal{B}}}
+\providecommand{\calC}{\ensuremath{\mathcal{C}}}
+\providecommand{\calD}{\ensuremath{\mathcal{D}}}
+\providecommand{\calE}{\ensuremath{\mathcal{E}}}
+\providecommand{\calF}{\ensuremath{\mathcal{F}}}
+\providecommand{\calG}{\ensuremath{\mathcal{G}}}
+\providecommand{\calH}{\ensuremath{\mathcal{H}}}
+\providecommand{\calI}{\ensuremath{\mathcal{I}}}
+\providecommand{\calJ}{\ensuremath{\mathcal{J}}}
+\providecommand{\calK}{\ensuremath{\mathcal{K}}}
+\providecommand{\calL}{\ensuremath{\mathcal{L}}}
+\providecommand{\calM}{\ensuremath{\mathcal{M}}}
+\providecommand{\calN}{\ensuremath{\mathcal{N}}}
+\providecommand{\calO}{\ensuremath{\mathcal{O}}}
+\providecommand{\calP}{\ensuremath{\mathcal{P}}}
+\providecommand{\calQ}{\ensuremath{\mathcal{Q}}}
+\providecommand{\calR}{\ensuremath{\mathcal{R}}}
+\providecommand{\calS}{\ensuremath{\mathcal{S}}}
+\providecommand{\calT}{\ensuremath{\mathcal{T}}}
+\providecommand{\calU}{\ensuremath{\mathcal{U}}}
+\providecommand{\calV}{\ensuremath{\mathcal{V}}}
+\providecommand{\calW}{\ensuremath{\mathcal{W}}}
+\providecommand{\calX}{\ensuremath{\mathcal{X}}}
+\providecommand{\calY}{\ensuremath{\mathcal{Y}}}
+\providecommand{\calZ}{\ensuremath{\mathcal{Z}}}
%# mathfrak 的捷径
%# Shortcuts for Fraktur shape
-\def\mf#1{\ensuremath{\mathfrak{#1}}}
-\def\mfa{\ensuremath{\mathfrak{a}}}
-\def\mfb{\ensuremath{\mathfrak{b}}}
-\def\mfc{\ensuremath{\mathfrak{c}}}
-\def\mfd{\ensuremath{\mathfrak{d}}}
-\def\mfe{\ensuremath{\mathfrak{e}}}
-\def\mff{\ensuremath{\mathfrak{f}}}
-\def\mfg{\ensuremath{\mathfrak{g}}}
-\def\mfh{\ensuremath{\mathfrak{h}}}
-\def\mfi{\ensuremath{\mathfrak{i}}}
-\def\mfj{\ensuremath{\mathfrak{j}}}
-\def\mfk{\ensuremath{\mathfrak{k}}}
-\def\mfl{\ensuremath{\mathfrak{l}}}
-\def\mfm{\ensuremath{\mathfrak{m}}}
-\def\mfn{\ensuremath{\mathfrak{n}}}
-\def\mfo{\ensuremath{\mathfrak{o}}}
-\def\mfp{\ensuremath{\mathfrak{p}}}
-\def\mfq{\ensuremath{\mathfrak{q}}}
-\def\mfr{\ensuremath{\mathfrak{r}}}
-\def\mfs{\ensuremath{\mathfrak{s}}}
-\def\mft{\ensuremath{\mathfrak{t}}}
-\def\mfu{\ensuremath{\mathfrak{u}}}
-\def\mfv{\ensuremath{\mathfrak{v}}}
-\def\mfw{\ensuremath{\mathfrak{w}}}
-\def\mfx{\ensuremath{\mathfrak{x}}}
-\def\mfy{\ensuremath{\mathfrak{y}}}
-\def\mfz{\ensuremath{\mathfrak{z}}}
-\def\mfA{\ensuremath{\mathfrak{A}}}
-\def\mfB{\ensuremath{\mathfrak{B}}}
-\def\mfC{\ensuremath{\mathfrak{C}}}
-\def\mfD{\ensuremath{\mathfrak{D}}}
-\def\mfE{\ensuremath{\mathfrak{E}}}
-\def\mfF{\ensuremath{\mathfrak{F}}}
-\def\mfG{\ensuremath{\mathfrak{G}}}
-\def\mfH{\ensuremath{\mathfrak{H}}}
-\def\mfI{\ensuremath{\mathfrak{I}}}
-\def\mfJ{\ensuremath{\mathfrak{J}}}
-\def\mfK{\ensuremath{\mathfrak{K}}}
-\def\mfL{\ensuremath{\mathfrak{L}}}
-\def\mfM{\ensuremath{\mathfrak{M}}}
-\def\mfN{\ensuremath{\mathfrak{N}}}
-\def\mfO{\ensuremath{\mathfrak{O}}}
-\def\mfP{\ensuremath{\mathfrak{P}}}
-\def\mfQ{\ensuremath{\mathfrak{Q}}}
-\def\mfR{\ensuremath{\mathfrak{R}}}
-\def\mfS{\ensuremath{\mathfrak{S}}}
-\def\mfT{\ensuremath{\mathfrak{T}}}
-\def\mfU{\ensuremath{\mathfrak{U}}}
-\def\mfV{\ensuremath{\mathfrak{V}}}
-\def\mfW{\ensuremath{\mathfrak{W}}}
-\def\mfX{\ensuremath{\mathfrak{X}}}
-\def\mfY{\ensuremath{\mathfrak{Y}}}
-\def\mfZ{\ensuremath{\mathfrak{Z}}}
-
-\def\frak#1{\ensuremath{\mathfrak{#1}}}
-\def\fraka{\ensuremath{\mathfrak{a}}}
-\def\frakb{\ensuremath{\mathfrak{b}}}
-\def\frakc{\ensuremath{\mathfrak{c}}}
-\def\frakd{\ensuremath{\mathfrak{d}}}
-\def\frake{\ensuremath{\mathfrak{e}}}
-\def\frakf{\ensuremath{\mathfrak{f}}}
-\def\frakg{\ensuremath{\mathfrak{g}}}
-\def\frakh{\ensuremath{\mathfrak{h}}}
-\def\fraki{\ensuremath{\mathfrak{i}}}
-\def\frakj{\ensuremath{\mathfrak{j}}}
-\def\frakk{\ensuremath{\mathfrak{k}}}
-\def\frakl{\ensuremath{\mathfrak{l}}}
-\def\frakm{\ensuremath{\mathfrak{m}}}
-\def\frakn{\ensuremath{\mathfrak{n}}}
-\def\frako{\ensuremath{\mathfrak{o}}}
-\def\frakp{\ensuremath{\mathfrak{p}}}
-\def\frakq{\ensuremath{\mathfrak{q}}}
-\def\frakr{\ensuremath{\mathfrak{r}}}
-\def\fraks{\ensuremath{\mathfrak{s}}}
-\def\frakt{\ensuremath{\mathfrak{t}}}
-\def\fraku{\ensuremath{\mathfrak{u}}}
-\def\frakv{\ensuremath{\mathfrak{v}}}
-\def\frakw{\ensuremath{\mathfrak{w}}}
-\def\frakx{\ensuremath{\mathfrak{x}}}
-\def\fraky{\ensuremath{\mathfrak{y}}}
-\def\frakz{\ensuremath{\mathfrak{z}}}
-\def\frakA{\ensuremath{\mathfrak{A}}}
-\def\frakB{\ensuremath{\mathfrak{B}}}
-\def\frakC{\ensuremath{\mathfrak{C}}}
-\def\frakD{\ensuremath{\mathfrak{D}}}
-\def\frakE{\ensuremath{\mathfrak{E}}}
-\def\frakF{\ensuremath{\mathfrak{F}}}
-\def\frakG{\ensuremath{\mathfrak{G}}}
-\def\frakH{\ensuremath{\mathfrak{H}}}
-\def\frakI{\ensuremath{\mathfrak{I}}}
-\def\frakJ{\ensuremath{\mathfrak{J}}}
-\def\frakK{\ensuremath{\mathfrak{K}}}
-\def\frakL{\ensuremath{\mathfrak{L}}}
-\def\frakM{\ensuremath{\mathfrak{M}}}
-\def\frakN{\ensuremath{\mathfrak{N}}}
-\def\frakO{\ensuremath{\mathfrak{O}}}
-\def\frakP{\ensuremath{\mathfrak{P}}}
-\def\frakQ{\ensuremath{\mathfrak{Q}}}
-\def\frakR{\ensuremath{\mathfrak{R}}}
-\def\frakS{\ensuremath{\mathfrak{S}}}
-\def\frakT{\ensuremath{\mathfrak{T}}}
-\def\frakU{\ensuremath{\mathfrak{U}}}
-\def\frakV{\ensuremath{\mathfrak{V}}}
-\def\frakW{\ensuremath{\mathfrak{W}}}
-\def\frakX{\ensuremath{\mathfrak{X}}}
-\def\frakY{\ensuremath{\mathfrak{Y}}}
-\def\frakZ{\ensuremath{\mathfrak{Z}}}
+\providecommand{\mf}[1]{\ensuremath{\mathfrak{#1}}}
+\providecommand{\mfa}{\ensuremath{\mathfrak{a}}}
+\providecommand{\mfb}{\ensuremath{\mathfrak{b}}}
+\providecommand{\mfc}{\ensuremath{\mathfrak{c}}}
+\providecommand{\mfd}{\ensuremath{\mathfrak{d}}}
+\providecommand{\mfe}{\ensuremath{\mathfrak{e}}}
+\providecommand{\mff}{\ensuremath{\mathfrak{f}}}
+\providecommand{\mfg}{\ensuremath{\mathfrak{g}}}
+\providecommand{\mfh}{\ensuremath{\mathfrak{h}}}
+\providecommand{\mfi}{\ensuremath{\mathfrak{i}}}
+\providecommand{\mfj}{\ensuremath{\mathfrak{j}}}
+\providecommand{\mfk}{\ensuremath{\mathfrak{k}}}
+\providecommand{\mfl}{\ensuremath{\mathfrak{l}}}
+\providecommand{\mfm}{\ensuremath{\mathfrak{m}}}
+\providecommand{\mfn}{\ensuremath{\mathfrak{n}}}
+\providecommand{\mfo}{\ensuremath{\mathfrak{o}}}
+\providecommand{\mfp}{\ensuremath{\mathfrak{p}}}
+\providecommand{\mfq}{\ensuremath{\mathfrak{q}}}
+\providecommand{\mfr}{\ensuremath{\mathfrak{r}}}
+\providecommand{\mfs}{\ensuremath{\mathfrak{s}}}
+\providecommand{\mft}{\ensuremath{\mathfrak{t}}}
+\providecommand{\mfu}{\ensuremath{\mathfrak{u}}}
+\providecommand{\mfv}{\ensuremath{\mathfrak{v}}}
+\providecommand{\mfw}{\ensuremath{\mathfrak{w}}}
+\providecommand{\mfx}{\ensuremath{\mathfrak{x}}}
+\providecommand{\mfy}{\ensuremath{\mathfrak{y}}}
+\providecommand{\mfz}{\ensuremath{\mathfrak{z}}}
+\providecommand{\mfA}{\ensuremath{\mathfrak{A}}}
+\providecommand{\mfB}{\ensuremath{\mathfrak{B}}}
+\providecommand{\mfC}{\ensuremath{\mathfrak{C}}}
+\providecommand{\mfD}{\ensuremath{\mathfrak{D}}}
+\providecommand{\mfE}{\ensuremath{\mathfrak{E}}}
+\providecommand{\mfF}{\ensuremath{\mathfrak{F}}}
+\providecommand{\mfG}{\ensuremath{\mathfrak{G}}}
+\providecommand{\mfH}{\ensuremath{\mathfrak{H}}}
+\providecommand{\mfI}{\ensuremath{\mathfrak{I}}}
+\providecommand{\mfJ}{\ensuremath{\mathfrak{J}}}
+\providecommand{\mfK}{\ensuremath{\mathfrak{K}}}
+\providecommand{\mfL}{\ensuremath{\mathfrak{L}}}
+\providecommand{\mfM}{\ensuremath{\mathfrak{M}}}
+\providecommand{\mfN}{\ensuremath{\mathfrak{N}}}
+\providecommand{\mfO}{\ensuremath{\mathfrak{O}}}
+\providecommand{\mfP}{\ensuremath{\mathfrak{P}}}
+\providecommand{\mfQ}{\ensuremath{\mathfrak{Q}}}
+\providecommand{\mfR}{\ensuremath{\mathfrak{R}}}
+\providecommand{\mfS}{\ensuremath{\mathfrak{S}}}
+\providecommand{\mfT}{\ensuremath{\mathfrak{T}}}
+\providecommand{\mfU}{\ensuremath{\mathfrak{U}}}
+\providecommand{\mfV}{\ensuremath{\mathfrak{V}}}
+\providecommand{\mfW}{\ensuremath{\mathfrak{W}}}
+\providecommand{\mfX}{\ensuremath{\mathfrak{X}}}
+\providecommand{\mfY}{\ensuremath{\mathfrak{Y}}}
+\providecommand{\mfZ}{\ensuremath{\mathfrak{Z}}}
+
+\providecommand{\frak}[1]{\ensuremath{\mathfrak{#1}}}
+\providecommand{\fraka}{\ensuremath{\mathfrak{a}}}
+\providecommand{\frakb}{\ensuremath{\mathfrak{b}}}
+\providecommand{\frakc}{\ensuremath{\mathfrak{c}}}
+\providecommand{\frakd}{\ensuremath{\mathfrak{d}}}
+\providecommand{\frake}{\ensuremath{\mathfrak{e}}}
+\providecommand{\frakf}{\ensuremath{\mathfrak{f}}}
+\providecommand{\frakg}{\ensuremath{\mathfrak{g}}}
+\providecommand{\frakh}{\ensuremath{\mathfrak{h}}}
+\providecommand{\fraki}{\ensuremath{\mathfrak{i}}}
+\providecommand{\frakj}{\ensuremath{\mathfrak{j}}}
+\providecommand{\frakk}{\ensuremath{\mathfrak{k}}}
+\providecommand{\frakl}{\ensuremath{\mathfrak{l}}}
+\providecommand{\frakm}{\ensuremath{\mathfrak{m}}}
+\providecommand{\frakn}{\ensuremath{\mathfrak{n}}}
+\providecommand{\frako}{\ensuremath{\mathfrak{o}}}
+\providecommand{\frakp}{\ensuremath{\mathfrak{p}}}
+\providecommand{\frakq}{\ensuremath{\mathfrak{q}}}
+\providecommand{\frakr}{\ensuremath{\mathfrak{r}}}
+\providecommand{\fraks}{\ensuremath{\mathfrak{s}}}
+\providecommand{\frakt}{\ensuremath{\mathfrak{t}}}
+\providecommand{\fraku}{\ensuremath{\mathfrak{u}}}
+\providecommand{\frakv}{\ensuremath{\mathfrak{v}}}
+\providecommand{\frakw}{\ensuremath{\mathfrak{w}}}
+\providecommand{\frakx}{\ensuremath{\mathfrak{x}}}
+\providecommand{\fraky}{\ensuremath{\mathfrak{y}}}
+\providecommand{\frakz}{\ensuremath{\mathfrak{z}}}
+\providecommand{\frakA}{\ensuremath{\mathfrak{A}}}
+\providecommand{\frakB}{\ensuremath{\mathfrak{B}}}
+\providecommand{\frakC}{\ensuremath{\mathfrak{C}}}
+\providecommand{\frakD}{\ensuremath{\mathfrak{D}}}
+\providecommand{\frakE}{\ensuremath{\mathfrak{E}}}
+\providecommand{\frakF}{\ensuremath{\mathfrak{F}}}
+\providecommand{\frakG}{\ensuremath{\mathfrak{G}}}
+\providecommand{\frakH}{\ensuremath{\mathfrak{H}}}
+\providecommand{\frakI}{\ensuremath{\mathfrak{I}}}
+\providecommand{\frakJ}{\ensuremath{\mathfrak{J}}}
+\providecommand{\frakK}{\ensuremath{\mathfrak{K}}}
+\providecommand{\frakL}{\ensuremath{\mathfrak{L}}}
+\providecommand{\frakM}{\ensuremath{\mathfrak{M}}}
+\providecommand{\frakN}{\ensuremath{\mathfrak{N}}}
+\providecommand{\frakO}{\ensuremath{\mathfrak{O}}}
+\providecommand{\frakP}{\ensuremath{\mathfrak{P}}}
+\providecommand{\frakQ}{\ensuremath{\mathfrak{Q}}}
+\providecommand{\frakR}{\ensuremath{\mathfrak{R}}}
+\providecommand{\frakS}{\ensuremath{\mathfrak{S}}}
+\providecommand{\frakT}{\ensuremath{\mathfrak{T}}}
+\providecommand{\frakU}{\ensuremath{\mathfrak{U}}}
+\providecommand{\frakV}{\ensuremath{\mathfrak{V}}}
+\providecommand{\frakW}{\ensuremath{\mathfrak{W}}}
+\providecommand{\frakX}{\ensuremath{\mathfrak{X}}}
+\providecommand{\frakY}{\ensuremath{\mathfrak{Y}}}
+\providecommand{\frakZ}{\ensuremath{\mathfrak{Z}}}
%# mathscr 的捷径
%# Shortcuts for script shape
-\def\ms#1{\ensuremath{\mathscr{#1}}}
-\def\msA{\ensuremath{\mathscr{A}}}
-\def\msB{\ensuremath{\mathscr{B}}}
-\def\msC{\ensuremath{\mathscr{C}}}
-\def\msD{\ensuremath{\mathscr{D}}}
-\def\msE{\ensuremath{\mathscr{E}}}
-\def\msF{\ensuremath{\mathscr{F}}}
-\def\msG{\ensuremath{\mathscr{G}}}
-\def\msH{\ensuremath{\mathscr{H}}}
-\def\msI{\ensuremath{\mathscr{I}}}
-\def\msJ{\ensuremath{\mathscr{J}}}
-\def\msK{\ensuremath{\mathscr{K}}}
-\def\msL{\ensuremath{\mathscr{L}}}
-\def\msM{\ensuremath{\mathscr{M}}}
-\def\msN{\ensuremath{\mathscr{N}}}
-\def\msO{\ensuremath{\mathscr{O}}}
-\def\msP{\ensuremath{\mathscr{P}}}
-\def\msQ{\ensuremath{\mathscr{Q}}}
-\def\msR{\ensuremath{\mathscr{R}}}
-\def\msS{\ensuremath{\mathscr{S}}}
-\def\msT{\ensuremath{\mathscr{T}}}
-\def\msU{\ensuremath{\mathscr{U}}}
-\def\msV{\ensuremath{\mathscr{V}}}
-\def\msW{\ensuremath{\mathscr{W}}}
-\def\msX{\ensuremath{\mathscr{X}}}
-\def\msY{\ensuremath{\mathscr{Y}}}
-\def\msZ{\ensuremath{\mathscr{Z}}}
-
-\def\scr#1{\ensuremath{\mathscr{#1}}}
-\def\scrA{\ensuremath{\mathscr{A}}}
-\def\scrB{\ensuremath{\mathscr{B}}}
-\def\scrC{\ensuremath{\mathscr{C}}}
-\def\scrD{\ensuremath{\mathscr{D}}}
-\def\scrE{\ensuremath{\mathscr{E}}}
-\def\scrF{\ensuremath{\mathscr{F}}}
-\def\scrG{\ensuremath{\mathscr{G}}}
-\def\scrH{\ensuremath{\mathscr{H}}}
-\def\scrI{\ensuremath{\mathscr{I}}}
-\def\scrJ{\ensuremath{\mathscr{J}}}
-\def\scrK{\ensuremath{\mathscr{K}}}
-\def\scrL{\ensuremath{\mathscr{L}}}
-\def\scrM{\ensuremath{\mathscr{M}}}
-\def\scrN{\ensuremath{\mathscr{N}}}
-\def\scrO{\ensuremath{\mathscr{O}}}
-\def\scrP{\ensuremath{\mathscr{P}}}
-\def\scrQ{\ensuremath{\mathscr{Q}}}
-\def\scrR{\ensuremath{\mathscr{R}}}
-\def\scrS{\ensuremath{\mathscr{S}}}
-\def\scrT{\ensuremath{\mathscr{T}}}
-\def\scrU{\ensuremath{\mathscr{U}}}
-\def\scrV{\ensuremath{\mathscr{V}}}
-\def\scrW{\ensuremath{\mathscr{W}}}
-\def\scrX{\ensuremath{\mathscr{X}}}
-\def\scrY{\ensuremath{\mathscr{Y}}}
-\def\scrZ{\ensuremath{\mathscr{Z}}}
+\providecommand{\ms}[1]{\ensuremath{\mathscr{#1}}}
+\providecommand{\msA}{\ensuremath{\mathscr{A}}}
+\providecommand{\msB}{\ensuremath{\mathscr{B}}}
+\providecommand{\msC}{\ensuremath{\mathscr{C}}}
+\providecommand{\msD}{\ensuremath{\mathscr{D}}}
+\providecommand{\msE}{\ensuremath{\mathscr{E}}}
+\providecommand{\msF}{\ensuremath{\mathscr{F}}}
+\providecommand{\msG}{\ensuremath{\mathscr{G}}}
+\providecommand{\msH}{\ensuremath{\mathscr{H}}}
+\providecommand{\msI}{\ensuremath{\mathscr{I}}}
+\providecommand{\msJ}{\ensuremath{\mathscr{J}}}
+\providecommand{\msK}{\ensuremath{\mathscr{K}}}
+\providecommand{\msL}{\ensuremath{\mathscr{L}}}
+\providecommand{\msM}{\ensuremath{\mathscr{M}}}
+\providecommand{\msN}{\ensuremath{\mathscr{N}}}
+\providecommand{\msO}{\ensuremath{\mathscr{O}}}
+\providecommand{\msP}{\ensuremath{\mathscr{P}}}
+\providecommand{\msQ}{\ensuremath{\mathscr{Q}}}
+\providecommand{\msR}{\ensuremath{\mathscr{R}}}
+\providecommand{\msS}{\ensuremath{\mathscr{S}}}
+\providecommand{\msT}{\ensuremath{\mathscr{T}}}
+\providecommand{\msU}{\ensuremath{\mathscr{U}}}
+\providecommand{\msV}{\ensuremath{\mathscr{V}}}
+\providecommand{\msW}{\ensuremath{\mathscr{W}}}
+\providecommand{\msX}{\ensuremath{\mathscr{X}}}
+\providecommand{\msY}{\ensuremath{\mathscr{Y}}}
+\providecommand{\msZ}{\ensuremath{\mathscr{Z}}}
+
+\providecommand{\scr}[1]{\ensuremath{\mathscr{#1}}}
+\providecommand{\scrA}{\ensuremath{\mathscr{A}}}
+\providecommand{\scrB}{\ensuremath{\mathscr{B}}}
+\providecommand{\scrC}{\ensuremath{\mathscr{C}}}
+\providecommand{\scrD}{\ensuremath{\mathscr{D}}}
+\providecommand{\scrE}{\ensuremath{\mathscr{E}}}
+\providecommand{\scrF}{\ensuremath{\mathscr{F}}}
+\providecommand{\scrG}{\ensuremath{\mathscr{G}}}
+\providecommand{\scrH}{\ensuremath{\mathscr{H}}}
+\providecommand{\scrI}{\ensuremath{\mathscr{I}}}
+\providecommand{\scrJ}{\ensuremath{\mathscr{J}}}
+\providecommand{\scrK}{\ensuremath{\mathscr{K}}}
+\providecommand{\scrL}{\ensuremath{\mathscr{L}}}
+\providecommand{\scrM}{\ensuremath{\mathscr{M}}}
+\providecommand{\scrN}{\ensuremath{\mathscr{N}}}
+\providecommand{\scrO}{\ensuremath{\mathscr{O}}}
+\providecommand{\scrP}{\ensuremath{\mathscr{P}}}
+\providecommand{\scrQ}{\ensuremath{\mathscr{Q}}}
+\providecommand{\scrR}{\ensuremath{\mathscr{R}}}
+\providecommand{\scrS}{\ensuremath{\mathscr{S}}}
+\providecommand{\scrT}{\ensuremath{\mathscr{T}}}
+\providecommand{\scrU}{\ensuremath{\mathscr{U}}}
+\providecommand{\scrV}{\ensuremath{\mathscr{V}}}
+\providecommand{\scrW}{\ensuremath{\mathscr{W}}}
+\providecommand{\scrX}{\ensuremath{\mathscr{X}}}
+\providecommand{\scrY}{\ensuremath{\mathscr{Y}}}
+\providecommand{\scrZ}{\ensuremath{\mathscr{Z}}}
%%================================
%% General symbols
@@ -1393,18 +1393,25 @@
%# 不编号定理类环境
%# Do not number theorem-like environments
\DeclareBoolOption[false]{nothmnum}
+%# 指定如何编号定理类环境
+%# Number theorem-like environments With ...
+\DeclareStringOption{thmnum}[PJL@thmnum@default]
%# 草稿模式或快速模式
%# Draft mode or fast mode
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
%# 引用的名称将随当前语言的不同而改变
%# Reference name will change with the current language
-\DeclareBoolOption[false]{regionalref}
+\DeclareBoolOption[true]{regionalref}
+\DeclareBoolOption[false]{originalref}
%# 处理选项
%# Process options
\ProcessKeyvalOptions*\relax
%# 下面的代码设定了选项之间的关系
%# The following code sets the relationship between options
+\if@PJLthm@originalref
+ \@PJLthm@regionalreffalse
+\fi
\if@PJLthm@draft
\@PJLthm@fasttrue
\fi
@@ -1952,8 +1959,22 @@
}{
\newaliascnt{PJLthm@highest}{section}
}
+%# 按照 thmnum 决定定理类环境如何编号
+%# Number the theorem-like environment with respect to thmnum
+\NewDocumentCommand{\CreateTheorem@thmnum}{m}{
+ \expandafter\ifstrempty\expandafter{\@PJLthm@thmnum}{
+ \CreateTheorem{#1}<PJLthm@highest>
+ }{
+ \expandafter\ifstrequal\expandafter{\@PJLthm@thmnum}{PJL@thmnum@default}{
+ \CreateTheorem{#1}
+ }{
+ \CreateTheorem{#1}<\@PJLthm@thmnum>
+ }
+ }
+}
%# 建立定理类环境
%# Setup theorem-like environments
+\AtEndPreamble{
\if@PJLthm@nothms\else
\if@PJLthm@nothmnum
\CreateTheorem*{theorem}
@@ -1966,7 +1987,7 @@
\CreateTheorem*{fact}
\CreateTheorem*{conjecture}
\else
-\CreateTheorem{theorem}<PJLthm@highest>
+\CreateTheorem@thmnum{theorem}
\CreateTheorem{lemma}[theorem]
\CreateTheorem{proposition}[theorem]
\CreateTheorem{corollary}[theorem]
@@ -2026,14 +2047,27 @@
\CreateTheorem*{remark}
\CreateTheorem*{observation}
\else
-\CreateTheorem{remark}<PJLthm@highest>
-\CreateTheorem{observation}<PJLthm@highest>
+\CreateTheorem@thmnum{remark}
+\CreateTheorem@thmnum{observation}
\fi
\CreateTheorem*{remark*}
\CreateTheorem*{observation*}
\fi
+}
-\numberwithin{equation}{PJLthm@highest}
+%# 按照 thmnum 决定公式如何编号
+%# Number the equations with respect to thmnum
+\expandafter\ifstrempty\expandafter{\@PJLthm@thmnum}{
+% thmnum is not used.
+ \numberwithin{equation}{PJLthm@highest}
+}{
+ \expandafter\ifstrequal\expandafter{\@PJLthm@thmnum}{PJL@thmnum@default}{
+% thmnum is used, with no value.
+ }{
+% thmnum is used, with value \@PJLthm@thmnum.
+ \numberwithin{equation}{\@PJLthm@thmnum}
+ }
+}
%# 一些 cref 的本地化
%# Some localization of cref
@@ -2137,11 +2171,14 @@
\DeclareBoolOption[false]{amsfashion}
\DeclareBoolOption[false]{nothms}
\DeclareBoolOption[false]{nothmnum}
-\DeclareBoolOption[false]{regionalref}
+\DeclareStringOption{thmnum}[PJL@thmnum@default]
+\DeclareBoolOption[true]{regionalref}
+\DeclareBoolOption[false]{originalref}
\DeclareBoolOption[false]{useosf}
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
+\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
%# 处理选项
%# Process options
@@ -2149,6 +2186,9 @@
%# 下面的代码设定了选项之间的关系
%# The following code sets the relationship between options
+\if@ProjLib@originalref
+ \@ProjLib@regionalreffalse
+\fi
\if@ProjLib@draft
\@ProjLib@fasttrue
\fi
@@ -2167,8 +2207,15 @@
\if@ProjLib@nothmnum
\PassOptionsToPackage{nothmnum}{PJLthm}
\fi
-\if@ProjLib@regionalref
- \PassOptionsToPackage{regionalref}{PJLthm}
+\expandafter\ifstrempty\expandafter{\@ProjLib@thmnum}{}{
+ \expandafter\ifstrequal\expandafter{\@ProjLib@thmnum}{PJL@thmnum@default}{
+ \PassOptionsToPackage{thmnum}{PJLthm}
+ }{
+ \PassOptionsToPackage{thmnum=\@ProjLib@thmnum}{PJLthm}
+ }
+}
+\if@ProjLib@regionalref\else
+ \PassOptionsToPackage{originalref}{PJLthm}
\fi
%# 加载不默认载入的组件
@@ -2228,6 +2275,15 @@
\PJLsetlinespacing{\setstretch{1.00}}
\fi
+\if@ProjLib@noto
+ \if@ProjLib@useosf
+ \PassOptionsToPackage{oldstyle}{notomath}
+ \fi
+ \RequirePackage{anyfontsize}
+ \RequirePackage{notomath}
+ \PJLsetlinespacing{\setstretch{1.00}}
+\fi
+
\if@ProjLib@biolinum
% \RequirePackage{amssymb}
% \RequirePackage{mathpazo}
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index b166f95802..e0dae969d6 100644
--- a/macros/latex/contrib/spbmark/spbmark.pdf
+++ b/macros/latex/contrib/spbmark/spbmark.pdf
Binary files differ
diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty
index 56c06b6d0a..f3e5446f52 100644
--- a/macros/latex/contrib/spbmark/spbmark.sty
+++ b/macros/latex/contrib/spbmark/spbmark.sty
@@ -9,7 +9,7 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2021/07/29}{1.1}
+\ProvidesExplPackage{spbmark}{2021/07/30}{1.1a}
{Customize superscripts and subscripts}
\cs_new_protected:Npn \spb_define:n { \keys_define:nn { spbmark } }
diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex
index b755e565e7..67047c8fef 100644
--- a/macros/latex/contrib/spbmark/spbmark.tex
+++ b/macros/latex/contrib/spbmark/spbmark.tex
@@ -6,8 +6,8 @@
{
package = spbmark,
title = the spbmark package,
- version = v1.1,
- date = 2021/07/29,
+ version = v1.1a,
+ date = 2021/07/30,
authors = Qu Yi,
info = Customize superscript and subscript,
email = quee123@foxmail.com,
@@ -24,14 +24,7 @@
}
\makeatletter
-\newcommand{\splitmeta}[2]
- {%
- \ensuremath{\langle}%
- \textcolor{meta}{\argumentformat #1}%
- \ensuremath{\rangle},\ensuremath{\langle}%
- \textcolor{meta}{\argumentformat #2}%
- \ensuremath{\rangle}%
- }
+\newcommand{\splitmeta}[2]{\meta{#1}\texttt{,}\meta{#2}}
\newcommand{\newsplitarg}[4][\splitmeta]
{
\newcommand{#2}[2]
diff --git a/macros/latex/contrib/vhistory/CHANGES b/macros/latex/contrib/vhistory/CHANGES
deleted file mode 100644
index ec9ce16af8..0000000000
--- a/macros/latex/contrib/vhistory/CHANGES
+++ /dev/null
@@ -1,19 +0,0 @@
-2013-04-21: Bugfix release 1.6.1. No new features, but:
- - Fixed bug that occurs when the options hideauthorcolumn and
- tablegrid are used together
- - Corrected lot of typos in the English documentation
- - Described the previously undocumented option hideauthorcolumn
-2013-01-22: - Added Croation translation
- - New option tablegrid
- - Introduced possibility to change column width
- Thanks to the users for their input which led to these changes.
-2010-07-17: - Added French translation.
- - Listing of sets improved.
- - Dutch translation added and English labels improved.
- My thanks go to the friendly people who sent their patches and
- comments to me.
-2009-03-01: Bug solved that occured when the first two letters of an element
- of a set were identical.
-2006-01-09: Implementation of \listset changed. It now works within an \edef,
- but the element \empty is no longer allowed in a set.
-2005-08-13: Documentation: Reference to LPPL added.
diff --git a/macros/latex/contrib/vhistory/CHANGES.md b/macros/latex/contrib/vhistory/CHANGES.md
new file mode 100644
index 0000000000..fc489b6022
--- /dev/null
+++ b/macros/latex/contrib/vhistory/CHANGES.md
@@ -0,0 +1,33 @@
+# Release 1.8.0
+- Included Spanish translations supplied by Hector, Fernando and Roberto
+- Included Portugese translations supplied by João Ricardo Lourenço
+
+# 2013-08-05: Release 1.7.0.
+New option omittable for people who don't want to have a table with all revisions.
+
+# 2013-04-21: Bugfix release 1.6.1
+No new features, but:
+- Fixed bug that occurs when the options hideauthorcolumn and tablegrid are used together
+- Corrected lot of typos in the English documentation
+- Described the previously undocumented option hideauthorcolumn
+
+# 2013-01-22:
+- Added Croation translation
+- New option tablegrid
+- Introduced possibility to change column width
+Thanks to the users for their input which led to these changes.
+
+# 2010-07-17
+- Added French translation.
+- Listing of sets improved.
+- Dutch translation added and English labels improved.
+My thanks go to the friendly people who sent their patches and comments to me.
+
+# 2009-03-01: Bugfix release
+Bug solved that occured when the first two letters of an element of a set were identical.
+
+# 2006-01-09
+Implementation of \listset changed. It now works within an \edef, but the element \empty is no longer allowed in a set.
+
+# 2005-08-13
+Documentation: Reference to LPPL added. \ No newline at end of file
diff --git a/macros/latex/contrib/vhistory/README b/macros/latex/contrib/vhistory/README
deleted file mode 100644
index 67535885e0..0000000000
--- a/macros/latex/contrib/vhistory/README
+++ /dev/null
@@ -1,37 +0,0 @@
-See below for German version.
-
-This folder contains the files of the LaTeX packages "vhistory" and "sets".
-User documentation can be found in the subdirectory doc. An example for
-vhistory can be found there, too.
-
-All feedback is welcome! Please use the address mentioned in the
-documentation.
-
-REQUIREMENTS:
-Requirements are listed in the user documentation.
-
-LICENSE:
-The material in this directory and all of its subdirectories is subject
-to the LaTeX Project Public License. See
-http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
-the details of that license.
-
-==============================================================================
-GERMAN VERSION:
-
-Dieser Ordner enthaelt die Dateien der LaTeX-Pakete "vhistory" und "sets".
-Die Dokumentation befindet sich im Unterverzeichnis doc. Ein Beispiel fr
-die Verwendung von vhistory (in englischer Sprache) befindet sich ebenfalls
-in diesem Verzeichnis.
-
-Rueckmeldung ueber Fehler oder Verbesserungsvorschlaege an die in der
-Dokumentation angegebene Adresse sind stets willkommen.
-
-SYSTEMANFORDERUNGEN:
-Die Benutzerdokumentation listet alle benoetigten Pakete auf.
-
-LIZENZ:
-Das gesamte Material dieses Verzeichnisses und all seiner Unterverzeichnisse
-steht unter der LaTeX Project Public License. Diese kann in englischer Sprache
-unter http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
-eingesehen werden. \ No newline at end of file
diff --git a/macros/latex/contrib/vhistory/README.md b/macros/latex/contrib/vhistory/README.md
new file mode 100644
index 0000000000..add469b1cd
--- /dev/null
+++ b/macros/latex/contrib/vhistory/README.md
@@ -0,0 +1,17 @@
+# vhistory
+
+This folder contains the files of the LaTeX packages "vhistory" and "sets".
+User documentation can be found in the subdirectory doc. An example for
+vhistory can be found there, too.
+
+All feedback is welcome! Please use the address mentioned in the
+documentation.
+
+## Requirements
+Requirements are listed in the user documentation.
+
+## License
+The material in this directory and all of its subdirectories is subject
+to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+the details of that license.
diff --git a/macros/latex/contrib/vhistory/doc/de_beispiel.tex b/macros/latex/contrib/vhistory/doc/de_beispiel.tex
index 7cbedecff6..dad7b9deaa 100644
--- a/macros/latex/contrib/vhistory/doc/de_beispiel.tex
+++ b/macros/latex/contrib/vhistory/doc/de_beispiel.tex
@@ -14,7 +14,7 @@
\bef\verb@ pdfauthor = {\vhAllAuthorsSet}@
\bef\verb@}@
\bef\verb@@
-\bef\verb@\usepackage{scrpage2}@
+\bef\verb@\usepackage{scrlayer-scrpage}@
\bef\verb@\pagestyle{scrheadings}@
\bef\verb@\ifoot{\docTitle\ -- Version \vhCurrentVersion}@
\bef\verb@\cfoot[]{}@
diff --git a/macros/latex/contrib/vhistory/doc/de_vhistory.tex b/macros/latex/contrib/vhistory/doc/de_vhistory.tex
index 42cd15d60a..d97b6c85b7 100644
--- a/macros/latex/contrib/vhistory/doc/de_vhistory.tex
+++ b/macros/latex/contrib/vhistory/doc/de_vhistory.tex
@@ -13,10 +13,12 @@ Das Paket vhistory versteht einige Optionen, um sein Verhalten anzupassen. Diese
\paragraph{tocentry:} Mit dieser Option wird veranlasst, dass die Versionshistorie im Inhaltsverzeichnis aufgeführt wird. Normalerweise wird dieser Eintrag nicht erzeugt. Ist die Option nochapter aktiviert hat tocentry keine Funktion. Hier sind Sie selbst für eventuelle Einträge in das Inhaltsverzeichnis verantwortlich.
-\paragraph{owncaptions:} vhistory unterstützt die Sprachen Deutsch, Englisch, Französisch, Kroatisch und Niederländisch. Verwenden Sie eine nicht unterstützte Sprache, werden die Überschriften (z.\,B. "`Versionshistorie"' oder "`Änderungen"') in Englisch ausgegeben. In diesem Fall möchten Sie vielleicht die Überschriften selbst verändern. Die Option own\-capt\-ions unterstützt Sie dabei. Näheres zu diesem Thema finden Sie in Unterabschnitt \ref{sprachen}.
+\paragraph{owncaptions:} vhistory unterstützt die Sprachen Deutsch, Englisch, Französisch, Kroatisch, Niederländisch, Portugiesisch und Spanisch. Verwenden Sie eine nicht unterstützte Sprache, werden die Überschriften (z.\,B. "`Versionshistorie"' oder "`Änderungen"') in Englisch ausgegeben. In diesem Fall möchten Sie vielleicht die Überschriften selbst verändern. Die Option own\-capt\-ions unterstützt Sie dabei. Näheres zu diesem Thema finden Sie in Unterabschnitt \ref{sprachen}.
\paragraph{tablegrid:} Mit dieser Option wird in der Tabelle mit der Versionshistorie ein Gitternetz angezeigt.
+\paragraph{omittable:} In manchen Fällen ist die Ausgabe einer Tabelle nicht gewünscht. Mit dieser Option wird die Ausgabe der Tabelle und die Erzeugung eines Kapitels bzw. eines Abschnitts verhindert. In diesem Fall sind die Optionen nochapter, tocentry, owncaptions und tablegrid ohne Funktion. Die Befehle z.\,B. zur Ausgabe aller Autoren funktionieren weiterhin.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Verwendung}\label{verwendung}
Die Verwendung von vhistory ist denkbar einfach und soll in diesem Unterabschnitt beschrieben werden. Allgemein gilt, dass vhistory zwei Durchläufe benötigt, da Daten in Dateien geschrieben werden.
@@ -83,7 +85,7 @@ Sollte die Breite der Spalten für Autoren und Änderungen in der Versionshistor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Sprachunterstützung}\label{sprachen}
-Wie schon in Abschnitt \ref{laden} erwähnt unterstützt vhistory die Sprachen Deutsch, Englisch, Französisch und Niederländisch. Die sprachabhängigen Texte mit ihren Voreinstellungen sind in Tabelle \ref{tab:sprachen} aufgelistet. Soll das Dokument in einer Sprache verfasst werden, die vhistory nicht unterstützt, wird die englische Variante gewählt.
+Wie schon in Abschnitt \ref{laden} erwähnt unterstützt vhistory die Sprachen Deutsch, Englisch, Französisch, Niederländisch, Portugiesisch und Spanisch. Die sprachabhängigen Texte mit ihren Voreinstellungen sind in Tabelle \ref{tab:sprachen} aufgelistet. Soll das Dokument in einer Sprache verfasst werden, die vhistory nicht unterstützt, wird die englische Variante gewählt.
Mit der Paketoption "`owncaptions"' können eigene Überschriften verwendet werden. Die Option veranlasst vhistory dazu, die Kommandos, die die Überschriften enthalten, mit den Varianten der aktuell gewählten Sprache vorzubelegen. Deshalb ist es sinnvoll, in diesem Fall Pakete wie babel oder ngerman vor vhistory zu laden.
@@ -101,7 +103,9 @@ Deutsch & Versionshistorie & Version & Datum & Autor(en) & Änderungen\\
Englisch & Revision History & Revision & Date & Author(s) & Description\\
Französisch & Historique & Version & Date & Auteur(s) & Modifications\\
Kroatisch & Povijest verzija & Verzija & Datum & Autor(ica) & Opis Promjena\\
-Niederländisch & Wijzigingen & Herziening & Datum & Auteur(s) & Beschrijving\\ \hline
+Niederländisch & Wijzigingen & Herziening & Datum & Auteur(s) & Beschrijving\\
+Portugiesisch & Tabela de Revis\~{o}es & Revis\~{a}o & Data & Autor(es) & Descri\c{c}\~{a}o\\
+Spanisch & Historial de Revisiones & Versi\'{o}n & Fecha & Autor(es) & Descripci\'{o}n\\ \hline
\end{tabular}
\end{scriptsize}
\caption{sprachabhängige Texte}
diff --git a/macros/latex/contrib/vhistory/doc/en_example.tex b/macros/latex/contrib/vhistory/doc/en_example.tex
index c4a05c0f7c..7b498e8924 100644
--- a/macros/latex/contrib/vhistory/doc/en_example.tex
+++ b/macros/latex/contrib/vhistory/doc/en_example.tex
@@ -14,7 +14,7 @@
\bef\verb@ pdfauthor = {\vhAllAuthorsSet}@
\bef\verb@}@
\bef\verb@@
-\bef\verb@\usepackage{scrpage2}@
+\bef\verb@\usepackage{scrlayer-scrpage}@
\bef\verb@\pagestyle{scrheadings}@
\bef\verb@\ifoot{\docTitle\ -- Version \vhCurrentVersion}@
\bef\verb@\cfoot[]{}@
diff --git a/macros/latex/contrib/vhistory/doc/en_vhistory.tex b/macros/latex/contrib/vhistory/doc/en_vhistory.tex
index 6610cd5b0d..59fb2aaaba 100644
--- a/macros/latex/contrib/vhistory/doc/en_vhistory.tex
+++ b/macros/latex/contrib/vhistory/doc/en_vhistory.tex
@@ -15,10 +15,12 @@ Vhistory understands several options to control its behaviour. These are listed
\paragraph{tocentry:} With this option you can cause an entry in the table of contents. Normally there won't be such an entry. If the option nochapter is used, tocentry has no effect and you are responsible for toc entries.
-\paragraph{owncaptions:} vhistory supports the languages Croatian, Dutch, English, French and German. If you use an unsupported language, all captions (like ``Revision history'' or ``Chan\-ges'') will be in English. In this case you might want to change captions yourself. The option own\-capt\-ions supports you in this case. More information on this topic can be found in subsection \ref{languages}.
+\paragraph{owncaptions:} vhistory supports the languages Croatian, Dutch, English, French, German, Portuguese and Spanish. If you use an unsupported language, all captions (like ``Revision history'' or ``Chan\-ges'') will be in English. In this case you might want to change captions yourself. The option own\-capt\-ions supports you in this case. More information on this topic can be found in subsection \ref{languages}.
\paragraph{tablegrid:} Setting this option will display a grid in the table representing the revision history.
+\paragraph{omittable:} In some applications, the output of a table is not wanted. With this option, the output of the revision history and the creation of a chapter or section is suppressed. In this case, the options nochapter, tocentry, owncaptions and tablegrid are ignored. The commands, e.\,g. to print all authors can still be used.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Usage}\label{usage}
The Usage of vhistory is rather easy and is to be described in this subsection.
@@ -85,7 +87,7 @@ change the ratio to 2:3 (default is 1:3). When changing the widths, please take
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Language support}\label{languages}
-As mentioned in section \ref{load}, vhistory supports the languages Croatian, Dutch, English, French and German. All language dependent captions with their defaults are listed in table \ref{tab:languages}. If the document is written in a unsupported language, the English version will be used.
+As mentioned in section \ref{load}, vhistory supports the languages Croatian, Dutch, English, French, German, Portuguese and Spanish. All language dependent captions with their defaults are listed in table \ref{tab:languages}. If the document is written in a unsupported language, the English version will be used.
By providing the option ``owncaptions'' you can use custom captions. This option causes vhistory to default the commands in the language that was selected when vhistory is loaded. Therefore it makes sense to load packages like babel or ngerman before vhistory.
@@ -104,7 +106,9 @@ Croatian & Povijest verzija & Verzija & Datum & Autor(ica) & Opis Promjena\\
Dutch & Wijzigingen & Herziening & Datum & Auteur(s) & Beschrijving\\
English & Revision History & Revision & Date & Author(s) & Description\\
French & Historique & Version & Date & Auteur(s) & Modifications\\
-German & Versionshistorie & Version & Datum & Autor(en) & Änderungen\\ \hline
+German & Versionshistorie & Version & Datum & Autor(en) & Änderungen\\
+Portuguese & Tabela de Revis\~{o}es & Revis\~{a}o & Data & Autor(es) & Descri\c{c}\~{a}o\\
+Spanish & Historial de Revisiones & Versi\'{o}n & Fecha & Autor(es) & Descripci\'{o}n\\ \hline
\end{tabular}
\end{scriptsize}
\caption{language dependent captions}
diff --git a/macros/latex/contrib/vhistory/doc/vh_set_example.pdf b/macros/latex/contrib/vhistory/doc/vh_set_example.pdf
index 73806310a5..bf04a29f94 100644
--- a/macros/latex/contrib/vhistory/doc/vh_set_example.pdf
+++ b/macros/latex/contrib/vhistory/doc/vh_set_example.pdf
Binary files differ
diff --git a/macros/latex/contrib/vhistory/doc/vh_set_example.tex b/macros/latex/contrib/vhistory/doc/vh_set_example.tex
index bf8e3d9f1b..f1f18050a9 100644
--- a/macros/latex/contrib/vhistory/doc/vh_set_example.tex
+++ b/macros/latex/contrib/vhistory/doc/vh_set_example.tex
@@ -19,7 +19,7 @@
\newcommand{\docTitle}{}
-\usepackage{scrpage2}
+\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\ifoot{An example for vhistory---Version \vhCurrentVersion}
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf b/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf
index bf26e13529..221b73925a 100644
--- a/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf
Binary files differ
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_de.tex b/macros/latex/contrib/vhistory/doc/vh_sets_de.tex
index 368ff0c47b..4c9a11ffd2 100644
--- a/macros/latex/contrib/vhistory/doc/vh_sets_de.tex
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_de.tex
@@ -36,7 +36,7 @@
%-----------------------------------------------------------------------------
%---------------- Kopf- und Fuzeilen --------------------------------------
-\usepackage{scrpage2}
+\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
%-----------------------------------------------------------------------------
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf b/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf
index 5a72e01b6d..21f167d4d1 100644
--- a/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf
Binary files differ
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_en.tex b/macros/latex/contrib/vhistory/doc/vh_sets_en.tex
index 54f42e4c8f..49cfeab8fa 100644
--- a/macros/latex/contrib/vhistory/doc/vh_sets_en.tex
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_en.tex
@@ -31,7 +31,7 @@
%-----------------------------------------------------------------------------
%---------------- Headers and footers --------------------------------------
-\usepackage{scrpage2}
+\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
%-----------------------------------------------------------------------------
diff --git a/macros/latex/contrib/vhistory/sets.sty b/macros/latex/contrib/vhistory/sets.sty
index a2c26bd103..b2f3d2b21b 100644
--- a/macros/latex/contrib/vhistory/sets.sty
+++ b/macros/latex/contrib/vhistory/sets.sty
@@ -4,7 +4,6 @@
%% %%
%% AUTHOR: Jochen Wertenauer %%
%% VERSION: 1.3 %%
-%% DATE: 2010-07-17 %%
%% %%
%% LICENSE: This program may be distributed and/or modified under the %%
%% conditions of the LaTeX Project Public License, either version 1.2 %%
diff --git a/macros/latex/contrib/vhistory/vhistory.sty b/macros/latex/contrib/vhistory/vhistory.sty
index b4e515923e..66a5ea39f5 100644
--- a/macros/latex/contrib/vhistory/vhistory.sty
+++ b/macros/latex/contrib/vhistory/vhistory.sty
@@ -3,8 +3,7 @@
%% FILE: vhistory.sty %%
%% %%
%% AUTHOR: Jochen Wertenauer %%
-%% VERSION: 1.6.1 %%
-%% DATE: 2013-01-28 %%
+%% VERSION: 1.8.0 %%
%% %%
%% LICENSE: This program may be distributed and/or modified under the %%
%% conditions of the LaTeX Project Public License, either version 1.2 %%
@@ -45,6 +44,8 @@
%% - hideauthorcolumn: The history of versions does not contain the column %%
%% listing the name(s) of the author(s). %%
%% - tablegrid: If provided, the version history will display gridlines %%
+%% - omittable: If provided, the table with the version history will not be %%
+%% printed, but you can still call \vhCurrentVersion etc. %%
%% %%
%% REQUIRED PACKAGES: %%
%% - sets: Works well with version 1.2 or higher %%
@@ -136,6 +137,16 @@
\vh@CroatianCaptions
\fi
\fi
+ \vh@Ifundefined{l@spanish}\else
+ \ifnum \language=\l@spanish\relax
+ \vh@SpanishCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@portuguese}\else
+ \ifnum \language=\l@portuguese\relax
+ \vh@PortugueseCaptions
+ \fi
+ \fi
}
\def \vh@EnglishCaptions{%
@@ -177,6 +188,23 @@
\def\vhauthorname{Autor(ica)}%
\def\vhchangename{Opis Promjena}%
}
+
+\def \vh@SpanishCaptions{%
+ \def\vhhistoryname{Historial de Revisiones}%
+ \def\vhversionname{Versi\'{o}n}%
+ \def\vhdatename{Fecha}%
+ \def\vhauthorname{Autor(es)}%
+ \def\vhchangename{Descripci\'{o}n}%
+}
+
+\def \vh@PortugueseCaptions{%
+ \def\vhhistoryname{Tabela de Revis\~{o}es}%
+ \def\vhversionname{Revis\~{a}o}%
+ \def\vhdatename{Data}%
+ \def\vhauthorname{Autor(es)}%
+ \def\vhchangename{Descri\c{c}\~{a}o}%
+}
+
%% ---------------------------------------------------------------------------
%% -- Options ----------------------------------------------------------------
@@ -185,6 +213,7 @@
\def \vh@owncaptions{0} % By default, the build in captions are used.
\def \vh@hideauthor{0} % By default, the authors of a change are shown
\def \vh@tablegrid{0} % By default, there is no tablegrid
+\def \vh@omittable{0} % By default, we want to see a table
\DeclareOption{tocentry}{\def \vh@tocentry{1}}%
@@ -192,6 +221,7 @@
\DeclareOption{owncaptions}{\vh@setcaptions \def \vh@owncaptions{1}}%
\DeclareOption{hideauthorcolumn}{\def \vh@hideauthor{1}}%
\DeclareOption{tablegrid}{\def \vh@tablegrid{1}}%
+\DeclareOption{omittable}{\def \vh@omittable{1}}%
%% This macro starts a new chapter. If \chapter is undefined, \section is
%% used (To work with document class article). The option nochapter will
@@ -286,7 +316,7 @@
%% The environment versionhistory.
%%
-%% At first the macro \decl@revhEntry will be called to allow the user to add
+%% At first the macro \vh@declarevhEntry will be called to allow the user to add
%% entries to the version history. Second step is to write the tables's head.
%% Third step is to delete previous contents of vhAllAuthorsSet. Now the
%% captions of the actual language are loaded. Last step is to start a new
@@ -298,19 +328,23 @@
%%
\newenvironment{versionhistory}{%
\vh@declarevhEntry
- \vh@writeTable
\newsetsimple \vhAllAuthorsSet{}%
- \ifnum \vh@owncaptions=0\relax% Defined by the options
- \vh@setcaptions
+ \ifnum \vh@omittable=0\relax
+ \vh@writeTable
+ \ifnum \vh@owncaptions=0\relax% Defined by the options
+ \vh@setcaptions
+ \fi
+ \vh@chapter
\fi
- \vh@chapter
}{
- \vh@writeEndTable
\vh@writeHstFile
\vh@undeclarevhEntry
- \IfFileExists{\jobname.ver}{% file exists
- \LTXtable{\textwidth}{\jobname.ver}}%
- {\@latex@warning{Rerun LaTeX to get the history of versions.}}%
+ \ifnum \vh@omittable=0\relax
+ \vh@writeEndTable
+ \IfFileExists{\jobname.ver}{% file exists
+ \LTXtable{\textwidth}{\jobname.ver}}%
+ {\@latex@warning{Rerun LaTeX to get the history of versions.}}%
+ \fi
}
@@ -332,15 +366,17 @@
\gdef \vhCurrentVersion{##1}% Update version number
\gdef \vhCurrentDate{##2}% Update date
\vh@add{##3}%
- \vh@verbwrite \vh@verfile {##1}%
- \vh@verbwrite \vh@verfile { & ##2}%
- \ifnum \vh@hideauthor=0\relax
- \vh@verbwrite \vh@verfile { & \listset{##3}}%
- \fi
- \ifnum \vh@tablegrid=0\relax
- \vh@verbwrite \vh@verfile { & ##4\\}%
- \else
- \vh@verbwrite \vh@verfile { & ##4\\\hline}%
+ \ifnum \vh@omittable=0\relax
+ \vh@verbwrite \vh@verfile {##1}%
+ \vh@verbwrite \vh@verfile { & ##2}%
+ \ifnum \vh@hideauthor=0\relax
+ \vh@verbwrite \vh@verfile { & \listset{##3}}%
+ \fi
+ \ifnum \vh@tablegrid=0\relax
+ \vh@verbwrite \vh@verfile { & ##4\\}%
+ \else
+ \vh@verbwrite \vh@verfile { & ##4\\\hline}%
+ \fi
\fi
}%
}