texlive[61286] Master/texmf-dist: easybook (12dec21)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 12 23:30:08 CET 2021


Revision: 61286
          http://tug.org/svn/texlive?view=revision&revision=61286
Author:   karl
Date:     2021-12-12 23:30:08 +0100 (Sun, 12 Dec 2021)
Log Message:
-----------
easybook (12dec21)

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-12-12 22:29:51 UTC (rev 61285)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex	2021-12-12 22:30:08 UTC (rev 61286)
@@ -20,8 +20,8 @@
     name            = easybook,
     color-scheme    = blue,
     title           = EASYBOOK 使用手册,
-    version         = v1.41P,
-    date            = 2021/12/11,
+    version         = v1.41Q,
+    date            = 2021/12/12,
     authors         = 瞿毅,
     info            = 排版简体中文学位论文和书籍,
     email           = q1jx at foxmail.com,
@@ -130,6 +130,10 @@
       }
   }
 \makeatother\ExplSyntaxOff
+\labelformat{section}{节 #1}
+\labelformat{subsection}{小节 #1}
+\labelformat{subsubsection}{小节 #1}
+\labelformat{ctexexam}{例 #1}
 
 \begin{document}
 
@@ -157,7 +161,7 @@
   \end{document}
 \end{frameverb}
 
-或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类,包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。它的宏包选项共享文档类选项的一部分,支持的选项见节 \ref{sec:document class options}。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。
+或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类,包含了\ref{sec:interface options} 所示各个模块接口命令的功能。它的宏包选项共享文档类选项的一部分,支持的选项见\ref{sec:document class options}。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。
 \begin{frameverb}
   \documentclass[文档类选项]{ctexbook}
 
@@ -208,10 +212,10 @@
 
 \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 文档类的选项。
+文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见\ref{subsec:basic usage} 的例子。目前 \pkg*{easybase} 宏包可用的选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage}。除了下面列举的选项以外,还支持标准和 C\TeX 文档类的选项。
 \begin{options}
   \opt{draft}\Default!
-  开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见小节 \ref{subsec:box}。
+  开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见\ref{subsec:box}。
   \opt{newline}\Default!
   部分和章标题的样式为另起一行,符合一般英文书籍的习惯。
   \keychoice{scheme}{chinese,plain}\Default{chinese}
@@ -270,7 +274,7 @@
 \subsection{article 模式}
 \begin{options}
   \keychoice{class}{book,article}\Default{book}
-  使用 \cls*{easybook} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \code{article} 会变为 \code{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令。此时节 \ref{sec:document command} 中目录命令的 \option{chapter} 选项会失效,将以 \code{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。
+  使用 \cls*{easybook} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \code{article} 会变为 \code{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令。此时\ref{sec:document command} 中目录命令的 \option{chapter} 选项会失效,将以 \code{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。
   \opt{book}\Default!
   开启 \cls*{book} 书籍模式,与 \keyis*-{class}{book} 等效。
   \opt{article}\Default!
@@ -352,7 +356,7 @@
 \end{commands}
 
 \subsection{上标和下标}
-上标和下标的功能来自 \pkg*{spbmark} 宏包,下面三个命令可以用于输出上标和下标。它们根据当前处于文本还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
+上标和下标的功能来自 \pkg*{spbmark} 宏包,下面三个命令可以用于输出上标和下标。它们根据当前处于文本还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见\ref{subsubsec:super-sub-script}。
 \begin{commands}
   \command{super}[\sarg\oarg{垂直偏移}\splitoarg{高度,深度}\darg{格式代码}\marg{内容}\oarg{水平偏移}]
   上标命令,与简短命令 \cs{sp} 等效。水平和垂直偏移进行距离微调,可以为带有长度单位的正值或负值,为正值时代表向上或向右移动,否则相反,默认均为 \code{0pt}。\meta{格式代码} 可以插入字体或颜色等命令,代码中的最后一个命令可以接受一个为上标或下标的参数。
@@ -380,7 +384,7 @@
   thmset & geoset & hdrset & tocset &
   }
 
-  例如使用下面小节 \ref{subsec:style} 介绍的风格 \module*{style} 模块,路径名与所属下级选项之间可以 \code{/} 或 \code{=} 号分开,斜线 \code{/} 后不能有空格或者换行:
+  例如使用下面\ref{subsec:style} 介绍的风格 \module*{style} 模块,路径名与所属下级选项之间可以 \code{/} 或 \code{=} 号分开,斜线 \code{/} 后不能有空格或者换行:
   \begin{ctexexam}
   \ctexset
     {
@@ -404,12 +408,12 @@
   预置了四种颜色主题,默认主题 \code{none} 为黑白页面,颜色主题不包括超链接。
   \begin{commands}
   \command{DeclareThemeColor}[\splitmarg{风格名称,ctex at frame,ctex at emph,ctex at verb}]
-  可以使用 \cs{DeclareThemeColor} 命令声明新的颜色主题,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成颜色主题。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
+  可以使用 \cs{DeclareThemeColor} 命令声明新的颜色主题,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成颜色主题。类似地更改超链接颜色见\ref{subsec:hyperlinks}。
   \end{commands}
   \keyval-{color-every}{HTML颜色代码}\Default
   统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
   \keyval-{multoc}{整数}\Default{2}
-  使目录多栏排版,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
+  使目录多栏排版,与\ref{sec:document command} 中目录命令的同名选项有相同效果。
   \keybool{withpart}\Default{false}
   使章标题跟随每一部分编号,开启新的一部分时章编号从 1 开始,默认不跟随。
   \keychoice{footwith}{part,chapter,page}\Default{chapter}
@@ -563,7 +567,7 @@
 \subsubsection{配置参考文献}
 \begin{commands}
   \command{printbibliography}[\oarg{键值列表}]
-  两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下:
+  两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与\ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下:
   \begin{options}
   \keychoice*{heading}{bibliography,subbibliography,bibintoc,subbibintoc}\Default{bibintoc}
   参考文献通常有一个章标题或者节标题,该选项选择由 \cs*{defbibheading} 定义的标题名。
@@ -590,7 +594,7 @@
 
 \subsection{定理样式}
 \label{subsec:theorem of style}
-文档类已预置 12 个定理环境,环境名及对应的定理名见小节 \ref{subsec:theorem},它们均使用预置的定理样式 \code{eb-theorem}。下面 \module*{thmset} 模块选项的用法名称与 \pkg*{thmtools} 宏包基本一致,且仅对预置定理样式生效。如果下面的选项不满足需求,可使用支持完整选项的相关命令创建定理环境。
+文档类已预置 12 个定理环境,环境名及对应的定理名见\ref{subsec:theorem},它们均使用预置的定理样式 \code{eb-theorem}。下面 \module*{thmset} 模块选项的用法名称与 \pkg*{thmtools} 宏包基本一致,且仅对预置定理样式生效。如果下面的选项不满足需求,可使用支持完整选项的相关命令创建定理环境。
 \begin{options}
   \keybool{thmframe}\Module{thmset}\Default{false}
   给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。注意它应当在定理声明命令前使用。\pkg*{thmtools} 具有类似的选项 \option*{thmbox}。
@@ -633,7 +637,7 @@
   选项的值为使用 \cs{declaretheoremstyle} 命令新定义的定理样式。
   \end{options}
 
-  使用 \cs{declaretheorem} 命令以例 \ref{exam:new theorem sty} 中的定理样式 \code{mythm} 新建一个定理环境猜想,这个命令新建的环境如果需要盒子边框可以手动添加:
+  使用 \cs{declaretheorem} 命令以\ref{exam:new theorem sty} 中的定理样式 \code{mythm} 新建一个定理环境猜想,这个命令新建的环境如果需要盒子边框可以手动添加:
   \begin{ctexexam}[labelref = exam:new theorem env]
   \declaretheorem[style = mythm,name = 猜想]{caixiang}
   \tcolorboxenvironment{caixiang}{tc-theorem}
@@ -648,7 +652,7 @@
   \item 新建定理环境默认使用的 \meta{定理样式} 为 \code{eb-theorem},而不是 \pkg*{thmtools} 的默认样式。
   \end{itemize}
 
-  下面新建一个与例 \ref{exam:new theorem env} 相同的定理环境猜想,并使用 \cs{addtotcbstyle} 命令调整 \option{thmframe} 开启时默认的盒子风格。它的第一个参数为 \code{tc-theorem},关于命令的介绍在小节 \ref{subsec:box}。
+  下面新建一个与\ref{exam:new theorem env} 相同的定理环境猜想,并使用 \cs{addtotcbstyle} 命令调整 \option{thmframe} 开启时默认的盒子风格。它的第一个参数为 \code{tc-theorem},关于命令的介绍在\ref{subsec:box}。
   \begin{ctexexam}
   \deftheorem{caixiang}{猜想}[style = mythm]
   \addtotcbstyle{tc-theorem}{colback = GreenYellow}
@@ -795,7 +799,7 @@
     }
   \end{ctexexam}
   \keychoice{fncust-form}{format code,match}\Default
-  单独设定自定义脚注标记的格式,\code{match} 可以匹配 \option*{super-format} 全局的值。自定义脚注的命令与用法见小节 \ref{subsubsec:custom footnotes}。
+  单独设定自定义脚注标记的格式,\code{match} 可以匹配 \option*{super-format} 全局的值。自定义脚注的命令与用法见\ref{subsubsec:custom footnotes}。
   \keychoice{fnboth-form}{format code,match}\Default
   同时设定默认脚注标记 \option{fnmate-form} 和自定义脚注标记 \option{fncust-form} 的格式。两种脚注标记匹配上标格式 \option*{super-format} 的值是独立的,使用 \code{match} 则可以同时匹配。标记格式选项含有字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注标记。
   \keyval-{fnpara-form}{格式代码}\Default
@@ -826,12 +830,12 @@
   \keyval-{tocafter}{距离命令}\Default{\cs*{hspace}\Carg{1em}}
   在各级别目录中标签与标题间的代码,默认为插入 \code{1em} 横向距离。
   \keyval-{tocline}{目录标签}
-  这个选项扩展了图片、表格或代码的目录标签。选项中参数 \code{\#1} 代表相应题注编号 \cs*{the}\meta{计数器} 的值。选项还可包含标签名称,默认标签名称与对应题注名称一致。
-  \begin{ctexexam}
+  这个选项扩展了图片、表格或代码加入目录的题注。选项中参数 \code{\#1} 代表相应题注编号 \cs*{the}\meta{计数器} 的值,参数 \code{\#2} 代表相应题注内容。
+  \begin{ctexexam}[labelref = exam:list command usage]
   \ctexset
     {
-      figure/tocline      = 图 #1\hspace{1em},
-      lstlisting/tocline  = 代码 #1\hspace{1em}
+      figure/tocline      = \listnumberline{figure}#2,
+      lstlisting/tocline  = \protect\numberline{代码 #1\hspace{1em}}#2
     }
   \end{ctexexam}
 \end{options}
@@ -840,7 +844,9 @@
   \command{tocrule}[\sarg\harg\oarg{引导点间距}\darg{放大因子}\marg{引导点}\oarg{页码格式}]
   目录命令 \cs{tocrule} 生成目录引导线,需要在引导线选项 \option{tocrule} 中使用。带有星号的命令会使当前级别的目录引导线右端与页码相连而不是对齐。带有 \harg{} 号的命令不添加引导线后的目录页码。\meta{引导点间距} 需带有长度单位,\meta{放大因子} 不带单位,为 \meta{引导点} 的放大倍数,\meta{引导点} 一般为英文句号或 \cs*{cdot} 中心点符号。\meta{页码格式} 的代码位于页码前面,可以设置页码字体和距离等,最后一个命令可以带有一个参数,这个参数为页码编号。
   \command*{CTEXnumberline}[\marg{编号级别}]
-  目录命令 \cs*{CTEXnumberline} 用于在 C\TeX 文档类的 \option*{tocline} 选项中设置目录的标签,它已经被重新定义,使得目录标签后代码选项 \option{tocafter} 仍然有效。\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} 代替一般不变。
+  \command{listnumberline}[\marg{编号级别}]
+  这个命令用于设置图片、表格或代码的目录标签,默认包含与题注名相同的目录标签名。其中 \meta{编号级别} 需要显示指定,即为 \code{figure}、\code{table} 或 \code{lstlisting}。关于命令的用法可见\ref{exam:list command usage}。
   \begin{ctexexam}
   \ctexset
     {
@@ -954,7 +960,7 @@
   \environment{remark}\default{}
   \environment{conjecture}\default{}
   \environment{problem}
-  这些是预置的定理环境,可使用选项 \option{thmframe} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下:
+  这些是预置的定理环境,可使用选项 \option{thmframe} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见\ref{subsec:theorem of style}。环境名与之对应的定理名如下:
   \insertblr
   {
     colspec = @{}*{6}{c}@{},
@@ -1060,7 +1066,7 @@
 
 \subsection{盒子}
 \label{subsec:box}
-使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg*{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。
+使用盒子以及\ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg*{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。
 \begin{commands}
   \command{deftcbstyle}[\marg{盒子风格}\marg{键值列表}]
   新建或重置一个名称为 \meta{盒子风格} 的 \pkg*{tcolorbox} 宏包盒子风格,可以与 \cs{addtotcbstyle} 命令联用。
@@ -1242,7 +1248,7 @@
   \command*{makeindex}[\oarg{键值列表}]
   使用 \cs*{makeindex} 命令开启索引收集。这个命令可以重复使用打印多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表就没必要再使用。
   \command{printindex}[\sarg\parg\oarg{键值列表}\darg{索引名}]
-  现在索引表生成命令 \cs{printindex} 被重新定义,\meta{键值列表} 中的选项与节 \ref{sec:document command} 其它目录命令相同,但是原本接口命令 \cs*{indexsetup} 的部分选项失效。
+  现在索引表生成命令 \cs{printindex} 被重新定义,\meta{键值列表} 中的选项与\ref{sec:document command} 其它目录命令相同,但是原本接口命令 \cs*{indexsetup} 的部分选项失效。
 \end{commands}
 
 \subsubsection{自定义脚注}

Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-12-12 22:29:51 UTC (rev 61285)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-12-12 22:30:08 UTC (rev 61286)
@@ -15,7 +15,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/12/11}{1.41P}
+\ProvidesExplClass{easybook}{2021/12/12}{1.41Q}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -309,7 +309,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/12/11}{1.41P}
+\ProvidesExplPackage{easybase}{2021/12/12}{1.41Q}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1197,7 +1197,7 @@
 \ctex_define:n { list/#1 .meta:nn = { ctex/#1 } {##1} }
 \cs_new_protected:Npn \eb_titletoc_if_hang_fix:n #1
   {
-    \bool_if:NT \eb at titletoc@hang at fix@bool
+    \bool_if:NT \l__eb_titletoc_hang_fix_bool
       {
         \contentspush
           {
@@ -1233,7 +1233,7 @@
     \ctex_define:n
       {
         #1/between .tl_set:c  = l__eb_toc_#1_between_hook_tl,
-        #1/tocline .cs_set:cp = { eb at toc@label@#1 } ##1,
+        #1/tocline .cs_set:cp = { eb at tocline@#1 } ##1##2,
       }
   }
 \eb_seq_map_inline:nn
@@ -1282,7 +1282,7 @@
     dotalign .bool_set:N  = \l__eb_toc_dot_align_bool,
     dotalign .default:n   = true,
     dotalign .initial:n   = true,
-    hang .bool_set:N      = \eb at titletoc@hang at fix@bool,
+    hang .bool_set:N      = \l__eb_titletoc_hang_fix_bool,
     hang .default:n       = true,
     hang .initial:n       = false,
     pagenumwd .code:n     = \contentsmargin{#1},
@@ -1312,7 +1312,7 @@
   {
     \CTEXifname
       {
-        \bool_if:NTF \eb at titletoc@hang at fix@bool
+        \bool_if:NTF \l__eb_titletoc_hang_fix_bool
           { \p at numberline{\use:c { CTEXthe#1 }} }
           {
             \use:c { CTEXthe#1 }
@@ -1322,9 +1322,12 @@
   }
 \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 } }
+    \bool_if:NTF \l__eb_titletoc_hang_fix_bool 
+      { \p at numberline{\use:c { #1name }~\use:c { the#1 }} }
+      {
+        \use:c { #1name }~\use:c { the#1 }
+        \tl_use:c { l__eb_toc_#1_after_tl }
+      }
   }
 \ctex_set:n
   {
@@ -1357,28 +1360,22 @@
     list/tocindent        = 0em,
     list/tocrule          = \tocrule{$\cdot$},
     list/between = \vspace*{-0.2pc\bool_if:NT \l__eb_class_mode_book_bool { - 10pt }},
-    table/tocline         = \listnumberline{table},
-    figure/tocline        = \listnumberline{figure},
-    lstlisting/tocline    = \listnumberline{lstlisting}
+    table/tocline         = \listnumberline{table}#2,
+    figure/tocline        = \listnumberline{figure}#2,
+    lstlisting/tocline    = \listnumberline{lstlisting}#2
   }
 \ctex_set:nn { tocset } { tocafter-every = \hspace{1em} }
 \prop_new:N \l__eb_list_label_entry_prop
 \prop_set_from_keyval:Nn \l__eb_list_label_entry_prop
   {
-    figure  = \eb at toc@label at figure,
-    table   = \eb at toc@label at table
+    figure  = \eb at tocline@figure,
+    table   = \eb at tocline@table
   }
 \cs_gset:Npn \caption@@@addcontentsline #1#2#3#4
   {
     \addcontentsline{#1}{#2}
-      {
-        \bool_if:NT \eb at titletoc@hang at fix@bool { \p at numberline }
-        \bgroup
-        \prop_item:Nn \l__eb_list_label_entry_prop {#2}{#3}
-        \egroup #4
-      }
+      {\prop_item:Nn \l__eb_list_label_entry_prop {#2}{#3}{#4}}
   }
-\cs_set_eq:NN \eb at if@boolT \bool_if:NT
 \ctex_patch_cmd:Nnn \lst at MakeCaption
   {
     \addcontentsline{lol}{lstlisting}
@@ -1386,13 +1383,7 @@
   }
   {
     \addcontentsline{lol}{lstlisting}
-      {
-        \eb at if@boolT\eb at titletoc@hang at fix@bool{\p at numberline}
-        \bgroup
-        \eb at toc@label at lstlisting{\thelstlisting}
-        \egroup
-        \lst@@caption
-      }
+      {\eb at tocline@lstlisting{\thelstlisting}{\lst@@caption}}
   }
 
 \newcounter{bichapter}
@@ -1863,8 +1854,8 @@
 \setlist[itemize,2]{label = endash}
 \setlist[itemize,3]{label = asterisk}
 \setlist[enumerate,1]{label = arabic,ref = \arabic*}
-\setlist[enumerate,2]{label = alph,ref = enumii,labelwidth = *}
-\setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
+\setlist[enumerate,2]{label = alph,ref = enumii}
+\setlist[enumerate,3]{label = roman,ref = enumiii}
 \setlist[description]{font = sf,labelwidth = *,leftmargin = 2em}
 \newlist{eb at outline@list}{itemize}{1}
 \newlist{eb at exercise@list}{enumerate}{2}
@@ -2439,7 +2430,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/11}{1.41P}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/12}{1.41Q}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \setexercise #1

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-12-12 22:29:51 UTC (rev 61285)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-12-12 22:30:08 UTC (rev 61286)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/12/11}{1.41P}
+\ProvidesExplPackage{easybase}{2021/12/12}{1.41Q}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -908,7 +908,7 @@
 \ctex_define:n { list/#1 .meta:nn = { ctex/#1 } {##1} }
 \cs_new_protected:Npn \eb_titletoc_if_hang_fix:n #1
   {
-    \bool_if:NT \eb at titletoc@hang at fix@bool
+    \bool_if:NT \l__eb_titletoc_hang_fix_bool
       {
         \contentspush
           {
@@ -944,7 +944,7 @@
     \ctex_define:n
       {
         #1/between .tl_set:c  = l__eb_toc_#1_between_hook_tl,
-        #1/tocline .cs_set:cp = { eb at toc@label@#1 } ##1,
+        #1/tocline .cs_set:cp = { eb at tocline@#1 } ##1##2,
       }
   }
 \eb_seq_map_inline:nn
@@ -993,7 +993,7 @@
     dotalign .bool_set:N  = \l__eb_toc_dot_align_bool,
     dotalign .default:n   = true,
     dotalign .initial:n   = true,
-    hang .bool_set:N      = \eb at titletoc@hang at fix@bool,
+    hang .bool_set:N      = \l__eb_titletoc_hang_fix_bool,
     hang .default:n       = true,
     hang .initial:n       = false,
     pagenumwd .code:n     = \contentsmargin{#1},
@@ -1023,7 +1023,7 @@
   {
     \CTEXifname
       {
-        \bool_if:NTF \eb at titletoc@hang at fix@bool
+        \bool_if:NTF \l__eb_titletoc_hang_fix_bool
           { \p at numberline{\use:c { CTEXthe#1 }} }
           {
             \use:c { CTEXthe#1 }
@@ -1033,9 +1033,12 @@
   }
 \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 } }
+    \bool_if:NTF \l__eb_titletoc_hang_fix_bool
+      { \p at numberline{\use:c { #1name }~\use:c { the#1 }} }
+      {
+        \use:c { #1name }~\use:c { the#1 }
+        \tl_use:c { l__eb_toc_#1_after_tl }
+      }
   }
 \ctex_set:n
   {
@@ -1068,28 +1071,22 @@
     list/tocindent        = 0em,
     list/tocrule          = \tocrule{$\cdot$},
     list/between = \vspace*{-0.2pc\bool_if:NT \l__eb_class_mode_book_bool { - 10pt }},
-    table/tocline         = \listnumberline{table},
-    figure/tocline        = \listnumberline{figure},
-    lstlisting/tocline    = \listnumberline{lstlisting}
+    table/tocline         = \listnumberline{table}#2,
+    figure/tocline        = \listnumberline{figure}#2,
+    lstlisting/tocline    = \listnumberline{lstlisting}#2
   }
 \ctex_set:nn { tocset } { tocafter-every = \hspace{1em} }
 \prop_new:N \l__eb_list_label_entry_prop
 \prop_set_from_keyval:Nn \l__eb_list_label_entry_prop
   {
-    figure  = \eb at toc@label at figure,
-    table   = \eb at toc@label at table
+    figure  = \eb at tocline@figure,
+    table   = \eb at tocline@table
   }
 \cs_gset:Npn \caption@@@addcontentsline #1#2#3#4
   {
     \addcontentsline{#1}{#2}
-      {
-        \bool_if:NT \eb at titletoc@hang at fix@bool { \p at numberline }
-        \bgroup
-        \prop_item:Nn \l__eb_list_label_entry_prop {#2}{#3}
-        \egroup #4
-      }
+      {\prop_item:Nn \l__eb_list_label_entry_prop {#2}{#3}{#4}}
   }
-\cs_set_eq:NN \eb at if@boolT \bool_if:NT
 \ctex_patch_cmd:Nnn \lst at MakeCaption
   {
     \addcontentsline{lol}{lstlisting}
@@ -1097,13 +1094,7 @@
   }
   {
     \addcontentsline{lol}{lstlisting}
-      {
-        \eb at if@boolT\eb at titletoc@hang at fix@bool{\p at numberline}
-        \bgroup
-        \eb at toc@label at lstlisting{\thelstlisting}
-        \egroup
-        \lst@@caption
-      }
+      {\eb at tocline@lstlisting{\thelstlisting}{\lst@@caption}}
   }
 
 \newcounter{bichapter}
@@ -1574,8 +1565,8 @@
 \setlist[itemize,2]{label = endash}
 \setlist[itemize,3]{label = asterisk}
 \setlist[enumerate,1]{label = arabic,ref = \arabic*}
-\setlist[enumerate,2]{label = alph,ref = enumii,labelwidth = *}
-\setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
+\setlist[enumerate,2]{label = alph,ref = enumii}
+\setlist[enumerate,3]{label = roman,ref = enumiii}
 \setlist[description]{font = sf,labelwidth = *,leftmargin = 2em}
 \newlist{eb at outline@list}{itemize}{1}
 \newlist{eb at exercise@list}{enumerate}{2}

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-12-12 22:29:51 UTC (rev 61285)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-12-12 22:30:08 UTC (rev 61286)
@@ -20,7 +20,7 @@
 %% This work has the LPPL maintenance status `maintained'.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/12/11}{1.41P}
+\ProvidesExplClass{easybook}{2021/12/12}{1.41Q}
   {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-12-12 22:29:51 UTC (rev 61285)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2021-12-12 22:30:08 UTC (rev 61286)
@@ -18,7 +18,7 @@
 %% LaTeX version 2005/12/01 or later.
 %% 
 %% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/11}{1.41P}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/12}{1.41Q}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \setexercise #1



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