texlive[59773] Master/texmf-dist: easybook (30jun21)

commits+karl at tug.org commits+karl at tug.org
Wed Jun 30 23:17:08 CEST 2021


Revision: 59773
          http://tug.org/svn/texlive?view=revision&revision=59773
Author:   karl
Date:     2021-06-30 23:17:07 +0200 (Wed, 30 Jun 2021)
Log Message:
-----------
easybook (30jun21)

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-30 21:16:55 UTC (rev 59772)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-06-30 21:17:07 UTC (rev 59773)
@@ -28,7 +28,7 @@
 %
 % \title{\sffamily easybook 文档类手册}
 % \author{瞿毅}
-% \date{2021/06/28\hskip\ccwd\relax v1.26m\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/06/30\hskip\ccwd\relax v1.26n\thanks{\url{https://gitee.com/texl3/easybook}}}
 %
 % \maketitle
 % \begin{abstract}
@@ -157,7 +157,7 @@
 %   floatpage = <true|(false)>
 % \end{syntax}
 % 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
-% \changes{v1.26m}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
+% \changes{v1.26n}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
 % \end{function}
 %
 % \subsection{article 模式}
@@ -239,7 +239,7 @@
 %   \tn{EBeforeAddBitoc*}\marg{加入目录英文标题前的代码}
 % \end{syntax}
 % \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。
-% \changes{v1.26m}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
+% \changes{v1.26n}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
 % \end{function}
 %
 % \tn{EBeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。
@@ -254,7 +254,7 @@
 %   \          \oarg{水平偏移}\parg{下标代码}
 % \end{syntax}
 % 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsec:style}。
-% \changes{v1.26m}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
+% \changes{v1.26n}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
 % \end{function}
 %
 % 垂直和水平偏移默认值都是0 pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。\tn{textsuperscript} 和 \tn{textsubscript} 命令已被重新定义并且分别等价于 \tn{super} 和 \tn{sub},如果您需要使用它们的原始定义创建新命令,则可以使用 \tn{spb at textsuperscript@save} 和 \tn{spb at textsubscript@save} 命令。
@@ -383,7 +383,7 @@
 %   spread-all = <数值|(empty)>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{spread/...} \\
-% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
+% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为:
 % \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
 % \changes{v1.23}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
 % \end{function}
@@ -454,7 +454,7 @@
 % \end{function}
 %
 % \begin{optdesc}
-%   \item[\tn{printbibliography}] 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
+%   \item[\tn{printbibliography}] 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下:
 %     \begin{function}{heading,title}
 %     \begin{syntax}
 %     heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
@@ -510,7 +510,7 @@
 % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。
 % \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
 % \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EBNewTheorem}。}
-% \changes{v1.26m}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
+% \changes{v1.26n}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -521,7 +521,7 @@
 %       \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
 %       \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
 %     \end{description}
-%   \item[\tn{EBNewTheorem}] \tn{EBNewTheorem} 是更便捷的定理命令,它定义一个新的定理环境,\meta{键值列表} 支持的选项与 \tn{declaretheorem} 相同,但它们的区别有
+%   \item[\tn{EBNewTheorem}] \tn{EBNewTheorem} 是更便捷的定理命令,它定义一个新的定理环境,\meta{键值列表} 支持的选项与 \tn{declaretheorem} 相同,但它们的区别有:
 %     \begin{itemize}
 %       \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的环境名。
 %       \item 自动定义交叉引用的格式,引用标签前缀为定理名称。
@@ -616,7 +616,7 @@
 %   \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
 % \end{syntax}
 % 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
-% \changes{v1.26m}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
+% \changes{v1.26n}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
 % \end{function}
 %
 % 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用+号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
@@ -1015,6 +1015,24 @@
 % 该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
 % \end{function}
 %
+% \subsection{计数器}
+% \begin{function}[added = 2021-06-30]{\newcounter,\EBUseCounter}
+% \begin{syntax}
+%   \tn{newcounter}\marg{计数器}\oarg{父计数器}
+%   \tn{EBUseCounter*}\oarg{父计数器的值}\parg{编号|(arabic)}\marg{计数器}\marg{内容}\oarg{分隔符|(.)}
+% \end{syntax}
+% \tn{newcounter} 是 \LaTeX 自带的创建计数器命令,\tn{EBUseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \tn{the}\meta{父计数器}\meta{分隔符}\meta{计数器}\meta{内容} 输出当前内容。带有星号的命令不会使计数器的值增加,所以可以使用当前 \tn{the}\meta{计数器} 的值,\meta{编号} 为 arabic 和 alpha 等格式。
+% \changes{v1.26n}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
+% \end{function}
+%
+% 在一定的场合下可能用到 \tn{EBUseCounter} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器,使用 \tn{labelformat} 设置它的引用标签前缀需添加 eb@:
+% \begin{ctexexam}
+%   \labelformat{eb at theorem}{定理#1}
+%   \newcommand{\theoremhead}[1]
+%     {定理\space\EBUseCounter[chapter]{theorem}{#1}}
+%   \theoremhead{定理标题}\label{thm:theorem}
+% \end{ctexexam}
+%
 % \subsection{下划线}
 % \begin{function}[added = 2021-04-03]{\uline,\uuline,\uwave}
 % \begin{syntax}
@@ -1034,6 +1052,7 @@
 %   \item[amsmath] 提供 \LaTeX 中的数学功能。
 %   \item[thmtools] 用于通常需要的排版定理支持。
 %   \item[marginnote] 增强了边注输出的功能。
+%   \item[spbmark] 定制上标和下标的格式。
 %   \item[setspace] 提供对文档中行间距的支持。
 %   \item[chemformula] 提供了对化学式进行排版的命令。
 %   \item[siunitx] 全面的国际标准单位支持。
@@ -1109,7 +1128,8 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/28}{1.26m}{beta}
+\ProvidesExplClass{easybook}{2021/06/30}{1.26n}
+  {Typeset Chinese books or notes}
 
 \bool_set_false:N \l__eb_compile_draft_bool
 \bool_set_false:N \l__eb_title_newline_bool
@@ -1356,7 +1376,8 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/28}{1.26m}{beta}
+\ProvidesExplPackage{easybase}{2021/06/30}{1.26n}
+  {Typeset Chinese books or notes}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1455,7 +1476,8 @@
     { list = off } { bicaption },
     { many } { tcolorbox },
     { xindy } { imakeidx },
-    { upint } { newtxmath }
+    { upint } { newtxmath },
+    { svgnames } { xcolor }
   }
   { \PassOptionsToPackage #1 }
 \ProcessKeysOptions{easybase}
@@ -1543,13 +1565,12 @@
 
 \eb at package@load
   {
-    xcolor[svgnames]+
     footmisc[stable,bottom]+
     spbmark[ctex]+
     ulem[normalem]+
     enumitem[shortlabels,inline]+
-    amsmath+amsthm+thmtools+
     chemformula+siunitx+pifont+
+    amsthm+thmtools+
     geometry+marginnote+nccfoots+
     pdfpages+multicol+
     fancyhdr+titletoc+caption+
@@ -2085,6 +2106,22 @@
 \newcounter{bichapter}
 \newcounter{bisection}[bichapter]
 \newcounter{bisubsection}[bisection]
+\NewDocumentCommand{\EBUseCounter}{soD(){arabic}mmO{.}}
+  {
+    \IfBooleanF{#1}{\stepcounter{#4}}
+    \tl_set:cn { eb at the#4 }
+      {
+        \IfValueT{#2}{\use:c { the#2 }#6}
+        \use:c {#3}{#4}\space #5
+      }
+    \tl_use:c { eb at the#4 }
+    \tl_remove_once:cn { eb at the#4 } {#5}
+    \tl_set:Nx \@currentlabel
+      {
+        \use:c { p at eb@#4 }
+        \use:c { eb at the#4 }
+      }
+  }
 \cs_new:Npn \eb_arabic:n #1 { \int_to_arabic:v { c@#1 } }
 \cs_new:Npn \eb_section_counter_prefix:n #1
   {
@@ -2849,7 +2886,7 @@
       {
         standard~jigsaw,
         nobeforeafter,tcbox~raise~base,
-        top = 1.25t,bottom = 1.25t,left = 1.25t,right = 1.25t,
+        top = 1.25pt,bottom = 1.25pt,left = 1.25pt,right = 1.25pt,
         boxrule = 0.75pt,arc = 1pt,
         colback = #1,opacityback = 0.12,colframe = #1,#3
       }{#2}
@@ -2864,6 +2901,7 @@
 \eb_ctex_define:nn { bibset }
   {
     backend .choice:,
+    backend .value_required:n = true,
     backend/bibtex .code:n    = { },
     backend/biblatex .code:n  =
       { \bool_set_false:N \l__eb_backend_bibtex_bool },
@@ -2887,7 +2925,6 @@
     cite-style .code:n      =
       { \tl_set:Nn \l__eb_bib_citestyle_tl {#1} },
     datafile .clist_set:N   = \l__eb_bib_datafile_clist,
-
     bitoc-title .tl_set:N   = \l__eb_bib_bitoc_title,
     bitoc-title .initial:n  = Reference
   }
@@ -3069,6 +3106,7 @@
 \eb_ctex_define:nn { refset }
   {
     linktype .choice:,
+    linktype .value_required:n  = true,
     linktype/edge .code:n       = { },
     linktype/none .code:n       = \eb_put_hyperref:n { hidelinks },
     linktype/various .code:n    =
@@ -3076,8 +3114,6 @@
         \bool_set_true:N \l__eb_toc_number_color_bool
         \eb_put_hyperref:n { colorlinks }
       },
-    linktype .value_required:n  = true,
-    linktype .initial:n         = edge,
 
     linktoc .choice:,
     linktoc/unknown .code:n =

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-06-30 21:16:55 UTC (rev 59772)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybase.sty	2021-06-30 21:17:07 UTC (rev 59773)
@@ -13,7 +13,8 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/28}{1.26m}{beta}
+\ProvidesExplPackage{easybase}{2021/06/30}{1.26n}
+  {Typeset Chinese books or notes}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -112,7 +113,8 @@
     { list = off } { bicaption },
     { many } { tcolorbox },
     { xindy } { imakeidx },
-    { upint } { newtxmath }
+    { upint } { newtxmath },
+    { svgnames } { xcolor }
   }
   { \PassOptionsToPackage #1 }
 \ProcessKeysOptions{easybase}
@@ -200,13 +202,12 @@
 
 \eb at package@load
   {
-    xcolor[svgnames]+
     footmisc[stable,bottom]+
     spbmark[ctex]+
     ulem[normalem]+
     enumitem[shortlabels,inline]+
-    amsmath+amsthm+thmtools+
     chemformula+siunitx+pifont+
+    amsthm+thmtools+
     geometry+marginnote+nccfoots+
     pdfpages+multicol+
     fancyhdr+titletoc+caption+
@@ -742,6 +743,22 @@
 \newcounter{bichapter}
 \newcounter{bisection}[bichapter]
 \newcounter{bisubsection}[bisection]
+\NewDocumentCommand{\EBUseCounter}{soD(){arabic}mmO{.}}
+  {
+    \IfBooleanF{#1}{\stepcounter{#4}}
+    \tl_set:cn { eb at the#4 }
+      {
+        \IfValueT{#2}{\use:c { the#2 }#6}
+        \use:c {#3}{#4}\space #5
+      }
+    \tl_use:c { eb at the#4 }
+    \tl_remove_once:cn { eb at the#4 } {#5}
+    \tl_set:Nx \@currentlabel
+      {
+        \use:c { p at eb@#4 }
+        \use:c { eb at the#4 }
+      }
+  }
 \cs_new:Npn \eb_arabic:n #1 { \int_to_arabic:v { c@#1 } }
 \cs_new:Npn \eb_section_counter_prefix:n #1
   {
@@ -1506,7 +1523,7 @@
       {
         standard~jigsaw,
         nobeforeafter,tcbox~raise~base,
-        top = 1.25t,bottom = 1.25t,left = 1.25t,right = 1.25t,
+        top = 1.25pt,bottom = 1.25pt,left = 1.25pt,right = 1.25pt,
         boxrule = 0.75pt,arc = 1pt,
         colback = #1,opacityback = 0.12,colframe = #1,#3
       }{#2}
@@ -1521,6 +1538,7 @@
 \eb_ctex_define:nn { bibset }
   {
     backend .choice:,
+    backend .value_required:n = true,
     backend/bibtex .code:n    = { },
     backend/biblatex .code:n  =
       { \bool_set_false:N \l__eb_backend_bibtex_bool },
@@ -1544,7 +1562,6 @@
     cite-style .code:n      =
       { \tl_set:Nn \l__eb_bib_citestyle_tl {#1} },
     datafile .clist_set:N   = \l__eb_bib_datafile_clist,
-
     bitoc-title .tl_set:N   = \l__eb_bib_bitoc_title,
     bitoc-title .initial:n  = Reference
   }
@@ -1726,6 +1743,7 @@
 \eb_ctex_define:nn { refset }
   {
     linktype .choice:,
+    linktype .value_required:n  = true,
     linktype/edge .code:n       = { },
     linktype/none .code:n       = \eb_put_hyperref:n { hidelinks },
     linktype/various .code:n    =
@@ -1733,8 +1751,6 @@
         \bool_set_true:N \l__eb_toc_number_color_bool
         \eb_put_hyperref:n { colorlinks }
       },
-    linktype .value_required:n  = true,
-    linktype .initial:n         = edge,
 
     linktoc .choice:,
     linktoc/unknown .code:n =

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-06-30 21:16:55 UTC (rev 59772)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-06-30 21:17:07 UTC (rev 59773)
@@ -13,7 +13,8 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/28}{1.26m}{beta}
+\ProvidesExplClass{easybook}{2021/06/30}{1.26n}
+  {Typeset Chinese books or notes}
 
 \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.