texlive[60026] Master/texmf-dist: easybook (23jul21)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 23 22:08:36 CEST 2021


Revision: 60026
          http://tug.org/svn/texlive?view=revision&revision=60026
Author:   karl
Date:     2021-07-23 22:08:35 +0200 (Fri, 23 Jul 2021)
Log Message:
-----------
easybook (23jul21)

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
    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/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-07-23 20:08:18 UTC (rev 60025)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-07-23 20:08:35 UTC (rev 60026)
@@ -28,7 +28,7 @@
 %
 % \title{\sffamily easybook 文档类手册}
 % \author{瞿毅}
-% \date{2021/07/19\hskip\ccwd\relax v1.27K\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/22\hskip 1em\relax v1.27L\thanks{\url{https://gitee.com/texl3/easybook}}}
 %
 % \maketitle
 % \begin{abstract}
@@ -148,7 +148,7 @@
 %   cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
 % \end{syntax}
 % 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
-% \changes{v1.27K}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
+% \changes{v1.27L}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
 % \end{function}
 %
 % 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
@@ -535,10 +535,10 @@
 %   bodyfont = <(empty)>
 %   notefont = <(empty)>
 %   headfont = <(\tn{color}\{ctex at emph\}\tn{sffamily})>
-%   headindent = <刚性长度|(0\tn{ccwd})>
+%   headindent = <刚性长度|(0em)>
 %   spaceabove = <弹性长度|(0.75ex plus .1ex)>
 %   spacebelow = <弹性长度|(0.75ex plus .1ex)>
-%   spacepost = <刚性长度|(\tn{ccwd})>
+%   spacepost = <刚性长度|(1em)>
 %   headformat = <(\tn{NAME}\tn{space}\tn{NUMBER}\tn{NOTE})>
 %   brackets = \{<左括号>,<右括号>\}
 % \end{syntax}
@@ -612,7 +612,7 @@
 % \end{ctexexam}
 % 定义一个新的定理样式可用于 \tn{declaretheorem} 的 \opt{style} 选项:
 % \begin{ctexexam}
-%   \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
+%   \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5em]{定理样式名}
 % \end{ctexexam}
 %
 % \subsection{页面尺寸}
@@ -672,7 +672,7 @@
 % \begin{ctexexam}
 %   \hdrset
 %     {
-%       chap-label  = [\thechapter]{\hspace{\ccwd}},
+%       chap-label  = [\thechapter]{\hspace{1em}},
 %       sec-mark    = \CTEXifname{\CTEXthesection——}{}#1
 %     }
 % \end{ctexexam}
@@ -705,9 +705,9 @@
 % \subsubsection{脚注格式}
 % \begin{function}[EXP,added = 2021-05-12,updated = 2021-07-14]{fnmargin,fnparskip,fnparindent,footnotetype,fnmark-pos,fnmark-num,fnmark-num,fnmark-form,fntext-form,afterfnmark}
 % \begin{syntax}
-%   fnmargin = <刚性长度|(0.75\tn{ccwd})>
+%   fnmargin = <刚性长度|(0.75em)>
 %   fnparskip = <弹性长度|(0ex)>
-%   fnparindent = <刚性长度|(2\tn{ccwd})>
+%   fnparindent = <刚性长度|(2em)>
 %   footnotetype = <(hang)|default|bottom>
 %   fnmark-pos = <normal|(super)>
 %   fnmark-num = <(plain)|pifont|pifont*|pifont-sans|pifont-sans*>
@@ -717,7 +717,7 @@
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{hdrset/...} \\
 % \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。}
-% \changes{v1.27K}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
+% \changes{v1.27L}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -744,7 +744,7 @@
 %   format += <目录标题格式>
 %   indent = <目录标题左边缩进>
 %   rule = <目录引导线样式>
-%   numsep = <编号后间距|(\tn{ccwd})>
+%   numsep = <编号后间距|(1em)>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{tocset/(level)/...} \\
 % \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{(level)} 代表 part、chapter、section、subsection、figure、table 和 lstlisting 级别的目录,而使用 list 级别可以统一设置图片、表格和代码目录的样式。
@@ -770,7 +770,7 @@
 %       chapter     =
 %         {
 %           format  = \addvspace{8pt}\large,
-%           indent  = 1.5\ccwd,
+%           indent  = 1.5em,
 %           rule    = \tocrule[0.6pc](1.1){.}[\zihao{5}]
 %         }
 %     }
@@ -786,7 +786,7 @@
 %   belowoffset = <长度|(-1pc)>
 %   line-align = <(true)|false>
 %   hang = <true|(false)>
-%   numsep-all = <编号后间距|(\tn{ccwd})>
+%   numsep-all = <编号后间距|(1em)>
 %   indent-all = <目录标题左边缩进>
 %   rule-all = <目录引导线样式>
 % \end{syntax}
@@ -805,8 +805,8 @@
 %   \tocset
 %     {
 %       hang        = false,
-%       tocline-fig = 图 #1\hspace{\ccwd},
-%       tocline-lst = 代码\thelstlisting\hspace{\ccwd}
+%       tocline-fig = 图 #1\hspace{1em},
+%       tocline-lst = 代码\thelstlisting\hspace{1em}
 %     }
 %   \end{ctexexam}
 %   \item[line-align] \opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。
@@ -905,7 +905,7 @@
 %   \tn{end}\{hangparas\}
 % \end{syntax}
 % \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27K}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
+% \changes{v1.27L}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
 % \end{function}
 %
 % \subsection{代码}
@@ -936,7 +936,7 @@
 %   color = <标题背景颜色名|(DeepSkyBlue)>
 %   title = <环境标题>
 %   number = <习题编号格式|(1.)>
-%   numsep = <编号与标题的间距|(0.5\tn{ccwd})>
+%   numsep = <编号与标题的间距|(0.5em)>
 %   label = <标签内容>
 % \end{syntax}
 % 第二个 \meta{键值列表} 在是否使用 + 号参数时用法不同,使用 + 号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用 + 号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。\opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb at exercise。
@@ -1056,7 +1056,7 @@
 % \begin{ctexexam}
 %   \labelformat{eb at theorem}{定理 #1}
 %   \newcommand{\theoremhead}[1]
-%     {定理 \UseCounter[chapter]{theorem}{\hspace{\ccwd}#1}}
+%     {定理 \UseCounter[chapter]{theorem}{\hspace{1em}#1}}
 %   \theoremhead{定理标题}\label{thm:theorem}
 % \end{ctexexam}
 %
@@ -1069,6 +1069,43 @@
 % 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐在导言区载入 \pkg{chemfig} 宏包,使用 \tn{chemfig} 命令完成。
 % \end{function}
 %
+% \subsection{公式符号对照}
+% \begin{function}[added = 2021-07-22]{\seteqcomp,\symb,eqcomp}
+% \begin{syntax}
+%   \tn{seteqcomp}\marg{键值列表}
+%   \tn{symb*}\marg{符号}\oarg{引导符}
+%   \tn{begin}\{eqcomp\}\oarg{键值列表}\parg{键值列表}
+%   \  \tn{symb}\marg{符号}\oarg{引导符}<说明文字>
+%   \tn{end}\{eqcomp\}
+% \end{syntax}
+% 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表第二个 \meta{键值列表} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。第一个 \meta{键值列表} 也可以使用 \tn{seteqcomp} 全局设置,选项如下:
+% \changes{v1.27L}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。}
+% \end{function}
+%
+% \begin{function}{width,delim,space,item-align,delim-align,intro,font,mode}
+% \begin{syntax}
+%   width = <符号宽度|(2em)>
+%   delim = <引导符|(——)>
+%   space = <符号间隙|(0.25em)>
+%   item-align = <l|c|(r)>
+%   delim-align = <l|(c)|r>
+%   intro = <首行文字>
+%   font = <符号字体>
+%   mode = <(math)|text>
+% \end{syntax}
+% \end{function}
+%
+% \begin{optdesc}
+%   \item[width] 设置适当的符号宽度可以防止文字重叠和边界溢出等问题。
+%   \item[delim] 符号对照的引导符,\tn{symb} 的 \meta{引导符} 和对齐方式是基于这个符号的宽度。
+%   \item[space] 符号间隙为引导符两侧与符号和说明文字间的距离。
+%   \item[item-align] 符号的对齐方式,分为左(l)、中(c)和右(r)三种对齐方式。
+%   \item[delim-align] 引导符的对齐方式,分为左(l)、中(c)和右(r)三种对齐方式。
+%   \item[intro] 符号对照的说明文字,应当为简短的几个字,只显示在第一行,其后为悬挂缩进的对照列表。
+%   \item[font] 符号的字体,数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。
+%   \item[mode] 符号字体模式,可以为数学字体或者文本字体。
+% \end{optdesc}
+%
 % \subsection{引用}
 % \begin{function}[added = 2021-01-05,updated = 2021-07-15]{\ref,\footref,\labelformat}
 % \begin{syntax}
@@ -1290,7 +1327,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/19}{1.27K}
+\ProvidesExplClass{easybook}{2021/07/22}{1.27L}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -1525,7 +1562,7 @@
           {
             \bool_if:NTF \l__eb_title_newline_bool
               { \par\nobreak }
-              { \hspace{\ccwd} }
+              { \hspace{1em} }
           }
       },
     chapter         =
@@ -1540,7 +1577,7 @@
           {
             \bool_if:NTF \l__eb_title_newline_bool
               { \par\nobreak\vskip 1.5pc }
-              { \hspace{\ccwd} }
+              { \hspace{1em} }
           },
         beforeskip  = -1.5ex,
         afterskip   = 3ex,
@@ -1551,7 +1588,7 @@
       {
         hang        = true,
         format      = \color{ctex at frame}\sffamily\Large,
-        aftername   = \hspace{0.5\ccwd},
+        aftername   = \hspace{0.5em},
         beforeskip  = 1.5ex plus .2ex minus .1ex,
         afterskip   = 1.5ex plus .2ex minus .1ex
       },
@@ -1559,7 +1596,7 @@
       {
         hang        = true,
         format      = \color{ctex at frame}\sffamily\large,
-        aftername   = \hspace{0.5\ccwd},
+        aftername   = \hspace{0.5em},
         beforeskip  = 1.3ex plus .2ex minus .1ex,
         afterskip   = 1.3ex plus .2ex minus .1ex
       },
@@ -1567,7 +1604,7 @@
       {
         hang        = true,
         format      = \color{ctex at frame}\sffamily,
-        aftername   = \hspace{0.5\ccwd},
+        aftername   = \hspace{0.5em},
         beforeskip  = \parskip,
         afterskip   = \parskip
       }
@@ -1584,7 +1621,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/19}{1.27K}
+\ProvidesExplPackage{easybase}{2021/07/22}{1.27L}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1834,7 +1871,7 @@
   {
     vmargin         = 2.54cm,
     hmargin         = 3.17cm,
-    columnsep       = 2\ccwd,
+    columnsep       = 2em,
     headheight      = 2.04cm,
     headsep         = 0.5cm,
     footskip        = 0.79cm,
@@ -1932,11 +1969,11 @@
     subsec-mark .initial:n  =
       { \CTEXifname{\eb at mark@subsection at label}{}#1 },
     chap-label .code:n      = \eb_mark_chapter_number_bool:n {#1},
-    chap-label .initial:n   = \hspace{\ccwd},
+    chap-label .initial:n   = \hspace{1em},
     sec-label .code:n       = \eb_mark_section_number_bool:n {#1},
-    sec-label .initial:n    = \hspace{0.5\ccwd},
+    sec-label .initial:n    = \hspace{0.5em},
     subsec-label .code:n    = \eb_mark_subsection_number_bool:n {#1},
-    subsec-label .initial:n = \hspace{0.5\ccwd},
+    subsec-label .initial:n = \hspace{0.5em},
 
     headrule .tl_gset:N     = \headrule,
     headrule .initial:n     = \markrule{\l__eb_rule_width_dim},
@@ -2010,11 +2047,11 @@
 \ctex_define:nn { hdrset }
   {
     fnmargin .dim_set:N             = \footnoteindent,
-    fnmargin .initial:n             = 0.75\ccwd,
+    fnmargin .initial:n             = 0.75em,
     fnparskip .skip_set:N           = \footparskip,
     fnparskip .initial:n            = 0ex,
     fnparindent .dim_set:N          = \footparindent,
-    fnparindent .initial:n          = 2\ccwd,
+    fnparindent .initial:n          = 2em,
     fntext-form .tl_set:N           = \l__eb_fntext_format_tl,
 
     fnmark-pos .tl_set:N            = \l__eb_fnmark_position_tl,
@@ -2342,7 +2379,7 @@
         subsection/numsep = #1,
         list/numsep       = #1
       },
-    numsep-all .initial:n = \ccwd,
+    numsep-all .initial:n = 1em,
     indent-all .meta:n    =
       {
         part/indent       = #1,
@@ -2385,25 +2422,25 @@
 \ctex_set:nn { tocset }
   {
     part/format       = \addvspace{1pc}\sffamily\large,
-    part/indent       = 0\ccwd,
+    part/indent       = 0em,
     part/rule         = \tocrule{}[\bfseries],
 
     chapter/format    = \addvspace{1pc}\sffamily\large,
-    chapter/indent    = 0\ccwd,
+    chapter/indent    = 0em,
     chapter/rule      = \tocrule{$\cdot$}[\bfseries],
 
     section/format    = \addvspace{0.35pc},
     section/indent    =
-      { \bool_if:NTF \l__eb_class_book_bool { 1.5\ccwd } { 0\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
     section/rule      = \tocrule{$\cdot$},
 
     subsection/format = \addvspace{0.35pc},
     subsection/indent =
-      { \bool_if:NTF \l__eb_class_book_bool { 3.8\ccwd } { 1.4\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
     subsection/rule   = \tocrule{$\cdot$},
 
     list/format       = \addvspace{0.2pc},
-    list/indent       = 0\ccwd,
+    list/indent       = 0em,
     list/rule         = \tocrule{$\cdot$},
     list/belowoffset  =
       { \bool_if:NTF \l__eb_class_book_bool { 0pc } { 0.15pc } }
@@ -2828,7 +2865,6 @@
     unknown .code:n = \eb_msg_unknown_option:n { spread }
   }
 
-\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
 \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
 \DeclareCaptionFont{eb at table@font}{\l__eb_subfont_table_tl}
 \DeclareCaptionFont{eb at figure@font}{\l__eb_subfont_figure_tl}
@@ -2838,7 +2874,7 @@
     format          = hang,
     font = {stretch = \fp_use:N \l__eb_spread_caption_fp},
     labelfont       = {color = ctex at frame},
-    labelsep        = ccwd,
+    labelsep        = quad,
     singlelinecheck = true,
     belowskip       = 0pt,
     aboveskip       = 10pt
@@ -2935,14 +2971,16 @@
 \SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*}
 \setlist
   {
-    labelsep = 0.75\ccwd,listparindent = 2\ccwd,leftmargin = *,
+    labelsep = 0.75em,listparindent = 2em,leftmargin = *,
     itemsep = 0.75ex plus .1ex,topsep = 0.75ex plus .1ex,
     partopsep = 0ex,parsep = 0ex
   }
 \newlist{eb at outline@list}{itemize}{1}
 \newlist{eb at exercise@list}{enumerate}{2}
+\newlist{eb at eqcomp@list}{description}{1}
 \setlist[eb at outline@list]{label = outline,itemsep = 0.5ex plus .1ex}
-\setlist[eb at exercise@list]{labelsep = 0.5\ccwd}
+\setlist[eb at exercise@list]{labelsep = 0.5em}
+\setlist[eb at eqcomp@list]{labelsep = 0em,nosep}
 \setlist[itemize,1]{label = bullet}
 \setlist[itemize,2]{label = endash}
 \setlist[itemize,3]{label = asterisk}
@@ -2949,8 +2987,76 @@
 \setlist[enumerate,1]{label = arabic,ref = \arabic*}
 \setlist[enumerate,2]{label = alph,ref = enumii}
 \setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
-\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
+\setlist[description]{font = sf,labelwidth = *,leftmargin = 2em}
 
+\keys_define:nn { eb/eqcomp }
+  {
+    width .dim_set:N        = \l__eb_eqsymb_width_dim,
+    width .initial:n        = 2em,
+    delim .tl_set:N         = \l__eb_eqsymb_delim_tl,
+    delim .initial:n        = { —— },
+    space .dim_set:N        = \l__eb_eqsymb_space_dim,
+    space .initial:n        = 0.25em,
+    item-align .tl_set:N    = \l__eb_eqsymb_item_align_tl,
+    item-align .initial:n   = r,
+    delim-align .tl_set:N   = \l__eb_eqsymb_delim_align_tl,
+    delim-align .initial:n  = c,
+    intro .tl_set:          = \l__eb_eqsymb_intro_tl,
+    font .tl_set:N          = \l__eb_eqsymb_font_tl,
+    mode .tl_set:N          = \l__eb_eqsymb_mode_tl,
+    mode .initial:n         = math
+  }
+\cs_new_protected:Npn \seteqcomp #1
+  { \keys_set:nn { eb/eqcomp} {#1} }
+
+\cs_new:Npn \eb at itembox { \item\makebox }
+\cs_new:Npn \eb_eqsymb_left_margin_calc:
+  {
+    \hbox_set:Nn \l_tmpa_box { \l__eb_eqsymb_delim_tl }
+    \hbox_set:Nn \l_tmpb_box { \l__eb_eqsymb_intro_tl }
+    \dim_set:Nn \l_tmpa_dim
+      {
+        \box_wd:N \l_tmpb_box +
+        \l__eb_eqsymb_width_dim +
+        \l__eb_eqsymb_space_dim +
+        \box_wd:N \l_tmpa_box +
+        \l__eb_eqsymb_space_dim
+      }
+  }
+\NewDocumentEnvironment{eqcomp}{oD(){}+b}
+  {
+    \IfValueT{#1}{\keys_set:nn { eb/eqcomp } {#1}}
+    \eb_eqsymb_left_margin_calc:
+    \begin{eb at eqcomp@list}[#2]
+      #3
+    \end{eb at eqcomp@list}
+  }{}
+\NewDocumentCommand{\symb}{smO{\l__eb_eqsymb_delim_tl}}
+  {
+    \IfBooleanTF{#1}
+      {
+        \eb_eqsymb_left_margin_calc:
+        \makebox
+      }
+      {\eb at itembox}[\l_tmpa_dim]
+      {
+        \makebox[\box_wd:N \l_tmpb_box]{\l__eb_eqsymb_intro_tl}
+        \makebox[\l__eb_eqsymb_width_dim][\l__eb_eqsymb_item_align_tl]
+          {
+            \tl_use:N \l__eb_eqsymb_font_tl
+              {
+                \tl_if_eq:NnT \l__eb_eqsymb_mode_tl { math } 
+                  { \ensuremath }{#2}
+              }
+          }
+        \hspace{\l__eb_eqsymb_space_dim}
+        \makebox[\box_wd:N \l_tmpa_box][\l__eb_eqsymb_delim_align_tl]{#3}
+        \hspace{\l__eb_eqsymb_space_dim}
+      }
+    \tl_clear:N \l__eb_eqsymb_intro_tl
+    \ignorespaces
+  }
+
 \cs_new_protected:Npn \eb_thm_name_set:nnn #1#2#3
   {
     \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
@@ -3030,9 +3136,9 @@
   {
     spaceabove    = 0.75ex plus .1ex,
     spacebelow    = 0.75ex plus .1ex,
-    headindent    = 0\ccwd,
+    headindent    = 0em,
     headfont      = \color{ctex at emph}\sffamily,
-    postheadspace = \ccwd,
+    postheadspace = 1em,
     within        = \bool_if:NT \l__eb_class_book_bool { chapter },
     headformat    = \NAME\space\NUMBER\NOTE
   }
@@ -3059,7 +3165,7 @@
 \setchemformula
   {
     math-scripts      = false,
-    charge-hshift     = 0.25\ccwd,
+    charge-hshift     = 0.25em,
     subscript-vshift  = -0.2ex
   }
 \IfPackageAtLeastTF{siunitx}{2021/06/22}
@@ -3121,7 +3227,7 @@
     title .tl_set:N   = \eb at tc@exercise at title,
     title .initial:n  = \c__eb_name_exercise_tl,
     numsep .dim_set:N = \eb at toc@exercise at numsep,
-    numsep .initial:n = 0.5\ccwd,
+    numsep .initial:n = 0.5em,
     label .tl_set:N   = \eb at tc@exercise at label
   }
 \cs_new_protected:Npn \setexercise #1
@@ -3431,9 +3537,9 @@
   {
     \keys_set_known:nn { ctex }
       {
-        contentsname        = 目\hspace{\ccwd}录,
-        indexname           = 索\hspace{\ccwd}引,
-        abstractname        = 摘\hspace{\ccwd}要,
+        contentsname        = 目\hspace{1em}录,
+        indexname           = 索\hspace{1em}引,
+        abstractname        = 摘\hspace{1em}要,
         listfigurename      = 图片索引,
         listtablename       = 表格索引,
         lstlistlistingname  = 代码索引,
@@ -3456,7 +3562,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/19}{1.27K}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/22}{1.27L}
   {Customization of tcolorbox for easybook}
 
 \cs_new_protected:Npn \eb_tcb_theorem_set:n #1

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-07-23 20:08:18 UTC (rev 60025)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-07-23 20:08:35 UTC (rev 60026)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/19}{1.27K}
+\ProvidesExplPackage{easybase}{2021/07/22}{1.27L}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -263,7 +263,7 @@
   {
     vmargin         = 2.54cm,
     hmargin         = 3.17cm,
-    columnsep       = 2\ccwd,
+    columnsep       = 2em,
     headheight      = 2.04cm,
     headsep         = 0.5cm,
     footskip        = 0.79cm,
@@ -361,11 +361,11 @@
     subsec-mark .initial:n  =
       { \CTEXifname{\eb at mark@subsection at label}{}#1 },
     chap-label .code:n      = \eb_mark_chapter_number_bool:n {#1},
-    chap-label .initial:n   = \hspace{\ccwd},
+    chap-label .initial:n   = \hspace{1em},
     sec-label .code:n       = \eb_mark_section_number_bool:n {#1},
-    sec-label .initial:n    = \hspace{0.5\ccwd},
+    sec-label .initial:n    = \hspace{0.5em},
     subsec-label .code:n    = \eb_mark_subsection_number_bool:n {#1},
-    subsec-label .initial:n = \hspace{0.5\ccwd},
+    subsec-label .initial:n = \hspace{0.5em},
 
     headrule .tl_gset:N     = \headrule,
     headrule .initial:n     = \markrule{\l__eb_rule_width_dim},
@@ -439,11 +439,11 @@
 \ctex_define:nn { hdrset }
   {
     fnmargin .dim_set:N             = \footnoteindent,
-    fnmargin .initial:n             = 0.75\ccwd,
+    fnmargin .initial:n             = 0.75em,
     fnparskip .skip_set:N           = \footparskip,
     fnparskip .initial:n            = 0ex,
     fnparindent .dim_set:N          = \footparindent,
-    fnparindent .initial:n          = 2\ccwd,
+    fnparindent .initial:n          = 2em,
     fntext-form .tl_set:N           = \l__eb_fntext_format_tl,
 
     fnmark-pos .tl_set:N            = \l__eb_fnmark_position_tl,
@@ -771,7 +771,7 @@
         subsection/numsep = #1,
         list/numsep       = #1
       },
-    numsep-all .initial:n = \ccwd,
+    numsep-all .initial:n = 1em,
     indent-all .meta:n    =
       {
         part/indent       = #1,
@@ -814,25 +814,25 @@
 \ctex_set:nn { tocset }
   {
     part/format       = \addvspace{1pc}\sffamily\large,
-    part/indent       = 0\ccwd,
+    part/indent       = 0em,
     part/rule         = \tocrule{}[\bfseries],
 
     chapter/format    = \addvspace{1pc}\sffamily\large,
-    chapter/indent    = 0\ccwd,
+    chapter/indent    = 0em,
     chapter/rule      = \tocrule{$\cdot$}[\bfseries],
 
     section/format    = \addvspace{0.35pc},
     section/indent    =
-      { \bool_if:NTF \l__eb_class_book_bool { 1.5\ccwd } { 0\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
     section/rule      = \tocrule{$\cdot$},
 
     subsection/format = \addvspace{0.35pc},
     subsection/indent =
-      { \bool_if:NTF \l__eb_class_book_bool { 3.8\ccwd } { 1.4\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
     subsection/rule   = \tocrule{$\cdot$},
 
     list/format       = \addvspace{0.2pc},
-    list/indent       = 0\ccwd,
+    list/indent       = 0em,
     list/rule         = \tocrule{$\cdot$},
     list/belowoffset  =
       { \bool_if:NTF \l__eb_class_book_bool { 0pc } { 0.15pc } }
@@ -1257,7 +1257,6 @@
     unknown .code:n = \eb_msg_unknown_option:n { spread }
   }
 
-\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
 \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
 \DeclareCaptionFont{eb at table@font}{\l__eb_subfont_table_tl}
 \DeclareCaptionFont{eb at figure@font}{\l__eb_subfont_figure_tl}
@@ -1267,7 +1266,7 @@
     format          = hang,
     font = {stretch = \fp_use:N \l__eb_spread_caption_fp},
     labelfont       = {color = ctex at frame},
-    labelsep        = ccwd,
+    labelsep        = quad,
     singlelinecheck = true,
     belowskip       = 0pt,
     aboveskip       = 10pt
@@ -1364,14 +1363,16 @@
 \SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*}
 \setlist
   {
-    labelsep = 0.75\ccwd,listparindent = 2\ccwd,leftmargin = *,
+    labelsep = 0.75em,listparindent = 2em,leftmargin = *,
     itemsep = 0.75ex plus .1ex,topsep = 0.75ex plus .1ex,
     partopsep = 0ex,parsep = 0ex
   }
 \newlist{eb at outline@list}{itemize}{1}
 \newlist{eb at exercise@list}{enumerate}{2}
+\newlist{eb at eqcomp@list}{description}{1}
 \setlist[eb at outline@list]{label = outline,itemsep = 0.5ex plus .1ex}
-\setlist[eb at exercise@list]{labelsep = 0.5\ccwd}
+\setlist[eb at exercise@list]{labelsep = 0.5em}
+\setlist[eb at eqcomp@list]{labelsep = 0em,nosep}
 \setlist[itemize,1]{label = bullet}
 \setlist[itemize,2]{label = endash}
 \setlist[itemize,3]{label = asterisk}
@@ -1378,8 +1379,76 @@
 \setlist[enumerate,1]{label = arabic,ref = \arabic*}
 \setlist[enumerate,2]{label = alph,ref = enumii}
 \setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
-\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
+\setlist[description]{font = sf,labelwidth = *,leftmargin = 2em}
 
+\keys_define:nn { eb/eqcomp }
+  {
+    width .dim_set:N        = \l__eb_eqsymb_width_dim,
+    width .initial:n        = 2em,
+    delim .tl_set:N         = \l__eb_eqsymb_delim_tl,
+    delim .initial:n        = { —— },
+    space .dim_set:N        = \l__eb_eqsymb_space_dim,
+    space .initial:n        = 0.25em,
+    item-align .tl_set:N    = \l__eb_eqsymb_item_align_tl,
+    item-align .initial:n   = r,
+    delim-align .tl_set:N   = \l__eb_eqsymb_delim_align_tl,
+    delim-align .initial:n  = c,
+    intro .tl_set:          = \l__eb_eqsymb_intro_tl,
+    font .tl_set:N          = \l__eb_eqsymb_font_tl,
+    mode .tl_set:N          = \l__eb_eqsymb_mode_tl,
+    mode .initial:n         = math
+  }
+\cs_new_protected:Npn \seteqcomp #1
+  { \keys_set:nn { eb/eqcomp} {#1} }
+
+\cs_new:Npn \eb at itembox { \item\makebox }
+\cs_new:Npn \eb_eqsymb_left_margin_calc:
+  {
+    \hbox_set:Nn \l_tmpa_box { \l__eb_eqsymb_delim_tl }
+    \hbox_set:Nn \l_tmpb_box { \l__eb_eqsymb_intro_tl }
+    \dim_set:Nn \l_tmpa_dim
+      {
+        \box_wd:N \l_tmpb_box +
+        \l__eb_eqsymb_width_dim +
+        \l__eb_eqsymb_space_dim +
+        \box_wd:N \l_tmpa_box +
+        \l__eb_eqsymb_space_dim
+      }
+  }
+\NewDocumentEnvironment{eqcomp}{oD(){}+b}
+  {
+    \IfValueT{#1}{\keys_set:nn { eb/eqcomp } {#1}}
+    \eb_eqsymb_left_margin_calc:
+    \begin{eb at eqcomp@list}[#2]
+      #3
+    \end{eb at eqcomp@list}
+  }{}
+\NewDocumentCommand{\symb}{smO{\l__eb_eqsymb_delim_tl}}
+  {
+    \IfBooleanTF{#1}
+      {
+        \eb_eqsymb_left_margin_calc:
+        \makebox
+      }
+      {\eb at itembox}[\l_tmpa_dim]
+      {
+        \makebox[\box_wd:N \l_tmpb_box]{\l__eb_eqsymb_intro_tl}
+        \makebox[\l__eb_eqsymb_width_dim][\l__eb_eqsymb_item_align_tl]
+          {
+            \tl_use:N \l__eb_eqsymb_font_tl
+              {
+                \tl_if_eq:NnT \l__eb_eqsymb_mode_tl { math }
+                  { \ensuremath }{#2}
+              }
+          }
+        \hspace{\l__eb_eqsymb_space_dim}
+        \makebox[\box_wd:N \l_tmpa_box][\l__eb_eqsymb_delim_align_tl]{#3}
+        \hspace{\l__eb_eqsymb_space_dim}
+      }
+    \tl_clear:N \l__eb_eqsymb_intro_tl
+    \ignorespaces
+  }
+
 \cs_new_protected:Npn \eb_thm_name_set:nnn #1#2#3
   {
     \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
@@ -1459,9 +1528,9 @@
   {
     spaceabove    = 0.75ex plus .1ex,
     spacebelow    = 0.75ex plus .1ex,
-    headindent    = 0\ccwd,
+    headindent    = 0em,
     headfont      = \color{ctex at emph}\sffamily,
-    postheadspace = \ccwd,
+    postheadspace = 1em,
     within        = \bool_if:NT \l__eb_class_book_bool { chapter },
     headformat    = \NAME\space\NUMBER\NOTE
   }
@@ -1488,7 +1557,7 @@
 \setchemformula
   {
     math-scripts      = false,
-    charge-hshift     = 0.25\ccwd,
+    charge-hshift     = 0.25em,
     subscript-vshift  = -0.2ex
   }
 \IfPackageAtLeastTF{siunitx}{2021/06/22}
@@ -1550,7 +1619,7 @@
     title .tl_set:N   = \eb at tc@exercise at title,
     title .initial:n  = \c__eb_name_exercise_tl,
     numsep .dim_set:N = \eb at toc@exercise at numsep,
-    numsep .initial:n = 0.5\ccwd,
+    numsep .initial:n = 0.5em,
     label .tl_set:N   = \eb at tc@exercise at label
   }
 \cs_new_protected:Npn \setexercise #1
@@ -1860,9 +1929,9 @@
   {
     \keys_set_known:nn { ctex }
       {
-        contentsname        = 目\hspace{\ccwd}录,
-        indexname           = 索\hspace{\ccwd}引,
-        abstractname        = 摘\hspace{\ccwd}要,
+        contentsname        = 目\hspace{1em}录,
+        indexname           = 索\hspace{1em}引,
+        abstractname        = 摘\hspace{1em}要,
         listfigurename      = 图片索引,
         listtablename       = 表格索引,
         lstlistlistingname  = 代码索引,

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-07-23 20:08:18 UTC (rev 60025)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-07-23 20:08:35 UTC (rev 60026)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/19}{1.27K}
+\ProvidesExplClass{easybook}{2021/07/22}{1.27L}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -248,7 +248,7 @@
           {
             \bool_if:NTF \l__eb_title_newline_bool
               { \par\nobreak }
-              { \hspace{\ccwd} }
+              { \hspace{1em} }
           }
       },
     chapter         =
@@ -263,7 +263,7 @@
           {
             \bool_if:NTF \l__eb_title_newline_bool
               { \par\nobreak\vskip 1.5pc }
-              { \hspace{\ccwd} }
+              { \hspace{1em} }
           },
         beforeskip  = -1.5ex,
         afterskip   = 3ex,
@@ -274,7 +274,7 @@
       {
         hang        = true,
         format      = \color{ctex at frame}\sffamily\Large,
-        aftername   = \hspace{0.5\ccwd},
+        aftername   = \hspace{0.5em},
         beforeskip  = 1.5ex plus .2ex minus .1ex,
         afterskip   = 1.5ex plus .2ex minus .1ex
       },
@@ -282,7 +282,7 @@
       {
         hang        = true,
         format      = \color{ctex at frame}\sffamily\large,
-        aftername   = \hspace{0.5\ccwd},
+        aftername   = \hspace{0.5em},
         beforeskip  = 1.3ex plus .2ex minus .1ex,
         afterskip   = 1.3ex plus .2ex minus .1ex
       },
@@ -290,7 +290,7 @@
       {
         hang        = true,
         format      = \color{ctex at frame}\sffamily,
-        aftername   = \hspace{0.5\ccwd},
+        aftername   = \hspace{0.5em},
         beforeskip  = \parskip,
         afterskip   = \parskip
       }

Modified: trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2021-07-23 20:08:18 UTC (rev 60025)
+++ trunk/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg	2021-07-23 20:08:35 UTC (rev 60026)
@@ -11,7 +11,7 @@
 %% conditions of the CC-BY 4.0 License.
 %% The latest version of this license is in
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/19}{1.27K}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/22}{1.27L}
   {Customization of tcolorbox for easybook}
 
 \cs_new_protected:Npn \eb_tcb_theorem_set:n #1



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