texlive[59454] Master/texmf-dist: easybook (3jun21)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 3 22:49:33 CEST 2021


Revision: 59454
          http://tug.org/svn/texlive?view=revision&revision=59454
Author:   karl
Date:     2021-06-03 22:49:33 +0200 (Thu, 03 Jun 2021)
Log Message:
-----------
easybook (3jun21)

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-03 20:49:19 UTC (rev 59453)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-06-03 20:49:33 UTC (rev 59454)
@@ -23,12 +23,12 @@
 %
 % \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
 % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.25q}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
-% \changes{v1.25q}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
+% \changes{v1.25r}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
+% \changes{v1.25r}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
 %
 % \title{\sffamily easybook 文档类手册}
 % \author{瞿毅}
-% \date{2021/06/02\hskip\ccwd\relax v1.25q\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/06/03\hskip\ccwd\relax v1.25r\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.25q}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \changes{v1.25r}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
 % \end{function}
 %
 % \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -176,15 +176,15 @@
 % \end{function}
 %
 % \subsubsection{目录命令}
-% \begin{function}[added = 2021-02-20,updated = 2021-06-02]{\tableofcontents,\listoffigures,\listoftables,\listoflistings}
+% \begin{function}[added = 2021-02-20,updated = 2021-06-03]{\tableofcontents,\listoffigures,\listoftables,\listoflstlistings}
 % \begin{syntax}
 %   \tn{tableofcontents+}\oarg{键值列表}\parg{附加代码}
 %   \tn{listoffigures*+}\oarg{键值列表}
 %   \tn{listoftables*+}\oarg{键值列表}
-%   \tn{listoflistings*+}\oarg{键值列表}
+%   \tn{listoflstlistings*+}\oarg{键值列表}
 % \end{syntax}
-% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
-% \changes{v1.25q}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
+% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflstlistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
+% \changes{v1.25r}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
 % \end{function}
 %
 % \begin{function}{multoc,columns,title,format,aftertitle,pagestyle,book,article}
@@ -201,7 +201,7 @@
 % 在书籍模式且 \opt{book} 选项开启或者文章模式的情况下,\opt{format} 用于设置目录标题的格式,\opt{aftertitle} 选项的代码将被插入到目录标题内容之后,\opt{pagestyle} 是目录标题所在页的页面格式,除此之外还支持 \opt{ctexset/chapter} 或 \opt{ctexset/section} 所有的章节标题样式选项。\opt{book} 选项使目录标题按照 chapter 级别输出,\opt{article} 选项使目录标题按照 section 级别输出,默认为 chapter 级别。
 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
 % \changes{v1.24}{2021/04/04}{目录命令的可选参数增加标题键值。}
-% \changes{v1.25q}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
+% \changes{v1.25r}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
 % \end{function}
 %
 % \subsubsection{标题命令}
@@ -217,7 +217,7 @@
 % 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。
 %
 % 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下
-% \changes{v1.25q}{2021/05/05}{增加与双语目录配合的标题命令。}
+% \changes{v1.25r}{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.25q}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
+% \changes{v1.25r}{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.25q}{2021/05/31}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
+% \changes{v1.25r}{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.25q}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
+% \changes{v1.25r}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -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.25q}{2021/05/12}{增加脚注样式设置选项。}
+% \changes{v1.25r}{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.25q}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
+% \changes{v1.25r}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberLine}
@@ -709,7 +709,7 @@
 %   \tn{end}\marg{环境名}
 % \end{syntax}
 % \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。目前除了表头斜线以及跨页功能存在不足,其它方面已满足对表格绝大多数格式的需求,具体用法可见宏包的说明文档。
-% \changes{v1.25q}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
+% \changes{v1.25r}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
 % \end{function}
 %
 % \subsection{列表}
@@ -873,7 +873,7 @@
 %   \tn{qtyrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
 % \end{syntax}
 % \pkg{siunitx} 宏包的 \tn{num} 命令可以输出以科学计数法表示的数值,单位格式化命令 \tn{unit} 包含文字项目(例如字母或数字)时,使用 . 和 \~{} 放置在单元乘积中间,并使用 \_ 和 \^{} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。而 \tn{qty} 命令可用来输出带有单位的量,\tn{qtyrange} 可以输出带有范围和单位的量。
-% \changes{v1.25q}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
+% \changes{v1.25r}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
 % \end{function}
 %
 % \begin{ctexexam}
@@ -1011,7 +1011,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/02}{1.25q}{beta}
+\ProvidesExplClass{easybook}{2021/06/03}{1.25r}{beta}
 
 \bool_set_false:N \l__eb_compile_draft_bool
 \bool_set_false:N \l__eb_title_newline_bool
@@ -1255,7 +1255,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/02}{1.25q}{beta}
+\ProvidesExplPackage{easybase}{2021/06/03}{1.25r}{beta}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1359,7 +1359,7 @@
 \ctex_define:n
   {
     link .meta:nn                 = { ctex/link } {#1},
-    lstlistlistingname .tl_set:N  = \lstlistlistingname,
+    lstlistlistingname .tl_set:N  = \listlstlistingname,
     lstlistingname .tl_set:N      = \lstlistingname
   }
 \eb_ctex_define:nn { style }
@@ -1441,7 +1441,7 @@
   {
     vmargin         = 2.54cm,
     hmargin         = 3.17cm,
-    columnsep       = \ccwd,
+    columnsep       = 2\ccwd,
     headheight      = 2.04cm,
     headsep         = 0.5cm,
     footskip        = 0.79cm,
@@ -2119,69 +2119,60 @@
       { \bisection*{#1}{\l__eb_bib_bitoc_title} }
     \eb at nonumber@markdouble{#1}
   }
-\cs_new_protected:Npn \eb_multoc_pre_bool:
+\cs_new_protected:Npn \eb_toc_multicol_bool:n #1
   {
-    \bool_if:NT \l__eb_multoc_bool
-      { \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
-  }
-\cs_new_protected:Npn \eb_multoc_post_bool:
-  { \bool_if:NT \l__eb_multoc_bool { \end{multicols} } }
-\RenewDocumentCommand{\tableofcontents}{t+oD(){}}
-  {
-    \group_begin:
-    \tl_set_eq:NN \eb at toc@title \contentsname
-    \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 }
-    \eb_multoc_pre_bool:
-    \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-    \@starttoc{toc}#3
-    \IfBooleanT{#1}
+    \bool_if:NTF \l__eb_multoc_bool
       {
-        \eb_title_mark_notoc:n { \eb at bitoc@title }
-        \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-        \@starttoc{tec}
+        \begin{multicols}{\int_use:N \l__eb_toc_columns_int}
+          \@starttoc{#1}
+        \end{multicols}
       }
-    \eb_multoc_post_bool:
-    \group_end:
+      { \@starttoc{#1} }
   }
-\RenewDocumentCommand{\listoffigures}{st+o}
+\cs_new_protected:Npn \eb_toc_list_parse:nnnnn #1#2#3#4#5
   {
     \group_begin:
-    \tl_set_eq:NN \eb at toc@title \listfigurename
+    \exp_args:NNc
+    \tl_set_eq:NN \eb at toc@title { list#4name }
     \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
     \eb_title_number_intoc_bool:nn {#2} {#1}
-    \eb_multoc_pre_bool:
-    \dim_add:NV \l__eb_toc_offset_dim \l__eb_toc_figure_offset_dim
+    \exp_args:NNc \dim_add:NV
+    \l__eb_toc_offset_dim { l__eb_toc_#4_offset_dim }
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-    \@starttoc{lof}
-    \eb_multoc_post_bool:
+    \eb_toc_multicol_bool:n {#5}
     \group_end:
   }
-\RenewDocumentCommand{\listoftables}{st+o}
+\clist_map_inline:nn
   {
-    \group_begin:
-    \tl_set_eq:NN \eb at toc@title \listtablename
-    \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
-    \eb_title_number_intoc_bool:nn {#2} {#1}
-    \eb_multoc_pre_bool:
-    \dim_add:NV \l__eb_toc_offset_dim \l__eb_toc_table_offset_dim
-    \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-    \@starttoc{lot}
-    \eb_multoc_post_bool:
-    \group_end:
+    { figure,lof },
+    { table,lot },
+    { lstlisting,lol }
   }
-\NewDocumentCommand{\listoflistings}{st+o}
   {
+    \exp_args:Nc \DeclareDocumentCommand
+      { listof\clist_item:nn {#1} { 1 }s }{st+o}
+      {
+        \eb_toc_list_parse:nnnnn {##1} {##2} {##3}
+          { \clist_item:nn {#1} { 1 } }
+          { \clist_item:nn {#1} { 2 } }
+      }
+  }
+\cs_set_eq:NN \listoflistings \listoflstlistings
+\RenewDocumentCommand{\tableofcontents}{t+oD(){}}
+  {
     \group_begin:
-    \tl_set_eq:NN \eb at toc@title \lstlistlistingname
-    \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
-    \eb_title_number_intoc_bool:nn {#2} {#1}
-    \eb_multoc_pre_bool:
-    \dim_add:NV \l__eb_toc_offset_dim \l__eb_toc_lstlisting_offset_dim
+    \tl_set_eq:NN \eb at toc@title \contentsname
+    \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_offset_dim}
-    \@starttoc{lol}
-    \eb_multoc_post_bool:
+    \eb_toc_multicol_bool:n { toc }#3
+    \IfBooleanT{#1}
+      {
+        \eb_title_mark_notoc:n { \eb at bitoc@title }
+        \vspace*{\dim_use:N \l__eb_toc_offset_dim}
+        \eb_toc_multicol_bool:n { tec }
+      }
     \group_end:
   }
 
@@ -2421,6 +2412,7 @@
 \skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt }
 \skip_set:Nn \dbltextfloatsep { 16pt plus 2pt minus 4pt }
 \skip_set:Nn \@fpsep { 8pt plus 2.0fil }
+\skip_set:Nn \multicolsep { 10pt plus 4pt minus 3pt }
 \setcounter{topnumber}{4}
 \setcounter{bottomnumber}{4}
 \setcounter{totalnumber}{8}
@@ -2763,7 +2755,7 @@
       {
         standard~jigsaw,
         nobeforeafter,tcbox~raise~base,
-        top = 1.25qt,bottom = 1.25qt,left = 1.25qt,right = 1.25qt,
+        top = 1.25rt,bottom = 1.25rt,left = 1.25rt,right = 1.25rt,
         boxrule = 0.75pt,arc = 1pt,
         colback = #1,opacityback = 0.12,colframe = #1,#3
       }{#2}
@@ -2823,6 +2815,8 @@
     \tl_if_empty:NF \l__eb_bib_citestyle_tl
       { \exp_args:NV \setcitestyle \l__eb_bib_citestyle_tl }
     \skip_zero:N \bibsep
+    \AtEndEnvironment{thebibliography}
+      {\bool_if:NT \l__eb_multoc_bool { \end{multicols} }}
     \NewDocumentCommand{\printbibliography}{st+o}
       {
         \group_begin:
@@ -2831,10 +2825,10 @@
         \tl_set:Nn \bibsection
           {
             \eb_title_number_intoc_bool:nn {##2} {##1}
-            \eb_multoc_pre_bool:
+            \bool_if:NT \l__eb_multoc_bool
+              { \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
           }
         \exp_args:NV \bibliography \l__eb_bib_datafile_tl
-        \eb_multoc_post_bool:
         \group_end:
       }
   }
@@ -2952,12 +2946,12 @@
   { \definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1} }
 \cs_new:Npn \eb_linkcolor_set:n #1
   {
-    linkcolor/\clist_item:nn {#1} {1} .code:n =
+    linkcolor/\clist_item:nn {#1} { 1 } .code:n =
       {
         \eb_define_linkcolor:nnn
-          { \clist_item:nn {#1} {2} }
-          { \clist_item:nn {#1} {3} }
-          { \clist_item:nn {#1} {4} }
+          { \clist_item:nn {#1} { 2 } }
+          { \clist_item:nn {#1} { 3 } }
+          { \clist_item:nn {#1} { 4 } }
         \eb_put_hyperref:n
           {
             linkcolor = ctex at link,linkbordercolor = ctex at link,
@@ -2971,9 +2965,9 @@
     color/\clist_item:nn {#1} {1} .code:n =
       {
         \eb_define_themecolor:nnn
-          { \clist_item:nn {#1} {2} }
-          { \clist_item:nn {#1} {3} }
-          { \clist_item:nn {#1} {4} }
+          { \clist_item:nn {#1} { 2 } }
+          { \clist_item:nn {#1} { 3 } }
+          { \clist_item:nn {#1} { 4 } }
       },
   }
 

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-06-03 20:49:19 UTC (rev 59453)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-06-03 20:49:33 UTC (rev 59454)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/02}{1.25q}{beta}
+\ProvidesExplPackage{easybase}{2021/06/03}{1.25r}{beta}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -117,7 +117,7 @@
 \ctex_define:n
   {
     link .meta:nn                 = { ctex/link } {#1},
-    lstlistlistingname .tl_set:N  = \lstlistlistingname,
+    lstlistlistingname .tl_set:N  = \listlstlistingname,
     lstlistingname .tl_set:N      = \lstlistingname
   }
 \eb_ctex_define:nn { style }
@@ -199,7 +199,7 @@
   {
     vmargin         = 2.54cm,
     hmargin         = 3.17cm,
-    columnsep       = \ccwd,
+    columnsep       = 2\ccwd,
     headheight      = 2.04cm,
     headsep         = 0.5cm,
     footskip        = 0.79cm,
@@ -877,69 +877,60 @@
       { \bisection*{#1}{\l__eb_bib_bitoc_title} }
     \eb at nonumber@markdouble{#1}
   }
-\cs_new_protected:Npn \eb_multoc_pre_bool:
+\cs_new_protected:Npn \eb_toc_multicol_bool:n #1
   {
-    \bool_if:NT \l__eb_multoc_bool
-      { \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
-  }
-\cs_new_protected:Npn \eb_multoc_post_bool:
-  { \bool_if:NT \l__eb_multoc_bool { \end{multicols} } }
-\RenewDocumentCommand{\tableofcontents}{t+oD(){}}
-  {
-    \group_begin:
-    \tl_set_eq:NN \eb at toc@title \contentsname
-    \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 }
-    \eb_multoc_pre_bool:
-    \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-    \@starttoc{toc}#3
-    \IfBooleanT{#1}
+    \bool_if:NTF \l__eb_multoc_bool
       {
-        \eb_title_mark_notoc:n { \eb at bitoc@title }
-        \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-        \@starttoc{tec}
+        \begin{multicols}{\int_use:N \l__eb_toc_columns_int}
+          \@starttoc{#1}
+        \end{multicols}
       }
-    \eb_multoc_post_bool:
-    \group_end:
+      { \@starttoc{#1} }
   }
-\RenewDocumentCommand{\listoffigures}{st+o}
+\cs_new_protected:Npn \eb_toc_list_parse:nnnnn #1#2#3#4#5
   {
     \group_begin:
-    \tl_set_eq:NN \eb at toc@title \listfigurename
+    \exp_args:NNc
+    \tl_set_eq:NN \eb at toc@title { list#4name }
     \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
     \eb_title_number_intoc_bool:nn {#2} {#1}
-    \eb_multoc_pre_bool:
-    \dim_add:NV \l__eb_toc_offset_dim \l__eb_toc_figure_offset_dim
+    \exp_args:NNc \dim_add:NV
+    \l__eb_toc_offset_dim { l__eb_toc_#4_offset_dim }
     \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-    \@starttoc{lof}
-    \eb_multoc_post_bool:
+    \eb_toc_multicol_bool:n {#5}
     \group_end:
   }
-\RenewDocumentCommand{\listoftables}{st+o}
+\clist_map_inline:nn
   {
-    \group_begin:
-    \tl_set_eq:NN \eb at toc@title \listtablename
-    \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
-    \eb_title_number_intoc_bool:nn {#2} {#1}
-    \eb_multoc_pre_bool:
-    \dim_add:NV \l__eb_toc_offset_dim \l__eb_toc_table_offset_dim
-    \vspace*{\dim_use:N \l__eb_toc_offset_dim}
-    \@starttoc{lot}
-    \eb_multoc_post_bool:
-    \group_end:
+    { figure,lof },
+    { table,lot },
+    { lstlisting,lol }
   }
-\NewDocumentCommand{\listoflistings}{st+o}
   {
+    \exp_args:Nc \DeclareDocumentCommand
+      { listof\clist_item:nn {#1} { 1 }s }{st+o}
+      {
+        \eb_toc_list_parse:nnnnn {##1} {##2} {##3}
+          { \clist_item:nn {#1} { 1 } }
+          { \clist_item:nn {#1} { 2 } }
+      }
+  }
+\cs_set_eq:NN \listoflistings \listoflstlistings
+\RenewDocumentCommand{\tableofcontents}{t+oD(){}}
+  {
     \group_begin:
-    \tl_set_eq:NN \eb at toc@title \lstlistlistingname
-    \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
-    \eb_title_number_intoc_bool:nn {#2} {#1}
-    \eb_multoc_pre_bool:
-    \dim_add:NV \l__eb_toc_offset_dim \l__eb_toc_lstlisting_offset_dim
+    \tl_set_eq:NN \eb at toc@title \contentsname
+    \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_offset_dim}
-    \@starttoc{lol}
-    \eb_multoc_post_bool:
+    \eb_toc_multicol_bool:n { toc }#3
+    \IfBooleanT{#1}
+      {
+        \eb_title_mark_notoc:n { \eb at bitoc@title }
+        \vspace*{\dim_use:N \l__eb_toc_offset_dim}
+        \eb_toc_multicol_bool:n { tec }
+      }
     \group_end:
   }
 
@@ -1179,6 +1170,7 @@
 \skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt }
 \skip_set:Nn \dbltextfloatsep { 16pt plus 2pt minus 4pt }
 \skip_set:Nn \@fpsep { 8pt plus 2.0fil }
+\skip_set:Nn \multicolsep { 10pt plus 4pt minus 3pt }
 \setcounter{topnumber}{4}
 \setcounter{bottomnumber}{4}
 \setcounter{totalnumber}{8}
@@ -1521,7 +1513,7 @@
       {
         standard~jigsaw,
         nobeforeafter,tcbox~raise~base,
-        top = 1.25qt,bottom = 1.25qt,left = 1.25qt,right = 1.25qt,
+        top = 1.25rt,bottom = 1.25rt,left = 1.25rt,right = 1.25rt,
         boxrule = 0.75pt,arc = 1pt,
         colback = #1,opacityback = 0.12,colframe = #1,#3
       }{#2}
@@ -1581,6 +1573,8 @@
     \tl_if_empty:NF \l__eb_bib_citestyle_tl
       { \exp_args:NV \setcitestyle \l__eb_bib_citestyle_tl }
     \skip_zero:N \bibsep
+    \AtEndEnvironment{thebibliography}
+      {\bool_if:NT \l__eb_multoc_bool { \end{multicols} }}
     \NewDocumentCommand{\printbibliography}{st+o}
       {
         \group_begin:
@@ -1589,10 +1583,10 @@
         \tl_set:Nn \bibsection
           {
             \eb_title_number_intoc_bool:nn {##2} {##1}
-            \eb_multoc_pre_bool:
+            \bool_if:NT \l__eb_multoc_bool
+              { \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
           }
         \exp_args:NV \bibliography \l__eb_bib_datafile_tl
-        \eb_multoc_post_bool:
         \group_end:
       }
   }
@@ -1710,12 +1704,12 @@
   { \definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1} }
 \cs_new:Npn \eb_linkcolor_set:n #1
   {
-    linkcolor/\clist_item:nn {#1} {1} .code:n =
+    linkcolor/\clist_item:nn {#1} { 1 } .code:n =
       {
         \eb_define_linkcolor:nnn
-          { \clist_item:nn {#1} {2} }
-          { \clist_item:nn {#1} {3} }
-          { \clist_item:nn {#1} {4} }
+          { \clist_item:nn {#1} { 2 } }
+          { \clist_item:nn {#1} { 3 } }
+          { \clist_item:nn {#1} { 4 } }
         \eb_put_hyperref:n
           {
             linkcolor = ctex at link,linkbordercolor = ctex at link,
@@ -1729,9 +1723,9 @@
     color/\clist_item:nn {#1} {1} .code:n =
       {
         \eb_define_themecolor:nnn
-          { \clist_item:nn {#1} {2} }
-          { \clist_item:nn {#1} {3} }
-          { \clist_item:nn {#1} {4} }
+          { \clist_item:nn {#1} { 2 } }
+          { \clist_item:nn {#1} { 3 } }
+          { \clist_item:nn {#1} { 4 } }
       },
   }
 

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-06-03 20:49:19 UTC (rev 59453)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-06-03 20:49:33 UTC (rev 59454)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/02}{1.25q}{beta}
+\ProvidesExplClass{easybook}{2021/06/03}{1.25r}{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.