texlive[60872] Master/texmf-dist: easybook (26oct21)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 26 23:27:56 CEST 2021


Revision: 60872
          http://tug.org/svn/texlive?view=revision&revision=60872
Author:   karl
Date:     2021-10-26 23:27:55 +0200 (Tue, 26 Oct 2021)
Log Message:
-----------
easybook (26oct21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
    trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex
    trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
    trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
    trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
    trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg

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

Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex	2021-10-25 23:48:39 UTC (rev 60871)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex	2021-10-26 21:27:55 UTC (rev 60872)
@@ -20,7 +20,7 @@
     name            = easybook,
     color-scheme    = blue,
     title           = EASYBOOK 使用手册,
-    version         = v1.40C,
+    version         = v1.40E,
     date            = 2021/10/25,
     authors         = 瞿毅,
     info            = 排版简体中文学位论文和书籍,
@@ -175,6 +175,24 @@
 当然也可以使用 \code{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\
 \ding{72} 需要注意正确\textbf{编译索引}要增加 \code{-shell-escape} 命令行选项。
 
+\subsection{依赖宏包}
+以下为 \pkg*{easybase} 直接调用的关键宏包清单。灰色的宏包表示并未调用它们,但做了一些预配置,可在导言区手动载入以实现相关的功能。
+\begin{center}
+  \begin{tblr}
+  {
+    colspec = @{}*{5}{c}@{},
+    hline{1,6} = {1pt,Blue},
+    cells = {cmd = \pkg*},
+    cell{5}{2-5} = {font = \color{gray}}
+  }
+  ctex & spbmark & ulem & enumitem & etoolbox \\
+  siunitx & pifont & amsthm & thmtools & marginnote \\
+  pdfpages & multicol & fancyhdr & titletoc & tabularray \\
+  setspace & listings & chemformula & geometry & caption \\
+  hyperref & bicaption & imakeidx & mathtools & tcolorbox
+  \end{tblr}
+\end{center}
+
 \section{文档类选项}
 \label{sec:document class options}
 文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见小节 \ref{subsec:basic usage} 的例子。目前 \pkg*{easybase} 宏包可用的选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage}。除了下面列举的选项,还可使用标准文档类和 C\TeX 文档类的选项。
@@ -268,13 +286,13 @@
 \subsection{目录命令}
 \begin{commands}
   \command{tableofcontents}[\parg\oarg{键值列表}\darg{附加代码}]
-  主文档目录命令。带有 \parg{} 号参数的命令输出双语目录,需要与双语目录标题命令 \cs{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令。
+  文档主目录命令。带有 \parg{} 号参数的命令输出双语目录,需要与双语目录标题命令 \cs{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令。
   \command{listoffigures}[\sarg\parg\oarg{键值列表}]
-  输出图片目录命令。带有星号的目录命令不将目录标题添加进主文档目录,带有 \parg{} 号的目录命令可以使当前标题编号。
+  输出图片目录命令。带有星号的目录命令不将目录标题添加进文档主目录,带有 \parg{} 号的目录命令可以使当前标题编号。
   \command{listoftables}[\sarg\parg\oarg{键值列表}]
-  输出表格目录命令。带有星号的目录命令不将目录标题添加进主文档目录,带有 \parg{} 号的目录命令可以使当前标题编号。
+  输出表格目录命令。带有星号的目录命令不将目录标题添加进文档主目录,带有 \parg{} 号的目录命令可以使当前标题编号。
   \command{listoflstlistings}[\sarg\parg\oarg{键值列表}]
-  输出代码目录命令。带有星号的目录命令不将目录标题添加进主文档目录,带有 \parg{} 号的目录命令可以使当前标题编号。以上命令可选参数 \meta{键值列表} 的选项如下:
+  输出代码目录命令。带有星号的目录命令不将目录标题添加进文档主目录,带有 \parg{} 号的目录命令可以使当前标题编号。以上命令可选参数 \meta{键值列表} 的选项如下:
 \end{commands}
 
 \begin{options}
@@ -287,7 +305,7 @@
   \keyval-{columns}{目录栏数}\Default{2}
   设置目录的栏数,仅在 \keyis-{multoc}{true} 时有效,默认为双栏。
   \kvsplit{title}{中文目录标题,英文目录标题}\newline
-  用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录 \cs*{tableofcontents}\parg{} 命令。
+  用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入文档主目录 \cs*{tableofcontents}\parg{} 命令。
   \keyval-{format}{目录标题格式}
   在 \cls*{book} 模式且 \option{chapter} 选项开启或者 \cls*{article} 模式的情况下,\option{format} 用于设置目录标题的格式。
   \keyval-{aftertitle}{目录标题格式}\Default
@@ -616,7 +634,7 @@
 
 \subsection{页面尺寸}
 \label{subsec:page margins}
-模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面是列举的一小部分选项,其它选项可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。
+模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面列举的仅是一小部分选项,其它选项可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。
 \begin{options}\noitemsep
   \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*
   \keyval-{footruleskip}{页脚线间距}\Default*
@@ -692,7 +710,7 @@
   \end{ctexexam}
 \end{commands}
 
-\subsubsection{脚注格式}
+\subsection{脚注格式}
 模块 \module*{hdrset} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号、对齐方式和缩进距离等,以及脚注内容的首行缩进、行距和字体等。基本思想是默认脚注和自定义编号脚注标记的格式分离,两种类型脚注各自正文和内容的标记又共享格式,默认脚注中正文和内容标记的编号类型分离。
 \begin{options}
   \keychoice{footnotetype}{hang,default,flush,bottom}\Module{hdrset}\Default{hang}
@@ -756,33 +774,43 @@
 
 \subsection{目录样式}
 \label{subsec:catalog style}
-模块 \module*{tocset} 将使用 \pkg*{titletoc} 处理目录样式。模块包括 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 二级路径,而使用 \module*{list} 路径可以统一设置图片、表格和代码目录的样式。模块中 \option{format}、\option{format+}、\option{indent}、\option{rule} 和 \option{numsep} 这 5 个选项支持所有路径类型,没有特别说明的其它选项则没有二级路径。目前支持常规的论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 宏包的相关用法。
+模块 \module*{tocset} 将使用 \pkg*{titletoc} 宏包处理目录样式。模块或扩展包括了 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 二级路径,而使用 \module*{list} 路径可以统一设置图片、表格和代码目录的样式。模块中 \option{tocformat}、\option{tocformat+}、\option{tocindent}、\option{tocrule}、\option{tocafter} 和 \option{tocline} 这 6 个选项支持所有相应\textbf{标题级别}的路径,没有特别说明的其它选项则处于 \module*{tocset} 路径下。目前支持标准的论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
 \begin{options}
-  \keyval-{format}{条目格式}\Module{tocset}
+  \keyval-{tocformat}{条目格式}\Module{tocset}
   目录中各级别条目的格式,可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。
-  \keyval-{format+}{条目格式}
-  与 \option{format} 用法一样,只是在已有的格式命令后附加代码。
-  \keyval-{indent}{刚性长度}
+  \keyval-{tocformat+}{条目格式}
+  与 \option{tocformat} 用法一样,只是在已有的格式命令后附加代码。
+  \keyval-{tocindent}{刚性长度}
   各级别目录中的标题左边缩进距离,通常标题级别越低缩进越大。
-  \keyval-{rule}{目录引导线样式}
-  引导线选项 \option{rule} 中一般应当使用 \cs{tocrule} 命令绘制引导线,将会在下面介绍。
-  \keyval-{numsep}{刚性长度}\Default{1em}
-  有编号的标题在各级别目录中编号与标题的间距,默认距离统一为 \code{1em}。
+  \keyval-{tocrule}{目录引导线样式}
+  引导线选项 \option{tocrule} 中一般应当使用 \cs{tocrule} 命令绘制引导线,将会在下面介绍。
+  \keyval-{tocafter}{距离命令}\Default{\cs*{hspace}\Carg{1em}}
+  在各级别目录中标签与标题间的代码,默认为插入 \code{1em} 横向距离。
+  \keyval-{tocline}{目录标签}
+  这个选项扩展了图片、表格或代码的目录标签。图片或表格的选项中参数 \code{\#1} 代表编号,代码中 \cs*{thelstlisting} 代表编号。选项还可包含标签名称,默认标签名称与对应题注名称一致。
+  \begin{ctexexam}
+  \ctexset
+    {
+      figure/tocline      = 图 #1\hspace{1em},
+      lstlisting/tocline  = 代码\thelstlisting\hspace{1em}
+    }
+  \end{ctexexam}
 \end{options}
 
 \begin{commands}
   \command{tocrule}[\sarg\oarg{引导点间距}\darg{放大因子}\marg{引导点}\oarg{页码格式}]
-  目录命令 \cs{tocrule} 生成目录引导线,需要在引导线选项 \option{rule} 中使用。带有星号的命令会使当前级别的目录引导线右边与页码相连而不是对齐。\meta{引导点间距} 需带有长度单位,\meta{放大因子} 不带单位,为 \meta{引导点} 的放大倍数,\meta{引导点} 一般为英文句号或 \cs*{cdot} 中心点符号。\meta{页码格式} 的代码位于页码前面,可以设置页码字体和距离等,最后一个命令可以带有一个参数,这个参数为页码编号。
+  目录命令 \cs{tocrule} 生成目录引导线,需要在引导线选项 \option{tocrule} 中使用。带有星号的命令会使当前级别的目录引导线右边与页码相连而不是对齐。\meta{引导点间距} 需带有长度单位,\meta{放大因子} 不带单位,为 \meta{引导点} 的放大倍数,\meta{引导点} 一般为英文句号或 \cs*{cdot} 中心点符号。\meta{页码格式} 的代码位于页码前面,可以设置页码字体和距离等,最后一个命令可以带有一个参数,这个参数为页码编号。
   \command*{CTEXnumberline}[\marg{编号级别}]
-  目录命令 \cs*{CTEXnumberline} 用于在 C\TeX 文档类的 \option*{tocline} 选项中设置目录标签的编号,它已经被重新定义,使得目录编号后间距选项 \option{numsep} 仍然有效。\meta{编号级别} 为 \code{chapter} 和 \code{section} 等,也可用参数 \code{\#1} 代替当前级别类型,标题名用参数 \code{\#2} 代替一般不变。
+  目录命令 \cs*{CTEXnumberline} 用于在 C\TeX 文档类的 \option*{tocline} 选项中设置目录的标签,它已经被重新定义,使得目录标签后代码选项 \option{tocafter} 仍然有效。\meta{编号级别} 为 \code{chapter} 和 \code{section} 等,也可用参数 \code{\#1} 代替当前级别类型,标题名用参数 \code{\#2} 代替一般不变。
   \begin{ctexexam}
-  \tocset
+  \ctexset
     {
-      chapter     =
+      chapter       =
         {
-          format  = \addvspace{8pt}\large,
-          indent  = 1.5em,
-          rule    = \tocrule[0.6pc](1.1){.}[\zihao{5}]
+          tocformat = \addvspace{8pt}\large,
+          tocindent = 1.5em,
+          tocrule   = \tocrule[0.6pc](1.1){.}[\zihao{5}],
+          tocline   = \CTEXnumberline{#1}#2
         }
     }
   \end{ctexexam}
@@ -789,31 +817,21 @@
 \end{commands}
 
 \begin{options}
+  \keybool{hang}\Default{false}
+  悬挂缩进选项 \option{hang} 使目录标题为悬挂缩进形式,缩进距离为标签及其与标题间距的长度,但此时目录编号会失去超链接。这个选项对所有标题级别有效。
   \keyval-{lolskip}{弹性长度}\Default{10pt}
   代码目录中每章代码标题的额外距离,与 C\TeX 的表格和图片目录中每章间的标题距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
-  \keyval-{tocvoffset}{弹性长度}
-  主文档目录标题下方的间距补偿,一般为正值,用于抵消目录中首行的额外垂直间距。
   \keyval-{voffset}{弹性长度}
   图片、表格或代码目录标题下方的间距补偿,一般为正值,用于抵消目录中首行的额外垂直间距。路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用 \module*{list} 路径统一设置。
-  \keyval-{tocline}{目录标签}
-  图片、表格或代码的目录标签,图片或表格的选项参数中 \code{\#1} 代表编号,代码中 \cs*{thelstlisting} 代表编号。参数还可包含标签名称,默认标签名称与对应题注名称一致。路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用 \module*{list} 路径统一设置。
-  \begin{ctexexam}
-  \tocset
-    {
-      hang                = false,
-      figure/tocline      = 图 #1\hspace{1em},
-      lstlisting/tocline  = 代码\thelstlisting\hspace{1em}
-    }
-  \end{ctexexam}
+  \keyval-{main-voffset}{弹性长度}
+  文档主目录标题下方的间距补偿,一般为正值,用于抵消目录中首行的额外垂直间距。
   \keybool{line-align}\Default{true}
-  引导线选项 \option{line-align} 可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码相连。
-  \keybool{hang}\Default{false}
-  悬挂缩进选项 \option{hang} 使目录标题为悬挂缩进形式,缩进距离为编号及其与标题间距的长度,但此时目录编号会失去超链接。
-  \keyval-{numsep-all}{刚性长度}\Default{1em}
-  统一设置所有级别有编号的标题在目录中编号与标题的间距。
-  \keyval-{indent-all}{刚性长度}
+  引导线选项 \option{line-align} 可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。
+  \keyval-{tocafter-all}{距离命令}\Default{\cs*{hspace}\Carg{1em}}
+  统一设置所有级别在目录中标签与标题间的代码。
+  \keyval-{tocindent-all}{刚性长度}
   统一设置所有级别的目录标题左边缩进。
-  \keyval-{rule-all}{目录引导线样式}
+  \keyval-{tocrule-all}{目录引导线样式}
   统一设置所有级别的目录引导线样式。
 \end{options}
 
@@ -981,6 +999,8 @@
   标题编号输出选项 \option{number} 为短编号形式,应当包含 \code{A}、\code{a}、\code{I}、\code{i}、或 \code{1} 其中一个符号。
   \keyval-{numsep}{编号与标题的间距}\Default{0.5em}
   习题标题编号与后方标题文本的间距,习题环境使用星号参数时无效。
+  \keyval-{tocnumsep}{目录编号与标题的间距}\Default{1em}
+  目录中习题标题编号与后方标题文本的间距,习题环境使用星号参数时无效。
   \keyval-{tcolorbox}{键值列表2}
   局部传递 \pkg*{tcolorbox} 宏包的格式选项给习题标题(如果存在)。
   \keyval-{enumitem}{键值列表3}
@@ -1215,7 +1235,6 @@
 \end{commands}
 
 \appendix
-\clearpage
 \nocite{*}
 
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-10-25 23:48:39 UTC (rev 60871)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-10-26 21:27:55 UTC (rev 60872)
@@ -15,7 +15,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/10/25}{1.40C}
+\ProvidesExplClass{easybook}{2021/10/25}{1.40E}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -325,7 +325,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/10/25}{1.40C}
+\ProvidesExplPackage{easybase}{2021/10/25}{1.40E}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1207,6 +1207,10 @@
 \seq_put_right:Nn \c__ctex_headings_seq { table }
 \seq_put_right:Nn \c__ctex_headings_seq { lstlisting }
 \seq_remove_duplicates:N \c__ctex_headings_seq
+\ctex_define:n { lstlisting/#1 .meta:nn = { ctex/#1 } {##1} }
+\ctex_define:n { figure/#1 .meta:nn = { ctex/#1 } {##1} }
+\ctex_define:n { table/#1 .meta:nn = { ctex/#1 } {##1} }
+\ctex_define:n { list/#1 .meta:nn = { ctex/#1 } {##1} }
 \cs_new_protected:Npn \eb_titletoc_hang_fix:n #1
   {
     \bool_if:NT \eb at titletoc@hang at fix@bool
@@ -1216,24 +1220,22 @@
             \bool_if:NT \l__eb_toc_number_color_bool
               { \color{ctex at toc@number} }
             \thecontentslabel
-            \hspace{\use:c { eb at toc@#1 at numsep }}
+            \tl_use:c { l__eb_toc_#1_after_tl }
           }
       }
   }
 \cs_new_protected:Npn \eb_toc_assign_keys:n #1
   {
-    \ctex_define:n { tocset/#1 .meta:nn = { ctex/tocset/#1 } {##1} }
-    \ctex_define:nn { tocset }
+    \ctex_define:n
       {
-        #1/format .tl_set:c   = l__eb_toc_#1_format_tl,
-        #1/format+ .code:n    =
+        #1/tocformat .tl_set:c  = l__eb_toc_#1_format_tl,
+        #1/tocformat+ .code:n   =
           { \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
-        #1/format~+ .code:n   =
+        #1/tocformat~+ .code:n  =
           { \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
-        #1/indent .dim_set:c  = l__eb_toc_#1_indent_dim,
-        #1/rule .tl_set:c     = l__eb_toc_#1_rule_tl,
-        #1/numsep .dim_set:c  = eb at toc@#1 at numsep,
-        #1/unknown .code:n    = \eb_msg_unknown_option:n { tocset }
+        #1/tocindent .dim_set:c = l__eb_toc_#1_indent_dim,
+        #1/tocrule .tl_set:c    = l__eb_toc_#1_rule_tl,
+        #1/tocafter .tl_set:c   = l__eb_toc_#1_after_tl
       }
     \titlecontents{#1}
       [\dim_use:c { l__eb_toc_#1_indent_dim }]
@@ -1243,11 +1245,10 @@
   }
 \seq_map_function:NN
 \c__ctex_headings_seq \eb_toc_assign_keys:n
-\ctex_define:n { tocset/list .meta:nn = { ctex/tocset/list } {#1} }
 \eb_clist_map_inline:nn
   { figure,table,lstlisting }
   {
-    \ctex_define:nn { tocset }
+    \ctex_define:n
       {
         #1/voffset .skip_set:c  = l__eb_toc_#1_voffset_skip,
         #1/tocline .cs_set:cp   = { eb at toc@label@#1 } ##1,
@@ -1254,9 +1255,13 @@
       }
   }
 \eb_clist_map_inline:nn
-  { format,format+,format~+,indent,rule,numsep,voffset,tocline }
   {
-    \ctex_define:nn { tocset }
+    tocformat,tocformat+,tocformat~+,
+    tocindent,tocrule,tocline,
+    voffset,tocafter
+  }
+  {
+    \ctex_define:n
       {
         list/#1 .meta:n   =
           {
@@ -1267,59 +1272,39 @@
       }
   }
 \eb_clist_map_inline:nn
-  { numsep,indent,rule }
+  { tocafter,tocindent,tocrule }
   {
     \ctex_define:nn { tocset }
       {
-        #1-all .meta:n    =
+        #1-all .code:n        =
           {
-            part/#1       = ##1,
-            chapter/#1    = ##1,
-            section/#1    = ##1,
-            subsection/#1 = ##1,
-            list/#1       = ##1
+            \ctex_set:n
+              {
+                part/#1       = ##1,
+                chapter/#1    = ##1,
+                section/#1    = ##1,
+                subsection/#1 = ##1,
+                list/#1       = ##1
+              }
           }
       }
   }
 
-\cs_set_eq:NN \ctexnumberline \CTEXnumberline
-\cs_set:Npn \CTEXnumberline #1
-  {
-    \CTEXifname
-      {
-        \bool_if:NTF \eb at titletoc@hang at fix@bool
-          { \eb at numberline{\use:c { CTEXthe#1 }} }
-          {
-            \use:c { CTEXthe#1 }
-            \hspace{\use:c { eb at toc@#1 at numsep }}
-          }
-      }{}
-  }
-\cs_new:Npn \eb at numberline { \protect\numberline }
-\cs_set_eq:NN \EBNumberLine \CTEXnumberline
 \ctex_define:nn { tocset }
   {
-    lolskip .skip_set:N     = \eb at toc@lolskip,
-    lolskip .initial:n      = 10pt,
-    tocvoffset .skip_set:N  = \l__eb_toc_voffset_skip,
-    tocvoffset .initial:n   =
+    lolskip .skip_set:N       = \eb at toc@lolskip,
+    lolskip .initial:n        = 10pt,
+    main-voffset .skip_set:N  = \l__eb_toc_main_voffset_skip,
+    main-voffset .initial:n   =
       { \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.35pc } },
-    line-align .bool_set:N  = \l__eb_toc_line_align_bool,
-    line-align .default:n   = true,
-    line-align .initial:n   = true,
-    hang .bool_set:N        = \eb at titletoc@hang at fix@bool,
-    hang .default:n         = true,
-    hang .initial:n         = false,
+    line-align .bool_set:N    = \l__eb_toc_line_align_bool,
+    line-align .default:n     = true,
+    line-align .initial:n     = true,
+    hang .bool_set:N          = \eb at titletoc@hang at fix@bool,
+    hang .default:n           = true,
+    hang .initial:n           = false,
     unknown .code:n = \eb_msg_unknown_option:n { tocset }
   }
-\ctex_set:n
-  {
-    part/tocline        = \CTEXnumberline{#1}#2,
-    chapter/tocline     = \CTEXnumberline{#1}#2,
-    section/tocline     = \CTEXnumberline{#1}#2,
-    subsection/tocline  = \CTEXnumberline{#1}#2
-  }
-
 \NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}}
   {
     \normalsize\normalfont
@@ -1334,62 +1319,69 @@
           }
       }
   }
-\ctex_set:nn { tocset }
+\cs_set_eq:NN \ctexnumberline \CTEXnumberline
+\cs_new:Npn \eb at numberline { \protect\numberline }
+\cs_set:Npn \CTEXnumberline #1
   {
-    part/format         = \addvspace{1pc}\sffamily\large,
-    part/indent         = 0em,
-    part/rule           = \tocrule{}[\bfseries],
+    \CTEXifname
+      {
+        \bool_if:NTF \eb at titletoc@hang at fix@bool
+          { \eb at numberline{\use:c { CTEXthe#1 }} }
+          {
+            \use:c { CTEXthe#1 }
+            \tl_use:c { l__eb_toc_#1_after_tl }
+          }
+      }{}
+  }
+\cs_new:Npn \listnumberline #1
+  {
+    \use:c { #1name }~\use:c { the#1 }
+    \bool_if:NF \eb at titletoc@hang at fix@bool
+      { \tl_use:c { l__eb_toc_#1_after_tl } }
+  }
+\ctex_set:n
+  {
+    part/tocformat        = \addvspace{1pc}\sffamily\large,
+    part/tocindent        = 0em,
+    part/tocrule          = \tocrule{}[\bfseries],
+    part/tocline          = \CTEXnumberline{#1}#2,
 
-    chapter/format      = \addvspace{1pc}\sffamily\large,
-    chapter/indent      = 0em,
-    chapter/rule        = \tocrule{$\cdot$}[\bfseries],
+    chapter/tocformat     = \addvspace{1pc}\sffamily\large,
+    chapter/tocindent     = 0em,
+    chapter/tocrule       = \tocrule{$\cdot$}[\bfseries],
+    chapter/tocline       = \CTEXnumberline{#1}#2,
 
-    section/format      =
+    section/tocformat     =
       {
         \addvspace{0.35pc}
         \bool_if:NF \l__eb_class_book_bool { \sffamily }
       },
-    section/indent      =
+    section/tocindent     =
       { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
-    section/rule        =
+    section/tocrule       =
       {
         \bool_if:NTF \l__eb_class_book_bool
           { \tocrule{$\cdot$} }
           { \tocrule{$\cdot$}[\bfseries] }
       },
+    section/tocline       = \CTEXnumberline{#1}#2,
 
-    subsection/format   = \addvspace{0.35pc},
-    subsection/indent   =
+    subsection/tocformat  = \addvspace{0.35pc},
+    subsection/tocindent  =
       { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
-    subsection/rule     = \tocrule{$\cdot$},
+    subsection/tocrule    = \tocrule{$\cdot$},
+    subsection/tocline    = \CTEXnumberline{#1}#2,
 
-    list/format         = \addvspace{0.2pc},
-    list/indent         = 0em,
-    list/rule           = \tocrule{$\cdot$},
-    list/voffset        =
+    list/tocformat        = \addvspace{0.2pc},
+    list/tocindent        = 0em,
+    list/tocrule          = \tocrule{$\cdot$},
+    list/voffset          =
       { 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt } },
-
-    figure/tocline      =
-      {
-        \figurename~#1
-        \bool_if:NF \eb at titletoc@hang at fix@bool
-          { \hspace{\eb at toc@figure at numsep} }
-      },
-    table/tocline       =
-      {
-        \tablename~#1
-        \bool_if:NF \eb at titletoc@hang at fix@bool
-          { \hspace{\eb at toc@table at numsep} }
-      },
-    lstlisting/tocline  =
-      {
-        \lstlistingname~\thelstlisting
-        \bool_if:NF \eb at titletoc@hang at fix@bool
-          { \hspace{\eb at toc@lstlisting at numsep} }
-      },
-    numsep-all          = 1em
+    table/tocline         = \listnumberline{table},
+    figure/tocline        = \listnumberline{figure},
+    lstlisting/tocline    = \listnumberline{lstlisting}
   }
-
+\ctex_set:nn { tocset } { tocafter-all = \hspace{1em} }
 \prop_new:N \l__eb_list_label_name_prop
 \prop_set_from_keyval:Nn \l__eb_list_label_name_prop
   {
@@ -1649,12 +1641,12 @@
     \tl_set:Nn \eb at bitoc@title { Contents }
     \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}}
     \eb_title_mark_notoc:n { \eb at toc@title }
-    \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
+    \vspace*{-\dim_use:N \l__eb_toc_main_voffset_skip}
     \eb_toc_start_multi_column_ext:n { toc }#3
     \IfBooleanT{#1}
       {
         \eb_title_mark_notoc:n { \eb at bitoc@title }
-        \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
+        \vspace*{-\dim_use:N \l__eb_toc_main_voffset_skip}
         \eb_toc_start_multi_column_ext:n { tec }
       }
     \group_end:
@@ -2120,17 +2112,19 @@
 
 \keys_define:nn { eb/exercise }
   {
-    color .tl_set:N   = \eb at tc@background at color,
-    color .initial:n  = DeepSkyBlue,
-    number .tl_set:N  = \eb at tc@list at number,
-    number .initial:n = { 1. },
-    title .tl_set:N   = \eb at tc@exercise at title,
-    title .initial:n  = \c__eb_name_exercise_tl,
-    numsep .dim_set:N = \eb at toc@exercise at numsep,
-    numsep .initial:n = 0.5em,
-    label .tl_set:N   = \eb at tc@exercise at label,
-    enumitem .code:n  = \setexerlist{#1},
-    tcolorbox .code:n = \addtcbstyle{exercise}{#1}
+    color .tl_set:N       = \eb at tc@background at color,
+    color .initial:n      = DeepSkyBlue,
+    number .tl_set:N      = \eb at tc@list at number,
+    number .initial:n     = { 1. },
+    title .tl_set:N       = \eb at tc@exercise at title,
+    title .initial:n      = \c__eb_name_exercise_tl,
+    numsep .dim_set:N     = \eb at toc@exercise at numsep,
+    numsep .initial:n     = 0.5em,
+    tocnumsep .dim_set:N  = \eb at toc@exertoc at numsep,
+    tocnumsep .initial:n  = 1em,
+    label .tl_set:N       = \eb at tc@exercise at label,
+    enumitem .code:n      = \setexerlist{#1},
+    tcolorbox .code:n     = \addtcbstyle{exercise}{#1}
   }
 \cs_set_protected:Npn \setexercise #1
   { \keys_set:nn { eb/exercise } {#1} }
@@ -2457,7 +2451,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/25}{1.40C}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/25}{1.40E}
   {Customization of tcolorbox for easybook}
 
 \tl_gset:Nn \eb at tc@line at skip { 0.5\baselineskip }
@@ -2555,7 +2549,7 @@
       }
     \addcontentsline{toc}{section}
       {
-        \eb_tcb_toc_counter_numsep:n { section }
+        \eb_tcb_toc_counter_numsep:n { exertoc }
         \eb at tc@exercise at title
       }
   }{}

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-10-25 23:48:39 UTC (rev 60871)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-10-26 21:27:55 UTC (rev 60872)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/10/25}{1.40C}
+\ProvidesExplPackage{easybase}{2021/10/25}{1.40E}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -902,6 +902,10 @@
 \seq_put_right:Nn \c__ctex_headings_seq { table }
 \seq_put_right:Nn \c__ctex_headings_seq { lstlisting }
 \seq_remove_duplicates:N \c__ctex_headings_seq
+\ctex_define:n { lstlisting/#1 .meta:nn = { ctex/#1 } {##1} }
+\ctex_define:n { figure/#1 .meta:nn = { ctex/#1 } {##1} }
+\ctex_define:n { table/#1 .meta:nn = { ctex/#1 } {##1} }
+\ctex_define:n { list/#1 .meta:nn = { ctex/#1 } {##1} }
 \cs_new_protected:Npn \eb_titletoc_hang_fix:n #1
   {
     \bool_if:NT \eb at titletoc@hang at fix@bool
@@ -911,24 +915,22 @@
             \bool_if:NT \l__eb_toc_number_color_bool
               { \color{ctex at toc@number} }
             \thecontentslabel
-            \hspace{\use:c { eb at toc@#1 at numsep }}
+            \tl_use:c { l__eb_toc_#1_after_tl }
           }
       }
   }
 \cs_new_protected:Npn \eb_toc_assign_keys:n #1
   {
-    \ctex_define:n { tocset/#1 .meta:nn = { ctex/tocset/#1 } {##1} }
-    \ctex_define:nn { tocset }
+    \ctex_define:n
       {
-        #1/format .tl_set:c   = l__eb_toc_#1_format_tl,
-        #1/format+ .code:n    =
+        #1/tocformat .tl_set:c  = l__eb_toc_#1_format_tl,
+        #1/tocformat+ .code:n   =
           { \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
-        #1/format~+ .code:n   =
+        #1/tocformat~+ .code:n  =
           { \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
-        #1/indent .dim_set:c  = l__eb_toc_#1_indent_dim,
-        #1/rule .tl_set:c     = l__eb_toc_#1_rule_tl,
-        #1/numsep .dim_set:c  = eb at toc@#1 at numsep,
-        #1/unknown .code:n    = \eb_msg_unknown_option:n { tocset }
+        #1/tocindent .dim_set:c = l__eb_toc_#1_indent_dim,
+        #1/tocrule .tl_set:c    = l__eb_toc_#1_rule_tl,
+        #1/tocafter .tl_set:c   = l__eb_toc_#1_after_tl
       }
     \titlecontents{#1}
       [\dim_use:c { l__eb_toc_#1_indent_dim }]
@@ -938,11 +940,10 @@
   }
 \seq_map_function:NN
 \c__ctex_headings_seq \eb_toc_assign_keys:n
-\ctex_define:n { tocset/list .meta:nn = { ctex/tocset/list } {#1} }
 \eb_clist_map_inline:nn
   { figure,table,lstlisting }
   {
-    \ctex_define:nn { tocset }
+    \ctex_define:n
       {
         #1/voffset .skip_set:c  = l__eb_toc_#1_voffset_skip,
         #1/tocline .cs_set:cp   = { eb at toc@label@#1 } ##1,
@@ -949,9 +950,13 @@
       }
   }
 \eb_clist_map_inline:nn
-  { format,format+,format~+,indent,rule,numsep,voffset,tocline }
   {
-    \ctex_define:nn { tocset }
+    tocformat,tocformat+,tocformat~+,
+    tocindent,tocrule,tocline,
+    voffset,tocafter
+  }
+  {
+    \ctex_define:n
       {
         list/#1 .meta:n   =
           {
@@ -962,59 +967,39 @@
       }
   }
 \eb_clist_map_inline:nn
-  { numsep,indent,rule }
+  { tocafter,tocindent,tocrule }
   {
     \ctex_define:nn { tocset }
       {
-        #1-all .meta:n    =
+        #1-all .code:n        =
           {
-            part/#1       = ##1,
-            chapter/#1    = ##1,
-            section/#1    = ##1,
-            subsection/#1 = ##1,
-            list/#1       = ##1
+            \ctex_set:n
+              {
+                part/#1       = ##1,
+                chapter/#1    = ##1,
+                section/#1    = ##1,
+                subsection/#1 = ##1,
+                list/#1       = ##1
+              }
           }
       }
   }
 
-\cs_set_eq:NN \ctexnumberline \CTEXnumberline
-\cs_set:Npn \CTEXnumberline #1
-  {
-    \CTEXifname
-      {
-        \bool_if:NTF \eb at titletoc@hang at fix@bool
-          { \eb at numberline{\use:c { CTEXthe#1 }} }
-          {
-            \use:c { CTEXthe#1 }
-            \hspace{\use:c { eb at toc@#1 at numsep }}
-          }
-      }{}
-  }
-\cs_new:Npn \eb at numberline { \protect\numberline }
-\cs_set_eq:NN \EBNumberLine \CTEXnumberline
 \ctex_define:nn { tocset }
   {
-    lolskip .skip_set:N     = \eb at toc@lolskip,
-    lolskip .initial:n      = 10pt,
-    tocvoffset .skip_set:N  = \l__eb_toc_voffset_skip,
-    tocvoffset .initial:n   =
+    lolskip .skip_set:N       = \eb at toc@lolskip,
+    lolskip .initial:n        = 10pt,
+    main-voffset .skip_set:N  = \l__eb_toc_main_voffset_skip,
+    main-voffset .initial:n   =
       { \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.35pc } },
-    line-align .bool_set:N  = \l__eb_toc_line_align_bool,
-    line-align .default:n   = true,
-    line-align .initial:n   = true,
-    hang .bool_set:N        = \eb at titletoc@hang at fix@bool,
-    hang .default:n         = true,
-    hang .initial:n         = false,
+    line-align .bool_set:N    = \l__eb_toc_line_align_bool,
+    line-align .default:n     = true,
+    line-align .initial:n     = true,
+    hang .bool_set:N          = \eb at titletoc@hang at fix@bool,
+    hang .default:n           = true,
+    hang .initial:n           = false,
     unknown .code:n = \eb_msg_unknown_option:n { tocset }
   }
-\ctex_set:n
-  {
-    part/tocline        = \CTEXnumberline{#1}#2,
-    chapter/tocline     = \CTEXnumberline{#1}#2,
-    section/tocline     = \CTEXnumberline{#1}#2,
-    subsection/tocline  = \CTEXnumberline{#1}#2
-  }
-
 \NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}}
   {
     \normalsize\normalfont
@@ -1029,62 +1014,69 @@
           }
       }
   }
-\ctex_set:nn { tocset }
+\cs_set_eq:NN \ctexnumberline \CTEXnumberline
+\cs_new:Npn \eb at numberline { \protect\numberline }
+\cs_set:Npn \CTEXnumberline #1
   {
-    part/format         = \addvspace{1pc}\sffamily\large,
-    part/indent         = 0em,
-    part/rule           = \tocrule{}[\bfseries],
+    \CTEXifname
+      {
+        \bool_if:NTF \eb at titletoc@hang at fix@bool
+          { \eb at numberline{\use:c { CTEXthe#1 }} }
+          {
+            \use:c { CTEXthe#1 }
+            \tl_use:c { l__eb_toc_#1_after_tl }
+          }
+      }{}
+  }
+\cs_new:Npn \listnumberline #1
+  {
+    \use:c { #1name }~\use:c { the#1 }
+    \bool_if:NF \eb at titletoc@hang at fix@bool
+      { \tl_use:c { l__eb_toc_#1_after_tl } }
+  }
+\ctex_set:n
+  {
+    part/tocformat        = \addvspace{1pc}\sffamily\large,
+    part/tocindent        = 0em,
+    part/tocrule          = \tocrule{}[\bfseries],
+    part/tocline          = \CTEXnumberline{#1}#2,
 
-    chapter/format      = \addvspace{1pc}\sffamily\large,
-    chapter/indent      = 0em,
-    chapter/rule        = \tocrule{$\cdot$}[\bfseries],
+    chapter/tocformat     = \addvspace{1pc}\sffamily\large,
+    chapter/tocindent     = 0em,
+    chapter/tocrule       = \tocrule{$\cdot$}[\bfseries],
+    chapter/tocline       = \CTEXnumberline{#1}#2,
 
-    section/format      =
+    section/tocformat     =
       {
         \addvspace{0.35pc}
         \bool_if:NF \l__eb_class_book_bool { \sffamily }
       },
-    section/indent      =
+    section/tocindent     =
       { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
-    section/rule        =
+    section/tocrule       =
       {
         \bool_if:NTF \l__eb_class_book_bool
           { \tocrule{$\cdot$} }
           { \tocrule{$\cdot$}[\bfseries] }
       },
+    section/tocline       = \CTEXnumberline{#1}#2,
 
-    subsection/format   = \addvspace{0.35pc},
-    subsection/indent   =
+    subsection/tocformat  = \addvspace{0.35pc},
+    subsection/tocindent  =
       { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
-    subsection/rule     = \tocrule{$\cdot$},
+    subsection/tocrule    = \tocrule{$\cdot$},
+    subsection/tocline    = \CTEXnumberline{#1}#2,
 
-    list/format         = \addvspace{0.2pc},
-    list/indent         = 0em,
-    list/rule           = \tocrule{$\cdot$},
-    list/voffset        =
+    list/tocformat        = \addvspace{0.2pc},
+    list/tocindent        = 0em,
+    list/tocrule          = \tocrule{$\cdot$},
+    list/voffset          =
       { 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt } },
-
-    figure/tocline      =
-      {
-        \figurename~#1
-        \bool_if:NF \eb at titletoc@hang at fix@bool
-          { \hspace{\eb at toc@figure at numsep} }
-      },
-    table/tocline       =
-      {
-        \tablename~#1
-        \bool_if:NF \eb at titletoc@hang at fix@bool
-          { \hspace{\eb at toc@table at numsep} }
-      },
-    lstlisting/tocline  =
-      {
-        \lstlistingname~\thelstlisting
-        \bool_if:NF \eb at titletoc@hang at fix@bool
-          { \hspace{\eb at toc@lstlisting at numsep} }
-      },
-    numsep-all          = 1em
+    table/tocline         = \listnumberline{table},
+    figure/tocline        = \listnumberline{figure},
+    lstlisting/tocline    = \listnumberline{lstlisting}
   }
-
+\ctex_set:nn { tocset } { tocafter-all = \hspace{1em} }
 \prop_new:N \l__eb_list_label_name_prop
 \prop_set_from_keyval:Nn \l__eb_list_label_name_prop
   {
@@ -1344,12 +1336,12 @@
     \tl_set:Nn \eb at bitoc@title { Contents }
     \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}}
     \eb_title_mark_notoc:n { \eb at toc@title }
-    \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
+    \vspace*{-\dim_use:N \l__eb_toc_main_voffset_skip}
     \eb_toc_start_multi_column_ext:n { toc }#3
     \IfBooleanT{#1}
       {
         \eb_title_mark_notoc:n { \eb at bitoc@title }
-        \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
+        \vspace*{-\dim_use:N \l__eb_toc_main_voffset_skip}
         \eb_toc_start_multi_column_ext:n { tec }
       }
     \group_end:
@@ -1815,17 +1807,19 @@
 
 \keys_define:nn { eb/exercise }
   {
-    color .tl_set:N   = \eb at tc@background at color,
-    color .initial:n  = DeepSkyBlue,
-    number .tl_set:N  = \eb at tc@list at number,
-    number .initial:n = { 1. },
-    title .tl_set:N   = \eb at tc@exercise at title,
-    title .initial:n  = \c__eb_name_exercise_tl,
-    numsep .dim_set:N = \eb at toc@exercise at numsep,
-    numsep .initial:n = 0.5em,
-    label .tl_set:N   = \eb at tc@exercise at label,
-    enumitem .code:n  = \setexerlist{#1},
-    tcolorbox .code:n = \addtcbstyle{exercise}{#1}
+    color .tl_set:N       = \eb at tc@background at color,
+    color .initial:n      = DeepSkyBlue,
+    number .tl_set:N      = \eb at tc@list at number,
+    number .initial:n     = { 1. },
+    title .tl_set:N       = \eb at tc@exercise at title,
+    title .initial:n      = \c__eb_name_exercise_tl,
+    numsep .dim_set:N     = \eb at toc@exercise at numsep,
+    numsep .initial:n     = 0.5em,
+    tocnumsep .dim_set:N  = \eb at toc@exertoc at numsep,
+    tocnumsep .initial:n  = 1em,
+    label .tl_set:N       = \eb at tc@exercise at label,
+    enumitem .code:n      = \setexerlist{#1},
+    tcolorbox .code:n     = \addtcbstyle{exercise}{#1}
   }
 \cs_set_protected:Npn \setexercise #1
   { \keys_set:nn { eb/exercise } {#1} }

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-10-25 23:48:39 UTC (rev 60871)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-10-26 21:27:55 UTC (rev 60872)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/10/25}{1.40C}
+\ProvidesExplClass{easybook}{2021/10/25}{1.40E}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool

Modified: trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2021-10-25 23:48:39 UTC (rev 60871)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2021-10-26 21:27:55 UTC (rev 60872)
@@ -18,7 +18,7 @@
 %% LaTeX version 2005/12/01 or later.
 %% 
 %% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/25}{1.40C}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/25}{1.40E}
   {Customization of tcolorbox for easybook}
 
 \tl_gset:Nn \eb at tc@line at skip { 0.5\baselineskip }
@@ -116,7 +116,7 @@
       }
     \addcontentsline{toc}{section}
       {
-        \eb_tcb_toc_counter_numsep:n { section }
+        \eb_tcb_toc_counter_numsep:n { exertoc }
         \eb at tc@exercise at title
       }
   }{}



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