texlive[59022] Master/texmf-dist: easybook (29apr21)

commits+karl at tug.org commits+karl at tug.org
Thu Apr 29 22:46:41 CEST 2021


Revision: 59022
          http://tug.org/svn/texlive?view=revision&revision=59022
Author:   karl
Date:     2021-04-29 22:46:41 +0200 (Thu, 29 Apr 2021)
Log Message:
-----------
easybook (29apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/easybook/README.md
    trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex
    trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex
    trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex
    trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
    trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
    trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
    trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
    trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls

Modified: trunk/Master/texmf-dist/doc/latex/easybook/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/README.md	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/doc/latex/easybook/README.md	2021-04-29 20:46:41 UTC (rev 59022)
@@ -36,4 +36,26 @@
 
 ## 网址
 
-| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [字体](https://wws.lanzous.com/b01ns361i) |
\ No newline at end of file
+| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [字体](https://wws.lanzous.com/b01ns361i) |
+
+## v1.24 更新内容
+
+- 各模块名变为相应接口命令名
+- 主题颜色调整
+- 改为导言区载入 | tasks | imakeidex | 宏包,取消载入 cleverref 宏包
+- 文档类选项变动 english $\rightarrow$ scheme
+- 文档类选项变动 enstyle $\rightarrow$ enmode
+- 文档类选项 entitle 删除
+- 定理模块变动 numberwith $\rightarrow$ within
+- 定理模块新增选项 | tocline-fig | tocline-tab |tocline-lst | line-align | hang |
+- 超链接模块变动 linktopage $\rightarrow$ linktoc
+- 超链接模块新增选项 linkcol-all
+- 风格模块新增选项 color-all
+- 行距模块新增选项 spread-all
+- 目录命令新增选项 title
+- 页眉页脚模块新增选项 | subsec-mark | numsep | numsep-all | indent-all |
+- 参考文献模块新增选项 bib-loadpkg
+- 参考文献模块新增命令 | \EbBibtexSet | \EbBiblatexPreset | \EbBiblatexPostset |
+- 目录样式模块新增命令 \EbNumberline
+- 定理样式模块新增命令 \EbNewtheorem
+- 盒子 easybox 和环境 exercise 升级,新增盒子 ebparbox,盒子命令变动 | \concise $\rightarrow$ \eblink | \fuzzy $\rightarrow$ \ebemph |
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex	2021-04-29 20:46:41 UTC (rev 59022)
@@ -4,8 +4,8 @@
 
 \begin{outline}
 \index{zhaiyao@摘要盒子}
-  \item 这是一个摘要盒子。
-  \item 它的标题是可选参数,默认标题是摘要。
+  \item \zhlipsum*[68][name = zhufu]
+  \item \zhlipsum*[68][name = zhufu]
 \end{outline}
 
 \section{定理}
@@ -22,28 +22,28 @@
 \end{definition}
 
 \begin{lemma}
-这是一个引理。
+  \zhlipsum*[51][name = zhufu]
 \end{lemma}
 
 \begin{corollary}
-这是一个推论。
+  \zhlipsum*[51][name = zhufu]
 \end{corollary}
 
 \begin{proposition}
-这是一个性质。
+  \zhlipsum*[51][name = zhufu]
 \end{proposition}
 
 \clearpage
 \begin{example}
-这是一个例。
+  \zhlipsum*[51][name = zhufu]
 \end{example}
 
 \begin{remark}
-这是一个注。
+  \zhlipsum*[51][name = zhufu]
 \end{remark}
 
 \begin{proof}
-这是一个证明,末尾自动添加证明结束符。
+  \zhlipsum*[51][name = zhufu]
 \end{proof}
 
 \begin{easybox}[DarkCyan](An introduction to aspirin on Wikipedia)

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex	2021-04-29 20:46:41 UTC (rev 59022)
@@ -6,18 +6,14 @@
 \index{g@公式}
 \zhlipsum*[42][name = aspirin]
 \begin{equation}\label{eq:matrix}
-  \bm{A} = \left[
-    \begin{matrix}
-      a_{11} & a_{12} & \cdots & a_{1n} \\
-      a_{21} & a_{22} & \cdots & a_{2n} \\
-      \vdots & \vdots & \ddots & \vdots \\
-      a_{m1} & a_{m2} & \cdots & a_{mn} \\
-    \end{matrix}
-  \right] = \left[
-    \begin{matrix}
-      \bm{a}_1 & \bm{a}_2 & \cdots & \bm{a}_n
-    \end{matrix}
-  \right]
+  \bm{A} = \left[\begin{matrix}
+    a_{11} & a_{12} & \cdots & a_{1n} \\
+    a_{21} & a_{22} & \cdots & a_{2n} \\
+    \vdots & \vdots & \ddots & \vdots \\
+    a_{m1} & a_{m2} & \cdots & a_{mn} \\
+  \end{matrix}\right] = \left[\begin{matrix}
+    \bm{a}_1 & \bm{a}_2 & \cdots & \bm{a}_n
+  \end{matrix}\right]
 \end{equation}
 可以通过添加标签在正文中引用公式,如带有中文括号的引用\ref{eq:matrix}。
 

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex	2021-04-29 20:46:41 UTC (rev 59022)
@@ -29,19 +29,15 @@
 \section{引用}
 \index{y@引用}
 
-\subsection{索引}
+\subsection{引用章节}
+\label{subsec:reference section}
 \index{y@引用!s@索引}
-\zhlipsum[8][name = aspirin]
+阿司匹林及其复方制剂都能有效治疗某几种头痛,但对另外几种则效果不明\ref{chap:other formats}。因其他疾病或创伤导致的继发性头痛需要及时在医疗机构接受治疗\ref{subsec:reference section}。
 
 \subsection{脚注}
 \index{y@引用!j@脚注}
 阿司匹林及其复方制剂都能有效治疗某几种头痛,但对另外几种则效果不明\footnote{\zhlipsum*[8][name = aspirin]}。因其他疾病或创伤导致的继发性头痛需要及时在医疗机构接受治疗\Footnote{*}{\zhlipsum*[8][name = aspirin]}。
 
-\subsection{引用章节}
-\label{subsec:reference section}
-\index{y@引用!s@索引}
-阿司匹林及其复方制剂都能有效治疗某几种头痛,但对另外几种则效果不明\ref{chap:other formats}。因其他疾病或创伤导致的继发性头痛需要及时在医疗机构接受治疗\ref{subsec:reference section}。
-
 \subsection{参考文献}
 \index{y@引用!c@参考文献}
 这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
\ No newline at end of file

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

Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-04-29 20:46:41 UTC (rev 59022)
@@ -99,7 +99,7 @@
 \usepackage{lipsum,zhlipsum,bicaption,tasks,tcolorbox,imakeidx}
 
 \begin{document}
-\title{\sffamily easybook 书籍文档类}
+\title{\sffamily easybook 文档类演示}
 \author
   {
     瞿毅\thanks{quee123 at foxmail.com.} \\
@@ -106,14 +106,17 @@
     \url{https://latexstudio.net} \\
     \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
   }
-\date{2021/04/27\hskip\ccwd\relax v1.24u}
+\date{2021/04/29\hskip\ccwd\relax v1.24w}
 
 \frontmatter[roman]
 \maketitle
 \tableofcontents[book,multoc = false]
+\listoffigures+[book,multoc = false,title = 图片列表]
 
 \mainmatter*
 \part{使用示例}
+\listoftables[book,multoc = false,title = 表格列表]
+\listoflistings+[book,multoc = false,title = 代码列表]
 \include{chapter1}
 \include{chapter2}
 \include{chapter3}
@@ -120,9 +123,6 @@
 \include{appendix}
 
 \backmatter
-\printbibliography[book,multoc = false]
-\listoffigures[book,multoc = false]
-\listoftables[book,multoc = false]
-\listoflistings[book,multoc = false]
-\printindex
+\printbibliography+[book,multoc = false,title = 参考文献]
+\printindex[索引]
 \end{document}
\ No newline at end of file

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

Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-04-29 20:46:41 UTC (rev 59022)
@@ -54,9 +54,10 @@
 % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
 % \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
 %
-% \title{\sffamily easybook 书籍文档类}
+% \title{\sffamily easybook 文档类手册}
 % \author{瞿毅}
-% \date{2021/04/27\hskip\ccwd\relax v1.24u\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/04/29\hskip\ccwd\relax v1.24w\thanks{\url{https://gitee.com/texl3/easybook}}}
+%
 % \maketitle
 % \begin{abstract}
 %   \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
@@ -105,7 +106,7 @@
 % \end{function}
 %
 % \begin{function}[rEXP,added = 2021-01-05]{newline}
-% 章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
+% 部分和章标题的样式为另起一行,符合一般英文书籍的习惯。类似下面的效果
 % \begin{flushleft}\sffamily\LARGE
 %   Chapter 1\vskip 1.3pc
 %   This is a title
@@ -112,10 +113,6 @@
 % \end{flushleft}
 % \end{function}
 %
-% \begin{function}[rEXP,added = 2021-01-05]{entitle}
-% 部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
-% \end{function}
-%
 % \begin{function}[rEXP,added = 2021-01-05,updated = 2021-04-08]{scheme}
 % \begin{syntax}
 %   scheme = <(chinese)|plain>
@@ -123,8 +120,8 @@
 % \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]{enstyle}
-% 同时开启 \opt{newline}、\opt{entitle} 和 \opt{scheme = plain} 三个选项以符合英文原生风格。
+% \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-02-02]{font}
@@ -161,7 +158,7 @@
 %
 % \subsection{文档命令}
 % \label{subsec:document command}
-% \begin{function}[added = 2021-02-20,updated = 2021-04-11]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
+% \begin{function}[added = 2021-02-20,updated = 2021-04-29]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
 % \begin{syntax}
 %   \tn{frontmatter*}\oarg{编号格式|(Roman)}
 %   \tn{mainmatter*}
@@ -168,11 +165,11 @@
 %   \tn{backmatter}
 %   \tn{cleardoublepage}\oarg{页面风格|(empty)}
 %   \tn{tableofcontents}\oarg{键值列表}
-%   \tn{listoffigures*}\oarg{键值列表}
-%   \tn{listoftables*}\oarg{键值列表}
-%   \tn{listoflistings*}\oarg{键值列表}
+%   \tn{listoffigures*+}\oarg{键值列表}
+%   \tn{listoftables*+}\oarg{键值列表}
+%   \tn{listoflistings*+}\oarg{键值列表}
 % \end{syntax}
-% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用清双页命令 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。在奇数页使用命令 \tn{cleardoublepage} 时可选参数为下一页多出的空白偶数页的页面风格,默认为 \opt{empty} 即空的页眉页脚。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
+% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用清双页命令 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。在奇数页使用命令 \tn{cleardoublepage} 时可选参数为下一页多出的空白偶数页的页面风格,默认为 \opt{empty} 即空的页眉页脚。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。目录的键值列表选项如下
 % \changes{v1.23}{2021/02/20}{重新定义文档结构划分命令。}
 % \end{function}
 %
@@ -183,7 +180,7 @@
 % \end{syntax}
 % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。已经预置了中英文的目录标题,可以使用 \opt{title} 选项更改目录标题的名称。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
-% \changes{v1.24u}{2021/04/04}{目录命令的可选参数增加标题键值。}
+% \changes{v1.24w}{2021/04/04}{目录命令的可选参数增加标题键值。}
 % \end{function}
 %
 % \section{接口选项}
@@ -266,7 +263,7 @@
 % \ding{229} 以上选项路径为 \opt{link/...} \\
 % \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-% \changes{v1.24u}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
+% \changes{v1.24w}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -345,7 +342,7 @@
 % \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.24u}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
+% \changes{v1.24w}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -417,7 +414,7 @@
 % \end{syntax}
 % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
 % \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-% \changes{v1.24u}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。}
+% \changes{v1.24w}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -501,7 +498,7 @@
 % \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.24u}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。}
+% \changes{v1.24w}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{\easyhead,\easyfoot}
@@ -540,7 +537,7 @@
 %
 % \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
 % \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
-% \changes{v1.24u}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
+% \changes{v1.24w}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberline}
@@ -579,9 +576,9 @@
 %   indent-all = <目录标题左边缩进>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{tocset/lists/...} 或 \opt{tocset/...}
-% \changes{v1.24u}{2021/04/05}{可以设置图、表和代码目录的标签。}
-% \changes{v1.24u}{2021/04/06}{增加目录引导线右边对齐方式。}
-% \changes{v1.24u}{2021/04/19}{给目录增加 \opt{hang} 样式选项。}
+% \changes{v1.24w}{2021/04/05}{可以设置图、表和代码目录的标签。}
+% \changes{v1.24w}{2021/04/06}{增加目录引导线右边对齐方式。}
+% \changes{v1.24w}{2021/04/19}{给目录增加 \opt{hang} 样式选项。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -621,7 +618,7 @@
 %   \tn{end}\marg{环境名}
 % \end{syntax}
 % \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式,也可以直接使用可选参数的键值列表,具体选项见 \pkg{enumitem} 宏包文档。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如
-% \changes{v1.24u}{2021/04/08}{重新优化列表环境的配置。}
+% \changes{v1.24w}{2021/04/08}{重新优化列表环境的配置。}
 % \end{function}
 %
 % \begin{ctexexam}
@@ -677,7 +674,7 @@
 % \label{subsec:exercise}
 % \begin{function}[added = 2021-01-05,updated = 2021-04-19]{exercise}
 % \begin{syntax}
-%   \tn{begin}\marg{exercise}*+\oarg{颜色名|(LightBlue)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}\oarg{序言}
+%   \tn{begin}\marg{exercise}*+\oarg{颜色名|(LightSkyBlue)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}\oarg{序言}
 %   \  \tn{item} <习题内容>
 %   \tn{end}\marg{exercise}
 % \end{syntax}
@@ -688,7 +685,7 @@
 % \end{function}
 %
 % \begin{ctexexam}
-%   \begin{exercise}+[LightBlue][1.](习题)
+%   \begin{exercise}+[LightSkyBlue][1.](习题)
 %     \item 习题内容
 %     \item 习题内容
 %   \end{exercise}
@@ -740,7 +737,7 @@
 %   \tn{end}\marg{ebparbox}
 % \end{syntax}
 % 环境 \env{ebparbox} 与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。
-% \changes{v1.24u}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。}
+% \changes{v1.24w}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。}
 % \end{function}
 %
 % \subsubsection{行内盒子}
@@ -799,14 +796,14 @@
 %   \tn{labelformat}\marg{计数器}\marg{标签引用格式}
 % \end{syntax}
 % 使用 \tn{ref} 命令进行引用将会自动检测环境并添加相应的前缀,\tn{labelformat} 可以设置标签引用格式,第二个参数中\#1代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。
-% \changes{v1.24u}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
+% \changes{v1.24w}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
 % \end{function}
 %
 % \subsubsection{索引}
-% \begin{function}[added = 2021-01-05]{\index,\printindex}
+% \begin{function}[added = 2021-04-29]{\index,\printindex}
 % \begin{syntax}
 %   \tn{index}\marg{标签}
-%   \tn{printindex}\oarg{索引名}
+%   \tn{printindex}\parg{索引名}\oarg{标题名}
 % \end{syntax}
 % \pkg{imakeidx} 宏包可使用索引的功能,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
 % \end{function}
@@ -871,6 +868,9 @@
 % \pkg{ulem} 宏包提供了多种下划线命令,下划线的粗细由命令 \tn{ULthickness} 控制,重新定义它需要使用 \tn{renewcommand} 命令。下划线的深度由 \tn{ULdepth} 控制,默认值 \tn{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \tn{setlength} 设定特定深度。
 % \end{function}
 %
+% \subsection{封面}
+% 目前仍然使用由 \tn{maketitle} 命令生成的标准 \cls{book} 文档类的封面,并未做任何改动。可以自行设计或用其它软件制作封面,也可以使用热心网友 nangeng 已经为 \cls{easybook} 制作的\href{https://gitee.com/texl3/easybook/issues/I3NXVQ}{一个封面}。
+%
 % \section{载入的宏包}
 % 以下为 \cls{easybook} 直接调用的关键宏包,带有 \ding{75} 符号的宏包并未载入它们,仅做了预配置和兼容性处理,可根据需要在导言区手动载入以实现相关的功能。
 % \begin{description}
@@ -909,27 +909,27 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/04/27}{1.24u}{beta}
+\ProvidesExplClass{easybook}{2021/04/29}{1.24w}{beta}
 
-\cs_generate_variant:Nn \__ctex_define:nn {nx}
+\cs_generate_variant:Nn \eb_ctex_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
 \cs_generate_variant:Nn \dim_add:Nn {NV}
-\cs_generate_variant:Nn \__eb_put_hyperref:n {x}
-\cs_new_protected:Npn \__ctex_define:nn #1
+\cs_generate_variant:Nn \eb_put_hyperref:n {x}
+\cs_new_protected:Npn \eb_ctex_define:nn #1
   {\keys_define:nn {ctex/#1}}
-\cs_new_protected:Npn \__eb_put_ctexbook:n #1
+\cs_new_protected:Npn \eb_put_ctexbook:n #1
   {\PassOptionsToClass{#1}{ctexbook}}
-\cs_new_protected:Npn \__eb_patch_cmd:Nnn #1#2#3
+\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
   {\ctex_patch_cmd_once:NnnnTF #1{}{#2}{#3}{}{\ctex_patch_failure:N #1}}
-\cs_new_protected:Npn \__eb_appto_cmd:Nn #1#2
+\cs_new_protected:Npn \eb_appto_cmd:Nn #1#2
   {\ctex_appto_cmd:NnnTF #1{}{#2}{}{\ctex_patch_failure:N #1}}
-\cs_new_protected:Npn \__eb_at_end_preamble:n
+\cs_new_protected:Npn \eb_at_end_preamble:n
   {\ctex_gadd_ltxhook:nn {env/document/before}}
+\cs_gset_eq:NN \PackageWarning\use_none:nn
 
-\bool_set_false:N \l__eb_draft_bool
-\bool_set_false:N \l__eb_newline_bool
+\bool_set_false:N \l__eb_compile_draft_bool
+\bool_set_false:N \l__eb_title_newline_bool
 \bool_set_false:N \l__eb_font_noto_bool
-\bool_set_true:N  \l__eb_zhtitle_bool
 \bool_set_true:N  \l__eb_page_twoside_bool
 \bool_set_true:N  \l__eb_class_book_bool
 \tl_new:N         \g__eb_config_tl
@@ -937,22 +937,21 @@
 
 \keys_define:nn {easybook}
   {
-    draft         .code:n = \bool_set_true:N  \l__eb_draft_bool,
-    newline       .code:n = \bool_set_true:N  \l__eb_newline_bool,
-    entitle       .code:n = \bool_set_false:N \l__eb_zhtitle_bool,
-    scheme        .code:n = \__eb_put_ctexbook:n {scheme = #1},
-    enstyle       .meta:n = {newline,entitle,scheme = plain},
+    draft         .code:n = \bool_set_true:N \l__eb_compile_draft_bool,
+    newline       .code:n = \bool_set_true:N \l__eb_title_newline_bool,
+    scheme        .code:n = \eb_put_ctexbook:n {scheme = #1},
+    enmode        .meta:n = {newline,scheme = plain},
 
     font          .choices:nn =
       {adobe,founder,mac,windows,none}
-      {\__eb_put_ctexbook:n {fontset = \l_keys_choice_tl}},
+      {\eb_put_ctexbook:n {fontset = \l_keys_choice_tl}},
     font/noto     .code:n =
       {
         \bool_set_true:N \l__eb_font_noto_bool
-        \__eb_put_ctexbook:n {fontset = none}
+        \eb_put_ctexbook:n {fontset = none}
       },
     font/overleaf .code:n = {},
-    font/linux    .code:n = \__eb_put_ctexbook:n {fontset = ubuntu},
+    font/linux    .code:n = \eb_put_ctexbook:n {fontset = ubuntu},
     font          .value_required:n = true,
     font          .initial:n = overleaf,
 
@@ -966,12 +965,12 @@
     oneside       .code:n =
       {
         \bool_set_false:N \l__eb_page_twoside_bool
-        \__eb_put_ctexbook:n {oneside}
+        \eb_put_ctexbook:n {oneside}
       },
     twoside       .code:n =
       {
         \bool_set_true:N \l__eb_page_twoside_bool
-        \__eb_put_ctexbook:n {twoside}
+        \eb_put_ctexbook:n {twoside}
       },
 
     class         .choice:,
@@ -1005,7 +1004,7 @@
     {no-math}{fontspec},
     {noto,upint}{newtxmath}
   }{\PassOptionsToPackage#1}
-\__eb_put_ctexbook:n {\g__eb_options_clist}
+\eb_put_ctexbook:n {\g__eb_options_clist}
 \LoadClass[UTF8]{ctexbook}
 
 \bool_new:N \l__eb_multoc_bool
@@ -1030,7 +1029,7 @@
     lstlistlistingname  .tl_set:N = \lstlistlistingname,
     lstlistingname      .tl_set:N = \lstlistingname
   }
-\__ctex_define:nn {style}
+\eb_ctex_define:nn {style}
   {
     multoc        .bool_set:N = \l__eb_multoc_bool,
     multoc        .default:n = true,
@@ -1089,7 +1088,7 @@
       {\file_input:n {\g__eb_config_tl}}
   }
 
-\cs_new_protected:Npn \__eb_package_later_bool:nn #1#2
+\cs_new_protected:Npn \eb_package_later_bool:nn #1#2
   {
     \@ifpackagelater{#1}{#2}
       {}{\msg_warning:nnn {easybook}{package-old}{#1}}
@@ -1109,58 +1108,58 @@
     {ctex}{2020/10/19},
     {thmtools}{2020/08/01},
     {caption-light}{2020/08/24}
-  }{\__eb_package_later_bool:nn #1}
+  }{\eb_package_later_bool:nn #1}
 
 \sys_if_engine_xetex:TF
   {
-    \cs_new_eq:NN \__eb_set_family:nnn  \xeCJK_set_family:nnn
-    \cs_new_eq:NN \__eb_switch_family:n \xeCJK_switch_family:n
+    \cs_new_eq:NN \eb_set_family:nnn  \xeCJK_set_family:nnn
+    \cs_new_eq:NN \eb_switch_family:n \xeCJK_switch_family:n
   }{
-    \cs_new_eq:NN \__eb_set_family:nnn  \ctex_ltj_set_family:nnn
-    \cs_new_eq:NN \__eb_switch_family:n \ctex_ltj_switch_family:n
+    \cs_new_eq:NN \eb_set_family:nnn  \ctex_ltj_set_family:nnn
+    \cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n
   }
 
-\cs_new_protected:Npn \__eb_setmainfont:nn #1#2
+\cs_new_protected:Npn \eb_setmainfont:nn #1#2
   {\__fontspec_main_setmainfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__eb_setsansfont:nn #1#2
+\cs_new_protected:Npn \eb_setsansfont:nn #1#2
   {\__fontspec_main_setsansfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__eb_setmonofont:nn #1#2
+\cs_new_protected:Npn \eb_setmonofont:nn #1#2
   {\__fontspec_main_setmonofont:nn {#2}{#1}}
-\cs_new_protected:Npn \__eb_setCJKmainfont:nn #1#2
-  {\__eb_set_family:nnn {\CJKrmdefault}{#2}{#1}}
-\cs_new_protected:Npn \__eb_setCJKsansfont:nn #1#2
-  {\__eb_set_family:nnn {\CJKsfdefault}{#2}{#1}}
-\cs_new_protected:Npn \__eb_setCJKmonofont:nn #1#2
-  {\__eb_set_family:nnn {\CJKttdefault}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_songti:nn #1#2
-  {\__eb_set_family:nnn {songti}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_heiti:nn #1#2
-  {\__eb_set_family:nnn {heiti}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_kaishu:nn #1#2
-  {\__eb_set_family:nnn {kaishu}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_fangsong:nn #1#2
-  {\__eb_set_family:nnn {fangsong}{#2}{#1}}
+\cs_new_protected:Npn \eb_setCJKmainfont:nn #1#2
+  {\eb_set_family:nnn {\CJKrmdefault}{#2}{#1}}
+\cs_new_protected:Npn \eb_setCJKsansfont:nn #1#2
+  {\eb_set_family:nnn {\CJKsfdefault}{#2}{#1}}
+\cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2
+  {\eb_set_family:nnn {\CJKttdefault}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_songti:nn #1#2
+  {\eb_set_family:nnn {songti}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_heiti:nn #1#2
+  {\eb_set_family:nnn {heiti}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_kaishu:nn #1#2
+  {\eb_set_family:nnn {kaishu}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_fangsong:nn #1#2
+  {\eb_set_family:nnn {fangsong}{#2}{#1}}
 
-\tl_const:Nn \__eb_option_zhfont_tl
+\tl_const:Nn \eb_option_zhfont_tl
   {UprightFont = *,AutoFakeBold = 1.5,ItalicFont = *}
-\cs_new_protected:Npx \__eb_setCJKmainfont:n #1
-  {\__eb_setCJKmainfont:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_setCJKsansfont:n #1
-  {\__eb_setCJKsansfont:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_setCJKmonofont:n #1
-  {\__eb_setCJKmonofont:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_songti:n #1
-  {\__eb_set_zhfont_songti:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_heiti:n #1
-  {\__eb_set_zhfont_heiti:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_kaishu:n #1
-  {\__eb_set_zhfont_kaishu:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_fangsong:n #1
-  {\__eb_set_zhfont_fangsong:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_setCJKmainfont:n #1
+  {\eb_setCJKmainfont:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_setCJKsansfont:n #1
+  {\eb_setCJKsansfont:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_setCJKmonofont:n #1
+  {\eb_setCJKmonofont:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_songti:n #1
+  {\eb_set_zhfont_songti:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_heiti:n #1
+  {\eb_set_zhfont_heiti:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_kaishu:n #1
+  {\eb_set_zhfont_kaishu:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_fangsong:n #1
+  {\eb_set_zhfont_fangsong:nn {#1}{\eb_option_zhfont_tl}}
 
 \bool_if:NT \l__eb_font_noto_bool
   {
-    \__eb_setmainfont:nn {NotoSerif}
+    \eb_setmainfont:nn {NotoSerif}
       {
         Extension = .ttf,
         UprightFont = *-Regular,
@@ -1167,7 +1166,7 @@
         BoldFont = *-Bold,
         ItalicFont = *-Italic
       }
-    \__eb_setsansfont:nn {NotoSans}
+    \eb_setsansfont:nn {NotoSans}
       {
         Extension = .ttf,
         UprightFont = *-Regular,
@@ -1174,31 +1173,31 @@
         BoldFont = *-Bold,
         ItalicFont = *-Italic
       }
-    \__eb_setmonofont:nn {NotoSansMono}
+    \eb_setmonofont:nn {NotoSansMono}
       {
         Extension = .ttf,
         UprightFont = *-Regular,
         BoldFont = *-Bold
       }
-    \__eb_setCJKmainfont:nn {FZShuSong-Z01S}
+    \eb_setCJKmainfont:nn {FZShuSong-Z01S}
       {
         UprightFont = *,
         BoldFont = FZHei-B01S,
         ItalicFont = FZKai-Z03S
       }
-    \__eb_setCJKsansfont:n {FZHei-B01S}
-    \__eb_setCJKmonofont:n {FZFangSong-Z02S}
-    \__eb_set_zhfont_songti:n {FZShuSong-Z01S}
-    \__eb_set_zhfont_heiti:n {FZHei-B01S}
-    \__eb_set_zhfont_kaishu:n {FZKai-Z03S}
-    \__eb_set_zhfont_fangsong:n {FZFangSong-Z02S}
-    \cs_new_protected:Npn \songti{\__eb_switch_family:n {songti}}
-    \cs_new_protected:Npn \heiti{\__eb_switch_family:n {heiti}}
-    \cs_new_protected:Npn \kaishu{\__eb_switch_family:n {kaishu}}
-    \cs_new_protected:Npn \fangsong{\__eb_switch_family:n {fangsong}}
+    \eb_setCJKsansfont:n {FZHei-B01S}
+    \eb_setCJKmonofont:n {FZFangSong-Z02S}
+    \eb_set_zhfont_songti:n {FZShuSong-Z01S}
+    \eb_set_zhfont_heiti:n {FZHei-B01S}
+    \eb_set_zhfont_kaishu:n {FZKai-Z03S}
+    \eb_set_zhfont_fangsong:n {FZFangSong-Z02S}
+    \cs_new_protected:Npn \songti{\eb_switch_family:n {songti}}
+    \cs_new_protected:Npn \heiti{\eb_switch_family:n {heiti}}
+    \cs_new_protected:Npn \kaishu{\eb_switch_family:n {kaishu}}
+    \cs_new_protected:Npn \fangsong{\eb_switch_family:n {fangsong}}
   }
-\__eb_at_end_preamble:n
-  {\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\normalfont}}
+\eb_at_end_preamble:n
+  {\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\itshape}}
 
 \includepdfset{fitpaper = true}
 \geometry
@@ -1214,7 +1213,7 @@
     marginparwidth = 2.54cm
   }
 \clist_new:N \g__eb_geometry_clist
-\__ctex_define:nn {geoset}
+\eb_ctex_define:nn {geoset}
   {
     footnotemargin  .dim_set:N = \footnotemargin,
     footnotemargin  .initial:n = 0.5\ccwd,
@@ -1244,18 +1243,18 @@
 \RenewDocumentCommand{\frontmatter}{sO{Roman}}
   {
     \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
-    \@mainmatterfalse
+    \boolfalse{@mainmatter}
     \pagenumbering{#2}
   }
 \RenewDocumentCommand{\mainmatter}{s}
   {
     \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
-    \@mainmattertrue
+    \booltrue{@mainmatter}
     \pagenumbering{arabic}
   }
 \cs_gset_eq:NN \easyhead\fancyhead
 \cs_gset_eq:NN \easyfoot\fancyfoot
-\__ctex_define:nn {hdrset}
+\eb_ctex_define:nn {hdrset}
   {
     head-foot     .tl_set:N = \l__eb_fancyhf_content_tl,
     head-foot     .initial:n =
@@ -1271,36 +1270,34 @@
           }
       },
 
-    chap-mark     .cs_set:Np = \__eb_fancyhf_chap_mark:n #1,
+    chap-mark     .cs_set:Np = \eb_fancyhf_chapter_mark:n #1,
     chap-mark     .initial:n =
       {
         \int_compare:nT {\c at secnumdepth > -1}
           {
-            \if at mainmatter
-              \ifodd\CTEX at chapter@numbering
-                \CTEXthechapter\hspace{\ccwd}
-              \fi
-            \fi
+            \ifbool{@mainmatter}
+              {
+                \int_if_odd:nT {\CTEX at chapter@numbering}
+                  {\CTEXthechapter\hspace{\ccwd}}
+              }{}
           }#1
       },
-    sec-mark      .cs_set:Np = \__eb_fancyhf_sec_mark:n #1,
+    sec-mark      .cs_set:Np = \eb_fancyhf_section_mark:n #1,
     sec-mark      .initial:n =
       {
         \int_compare:nT {\c at secnumdepth > 0}
           {
-            \ifodd\CTEX at section@numbering
-              \CTEXthesection\hspace{0.5\ccwd}
-            \fi
+            \int_if_odd:nT {\CTEX at section@numbering}
+              {\CTEXthesection\hspace{0.5\ccwd}}
           }#1
       },
-    subsec-mark   .cs_set:Np = \__eb_fancyhf_subsec_mark:n #1,
+    subsec-mark   .cs_set:Np = \eb_fancyhf_subsection_mark:n #1,
     subsec-mark   .initial:n =
       {
         \int_compare:nT {\c at secnumdepth > 1}
           {
-            \ifodd\CTEX at subsection@numbering
-              \CTEXthesubsection\hspace{0.5\ccwd}
-            \fi
+            \int_if_odd:nT {\CTEX at subsection@numbering}
+              {\CTEXthesubsection\hspace{0.5\ccwd}}
           }#1
       },
 
@@ -1324,21 +1321,22 @@
         \group_end:
       }
   }
-\cs_new:Npn \__eb_upper_chaptermark_bool:n #1
+\cs_new:Npn \eb_upper_number_mark_bool:nn #1#2
   {
     \bool_if:NT \l__eb_uppercase_bool
-      {\text_uppercase:n}{\__eb_fancyhf_chap_mark:n {#1}}
+      {\text_uppercase:n}{\use:c {eb_fancyhf_#1_mark:n}{#2}}
   }
-\cs_new:Npn \__eb_upper_sectionmark_bool:n #1
+\cs_new:Npn \eb at number@markdouble#1#2
   {
-    \bool_if:NT \l__eb_uppercase_bool
-      {\text_uppercase:n}{\__eb_fancyhf_sec_mark:n {#1}}
+    \markboth
+      {\eb_upper_number_mark_bool:nn {#1}{#2}}
+      {
+        \bool_if:NT \l__eb_page_twoside_bool
+          {\eb_upper_number_mark_bool:nn {#1}{#2}}
+      }
   }
-\cs_new:Npn \__eb_upper_subsectionmark_bool:n #1
-  {
-    \bool_if:NT \l__eb_uppercase_bool
-      {\text_uppercase:n}{\__eb_fancyhf_subsec_mark:n {#1}}
-  }
+\cs_new:Npn \eb at number@markright#1#2
+  {\markright{\eb_upper_number_mark_bool:nn {#1}{#2}}}
 \ctex_at_end_preamble:n
   {
     \exp_args:NV \geometry\g__eb_geometry_clist
@@ -1349,30 +1347,16 @@
     \bool_if:NTF \l__eb_class_book_bool
       {
         \cs_gset:Npn \chaptermark#1
-          {
-            \markboth
-              {\__eb_upper_chaptermark_bool:n {#1}}
-              {
-                \bool_if:NT \l__eb_page_twoside_bool
-                  {\__eb_upper_chaptermark_bool:n {#1}}
-              }
-          }
+          {\eb at number@markdouble{chapter}{#1}}
         \cs_gset:Npn \sectionmark#1
-          {\markright{\__eb_upper_sectionmark_bool:n {#1}}}
+          {\eb at number@markright{section}{#1}}
       }{
         \cs_gset:Npn \sectionmark#1
-          {
-            \markboth
-              {\__eb_upper_sectionmark_bool:n {#1}}
-              {
-                \bool_if:NT \l__eb_page_twoside_bool
-                  {\__eb_upper_sectionmark_bool:n {#1}}
-              }
-          }
+          {\eb at number@markdouble{section}{#1}}
         \cs_gset:Npn \subsectionmark#1
-          {\markright{\__eb_upper_subsectionmark_bool:n {#1}}}
+          {\eb at number@markright{subsection}{#1}}
       }
-    \bool_if:NT \l__eb_draft_bool
+    \bool_if:NT \l__eb_compile_draft_bool
       {
         \bool_if:NTF \l__eb_page_twoside_bool
           {\easyfoot[C]{\color{SlateGray}\sffamily\today}}
@@ -1386,7 +1370,7 @@
 \seq_map_inline:Nn \c__eb_toc_headings_level_seq
   {
     \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
-    \__ctex_define:nn {tocset}
+    \eb_ctex_define:nn {tocset}
       {
         #1/format .tl_set:c = l__eb_toc_#1_format_tl,
         #1/indent .tl_set:c = l__eb_toc_#1_indent_tl,
@@ -1403,8 +1387,8 @@
         \hspace{\use:c {eb at toc@#1 at numsep}}
       }{}
   }
-\newtoggle{eb at titletoc@hang at fix}
-\__ctex_define:nn {tocset}
+\newbool{eb at titletoc@hang at fix}
+\eb_ctex_define:nn {tocset}
   {
     lists/lolskip     .skip_set:N = \l__eb_toc_lolskip_skip,
     lists/lolskip     .initial:n = 0.8pc,
@@ -1418,22 +1402,22 @@
     tocline-fig       .initial:n =
       {
         \figurename\space#1
-        \iftoggle{eb at titletoc@hang at fix}{}
-          {\hspace{\eb at toc@lists at numsep}}
+        \notbool{eb at titletoc@hang at fix}
+          {\hspace{\eb at toc@lists at numsep}}{}
       },
     tocline-tab       .cs_set:Np = \eb at labelname@lot#1,
     tocline-tab       .initial:n =
       {
         \tablename\space#1
-        \iftoggle{eb at titletoc@hang at fix}{}
-          {\hspace{\eb at toc@lists at numsep}}
+        \notbool{eb at titletoc@hang at fix}
+          {\hspace{\eb at toc@lists at numsep}}{}
       },
     tocline-lst       .tl_set:N = \eb at labelname@lol,
     tocline-lst       .initial:n =
       {
         \lstlistingname\space\thelstlisting
-        \iftoggle{eb at titletoc@hang at fix}{}
-          {\hspace{\eb at toc@lists at numsep}}
+        \notbool{eb at titletoc@hang at fix}
+          {\hspace{\eb at toc@lists at numsep}}{}
       },
     line-align        .bool_set:N = \l__eb_toc_line_align_bool,
     line-align        .default:n = true,
@@ -1442,7 +1426,7 @@
     hang              .choice:,
     hang/true         .code:n =
       {
-        \toggletrue{eb at titletoc@hang at fix}
+        \booltrue{eb at titletoc@hang at fix}
         \ctex_set:n
           {
             chapter/tocline = \CTEXnumberline{##1}##2,
@@ -1498,7 +1482,8 @@
     section/numsep = \ccwd,
 
     subsection/format = \addvspace{0.35pc},
-    subsection/indent = 3.8\ccwd,
+    subsection/indent =
+      {\bool_if:NTF \l__eb_class_book_bool{3.8\ccwd}{1.4\ccwd}},
     subsection/rule = \tocrule{$\cdot$},
     subsection/numsep = \ccwd,
 
@@ -1519,17 +1504,18 @@
           {\contentspage}{\thecontentspage}
       }
   }
-\cs_new_protected:Npn \__eb_titlecontents_set:nn #1#2
+\cs_new_protected:Npn \eb_titlecontents_set:nn #1#2
   {
     \titlecontents{#1}
       [\use:c {l__eb_toc_#2_indent_tl}]
       {\use:c {l__eb_toc_#2_format_tl}}
       {
-        \iftoggle{eb at titletoc@hang at fix}
+        \ifbool{eb at titletoc@hang at fix}
           {
             \contentspush
               {
-                \bool_if:NT \l__eb_toc_color_bool{\color{ctex at toc}}
+                \bool_if:NT \l__eb_toc_number_color_bool
+                  {\color{ctex at toc@number}}
                 \thecontentslabel
                 \hspace{\use:c {eb at toc@#2 at numsep}}
               }
@@ -1547,7 +1533,7 @@
     {figure}{lists},
     {table}{lists},
     {lstlisting}{lists}
-  }{\__eb_titlecontents_set:nn #1}
+  }{\eb_titlecontents_set:nn #1}
 
 \prop_new:N \l__eb_label_name_prop
 \prop_set_from_keyval:Nn \l__eb_label_name_prop
@@ -1559,8 +1545,8 @@
   {
     \addcontentsline{#1}{#2}
       {
-        \iftoggle{eb at titletoc@hang at fix}{\protect\numberline}{}
-        {\prop_item:Nn \l__eb_label_name_prop{#2}{#3}}{#4}
+        \ifbool{eb at titletoc@hang at fix}{\protect\numberline}{}
+          {\prop_item:Nn \l__eb_label_name_prop{#2}{#3}}{#4}
       }
   }
 \ctex_patch_cmd:Nnn \lst at MakeCaption
@@ -1570,12 +1556,12 @@
   }{
     \addcontentsline{lol}{lstlisting}
       {
-        \iftoggle{eb at titletoc@hang at fix}{\protect\numberline}{}
-        {\eb at labelname@lol}\lst@@caption
+        \ifbool{eb at titletoc@hang at fix}{\protect\numberline}{}
+          {\eb at labelname@lol}\lst@@caption
       }
   }
 
-\__eb_appto_cmd:Nn \@chapter
+\eb_appto_cmd:Nn \@chapter
   {
     \skip_if_eq:nnF {\l__eb_toc_lolskip_skip}{\c_zero_skip}
       {
@@ -1585,7 +1571,7 @@
     \bool_if:NF \l__eb_class_book_bool
       {\msg_error:nn {easybook}{no-chapter}}
   }
-\__eb_appto_cmd:Nn \@schapter
+\eb_appto_cmd:Nn \@schapter
   {
     \bool_if:NF \l__eb_class_book_bool
       {\msg_error:nn {easybook}{no-chapter}}
@@ -1596,23 +1582,23 @@
     The~\string\chapter\space~command~will~not~be~used.
   }
 
-\cs_new_protected:Npn \__eb_uppercase_bool:n #1
+\cs_new:Npn \eb_upper_nonumber_mark_bool:n #1
   {
     \bool_if:NTF \l__eb_uppercase_bool
       {\text_uppercase:n {#1}}
       {\text_titlecase_first:n {#1}}
   }
-\cs_new_protected:Npn \eb at nonumber@markdouble#1
+\cs_new:Npn \eb at nonumber@markdouble#1
   {
     \markboth
-      {\__eb_uppercase_bool:n {#1}}
+      {\eb_upper_nonumber_mark_bool:n {#1}}
       {
         \bool_if:NT \l__eb_page_twoside_bool
-          {\__eb_uppercase_bool:n {#1}}
+          {\eb_upper_nonumber_mark_bool:n {#1}}
       }
   }
-\cs_new_protected:Npn \eb at nonumber@markright#1
-  {\markright{\__eb_uppercase_bool:n {#1}}}
+\cs_new:Npn \eb at nonumber@markright#1
+  {\markright{\eb_upper_nonumber_mark_bool:n {#1}}}
 
 \tl_set:Nn \l__eb_toc_type_tl{book}
 \keys_define:nn {listoc}
@@ -1625,7 +1611,7 @@
     title   .tl_set:N = \eb at toc@title
   }
 
-\cs_new_protected:Npn \__eb_title_mark_intoc:n #1
+\cs_new_protected:Npn \eb_title_mark_intoc:n #1
   {
     \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
       {
@@ -1640,7 +1626,7 @@
           {\eb at nonumber@markdouble{#1}}
       }
   }
-\cs_new_protected:Npn \__eb_title_mark_notoc:n #1
+\cs_new_protected:Npn \eb_title_mark_notoc:n #1
   {
     \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
       {
@@ -1653,8 +1639,21 @@
           {\eb at nonumber@markdouble{#1}}
       }
   }
-\cs_new_protected:Npn \__eb_class_title_bool:n #1
+\cs_new_protected:Npn \eb_title_intoc_bool:nn #1#2
   {
+    \IfBooleanTF{#1}
+      {
+        \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
+          {\chapter{\eb at toc@title}}
+          {\section{\eb at toc@title}}
+      }{
+        \IfBooleanTF{#2}
+          {\eb_title_mark_notoc:n {\eb at toc@title}}
+          {\eb_title_mark_intoc:n {\eb at toc@title}}
+      }
+  }
+\cs_new_protected:Npn \eb_class_title_bool:n #1
+  {
     \bool_if:NTF \l__eb_class_book_bool
       {
         \chapter*{\phantomsection#1}
@@ -1665,85 +1664,74 @@
       }
     \eb at nonumber@markdouble{#1}
   }
-\cs_new_protected:Npn \__eb_multoc_pre_bool:
+\cs_new_protected:Npn \eb_multoc_pre_bool:
   {
     \bool_if:NTF \l__eb_class_book_bool
       {
-        \if at twocolumn
-          \@restonecoltrue
-          \bool_if:NTF \l__eb_multoc_bool{\twocolumn}{\onecolumn}
-        \else
-          \@restonecolfalse
-          \bool_if:NT \l__eb_multoc_bool{\twocolumn}
-        \fi
+        \ifbool{@twocolumn}
+          {
+            \booltrue{@restonecol}
+            \bool_if:NTF \l__eb_multoc_bool{\twocolumn}{\onecolumn}
+          }{
+            \boolfalse{@restonecol}
+            \bool_if:NT \l__eb_multoc_bool{\twocolumn}
+          }
       }{\tl_set:Nn \l__eb_toc_type_tl{article}}
   }
-\cs_new_protected:Npn \__eb_multoc_post_bool:
+\cs_new_protected:Npn \eb_multoc_post_bool:
   {
-    \bool_if:NTF \l__eb_class_book_bool
-      {
-        \if at restonecol
-          \twocolumn
-        \else
-          \onecolumn
-        \fi
-      }{\tl_set:Nn \l__eb_toc_type_tl{article}}
+    \bool_if:NT \l__eb_class_book_bool
+      {\ifbool{@restonecol}{\twocolumn}{\onecolumn}}
   }
-\cs_new_protected:Npn \__eb_title_intoc_bool:n #1
-  {
-    \IfBooleanTF{#1}
-      {\__eb_title_mark_notoc:n {\eb at toc@title}}
-      {\__eb_title_mark_intoc:n {\eb at toc@title}}
-  }
 \RenewDocumentCommand{\tableofcontents}{o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\contentsname
     \IfValueT{#1}{\keys_set:nn {listoc}{#1}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_mark_notoc:n {\eb at toc@title}
+    \eb_multoc_pre_bool:
+    \eb_title_mark_notoc:n {\eb at toc@title}
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{toc}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
-\RenewDocumentCommand{\listoffigures}{so}
+\RenewDocumentCommand{\listoffigures}{st+o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\listfigurename
-    \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_intoc_bool:n {#1}
+    \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+    \eb_multoc_pre_bool:
+    \eb_title_intoc_bool:nn {#2}{#1}
     \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{lof}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
-\RenewDocumentCommand{\listoftables}{so}
+\RenewDocumentCommand{\listoftables}{st+o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\listtablename
-    \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_intoc_bool:n {#1}
+    \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+    \eb_multoc_pre_bool:
+    \eb_title_intoc_bool:nn {#2}{#1}
     \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{lot}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
-\NewDocumentCommand{\listoflistings}{so}
+\NewDocumentCommand{\listoflistings}{st+o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\lstlistlistingname
-    \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_intoc_bool:n {#1}
+    \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+    \eb_multoc_pre_bool:
+    \eb_title_intoc_bool:nn {#2}{#1}
     \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{lol}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
 
@@ -1751,6 +1739,7 @@
   {
     \makeindex[
       intoc,
+      title = \eb at toc@title,
       options = -M~texindy~-C~utf8,
       program = truexindy,
       columns = 2,
@@ -1765,6 +1754,14 @@
     \ctex_patch_cmd:Nnn \imki at indexheaders
       {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
       {\eb at nonumber@markdouble{\indexname}}
+    \RenewDocumentCommand{\printindex}
+      {D(){\imki at jobname}O{\imki at indexname}}
+      {
+        \group_begin:
+        \tl_set:Nn \eb at toc@title{#2}
+        \imki at putindex{#1}
+        \group_end:
+      }
   }
 
 \tl_new:N \l__eb_font_table_tl
@@ -1772,7 +1769,7 @@
 \tl_new:N \l__eb_font_listing_tl
 \tl_new:N \l__eb_font_footnote_tl
 
-\__ctex_define:nn {elsefont}
+\eb_ctex_define:nn {elsefont}
   {
     table-cap   .tl_set:N = \l__eb_font_table_tl,
     table-cap   .initial:n = \sffamily\small,
@@ -1816,8 +1813,8 @@
     \captionsetup[figure][bi-second]{name = Figure}
     \captionsetup[table][bi-second]{name = Table}
   }
-\cs_new:Npn \__eb_arabic:n #1{\int_to_arabic:v {c@#1}}
-\cs_new_protected:Npn \__eb_separator_set:n #1
+\cs_new:Npn \eb_arabic:n #1{\int_to_arabic:v {c@#1}}
+\cs_new_protected:Npn \eb_separator_set:n #1
   {
     \cs_set:cpn {the#1}
       {
@@ -1826,17 +1823,17 @@
             \thechapter
             \use:c {l__eb_#1_separator_tl}
           }
-        \__eb_arabic:n {#1}
+        \eb_arabic:n {#1}
       }
   }
 \cs_gset:cpn {thesection}
   {
     \int_compare:nT {\c at chapter > 0}{\thechapter.}
-    \__eb_arabic:n {section}
+    \eb_arabic:n {section}
   }
 \clist_map_inline:nn
   {figure,table,lstlisting,equation}
-  {\__eb_separator_set:n {#1}}
+  {\eb_separator_set:n {#1}}
 \cs_gset_protected:Npn \appendix
   {
     \int_compare:nNnTF {\c at chapter} > {0}
@@ -1881,7 +1878,7 @@
 \fp_new:N \l__eb_spread_caption_fp
 \fp_new:N \l__eb_spread_footnote_fp
 
-\__ctex_define:nn {spread}
+\eb_ctex_define:nn {spread}
   {
     line        .fp_set:N = \l__eb_spread_line_fp,
     line        .initial:n = 1.3,
@@ -1920,7 +1917,7 @@
 \graphicspath{{figures/}}
 \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
 
-\cs_new_protected:Npn \__eb_enumitem_labelval_set:nn #1#2
+\cs_new_protected:Npn \eb_enumitem_labelval_set:nn #1#2
   {\SetEnumitemValue{label}{#1}{\color{ctex at emph}#2}}
 \clist_map_inline:nn
   {
@@ -1931,7 +1928,7 @@
     {alph}{(\alph*)},
     {roman}{\roman*.},
     {outline}{\upshape\ding{111}}
-  }{\__eb_enumitem_labelval_set:nn #1}
+  }{\eb_enumitem_labelval_set:nn #1}
 \SetEnumitemValue{font}{sf}{\color{ctex at emph}\normalfont\sffamily}
 \setlist
   {
@@ -1950,7 +1947,7 @@
 \setlist*[enumerate,3]{labelwidth = *}
 \setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
 
-\cs_new_protected:Npn \__eb_thmname_set:nnn #1#2#3
+\cs_new_protected:Npn \eb_thmname_set:nnn #1#2#3
   {
     \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
       {\tl_const:cn {c__eb_name_#1_tl}{#3}}
@@ -1961,7 +1958,7 @@
   {
     \ctex_at_end_preamble:n
       {
-        \__eb_thmname_set:nnn {#1}{#2}{#3}
+        \eb_thmname_set:nnn {#1}{#2}{#3}
         \exp_args:No \declaretheorem at i
           {
             name = \use:c {c__eb_name_#1_tl},
@@ -1987,7 +1984,7 @@
 
 \RenewDocumentCommand{\newtheorem}{O{}m}
   {\AfterPreamble{\declaretheorem[#1]{#2}}}
-\__ctex_define:nn {thmset}
+\eb_ctex_define:nn {thmset}
   {
     thmbox      .bool_set:N = \l__eb_thmbox_bool,
     thmbox      .default:n = true,
@@ -2027,11 +2024,11 @@
       headformat = \NAME\space\NUMBER\NOTE
     ]
   }
-\__eb_at_end_preamble:n
+\eb_at_end_preamble:n
   {
     \exp_last_unbraced:No
     \declaretheoremstyle\c__eb_thmtools_keyval_tl{easy-theorem}
-    \__eb_thmname_set:nnn {exercise}{Exercise}{练习}
+    \eb_thmname_set:nnn {exercise}{Exercise}{练习}
     \cs_undefine:N \proof
     \clist_map_inline:nn
       {
@@ -2094,16 +2091,16 @@
     cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
     aligned,alignedat,gathered,multlined,lgathered,rgathered
   }{\l__eb_math_restore:n {#1}}
-\__eb_patch_cmd:Nnn \start at gather
+\eb_patch_cmd:Nnn \start at gather
   {\collect at body}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect at body}
-\__eb_patch_cmd:Nnn \start at align
+\eb_patch_cmd:Nnn \start at align
   {\collect at body}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect at body}
-\__eb_patch_cmd:Nnn \start at multline
+\eb_patch_cmd:Nnn \start at multline
   {\collect at body}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect at body}
-\__eb_patch_cmd:Nnn \gather at split
+\eb_patch_cmd:Nnn \gather at split
   {\spread at equation}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\spread at equation}
 \ctex_after_end_preamble:n
@@ -2120,7 +2117,7 @@
 
 \ctex_at_end_package:nn {tcolorbox}
   {
-    \__eb_package_later_bool:nn {tcolorbox}{2020/10/09}
+    \eb_package_later_bool:nn {tcolorbox}{2020/10/09}
     \tcbset
       {
         tc-theorem/.style =
@@ -2251,7 +2248,7 @@
 \tl_new:N \l__eb_bib_citestyle_tl
 \tl_new:N \l__eb_bib_file_tl
 
-\__ctex_define:nn {bibset}
+\eb_ctex_define:nn {bibset}
   {
     backend               .choice:,
     backend/bibtex        .code:n = {},
@@ -2300,19 +2297,19 @@
     \tl_if_empty:NF \l__eb_bib_citestyle_tl
       {\exp_args:NV \setcitestyle\l__eb_bib_citestyle_tl}
     \skip_set:Nn \bibsep{0ex}
-    \NewDocumentCommand{\printbibliography}{so}
+    \NewDocumentCommand{\printbibliography}{st+o}
       {
         \group_begin:
         \tl_set_eq:NN \eb at toc@title\bibname
-        \IfValueT{##2}{\keys_set:nn {listoc}{##2}}
-        \__eb_multoc_pre_bool:
-        \cs_set:Npn \bibsection{\__eb_title_intoc_bool:n {##1}}
+        \IfValueT{##3}{\keys_set:nn {listoc}{##3}}
+        \eb_multoc_pre_bool:
+        \cs_set:Npn \bibsection{\eb_title_intoc_bool:nn {##2}{##1}}
         \exp_args:NV \bibliography\l__eb_bib_file_tl
-        \__eb_multoc_post_bool:
+        \eb_multoc_post_bool:
         \group_end:
       }
   }
-\cs_new_protected:Npn \__eb_put_biblatex:n #1
+\cs_new_protected:Npn \eb_put_biblatex:n #1
   {\PassOptionsToPackage{#1}{biblatex}}
 \cs_new_protected:Npn \EbBiblatexPreset
   {
@@ -2319,23 +2316,22 @@
     \tl_if_empty:NTF \l__eb_bib_otherstyle_tl
       {
         \tl_if_eq:NnT \l__eb_bib_style_tl{numerical}
-          {\__eb_put_biblatex:n {style = gb7714-2015}}
+          {\eb_put_biblatex:n {style = gb7714-2015}}
         \tl_if_eq:NnT \l__eb_bib_style_tl{authoryear}
-          {\__eb_put_biblatex:n {style = gb7714-2015ay}}
-      }{\__eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}}
+          {\eb_put_biblatex:n {style = gb7714-2015ay}}
+      }{\eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}}
     \tl_if_empty:NF \l__eb_bib_citestyle_tl
-      {\__eb_put_biblatex:n {citestyle = \l__eb_bib_citestyle_tl}}
-    \__eb_put_biblatex:n {backend = biber}
+      {\eb_put_biblatex:n {citestyle = \l__eb_bib_citestyle_tl}}
+    \eb_put_biblatex:n {backend = biber}
   }
 \cs_new_protected:Npn \EbBiblatexPostset
   {
     \exp_args:NV \addbibresource\l__eb_bib_file_tl
     \cs_gset:Npn \blx at default@theheading{bibintoc}
-    \cs_gset:Npn \blx at warning@noline##1{}
-    \defbibheading{bibintoc}[\bibname]{\__eb_class_title_bool:n {##1}}
+    \defbibheading{bibintoc}[\bibname]{\eb_class_title_bool:n {##1}}
     \skip_set:Nn \bibitemsep{0ex}
   }
-\__eb_at_end_preamble:n
+\eb_at_end_preamble:n
   {
     \bool_if:NT \l__eb_bib_loadpkg_bool
       {
@@ -2351,7 +2347,7 @@
       }
   }
 
-\__eb_at_end_preamble:n
+\eb_at_end_preamble:n
   {
     \group_begin:
     \footnotesize
@@ -2372,7 +2368,7 @@
         \counterwithin*{footnote}{page}
       }
   }
-\__eb_patch_cmd:Nnn \@footnotetext
+\eb_patch_cmd:Nnn \@footnotetext
   {\reset at font}
   {
     \linespread{\fp_use:N \l__eb_spread_footnote_fp}
@@ -2379,7 +2375,7 @@
     \selectfont\ignorespaces
     \l__eb_font_footnote_tl
   }
-\__eb_patch_cmd:Nnn \@mpfootnotetext
+\eb_patch_cmd:Nnn \@mpfootnotetext
   {\reset at font}
   {
     \linespread{\fp_use:N \l__eb_spread_footnote_fp}
@@ -2386,7 +2382,7 @@
     \selectfont\ignorespaces
     \l__eb_font_footnote_tl
   }
-\__eb_patch_cmd:Nnn \@makefnmark
+\eb_patch_cmd:Nnn \@makefnmark
   {\normalfont}{\l__eb_font_footnote_tl}
 \cs_gset:Npn \thempfootnote{\int_to_alph:n {\c at mpfootnote}}
 
@@ -2451,25 +2447,25 @@
 \lstloadlanguages{C,C++,Java,Python,Matlab}
 
 \clist_new:N \l__eb_hyperref_clist
-\cs_new_protected:Npn \__eb_put_hyperref:n #1
+\cs_new_protected:Npn \eb_put_hyperref:n #1
   {\clist_put_right:Nn \l__eb_hyperref_clist{#1}}
-\cs_new_protected:Npn \__eb_define_linkcolor:nnn #1#2#3
+\cs_new_protected:Npn \eb_define_linkcolor:nnn #1#2#3
   {\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
-\cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
+\cs_new_protected:Npn \eb_define_themecolor:nnn #1#2#3
   {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
-\cs_new_protected:Npn \__eb_define_linkcolor:n #1
+\cs_new_protected:Npn \eb_define_linkcolor:n #1
   {\definecolorset{HTML}{ctex@}{}{link,#1;url,#1;cite,#1}}
-\cs_new_protected:Npn \__eb_define_themecolor:n #1
+\cs_new_protected:Npn \eb_define_themecolor:n #1
   {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1}}
-\cs_new:Npn \__eb_linkcolor_set:n #1
+\cs_new:Npn \eb_linkcolor_set:n #1
   {
     linkcolor/\clist_item:nn {#1}{1} .code:n =
       {
-        \__eb_define_linkcolor:nnn
+        \eb_define_linkcolor:nnn
           {\clist_item:nn {#1}{2}}
           {\clist_item:nn {#1}{3}}
           {\clist_item:nn {#1}{4}}
-        \__eb_put_hyperref:n
+        \eb_put_hyperref:n
           {
             linkcolor = ctex at link,linkbordercolor = ctex at link,
             urlcolor = ctex at url,urlbordercolor = ctex at url,
@@ -2477,11 +2473,11 @@
           }
       },
   }
-\cs_new:Npn \__eb_themecolor_set:n #1
+\cs_new:Npn \eb_themecolor_set:n #1
   {
     color/\clist_item:nn {#1}{1} .code:n =
       {
-        \__eb_define_themecolor:nnn
+        \eb_define_themecolor:nnn
           {\clist_item:nn {#1}{2}}
           {\clist_item:nn {#1}{3}}
           {\clist_item:nn {#1}{4}}
@@ -2488,16 +2484,16 @@
       },
   }
 
-\bool_set_false:N \l__eb_toc_color_bool
-\__ctex_define:nn {link}
+\bool_set_false:N \l__eb_toc_number_color_bool
+\eb_ctex_define:nn {link}
   {
     hyperlink         .choice:,
     hyperlink/edge    .code:n = {},
-    hyperlink/none    .code:n = \__eb_put_hyperref:n {hidelinks},
+    hyperlink/none    .code:n = \eb_put_hyperref:n {hidelinks},
     hyperlink/various .code:n =
       {
-        \bool_set_true:N \l__eb_toc_color_bool
-        \__eb_put_hyperref:n {colorlinks}
+        \bool_set_true:N \l__eb_toc_number_color_bool
+        \eb_put_hyperref:n {colorlinks}
       },
     hyperlink         .default:n = edge,
     hyperlink         .initial:n = edge,
@@ -2505,11 +2501,11 @@
     linktoc           .choice:,
     linktoc/unknown   .code:n =
       {
-        \__eb_put_hyperref:n {linktoc = #1}
+        \eb_put_hyperref:n {linktoc = #1}
         \clist_map_inline:nn {page,none}
           {
             \tl_if_eq:NnT \l_keys_value_tl{##1}
-              {\clist_map_break:n {\colorlet{ctex at toc}{black}}}
+              {\clist_map_break:n {\colorlet{ctex at toc@number}{black}}}
           }
       },
     linktoc           .default:n = all,
@@ -2516,7 +2512,7 @@
     linktoc           .initial:n = all,
     unknown           .code:n =
       {
-        \__eb_put_hyperref:x
+        \eb_put_hyperref:x
           {
             \l_keys_key_str
             \tl_if_empty:NF \l_keys_value_tl{ = {#1}}
@@ -2523,7 +2519,7 @@
           }
       }
   }
-\__ctex_define:nx {link}
+\eb_ctex_define:nx {link}
   {
     linkcolor         .choice:,
     \clist_map_function:nN
@@ -2533,14 +2529,14 @@
         {navyblue,  000080,004986,eb6877},
         {crimson,   dc143c,00c1c9,afcd20}
       }
-      \__eb_linkcolor_set:n
+      \eb_linkcolor_set:n
     linkcolor         .default:n = navyblue,
     linkcolor         .initial:n = navyblue,
     linkcol-all       .code:n =
-      {\__eb_define_linkcolor:n {\exp_not:n {#1}}}
+      {\eb_define_linkcolor:n {\exp_not:n {#1}}}
   }
-\colorlet{ctex at toc}{ctex at link}
-\__ctex_define:nx {style}
+\colorlet{ctex at toc@number}{ctex at link}
+\eb_ctex_define:nx {style}
   {
     color     .choice:,
     color     .value_required:n = true,
@@ -2551,18 +2547,18 @@
         {energy,    f39800,00a0e9,893895},
         {cyberpunk, 601986,eb6877,a4005b}
       }
-      \__eb_themecolor_set:n
+      \eb_themecolor_set:n
     color     .initial:n = none,
     color-all .code:n =
-      {\__eb_define_themecolor:n {\exp_not:n {#1}}}
+      {\eb_define_themecolor:n {\exp_not:n {#1}}}
   }
 
-\cs_new:Npn \__eb_allow_urlbreak:
+\cs_new:Npn \eb_allow_urlbreak:
   {
-    \cs_new:Npn \__eb_add_urlbreak_points:
+    \cs_new:Npn \eb_add_urlbreak_points:
       {\tl_map_function:NN \c__eb_urlbreak_points_tl\do}
-    \__eb_appto_cmd:Nn
-      \UrlBreaks{\UrlOrds\__eb_add_urlbreak_points:}
+    \eb_appto_cmd:Nn
+      \UrlBreaks{\UrlOrds\eb_add_urlbreak_points:}
   }
 \tl_const:Nn \c__eb_urlbreak_points_tl
   {
@@ -2574,7 +2570,7 @@
   {
     \RequirePackage{hyperref}
     \urlstyle{same}
-    \__eb_allow_urlbreak:
+    \eb_allow_urlbreak:
     \ctex_hypersetup:n {pdfstartview = FitH}
     \exp_args:NV \hypersetup\l__eb_hyperref_clist
     \labelformat{part}{\CTEXthepart}
@@ -2618,30 +2614,29 @@
 \ctex_set:n
   {
     secnumdepth = 3,
-    tocdepth = 1,
+    tocdepth = \bool_if:NTF \l__eb_class_book_bool{1}{2},
     part =
       {
         pagestyle = empty,
-        number =
-          {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{part}}{\thepart}},
         format = \color{ctex at frame}\sffamily\Huge,
         aftername =
-          {\bool_if:NTF \l__eb_newline_bool{\par\nobreak}{\hspace{\ccwd}}},
+          {
+            \bool_if:NTF \l__eb_title_newline_bool
+              {\par\nobreak}{\hspace{\ccwd}}
+          },
         tocline = \CTEXifname{\CTEXthepart\hspace{\eb at toc@part at numsep}}{}#2
       },
     chapter =
       {
         % pagestyle = fancy,
-        number =
-          {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{chapter}}{\thechapter}},
         format =
           {
             \color{ctex at frame}\sffamily\LARGE
-            \bool_if:NF \l__eb_newline_bool{\centering}
+            \bool_if:NF \l__eb_title_newline_bool{\centering}
           },
         aftername =
           {
-            \bool_if:NTF \l__eb_newline_bool
+            \bool_if:NTF \l__eb_title_newline_bool
               {\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}
           },
         beforeskip = -1.5ex,
@@ -2675,7 +2670,7 @@
       }
   }
 
-\bool_if:NF \l__eb_newline_bool
+\bool_if:NF \l__eb_title_newline_bool
   {
     \ctex_set:n
       {

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-04-29 20:46:26 UTC (rev 59021)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-04-29 20:46:41 UTC (rev 59022)
@@ -13,27 +13,27 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/04/27}{1.24u}{beta}
+\ProvidesExplClass{easybook}{2021/04/29}{1.24w}{beta}
 
-\cs_generate_variant:Nn \__ctex_define:nn {nx}
+\cs_generate_variant:Nn \eb_ctex_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
 \cs_generate_variant:Nn \dim_add:Nn {NV}
-\cs_generate_variant:Nn \__eb_put_hyperref:n {x}
-\cs_new_protected:Npn \__ctex_define:nn #1
+\cs_generate_variant:Nn \eb_put_hyperref:n {x}
+\cs_new_protected:Npn \eb_ctex_define:nn #1
   {\keys_define:nn {ctex/#1}}
-\cs_new_protected:Npn \__eb_put_ctexbook:n #1
+\cs_new_protected:Npn \eb_put_ctexbook:n #1
   {\PassOptionsToClass{#1}{ctexbook}}
-\cs_new_protected:Npn \__eb_patch_cmd:Nnn #1#2#3
+\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
   {\ctex_patch_cmd_once:NnnnTF #1{}{#2}{#3}{}{\ctex_patch_failure:N #1}}
-\cs_new_protected:Npn \__eb_appto_cmd:Nn #1#2
+\cs_new_protected:Npn \eb_appto_cmd:Nn #1#2
   {\ctex_appto_cmd:NnnTF #1{}{#2}{}{\ctex_patch_failure:N #1}}
-\cs_new_protected:Npn \__eb_at_end_preamble:n
+\cs_new_protected:Npn \eb_at_end_preamble:n
   {\ctex_gadd_ltxhook:nn {env/document/before}}
+\cs_gset_eq:NN \PackageWarning\use_none:nn
 
-\bool_set_false:N \l__eb_draft_bool
-\bool_set_false:N \l__eb_newline_bool
+\bool_set_false:N \l__eb_compile_draft_bool
+\bool_set_false:N \l__eb_title_newline_bool
 \bool_set_false:N \l__eb_font_noto_bool
-\bool_set_true:N  \l__eb_zhtitle_bool
 \bool_set_true:N  \l__eb_page_twoside_bool
 \bool_set_true:N  \l__eb_class_book_bool
 \tl_new:N         \g__eb_config_tl
@@ -41,22 +41,21 @@
 
 \keys_define:nn {easybook}
   {
-    draft         .code:n = \bool_set_true:N  \l__eb_draft_bool,
-    newline       .code:n = \bool_set_true:N  \l__eb_newline_bool,
-    entitle       .code:n = \bool_set_false:N \l__eb_zhtitle_bool,
-    scheme        .code:n = \__eb_put_ctexbook:n {scheme = #1},
-    enstyle       .meta:n = {newline,entitle,scheme = plain},
+    draft         .code:n = \bool_set_true:N \l__eb_compile_draft_bool,
+    newline       .code:n = \bool_set_true:N \l__eb_title_newline_bool,
+    scheme        .code:n = \eb_put_ctexbook:n {scheme = #1},
+    enmode        .meta:n = {newline,scheme = plain},
 
     font          .choices:nn =
       {adobe,founder,mac,windows,none}
-      {\__eb_put_ctexbook:n {fontset = \l_keys_choice_tl}},
+      {\eb_put_ctexbook:n {fontset = \l_keys_choice_tl}},
     font/noto     .code:n =
       {
         \bool_set_true:N \l__eb_font_noto_bool
-        \__eb_put_ctexbook:n {fontset = none}
+        \eb_put_ctexbook:n {fontset = none}
       },
     font/overleaf .code:n = {},
-    font/linux    .code:n = \__eb_put_ctexbook:n {fontset = ubuntu},
+    font/linux    .code:n = \eb_put_ctexbook:n {fontset = ubuntu},
     font          .value_required:n = true,
     font          .initial:n = overleaf,
 
@@ -70,12 +69,12 @@
     oneside       .code:n =
       {
         \bool_set_false:N \l__eb_page_twoside_bool
-        \__eb_put_ctexbook:n {oneside}
+        \eb_put_ctexbook:n {oneside}
       },
     twoside       .code:n =
       {
         \bool_set_true:N \l__eb_page_twoside_bool
-        \__eb_put_ctexbook:n {twoside}
+        \eb_put_ctexbook:n {twoside}
       },
 
     class         .choice:,
@@ -109,7 +108,7 @@
     {no-math}{fontspec},
     {noto,upint}{newtxmath}
   }{\PassOptionsToPackage#1}
-\__eb_put_ctexbook:n {\g__eb_options_clist}
+\eb_put_ctexbook:n {\g__eb_options_clist}
 \LoadClass[UTF8]{ctexbook}
 
 \bool_new:N \l__eb_multoc_bool
@@ -134,7 +133,7 @@
     lstlistlistingname  .tl_set:N = \lstlistlistingname,
     lstlistingname      .tl_set:N = \lstlistingname
   }
-\__ctex_define:nn {style}
+\eb_ctex_define:nn {style}
   {
     multoc        .bool_set:N = \l__eb_multoc_bool,
     multoc        .default:n = true,
@@ -193,7 +192,7 @@
       {\file_input:n {\g__eb_config_tl}}
   }
 
-\cs_new_protected:Npn \__eb_package_later_bool:nn #1#2
+\cs_new_protected:Npn \eb_package_later_bool:nn #1#2
   {
     \@ifpackagelater{#1}{#2}
       {}{\msg_warning:nnn {easybook}{package-old}{#1}}
@@ -213,58 +212,58 @@
     {ctex}{2020/10/19},
     {thmtools}{2020/08/01},
     {caption-light}{2020/08/24}
-  }{\__eb_package_later_bool:nn #1}
+  }{\eb_package_later_bool:nn #1}
 
 \sys_if_engine_xetex:TF
   {
-    \cs_new_eq:NN \__eb_set_family:nnn  \xeCJK_set_family:nnn
-    \cs_new_eq:NN \__eb_switch_family:n \xeCJK_switch_family:n
+    \cs_new_eq:NN \eb_set_family:nnn  \xeCJK_set_family:nnn
+    \cs_new_eq:NN \eb_switch_family:n \xeCJK_switch_family:n
   }{
-    \cs_new_eq:NN \__eb_set_family:nnn  \ctex_ltj_set_family:nnn
-    \cs_new_eq:NN \__eb_switch_family:n \ctex_ltj_switch_family:n
+    \cs_new_eq:NN \eb_set_family:nnn  \ctex_ltj_set_family:nnn
+    \cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n
   }
 
-\cs_new_protected:Npn \__eb_setmainfont:nn #1#2
+\cs_new_protected:Npn \eb_setmainfont:nn #1#2
   {\__fontspec_main_setmainfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__eb_setsansfont:nn #1#2
+\cs_new_protected:Npn \eb_setsansfont:nn #1#2
   {\__fontspec_main_setsansfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__eb_setmonofont:nn #1#2
+\cs_new_protected:Npn \eb_setmonofont:nn #1#2
   {\__fontspec_main_setmonofont:nn {#2}{#1}}
-\cs_new_protected:Npn \__eb_setCJKmainfont:nn #1#2
-  {\__eb_set_family:nnn {\CJKrmdefault}{#2}{#1}}
-\cs_new_protected:Npn \__eb_setCJKsansfont:nn #1#2
-  {\__eb_set_family:nnn {\CJKsfdefault}{#2}{#1}}
-\cs_new_protected:Npn \__eb_setCJKmonofont:nn #1#2
-  {\__eb_set_family:nnn {\CJKttdefault}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_songti:nn #1#2
-  {\__eb_set_family:nnn {songti}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_heiti:nn #1#2
-  {\__eb_set_family:nnn {heiti}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_kaishu:nn #1#2
-  {\__eb_set_family:nnn {kaishu}{#2}{#1}}
-\cs_new_protected:Npn \__eb_set_zhfont_fangsong:nn #1#2
-  {\__eb_set_family:nnn {fangsong}{#2}{#1}}
+\cs_new_protected:Npn \eb_setCJKmainfont:nn #1#2
+  {\eb_set_family:nnn {\CJKrmdefault}{#2}{#1}}
+\cs_new_protected:Npn \eb_setCJKsansfont:nn #1#2
+  {\eb_set_family:nnn {\CJKsfdefault}{#2}{#1}}
+\cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2
+  {\eb_set_family:nnn {\CJKttdefault}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_songti:nn #1#2
+  {\eb_set_family:nnn {songti}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_heiti:nn #1#2
+  {\eb_set_family:nnn {heiti}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_kaishu:nn #1#2
+  {\eb_set_family:nnn {kaishu}{#2}{#1}}
+\cs_new_protected:Npn \eb_set_zhfont_fangsong:nn #1#2
+  {\eb_set_family:nnn {fangsong}{#2}{#1}}
 
-\tl_const:Nn \__eb_option_zhfont_tl
+\tl_const:Nn \eb_option_zhfont_tl
   {UprightFont = *,AutoFakeBold = 1.5,ItalicFont = *}
-\cs_new_protected:Npx \__eb_setCJKmainfont:n #1
-  {\__eb_setCJKmainfont:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_setCJKsansfont:n #1
-  {\__eb_setCJKsansfont:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_setCJKmonofont:n #1
-  {\__eb_setCJKmonofont:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_songti:n #1
-  {\__eb_set_zhfont_songti:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_heiti:n #1
-  {\__eb_set_zhfont_heiti:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_kaishu:n #1
-  {\__eb_set_zhfont_kaishu:nn {#1}{\__eb_option_zhfont_tl}}
-\cs_new_protected:Npx \__eb_set_zhfont_fangsong:n #1
-  {\__eb_set_zhfont_fangsong:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_setCJKmainfont:n #1
+  {\eb_setCJKmainfont:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_setCJKsansfont:n #1
+  {\eb_setCJKsansfont:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_setCJKmonofont:n #1
+  {\eb_setCJKmonofont:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_songti:n #1
+  {\eb_set_zhfont_songti:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_heiti:n #1
+  {\eb_set_zhfont_heiti:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_kaishu:n #1
+  {\eb_set_zhfont_kaishu:nn {#1}{\eb_option_zhfont_tl}}
+\cs_new_protected:Npx \eb_set_zhfont_fangsong:n #1
+  {\eb_set_zhfont_fangsong:nn {#1}{\eb_option_zhfont_tl}}
 
 \bool_if:NT \l__eb_font_noto_bool
   {
-    \__eb_setmainfont:nn {NotoSerif}
+    \eb_setmainfont:nn {NotoSerif}
       {
         Extension = .ttf,
         UprightFont = *-Regular,
@@ -271,7 +270,7 @@
         BoldFont = *-Bold,
         ItalicFont = *-Italic
       }
-    \__eb_setsansfont:nn {NotoSans}
+    \eb_setsansfont:nn {NotoSans}
       {
         Extension = .ttf,
         UprightFont = *-Regular,
@@ -278,31 +277,31 @@
         BoldFont = *-Bold,
         ItalicFont = *-Italic
       }
-    \__eb_setmonofont:nn {NotoSansMono}
+    \eb_setmonofont:nn {NotoSansMono}
       {
         Extension = .ttf,
         UprightFont = *-Regular,
         BoldFont = *-Bold
       }
-    \__eb_setCJKmainfont:nn {FZShuSong-Z01S}
+    \eb_setCJKmainfont:nn {FZShuSong-Z01S}
       {
         UprightFont = *,
         BoldFont = FZHei-B01S,
         ItalicFont = FZKai-Z03S
       }
-    \__eb_setCJKsansfont:n {FZHei-B01S}
-    \__eb_setCJKmonofont:n {FZFangSong-Z02S}
-    \__eb_set_zhfont_songti:n {FZShuSong-Z01S}
-    \__eb_set_zhfont_heiti:n {FZHei-B01S}
-    \__eb_set_zhfont_kaishu:n {FZKai-Z03S}
-    \__eb_set_zhfont_fangsong:n {FZFangSong-Z02S}
-    \cs_new_protected:Npn \songti{\__eb_switch_family:n {songti}}
-    \cs_new_protected:Npn \heiti{\__eb_switch_family:n {heiti}}
-    \cs_new_protected:Npn \kaishu{\__eb_switch_family:n {kaishu}}
-    \cs_new_protected:Npn \fangsong{\__eb_switch_family:n {fangsong}}
+    \eb_setCJKsansfont:n {FZHei-B01S}
+    \eb_setCJKmonofont:n {FZFangSong-Z02S}
+    \eb_set_zhfont_songti:n {FZShuSong-Z01S}
+    \eb_set_zhfont_heiti:n {FZHei-B01S}
+    \eb_set_zhfont_kaishu:n {FZKai-Z03S}
+    \eb_set_zhfont_fangsong:n {FZFangSong-Z02S}
+    \cs_new_protected:Npn \songti{\eb_switch_family:n {songti}}
+    \cs_new_protected:Npn \heiti{\eb_switch_family:n {heiti}}
+    \cs_new_protected:Npn \kaishu{\eb_switch_family:n {kaishu}}
+    \cs_new_protected:Npn \fangsong{\eb_switch_family:n {fangsong}}
   }
-\__eb_at_end_preamble:n
-  {\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\normalfont}}
+\eb_at_end_preamble:n
+  {\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\itshape}}
 
 \includepdfset{fitpaper = true}
 \geometry
@@ -318,7 +317,7 @@
     marginparwidth = 2.54cm
   }
 \clist_new:N \g__eb_geometry_clist
-\__ctex_define:nn {geoset}
+\eb_ctex_define:nn {geoset}
   {
     footnotemargin  .dim_set:N = \footnotemargin,
     footnotemargin  .initial:n = 0.5\ccwd,
@@ -348,18 +347,18 @@
 \RenewDocumentCommand{\frontmatter}{sO{Roman}}
   {
     \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
-    \@mainmatterfalse
+    \boolfalse{@mainmatter}
     \pagenumbering{#2}
   }
 \RenewDocumentCommand{\mainmatter}{s}
   {
     \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
-    \@mainmattertrue
+    \booltrue{@mainmatter}
     \pagenumbering{arabic}
   }
 \cs_gset_eq:NN \easyhead\fancyhead
 \cs_gset_eq:NN \easyfoot\fancyfoot
-\__ctex_define:nn {hdrset}
+\eb_ctex_define:nn {hdrset}
   {
     head-foot     .tl_set:N = \l__eb_fancyhf_content_tl,
     head-foot     .initial:n =
@@ -375,36 +374,34 @@
           }
       },
 
-    chap-mark     .cs_set:Np = \__eb_fancyhf_chap_mark:n #1,
+    chap-mark     .cs_set:Np = \eb_fancyhf_chapter_mark:n #1,
     chap-mark     .initial:n =
       {
         \int_compare:nT {\c at secnumdepth > -1}
           {
-            \if at mainmatter
-              \ifodd\CTEX at chapter@numbering
-                \CTEXthechapter\hspace{\ccwd}
-              \fi
-            \fi
+            \ifbool{@mainmatter}
+              {
+                \int_if_odd:nT {\CTEX at chapter@numbering}
+                  {\CTEXthechapter\hspace{\ccwd}}
+              }{}
           }#1
       },
-    sec-mark      .cs_set:Np = \__eb_fancyhf_sec_mark:n #1,
+    sec-mark      .cs_set:Np = \eb_fancyhf_section_mark:n #1,
     sec-mark      .initial:n =
       {
         \int_compare:nT {\c at secnumdepth > 0}
           {
-            \ifodd\CTEX at section@numbering
-              \CTEXthesection\hspace{0.5\ccwd}
-            \fi
+            \int_if_odd:nT {\CTEX at section@numbering}
+              {\CTEXthesection\hspace{0.5\ccwd}}
           }#1
       },
-    subsec-mark   .cs_set:Np = \__eb_fancyhf_subsec_mark:n #1,
+    subsec-mark   .cs_set:Np = \eb_fancyhf_subsection_mark:n #1,
     subsec-mark   .initial:n =
       {
         \int_compare:nT {\c at secnumdepth > 1}
           {
-            \ifodd\CTEX at subsection@numbering
-              \CTEXthesubsection\hspace{0.5\ccwd}
-            \fi
+            \int_if_odd:nT {\CTEX at subsection@numbering}
+              {\CTEXthesubsection\hspace{0.5\ccwd}}
           }#1
       },
 
@@ -428,21 +425,22 @@
         \group_end:
       }
   }
-\cs_new:Npn \__eb_upper_chaptermark_bool:n #1
+\cs_new:Npn \eb_upper_number_mark_bool:nn #1#2
   {
     \bool_if:NT \l__eb_uppercase_bool
-      {\text_uppercase:n}{\__eb_fancyhf_chap_mark:n {#1}}
+      {\text_uppercase:n}{\use:c {eb_fancyhf_#1_mark:n}{#2}}
   }
-\cs_new:Npn \__eb_upper_sectionmark_bool:n #1
+\cs_new:Npn \eb at number@markdouble#1#2
   {
-    \bool_if:NT \l__eb_uppercase_bool
-      {\text_uppercase:n}{\__eb_fancyhf_sec_mark:n {#1}}
+    \markboth
+      {\eb_upper_number_mark_bool:nn {#1}{#2}}
+      {
+        \bool_if:NT \l__eb_page_twoside_bool
+          {\eb_upper_number_mark_bool:nn {#1}{#2}}
+      }
   }
-\cs_new:Npn \__eb_upper_subsectionmark_bool:n #1
-  {
-    \bool_if:NT \l__eb_uppercase_bool
-      {\text_uppercase:n}{\__eb_fancyhf_subsec_mark:n {#1}}
-  }
+\cs_new:Npn \eb at number@markright#1#2
+  {\markright{\eb_upper_number_mark_bool:nn {#1}{#2}}}
 \ctex_at_end_preamble:n
   {
     \exp_args:NV \geometry\g__eb_geometry_clist
@@ -453,30 +451,16 @@
     \bool_if:NTF \l__eb_class_book_bool
       {
         \cs_gset:Npn \chaptermark#1
-          {
-            \markboth
-              {\__eb_upper_chaptermark_bool:n {#1}}
-              {
-                \bool_if:NT \l__eb_page_twoside_bool
-                  {\__eb_upper_chaptermark_bool:n {#1}}
-              }
-          }
+          {\eb at number@markdouble{chapter}{#1}}
         \cs_gset:Npn \sectionmark#1
-          {\markright{\__eb_upper_sectionmark_bool:n {#1}}}
+          {\eb at number@markright{section}{#1}}
       }{
         \cs_gset:Npn \sectionmark#1
-          {
-            \markboth
-              {\__eb_upper_sectionmark_bool:n {#1}}
-              {
-                \bool_if:NT \l__eb_page_twoside_bool
-                  {\__eb_upper_sectionmark_bool:n {#1}}
-              }
-          }
+          {\eb at number@markdouble{section}{#1}}
         \cs_gset:Npn \subsectionmark#1
-          {\markright{\__eb_upper_subsectionmark_bool:n {#1}}}
+          {\eb at number@markright{subsection}{#1}}
       }
-    \bool_if:NT \l__eb_draft_bool
+    \bool_if:NT \l__eb_compile_draft_bool
       {
         \bool_if:NTF \l__eb_page_twoside_bool
           {\easyfoot[C]{\color{SlateGray}\sffamily\today}}
@@ -490,7 +474,7 @@
 \seq_map_inline:Nn \c__eb_toc_headings_level_seq
   {
     \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
-    \__ctex_define:nn {tocset}
+    \eb_ctex_define:nn {tocset}
       {
         #1/format .tl_set:c = l__eb_toc_#1_format_tl,
         #1/indent .tl_set:c = l__eb_toc_#1_indent_tl,
@@ -507,8 +491,8 @@
         \hspace{\use:c {eb at toc@#1 at numsep}}
       }{}
   }
-\newtoggle{eb at titletoc@hang at fix}
-\__ctex_define:nn {tocset}
+\newbool{eb at titletoc@hang at fix}
+\eb_ctex_define:nn {tocset}
   {
     lists/lolskip     .skip_set:N = \l__eb_toc_lolskip_skip,
     lists/lolskip     .initial:n = 0.8pc,
@@ -522,22 +506,22 @@
     tocline-fig       .initial:n =
       {
         \figurename\space#1
-        \iftoggle{eb at titletoc@hang at fix}{}
-          {\hspace{\eb at toc@lists at numsep}}
+        \notbool{eb at titletoc@hang at fix}
+          {\hspace{\eb at toc@lists at numsep}}{}
       },
     tocline-tab       .cs_set:Np = \eb at labelname@lot#1,
     tocline-tab       .initial:n =
       {
         \tablename\space#1
-        \iftoggle{eb at titletoc@hang at fix}{}
-          {\hspace{\eb at toc@lists at numsep}}
+        \notbool{eb at titletoc@hang at fix}
+          {\hspace{\eb at toc@lists at numsep}}{}
       },
     tocline-lst       .tl_set:N = \eb at labelname@lol,
     tocline-lst       .initial:n =
       {
         \lstlistingname\space\thelstlisting
-        \iftoggle{eb at titletoc@hang at fix}{}
-          {\hspace{\eb at toc@lists at numsep}}
+        \notbool{eb at titletoc@hang at fix}
+          {\hspace{\eb at toc@lists at numsep}}{}
       },
     line-align        .bool_set:N = \l__eb_toc_line_align_bool,
     line-align        .default:n = true,
@@ -546,7 +530,7 @@
     hang              .choice:,
     hang/true         .code:n =
       {
-        \toggletrue{eb at titletoc@hang at fix}
+        \booltrue{eb at titletoc@hang at fix}
         \ctex_set:n
           {
             chapter/tocline = \CTEXnumberline{##1}##2,
@@ -602,7 +586,8 @@
     section/numsep = \ccwd,
 
     subsection/format = \addvspace{0.35pc},
-    subsection/indent = 3.8\ccwd,
+    subsection/indent =
+      {\bool_if:NTF \l__eb_class_book_bool{3.8\ccwd}{1.4\ccwd}},
     subsection/rule = \tocrule{$\cdot$},
     subsection/numsep = \ccwd,
 
@@ -623,17 +608,18 @@
           {\contentspage}{\thecontentspage}
       }
   }
-\cs_new_protected:Npn \__eb_titlecontents_set:nn #1#2
+\cs_new_protected:Npn \eb_titlecontents_set:nn #1#2
   {
     \titlecontents{#1}
       [\use:c {l__eb_toc_#2_indent_tl}]
       {\use:c {l__eb_toc_#2_format_tl}}
       {
-        \iftoggle{eb at titletoc@hang at fix}
+        \ifbool{eb at titletoc@hang at fix}
           {
             \contentspush
               {
-                \bool_if:NT \l__eb_toc_color_bool{\color{ctex at toc}}
+                \bool_if:NT \l__eb_toc_number_color_bool
+                  {\color{ctex at toc@number}}
                 \thecontentslabel
                 \hspace{\use:c {eb at toc@#2 at numsep}}
               }
@@ -651,7 +637,7 @@
     {figure}{lists},
     {table}{lists},
     {lstlisting}{lists}
-  }{\__eb_titlecontents_set:nn #1}
+  }{\eb_titlecontents_set:nn #1}
 
 \prop_new:N \l__eb_label_name_prop
 \prop_set_from_keyval:Nn \l__eb_label_name_prop
@@ -663,8 +649,8 @@
   {
     \addcontentsline{#1}{#2}
       {
-        \iftoggle{eb at titletoc@hang at fix}{\protect\numberline}{}
-        {\prop_item:Nn \l__eb_label_name_prop{#2}{#3}}{#4}
+        \ifbool{eb at titletoc@hang at fix}{\protect\numberline}{}
+          {\prop_item:Nn \l__eb_label_name_prop{#2}{#3}}{#4}
       }
   }
 \ctex_patch_cmd:Nnn \lst at MakeCaption
@@ -674,12 +660,12 @@
   }{
     \addcontentsline{lol}{lstlisting}
       {
-        \iftoggle{eb at titletoc@hang at fix}{\protect\numberline}{}
-        {\eb at labelname@lol}\lst@@caption
+        \ifbool{eb at titletoc@hang at fix}{\protect\numberline}{}
+          {\eb at labelname@lol}\lst@@caption
       }
   }
 
-\__eb_appto_cmd:Nn \@chapter
+\eb_appto_cmd:Nn \@chapter
   {
     \skip_if_eq:nnF {\l__eb_toc_lolskip_skip}{\c_zero_skip}
       {
@@ -689,7 +675,7 @@
     \bool_if:NF \l__eb_class_book_bool
       {\msg_error:nn {easybook}{no-chapter}}
   }
-\__eb_appto_cmd:Nn \@schapter
+\eb_appto_cmd:Nn \@schapter
   {
     \bool_if:NF \l__eb_class_book_bool
       {\msg_error:nn {easybook}{no-chapter}}
@@ -700,23 +686,23 @@
     The~\string\chapter\space~command~will~not~be~used.
   }
 
-\cs_new_protected:Npn \__eb_uppercase_bool:n #1
+\cs_new:Npn \eb_upper_nonumber_mark_bool:n #1
   {
     \bool_if:NTF \l__eb_uppercase_bool
       {\text_uppercase:n {#1}}
       {\text_titlecase_first:n {#1}}
   }
-\cs_new_protected:Npn \eb at nonumber@markdouble#1
+\cs_new:Npn \eb at nonumber@markdouble#1
   {
     \markboth
-      {\__eb_uppercase_bool:n {#1}}
+      {\eb_upper_nonumber_mark_bool:n {#1}}
       {
         \bool_if:NT \l__eb_page_twoside_bool
-          {\__eb_uppercase_bool:n {#1}}
+          {\eb_upper_nonumber_mark_bool:n {#1}}
       }
   }
-\cs_new_protected:Npn \eb at nonumber@markright#1
-  {\markright{\__eb_uppercase_bool:n {#1}}}
+\cs_new:Npn \eb at nonumber@markright#1
+  {\markright{\eb_upper_nonumber_mark_bool:n {#1}}}
 
 \tl_set:Nn \l__eb_toc_type_tl{book}
 \keys_define:nn {listoc}
@@ -729,7 +715,7 @@
     title   .tl_set:N = \eb at toc@title
   }
 
-\cs_new_protected:Npn \__eb_title_mark_intoc:n #1
+\cs_new_protected:Npn \eb_title_mark_intoc:n #1
   {
     \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
       {
@@ -744,7 +730,7 @@
           {\eb at nonumber@markdouble{#1}}
       }
   }
-\cs_new_protected:Npn \__eb_title_mark_notoc:n #1
+\cs_new_protected:Npn \eb_title_mark_notoc:n #1
   {
     \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
       {
@@ -757,8 +743,21 @@
           {\eb at nonumber@markdouble{#1}}
       }
   }
-\cs_new_protected:Npn \__eb_class_title_bool:n #1
+\cs_new_protected:Npn \eb_title_intoc_bool:nn #1#2
   {
+    \IfBooleanTF{#1}
+      {
+        \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
+          {\chapter{\eb at toc@title}}
+          {\section{\eb at toc@title}}
+      }{
+        \IfBooleanTF{#2}
+          {\eb_title_mark_notoc:n {\eb at toc@title}}
+          {\eb_title_mark_intoc:n {\eb at toc@title}}
+      }
+  }
+\cs_new_protected:Npn \eb_class_title_bool:n #1
+  {
     \bool_if:NTF \l__eb_class_book_bool
       {
         \chapter*{\phantomsection#1}
@@ -769,85 +768,74 @@
       }
     \eb at nonumber@markdouble{#1}
   }
-\cs_new_protected:Npn \__eb_multoc_pre_bool:
+\cs_new_protected:Npn \eb_multoc_pre_bool:
   {
     \bool_if:NTF \l__eb_class_book_bool
       {
-        \if at twocolumn
-          \@restonecoltrue
-          \bool_if:NTF \l__eb_multoc_bool{\twocolumn}{\onecolumn}
-        \else
-          \@restonecolfalse
-          \bool_if:NT \l__eb_multoc_bool{\twocolumn}
-        \fi
+        \ifbool{@twocolumn}
+          {
+            \booltrue{@restonecol}
+            \bool_if:NTF \l__eb_multoc_bool{\twocolumn}{\onecolumn}
+          }{
+            \boolfalse{@restonecol}
+            \bool_if:NT \l__eb_multoc_bool{\twocolumn}
+          }
       }{\tl_set:Nn \l__eb_toc_type_tl{article}}
   }
-\cs_new_protected:Npn \__eb_multoc_post_bool:
+\cs_new_protected:Npn \eb_multoc_post_bool:
   {
-    \bool_if:NTF \l__eb_class_book_bool
-      {
-        \if at restonecol
-          \twocolumn
-        \else
-          \onecolumn
-        \fi
-      }{\tl_set:Nn \l__eb_toc_type_tl{article}}
+    \bool_if:NT \l__eb_class_book_bool
+      {\ifbool{@restonecol}{\twocolumn}{\onecolumn}}
   }
-\cs_new_protected:Npn \__eb_title_intoc_bool:n #1
-  {
-    \IfBooleanTF{#1}
-      {\__eb_title_mark_notoc:n {\eb at toc@title}}
-      {\__eb_title_mark_intoc:n {\eb at toc@title}}
-  }
 \RenewDocumentCommand{\tableofcontents}{o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\contentsname
     \IfValueT{#1}{\keys_set:nn {listoc}{#1}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_mark_notoc:n {\eb at toc@title}
+    \eb_multoc_pre_bool:
+    \eb_title_mark_notoc:n {\eb at toc@title}
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{toc}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
-\RenewDocumentCommand{\listoffigures}{so}
+\RenewDocumentCommand{\listoffigures}{st+o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\listfigurename
-    \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_intoc_bool:n {#1}
+    \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+    \eb_multoc_pre_bool:
+    \eb_title_intoc_bool:nn {#2}{#1}
     \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{lof}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
-\RenewDocumentCommand{\listoftables}{so}
+\RenewDocumentCommand{\listoftables}{st+o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\listtablename
-    \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_intoc_bool:n {#1}
+    \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+    \eb_multoc_pre_bool:
+    \eb_title_intoc_bool:nn {#2}{#1}
     \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{lot}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
-\NewDocumentCommand{\listoflistings}{so}
+\NewDocumentCommand{\listoflistings}{st+o}
   {
     \group_begin:
     \tl_set_eq:NN \eb at toc@title\lstlistlistingname
-    \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
-    \__eb_multoc_pre_bool:
-    \__eb_title_intoc_bool:n {#1}
+    \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+    \eb_multoc_pre_bool:
+    \eb_title_intoc_bool:nn {#2}{#1}
     \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
     \@starttoc{lol}
-    \__eb_multoc_post_bool:
+    \eb_multoc_post_bool:
     \group_end:
   }
 
@@ -855,6 +843,7 @@
   {
     \makeindex[
       intoc,
+      title = \eb at toc@title,
       options = -M~texindy~-C~utf8,
       program = truexindy,
       columns = 2,
@@ -869,6 +858,14 @@
     \ctex_patch_cmd:Nnn \imki at indexheaders
       {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
       {\eb at nonumber@markdouble{\indexname}}
+    \RenewDocumentCommand{\printindex}
+      {D(){\imki at jobname}O{\imki at indexname}}
+      {
+        \group_begin:
+        \tl_set:Nn \eb at toc@title{#2}
+        \imki at putindex{#1}
+        \group_end:
+      }
   }
 
 \tl_new:N \l__eb_font_table_tl
@@ -876,7 +873,7 @@
 \tl_new:N \l__eb_font_listing_tl
 \tl_new:N \l__eb_font_footnote_tl
 
-\__ctex_define:nn {elsefont}
+\eb_ctex_define:nn {elsefont}
   {
     table-cap   .tl_set:N = \l__eb_font_table_tl,
     table-cap   .initial:n = \sffamily\small,
@@ -920,8 +917,8 @@
     \captionsetup[figure][bi-second]{name = Figure}
     \captionsetup[table][bi-second]{name = Table}
   }
-\cs_new:Npn \__eb_arabic:n #1{\int_to_arabic:v {c@#1}}
-\cs_new_protected:Npn \__eb_separator_set:n #1
+\cs_new:Npn \eb_arabic:n #1{\int_to_arabic:v {c@#1}}
+\cs_new_protected:Npn \eb_separator_set:n #1
   {
     \cs_set:cpn {the#1}
       {
@@ -930,17 +927,17 @@
             \thechapter
             \use:c {l__eb_#1_separator_tl}
           }
-        \__eb_arabic:n {#1}
+        \eb_arabic:n {#1}
       }
   }
 \cs_gset:cpn {thesection}
   {
     \int_compare:nT {\c at chapter > 0}{\thechapter.}
-    \__eb_arabic:n {section}
+    \eb_arabic:n {section}
   }
 \clist_map_inline:nn
   {figure,table,lstlisting,equation}
-  {\__eb_separator_set:n {#1}}
+  {\eb_separator_set:n {#1}}
 \cs_gset_protected:Npn \appendix
   {
     \int_compare:nNnTF {\c at chapter} > {0}
@@ -985,7 +982,7 @@
 \fp_new:N \l__eb_spread_caption_fp
 \fp_new:N \l__eb_spread_footnote_fp
 
-\__ctex_define:nn {spread}
+\eb_ctex_define:nn {spread}
   {
     line        .fp_set:N = \l__eb_spread_line_fp,
     line        .initial:n = 1.3,
@@ -1024,7 +1021,7 @@
 \graphicspath{{figures/}}
 \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
 
-\cs_new_protected:Npn \__eb_enumitem_labelval_set:nn #1#2
+\cs_new_protected:Npn \eb_enumitem_labelval_set:nn #1#2
   {\SetEnumitemValue{label}{#1}{\color{ctex at emph}#2}}
 \clist_map_inline:nn
   {
@@ -1035,7 +1032,7 @@
     {alph}{(\alph*)},
     {roman}{\roman*.},
     {outline}{\upshape\ding{111}}
-  }{\__eb_enumitem_labelval_set:nn #1}
+  }{\eb_enumitem_labelval_set:nn #1}
 \SetEnumitemValue{font}{sf}{\color{ctex at emph}\normalfont\sffamily}
 \setlist
   {
@@ -1054,7 +1051,7 @@
 \setlist*[enumerate,3]{labelwidth = *}
 \setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
 
-\cs_new_protected:Npn \__eb_thmname_set:nnn #1#2#3
+\cs_new_protected:Npn \eb_thmname_set:nnn #1#2#3
   {
     \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
       {\tl_const:cn {c__eb_name_#1_tl}{#3}}
@@ -1065,7 +1062,7 @@
   {
     \ctex_at_end_preamble:n
       {
-        \__eb_thmname_set:nnn {#1}{#2}{#3}
+        \eb_thmname_set:nnn {#1}{#2}{#3}
         \exp_args:No \declaretheorem at i
           {
             name = \use:c {c__eb_name_#1_tl},
@@ -1091,7 +1088,7 @@
 
 \RenewDocumentCommand{\newtheorem}{O{}m}
   {\AfterPreamble{\declaretheorem[#1]{#2}}}
-\__ctex_define:nn {thmset}
+\eb_ctex_define:nn {thmset}
   {
     thmbox      .bool_set:N = \l__eb_thmbox_bool,
     thmbox      .default:n = true,
@@ -1131,11 +1128,11 @@
       headformat = \NAME\space\NUMBER\NOTE
     ]
   }
-\__eb_at_end_preamble:n
+\eb_at_end_preamble:n
   {
     \exp_last_unbraced:No
     \declaretheoremstyle\c__eb_thmtools_keyval_tl{easy-theorem}
-    \__eb_thmname_set:nnn {exercise}{Exercise}{练习}
+    \eb_thmname_set:nnn {exercise}{Exercise}{练习}
     \cs_undefine:N \proof
     \clist_map_inline:nn
       {
@@ -1198,16 +1195,16 @@
     cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
     aligned,alignedat,gathered,multlined,lgathered,rgathered
   }{\l__eb_math_restore:n {#1}}
-\__eb_patch_cmd:Nnn \start at gather
+\eb_patch_cmd:Nnn \start at gather
   {\collect at body}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect at body}
-\__eb_patch_cmd:Nnn \start at align
+\eb_patch_cmd:Nnn \start at align
   {\collect at body}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect at body}
-\__eb_patch_cmd:Nnn \start at multline
+\eb_patch_cmd:Nnn \start at multline
   {\collect at body}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect at body}
-\__eb_patch_cmd:Nnn \gather at split
+\eb_patch_cmd:Nnn \gather at split
   {\spread at equation}
   {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\spread at equation}
 \ctex_after_end_preamble:n
@@ -1224,7 +1221,7 @@
 
 \ctex_at_end_package:nn {tcolorbox}
   {
-    \__eb_package_later_bool:nn {tcolorbox}{2020/10/09}
+    \eb_package_later_bool:nn {tcolorbox}{2020/10/09}
     \tcbset
       {
         tc-theorem/.style =
@@ -1355,7 +1352,7 @@
 \tl_new:N \l__eb_bib_citestyle_tl
 \tl_new:N \l__eb_bib_file_tl
 
-\__ctex_define:nn {bibset}
+\eb_ctex_define:nn {bibset}
   {
     backend               .choice:,
     backend/bibtex        .code:n = {},
@@ -1404,19 +1401,19 @@
     \tl_if_empty:NF \l__eb_bib_citestyle_tl
       {\exp_args:NV \setcitestyle\l__eb_bib_citestyle_tl}
     \skip_set:Nn \bibsep{0ex}
-    \NewDocumentCommand{\printbibliography}{so}
+    \NewDocumentCommand{\printbibliography}{st+o}
       {
         \group_begin:
         \tl_set_eq:NN \eb at toc@title\bibname
-        \IfValueT{##2}{\keys_set:nn {listoc}{##2}}
-        \__eb_multoc_pre_bool:
-        \cs_set:Npn \bibsection{\__eb_title_intoc_bool:n {##1}}
+        \IfValueT{##3}{\keys_set:nn {listoc}{##3}}
+        \eb_multoc_pre_bool:
+        \cs_set:Npn \bibsection{\eb_title_intoc_bool:nn {##2}{##1}}
         \exp_args:NV \bibliography\l__eb_bib_file_tl
-        \__eb_multoc_post_bool:
+        \eb_multoc_post_bool:
         \group_end:
       }
   }
-\cs_new_protected:Npn \__eb_put_biblatex:n #1
+\cs_new_protected:Npn \eb_put_biblatex:n #1
   {\PassOptionsToPackage{#1}{biblatex}}
 \cs_new_protected:Npn \EbBiblatexPreset
   {
@@ -1423,23 +1420,22 @@
     \tl_if_empty:NTF \l__eb_bib_otherstyle_tl
       {
         \tl_if_eq:NnT \l__eb_bib_style_tl{numerical}
-          {\__eb_put_biblatex:n {style = gb7714-2015}}
+          {\eb_put_biblatex:n {style = gb7714-2015}}
         \tl_if_eq:NnT \l__eb_bib_style_tl{authoryear}
-          {\__eb_put_biblatex:n {style = gb7714-2015ay}}
-      }{\__eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}}
+          {\eb_put_biblatex:n {style = gb7714-2015ay}}
+      }{\eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}}
     \tl_if_empty:NF \l__eb_bib_citestyle_tl
-      {\__eb_put_biblatex:n {citestyle = \l__eb_bib_citestyle_tl}}
-    \__eb_put_biblatex:n {backend = biber}
+      {\eb_put_biblatex:n {citestyle = \l__eb_bib_citestyle_tl}}
+    \eb_put_biblatex:n {backend = biber}
   }
 \cs_new_protected:Npn \EbBiblatexPostset
   {
     \exp_args:NV \addbibresource\l__eb_bib_file_tl
     \cs_gset:Npn \blx at default@theheading{bibintoc}
-    \cs_gset:Npn \blx at warning@noline##1{}
-    \defbibheading{bibintoc}[\bibname]{\__eb_class_title_bool:n {##1}}
+    \defbibheading{bibintoc}[\bibname]{\eb_class_title_bool:n {##1}}
     \skip_set:Nn \bibitemsep{0ex}
   }
-\__eb_at_end_preamble:n
+\eb_at_end_preamble:n
   {
     \bool_if:NT \l__eb_bib_loadpkg_bool
       {
@@ -1455,7 +1451,7 @@
       }
   }
 
-\__eb_at_end_preamble:n
+\eb_at_end_preamble:n
   {
     \group_begin:
     \footnotesize
@@ -1476,7 +1472,7 @@
         \counterwithin*{footnote}{page}
       }
   }
-\__eb_patch_cmd:Nnn \@footnotetext
+\eb_patch_cmd:Nnn \@footnotetext
   {\reset at font}
   {
     \linespread{\fp_use:N \l__eb_spread_footnote_fp}
@@ -1483,7 +1479,7 @@
     \selectfont\ignorespaces
     \l__eb_font_footnote_tl
   }
-\__eb_patch_cmd:Nnn \@mpfootnotetext
+\eb_patch_cmd:Nnn \@mpfootnotetext
   {\reset at font}
   {
     \linespread{\fp_use:N \l__eb_spread_footnote_fp}
@@ -1490,7 +1486,7 @@
     \selectfont\ignorespaces
     \l__eb_font_footnote_tl
   }
-\__eb_patch_cmd:Nnn \@makefnmark
+\eb_patch_cmd:Nnn \@makefnmark
   {\normalfont}{\l__eb_font_footnote_tl}
 \cs_gset:Npn \thempfootnote{\int_to_alph:n {\c at mpfootnote}}
 
@@ -1555,25 +1551,25 @@
 \lstloadlanguages{C,C++,Java,Python,Matlab}
 
 \clist_new:N \l__eb_hyperref_clist
-\cs_new_protected:Npn \__eb_put_hyperref:n #1
+\cs_new_protected:Npn \eb_put_hyperref:n #1
   {\clist_put_right:Nn \l__eb_hyperref_clist{#1}}
-\cs_new_protected:Npn \__eb_define_linkcolor:nnn #1#2#3
+\cs_new_protected:Npn \eb_define_linkcolor:nnn #1#2#3
   {\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
-\cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
+\cs_new_protected:Npn \eb_define_themecolor:nnn #1#2#3
   {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
-\cs_new_protected:Npn \__eb_define_linkcolor:n #1
+\cs_new_protected:Npn \eb_define_linkcolor:n #1
   {\definecolorset{HTML}{ctex@}{}{link,#1;url,#1;cite,#1}}
-\cs_new_protected:Npn \__eb_define_themecolor:n #1
+\cs_new_protected:Npn \eb_define_themecolor:n #1
   {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1}}
-\cs_new:Npn \__eb_linkcolor_set:n #1
+\cs_new:Npn \eb_linkcolor_set:n #1
   {
     linkcolor/\clist_item:nn {#1}{1} .code:n =
       {
-        \__eb_define_linkcolor:nnn
+        \eb_define_linkcolor:nnn
           {\clist_item:nn {#1}{2}}
           {\clist_item:nn {#1}{3}}
           {\clist_item:nn {#1}{4}}
-        \__eb_put_hyperref:n
+        \eb_put_hyperref:n
           {
             linkcolor = ctex at link,linkbordercolor = ctex at link,
             urlcolor = ctex at url,urlbordercolor = ctex at url,
@@ -1581,11 +1577,11 @@
           }
       },
   }
-\cs_new:Npn \__eb_themecolor_set:n #1
+\cs_new:Npn \eb_themecolor_set:n #1
   {
     color/\clist_item:nn {#1}{1} .code:n =
       {
-        \__eb_define_themecolor:nnn
+        \eb_define_themecolor:nnn
           {\clist_item:nn {#1}{2}}
           {\clist_item:nn {#1}{3}}
           {\clist_item:nn {#1}{4}}
@@ -1592,16 +1588,16 @@
       },
   }
 
-\bool_set_false:N \l__eb_toc_color_bool
-\__ctex_define:nn {link}
+\bool_set_false:N \l__eb_toc_number_color_bool
+\eb_ctex_define:nn {link}
   {
     hyperlink         .choice:,
     hyperlink/edge    .code:n = {},
-    hyperlink/none    .code:n = \__eb_put_hyperref:n {hidelinks},
+    hyperlink/none    .code:n = \eb_put_hyperref:n {hidelinks},
     hyperlink/various .code:n =
       {
-        \bool_set_true:N \l__eb_toc_color_bool
-        \__eb_put_hyperref:n {colorlinks}
+        \bool_set_true:N \l__eb_toc_number_color_bool
+        \eb_put_hyperref:n {colorlinks}
       },
     hyperlink         .default:n = edge,
     hyperlink         .initial:n = edge,
@@ -1609,11 +1605,11 @@
     linktoc           .choice:,
     linktoc/unknown   .code:n =
       {
-        \__eb_put_hyperref:n {linktoc = #1}
+        \eb_put_hyperref:n {linktoc = #1}
         \clist_map_inline:nn {page,none}
           {
             \tl_if_eq:NnT \l_keys_value_tl{##1}
-              {\clist_map_break:n {\colorlet{ctex at toc}{black}}}
+              {\clist_map_break:n {\colorlet{ctex at toc@number}{black}}}
           }
       },
     linktoc           .default:n = all,
@@ -1620,7 +1616,7 @@
     linktoc           .initial:n = all,
     unknown           .code:n =
       {
-        \__eb_put_hyperref:x
+        \eb_put_hyperref:x
           {
             \l_keys_key_str
             \tl_if_empty:NF \l_keys_value_tl{ = {#1}}
@@ -1627,7 +1623,7 @@
           }
       }
   }
-\__ctex_define:nx {link}
+\eb_ctex_define:nx {link}
   {
     linkcolor         .choice:,
     \clist_map_function:nN
@@ -1637,14 +1633,14 @@
         {navyblue,  000080,004986,eb6877},
         {crimson,   dc143c,00c1c9,afcd20}
       }
-      \__eb_linkcolor_set:n
+      \eb_linkcolor_set:n
     linkcolor         .default:n = navyblue,
     linkcolor         .initial:n = navyblue,
     linkcol-all       .code:n =
-      {\__eb_define_linkcolor:n {\exp_not:n {#1}}}
+      {\eb_define_linkcolor:n {\exp_not:n {#1}}}
   }
-\colorlet{ctex at toc}{ctex at link}
-\__ctex_define:nx {style}
+\colorlet{ctex at toc@number}{ctex at link}
+\eb_ctex_define:nx {style}
   {
     color     .choice:,
     color     .value_required:n = true,
@@ -1655,18 +1651,18 @@
         {energy,    f39800,00a0e9,893895},
         {cyberpunk, 601986,eb6877,a4005b}
       }
-      \__eb_themecolor_set:n
+      \eb_themecolor_set:n
     color     .initial:n = none,
     color-all .code:n =
-      {\__eb_define_themecolor:n {\exp_not:n {#1}}}
+      {\eb_define_themecolor:n {\exp_not:n {#1}}}
   }
 
-\cs_new:Npn \__eb_allow_urlbreak:
+\cs_new:Npn \eb_allow_urlbreak:
   {
-    \cs_new:Npn \__eb_add_urlbreak_points:
+    \cs_new:Npn \eb_add_urlbreak_points:
       {\tl_map_function:NN \c__eb_urlbreak_points_tl\do}
-    \__eb_appto_cmd:Nn
-      \UrlBreaks{\UrlOrds\__eb_add_urlbreak_points:}
+    \eb_appto_cmd:Nn
+      \UrlBreaks{\UrlOrds\eb_add_urlbreak_points:}
   }
 \tl_const:Nn \c__eb_urlbreak_points_tl
   {
@@ -1678,7 +1674,7 @@
   {
     \RequirePackage{hyperref}
     \urlstyle{same}
-    \__eb_allow_urlbreak:
+    \eb_allow_urlbreak:
     \ctex_hypersetup:n {pdfstartview = FitH}
     \exp_args:NV \hypersetup\l__eb_hyperref_clist
     \labelformat{part}{\CTEXthepart}
@@ -1722,30 +1718,29 @@
 \ctex_set:n
   {
     secnumdepth = 3,
-    tocdepth = 1,
+    tocdepth = \bool_if:NTF \l__eb_class_book_bool{1}{2},
     part =
       {
         pagestyle = empty,
-        number =
-          {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{part}}{\thepart}},
         format = \color{ctex at frame}\sffamily\Huge,
         aftername =
-          {\bool_if:NTF \l__eb_newline_bool{\par\nobreak}{\hspace{\ccwd}}},
+          {
+            \bool_if:NTF \l__eb_title_newline_bool
+              {\par\nobreak}{\hspace{\ccwd}}
+          },
         tocline = \CTEXifname{\CTEXthepart\hspace{\eb at toc@part at numsep}}{}#2
       },
     chapter =
       {
         % pagestyle = fancy,
-        number =
-          {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{chapter}}{\thechapter}},
         format =
           {
             \color{ctex at frame}\sffamily\LARGE
-            \bool_if:NF \l__eb_newline_bool{\centering}
+            \bool_if:NF \l__eb_title_newline_bool{\centering}
           },
         aftername =
           {
-            \bool_if:NTF \l__eb_newline_bool
+            \bool_if:NTF \l__eb_title_newline_bool
               {\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}
           },
         beforeskip = -1.5ex,
@@ -1779,7 +1774,7 @@
       }
   }
 
-\bool_if:NF \l__eb_newline_bool
+\bool_if:NF \l__eb_title_newline_bool
   {
     \ctex_set:n
       {



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