# texlive[58926] Master/texmf-dist: easybook (20apr21)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 20 22:13:34 CEST 2021

Revision: 58926
http://tug.org/svn/texlive?view=revision&revision=58926
Author:   karl
Date:     2021-04-20 22:13:34 +0200 (Tue, 20 Apr 2021)
Log Message:
-----------
easybook (20apr21)

Modified Paths:
--------------
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/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/chapter1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex	2021-04-20 20:13:19 UTC (rev 58925)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex	2021-04-20 20:13:34 UTC (rev 58926)
@@ -61,7 +61,7 @@
\zhlipsum*[59][name = aspirin]
\end{ebparbox}

-\begin{exercise}[LightYellow][1.](习题)
+\begin{exercise}+[LightBlue][1.](习题)[after skip = 3ex][\zhlipsum*[20][name = zhufu]]
\index{x@习题环境}
\item \zhlipsum*[20][name = zhufu]

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex	2021-04-20 20:13:19 UTC (rev 58925)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex	2021-04-20 20:13:34 UTC (rev 58926)
@@ -63,12 +63,11 @@
\bicaption{使用 tabularx 创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab:example}\small
\begin{tabularx}{0.87\textwidth}{@{}llL@{}}
\toprule
-    Aliquam & Integer & Pellentesque tincidunt purus
-    vel magna. \\
+    Aliquam & Integer & \lipsum[1][9] \\
\midrule
-    viverra & \multirow[c]{3}*{metus} & Nulla malesuada porttitor diam. Vestibulum lectus. Proin mauris. Proin eu nunc eu urna hendrerit faucibus. \\
-    semper & & Nullam elementum, urna vel imperdiet sodales, elit ipsum pharetra ligula, ac pretium ante justo a nulla. Curabitur tristique arcu eu metus. \\
-    \multicolumn{2}{c}{\multirow{3}*[0ex]{convallis}} & Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. \\
+    viverra & \multirow[c]{3}*{metus} & \lipsum[1][1-2] \\
+    semper & & \lipsum[1][3-5] \\
+    \multicolumn{2}{c}{\multirow{3}*[0ex]{convallis}} & \lipsum[1][6-8] \\
\bottomrule
\end{tabularx}
\end{table}

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-20 20:13:19 UTC (rev 58925)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-04-20 20:13:34 UTC (rev 58926)
@@ -70,6 +70,7 @@
},
tocset =
{
+        hang = false,
line-align = true,
part =
{
@@ -104,7 +105,7 @@
\url{https://latexstudio.net} \\
\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/04/18\hskip\ccwd\relax v1.24n}
+\date{2021/04/19\hskip\ccwd\relax v1.24o}

\frontmatter[roman]
\maketitle

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-20 20:13:19 UTC (rev 58925)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-04-20 20:13:34 UTC (rev 58926)
@@ -55,7 +55,7 @@
%
% \title{\sffamily easybook 书籍文档类}
% \author{瞿毅}
-% \date{2021/04/18\hskip\ccwd\relax v1.24n\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/04/19\hskip\ccwd\relax v1.24o\thanks{\url{https://gitee.com/texl3/easybook}}}
% \maketitle
% \begin{abstract}
%   \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板，可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持，但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求，它适用于排版中英文书籍或笔记，甚至可稍加调整成为学位论文模板。
@@ -174,7 +174,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.24n}{2021/04/04}{目录命令的可选参数增加标题键值。}
+% \changes{v1.24o}{2021/04/04}{目录命令的可选参数增加标题键值。}
% \end{function}
%
% \section{接口选项}
@@ -265,7 +265,7 @@
% \opt{link} 将超链接选项（包括以上选项）交给 \pkg{hyperref} 处理，除了一些关于 pdf 书签的选项可能会失效，其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
-% \changes{v1.24n}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
+% \changes{v1.24o}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
% \end{function}
%
% \begin{optdesc}
@@ -284,7 +284,7 @@
%
% \subsection{行距}
% \label{subsec:spacing}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{line,table,math,caption,footnote}
% \begin{syntax}
%   line = <(1.3)>
%   table = <(1.05)>
@@ -291,6 +291,7 @@
%   math = <(1.05)>
%   caption = <(1)>
%   footnote = <(1)>
% \end{syntax}
% 行距因子用于设置各种行距倍数，只能是浮点数，不能带有长度单位。各行距既可在导言区全局设置也可正文中设置对后面生效，行距的意义为
@@ -304,6 +305,7 @@
%   \item[math] 数学环境行距，包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境，但并未加载 \pkg{mathtools} 宏包。
%   \item[caption] 图表代码标题行距。
%   \item[footnote] 脚注行距。
% \end{optdesc}
%
% \subsection{其它字体}
@@ -342,7 +344,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.24n}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
+% \changes{v1.24o}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
% \end{function}
%
% \begin{optdesc}
@@ -394,7 +396,7 @@
% \end{function}
%
% \begin{optdesc}
-%   \item[thmbox] 开启定理及习题环境的盒子边框，需载入 \pkg{tcolorbox} 宏包才生效。
+%   \item[thmbox] 开启几个预置定理环境盒子的边框，需载入 \pkg{tcolorbox} 宏包才生效。
%   \item[within] 定理编号跟随的计数器，默认跟随章的编号，也可以跟随其它定理环境的编号，当计数器增加时定理编号会从零开始，空置时不跟随其它计数器。
%   \item[bodyfont] 定理内容部分的字体。
@@ -490,7 +492,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.24n}{2021/04/09}{增加 \opt{subsec-mark} 标志选项，仅在 \opt{article} 模式生效。}
+% \changes{v1.24o}{2021/04/09}{增加 \opt{subsec-mark} 标志选项，仅在 \opt{article} 模式生效。}
% \end{function}
%
@@ -549,7 +551,7 @@
%     }
% \end{ctexexam}
%
-% \begin{function}[EXP,added = 2021-01-13,updated = 2021-04-06]{lists/lolskip,lists/belowoffset,tocset/tocline-fig,tocset/tocline-tab,tocset/tocline-lst,tocset/belowoffset,tocset/line-align}
+% \begin{function}[EXP,added = 2021-01-13,updated = 2021-04-19]{lists/lolskip,lists/belowoffset,tocset/tocline-fig,tocset/tocline-tab,tocset/tocline-lst,tocset/belowoffset,tocset/line-align,tocset/hang}
% \begin{syntax}
%   lolskip = <(0.8pc)>
%   belowoffset = <(0pc)>
@@ -558,21 +560,23 @@
%   tocline-lst = <代码目录标签>
%   belowoffset = <(-1pc)>
%   line-align = <(true)|false>
+%   hang = <true|(false)>
% \end{syntax}
-% \opt{lolskip} 是代码目录中章之间的代码标题的距离，与\CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似，它们的值均默认0.8 pc，在 \opt{article} 模式中此选项失效。目录标签整体使用 \opt{tocline} 设置，也可使用小节 \ref{subsec:page margins} 的 \opt{list-labelsep} 选项只设置编号与标题的间距。在图表标签的参数中，\#1与\#2分别代表编号和标题，代码标签的编号和标题则是 \tn{thelstlisting} 和 \tn{lstcaption}，标签中还可包含标签名称，默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子
-% \changes{v1.24n}{2021/04/05}{可以设置图、表和代码目录的标签。}
-% \changes{v1.24n}{2021/04/06}{增加目录引导线右边对齐方式。}
+% \opt{lolskip} 是代码目录中章之间的代码标题的距离，与\CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似，它们的值均默认0.8 pc，在 \opt{article} 模式中此选项失效。目录标签整体使用 \opt{tocline} 设置，也可使用小节 \ref{subsec:page margins} 的 \opt{list-labelsep} 选项只设置编号与标题的间距。在图表标签的参数中\#1代表编号，代码标签中则是 \tn{thelstlisting} 代表编号，标签中还可包含标签名称，默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子
+% \changes{v1.24o}{2021/04/05}{可以设置图、表和代码目录的标签。}
+% \changes{v1.24o}{2021/04/06}{增加目录引导线右边对齐方式。}
+% \changes{v1.24o}{2021/04/19}{给目录增加 \opt{hang} 样式选项。}
% \end{function}
%
% \begin{ctexexam}
%   \tocset
%     {
-%       tocline-fig = 图#1\hspace{\ccwd}#2
-%       tocline-lst = 代码\thelstlisting\hspace{\ccwd}\lstcaption
+%       tocline-fig = 图#1\hspace{\ccwd}
+%       tocline-lst = 代码\thelstlisting\hspace{\ccwd}
%     }
% \end{ctexexam}
%
-% \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿，一般为负值，用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似，但是一般为正值，可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。\opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙，否则会与页码连接。
+% \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿，一般为负值，用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似，但是一般为正值，可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。\opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙，否则会与页码连接。\opt{hang} 选项使目录标题为悬挂缩进形式，缩进距离为编号及其与标题间距的长度，但此时目录编号会失去超链接。
%
% \section{常用环境}
%
@@ -587,14 +591,14 @@
% \end{function}
%
% \subsection{列表}
-% \begin{function}[added = 2021-01-05,updated = 2021-04-08]{enumerate,itemize,description}
+% \begin{function}[added = 2021-01-05,updated = 2021-04-08]{enumerate,itemize,description,enumerate*,itemize*,description*}
% \begin{syntax}
%   \tn{begin}\marg{环境名}\oarg{键值列表}
%   \  \tn{item} <列表内容>
%   \tn{end}\marg{环境名}
% \end{syntax}
-% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制，可使用 \tn{setlist} 命令设置原有的三种列表格式。已为三种列表预置了三个级别的格式可相互嵌套，默认标签与 \cls{book} 文档类相同，若自定义标签可例如
-% \changes{v1.24n}{2021/04/08}{重新优化列表环境的配置。}
+% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制，可使用 \tn{setlist} 命令设置原有的三种列表格式，也可以直接使用可选参数的键值列表，具体选项见 \pkg{enumitem} 宏包文档。已为三种列表预置了三个级别的格式可相互嵌套，默认标签与 \cls{book} 文档类相同，若自定义标签可例如
+% \changes{v1.24o}{2021/04/08}{重新优化列表环境的配置。}
% \end{function}
%
% \begin{ctexexam}
@@ -635,7 +639,7 @@
%   \  <定理内容>
%   \tn{end}\marg{环境名}
% \end{syntax}
-% 这些是已预置的定理环境，定理环境除了注和证明跟随章编号并可带有边框，边框和习题标题盒子可使用 \opt{thmbox = false} 关闭，证明末尾会自动添加证明结束符。环境名对应的定理标题名如下
+% 这些是已预置的定理环境，定理环境除了注和证明跟随章编号并可带有边框，盒子边框可使用 \opt{thmset/thmbox = false} 关闭，证明末尾会自动添加证明结束符。环境名对应的定理标题名如下
% \begin{center}
%   \begin{tabular}{*{8}{c}}
%     \toprule
@@ -648,18 +652,20 @@
%
% \subsection{习题}
% \label{subsec:exercise}
-% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{exercise}
+% \begin{function}[added = 2021-01-05,updated = 2021-04-19]{exercise}
% \begin{syntax}
-%   \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}
+%   \tn{begin}\marg{exercise}*+\oarg{颜色名|(LightBlue)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}\oarg{序言}
%   \  \tn{item} <习题内容>
%   \tn{end}\marg{exercise}
% \end{syntax}
-% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉，当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称，已载入了 \opt{svgnames} 颜色库。正文编号格式与小节 \ref{subsec:sort list} 排序列表相同，标题名默认为摘要。注意，环境具有相同定界符的可选参数只能\textbf{从右往左}省略，省略的参数使用默认值。
+% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉，当使用星号参数时不进行编号，使用+号参数启用 \pkg{tcolorbox} 支持生成标题。\oarg{颜色名} 选项在使用+号参数时有效，其中颜色为自定义或 \pkg{xcolor} 包含的颜色名称。题目编号格式与小节 \ref{subsec:sort list} 排序列表相同，标题名默认为习题。
+%
+% 配置选项在是否使用+号参数时用法不同，使用+号参数时为 \pkg{tcolorbox} 的盒子选项，例如 \opt{boxrule} 和 \opt{fontupper}。不使用+号参数时相当于设置 \tn{ctexset}\marg{section = {\#1}} 键值选项列表，例如 \opt{format} 和 \opt{beforeskip}。\oarg{序言} 选项用于在习题环境开始前插入一段内容，可以是文本或者代码。注意，环境具有相同定界符的可选参数只能\textbf{从右往左}省略，省略的参数使用默认值。
% \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
% \end{function}
%
% \begin{ctexexam}
-%   \begin{exercise}[LightYellow][1.](习题)
+%   \begin{exercise}+[LightBlue][1.](习题)
%     \item 习题内容
%     \item 习题内容
%   \end{exercise}
@@ -667,7 +673,7 @@
%
% \subsection{盒子}
% \label{subsec:box}
-% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包，它们的配置选项同样由 \pkg{tcolorbox} 提供支持，具体选项可见宏包文档的 Option Keys 一节，可以进行边距、字体及背景颜色等各种个性化设置，一些配置会覆盖之前预置的设置。
+% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包，它们的配置键值列表选项同样由 \pkg{tcolorbox} 提供支持，具体选项可见宏包文档的 Option Keys 一节，可以进行边距、字体及背景颜色等各种个性化设置，一些配置会覆盖之前预置的设置。
%
% \subsubsection{摘要盒子}
% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{outline}
@@ -687,17 +693,17 @@
% \end{ctexexam}
%
% \subsubsection{段落盒子}
-% \begin{function}[added = 2021-01-05,updated = 2021-04-18]{easybox}
+% \begin{function}[added = 2021-01-05,updated = 2021-04-19]{easybox}
% \begin{syntax}
%   \tn{begin}\marg{easybox}*\oarg{颜色名|(DarkCyan)}\parg{段落标题}\oarg{配置选项}
%   \  <盒子内容>
%   \tn{end}\marg{easybox}
% \end{syntax}
-% 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用带有星号的环境时给盒子添加边框，\oarg{颜色名} 选项设置背景颜色，\parg{段落标题} 选项可以设置标题，默认无标题。
+% 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框，\oarg{颜色名} 选项设置背景颜色，\parg{段落标题} 选项可以设置标题，默认无标题。
% \end{function}
%
% \begin{ctexexam}
-%   \begin{easybox}*[MintCream](段落标题)
+%   \begin{easybox}*[DarkCyan](段落标题)
%     盒子内容
%     \tcblower   % 盒子上下部分分界线
%     盒子内容
@@ -704,13 +710,14 @@
%   \end{easybox}
% \end{ctexexam}
%
% \begin{syntax}
%   \tn{begin}\marg{ebparbox}*\oarg{颜色名|(Purple)}\parg{段落标题}\oarg{配置选项}
%   \  <盒子内容>
%   \tn{end}\marg{ebparbox}
% \end{syntax}
-% 环境 \env{ebparbox} 与 \env{easybox} 类似，同样带有三个可选参数。当使用带有星号的环境时盒子左边带有一条竖线，\oarg{颜色名} 选项可以自定义竖线颜色，使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\parg{段落标题} 选项可以设置标题，默认无标题。
+% 环境 \env{ebparbox} 与 \env{easybox} 类似，同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线，\oarg{颜色名} 选项可以自定义竖线颜色，使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\parg{段落标题} 选项可以设置标题，默认无标题。
+% \changes{v1.24o}{2021/04/19}{优化盒子环境的选项，增加可带有标题的扁平盒子 \env{ebparbox}。}
% \end{function}
%
% \subsubsection{行内盒子}
@@ -769,7 +776,7 @@
%   \tn{labelformat}\marg{计数器}\marg{标签引用格式}
% \end{syntax}
% 使用 \tn{ref} 命令进行引用将会自动检测环境并添加相应的前缀，\tn{labelformat} 可以设置标签引用格式，第二个参数中\#1代表 \tn{the}\meta{计数器}，可以设置引用序号的前缀和后缀。
-% \changes{v1.24n}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
+% \changes{v1.24o}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
% \end{function}
%
% \subsubsection{索引}
@@ -845,7 +852,7 @@
% 以下为 \cls{easybook} 直接调用的关键宏包，带有 \ding{75} 符号的宏包并未载入它们，仅做了预配置和兼容性处理，可根据需要在导言区手动载入以实现相关的功能。
% \begin{description}
%   \item[ctexbook] 提供中文排版的通用框架。
-%   \item[xcolor] 提供多种颜色、阴影、色调和任意颜色的混合。
+%   \item[xcolor] 提供任意颜色的设定与混合，已载入了 \opt{svgnames} 颜色库。
%   \item[footmisc] 更改脚注排版的方法的集合。
%   \item[amsmath] 提供\LaTeX 中的数学功能。
%   \item[thmtools] 用于通常需要的排版定理支持。
@@ -879,7 +886,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/04/18}{1.24n}{beta}
+\ProvidesExplClass{easybook}{2021/04/19}{1.24o}{beta}

\cs_generate_variant:Nn \__ctex_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -1293,21 +1300,18 @@
}
\cs_new:Npn \__eb_upper_chaptermark_bool:n #1
{
-    \bool_if:NTF \l__eb_uppercase_bool
-      {\text_uppercase:n {\__eb_fancyhf_chap_mark:n {#1}}}
-      {\text_titlecase_first:n {\__eb_fancyhf_chap_mark:n {#1}}}
+    \bool_if:NT \l__eb_uppercase_bool
+      {\text_uppercase:n}{\__eb_fancyhf_chap_mark:n {#1}}
}
\cs_new:Npn \__eb_upper_sectionmark_bool:n #1
{
-    \bool_if:NTF \l__eb_uppercase_bool
-      {\text_uppercase:n {\__eb_fancyhf_sec_mark:n {#1}}}
-      {\text_titlecase_first:n {\__eb_fancyhf_sec_mark:n {#1}}}
+    \bool_if:NT \l__eb_uppercase_bool
+      {\text_uppercase:n}{\__eb_fancyhf_sec_mark:n {#1}}
}
\cs_new:Npn \__eb_upper_subsectionmark_bool:n #1
{
-    \bool_if:NTF \l__eb_uppercase_bool
-      {\text_uppercase:n {\__eb_fancyhf_subsec_mark:n {#1}}}
-      {\text_titlecase_first:n {\__eb_fancyhf_subsec_mark:n {#1}}}
+    \bool_if:NT \l__eb_uppercase_bool
+      {\text_uppercase:n}{\__eb_fancyhf_subsec_mark:n {#1}}
}
\ctex_at_end_preamble:n
{
@@ -1318,32 +1322,26 @@
\pagestyle{fancy}
\bool_if:NTF \l__eb_class_book_bool
{
-        \bool_if:NTF \l__eb_page_twoside_bool
+        \cs_gset:Npn \chaptermark#1
{
-            \cs_gset:Npn \chaptermark#1
+            \markboth
+              {\__eb_upper_chaptermark_bool:n {#1}}
{
-                \markboth
+                \bool_if:NT \l__eb_page_twoside_bool
{\__eb_upper_chaptermark_bool:n {#1}}
-                  {\__eb_upper_chaptermark_bool:n {#1}}
}
-          }{
-            \cs_gset:Npn \chaptermark#1
-              {\markboth{\__eb_upper_chaptermark_bool:n {#1}}{}}
}
\cs_gset:Npn \sectionmark#1
{\markright{\__eb_upper_sectionmark_bool:n {#1}}}
}{
-        \bool_if:NTF \l__eb_page_twoside_bool
+        \cs_gset:Npn \sectionmark#1
{
-            \cs_gset:Npn \sectionmark#1
+            \markboth
+              {\__eb_upper_sectionmark_bool:n {#1}}
{
-                \markboth
+                \bool_if:NT \l__eb_page_twoside_bool
{\__eb_upper_sectionmark_bool:n {#1}}
-                  {\__eb_upper_sectionmark_bool:n {#1}}
}
-          }{
-            \cs_gset:Npn \sectionmark#1
-              {\markboth{\__eb_upper_sectionmark_bool:n {#1}}{}}
}
\cs_gset:Npn \subsectionmark#1
{\markright{\__eb_upper_subsectionmark_bool:n {#1}}}
@@ -1375,24 +1373,26 @@
lists/lolskip     .initial:n = 0.8pc,
lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim,
lists/belowoffset .initial:n = 0pc,
-    tocline-fig       .cs_set:Np = \eb at labelname@lof#1#2,
+    tocline-fig       .cs_set:Np = \eb at labelname@lof#1,
tocline-fig       .initial:n =
-      {\figurename\space#1\hspace{\eb at list@labelsep}#2},
-    tocline-tab       .cs_set:Np = \eb at labelname@lot#1#2,
+      {\figurename\space#1\hspace{\eb at list@labelsep}},
+    tocline-tab       .cs_set:Np = \eb at labelname@lot#1,
tocline-tab       .initial:n =
-      {\tablename\space#1\hspace{\eb at list@labelsep}#2},
+      {\tablename\space#1\hspace{\eb at list@labelsep}},
tocline-lst       .tl_set:N = \eb at labelname@lol,
tocline-lst       .initial:n =
{
\lstlistingname\space
\thelstlisting\hspace{\eb at list@labelsep}
-        \lstcaption
},
belowoffset       .dim_set:N = \l__eb_toc_offset_dim,
belowoffset       .initial:n = -1pc,
line-align        .bool_set:N = \l__eb_toc_line_align_bool,
line-align        .default:n = true,
-    line-align        .initial:n = true
+    line-align        .initial:n = true,
+    hang              .bool_set:N = \eb at titletoc@hang at fix,
+    hang              .default:n = true,
+    hang              .initial:n = false
}
\ctex_set:nn {tocset}
{
@@ -1432,7 +1432,12 @@
{
\titlecontents{#1}
[\use:c {l__toc_#2_indent_tl}]
-      {\use:c {l__toc_#2_format_tl}}{}{}
+      {\use:c {l__toc_#2_format_tl}}
+      {
+        \ifodd\eb at titletoc@hang at fix
+        \fi
+      }{}
{\use:c {l__toc_#2_rule_tl}}
}
\contentsuse{lstlisting}{lol}
@@ -1453,19 +1458,49 @@
figure = \eb at labelname@lof,
table = \eb at labelname@lot
}
+\cs_new:Npn \eb at numberline#1#2
{
-      {\prop_item:Nn \l_label_name_prop{#2}{#3}{#4}}
+    \CTEXifname
+      {
+        \protect\numberline{\use:c {CTEXthe#1}}
+        \hspace{#2}
+      }{}
}
-\ctex_patch_cmd:Nnn \lst at MakeCaption
+\ctex_at_end_preamble:n
{
-      {\protect\numberline{\thelstlisting}\lst@@caption}
-  }{
-    \let\lstcaption\lst@@caption
+      {
+          {
+            \ifodd\eb at titletoc@hang at fix
+              \protect\numberline
+            \fi
+            {\prop_item:Nn \l_label_name_prop{#2}{#3}}{#4}
+          }
+      }
+    \ctex_patch_cmd:Nnn \lst at MakeCaption
+      {
+          {\protect\numberline{\thelstlisting}\lst@@caption}
+      }{
+          {
+            \ifodd\eb at titletoc@hang at fix
+              \protect\numberline
+            \fi
+            {\eb at labelname@lol}\lst@@caption
+          }
+      }
+    \ifodd\eb at titletoc@hang at fix
+      \ctex_set:n
+        {
+          chapter/tocline = \eb at numberline{#1}{\ccwd}#2,
+          section/tocline = \eb at numberline{#1}{\ccwd}#2,
+          subsection/tocline = \eb at numberline{#1}{\ccwd}#2
+        }
+    \fi
}
+
\__eb_appto_cmd:Nn \@chapter
{
\skip_if_eq:nnF {\l__eb_toc_lolskip_skip}{\c_zero_skip}
@@ -1493,15 +1528,17 @@
{\text_uppercase:n {#1}}
{\text_titlecase_first:n {#1}}
}
-\cs_new_protected:Npn \eb at markdouble#1
+\cs_new_protected:Npn \eb at nonumber@markdouble#1
{
-    \bool_if:NTF \l__eb_page_twoside_bool
+    \markboth
+      {\__eb_uppercase_bool:n {#1}}
{
-        \markboth
+        \bool_if:NT \l__eb_page_twoside_bool
{\__eb_uppercase_bool:n {#1}}
-          {\__eb_uppercase_bool:n {#1}}
-      }{\markboth{\__eb_uppercase_bool:n {#1}}{}}
+      }
}
+\cs_new_protected:Npn \eb at nonumber@markright#1
+  {\markright{\__eb_uppercase_bool:n {#1}}}

\tl_set:Nn \l__eb_toc_type_tl{book}
\keys_define:nn {listoc}
@@ -1520,18 +1557,27 @@
{
\chapter*{\phantomsection#1}
+        \eb at nonumber@markdouble{#1}
}{
\section*{\phantomsection#1}
+        \bool_if:NTF \l__eb_class_book_bool
+          {\eb at nonumber@markright{#1}}
+          {\eb at nonumber@markdouble{#1}}
}
-    \eb at markdouble{#1}
}
\cs_new_protected:Npn \__eb_title_mark_notoc:n #1
{
\tl_if_eq:NnTF \l__eb_toc_type_tl{book}
-      {\chapter*{\phantomsection#1}}
-      {\section*{\phantomsection#1}}
-    \eb at markdouble{#1}
+      {
+        \chapter*{\phantomsection#1}
+        \eb at nonumber@markdouble{#1}
+      }{
+        \section*{\phantomsection#1}
+        \bool_if:NTF \l__eb_class_book_bool
+          {\eb at nonumber@markright{#1}}
+          {\eb at nonumber@markdouble{#1}}
+      }
}
\cs_new_protected:Npn \__eb_class_title_bool:n #1
{
@@ -1543,7 +1589,7 @@
\section*{\phantomsection#1}
}
-    \eb at markdouble{#1}
+    \eb at nonumber@markdouble{#1}
}
\cs_new_protected:Npn \__eb_multoc_pre_bool:
{
@@ -1644,7 +1690,7 @@
}
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
-      {\eb at markdouble{\indexname}}
+      {\eb at nonumber@markdouble{\indexname}}
}

\tl_new:N \l__eb_font_table_tl
@@ -1763,16 +1809,21 @@

{
-    line      .initial:n = 1.3,
-    table     .initial:n = 1.05,
-    math      .initial:n = 1.05,
-    caption   .initial:n = 1,
-    footnote  .initial:n = 1
+    line        .initial:n = 1.3,
+    table       .initial:n = 1.05,
+    math        .initial:n = 1.05,
+    caption     .initial:n = 1,
+    footnote    .initial:n = 1,
+      {
+        line = {#1},table = {#1},math = {#1},
+        caption = {#1},footnote = {#1}
+      }
}

\skip_set:Nn \parskip{0pt plus 2pt minus 1pt}
@@ -1828,19 +1879,19 @@
\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}}
{\tl_const:cn {c__eb_name_#1_tl}{#2}}
-      {\tl_const:cn {c__eb_name_#1_tl}{#3}}
}
\clist_map_inline:nn
{
-    {example}{例}{Example},
-    {definition}{定义}{Definition},
-    {theorem}{定理}{Theorem},
-    {proposition}{性质}{Proposition},
-    {lemma}{引理}{Lemma},
-    {corollary}{推论}{Corollary},
-    {remark}{注}{Remark},
-    {exercise}{练习}{Exercise}
+    {proposition}{Proposition}{性质},
+    {definition}{Definition}{定义},
+    {corollary}{Corollary}{推论},
+    {exercise}{Exercise}{练习},
+    {theorem}{Theorem}{定理},
+    {example}{Example}{例},
+    {remark}{Remark}{注},
+    {lemma}{Lemma}{引理}
}{\__eb_thmname_set:nnn #1}

\bool_new:N \l__eb_thmbox_bool
@@ -2001,8 +2052,7 @@
opacityback = 0,
colframe = ctex at emph,
-            left = 6pt,right = 6pt,top = 8pt,bottom = 8pt,middle= 8pt,
-            arc = 0pt
+            left = 6pt,right = 6pt,top = 8pt,bottom = 8pt,middle= 8pt
},
tc-outline/.style =
{
@@ -2019,14 +2069,14 @@
},
tc-exercise/.style =
{
-            enhanced,on~line,
-            fontupper = \sffamily\Large,
-            boxrule = 1pt,arc = 5pt,
-            left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
-            before~skip = 4ex,after~skip = 2.25ex
+            blank,on~line,center,
+            fontupper = \Large\sffamily,
+            before~skip = 3.5ex,after~skip = 2.25ex
},
breakable,
boxsep = 0pt,
+        arc = 0pt,
+        fonttitle = \sffamily,
boxrule = \l__eb_rule_width_dim
}
\NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
@@ -2038,39 +2088,32 @@
\end{tcolorbox}
}{}
\NewDocumentEnvironment{exercise}
-      {sO{LightYellow}O{1.}D(){\c__eb_name_exercise_tl}o+b}
+      {st+O{LightBlue}O{1.}D(){\c__eb_name_exercise_tl}o+O{}+b}
{
-        \begin{center}
-          \bool_if:NTF \l__eb_thmbox_bool
-            {
-              \tcbox[
-                tc-exercise,
-                colback = #2,colframe = black,
-                IfValueT = {#5}{#5},
-                phantom =
-                  \IfBooleanF{#1}
-                    {
-                      \CTEX at ifnametrue
-                      \refstepcounter{section}
-                      \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
-                    }
-                ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
-            }{
-              \color{ctex at frame}\sffamily\Large
-              \IfBooleanF{#1}
-                {
-                  \CTEX at ifnametrue
-                  \refstepcounter{section}
-                  \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
-                  \CTEXthesection\hspace{0.5\ccwd}
-                }#4
-            }
-        \end{center}
-        \begin{enumerate}[#3,labelsep = 0.5\ccwd]
-          #6
+        \IfBooleanTF{#2}
+          {
+            \tcbox[
+              tc-exercise,
+              fuzzy~halo = 5pt~with~#3,
+              IfValueT = {#6}{#6},
+              phantom =
+                \IfBooleanF{#1}
+                  {
+                    \CTEX at ifnametrue
+                    \refstepcounter{section}
+                    \markright{\CTEXthesection\hspace{0.5\ccwd}#5}
+                  }
+              ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#5}
+          }{
+            \group_begin:
+            \keys_set:nn {ctex/section}{format += \centering}
+            \IfValueT{#6}{\keys_set:nn {ctex/section}{#6}}
+            \IfBooleanTF{#1}{\section*{#5}}{\section{#5}}
+            \group_end:
+          }#7
+        \begin{enumerate}[#4,labelsep = 0.5\ccwd]
+          #8
\end{enumerate}
}{}
\DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}}
@@ -2082,9 +2125,8 @@
IfValueT = {#3}{title = #3},
colback = #2!8!white,colbacktitle = #2!8!white,
coltitle = black,colframe = black,
-        fonttitle = \sffamily,
left = 6pt,right = 6pt,bottom = 8pt,middle= 8pt,
-        bottomtitle = 8pt,arc = 0pt,
+        bottomtitle = 8pt,
beforeafter~skip = 2ex,
halign~upper = left,halign~lower = left,
center~title,#4
@@ -2106,10 +2148,9 @@
bottom = 8pt,toptitle = 8pt
},
left = 8pt,right = 8pt,middle= 8pt,
-        bottomtitle = 8pt,arc = 0pt,
+        bottomtitle = 8pt,
beforeafter~skip = 1.5ex,
-        colframe = #2,coltitle = #2,
-        fonttitle = \sffamily,#4
+        colframe = #2,coltitle = #2,#4
}
\DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
{
@@ -2120,7 +2161,7 @@
{
nobeforeafter,tcbox~raise~base,
top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
-        boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
+        boxrule = 0.75pt,arc = 1pt,
colback = #1!15!white,#3
}{#2}
}
@@ -2252,8 +2293,8 @@
\footnotesize
\exp_args:Nx
-    \skip_gset:Nn \footnotesep{\ht\strutbox}
-    \group_end:
+    \exp_args:NNNo \group_end:
+    \dim_set:Nn \footnotesep{\dim_use:N \box_ht:N \strutbox}
\bool_if:NT \l__eb_chap_withpart_bool
{\counterwithin*{chapter}{part}}
\tl_if_eq:NnT \l__eb_foot_numberwith_tl{part}

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-04-20 20:13:19 UTC (rev 58925)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-04-20 20:13:34 UTC (rev 58926)
@@ -13,7 +13,7 @@
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/04/18}{1.24n}{beta}
+\ProvidesExplClass{easybook}{2021/04/19}{1.24o}{beta}

\cs_generate_variant:Nn \__ctex_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -427,21 +427,18 @@
}
\cs_new:Npn \__eb_upper_chaptermark_bool:n #1
{
-    \bool_if:NTF \l__eb_uppercase_bool
-      {\text_uppercase:n {\__eb_fancyhf_chap_mark:n {#1}}}
-      {\text_titlecase_first:n {\__eb_fancyhf_chap_mark:n {#1}}}
+    \bool_if:NT \l__eb_uppercase_bool
+      {\text_uppercase:n}{\__eb_fancyhf_chap_mark:n {#1}}
}
\cs_new:Npn \__eb_upper_sectionmark_bool:n #1
{
-    \bool_if:NTF \l__eb_uppercase_bool
-      {\text_uppercase:n {\__eb_fancyhf_sec_mark:n {#1}}}
-      {\text_titlecase_first:n {\__eb_fancyhf_sec_mark:n {#1}}}
+    \bool_if:NT \l__eb_uppercase_bool
+      {\text_uppercase:n}{\__eb_fancyhf_sec_mark:n {#1}}
}
\cs_new:Npn \__eb_upper_subsectionmark_bool:n #1
{
-    \bool_if:NTF \l__eb_uppercase_bool
-      {\text_uppercase:n {\__eb_fancyhf_subsec_mark:n {#1}}}
-      {\text_titlecase_first:n {\__eb_fancyhf_subsec_mark:n {#1}}}
+    \bool_if:NT \l__eb_uppercase_bool
+      {\text_uppercase:n}{\__eb_fancyhf_subsec_mark:n {#1}}
}
\ctex_at_end_preamble:n
{
@@ -452,32 +449,26 @@
\pagestyle{fancy}
\bool_if:NTF \l__eb_class_book_bool
{
-        \bool_if:NTF \l__eb_page_twoside_bool
+        \cs_gset:Npn \chaptermark#1
{
-            \cs_gset:Npn \chaptermark#1
+            \markboth
+              {\__eb_upper_chaptermark_bool:n {#1}}
{
-                \markboth
+                \bool_if:NT \l__eb_page_twoside_bool
{\__eb_upper_chaptermark_bool:n {#1}}
-                  {\__eb_upper_chaptermark_bool:n {#1}}
}
-          }{
-            \cs_gset:Npn \chaptermark#1
-              {\markboth{\__eb_upper_chaptermark_bool:n {#1}}{}}
}
\cs_gset:Npn \sectionmark#1
{\markright{\__eb_upper_sectionmark_bool:n {#1}}}
}{
-        \bool_if:NTF \l__eb_page_twoside_bool
+        \cs_gset:Npn \sectionmark#1
{
-            \cs_gset:Npn \sectionmark#1
+            \markboth
+              {\__eb_upper_sectionmark_bool:n {#1}}
{
-                \markboth
+                \bool_if:NT \l__eb_page_twoside_bool
{\__eb_upper_sectionmark_bool:n {#1}}
-                  {\__eb_upper_sectionmark_bool:n {#1}}
}
-          }{
-            \cs_gset:Npn \sectionmark#1
-              {\markboth{\__eb_upper_sectionmark_bool:n {#1}}{}}
}
\cs_gset:Npn \subsectionmark#1
{\markright{\__eb_upper_subsectionmark_bool:n {#1}}}
@@ -509,24 +500,26 @@
lists/lolskip     .initial:n = 0.8pc,
lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim,
lists/belowoffset .initial:n = 0pc,
-    tocline-fig       .cs_set:Np = \eb at labelname@lof#1#2,
+    tocline-fig       .cs_set:Np = \eb at labelname@lof#1,
tocline-fig       .initial:n =
-      {\figurename\space#1\hspace{\eb at list@labelsep}#2},
-    tocline-tab       .cs_set:Np = \eb at labelname@lot#1#2,
+      {\figurename\space#1\hspace{\eb at list@labelsep}},
+    tocline-tab       .cs_set:Np = \eb at labelname@lot#1,
tocline-tab       .initial:n =
-      {\tablename\space#1\hspace{\eb at list@labelsep}#2},
+      {\tablename\space#1\hspace{\eb at list@labelsep}},
tocline-lst       .tl_set:N = \eb at labelname@lol,
tocline-lst       .initial:n =
{
\lstlistingname\space
\thelstlisting\hspace{\eb at list@labelsep}
-        \lstcaption
},
belowoffset       .dim_set:N = \l__eb_toc_offset_dim,
belowoffset       .initial:n = -1pc,
line-align        .bool_set:N = \l__eb_toc_line_align_bool,
line-align        .default:n = true,
-    line-align        .initial:n = true
+    line-align        .initial:n = true,
+    hang              .bool_set:N = \eb at titletoc@hang at fix,
+    hang              .default:n = true,
+    hang              .initial:n = false
}
\ctex_set:nn {tocset}
{
@@ -566,7 +559,12 @@
{
\titlecontents{#1}
[\use:c {l__toc_#2_indent_tl}]
-      {\use:c {l__toc_#2_format_tl}}{}{}
+      {\use:c {l__toc_#2_format_tl}}
+      {
+        \ifodd\eb at titletoc@hang at fix
+        \fi
+      }{}
{\use:c {l__toc_#2_rule_tl}}
}
\contentsuse{lstlisting}{lol}
@@ -587,19 +585,49 @@
figure = \eb at labelname@lof,
table = \eb at labelname@lot
}
+\cs_new:Npn \eb at numberline#1#2
{
-      {\prop_item:Nn \l_label_name_prop{#2}{#3}{#4}}
+    \CTEXifname
+      {
+        \protect\numberline{\use:c {CTEXthe#1}}
+        \hspace{#2}
+      }{}
}
-\ctex_patch_cmd:Nnn \lst at MakeCaption
+\ctex_at_end_preamble:n
{
-      {\protect\numberline{\thelstlisting}\lst@@caption}
-  }{
-    \let\lstcaption\lst@@caption
+      {
+          {
+            \ifodd\eb at titletoc@hang at fix
+              \protect\numberline
+            \fi
+            {\prop_item:Nn \l_label_name_prop{#2}{#3}}{#4}
+          }
+      }
+    \ctex_patch_cmd:Nnn \lst at MakeCaption
+      {
+          {\protect\numberline{\thelstlisting}\lst@@caption}
+      }{
+          {
+            \ifodd\eb at titletoc@hang at fix
+              \protect\numberline
+            \fi
+            {\eb at labelname@lol}\lst@@caption
+          }
+      }
+    \ifodd\eb at titletoc@hang at fix
+      \ctex_set:n
+        {
+          chapter/tocline = \eb at numberline{#1}{\ccwd}#2,
+          section/tocline = \eb at numberline{#1}{\ccwd}#2,
+          subsection/tocline = \eb at numberline{#1}{\ccwd}#2
+        }
+    \fi
}
+
\__eb_appto_cmd:Nn \@chapter
{
\skip_if_eq:nnF {\l__eb_toc_lolskip_skip}{\c_zero_skip}
@@ -627,15 +655,17 @@
{\text_uppercase:n {#1}}
{\text_titlecase_first:n {#1}}
}
-\cs_new_protected:Npn \eb at markdouble#1
+\cs_new_protected:Npn \eb at nonumber@markdouble#1
{
-    \bool_if:NTF \l__eb_page_twoside_bool
+    \markboth
+      {\__eb_uppercase_bool:n {#1}}
{
-        \markboth
+        \bool_if:NT \l__eb_page_twoside_bool
{\__eb_uppercase_bool:n {#1}}
-          {\__eb_uppercase_bool:n {#1}}
-      }{\markboth{\__eb_uppercase_bool:n {#1}}{}}
+      }
}
+\cs_new_protected:Npn \eb at nonumber@markright#1
+  {\markright{\__eb_uppercase_bool:n {#1}}}

\tl_set:Nn \l__eb_toc_type_tl{book}
\keys_define:nn {listoc}
@@ -654,18 +684,27 @@
{
\chapter*{\phantomsection#1}
+        \eb at nonumber@markdouble{#1}
}{
\section*{\phantomsection#1}
+        \bool_if:NTF \l__eb_class_book_bool
+          {\eb at nonumber@markright{#1}}
+          {\eb at nonumber@markdouble{#1}}
}
-    \eb at markdouble{#1}
}
\cs_new_protected:Npn \__eb_title_mark_notoc:n #1
{
\tl_if_eq:NnTF \l__eb_toc_type_tl{book}
-      {\chapter*{\phantomsection#1}}
-      {\section*{\phantomsection#1}}
-    \eb at markdouble{#1}
+      {
+        \chapter*{\phantomsection#1}
+        \eb at nonumber@markdouble{#1}
+      }{
+        \section*{\phantomsection#1}
+        \bool_if:NTF \l__eb_class_book_bool
+          {\eb at nonumber@markright{#1}}
+          {\eb at nonumber@markdouble{#1}}
+      }
}
\cs_new_protected:Npn \__eb_class_title_bool:n #1
{
@@ -677,7 +716,7 @@
\section*{\phantomsection#1}
}
-    \eb at markdouble{#1}
+    \eb at nonumber@markdouble{#1}
}
\cs_new_protected:Npn \__eb_multoc_pre_bool:
{
@@ -778,7 +817,7 @@
}
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
-      {\eb at markdouble{\indexname}}
+      {\eb at nonumber@markdouble{\indexname}}
}

\tl_new:N \l__eb_font_table_tl
@@ -897,16 +936,21 @@

{
-    line      .initial:n = 1.3,
-    table     .initial:n = 1.05,
-    math      .initial:n = 1.05,
-    caption   .initial:n = 1,
-    footnote  .initial:n = 1
+    line        .initial:n = 1.3,
+    table       .initial:n = 1.05,
+    math        .initial:n = 1.05,
+    caption     .initial:n = 1,
+    footnote    .initial:n = 1,
+      {
+        line = {#1},table = {#1},math = {#1},
+        caption = {#1},footnote = {#1}
+      }
}

\skip_set:Nn \parskip{0pt plus 2pt minus 1pt}
@@ -962,19 +1006,19 @@
\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}}
{\tl_const:cn {c__eb_name_#1_tl}{#2}}
-      {\tl_const:cn {c__eb_name_#1_tl}{#3}}
}
\clist_map_inline:nn
{
-    {example}{例}{Example},
-    {definition}{定义}{Definition},
-    {theorem}{定理}{Theorem},
-    {proposition}{性质}{Proposition},
-    {lemma}{引理}{Lemma},
-    {corollary}{推论}{Corollary},
-    {remark}{注}{Remark},
-    {exercise}{练习}{Exercise}
+    {proposition}{Proposition}{性质},
+    {definition}{Definition}{定义},
+    {corollary}{Corollary}{推论},
+    {exercise}{Exercise}{练习},
+    {theorem}{Theorem}{定理},
+    {example}{Example}{例},
+    {remark}{Remark}{注},
+    {lemma}{Lemma}{引理}
}{\__eb_thmname_set:nnn #1}

\bool_new:N \l__eb_thmbox_bool
@@ -1135,8 +1179,7 @@
opacityback = 0,
colframe = ctex at emph,
-            left = 6pt,right = 6pt,top = 8pt,bottom = 8pt,middle= 8pt,
-            arc = 0pt
+            left = 6pt,right = 6pt,top = 8pt,bottom = 8pt,middle= 8pt
},
tc-outline/.style =
{
@@ -1153,14 +1196,14 @@
},
tc-exercise/.style =
{
-            enhanced,on~line,
-            fontupper = \sffamily\Large,
-            boxrule = 1pt,arc = 5pt,
-            left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
-            before~skip = 4ex,after~skip = 2.25ex
+            blank,on~line,center,
+            fontupper = \Large\sffamily,
+            before~skip = 3.5ex,after~skip = 2.25ex
},
breakable,
boxsep = 0pt,
+        arc = 0pt,
+        fonttitle = \sffamily,
boxrule = \l__eb_rule_width_dim
}
\NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
@@ -1172,39 +1215,32 @@
\end{tcolorbox}
}{}
\NewDocumentEnvironment{exercise}
-      {sO{LightYellow}O{1.}D(){\c__eb_name_exercise_tl}o+b}
+      {st+O{LightBlue}O{1.}D(){\c__eb_name_exercise_tl}o+O{}+b}
{
-        \begin{center}
-          \bool_if:NTF \l__eb_thmbox_bool
-            {
-              \tcbox[
-                tc-exercise,
-                colback = #2,colframe = black,
-                IfValueT = {#5}{#5},
-                phantom =
-                  \IfBooleanF{#1}
-                    {
-                      \CTEX at ifnametrue
-                      \refstepcounter{section}
-                      \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
-                    }
-                ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
-            }{
-              \color{ctex at frame}\sffamily\Large
-              \IfBooleanF{#1}
-                {
-                  \CTEX at ifnametrue
-                  \refstepcounter{section}
-                  \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
-                  \CTEXthesection\hspace{0.5\ccwd}
-                }#4
-            }
-        \end{center}
-        \begin{enumerate}[#3,labelsep = 0.5\ccwd]
-          #6
+        \IfBooleanTF{#2}
+          {
+            \tcbox[
+              tc-exercise,
+              fuzzy~halo = 5pt~with~#3,
+              IfValueT = {#6}{#6},
+              phantom =
+                \IfBooleanF{#1}
+                  {
+                    \CTEX at ifnametrue
+                    \refstepcounter{section}
+                    \markright{\CTEXthesection\hspace{0.5\ccwd}#5}
+                  }
+              ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#5}
+          }{
+            \group_begin:
+            \keys_set:nn {ctex/section}{format += \centering}
+            \IfValueT{#6}{\keys_set:nn {ctex/section}{#6}}
+            \IfBooleanTF{#1}{\section*{#5}}{\section{#5}}
+            \group_end:
+          }#7
+        \begin{enumerate}[#4,labelsep = 0.5\ccwd]
+          #8
\end{enumerate}
}{}
\DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}}
@@ -1216,9 +1252,8 @@
IfValueT = {#3}{title = #3},
colback = #2!8!white,colbacktitle = #2!8!white,
coltitle = black,colframe = black,
-        fonttitle = \sffamily,
left = 6pt,right = 6pt,bottom = 8pt,middle= 8pt,
-        bottomtitle = 8pt,arc = 0pt,
+        bottomtitle = 8pt,
beforeafter~skip = 2ex,
halign~upper = left,halign~lower = left,
center~title,#4
@@ -1240,10 +1275,9 @@
bottom = 8pt,toptitle = 8pt
},
left = 8pt,right = 8pt,middle= 8pt,
-        bottomtitle = 8pt,arc = 0pt,
+        bottomtitle = 8pt,
beforeafter~skip = 1.5ex,
-        colframe = #2,coltitle = #2,
-        fonttitle = \sffamily,#4
+        colframe = #2,coltitle = #2,#4
}
\DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
{
@@ -1254,7 +1288,7 @@
{
nobeforeafter,tcbox~raise~base,
top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
-        boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
+        boxrule = 0.75pt,arc = 1pt,
colback = #1!15!white,#3
}{#2}
}
@@ -1386,8 +1420,8 @@
\footnotesize
\exp_args:Nx