summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-20 03:00:38 +0000
committerNorbert Preining <norbert@preining.info>2021-05-20 03:00:38 +0000
commit6d6c3b4ee419b9f485a213d2ece28b06e9ca2f7c (patch)
tree243789c085bcb650c397f86eeaaddbc45ca92dff /macros/latex/contrib/easybook
parent94c996b5f40175b4a858ddd1f19e3947198b9bd0 (diff)
CTAN sync 202105200300
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx194
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin311905 -> 312209 bytes
2 files changed, 117 insertions, 77 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 81f9679ad5..c9295ed617 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -23,11 +23,11 @@
%
% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.25l}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
+% \changes{v1.25m}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/05/18\hskip\ccwd\relax v1.25l\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/05/19\hskip\ccwd\relax v1.25m\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -71,7 +71,7 @@
%
% \subsection{字体设置}
% \label{subsec:font settings}
-% 默认使用 \CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wwe.lanzoui.com/b01ns361i}{下载地址}。
+% 默认使用 \CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体默认使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wwe.lanzoui.com/b01ns361i}{下载地址}。
%
% 如果您不想使用 \CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
% \begin{ctexexam}
@@ -117,7 +117,7 @@
% \end{syntax}
% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
% \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25l}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \changes{v1.25m}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
% \end{function}
%
% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -168,7 +168,7 @@
% \tn{listoflistings*+}\oarg{键值列表}
% \end{syntax}
% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
-% \changes{v1.25l}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
+% \changes{v1.25m}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
% \end{function}
%
% \begin{function}{multoc,title,format,aftertitle,pagestyle,book,article}
@@ -199,7 +199,7 @@
% 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。
%
% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下
-% \changes{v1.25l}{2021/05/05}{增加与双语目录配合的标题命令。}
+% \changes{v1.25m}{2021/05/05}{增加与双语目录配合的标题命令。}
% \end{function}
%
% \begin{function}{biname,binmuber}
@@ -228,7 +228,7 @@
% \begin{tabular}{*{5}{c}}
% \toprule
% \hyperref[subsec:style]{风格} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
-% style & elsefont & spread & refset & bibset \\
+% style & subfont & spread & refset & bibset \\
% \midrule
% \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
% thmset & geoset & hdrset & tocset & \\
@@ -239,14 +239,13 @@
%
% \subsection{风格}
% \label{subsec:style}
-% \begin{function}[EXP,added = 2021-01-05,updated = 2021-05-17]{color,color-all,multoc,withpart,footwith,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep,figpath}
+% \begin{function}[EXP,added = 2021-01-05,updated = 2021-05-19]{color,color-all,multoc,withpart,footwith,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep,figurepath}
% \begin{syntax}
% color = <(none)|seaside|energy|cyberpunk>
% color-all = <HTML颜色代码>
% multoc = <true|(false)>
% withpart = <true|(false)>
% footwith = <part|(chapter)|page>
-% notomath = <(true)|false>
% rulewidth = <(0.75pt)>
% uppercase = <(true)|false>
% figure-sep = <(.)>
@@ -254,7 +253,7 @@
% listing-sep = <(.)>
% equation-sep = <(.)>
% number-sep = <(.)>
-% figpath = \{\{路径名1\}\{路径名2\}\}
+% figurepath = \{\{路径名1\}\{路径名2\}\}
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{style/...}
% \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
@@ -276,7 +275,6 @@
% \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式。
% \item[withpart] 使章跟随每一部分编号,默认不跟随。
% \item[footwith] 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从1开始。
-% \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。关闭此选项时可以使用 \pkg{unicode-math} 等宏包自定义数学字体。
% \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
% \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
% \item[figure-sep] 图片标题编号的连接符。
@@ -284,7 +282,7 @@
% \item[listing-sep] 代码标题编号的连接符。
% \item[equation-sep] 公式编号的连接符。
% \item[number-sep] 统一设置所有编号的连接符。
-% \item[figpath] 设置插入图片的文件夹路径名,可以有多个路径名,但需要包含在括号内作为间隔,即使只有一个路径。
+% \item[figurepath] 设置插入图片的文件夹路径名,可以有多个路径名,但需要包含在括号内作为间隔,即使只有一个路径。
% \end{optdesc}
%
% \subsection{超链接}
@@ -301,7 +299,7 @@
% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
% \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
% \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
-% \changes{v1.25l}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
+% \changes{v1.25m}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
% \end{function}
%
% \begin{optdesc}
@@ -346,17 +344,19 @@
%
% \subsection{其它字体}
% \label{subsec:other font}
-% \begin{function}[EXP,added = 2021-01-08,updated = 2021-05-12]{table-cap,figure-cap,listing-cap,footnote,marginpar}
+% \begin{function}[EXP,added = 2021-01-08,updated = 2021-05-19]{table-cap,figure-cap,listing-cap,footnote,marginpar,math}
% \begin{syntax}
% table-cap = <\tn{sffamily}\tn{small}>
% figure-cap = <\tn{sffamily}\tn{small}>
% listing-cap = <\tn{sffamily}\tn{small}>
% footnote = <\tn{rmfamily}>
% marginpar = <\tn{rmfamily}\tn{footnotesize}>
+% math = <times|(noto)|notosans|scholax|stix|charter|ebgaramond|libertine|none>
% \end{syntax}
-% \ding{229} 以上选项路径为 \opt{elsefont/...}
+% \ding{229} 以上选项路径为 \opt{subfont/...}
% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
% \changes{v1.23}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+% \changes{v1.25m}{2021/05/19}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
% \end{function}
%
% \begin{optdesc}
@@ -365,6 +365,7 @@
% \item[listing-cap] 代码标题的字体设置。
% \item[footnote] 脚注的字体设置,包括脚注标记与内容的字体。
% \item[marginpar] 边注的字体设置。
+% \item[math] 选择合适的数学字体,将会加载 \pkg{newtxmath} 和 \pkg{bm} 宏包。使用选项 \opt{none} 时可以使用 \pkg{unicode-math} 等其它数学字体宏包定义字体。
% \end{optdesc}
%
% \subsection{参考文献}
@@ -380,7 +381,7 @@
% \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
% \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
% \changes{v1.24}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
-% \changes{v1.25l}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
+% \changes{v1.25m}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
% \end{function}
%
% \begin{optdesc}
@@ -443,15 +444,15 @@
% \item[spacepost] 定理标题后与第一段内容的间隔。
% \end{optdesc}
%
-% \begin{function}[added = 2021-01-12,updated = 2021-04-25]{\newtheorem,\EbNewtheorem,\declaretheoremstyle}
+% \begin{function}[added = 2021-01-12,updated = 2021-04-25]{\newtheorem,\EbNewTheorem,\declaretheoremstyle}
% \begin{syntax}
% \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
-% \tn{EbNewtheorem}\marg{定理环境名}\oarg{英文标题}\marg{中文标题}\parg{盒子样式|(tc-theorem)}\oarg{键值列表}
+% \tn{EbNewTheorem}\marg{定理环境名}\oarg{英文标题}\marg{中文标题}\parg{盒子样式|(tc-theorem)}\oarg{键值列表}
% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
% \end{syntax}
% 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。}
+% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EbNewTheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -462,7 +463,7 @@
% \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
% \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
% \end{description}
-% \item[\tn{EbNewtheorem}] \tn{EbNewtheorem} 是更便捷的定理命令,它定义一个新的定理环境,键值列表支持的选项与 \tn{newtheorem} 相同,但它们的区别有
+% \item[\tn{EbNewTheorem}] \tn{EbNewTheorem} 是更便捷的定理命令,它定义一个新的定理环境,键值列表支持的选项与 \tn{newtheorem} 相同,但它们的区别有
% \begin{itemize}
% \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的环境名。
% \item 自动定义交叉引用的格式,引用标签前缀为定理名称。
@@ -475,7 +476,7 @@
% \subsubsection{新的定理样式}
% 定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{easy-theorem},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
% \begin{ctexexam}
-% \EbNewtheorem{定理环境名}{中文标题}[style = other theorem]
+% \EbNewTheorem{定理环境名}{中文标题}[style = other theorem]
% \newtheorem[style = easy-theorem,name = 定理名]{定理环境名}
% \end{ctexexam}
% \tn{newtheorem} 定义的定理环境需要手动增加盒子边框,可以如下进行设置
@@ -573,8 +574,8 @@
% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
% 上面几个选项用于设置脚注格式,\opt{fnparskip} 和 \opt{fnparindent} 选项仅在 \opt{fnhang = true} 时有效。\opt{fnhang} 用于将脚注设置为悬挂缩进的格式,\opt{fnmark-pos} 选项设置脚注编号的位置,正常文本或是上标形式。\opt{fnmark-num} 选项设置脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括1-10。
%
-% \opt{fnmark-form} 是脚注标记的格式,默认为空,在此设置字体命令会覆盖 \opt{elsefont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
-% \changes{v1.25l}{2021/05/12}{增加脚注样式设置选项。}
+% \opt{fnmark-form} 是脚注标记的格式,默认为空,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
+% \changes{v1.25m}{2021/05/12}{增加脚注样式设置选项。}
% \end{function}
%
% \subsection{目录样式}
@@ -593,17 +594,17 @@
% \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令,带有加号的 \opt{format+} 选项用于在已有的格式命令后附加内容。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
% \changes{v1.24}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
-% \changes{v1.25l}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
+% \changes{v1.25m}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
% \end{function}
%
-% \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberline}
+% \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberLine}
% \begin{syntax}
% \tn{tocrule}*\oarg{引导点间距|(0.7pc)}\parg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
-% \tn{EbNumberline}\marg{编号类型}
+% \tn{EbNumberLine}\marg{编号类型}
% \end{syntax}
% \tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用。带有星号的命令会使当前级别的目录引导线右边与页码连接而不是对齐。引导点间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
%
-% \tn{EbNumberline} 命令类似 \CTeX 的 \tn{CTEXnumberline} 命令,用于 \opt{tocline} 选项中设置目录标签的编号。区别是它需要在 \opt{tocset/hang = false} 时使用,否则目录中无法显示标题编号,使用它的时候 \opt{numsep} 选项仍然有效。\meta{编号类型} 为 \opt{chapter} 和 \opt{section} 等,也可用参数 \#1 代替当前级别类型,标题名用参数 \#2 代替一般不变。
+% \tn{EbNumberLine} 命令类似 \CTeX 的 \tn{CTEXnumberline} 命令,用于 \opt{tocline} 选项中设置目录标签的编号。区别是它需要在 \opt{tocset/hang = false} 时使用,否则目录中无法显示标题编号,使用它的时候 \opt{numsep} 选项仍然有效。\meta{编号类型} 为 \opt{chapter} 和 \opt{section} 等,也可用参数 \#1 代替当前级别类型,标题名用参数 \#2 代替一般不变。
% \end{function}
%
% \begin{ctexexam}
@@ -678,7 +679,7 @@
% \tn{end}\marg{环境名}
% \end{syntax}
% \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。目前除了表头斜线以及跨页功能存在不足,其它方面已满足对表格绝大多数格式的需求,具体用法可见宏包的说明文档。
-% \changes{v1.25l}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
+% \changes{v1.25m}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
% \end{function}
%
% \subsection{列表}
@@ -842,7 +843,7 @@
% \tn{qtyrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
% \end{syntax}
% \pkg{siunitx} 宏包的 \tn{num} 命令可以输出以科学计数法表示的数值,单位格式化命令 \tn{unit} 包含文字项目(例如字母或数字)时,使用 . 和 \~{} 放置在单元乘积中间,并使用 \_ 和 \^{} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。而 \tn{qty} 命令可用来输出带有单位的量,\tn{qtyrange} 可以输出带有范围和单位的量。
-% \changes{v1.25l}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
+% \changes{v1.25m}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
% \end{function}
%
% \begin{ctexexam}
@@ -979,7 +980,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/05/18}{1.25l}{beta}
+\ProvidesExplClass{easybook}{2021/05/19}{1.25m}{beta}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1090,21 +1091,20 @@
{ xindy } { imakeidx },
{ CJKmath = true } { xeCJK },
{ no-math } { fontspec },
- { noto,upint } { newtxmath }
+ { upint } { newtxmath }
}
{ \PassOptionsToPackage #1 }
\eb_put_ctexbook:n { \g__eb_options_clist }
\LoadClass[UTF8]{ctexbook}
\bool_new:N \l__eb_multoc_bool
-\bool_new:N \l__eb_notomath_bool
\bool_new:N \l__eb_uppercase_bool
\bool_new:N \l__eb_chap_withpart_bool
-\tl_new:N \l__eb_foot_numberwith_tl
+\tl_new:N \l__eb_foot_numparent_choice_tl
\seq_const_from_clist:Nn \c__eb_options_path_seq
{
- style,elsefont,spread,
+ style,subfont,spread,
refset,bibset,thmset,
geoset,hdrset,tocset
}
@@ -1128,19 +1128,19 @@
withpart .bool_set:N = \l__eb_chap_withpart_bool,
withpart .default:n = true,
withpart .initial:n = false,
- notomath .bool_set:N = \l__eb_notomath_bool,
- notomath .default:n = true,
- notomath .initial:n = true,
rulewidth .dim_set:N = \l__eb_rule_width_dim,
rulewidth .initial:n = 0.75pt,
uppercase .bool_set:N = \l__eb_uppercase_bool,
uppercase .default:n = true,
uppercase .initial:n = true,
- figpath .tl_set:N = \l_eb_graphics_path_tl,
+ figurepath .tl_set:N = \l_eb_graphics_path_tl,
footwith .choices:nn =
{ part,page,chapter }
- { \tl_set_eq:NN \l__eb_foot_numberwith_tl \l_keys_choice_tl },
+ {
+ \tl_set_eq:NN
+ \l__eb_foot_numparent_choice_tl \l_keys_choice_tl
+ },
footwith .value_required:n = true,
footwith .initial:n = chapter,
@@ -1171,11 +1171,6 @@
enumitem,
listings
}
-\ctex_at_end_preamble:n
- {
- \bool_if:NT \l__eb_notomath_bool
- { \RequirePackage{newtxmath,bm} }
- }
\ctex_at_end:n
{
\tl_if_empty:NF \g__eb_config_tl
@@ -1302,8 +1297,6 @@
\cs_new_protected:Npn \kaishu { \eb_switch_family:n { kaishu } }
\cs_new_protected:Npn \fangsong { \eb_switch_family:n { fangsong } }
}
-\eb_at_end_preamble:n
- { \cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape } }
\includepdfset{fitpaper = true}
\geometry
@@ -1441,7 +1434,10 @@
fnmark-num .choices:nn =
{ plain,pifont,pifont*,pifont-sans,pifont-sans* }
- { \tl_gset_eq:NN \l__eb_fnmark_number_tl \l_keys_choice_tl },
+ {
+ \tl_gset_eq:NN
+ \l__eb_fnmark_number_choice_tl \l_keys_choice_tl
+ },
fnmark-num .value_required:n = true
}
@@ -1488,6 +1484,7 @@
}
\tl_if_empty:NF \l_eb_graphics_path_tl
{ \exp_args:No \graphicspath { \l_eb_graphics_path_tl } }
+ \cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape }
}
\eb_at_end_preamble:n
@@ -1500,12 +1497,12 @@
\dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
\bool_if:NT \l__eb_chap_withpart_bool
{ \counterwithin*{chapter}{part} }
- \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
+ \tl_if_eq:NnT \l__eb_foot_numparent_choice_tl { part }
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{part}
}
- \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
+ \tl_if_eq:NnT \l__eb_foot_numparent_choice_tl { page }
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{page}
@@ -1518,14 +1515,14 @@
{
\linespread{\fp_use:N \l__eb_spread_footnote_fp}
\selectfont\ignorespaces
- \l__eb_font_footnote_tl
+ \l__eb_subfont_footnote_tl
}
\eb_patch_cmd:Nnn \@mpfootnotetext
{ \reset@font }
{
\linespread{\fp_use:N \l__eb_spread_footnote_fp}
\selectfont\ignorespaces
- \l__eb_font_footnote_tl
+ \l__eb_subfont_footnote_tl
}
\ctex_after_end_preamble:n
{
@@ -1533,7 +1530,7 @@
\eb_patch_cmd:Nnn \@footnotemark
{ \@makefnmark }
{
- \tl_use:N \l__eb_font_footnote_tl
+ \tl_use:N \l__eb_subfont_footnote_tl
\tl_use:N \l__eb_fnmark_format_tl
{\hbox:n { \textsuperscript{\@thefnmark} }}
}
@@ -1541,7 +1538,7 @@
}
\cs_set:Npn \@makefnmark
{
- \tl_use:N \l__eb_font_footnote_tl
+ \tl_use:N \l__eb_subfont_footnote_tl
\tl_use:N \l__eb_fnmark_format_tl
{
\hbox:n
@@ -1576,7 +1573,7 @@
{ \ding{\int_eval:n { 201 + #1 }} }
\cs_new:Npn \eb_footnote_counter:N #1
{
- \tl_case:NnF \l__eb_fnmark_number_tl
+ \tl_case:NnF \l__eb_fnmark_number_choice_tl
{
\c__eb_fnmark_number_plain_tl
{ \int_use:N #1 }
@@ -1651,7 +1648,7 @@
}
}
-\cs_new:Npn \EbNumberline #1
+\cs_new:Npn \EbNumberLine #1
{
\CTEXifname
{
@@ -1708,9 +1705,9 @@
{
\ctex_set:n
{
- chapter/tocline = \EbNumberline{##1}##2,
- section/tocline = \EbNumberline{##1}##2,
- subsection/tocline = \EbNumberline{##1}##2
+ chapter/tocline = \EbNumberLine{##1}##2,
+ section/tocline = \EbNumberLine{##1}##2,
+ subsection/tocline = \EbNumberLine{##1}##2
}
},
hang .default:n = true,
@@ -1938,8 +1935,8 @@
{ \bisection{\eb@toc@title}{\eb@bitoc@title} }
}{
\IfBooleanTF{#2}
- { \eb_title_mark_notoc:n {\eb@toc@title} }
- { \eb_title_mark_intoc:n {\eb@toc@title} }
+ {\eb_title_mark_notoc:n {\eb@toc@title}}
+ {\eb_title_mark_intoc:n {\eb@toc@title}}
}
}
\cs_new_protected:Npn \eb_biber_title_level_bool:n #1
@@ -1959,7 +1956,7 @@
\bool_if:NTF \l__eb_multoc_bool { \twocolumn } { \onecolumn }
}{
\boolfalse{@restonecol}
- \bool_if:NT \l__eb_multoc_bool { \twocolumn }
+ \bool_if:NTF \l__eb_multoc_bool { \twocolumn } { \onecolumn }
}
}
{ \tl_set:Nn \l__eb_toc_type_tl { article } }
@@ -2103,23 +2100,66 @@
}
}
-\tl_new:N \l__eb_font_table_tl
-\tl_new:N \l__eb_font_figure_tl
-\tl_new:N \l__eb_font_listing_tl
-\tl_new:N \l__eb_font_footnote_tl
+\tl_new:N \l__eb_subfont_table_tl
+\tl_new:N \l__eb_subfont_figure_tl
+\tl_new:N \l__eb_subfont_listing_tl
+\tl_new:N \l__eb_subfont_footnote_tl
+
+\seq_const_from_clist:Nn \c__eb_subfont_math_choice_seq
+ {
+ noto,notosans,times,scholax,stix,
+ charter,ebgaramond,libertine,none
+ }
+\seq_map_inline:Nn \c__eb_subfont_math_choice_seq
+ { \tl_const:cn { c__eb_subfont_math_#1_tl } {#1} }
-\eb_ctex_define:nn { elsefont }
+\eb_ctex_define:nn { subfont }
{
- table-cap .tl_set:N = \l__eb_font_table_tl,
+ table-cap .tl_set:N = \l__eb_subfont_table_tl,
table-cap .initial:n = \sffamily\small,
- figure-cap .tl_set:N = \l__eb_font_figure_tl,
+ figure-cap .tl_set:N = \l__eb_subfont_figure_tl,
figure-cap .initial:n = \sffamily\small,
- listing-cap .tl_set:N = \l__eb_font_listing_tl,
+ listing-cap .tl_set:N = \l__eb_subfont_listing_tl,
listing-cap .initial:n = \sffamily\small,
- footnote .tl_set:N = \l__eb_font_footnote_tl,
+ footnote .tl_set:N = \l__eb_subfont_footnote_tl,
footnote .initial:n = \rmfamily,
marginpar .tl_set:N = \marginfont,
- marginpar .initial:n = \rmfamily\footnotesize
+ marginpar .initial:n = \rmfamily\footnotesize,
+
+ math .choices:xn =
+ { \seq_use:Nn \c__eb_subfont_math_choice_seq { , } }
+ {
+ \tl_gset_eq:NN
+ \l__eb_subfont_math_choice_tl \l_keys_choice_tl
+ },
+ math .value_required:n = true,
+ math .initial:n = noto
+ }
+
+\cs_new_protected:Npn \eb_put_newtxmath:n #1
+ { \PassOptionsToPackage{#1}{newtxmath} }
+\eb_at_end_preamble:n
+ {
+ \tl_case:NnT \l__eb_subfont_math_choice_tl
+ {
+ \c__eb_subfont_math_noto_tl
+ { \eb_put_newtxmath:n { noto } }
+ \c__eb_subfont_math_notosans_tl
+ { \eb_put_newtxmath:n { notosans } }
+ \c__eb_subfont_math_ebgaramond_tl
+ { \eb_put_newtxmath:n { ebgaramond } }
+ \c__eb_subfont_math_times_tl
+ { \eb_put_newtxmath:n { noOT1 } }
+ \c__eb_subfont_math_libertine_tl
+ { \eb_put_newtxmath:n { libertine,noOT1 } }
+ \c__eb_subfont_math_stix_tl
+ { \eb_put_newtxmath:n { stix2,noOT1 } }
+ \c__eb_subfont_math_scholax_tl
+ { \eb_put_newtxmath:n { nc,noOT1 } }
+ \c__eb_subfont_math_charter_tl
+ { \eb_put_newtxmath:n { charter,noOT1 } }
+ }
+ { \RequirePackage{newtxmath,bm} }
}
\fp_new:N \l__eb_spread_line_fp
@@ -2152,9 +2192,9 @@
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
-\DeclareCaptionFont{eb@table@font}{\l__eb_font_table_tl}
-\DeclareCaptionFont{eb@figure@font}{\l__eb_font_figure_tl}
-\DeclareCaptionFont{eb@listing@font}{\l__eb_font_listing_tl}
+\DeclareCaptionFont{eb@table@font}{\l__eb_subfont_table_tl}
+\DeclareCaptionFont{eb@figure@font}{\l__eb_subfont_figure_tl}
+\DeclareCaptionFont{eb@listing@font}{\l__eb_subfont_listing_tl}
\captionsetup
{
format = hang,
@@ -2270,7 +2310,7 @@
{ \tl_const:cn { c__eb_name_#1_tl } {#3} }
{ \tl_const:cn { c__eb_name_#1_tl } {#2} }
}
-\NewDocumentCommand{\EbNewtheorem}
+\NewDocumentCommand{\EbNewTheorem}
{mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}}
{
\ctex_at_end_preamble:n
@@ -2358,7 +2398,7 @@
{ remark } { 注 } [ numbered = no ],
{ { proof } { 证明 } [ numbered = no,qed = \qedsymbol ] }
}
- { \EbNewtheorem #1 }
+ { \EbNewTheorem #1 }
}
\ctex_at_end_package:nn { tasks }
@@ -2906,7 +2946,7 @@
part =
{
pagestyle = empty,
- tocline = \EbNumberline{#1}#2,
+ tocline = \EbNumberLine{#1}#2,
format = \color{ctex@frame}\sffamily\Huge,
aftername =
{
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index f9dffdf646..8e42cef60f 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ