texlive[59493] Master/texmf-dist: easybook (6jun21)

commits+karl at tug.org commits+karl at tug.org
Sun Jun 6 22:50:25 CEST 2021


Revision: 59493
          http://tug.org/svn/texlive?view=revision&revision=59493
Author:   karl
Date:     2021-06-06 22:50:24 +0200 (Sun, 06 Jun 2021)
Log Message:
-----------
easybook (6jun21)

Modified Paths:
--------------
    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/easybase.sty
    trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls

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-06-06 20:50:11 UTC (rev 59492)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-06-06 20:50:24 UTC (rev 59493)
@@ -23,12 +23,12 @@
 %
 % \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
 % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.25t}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
-% \changes{v1.25t}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
+% \changes{v1.25u}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
+% \changes{v1.25u}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
 %
 % \title{\sffamily easybook 文档类手册}
 % \author{瞿毅}
-% \date{2021/06/05\hskip\ccwd\relax v1.25t\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/06/06\hskip\ccwd\relax v1.25u\thanks{\url{https://gitee.com/texl3/easybook}}}
 %
 % \maketitle
 % \begin{abstract}
@@ -134,7 +134,7 @@
 % \end{syntax}
 % 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
 % \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25t}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \changes{v1.25u}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
 % \end{function}
 %
 % \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -157,7 +157,7 @@
 % \begin{syntax}
 %   class = <(book)|article>
 % \end{syntax}
-% 设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则 \opt{book} 宏包选项会失效。
+% 设置文类风格,默认为 \cls{book} 文档类。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{chapter} 选项会失效,将以 \opt{section} 标题级别输出目录。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则 \opt{book} 宏包选项会失效。
 % \changes{v1.23}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
 % \end{function}
 %
@@ -176,7 +176,7 @@
 % \end{function}
 %
 % \subsubsection{目录命令}
-% \begin{function}[added = 2021-02-20,updated = 2021-06-03]{\tableofcontents,\listoffigures,\listoftables,\listoflstlistings}
+% \begin{function}[added = 2021-02-20,updated = 2021-06-06]{\tableofcontents,\listoffigures,\listoftables,\listoflstlistings}
 % \begin{syntax}
 %   \tn{tableofcontents+}\oarg{键值列表}\parg{附加代码}
 %   \tn{listoffigures*+}\oarg{键值列表}
@@ -184,10 +184,10 @@
 %   \tn{listoflstlistings*+}\oarg{键值列表}
 % \end{syntax}
 % \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflstlistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
-% \changes{v1.25t}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
+% \changes{v1.25u}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
 % \end{function}
 %
-% \begin{function}{multoc,columns,title,format,aftertitle,pagestyle,book,article}
+% \begin{function}{multoc,columns,title,format,aftertitle,pagestyle,chapter,section}
 % \begin{syntax}
 %   multoc = <true|(false)>
 %   columns = <目录栏数|(2)>
@@ -198,10 +198,10 @@
 % \end{syntax}
 % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否多栏排版,默认为双栏,可使用 \opt{columns} 更改。\opt{title} 选项用于更改目录的标题,标题之间用一个半角逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录,与 \tn{tableofcontents+} 配合输出。
 %
-% 在书籍模式且 \opt{book} 选项开启或者文章模式的情况下,\opt{format} 用于设置目录标题的格式,\opt{aftertitle} 选项的代码将被插入到目录标题内容之后,\opt{pagestyle} 是目录标题所在页的页面格式,除此之外还支持 \opt{ctexset/chapter} 或 \opt{ctexset/section} 所有的章节标题样式选项。\opt{book} 选项使目录标题按照 chapter 级别输出,\opt{article} 选项使目录标题按照 section 级别输出,默认为 chapter 级别。
+% 在书籍模式且 \opt{chapter} 选项开启或者文章模式的情况下,\opt{format} 用于设置目录标题的格式,\opt{aftertitle} 选项的代码将被插入到目录标题内容之后,\opt{pagestyle} 是目录标题所在页的页面格式,除此之外还支持 \opt{ctexset/chapter} 或 \opt{ctexset/section} 所有的章节标题样式选项。\opt{chapter} 选项使目录标题按照 chapter 级别输出,\opt{section} 选项使目录标题按照 section 级别输出,默认为 chapter 级别。
 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
 % \changes{v1.24}{2021/04/04}{目录命令的可选参数增加标题键值。}
-% \changes{v1.25t}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
+% \changes{v1.25u}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
 % \end{function}
 %
 % \subsubsection{标题命令}
@@ -217,7 +217,7 @@
 % 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。
 %
 % 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下
-% \changes{v1.25t}{2021/05/05}{增加与双语目录配合的标题命令。}
+% \changes{v1.25u}{2021/05/05}{增加与双语目录配合的标题命令。}
 % \end{function}
 %
 % \begin{function}{biname,binmuber}
@@ -317,7 +317,7 @@
 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
 % \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
 % \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
-% \changes{v1.25t}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
+% \changes{v1.25u}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -374,7 +374,7 @@
 % \ding{229} 以上选项路径为 \opt{subfont/...}
 % \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
 % \changes{v1.23}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-% \changes{v1.25t}{2021/05/31}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
+% \changes{v1.25u}{2021/05/31}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -399,7 +399,7 @@
 % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
 % \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
 % \changes{v1.24}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
-% \changes{v1.25t}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
+% \changes{v1.25u}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -551,7 +551,7 @@
 %   footnoterule = <脚注横线格式>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{hdrset/...} \\
-% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持。设置章节标志选项 \opt{chap-mark}、\opt{sec-mark} 和 \opt{subsec-mark} 时已做了情形考虑,不需要使用 \tn{markboth} 或 \tn{markright} 命令,其中参数 \#1 代表当前章、节或小节的标题。\opt{chap-mark} 和 \opt{sec-mark} 选项在 \opt{book} 模式时有意义,\opt{sec-mark} 和 \opt{subsec-mark} 选项在 \opt{article} 模式时有意义,这与标准文档类的行为一致。也可以直接重新定义这些标志命令,但此时 \opt{style/uppercase} 选项失效,这时可以用例如 \tn{MakeUppercase} 命令来设置标志内容的大小写。
+% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持。设置章节标志选项 \opt{chap-mark}、\opt{sec-mark} 和 \opt{subsec-mark} 时已做了情形考虑,不需要使用 \tn{markboth} 或 \tn{markright} 命令,其中参数 \#1 代表当前章、节或小节的标题。\opt{chap-mark} 和 \opt{sec-mark} 选项在 book 模式时有意义,\opt{sec-mark} 和 \opt{subsec-mark} 选项在 article 模式时有意义,这与标准文档类的行为一致。也可以直接重新定义这些标志命令,但此时 \opt{style/uppercase} 选项失效,这时可以用例如 \tn{MakeUppercase} 命令来设置标志内容的大小写。
 %
 % 标签选项 \opt{chap-label}、\opt{sec-label} 和 \opt{subsec-label} 用于设置标志命令中的标签,包括标题编号和与标题内容之间的距离,它们比标志命令内容的选项更常用,可选参数是编号,必选参数是距离命令
 %
@@ -564,7 +564,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.24}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。}
+% \changes{v1.24}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 article 模式生效。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{\easyhead,\easyfoot}
@@ -605,7 +605,7 @@
 % 上面几个选项用于设置脚注格式,\opt{fnparskip} 和 \opt{fnparindent} 选项仅在 \opt{fnhang = true} 时有效。\opt{fnhang} 用于将脚注设置为悬挂缩进的格式,\opt{fnmark-pos} 选项设置脚注编号的位置,正常文本或是上标形式。\opt{fnmark-num} 选项设置脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括1-10。
 %
 % \opt{fnmark-form} 是脚注标记的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
-% \changes{v1.25t}{2021/05/12}{增加脚注样式设置选项。}
+% \changes{v1.25u}{2021/05/12}{增加脚注样式设置选项。}
 % \end{function}
 %
 % \subsection{目录样式}
@@ -624,7 +624,7 @@
 % \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令,带有加号的 \opt{format+} 选项用于在已有的格式命令后附加内容。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
 % \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
 % \changes{v1.24}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
-% \changes{v1.25t}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
+% \changes{v1.25u}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberLine}
@@ -671,7 +671,7 @@
 % \end{function}
 %
 % \begin{optdesc}
-%   \item[lolskip] \opt{lolskip} 是代码目录中章之间的代码标题的距离,与 \CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 \opt{article} 模式中此选项失效。
+%   \item[lolskip] \opt{lolskip} 是代码目录中章之间的代码标题的距离,与 \CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 article 模式中此选项失效。
 %   \item[belowoffset] \opt{belowoffset} 选项为主文档目录标题下方的间距补偿,一般为负值,用于抵消 \opt{format} 中额外的垂直间距。\opt{(level)} 中的 \opt{belowoffset} 与之意义类似,代表 figure、table 和 lstlisting 三个级别,也可以使用 \opt{list} 统一设置,一般为正值。
 %   \item[tocline] 目录标签整体使用 \opt{tocline} 设置,在图表标签的参数中 \#1 代表编号,代码标签中则是 \tn{thelstlisting} 代表编号,标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子
 %   \begin{ctexexam}
@@ -709,7 +709,7 @@
 %   \tn{end}\marg{环境名}
 % \end{syntax}
 % \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。目前除了表头斜线以及跨页功能存在不足,其它方面已满足对表格绝大多数格式的需求,具体用法可见宏包的说明文档。
-% \changes{v1.25t}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
+% \changes{v1.25u}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
 % \end{function}
 %
 % \subsection{列表}
@@ -774,20 +774,29 @@
 %
 % \subsection{习题}
 % \label{subsec:exercise}
-% \begin{function}[added = 2021-01-05,updated = 2021-05-21]{exercise}
+% \begin{function}[added = 2021-01-05,updated = 2021-06-06]{exercise}
 % \begin{syntax}
-%   \tn{begin}\marg{exercise}*+\oarg{颜色名|(LightSkyBlue)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}\oarg{序言}
+%   \tn{begin}\marg{exercise}*+\oarg{键值列表}\parg{键值列表}\oarg{键值列表}
 %   \  \tn{item} <习题内容>
 %   \tn{end}\marg{exercise}
 % \end{syntax}
-% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用+号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题。\meta{颜色名} 选项在使用+号参数时有效,其中颜色为自定义或 \pkg{xcolor} 包含的颜色名称。题目编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为习题。
-%
-% 配置选项在是否使用+号参数时用法不同,使用+号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用+号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。\meta{序言} 选项用于在习题环境开始前插入一段内容,可以是文本或者代码。注意,环境具有相同定界符的可选参数只能\textbf{从右往左}省略,省略的参数使用默认值。
+% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用+号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效。第二个键值列表的选项与小节 \ref{subsec:sort list} 排序列表相同,\opt{number} 的编号格式也是如此。第一个键值列表中包含的选项如下
 % \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
 % \end{function}
 %
+% \begin{function}{color,title,number,numsep}
+% \begin{syntax}
+%   color = <标题背景颜色名|(LightSkyBlue)>
+%   title = <环境标题>
+%   number = <习题编号格式|(1.)>
+%   numsep = <编号与标题的间距|(0.5\tn{ccwd})>
+% \end{syntax}
+% 第三个键值列表选项在是否使用+号参数时用法不同,使用+号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用+号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。另外还可以使用 \tn{exerprologue} 命令在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。
+% \end{function}
+%
 % \begin{ctexexam}
-%   \begin{exercise}+[LightSkyBlue][1.](习题)
+%   \exerprologue{习题前的一段文本}
+%   \begin{exercise}+[color = LightSkyBlue][itemsep = 1ex]
 %     \item 习题内容
 %     \item 习题内容
 %   \end{exercise}
@@ -873,7 +882,7 @@
 %   \tn{qtyrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
 % \end{syntax}
 % \pkg{siunitx} 宏包的 \tn{num} 命令可以输出以科学计数法表示的数值,单位格式化命令 \tn{unit} 包含文字项目(例如字母或数字)时,使用 . 和 \~{} 放置在单元乘积中间,并使用 \_ 和 \^{} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。而 \tn{qty} 命令可用来输出带有单位的量,\tn{qtyrange} 可以输出带有范围和单位的量。
-% \changes{v1.25t}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
+% \changes{v1.25u}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
 % \end{function}
 %
 % \begin{ctexexam}
@@ -1011,7 +1020,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/05}{1.25t}{beta}
+\ProvidesExplClass{easybook}{2021/06/06}{1.25u}{beta}
 
 \bool_set_false:N \l__eb_compile_draft_bool
 \bool_set_false:N \l__eb_title_newline_bool
@@ -1255,7 +1264,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/05}{1.25t}{beta}
+\ProvidesExplPackage{easybase}{2021/06/06}{1.25u}{beta}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -2036,12 +2045,14 @@
   }
 
 \tl_set:Nx \l__eb_toc_type_tl
-  { \bool_if:NTF \l__eb_class_book_bool { book } { article } }
+  { \bool_if:NTF \l__eb_class_book_bool { chapter } { section } }
 \tl_new:N \eb at bitoc@title
 \keys_define:nn { eb/listoc }
   {
-    article .code:n     = \tl_set:Nn \l__eb_toc_type_tl { article },
-    book .code:n        = { },
+    section .code:n     = \tl_set:Nn \l__eb_toc_type_tl { section },
+    chapter .code:n     = { },
+    article .meta:n     = section,
+    book .meta:n        = chapter,
     multoc .bool_set:N  = \l__eb_multoc_bool,
     multoc .default:n   = true,
     multoc .initial:n   = false,
@@ -2083,7 +2094,7 @@
 
 \cs_new_protected:Npn \eb_title_mark_intoc:n #1
   {
-    \tl_if_eq:NnTF \l__eb_toc_type_tl { book }
+    \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
       {
         \bichapter*{#1}{\eb at bitoc@title}
         \eb at nonumber@markdouble{#1}
@@ -2097,7 +2108,7 @@
   }
 \cs_new_protected:Npn \eb_title_mark_notoc:n #1
   {
-    \tl_if_eq:NnTF \l__eb_toc_type_tl { book }
+    \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
       {
         \chapter*{\phantomsection #1}
         \eb at nonumber@markdouble{#1}
@@ -2113,7 +2124,7 @@
   {
     \IfBooleanTF{#1}
       {
-        \tl_if_eq:NnTF \l__eb_toc_type_tl { book }
+        \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
           { \bichapter{\eb at toc@title}{\eb at bitoc@title} }
           { \bisection{\eb at toc@title}{\eb at bitoc@title} }
       }{
@@ -2201,8 +2212,6 @@
         \cs_set_eq:NN \imki at indexlevel \use_none:n
         \setkeys{imki}{intoc = false}
         \IfValueT{#4}{\keys_set:nn { eb/listoc } {#4}}
-        \bool_if:NF \l__eb_class_book_bool
-          { \tl_set:Nn \l__eb_toc_type_tl { article } }
         \tl_set:Nn \imki at indexheaders
           {
             \eb_title_number_intoc_bool:nn {#2} {#1}
@@ -2642,6 +2651,17 @@
 \ctex_at_end_package:nn { unicode-math }
   { \msg_redirect_module:nnn { unicode-math } { warning } { none } }
 
+\keys_define:nn { eb/exercise }
+  {
+    color .tl_set:N   = \eb at tc@background at color,
+    color .initial:n  = LightSkyBlue,
+    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 tc@exercise at numsep,
+    numsep .initial:n = 0.5\ccwd
+  }
 \ctex_at_end_package:nn { tcolorbox }
   {
     \eb_package_later_bool:nn { tcolorbox } { 2020/10/09 }
@@ -2680,6 +2700,8 @@
         boxrule   = \eb at rule@width at dim
       }
     \newtcbox[auto~counter]{\eb at exercise@box}[1]{tc-exercise,#1}
+    \tl_new:N \eb at list@prologue
+    \cs_new:Npn \exerprologue #1 { \tl_set:Nn \eb at list@prologue {#1} }
     \NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b}
       {
         \begin{tcolorbox}[tc-outline,title = #2,IfValueT = {#3}{#3}]
@@ -2688,34 +2710,49 @@
           \end{eb at outline@list}
         \end{tcolorbox}
       }{}
-    \NewDocumentEnvironment{exercise}
-      {st+O{LightSkyBlue}O{1.}D(){\c__eb_name_exercise_tl}o+O{}+b}
+    \NewDocumentEnvironment{exercise}{st+od()O{}+b}
       {
+        \IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} }
         \IfBooleanTF{#2}
           {
             \eb at exercise@box
               {
-                fuzzy~halo  = 5pt~with~#3,
-                IfValueT    = {#6}{#6},
+                fuzzy~halo  = 5pt~with~\eb at tc@background at color,
+                IfValueT    = {#4}{#4},
                 phantom     =
                   \IfBooleanF{#1}
                     {
-                      \markright{\thetcbcounter\hspace{0.5\ccwd}#5}
+                      \markright
+                        {
+                          \thetcbcounter
+                          \hspace{\eb at tc@exercise at numsep}
+                          \eb at tc@exercise at title
+                        }
                       \addcontentsline{toc}{section}
-                        {\thetcbcounter\hspace{\eb at toc@section at numsep}#5}
+                        {
+                          \thetcbcounter
+                          \hspace{\eb at toc@section at numsep}
+                          \eb at tc@exercise at title
+                        }
                     }
+              }{
+                \IfBooleanF{#1}{\thetcbcounter\hspace{\eb at tc@exercise at numsep}}
+                \eb at tc@exercise at title
               }
-              {\IfBooleanF{#1}{\thetcbcounter\hspace{0.5\ccwd}}#5}
           }{
             \group_begin:
             \ctex_set:nn { section } { format += \centering }
-            \IfValueT{#6}{\ctex_set:nn { section } {#6}}
-            \IfBooleanTF{#1}{\section*{#5}}{\section{#5}}
+            \IfValueT{#4}{\ctex_set:nn { section } {#4}}
+            \IfBooleanTF{#1}
+              {\section*{\eb at tc@exercise at title}}
+              {\section{\eb at tc@exercise at title}}
             \group_end:
-          }#7
-        \begin{enumerate}[#4,labelsep = 0.5\ccwd]
-          #8
+          }
+        \tl_if_empty:NF \eb at list@prologue { \eb at list@prologue }
+        \begin{enumerate}[\eb at tc@list at number,labelsep = 0.5\ccwd,#5]
+          #6
         \end{enumerate}
+        \tl_gclear:N \eb at list@prologue
       }{}
     \DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}}
       {
@@ -2764,7 +2801,7 @@
       {
         standard~jigsaw,
         nobeforeafter,tcbox~raise~base,
-        top = 1.25tt,bottom = 1.25tt,left = 1.25tt,right = 1.25tt,
+        top = 1.25ut,bottom = 1.25ut,left = 1.25ut,right = 1.25ut,
         boxrule = 0.75pt,arc = 1pt,
         colback = #1,opacityback = 0.12,colframe = #1,#3
       }{#2}

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-06-06 20:50:11 UTC (rev 59492)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-06-06 20:50:24 UTC (rev 59493)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/05}{1.25t}{beta}
+\ProvidesExplPackage{easybase}{2021/06/06}{1.25u}{beta}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -794,12 +794,14 @@
   }
 
 \tl_set:Nx \l__eb_toc_type_tl
-  { \bool_if:NTF \l__eb_class_book_bool { book } { article } }
+  { \bool_if:NTF \l__eb_class_book_bool { chapter } { section } }
 \tl_new:N \eb at bitoc@title
 \keys_define:nn { eb/listoc }
   {
-    article .code:n     = \tl_set:Nn \l__eb_toc_type_tl { article },
-    book .code:n        = { },
+    section .code:n     = \tl_set:Nn \l__eb_toc_type_tl { section },
+    chapter .code:n     = { },
+    article .meta:n     = section,
+    book .meta:n        = chapter,
     multoc .bool_set:N  = \l__eb_multoc_bool,
     multoc .default:n   = true,
     multoc .initial:n   = false,
@@ -841,7 +843,7 @@
 
 \cs_new_protected:Npn \eb_title_mark_intoc:n #1
   {
-    \tl_if_eq:NnTF \l__eb_toc_type_tl { book }
+    \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
       {
         \bichapter*{#1}{\eb at bitoc@title}
         \eb at nonumber@markdouble{#1}
@@ -855,7 +857,7 @@
   }
 \cs_new_protected:Npn \eb_title_mark_notoc:n #1
   {
-    \tl_if_eq:NnTF \l__eb_toc_type_tl { book }
+    \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
       {
         \chapter*{\phantomsection #1}
         \eb at nonumber@markdouble{#1}
@@ -871,7 +873,7 @@
   {
     \IfBooleanTF{#1}
       {
-        \tl_if_eq:NnTF \l__eb_toc_type_tl { book }
+        \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
           { \bichapter{\eb at toc@title}{\eb at bitoc@title} }
           { \bisection{\eb at toc@title}{\eb at bitoc@title} }
       }{
@@ -959,8 +961,6 @@
         \cs_set_eq:NN \imki at indexlevel \use_none:n
         \setkeys{imki}{intoc = false}
         \IfValueT{#4}{\keys_set:nn { eb/listoc } {#4}}
-        \bool_if:NF \l__eb_class_book_bool
-          { \tl_set:Nn \l__eb_toc_type_tl { article } }
         \tl_set:Nn \imki at indexheaders
           {
             \eb_title_number_intoc_bool:nn {#2} {#1}
@@ -1400,6 +1400,17 @@
 \ctex_at_end_package:nn { unicode-math }
   { \msg_redirect_module:nnn { unicode-math } { warning } { none } }
 
+\keys_define:nn { eb/exercise }
+  {
+    color .tl_set:N   = \eb at tc@background at color,
+    color .initial:n  = LightSkyBlue,
+    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 tc@exercise at numsep,
+    numsep .initial:n = 0.5\ccwd
+  }
 \ctex_at_end_package:nn { tcolorbox }
   {
     \eb_package_later_bool:nn { tcolorbox } { 2020/10/09 }
@@ -1438,6 +1449,8 @@
         boxrule   = \eb at rule@width at dim
       }
     \newtcbox[auto~counter]{\eb at exercise@box}[1]{tc-exercise,#1}
+    \tl_new:N \eb at list@prologue
+    \cs_new:Npn \exerprologue #1 { \tl_set:Nn \eb at list@prologue {#1} }
     \NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b}
       {
         \begin{tcolorbox}[tc-outline,title = #2,IfValueT = {#3}{#3}]
@@ -1446,34 +1459,49 @@
           \end{eb at outline@list}
         \end{tcolorbox}
       }{}
-    \NewDocumentEnvironment{exercise}
-      {st+O{LightSkyBlue}O{1.}D(){\c__eb_name_exercise_tl}o+O{}+b}
+    \NewDocumentEnvironment{exercise}{st+od()O{}+b}
       {
+        \IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} }
         \IfBooleanTF{#2}
           {
             \eb at exercise@box
               {
-                fuzzy~halo  = 5pt~with~#3,
-                IfValueT    = {#6}{#6},
+                fuzzy~halo  = 5pt~with~\eb at tc@background at color,
+                IfValueT    = {#4}{#4},
                 phantom     =
                   \IfBooleanF{#1}
                     {
-                      \markright{\thetcbcounter\hspace{0.5\ccwd}#5}
+                      \markright
+                        {
+                          \thetcbcounter
+                          \hspace{\eb at tc@exercise at numsep}
+                          \eb at tc@exercise at title
+                        }
                       \addcontentsline{toc}{section}
-                        {\thetcbcounter\hspace{\eb at toc@section at numsep}#5}
+                        {
+                          \thetcbcounter
+                          \hspace{\eb at toc@section at numsep}
+                          \eb at tc@exercise at title
+                        }
                     }
+              }{
+                \IfBooleanF{#1}{\thetcbcounter\hspace{\eb at tc@exercise at numsep}}
+                \eb at tc@exercise at title
               }
-              {\IfBooleanF{#1}{\thetcbcounter\hspace{0.5\ccwd}}#5}
           }{
             \group_begin:
             \ctex_set:nn { section } { format += \centering }
-            \IfValueT{#6}{\ctex_set:nn { section } {#6}}
-            \IfBooleanTF{#1}{\section*{#5}}{\section{#5}}
+            \IfValueT{#4}{\ctex_set:nn { section } {#4}}
+            \IfBooleanTF{#1}
+              {\section*{\eb at tc@exercise at title}}
+              {\section{\eb at tc@exercise at title}}
             \group_end:
-          }#7
-        \begin{enumerate}[#4,labelsep = 0.5\ccwd]
-          #8
+          }
+        \tl_if_empty:NF \eb at list@prologue { \eb at list@prologue }
+        \begin{enumerate}[\eb at tc@list at number,labelsep = 0.5\ccwd,#5]
+          #6
         \end{enumerate}
+        \tl_gclear:N \eb at list@prologue
       }{}
     \DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}}
       {
@@ -1522,7 +1550,7 @@
       {
         standard~jigsaw,
         nobeforeafter,tcbox~raise~base,
-        top = 1.25tt,bottom = 1.25tt,left = 1.25tt,right = 1.25tt,
+        top = 1.25ut,bottom = 1.25ut,left = 1.25ut,right = 1.25ut,
         boxrule = 0.75pt,arc = 1pt,
         colback = #1,opacityback = 0.12,colframe = #1,#3
       }{#2}

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-06-06 20:50:11 UTC (rev 59492)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-06-06 20:50:24 UTC (rev 59493)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/05}{1.25t}{beta}
+\ProvidesExplClass{easybook}{2021/06/06}{1.25u}{beta}
 
 \bool_set_false:N \l__eb_compile_draft_bool
 \bool_set_false:N \l__eb_title_newline_bool



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