summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-30 03:02:32 +0000
committerNorbert Preining <norbert@preining.info>2021-04-30 03:02:32 +0000
commitb2a74f7600f0c4e33c859c718976b1215c4c747d (patch)
treea2ca3f08c20604b3302aab6fe61350862246890d /macros/latex/contrib/easybook/easybook.dtx
parenteb12ba26e2796aad14025f9c36434d5b84097eab (diff)
CTAN sync 202104300302
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx146
1 files changed, 78 insertions, 68 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index f91a46f4f1..bd50a65171 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -56,7 +56,8 @@ The latest version of this license is in
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/04/28\hskip\ccwd\relax v1.24v\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,17 +106,13 @@ The latest version of this license is in
% \end{function}
%
% \begin{function}[rEXP,added = 2021-01-05]{newline}
-% 章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
+% 部分和章标题的样式为另起一行,符合一般英文书籍的习惯。类似下面的效果
% \begin{flushleft}\sffamily\LARGE
% Chapter 1\vskip 1.3pc
% This is a title
% \end{flushleft}
% \end{function}
%
-% \begin{function}[rEXP,added = 2021-01-05]{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 @@ The latest version of this license is in
% \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,18 +158,18 @@ The latest version of this license is in
%
% \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*}
% \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 @@ The latest version of this license is in
% \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.24v}{2021/04/04}{目录命令的可选参数增加标题键值。}
+% \changes{v1.24w}{2021/04/04}{目录命令的可选参数增加标题键值。}
% \end{function}
%
% \section{接口选项}
@@ -266,7 +263,7 @@ The latest version of this license is in
% \ding{229} 以上选项路径为 \opt{link/...} \\
% \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-% \changes{v1.24v}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
+% \changes{v1.24w}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
% \end{function}
%
% \begin{optdesc}
@@ -345,7 +342,7 @@ The latest version of this license is in
% \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.24v}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
+% \changes{v1.24w}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
% \end{function}
%
% \begin{optdesc}
@@ -417,7 +414,7 @@ The latest version of this license is in
% \end{syntax}
% 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-% \changes{v1.24v}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。}
+% \changes{v1.24w}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -501,7 +498,7 @@ The latest version of this license is in
% \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.24v}{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 @@ The latest version of this license is in
%
% \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
-% \changes{v1.24v}{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 @@ The latest version of this license is in
% indent-all = <目录标题左边缩进>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{tocset/lists/...} 或 \opt{tocset/...}
-% \changes{v1.24v}{2021/04/05}{可以设置图、表和代码目录的标签。}
-% \changes{v1.24v}{2021/04/06}{增加目录引导线右边对齐方式。}
-% \changes{v1.24v}{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 @@ The latest version of this license is in
% \tn{end}\marg{环境名}
% \end{syntax}
% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式,也可以直接使用可选参数的键值列表,具体选项见 \pkg{enumitem} 宏包文档。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如
-% \changes{v1.24v}{2021/04/08}{重新优化列表环境的配置。}
+% \changes{v1.24w}{2021/04/08}{重新优化列表环境的配置。}
% \end{function}
%
% \begin{ctexexam}
@@ -740,7 +737,7 @@ The latest version of this license is in
% \tn{end}\marg{ebparbox}
% \end{syntax}
% 环境 \env{ebparbox} 与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。
-% \changes{v1.24v}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。}
+% \changes{v1.24w}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。}
% \end{function}
%
% \subsubsection{行内盒子}
@@ -799,14 +796,14 @@ The latest version of this license is in
% \tn{labelformat}\marg{计数器}\marg{标签引用格式}
% \end{syntax}
% 使用 \tn{ref} 命令进行引用将会自动检测环境并添加相应的前缀,\tn{labelformat} 可以设置标签引用格式,第二个参数中\#1代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。
-% \changes{v1.24v}{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}
@@ -912,7 +909,7 @@ The latest version of this license is in
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/04/28}{1.24v}{beta}
+\ProvidesExplClass{easybook}{2021/04/29}{1.24w}{beta}
\cs_generate_variant:Nn \eb_ctex_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -928,11 +925,11 @@ The latest version of this license is in
{\ctex_appto_cmd:NnnTF #1{}{#2}{}{\ctex_patch_failure:N #1}}
\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
@@ -940,11 +937,10 @@ The latest version of this license is in
\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,
+ 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},
- enstyle .meta:n = {newline,entitle,scheme = plain},
+ enmode .meta:n = {newline,scheme = plain},
font .choices:nn =
{adobe,founder,mac,windows,none}
@@ -1201,7 +1197,7 @@ The latest version of this license is in
\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}}
+ {\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\itshape}}
\includepdfset{fitpaper = true}
\geometry
@@ -1360,7 +1356,7 @@ The latest version of this license is in
\cs_gset:Npn \subsectionmark#1
{\eb@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}}
@@ -1486,7 +1482,8 @@ The latest version of this license is in
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,
@@ -1642,6 +1639,19 @@ The latest version of this license is in
{\eb@nonumber@markdouble{#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@toc@title}}
+ {\section{\eb@toc@title}}
+ }{
+ \IfBooleanTF{#2}
+ {\eb_title_mark_notoc:n {\eb@toc@title}}
+ {\eb_title_mark_intoc:n {\eb@toc@title}}
+ }
+ }
\cs_new_protected:Npn \eb_class_title_bool:n #1
{
\bool_if:NTF \l__eb_class_book_bool
@@ -1670,15 +1680,8 @@ The latest version of this license is in
}
\cs_new_protected:Npn \eb_multoc_post_bool:
{
- \bool_if:NTF \l__eb_class_book_bool
+ \bool_if:NT \l__eb_class_book_bool
{\ifbool{@restonecol}{\twocolumn}{\onecolumn}}
- {\tl_set:Nn \l__eb_toc_type_tl{article}}
- }
-\cs_new_protected:Npn \eb_title_intoc_bool:n #1
- {
- \IfBooleanTF{#1}
- {\eb_title_mark_notoc:n {\eb@toc@title}}
- {\eb_title_mark_intoc:n {\eb@toc@title}}
}
\RenewDocumentCommand{\tableofcontents}{o}
{
@@ -1692,39 +1695,39 @@ The latest version of this license is in
\eb_multoc_post_bool:
\group_end:
}
-\RenewDocumentCommand{\listoffigures}{so}
+\RenewDocumentCommand{\listoffigures}{st+o}
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\listfigurename
- \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
+ \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
\eb_multoc_pre_bool:
- \eb_title_intoc_bool:n {#1}
+ \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:
\group_end:
}
-\RenewDocumentCommand{\listoftables}{so}
+\RenewDocumentCommand{\listoftables}{st+o}
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\listtablename
- \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
+ \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
\eb_multoc_pre_bool:
- \eb_title_intoc_bool:n {#1}
+ \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:
\group_end:
}
-\NewDocumentCommand{\listoflistings}{so}
+\NewDocumentCommand{\listoflistings}{st+o}
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\lstlistlistingname
- \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
+ \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
\eb_multoc_pre_bool:
- \eb_title_intoc_bool:n {#1}
+ \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}
@@ -1736,6 +1739,7 @@ The latest version of this license is in
{
\makeindex[
intoc,
+ title = \eb@toc@title,
options = -M~texindy~-C~utf8,
program = truexindy,
columns = 2,
@@ -1750,6 +1754,14 @@ The latest version of this license is in
\ctex_patch_cmd:Nnn \imki@indexheaders
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
{\eb@nonumber@markdouble{\indexname}}
+ \RenewDocumentCommand{\printindex}
+ {D(){\imki@jobname}O{\imki@indexname}}
+ {
+ \group_begin:
+ \tl_set:Nn \eb@toc@title{#2}
+ \imki@putindex{#1}
+ \group_end:
+ }
}
\tl_new:N \l__eb_font_table_tl
@@ -2285,13 +2297,13 @@ The latest version of this license is in
\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@toc@title\bibname
- \IfValueT{##2}{\keys_set:nn {listoc}{##2}}
+ \IfValueT{##3}{\keys_set:nn {listoc}{##3}}
\eb_multoc_pre_bool:
- \cs_set:Npn \bibsection{\eb_title_intoc_bool:n {##1}}
+ \cs_set:Npn \bibsection{\eb_title_intoc_bool:nn {##2}{##1}}
\exp_args:NV \bibliography\l__eb_bib_file_tl
\eb_multoc_post_bool:
\group_end:
@@ -2316,7 +2328,6 @@ The latest version of this license is in
{
\exp_args:NV \addbibresource\l__eb_bib_file_tl
\cs_gset:Npn \blx@default@theheading{bibintoc}
- \cs_gset:Npn \blx@warning@noline##1{}
\defbibheading{bibintoc}[\bibname]{\eb_class_title_bool:n {##1}}
\skip_set:Nn \bibitemsep{0ex}
}
@@ -2603,30 +2614,29 @@ The latest version of this license is in
\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@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@toc@part@numsep}}{}#2
},
chapter =
{
% pagestyle = fancy,
- number =
- {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{chapter}}{\thechapter}},
format =
{
\color{ctex@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,
@@ -2660,7 +2670,7 @@ The latest version of this license is in
}
}
-\bool_if:NF \l__eb_newline_bool
+\bool_if:NF \l__eb_title_newline_bool
{
\ctex_set:n
{