texlive[58832] Master/texmf-dist: easybook (11apr21)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 11 23:10:56 CEST 2021


Revision: 58832
          http://tug.org/svn/texlive?view=revision&revision=58832
Author:   karl
Date:     2021-04-11 23:10:56 +0200 (Sun, 11 Apr 2021)
Log Message:
-----------
easybook (11apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex
    trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex
    trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex
    trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
    trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
    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/easybook.cls

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex	2021-04-11 21:10:38 UTC (rev 58831)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter1.tex	2021-04-11 21:10:56 UTC (rev 58832)
@@ -19,7 +19,7 @@
     \end{matrix}
   \right]
 \end{equation}
-可以通过添加标签在正文中引用公式,如带有中文括号的引用\cref{eq:matrix}。
+可以通过添加标签在正文中引用公式,如带有中文括号的引用\ref{eq:matrix}。
 
 \zhlipsum*[56][name = aspirin]
 \begin{equation}
@@ -44,7 +44,7 @@
 \clearpage
 \section{插图}
 \index{c@插图}
-当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\cref{fig:example}。
+当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\ref{fig:example}。
 \begin{figure}[htbp]
   \centering
   \subcaptionbox{并排子图1}
@@ -52,15 +52,15 @@
   \hspace{1.2em}
   \subcaptionbox{并排子图2}
     {\includegraphics[width=0.4\textwidth]{example-image-4x3}}
-  \bicaption[使用subcaption排版子图]{使用subcaption宏包的subcaptionbox命令排版子图}[Use subcaption to typeset subgraphs]{Use the subcaptionbox command of the subcaption package to typeset sub-pictures}\label{fig:example}
+  \bicaption[使用 subcaption 排版子图]{使用 subcaption 宏包的 subcaptionbox 命令排版子图}[Use subcaption to typeset subgraphs]{Use the subcaptionbox command of the subcaption package to typeset sub-pictures}\label{fig:example}
 \end{figure} 
 
 \section{表格}
 \index{b@表格}
-合并表格列使用 \lstinline{\multicolumn} 命令,合并行可以使用 \lstinline{multirow} 宏包的 \lstinline{\multirow} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,文档类设置了\textsf{L、C和R}三个列对齐选项,一个例子如\cref{tab:example} 所示。
+合并表格列使用 \lstinline{\multicolumn} 命令,合并行可以使用 \lstinline{multirow} 宏包的 \lstinline{\multirow} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,文档类设置了\textsf{L、C和R}三个列对齐选项,一个例子如\ref{tab:example} 所示。
 \begin{table}[htbp]
   \centering
-  \bicaption{使用tabularx创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab:example}\small
+  \bicaption{使用 tabularx 创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab:example}\small
   \begin{tabularx}{0.87\textwidth}{@{}llL@{}}
     \toprule
     Aliquam & Integer & Pellentesque tincidunt purus

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex	2021-04-11 21:10:38 UTC (rev 58831)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter2.tex	2021-04-11 21:10:56 UTC (rev 58832)
@@ -19,7 +19,7 @@
   \\
   & =\oiint_\Sigma \left(P\cos\alpha + Q\cos\beta + R\cos\gamma\right)\mathrm{d}S
 \end{align}
-这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{theorem:gauss formula}。
+这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\ref{theorem:gauss formula}。
 \end{theorem}
 
 \begin{definition}[(Stokes formula)]
@@ -68,11 +68,11 @@
 \zhlipsum*[3][name = aspirin]
 \begin{exercise}[LightYellow][1.](习题)
 \index{x@习题环境}
-  \item 设$w = f(x + y + z,xyz)$,$f$具有二阶连续偏导数,求$\dfrac{{\partial w}}{{\partial x}}$和$\dfrac{{{\partial ^2}w}}{{\partial x\partial z}}$。
+  \item 设$w = f(x + y + z,xyz)$,$f$具有二阶连续偏导数,求$\dfrac{\partial w}{\partial x}$和$\dfrac{\partial ^2 w}{\partial x\partial z}$。
   \item 已知$y = y(x)$在任意点$x$处的增量$\Delta y = \dfrac{y\Delta x}{1 + x^2} + \alpha$,其中$\alpha$是$\Delta x$的高阶无穷小($\Delta x\to 0$时),$y(0) = \pi$,则$y(1) = \uline{\mbox{\hspace{2em}}}$。
-  \item 设函数$f(x)$在$( - \infty, + \infty)$上有定义,则下述命题中正确的是 \mbox{(\hspace{1.5em})}
+  \item 设函数$f(x)$在$(-\infty,+\infty)$上有定义,则下述命题中正确的是 \mbox{(\hspace{1.5em})}
     \begin{tasks}
-      \task 若$f(x)$在$( - \infty, + \infty)$上可导且单调增加,则对一切$x\in ( - \infty, + \infty)$,都有$f'(x) > 0$。
+      \task 若$f(x)$在$(-\infty,+\infty)$上可导且单调增加,则对一切$x\in (-\infty,+\infty)$,都有$f'(x) > 0$。
       \task 若$f(x)$在点$x_0$处取得极值,则$f'(x_0) = 0$。
       \task 若$f''(x_0) = 0$,则$(x_0,f(x_0))$是曲线$y = f(x)$的拐点坐标。
       \task 若$f'(x_0) = 0$, $f''(x_0) = 0$,$f'''(x_0)\ne 0$,则$x_0$一定不是$f(x)$的极值点。

Modified: trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex	2021-04-11 21:10:38 UTC (rev 58831)
+++ trunk/Master/texmf-dist/doc/latex/easybook/chapter3.tex	2021-04-11 21:10:56 UTC (rev 58832)
@@ -6,7 +6,7 @@
 \section{代码}
 \index{d@代码}
 \zhlipsum[41][name = aspirin]
-\begin{lstlisting}[language = Python,caption = {python程序练习题}]
+\begin{lstlisting}[language = Python,caption = python 程序练习题]
 #!/usr/bin/python
 # -*- coding: UTF-8 -*-
     
@@ -43,7 +43,7 @@
 \subsection{引用章节}
 \label{subsec:reference section}
 \index{y@引用!s@索引}
-阿司匹林及其复方制剂都能有效治疗某几种头痛,但对另外几种则效果不明\cref{chap:other formats}。因其他疾病或创伤导致的继发性头痛需要及时在医疗机构接受治疗\cref{subsec:reference section}。
+阿司匹林及其复方制剂都能有效治疗某几种头痛,但对另外几种则效果不明\ref{chap:other formats}。因其他疾病或创伤导致的继发性头痛需要及时在医疗机构接受治疗\ref{subsec:reference section}。
 
 \subsection{参考文献}
 \index{y@引用!c@参考文献}

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

Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-04-11 21:10:38 UTC (rev 58831)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex	2021-04-11 21:10:56 UTC (rev 58832)
@@ -12,6 +12,7 @@
     style =
       {
         color = seaside,
+        % color-all = 009393,
         % multoc = true,
         % withpart = true,
         footwith = page,
@@ -59,6 +60,7 @@
       },
     hdrset =
       {
+        % headrule = {},
         head-foot =
           {
             \easyhead[EC]{\color{SeaGreen}\kaishu\leftmark}
@@ -102,7 +104,7 @@
     \url{https://latexstudio.net} \\
     \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
   }
-\date{2021/04/10\hskip\ccwd\relax v1.24j}
+\date{2021/04/11\hskip\ccwd\relax v1.24k}
 
 \frontmatter[roman]
 \maketitle

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-04-11 21:10:38 UTC (rev 58831)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-04-11 21:10:56 UTC (rev 58832)
@@ -55,7 +55,7 @@
 %
 % \title{\sffamily easybook 书籍文档类}
 % \author{瞿毅}
-% \date{2021/04/10\hskip\ccwd\relax v1.24j\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/04/11\hskip\ccwd\relax v1.24k\thanks{\url{https://gitee.com/texl3/easybook}}}
 % \maketitle
 % \begin{abstract}
 %   \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
@@ -152,17 +152,18 @@
 %
 % \subsection{文档命令}
 % \label{subsec:document command}
-% \begin{function}[added = 2021-02-20,updated = 2021-04-04]{\frontmatter,\mainmatter,\backmatter,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
+% \begin{function}[added = 2021-02-20,updated = 2021-04-11]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
 % \begin{syntax}
 %   \tn{frontmatter*}\oarg{编号格式|(Roman)}
 %   \tn{mainmatter*}
 %   \tn{backmatter}
+%   \tn{cleardoublepage}\oarg{页面风格|(empty)}
 %   \tn{tableofcontents}\oarg{键值列表}
 %   \tn{listoffigures*}\oarg{键值列表}
 %   \tn{listoftables*}\oarg{键值列表}
 %   \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} 输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
+% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用清双页命令 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。在奇数页使用命令 \tn{cleardoublepage} 时可选参数为下一页多出的空白偶数页的页面风格,默认为 \opt{empty} 即空的页眉页脚。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
 % \changes{v1.23}{2021/02/20}{重新定义文档结构划分命令。}
 % \end{function}
 %
@@ -173,7 +174,7 @@
 % \end{syntax}
 % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。已经预置了中英文的目录标题,可以使用 \opt{title} 选项更改目录标题的名称。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
-% \changes{v1.24j}{2021/04/04}{目录命令的可选参数增加标题键值。}
+% \changes{v1.24k}{2021/04/04}{目录命令的可选参数增加标题键值。}
 % \end{function}
 %
 % \section{接口选项}
@@ -206,9 +207,10 @@
 %
 % \subsection{风格}
 % \label{subsec:style}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-03-18]{color,multoc,withpart,footwith,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
+% \begin{function}[EXP,added = 2021-01-05,updated = 2021-04-11]{color,color-all,multoc,withpart,footwith,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
 % \begin{syntax}
 %   color = <(none)|seaside|energy|cyberpunk>
+%   color-all = <HTML颜色代码>
 %   multoc = <true|(false)>
 %   withpart = <true|(false)>
 %   footwith = <part|(chapter)|page>
@@ -237,6 +239,7 @@
 %     主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
 %     \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
 %     \end{function}
+%   \item[color-all] 统一设置主题的各部分颜色,参数是6个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
 %   \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式。
 %   \item[withpart] 使章跟随每一部分编号,默认不跟随。
 %   \item[footwith] 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从1开始。
@@ -252,16 +255,17 @@
 %
 % \subsection{超链接}
 % \label{subsec:hyperlinks}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-04-05]{hyperlink,linkcolor,linktoc}
+% \begin{function}[EXP,added = 2021-01-05,updated = 2021-04-11]{hyperlink,linkcolor,linkcol-all,linktoc}
 % \begin{syntax}
 %   hyperlink = <(edge)|various|none>
 %   linkcolor = <(fresh)|cutepink|skyblue|crimson>
+%   linkcol-all = <HTML颜色代码>
 %   linktoc = <none|section|page|(all)>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{link/...} \\
 % \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-% \changes{v1.24j}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
+% \changes{v1.24k}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -274,6 +278,7 @@
 %     超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
 %     \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
 %     \end{function}
+%   \item[linkcol-all] 统一设置超链接的各部分颜色,参数是6个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
 %   \item[linktoc] 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
 % \end{optdesc}
 %
@@ -337,7 +342,7 @@
 % \ding{229} 以上选项路径为 \opt{bibset/...}
 % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
 % \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
-% \changes{v1.24j}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
+% \changes{v1.24k}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -485,7 +490,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.24j}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。}
+% \changes{v1.24k}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。}
 % \end{function}
 %
 % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{\easyhead,\easyfoot}
@@ -555,8 +560,8 @@
 %   line-align = <(true)|false>
 % \end{syntax}
 % \opt{lolskip} 是代码目录中章之间的代码标题的距离,与\CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 \opt{article} 模式中此选项失效。目录标签整体使用 \opt{tocline} 设置,也可使用小节 \ref{subsec:page margins} 的 \opt{list-labelsep} 选项只设置编号与标题的间距。在图表标签的参数中,\#1与\#2分别代表编号和标题,代码标签的编号和标题则是 \tn{thelstlisting} 和 \tn{lstcaption},标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子
-% \changes{v1.24j}{2021/04/05}{可以设置图、表和代码目录的标签。}
-% \changes{v1.24j}{2021/04/06}{增加目录引导线右边对齐方式。}
+% \changes{v1.24k}{2021/04/05}{可以设置图、表和代码目录的标签。}
+% \changes{v1.24k}{2021/04/06}{增加目录引导线右边对齐方式。}
 % \end{function}
 %
 % \begin{ctexexam}
@@ -589,7 +594,7 @@
 %   \tn{end}\marg{环境名}
 % \end{syntax}
 % \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如
-% \changes{v1.24j}{2021/04/08}{重新优化列表环境的配置。}
+% \changes{v1.24k}{2021/04/08}{重新优化列表环境的配置。}
 % \end{function}
 %
 % \begin{ctexexam}
@@ -749,11 +754,13 @@
 % \end{function}
 %
 % \subsection{引用}
-% \begin{function}[added = 2021-01-05]{\cref}
-%   \begin{syntax}
-%   \tn{cref}\marg{标签}
-%   \end{syntax}
-% 使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
+% \begin{function}[added = 2021-01-05,updated = 2021-04-11]{\ref,\labelformat}
+% \begin{syntax}
+%   \tn{ref}\marg{标签}
+%   \tn{labelformat}\marg{计数器}\marg{标签引用格式}
+% \end{syntax}
+% 使用 \tn{ref} 命令进行引用将会自动检测环境并添加相应的前缀,\tn{labelformat} 可以设置标签引用格式,第二个参数中\#1代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。
+% \changes{v1.24k}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
 % \end{function}
 %
 % \subsubsection{索引}
@@ -862,7 +869,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/04/10}{1.24j}{beta}
+\ProvidesExplClass{easybook}{2021/04/11}{1.24k}{beta}
 
 \cs_generate_variant:Nn \__ctex_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -1182,13 +1189,13 @@
       }
   }
 
-\cs_gset:Npn \cleardoublepage
+\RenewDocumentCommand{\cleardoublepage}{O{empty}}
   {
     \clearpage
     \bool_if:NT \l__eb_page_twoside_bool
       {
-        \int_if_odd:nF \c at page
-          {\hbox:n {}\thispagestyle{empty}\clearpage}
+        \int_if_odd:nF {\c at page}
+          {\hbox:n {}\thispagestyle{#1}\clearpage}
       }
   }
 \RenewDocumentCommand{\frontmatter}{sO{Roman}}
@@ -1808,34 +1815,23 @@
 \setlist*[enumerate,3]{labelwidth = *}
 \setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
 
-\cs_new_protected:Npn \__eb_thmname_set:nn #1#2
-  {\tl_const:cn {c__eb_name_#1_tl}{#2}}
-\tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
+\cs_new_protected:Npn \__eb_thmname_set:nnn #1#2#3
   {
-    \clist_map_inline:nn
-      {
-        {example}{例},
-        {definition}{定义},
-        {theorem}{定理},
-        {proposition}{性质},
-        {lemma}{引理},
-        {corollary}{推论},
-        {remark}{注},
-        {exercise}{练习}
-      }{\__eb_thmname_set:nn #1}
-  }{
-    \clist_map_inline:nn
-      {
-        {example}{Example},
-        {definition}{Definition},
-        {theorem}{Theorem},
-        {proposition}{Proposition},
-        {lemma}{Lemma},
-        {corollary}{Corollary},
-        {remark}{Remark},
-        {exercise}{Exercise}
-      }{\__eb_thmname_set:nn #1}
+    \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
+      {\tl_const:cn {c__eb_name_#1_tl}{#2}}
+      {\tl_const:cn {c__eb_name_#1_tl}{#3}}
   }
+\clist_map_inline:nn
+  {
+    {example}{例}{Example},
+    {definition}{定义}{Definition},
+    {theorem}{定理}{Theorem},
+    {proposition}{性质}{Proposition},
+    {lemma}{引理}{Lemma},
+    {corollary}{推论}{Corollary},
+    {remark}{注}{Remark},
+    {exercise}{练习}{Exercise}
+  }{\__eb_thmname_set:nnn #1}
 
 \bool_new:N \l__eb_thmbox_bool
 \tl_new:N \l__eb_thm_numberwith_tl
@@ -1854,7 +1850,7 @@
     thmbox      .default:n = true,
     thmbox      .initial:n = false,
     within      .tl_set:N = \l__eb_thm_numberwith_tl,
-    within      .initial:n = chapter,
+    within      .initial:n = \bool_if:NT \l__eb_class_book_bool{chapter},
     bodyfont    .tl_set:N = \l__eb_thm_bodyfont_tl,
     bodyfont    .initial:n = {},
     notefont    .tl_set:N = \l__eb_thm_notefont_tl,
@@ -2197,6 +2193,7 @@
   {
     \exp_args:NV \addbibresource\l__eb_bib_file_tl
     \cs_gset:Npn \blx at default@theheading{bibintoc}
+    \cs_gset:Npn \blx at warning@noline##1{}
     \defbibheading{bibintoc}[\bibname]{\__eb_class_title_bool:n {##1}}
     \skip_set:Nn \bibitemsep{0ex}
   }
@@ -2216,7 +2213,7 @@
       }
   }
 
-\ctex_at_end_preamble:n
+\__eb_at_end_preamble:n
   {
     \group_begin:
     \footnotesize
@@ -2319,6 +2316,10 @@
   {\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
 \cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
   {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
+\cs_new_protected:Npn \__eb_define_linkcolor:n #1
+  {\definecolorset{HTML}{ctex@}{}{link,#1;url,#1;cite,#1}}
+\cs_new_protected:Npn \__eb_define_themecolor:n #1
+  {\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 =
@@ -2380,6 +2381,7 @@
       \__eb_linkcolor_set:n
     linkcolor         .default:n = fresh,
     linkcolor         .initial:n = fresh,
+    linkcol-all       .code:n = \__eb_define_linkcolor:n {\exp_not:n {#1}},
 
     linktoc           .choice:,
     linktoc/unknown   .code:n =
@@ -2398,8 +2400,8 @@
   }
 \__ctex_define:nx {style}
   {
-    color             .choice:,
-    color             .value_required:n = true,
+    color     .choice:,
+    color     .value_required:n = true,
     \clist_map_function:nN
       {
         {none,      000000,000000,000000},
@@ -2408,16 +2410,19 @@
         {cyberpunk, 601986,eb6877,a4005b}
       }
       \__eb_themecolor_set:n
-    color             .initial:n = none
+    color     .initial:n = none,
+    color-all .code:n = \__eb_define_themecolor:n {\exp_not:n {#1}}
   }
 
 \ctex_at_end_preamble:n
   {
-    \RequirePackage{hyperref,cleveref}
+    \RequirePackage{hyperref}
     \urlstyle{same}
     \__eb_allow_urlbreak:
     \ctex_hypersetup:n {pdfstartview = FitH}
     \exp_args:NV \hypersetup\l__eb_hyperref_clist
+    \labelformat{part}{\CTEXthepart}
+    \labelformat{chapter}{\CTEXthechapter}
     \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
       {
         \keys_set_known:nn {ctex}
@@ -2430,21 +2435,20 @@
             lstlistlistingname = 代码索引,
             lstlistingname = 代码
           }
-        \crefformat{equation}{#2式(#1)#3}
-        \crefformat{align}{#2式(#1)#3}
-        \crefformat{multline}{#2式(#1)#3}
-        \crefformat{gather}{#2式(#1)#3}
-        \crefformat{figure}{#2图#1#3}
-        \crefformat{table}{#2表#1#3}
-        \crefformat{chapter}{#2第#1章#3}
-        \crefformat{section}{#2节#1#3}
-        \crefformat{subsection}{#2小节#1#3}
-        \crefformat{theorem}{#2定理#1#3}
-        \crefformat{definition}{#2定义#1#3}
-        \crefformat{lemma}{#2引理#1#3}
-        \crefformat{corollary}{#2推论#1#3}
-        \crefformat{proposition}{#2性质#1#3}
-        \crefformat{example}{#2例#1#3}
+        \labelformat{equation}{式(#1)}
+        \labelformat{align}{式(#1)}
+        \labelformat{multline}{式(#1)}
+        \labelformat{gather}{式(#1)}
+        \labelformat{figure}{图#1}
+        \labelformat{table}{表#1}
+        \labelformat{section}{节#1}
+        \labelformat{subsection}{小节#1}
+        \labelformat{theorem}{定理#1}
+        \labelformat{definition}{定义#1}
+        \labelformat{lemma}{引理#1}
+        \labelformat{corollary}{推论#1}
+        \labelformat{proposition}{性质#1}
+        \labelformat{example}{例#1}
       }{
         \keys_set_known:nn {ctex}
           {
@@ -2452,21 +2456,20 @@
             lstlistlistingname = List~of~Codes,
             lstlistingname = Code
           }
-        \crefformat{equation}{#2Equation~(#1)#3}
-        \crefformat{align}{#2Equation~(#1)#3}
-        \crefformat{multline}{#2Equation~(#1)#3}
-        \crefformat{gather}{#2Equation~(#1)#3}
-        \crefformat{figure}{#2Figure~#1#3}
-        \crefformat{table}{#2Table~#1#3}
-        \crefformat{chapter}{#2Chapter~#1#3}
-        \crefformat{section}{#2Section~#1#3}
-        \crefformat{subsection}{#2Subsection~#1#3}
-        \crefformat{theorem}{#2Theorem~#1#3}
-        \crefformat{definition}{#2Definition~#1#3}
-        \crefformat{lemma}{#2Lemma~#1#3}
-        \crefformat{corollary}{#2Corollary~#1#3}
-        \crefformat{proposition}{#2Proposition~#1#3}
-        \crefformat{example}{#2Example~#1#3}
+        \labelformat{equation}{Equation~(#1)}
+        \labelformat{align}{Equation~(#1)}
+        \labelformat{multline}{Equation~(#1)}
+        \labelformat{gather}{Equation~(#1)}
+        \labelformat{figure}{Figure~#1}
+        \labelformat{table}{Table~#1}
+        \labelformat{section}{Section~#1}
+        \labelformat{subsection}{Subsection~#1}
+        \labelformat{theorem}{Theorem~#1}
+        \labelformat{definition}{Definition~#1}
+        \labelformat{lemma}{Lemma~#1}
+        \labelformat{corollary}{Corollary~#1}
+        \labelformat{proposition}{Proposition~#1}
+        \labelformat{example}{Example~#1}
       }
   }
 

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-04-11 21:10:38 UTC (rev 58831)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-04-11 21:10:56 UTC (rev 58832)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/04/10}{1.24j}{beta}
+\ProvidesExplClass{easybook}{2021/04/11}{1.24k}{beta}
 
 \cs_generate_variant:Nn \__ctex_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -333,13 +333,13 @@
       }
   }
 
-\cs_gset:Npn \cleardoublepage
+\RenewDocumentCommand{\cleardoublepage}{O{empty}}
   {
     \clearpage
     \bool_if:NT \l__eb_page_twoside_bool
       {
-        \int_if_odd:nF \c at page
-          {\hbox:n {}\thispagestyle{empty}\clearpage}
+        \int_if_odd:nF {\c at page}
+          {\hbox:n {}\thispagestyle{#1}\clearpage}
       }
   }
 \RenewDocumentCommand{\frontmatter}{sO{Roman}}
@@ -959,34 +959,23 @@
 \setlist*[enumerate,3]{labelwidth = *}
 \setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
 
-\cs_new_protected:Npn \__eb_thmname_set:nn #1#2
-  {\tl_const:cn {c__eb_name_#1_tl}{#2}}
-\tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
+\cs_new_protected:Npn \__eb_thmname_set:nnn #1#2#3
   {
-    \clist_map_inline:nn
-      {
-        {example}{例},
-        {definition}{定义},
-        {theorem}{定理},
-        {proposition}{性质},
-        {lemma}{引理},
-        {corollary}{推论},
-        {remark}{注},
-        {exercise}{练习}
-      }{\__eb_thmname_set:nn #1}
-  }{
-    \clist_map_inline:nn
-      {
-        {example}{Example},
-        {definition}{Definition},
-        {theorem}{Theorem},
-        {proposition}{Proposition},
-        {lemma}{Lemma},
-        {corollary}{Corollary},
-        {remark}{Remark},
-        {exercise}{Exercise}
-      }{\__eb_thmname_set:nn #1}
+    \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
+      {\tl_const:cn {c__eb_name_#1_tl}{#2}}
+      {\tl_const:cn {c__eb_name_#1_tl}{#3}}
   }
+\clist_map_inline:nn
+  {
+    {example}{例}{Example},
+    {definition}{定义}{Definition},
+    {theorem}{定理}{Theorem},
+    {proposition}{性质}{Proposition},
+    {lemma}{引理}{Lemma},
+    {corollary}{推论}{Corollary},
+    {remark}{注}{Remark},
+    {exercise}{练习}{Exercise}
+  }{\__eb_thmname_set:nnn #1}
 
 \bool_new:N \l__eb_thmbox_bool
 \tl_new:N \l__eb_thm_numberwith_tl
@@ -1005,7 +994,7 @@
     thmbox      .default:n = true,
     thmbox      .initial:n = false,
     within      .tl_set:N = \l__eb_thm_numberwith_tl,
-    within      .initial:n = chapter,
+    within      .initial:n = \bool_if:NT \l__eb_class_book_bool{chapter},
     bodyfont    .tl_set:N = \l__eb_thm_bodyfont_tl,
     bodyfont    .initial:n = {},
     notefont    .tl_set:N = \l__eb_thm_notefont_tl,
@@ -1348,6 +1337,7 @@
   {
     \exp_args:NV \addbibresource\l__eb_bib_file_tl
     \cs_gset:Npn \blx at default@theheading{bibintoc}
+    \cs_gset:Npn \blx at warning@noline##1{}
     \defbibheading{bibintoc}[\bibname]{\__eb_class_title_bool:n {##1}}
     \skip_set:Nn \bibitemsep{0ex}
   }
@@ -1367,7 +1357,7 @@
       }
   }
 
-\ctex_at_end_preamble:n
+\__eb_at_end_preamble:n
   {
     \group_begin:
     \footnotesize
@@ -1470,6 +1460,10 @@
   {\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
 \cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
   {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
+\cs_new_protected:Npn \__eb_define_linkcolor:n #1
+  {\definecolorset{HTML}{ctex@}{}{link,#1;url,#1;cite,#1}}
+\cs_new_protected:Npn \__eb_define_themecolor:n #1
+  {\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 =
@@ -1531,6 +1525,7 @@
       \__eb_linkcolor_set:n
     linkcolor         .default:n = fresh,
     linkcolor         .initial:n = fresh,
+    linkcol-all       .code:n = \__eb_define_linkcolor:n {\exp_not:n {#1}},
 
     linktoc           .choice:,
     linktoc/unknown   .code:n =
@@ -1549,8 +1544,8 @@
   }
 \__ctex_define:nx {style}
   {
-    color             .choice:,
-    color             .value_required:n = true,
+    color     .choice:,
+    color     .value_required:n = true,
     \clist_map_function:nN
       {
         {none,      000000,000000,000000},
@@ -1559,16 +1554,19 @@
         {cyberpunk, 601986,eb6877,a4005b}
       }
       \__eb_themecolor_set:n
-    color             .initial:n = none
+    color     .initial:n = none,
+    color-all .code:n = \__eb_define_themecolor:n {\exp_not:n {#1}}
   }
 
 \ctex_at_end_preamble:n
   {
-    \RequirePackage{hyperref,cleveref}
+    \RequirePackage{hyperref}
     \urlstyle{same}
     \__eb_allow_urlbreak:
     \ctex_hypersetup:n {pdfstartview = FitH}
     \exp_args:NV \hypersetup\l__eb_hyperref_clist
+    \labelformat{part}{\CTEXthepart}
+    \labelformat{chapter}{\CTEXthechapter}
     \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
       {
         \keys_set_known:nn {ctex}
@@ -1581,21 +1579,20 @@
             lstlistlistingname = 代码索引,
             lstlistingname = 代码
           }
-        \crefformat{equation}{#2式(#1)#3}
-        \crefformat{align}{#2式(#1)#3}
-        \crefformat{multline}{#2式(#1)#3}
-        \crefformat{gather}{#2式(#1)#3}
-        \crefformat{figure}{#2图#1#3}
-        \crefformat{table}{#2表#1#3}
-        \crefformat{chapter}{#2第#1章#3}
-        \crefformat{section}{#2节#1#3}
-        \crefformat{subsection}{#2小节#1#3}
-        \crefformat{theorem}{#2定理#1#3}
-        \crefformat{definition}{#2定义#1#3}
-        \crefformat{lemma}{#2引理#1#3}
-        \crefformat{corollary}{#2推论#1#3}
-        \crefformat{proposition}{#2性质#1#3}
-        \crefformat{example}{#2例#1#3}
+        \labelformat{equation}{式(#1)}
+        \labelformat{align}{式(#1)}
+        \labelformat{multline}{式(#1)}
+        \labelformat{gather}{式(#1)}
+        \labelformat{figure}{图#1}
+        \labelformat{table}{表#1}
+        \labelformat{section}{节#1}
+        \labelformat{subsection}{小节#1}
+        \labelformat{theorem}{定理#1}
+        \labelformat{definition}{定义#1}
+        \labelformat{lemma}{引理#1}
+        \labelformat{corollary}{推论#1}
+        \labelformat{proposition}{性质#1}
+        \labelformat{example}{例#1}
       }{
         \keys_set_known:nn {ctex}
           {
@@ -1603,21 +1600,20 @@
             lstlistlistingname = List~of~Codes,
             lstlistingname = Code
           }
-        \crefformat{equation}{#2Equation~(#1)#3}
-        \crefformat{align}{#2Equation~(#1)#3}
-        \crefformat{multline}{#2Equation~(#1)#3}
-        \crefformat{gather}{#2Equation~(#1)#3}
-        \crefformat{figure}{#2Figure~#1#3}
-        \crefformat{table}{#2Table~#1#3}
-        \crefformat{chapter}{#2Chapter~#1#3}
-        \crefformat{section}{#2Section~#1#3}
-        \crefformat{subsection}{#2Subsection~#1#3}
-        \crefformat{theorem}{#2Theorem~#1#3}
-        \crefformat{definition}{#2Definition~#1#3}
-        \crefformat{lemma}{#2Lemma~#1#3}
-        \crefformat{corollary}{#2Corollary~#1#3}
-        \crefformat{proposition}{#2Proposition~#1#3}
-        \crefformat{example}{#2Example~#1#3}
+        \labelformat{equation}{Equation~(#1)}
+        \labelformat{align}{Equation~(#1)}
+        \labelformat{multline}{Equation~(#1)}
+        \labelformat{gather}{Equation~(#1)}
+        \labelformat{figure}{Figure~#1}
+        \labelformat{table}{Table~#1}
+        \labelformat{section}{Section~#1}
+        \labelformat{subsection}{Subsection~#1}
+        \labelformat{theorem}{Theorem~#1}
+        \labelformat{definition}{Definition~#1}
+        \labelformat{lemma}{Lemma~#1}
+        \labelformat{corollary}{Corollary~#1}
+        \labelformat{proposition}{Proposition~#1}
+        \labelformat{example}{Example~#1}
       }
   }
 



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