texlive[58671] branches/branch2020.0/Master/texmf-dist: easybook

commits+karl at tug.org commits+karl at tug.org
Tue Mar 23 23:32:01 CET 2021


Revision: 58671
          http://tug.org/svn/texlive?view=revision&revision=58671
Author:   karl
Date:     2021-03-23 23:32:01 +0100 (Tue, 23 Mar 2021)
Log Message:
-----------
easybook (23mar21) (branch)

Modified Paths:
--------------
    branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
    branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
    branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook.pdf
    branches/branch2020.0/Master/texmf-dist/source/latex/easybook/easybook.dtx
    branches/branch2020.0/Master/texmf-dist/tex/latex/easybook/easybook.cls

Modified: branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
===================================================================
--- branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-03-23 22:31:48 UTC (rev 58670)
+++ branches/branch2020.0/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-03-23 22:32:01 UTC (rev 58671)
@@ -99,7 +99,7 @@
     \url{https://latexstudio.net} \\
     \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
   }
-\date{2021/03/21\hskip\ccwd\relax v1.23x}
+\date{2021/03/23\hskip\ccwd\relax v1.23z}
 
 \frontmatter[roman]
 \maketitle

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

Modified: branches/branch2020.0/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- branches/branch2020.0/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-03-23 22:31:48 UTC (rev 58670)
+++ branches/branch2020.0/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-03-23 22:32:01 UTC (rev 58671)
@@ -51,7 +51,7 @@
 %
 % \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
 % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.23x}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
+% \changes{v1.23z}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
 %
 % \CheckSum{0}
 %
@@ -73,7 +73,7 @@
 %
 % \title{\sffamily easybook书籍文档类}
 % \author{瞿毅}
-% \date{2021/03/21\hskip\ccwd\relax v1.23x\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/03/23\hskip\ccwd\relax v1.23z\thanks{\url{https://gitee.com/texl3/easybook}}}
 % \maketitle
 % \begin{abstract}
 %   \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
@@ -164,7 +164,7 @@
 %   class = <(book)|article>
 % \end{syntax}
 % 设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
-% \changes{v1.23x}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
+% \changes{v1.23z}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
 % \end{function}
 %
 % \subsection{文档命令}
@@ -180,7 +180,7 @@
 %   \tn{listoflistings*}\oarg{键值列表}
 % \end{syntax}
 % \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
-% \changes{v1.23x}{2021/02/20}{重新定义文档结构划分命令。}
+% \changes{v1.23z}{2021/02/20}{重新定义文档结构划分命令。}
 % \end{function}
 %
 % \begin{function}{multoc,book,article}
@@ -188,7 +188,7 @@
 %   multoc = <true|(false)>
 % \end{syntax}
 % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
-% \changes{v1.23x}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
+% \changes{v1.23z}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
 % \end{function}
 %
 % \section{接口选项}
@@ -225,9 +225,9 @@
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{style/...}
 % \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-% \changes{v1.23x}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-% \changes{v1.23x}{2021/02/09}{增加控制页面横线粗细的选项。}
-% \changes{v1.23x}{2021/03/15}{增加控制编号连接符的选项。}
+% \changes{v1.23z}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+% \changes{v1.23z}{2021/02/09}{增加控制页面横线粗细的选项。}
+% \changes{v1.23z}{2021/03/15}{增加控制编号连接符的选项。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -289,7 +289,7 @@
 % \ding{229} 以上选项路径为 \opt{spread/...} \\
 % 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
 % \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-% \changes{v1.23x}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+% \changes{v1.23z}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -311,7 +311,7 @@
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{elsefont/...}
 % \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-% \changes{v1.23x}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+% \changes{v1.23z}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -332,7 +332,7 @@
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{bibset/...}
 % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-% \changes{v1.23x}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+% \changes{v1.23z}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -394,7 +394,7 @@
 %   \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
 % \end{syntax}
 % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
-% \changes{v1.23x}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+% \changes{v1.23z}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -467,8 +467,8 @@
 % \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
 % \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
 % \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-% \changes{v1.23x}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-% \changes{v1.23x}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+% \changes{v1.23z}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+% \changes{v1.23z}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
@@ -626,7 +626,7 @@
 %     \item 习题内容
 %   \end{exercise}
 % \end{ctexexam}
-% \changes{v1.23x}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+% \changes{v1.23z}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
 % \end{function}
 %
 % \subsection{盒子}
@@ -691,10 +691,10 @@
 % \subsection{物理量}
 % \begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
 % \begin{syntax}
-%   \tn{num}\oarg{选项}\marg{数字}
-%   \tn{si}\oarg{选项}\marg{单位}
-%   \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
-%   \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
+%   \tn{num}\oarg{键值列表}\marg{数字}
+%   \tn{si}\oarg{键值列表}\marg{单位}
+%   \tn{SI}\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}
+%   \tn{SIrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
 % \end{syntax}
 % \pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
 % \begin{ctexexam}
@@ -708,7 +708,7 @@
 % \subsection{化学式}
 % \begin{function}[added = 2021-01-05]{\ch,\chemfig}
 % \begin{syntax}
-%   \tn{ch}\oarg{选项}\marg{输入}
+%   \tn{ch}\oarg{键值列表}\marg{输入}
 %   \tn{chemfig}\oarg{键值列表}\marg{分子代码}
 % \end{syntax}
 % 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐在导言区载入 \pkg{chemfig} 宏包,使用\tn{chemfig} 命令完成。
@@ -785,7 +785,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/21}{1.23x}{beta}
+\ProvidesExplClass{easybook}{2021/03/23}{1.23z}{beta}
 
 \cs_generate_variant:Nn \keys_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -884,17 +884,16 @@
 \tl_new:N   \l__foot_numberwith_tl
 \tl_new:N   \g__config_tl
 
+\seq_const_from_clist:Nn \c__options_path_seq
+  {
+    style,link,elsefont,
+    spread,bibset,thmset,
+    geoset,hdrset,tocset
+  }
+\seq_map_inline:Nn \c__options_path_seq
+  {\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}}
 \ctex_define:n
   {
-    style               .meta:nn = {ctex/style}{#1},
-    link                .meta:nn = {ctex/link}{#1},
-    spread              .meta:nn = {ctex/spread}{#1},
-    elsefont            .meta:nn = {ctex/elsefont}{#1},
-    bibset              .meta:nn = {ctex/bibset}{#1},
-    thmset              .meta:nn = {ctex/thmset}{#1},
-    geoset              .meta:nn = {ctex/geoset}{#1},
-    hdrset              .meta:nn = {ctex/hdrset}{#1},
-    tocset              .meta:nn = {ctex/tocset}{#1},
     config              .tl_set:N = \g__config_tl,
     lstlistlistingname  .tl_set:N = \lstlistlistingname,
     lstlistingname      .tl_set:N = \lstlistingname
@@ -941,12 +940,11 @@
     xcolor,
     footmisc,setspace,
     amsmath,amsthm,thmtools,cases,
-    chemformula,siunitx,ulem,
+    chemformula,siunitx,ulem,pifont,
     geometry,marginnote,nccfoots,
     pdfpages,graphicx,
     fancyhdr,titletoc,
     caption-light,subcaption,
-    pifont,microtype,
     tabularx,multirow,makecell,booktabs,
     tasks,enumitem,
     listings,
@@ -1159,8 +1157,10 @@
     headrule      .tl_gset:N = \headrule,
     headrule      .initial:n =
       {
-        \color{ctex at frame}\vspace{1.5pt}
+        \group_begin:
+        \color{ctex at frame}\vspace*{1.5pt}
         \hrule width \textwidth height \l__rule_width_dim
+        \group_end:
       },
     footrule      .tl_gset:N = \footrule,
     footrule      .initial:n = {},
@@ -1167,9 +1167,11 @@
     footnoterule  .tl_gset:N = \footnoterule,
     footnoterule  .initial:n =
       {
+        \group_begin:
         \color{ctex at frame}
         \hrule width 0.35\columnwidth height \l__rule_width_dim
-        \vspace*{2.6pt}\color{black}
+        \vspace*{2.6pt}
+        \group_end:
       }
   }
 \ctex_at_end_preamble:n
@@ -1225,59 +1227,50 @@
       }
   }
 
-\ctex_define:n
+\seq_const_from_clist:Nn \c__toc_headings_level_seq
+  {part,chapter,section,subsection,lists}
+\seq_map_inline:Nn \c__toc_headings_level_seq
   {
-    tocset/part       .meta:nn = {ctex/tocset/part}{#1},
-    tocset/chapter    .meta:nn = {ctex/tocset/chapter}{#1},
-    tocset/section    .meta:nn = {ctex/tocset/section}{#1},
-    tocset/subsection .meta:nn = {ctex/tocset/subsection}{#1},
-    tocset/list       .meta:nn = {ctex/tocset/list}{#1},
+    \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
+    \__ctex_define:nn {tocset}
+      {
+        #1/format .tl_set:c = l__toc_#1_format_tl,
+        #1/indent .tl_set:c = l__toc_#1_indent_tl,
+        #1/rule   .tl_set:c = l__toc_#1_rule_tl
+      }
   }
 \__ctex_define:nn {tocset}
   {
-    part/format       .tl_set:N = \l__toc_part_format_tl,
-    part/format       .initial:n = \addvspace{1pc}\sffamily\large,
-    part/indent       .tl_set:N = \l__toc_part_indent_tl,
-    part/indent       .initial:n = 0\ccwd,
-    part/rule         .tl_set:N = \l__toc_part_rule_tl,
-    part/rule         .initial:n = \tocrule{}[\bfseries],
-
-    chapter/format    .tl_set:N = \l__toc_chapter_format_tl,
-    chapter/format    .initial:n = \addvspace{1pc}\sffamily\large,
-    chapter/indent    .tl_set:N = \l__toc_chapter_indent_tl,
-    chapter/indent    .initial:n = 0\ccwd,
-    chapter/rule      .tl_set:N = \l__toc_chapter_rule_tl,
-    chapter/rule      .initial:n = \tocrule{$\cdot$}[\bfseries],
-
-    section/format    .tl_set:N = \l__toc_section_format_tl,
-    section/format    .initial:n = \addvspace{0.35pc},
-    section/indent    .tl_set:N = \l__toc_section_indent_tl,
-    section/indent    .initial:n = 1.5\ccwd,
-    section/rule      .tl_set:N = \l__toc_section_rule_tl,
-    section/rule      .initial:n = \tocrule{$\cdot$},
-
-    subsection/format .tl_set:N = \l__toc_subsection_format_tl,
-    subsection/format .initial:n = \addvspace{0.35pc},
-    subsection/indent .tl_set:N = \l__toc_subsection_indent_tl,
-    subsection/indent .initial:n = 3.8\ccwd,
-    subsection/rule   .tl_set:N = \l__toc_subsection_rule_tl,
-    subsection/rule   .initial:n = \tocrule{$\cdot$},
-
-    lists/format      .tl_set:N = \l__toc_lists_format_tl,
-    lists/format      .initial:n = \addvspace{0.2pc},
-    lists/indent      .tl_set:N = \l__toc_lists_indent_tl,
-    lists/indent      .initial:n = 0\ccwd,
-    lists/rule        .tl_set:N = \l__toc_lists_rule_tl,
-    lists/rule        .initial:n = \tocrule{$\cdot$},
     lists/lolskip     .skip_set:N = \l__toc_lolskip_skip,
     lists/lolskip     .initial:n = 0.8pc,
     lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim,
     lists/belowoffset .initial:n = 0pc,
-
     belowoffset       .dim_set:N = \l__toc_offset_dim,
     belowoffset       .initial:n = -1pc
   }
+\ctex_set:nn {tocset}
+  {
+    part/format = \addvspace{1pc}\sffamily\large,
+    part/indent = 0\ccwd,
+    part/rule = \tocrule{}[\bfseries],
 
+    chapter/format = \addvspace{1pc}\sffamily\large,
+    chapter/indent = 0\ccwd,
+    chapter/rule = \tocrule{$\cdot$}[\bfseries],
+
+    section/format = \addvspace{0.35pc},
+    section/indent = 1.5\ccwd,
+    section/rule = \tocrule{$\cdot$},
+
+    subsection/format = \addvspace{0.35pc},
+    subsection/indent = 3.8\ccwd,
+    subsection/rule = \tocrule{$\cdot$},
+
+    lists/format = \addvspace{0.2pc},
+    lists/indent = 0\ccwd,
+    lists/rule = \tocrule{$\cdot$}
+  }
+
 \NewDocumentCommand{\tocrule}{O{0.7pc}D(){1.2}mO{}}
   {
     \normalsize\normalfont
@@ -1549,7 +1542,7 @@
     \__arabic:n {section}
   }
 \clist_map_inline:nn
-  {{figure},{table},{lstlisting},{equation}}
+  {figure,table,lstlisting,equation}
   {\__separator_set:n {#1}}
 \cs_gset_protected:Npn \appendix
   {
@@ -1788,10 +1781,10 @@
   }
 \clist_map_inline:nn
   {
-    {array},{matrix},{pmatrix},{bmatrix},{Bmatrix},{vmatrix},{Vmatrix},
-    {matrix*},{pmatrix*},{bmatrix*},{Bmatrix*},{vmatrix*},{Vmatrix*},
-    {cases},{cases*},{dcases},{dcases*},{rcases},{rcases*},{drcases},{drcases*},
-    {aligned},{alignedat},{gathered},{multlined},{lgathered},{rgathered}
+    array,matrix,pmatrix,bmatrix,Bmatrix,vmatrix,Vmatrix,
+    matrix*,pmatrix*,bmatrix*,Bmatrix*,vmatrix*,Vmatrix*,
+    cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
+    aligned,alignedat,gathered,multlined,lgathered,rgathered
   }{\l__math_restore:n {#1}}
 \__patch_cmd:Nnn \start at gather
   {\collect at body}
@@ -2020,9 +2013,7 @@
           {\__put_biblatex:n {style = gb7714-2015}}
         \tl_if_eq:VnT \l__bib_style_tl{authoryear}
           {\__put_biblatex:n {style = gb7714-2015ay}}
-      }{
-        \__put_biblatex:n {style = \l__bib_otherstyle_tl}
-      }
+      }{\__put_biblatex:n {style = \l__bib_otherstyle_tl}}
     \tl_if_empty:NF \l__bib_citestyle_tl
       {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}}
     \__put_biblatex:n {backend = biber}
@@ -2117,7 +2108,6 @@
     columns = flexible
   }
 \lstloadlanguages{C,C++,Java,Python,Matlab}
-\AtBeginEnvironment{verbatim}{\microtypesetup{activate = false}}
 
 \clist_new:N \l__hyperref_clist
 \cs_new_protected:Npn \__put_hyperref:n #1

Modified: branches/branch2020.0/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-03-23 22:31:48 UTC (rev 58670)
+++ branches/branch2020.0/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-03-23 22:32:01 UTC (rev 58671)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/21}{1.23x}{beta}
+\ProvidesExplClass{easybook}{2021/03/23}{1.23z}{beta}
 
 \cs_generate_variant:Nn \keys_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -112,17 +112,16 @@
 \tl_new:N   \l__foot_numberwith_tl
 \tl_new:N   \g__config_tl
 
+\seq_const_from_clist:Nn \c__options_path_seq
+  {
+    style,link,elsefont,
+    spread,bibset,thmset,
+    geoset,hdrset,tocset
+  }
+\seq_map_inline:Nn \c__options_path_seq
+  {\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}}
 \ctex_define:n
   {
-    style               .meta:nn = {ctex/style}{#1},
-    link                .meta:nn = {ctex/link}{#1},
-    spread              .meta:nn = {ctex/spread}{#1},
-    elsefont            .meta:nn = {ctex/elsefont}{#1},
-    bibset              .meta:nn = {ctex/bibset}{#1},
-    thmset              .meta:nn = {ctex/thmset}{#1},
-    geoset              .meta:nn = {ctex/geoset}{#1},
-    hdrset              .meta:nn = {ctex/hdrset}{#1},
-    tocset              .meta:nn = {ctex/tocset}{#1},
     config              .tl_set:N = \g__config_tl,
     lstlistlistingname  .tl_set:N = \lstlistlistingname,
     lstlistingname      .tl_set:N = \lstlistingname
@@ -169,12 +168,11 @@
     xcolor,
     footmisc,setspace,
     amsmath,amsthm,thmtools,cases,
-    chemformula,siunitx,ulem,
+    chemformula,siunitx,ulem,pifont,
     geometry,marginnote,nccfoots,
     pdfpages,graphicx,
     fancyhdr,titletoc,
     caption-light,subcaption,
-    pifont,microtype,
     tabularx,multirow,makecell,booktabs,
     tasks,enumitem,
     listings,
@@ -387,8 +385,10 @@
     headrule      .tl_gset:N = \headrule,
     headrule      .initial:n =
       {
-        \color{ctex at frame}\vspace{1.5pt}
+        \group_begin:
+        \color{ctex at frame}\vspace*{1.5pt}
         \hrule width \textwidth height \l__rule_width_dim
+        \group_end:
       },
     footrule      .tl_gset:N = \footrule,
     footrule      .initial:n = {},
@@ -395,9 +395,11 @@
     footnoterule  .tl_gset:N = \footnoterule,
     footnoterule  .initial:n =
       {
+        \group_begin:
         \color{ctex at frame}
         \hrule width 0.35\columnwidth height \l__rule_width_dim
-        \vspace*{2.6pt}\color{black}
+        \vspace*{2.6pt}
+        \group_end:
       }
   }
 \ctex_at_end_preamble:n
@@ -453,59 +455,50 @@
       }
   }
 
-\ctex_define:n
+\seq_const_from_clist:Nn \c__toc_headings_level_seq
+  {part,chapter,section,subsection,lists}
+\seq_map_inline:Nn \c__toc_headings_level_seq
   {
-    tocset/part       .meta:nn = {ctex/tocset/part}{#1},
-    tocset/chapter    .meta:nn = {ctex/tocset/chapter}{#1},
-    tocset/section    .meta:nn = {ctex/tocset/section}{#1},
-    tocset/subsection .meta:nn = {ctex/tocset/subsection}{#1},
-    tocset/list       .meta:nn = {ctex/tocset/list}{#1},
+    \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
+    \__ctex_define:nn {tocset}
+      {
+        #1/format .tl_set:c = l__toc_#1_format_tl,
+        #1/indent .tl_set:c = l__toc_#1_indent_tl,
+        #1/rule   .tl_set:c = l__toc_#1_rule_tl
+      }
   }
 \__ctex_define:nn {tocset}
   {
-    part/format       .tl_set:N = \l__toc_part_format_tl,
-    part/format       .initial:n = \addvspace{1pc}\sffamily\large,
-    part/indent       .tl_set:N = \l__toc_part_indent_tl,
-    part/indent       .initial:n = 0\ccwd,
-    part/rule         .tl_set:N = \l__toc_part_rule_tl,
-    part/rule         .initial:n = \tocrule{}[\bfseries],
-
-    chapter/format    .tl_set:N = \l__toc_chapter_format_tl,
-    chapter/format    .initial:n = \addvspace{1pc}\sffamily\large,
-    chapter/indent    .tl_set:N = \l__toc_chapter_indent_tl,
-    chapter/indent    .initial:n = 0\ccwd,
-    chapter/rule      .tl_set:N = \l__toc_chapter_rule_tl,
-    chapter/rule      .initial:n = \tocrule{$\cdot$}[\bfseries],
-
-    section/format    .tl_set:N = \l__toc_section_format_tl,
-    section/format    .initial:n = \addvspace{0.35pc},
-    section/indent    .tl_set:N = \l__toc_section_indent_tl,
-    section/indent    .initial:n = 1.5\ccwd,
-    section/rule      .tl_set:N = \l__toc_section_rule_tl,
-    section/rule      .initial:n = \tocrule{$\cdot$},
-
-    subsection/format .tl_set:N = \l__toc_subsection_format_tl,
-    subsection/format .initial:n = \addvspace{0.35pc},
-    subsection/indent .tl_set:N = \l__toc_subsection_indent_tl,
-    subsection/indent .initial:n = 3.8\ccwd,
-    subsection/rule   .tl_set:N = \l__toc_subsection_rule_tl,
-    subsection/rule   .initial:n = \tocrule{$\cdot$},
-
-    lists/format      .tl_set:N = \l__toc_lists_format_tl,
-    lists/format      .initial:n = \addvspace{0.2pc},
-    lists/indent      .tl_set:N = \l__toc_lists_indent_tl,
-    lists/indent      .initial:n = 0\ccwd,
-    lists/rule        .tl_set:N = \l__toc_lists_rule_tl,
-    lists/rule        .initial:n = \tocrule{$\cdot$},
     lists/lolskip     .skip_set:N = \l__toc_lolskip_skip,
     lists/lolskip     .initial:n = 0.8pc,
     lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim,
     lists/belowoffset .initial:n = 0pc,
-
     belowoffset       .dim_set:N = \l__toc_offset_dim,
     belowoffset       .initial:n = -1pc
   }
+\ctex_set:nn {tocset}
+  {
+    part/format = \addvspace{1pc}\sffamily\large,
+    part/indent = 0\ccwd,
+    part/rule = \tocrule{}[\bfseries],
 
+    chapter/format = \addvspace{1pc}\sffamily\large,
+    chapter/indent = 0\ccwd,
+    chapter/rule = \tocrule{$\cdot$}[\bfseries],
+
+    section/format = \addvspace{0.35pc},
+    section/indent = 1.5\ccwd,
+    section/rule = \tocrule{$\cdot$},
+
+    subsection/format = \addvspace{0.35pc},
+    subsection/indent = 3.8\ccwd,
+    subsection/rule = \tocrule{$\cdot$},
+
+    lists/format = \addvspace{0.2pc},
+    lists/indent = 0\ccwd,
+    lists/rule = \tocrule{$\cdot$}
+  }
+
 \NewDocumentCommand{\tocrule}{O{0.7pc}D(){1.2}mO{}}
   {
     \normalsize\normalfont
@@ -777,7 +770,7 @@
     \__arabic:n {section}
   }
 \clist_map_inline:nn
-  {{figure},{table},{lstlisting},{equation}}
+  {figure,table,lstlisting,equation}
   {\__separator_set:n {#1}}
 \cs_gset_protected:Npn \appendix
   {
@@ -1016,10 +1009,10 @@
   }
 \clist_map_inline:nn
   {
-    {array},{matrix},{pmatrix},{bmatrix},{Bmatrix},{vmatrix},{Vmatrix},
-    {matrix*},{pmatrix*},{bmatrix*},{Bmatrix*},{vmatrix*},{Vmatrix*},
-    {cases},{cases*},{dcases},{dcases*},{rcases},{rcases*},{drcases},{drcases*},
-    {aligned},{alignedat},{gathered},{multlined},{lgathered},{rgathered}
+    array,matrix,pmatrix,bmatrix,Bmatrix,vmatrix,Vmatrix,
+    matrix*,pmatrix*,bmatrix*,Bmatrix*,vmatrix*,Vmatrix*,
+    cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
+    aligned,alignedat,gathered,multlined,lgathered,rgathered
   }{\l__math_restore:n {#1}}
 \__patch_cmd:Nnn \start at gather
   {\collect at body}
@@ -1248,9 +1241,7 @@
           {\__put_biblatex:n {style = gb7714-2015}}
         \tl_if_eq:VnT \l__bib_style_tl{authoryear}
           {\__put_biblatex:n {style = gb7714-2015ay}}
-      }{
-        \__put_biblatex:n {style = \l__bib_otherstyle_tl}
-      }
+      }{\__put_biblatex:n {style = \l__bib_otherstyle_tl}}
     \tl_if_empty:NF \l__bib_citestyle_tl
       {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}}
     \__put_biblatex:n {backend = biber}
@@ -1345,7 +1336,6 @@
     columns = flexible
   }
 \lstloadlanguages{C,C++,Java,Python,Matlab}
-\AtBeginEnvironment{verbatim}{\microtypesetup{activate = false}}
 
 \clist_new:N \l__hyperref_clist
 \cs_new_protected:Npn \__put_hyperref:n #1



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