summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-08 21:24:01 +0000
committerNorbert Preining <preining@logic.at>2021-04-08 21:24:01 +0000
commit3f7dca1009bea1883cd401c13f915fb53e31056c (patch)
tree97801cdd7e70cae3e0f5550c1c7fb6ff5df92d84
parente5535dfde43899758ac8b4b8744aaa29668294d8 (diff)
easybook (9apr21)
git-svn-id: svn://tug.org/texlive/trunk@58798 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/easybook/chapter1.tex13
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook-demo.pdfbin262480 -> 262451 bytes
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook-demo.tex3
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook.pdfbin424141 -> 425118 bytes
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx850
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls809
6 files changed, 849 insertions, 826 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/chapter1.tex b/Master/texmf-dist/doc/latex/easybook/chapter1.tex
index 4b0a5c24756..15d8cbc899a 100644
--- a/Master/texmf-dist/doc/latex/easybook/chapter1.tex
+++ b/Master/texmf-dist/doc/latex/easybook/chapter1.tex
@@ -83,9 +83,10 @@
\item \zhlipsum[41-42][name = aspirin]
\begin{enumerate}
\item \zhlipsum*[42][name = aspirin]
- \item \zhlipsum*[42][name = aspirin]
+ \begin{enumerate}
+ \item \zhlipsum*[42][name = aspirin]
+ \end{enumerate}
\end{enumerate}
- \item \zhlipsum*[42][name = aspirin]
\end{enumerate}
\subsection{常规列表}
@@ -94,13 +95,17 @@
\item \zhlipsum[41-42][name = aspirin]
\begin{itemize}
\item \zhlipsum*[42][name = aspirin]
+ \begin{itemize}
+ \item \zhlipsum*[42][name = aspirin]
+ \end{itemize}
\end{itemize}
- \item \zhlipsum*[42][name = aspirin]
\end{itemize}
\subsection{主题列表}
\index{l@列表!z@主题列表}
\begin{description}
\item[主题一] \zhlipsum*[42][name = aspirin]
- \item[主题二] \zhlipsum*[42][name = aspirin]
+ \begin{description}
+ \item[主题二] \zhlipsum*[42][name = aspirin]
+ \end{description}
\end{description} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
index f98213bf6b6..16ed695502a 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
+++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
index af86342bfa0..e23317741fc 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
+++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
@@ -1,5 +1,6 @@
\documentclass[
class = book,
+ scheme = chinese,
zihao = -4,
font = noto,
paper = a4paper,
@@ -100,7 +101,7 @@
\url{https://latexstudio.net} \\
\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/04/06\hskip\ccwd\relax v1.24f}
+\date{2021/04/07\hskip\ccwd\relax v1.24g}
\frontmatter[roman]
\maketitle
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf
index 3fd17d4eb63..ab902542d59 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook.pdf
+++ b/Master/texmf-dist/doc/latex/easybook/easybook.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index caa02d9289f..9fba9154423 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -55,7 +55,7 @@ The latest version of this license is in
%
% \title{\sffamily easybook书籍文档类}
% \author{瞿毅}
-% \date{2021/04/06\hskip\ccwd\relax v1.24f\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/04/07\hskip\ccwd\relax v1.24g\thanks{\url{https://gitee.com/texl3/easybook}}}
% \maketitle
% \begin{abstract}
% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
@@ -114,8 +114,11 @@ The latest version of this license is in
% \begin{function}[rEXP,added = 2021-01-05]{entitle}
% 部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
% \end{function}
-% \begin{function}[rEXP,added = 2021-01-05]{english}
-% 使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
+% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-04-07]{scheme}
+% \begin{syntax}
+% scheme = <(chinese)|plain>
+% \end{syntax}
+% \opt{scheme} 代表文档的主题,扩展了此选项在\CTeX 文档类中原有的作用范围,\opt{plain} 选项可使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
% \end{function}
% \begin{function}[rEXP,added = 2021-01-05]{enstyle}
% 同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
@@ -168,7 +171,7 @@ The latest version of this license is in
% \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.24f}{2021/04/04}{目录命令的可选参数增加标题键值。}
+% \changes{v1.24g}{2021/04/04}{目录命令的可选参数增加标题键值。}
% \end{function}
%
% \section{接口选项}
@@ -256,7 +259,7 @@ The latest version of this license is in
% \ding{229} 以上选项路径为 \opt{link/...} \\
% \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-% \changes{v1.24f}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
+% \changes{v1.24g}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
% \end{function}
%
% \begin{optdesc}
@@ -455,8 +458,8 @@ The latest version of this license is in
% \begin{function}[EXP,added = 2021-01-13,updated = 2021-04-06]{head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
% \begin{syntax}
% head-foot = <页眉页脚中的内容>
-% chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
-% sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
+% chap-mark = <\tn{chaptermark} 标志命令的定义>
+% sec-mark = <\tn{sectionmark} 标志命令的定义>
% headrule = <页眉横线格式>
% footrule = <页脚横线格式>
% footnoterule = <脚注横线格式>
@@ -474,7 +477,9 @@ The latest version of this license is in
% \tn{easyhead}\oarg{位置}\marg{内容}
% \tn{easyfoot}\oarg{位置}\marg{内容}
% \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代表左、中、右部分。单面打印时,含有偶数的选项无效。
+% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。下面举一个设置页眉的例子
+% \end{function}
+%
% \begin{ctexexam}
% \hdrset
% {
@@ -488,7 +493,6 @@ The latest version of this license is in
% headrule = \hrule width \textwidth height 1pt
% }
% \end{ctexexam}
-% \end{function}
%
% \subsection{目录样式}
% \label{subsec:catalog style}
@@ -515,7 +519,7 @@ The latest version of this license is in
% belowoffset = <(-1pc)>
% 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},标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。\opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。下面举个设置标签的例子
+% \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},标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子
% \begin{ctexexam}
% \tocset
% {
@@ -524,9 +528,9 @@ The latest version of this license is in
% }
% \end{ctexexam}
%
-% \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似,但是一般为正值,可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。
-% \changes{v1.24f}{2021/04/05}{可以设置图、表和代码目录的标签。}
-% \changes{v1.24f}{2021/04/06}{增加目录引导线右边对齐方式。}
+% \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似,但是一般为正值,可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。\opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。
+% \changes{v1.24g}{2021/04/05}{可以设置图、表和代码目录的标签。}
+% \changes{v1.24g}{2021/04/06}{增加目录引导线右边对齐方式。}
% \end{function}
%
% \begin{function}[added = 2021-01-13,updated = 2021-04-06]{\tocrule}
@@ -560,18 +564,19 @@ The latest version of this license is in
% \end{function}
%
% \subsection{列表}
-% \begin{function}[added = 2021-01-05]{enumerate,itemize,description}
+% \begin{function}[added = 2021-01-05,updated = 2021-04-07]{enumerate,itemize,description}
% \begin{syntax}
% \tn{begin}\marg{环境名}\oarg{键值列表}
% \ \tn{item} <列表内容>
% \tn{end}\marg{环境名}
% \end{syntax}
-% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
+% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已为三种列表预置了三个级别的格式,可相互嵌套,若自定义标签可例如
% \begin{ctexexam}
% \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
% \begin{itemize}[label = \textbullet]
% \begin{description}[font = \sffamily\bfseries,style = nextline]
% \end{ctexexam}
+% \changes{v1.24g}{2021/04/07}{重新优化列表环境的配置。}
% \end{function}
%
% \subsubsection{排序列表}
@@ -583,9 +588,7 @@ The latest version of this license is in
% \end{ctexexam}
%
% \subsubsection{常规列表}
-% 使用 \env{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
-%
-% 用$\star$取代默认的符号
+% 使用 \env{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,举一个用$\star$取代默认的符号的例子
% \begin{ctexexam}
% \begin{itemize*}[$\star$]
% \begin{itemize}[$\star$]
@@ -608,7 +611,7 @@ The latest version of this license is in
% \ <定理内容>
% \tn{end}\marg{环境名}
% \end{syntax}
-% 这些是已预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。环境名对应的定理标题名如下
+% 这些是已预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 关闭,证明末尾会自动添加证明结束符。环境名对应的定理标题名如下
% \begin{center}
% \begin{tabular}{*{8}{c}}
% \toprule
@@ -803,48 +806,47 @@ The latest version of this license is in
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/04/06}{1.24f}{beta}
+\ProvidesExplClass{easybook}{2021/04/07}{1.24g}{beta}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
\cs_generate_variant:Nn \dim_add:Nn {NV}
-\cs_generate_variant:Nn \__put_hyperref:n {x}
+\cs_generate_variant:Nn \__eb_put_hyperref:n {x}
\cs_new_protected:Npn \__ctex_define:nn #1
{\keys_define:nn {ctex/#1}}
-\cs_new_protected:Npn \__put_ctexbook:n #1
+\cs_new_protected:Npn \__eb_put_ctexbook:n #1
{\PassOptionsToClass{#1}{ctexbook}}
-\cs_new_protected:Npn \__patch_cmd:Nnn #1#2#3
+\cs_new_protected:Npn \__eb_patch_cmd:Nnn #1#2#3
{\ctex_patch_cmd_once:NnnnTF #1{}{#2}{#3}{}{\ctex_patch_failure:N #1}}
-\cs_new_protected:Npn \__appto_cmd:Nn #1#2
+\cs_new_protected:Npn \__eb_appto_cmd:Nn #1#2
{\ctex_appto_cmd:NnnTF #1{}{#2}{}{\ctex_patch_failure:N #1}}
-\bool_set_false:N \l__draft_bool
-\bool_set_false:N \l__newline_bool
-\bool_set_false:N \l__font_noto_bool
-\bool_set_true:N \l__zhtitle_bool
-\bool_set_true:N \l__lang_chinese_bool
-\bool_set_true:N \l__page_twoside_bool
-\bool_set_true:N \l__class_book_bool
-\clist_new:N \g__options_clist
+\bool_set_false:N \l__eb_draft_bool
+\bool_set_false:N \l__eb_newline_bool
+\bool_set_false:N \l__eb_font_noto_bool
+\bool_set_true:N \l__eb_zhtitle_bool
+\bool_set_true:N \l__eb_page_twoside_bool
+\bool_set_true:N \l__eb_class_book_bool
+\clist_new:N \g__eb_options_clist
\keys_define:nn {easybook}
{
- draft .code:n = \bool_set_true:N \l__draft_bool,
- newline .code:n = \bool_set_true:N \l__newline_bool,
- entitle .code:n = \bool_set_false:N \l__zhtitle_bool,
- english .code:n = \bool_set_false:N \l__lang_chinese_bool,
- enstyle .meta:n = {newline,entitle,english},
+ draft .code:n = \bool_set_true:N \l__eb_draft_bool,
+ newline .code:n = \bool_set_true:N \l__eb_newline_bool,
+ entitle .code:n = \bool_set_false:N \l__eb_zhtitle_bool,
+ scheme .code:n = \__eb_put_ctexbook:n {scheme = #1},
+ enstyle .meta:n = {newline,entitle,scheme = plain},
font .choices:nn =
{adobe,founder,mac,windows,none}
- {\__put_ctexbook:n {fontset = \l_keys_choice_tl}},
+ {\__eb_put_ctexbook:n {fontset = \l_keys_choice_tl}},
font/noto .code:n =
{
- \bool_set_true:N \l__font_noto_bool
- \__put_ctexbook:n {fontset = none}
+ \bool_set_true:N \l__eb_font_noto_bool
+ \__eb_put_ctexbook:n {fontset = none}
},
font/overleaf .code:n = {},
- font/linux .code:n = \__put_ctexbook:n {fontset = ubuntu},
+ font/linux .code:n = \__eb_put_ctexbook:n {fontset = ubuntu},
font .value_required:n = true,
font .initial:n = overleaf,
@@ -857,26 +859,22 @@ The latest version of this license is in
twoside .value_forbidden:n = true,
oneside .code:n =
{
- \bool_set_false:N \l__page_twoside_bool
- \__put_ctexbook:n {oneside}
+ \bool_set_false:N \l__eb_page_twoside_bool
+ \__eb_put_ctexbook:n {oneside}
},
class .choice:,
class .value_required:n = true,
class/book .code:n = {},
- class/article .code:n = \bool_set_false:N \l__class_book_bool,
+ class/article .code:n = \bool_set_false:N \l__eb_class_book_bool,
class .initial:n = book,
unknown .code:n =
- {\clist_gput_right:No \g__options_clist{\CurrentOption}}
+ {\clist_gput_right:No \g__eb_options_clist{\CurrentOption}}
}
\ProcessKeysOptions{easybook}
-\bool_if:NTF \l__lang_chinese_bool
- {\__put_ctexbook:n {scheme = chinese}}
- {\__put_ctexbook:n {scheme = plain}}
-
\clist_map_inline:nn
{
{svgnames}{xcolor},
@@ -891,59 +889,59 @@ The latest version of this license is in
{no-math}{fontspec},
{noto,upint}{newtxmath}
}{\PassOptionsToPackage#1}
-\__put_ctexbook:n {\g__options_clist}
+\__eb_put_ctexbook:n {\g__eb_options_clist}
\LoadClass[UTF8]{ctexbook}
-\bool_new:N \l__multoc_bool
-\bool_new:N \l__notomath_bool
-\bool_new:N \l__uppercase_bool
-\bool_new:N \l__chap_withpart_bool
-\tl_new:N \l__foot_numberwith_tl
-\tl_new:N \g__config_tl
+\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 \g__eb_config_tl
-\seq_const_from_clist:Nn \c__options_path_seq
+\seq_const_from_clist:Nn \c__eb_options_path_seq
{
style,link,elsefont,
spread,bibset,thmset,
geoset,hdrset,tocset
}
-\seq_map_inline:Nn \c__options_path_seq
+\seq_map_inline:Nn \c__eb_options_path_seq
{
\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}
\cs_new:cpn {#1}##1{\keys_set:nn {ctex/#1}{##1}}
}
\ctex_define:n
{
- config .tl_set:N = \g__config_tl,
+ config .tl_set:N = \g__eb_config_tl,
lstlistlistingname .tl_set:N = \lstlistlistingname,
lstlistingname .tl_set:N = \lstlistingname
}
\__ctex_define:nn {style}
{
- multoc .bool_set:N = \l__multoc_bool,
+ multoc .bool_set:N = \l__eb_multoc_bool,
multoc .default:n = true,
- withpart .bool_set:N = \l__chap_withpart_bool,
+ withpart .bool_set:N = \l__eb_chap_withpart_bool,
withpart .default:n = true,
withpart .initial:n = false,
- notomath .bool_set:N = \l__notomath_bool,
+ notomath .bool_set:N = \l__eb_notomath_bool,
notomath .default:n = true,
notomath .initial:n = false,
- rulewidth .dim_set:N = \l__rule_width_dim,
+ rulewidth .dim_set:N = \l__eb_rule_width_dim,
rulewidth .initial:n = 0.75pt,
- uppercase .bool_set:N = \l__uppercase_bool,
+ uppercase .bool_set:N = \l__eb_uppercase_bool,
uppercase .default:n = true,
uppercase .initial:n = true,
footwith .choices:nn =
{part,page,chapter}
- {\tl_set_eq:NN \l__foot_numberwith_tl\l_keys_choice_tl},
+ {\tl_set_eq:NN \l__eb_foot_numberwith_tl\l_keys_choice_tl},
footwith .value_required:n = true,
footwith .initial:n = chapter,
- figure-sep .tl_set:N = \l__figure_separator_tl,
- table-sep .tl_set:N = \l__table_separator_tl,
- listing-sep .tl_set:N = \l__lstlisting_separator_tl,
- equation-sep .tl_set:N = \l__equation_separator_tl,
+ figure-sep .tl_set:N = \l__eb_figure_separator_tl,
+ table-sep .tl_set:N = \l__eb_table_separator_tl,
+ listing-sep .tl_set:N = \l__eb_lstlisting_separator_tl,
+ equation-sep .tl_set:N = \l__eb_equation_separator_tl,
number-sep .meta:n =
{
figure-sep = {#1},table-sep = {#1},
@@ -968,11 +966,11 @@ The latest version of this license is in
}
\ctex_at_end_preamble:n
{
- \bool_if:NT \l__notomath_bool{\RequirePackage{newtxmath,bm}}
- \tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}}
+ \bool_if:NT \l__eb_notomath_bool{\RequirePackage{newtxmath,bm}}
+ \tl_if_empty:NF \g__eb_config_tl{\file_input:n {\g__eb_config_tl}}
}
-\cs_new_protected:Npn \__ifpackage_later:nn #1#2
+\cs_new_protected:Npn \__eb_ifpackage_later:nn #1#2
{
\@ifpackagelater{#1}{#2}
{}{\msg_warning:nnn {easybook}{package-old}{#1}}
@@ -992,93 +990,93 @@ The latest version of this license is in
{ctex}{2020/10/19},
{thmtools}{2020/08/01},
{caption-light}{2020/08/24}
- }{\__ifpackage_later:nn #1}
+ }{\__eb_ifpackage_later:nn #1}
\sys_if_engine_xetex:TF
{
- \cs_new_eq:NN \__set_family:nnn \xeCJK_set_family:nnn
- \cs_new_eq:NN \__switch_family:n \xeCJK_switch_family:n
+ \cs_new_eq:NN \__eb_set_family:nnn \xeCJK_set_family:nnn
+ \cs_new_eq:NN \__eb_switch_family:n \xeCJK_switch_family:n
}{
- \cs_new_eq:NN \__set_family:nnn \ctex_ltj_set_family:nnn
- \cs_new_eq:NN \__switch_family:n \ctex_ltj_switch_family:n
+ \cs_new_eq:NN \__eb_set_family:nnn \ctex_ltj_set_family:nnn
+ \cs_new_eq:NN \__eb_switch_family:n \ctex_ltj_switch_family:n
}
-\cs_new_protected:Npn \__setmainfont:nn #1#2
+\cs_new_protected:Npn \__eb_setmainfont:nn #1#2
{\__fontspec_main_setmainfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__setsansfont:nn #1#2
+\cs_new_protected:Npn \__eb_setsansfont:nn #1#2
{\__fontspec_main_setsansfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__setmonofont:nn #1#2
+\cs_new_protected:Npn \__eb_setmonofont:nn #1#2
{\__fontspec_main_setmonofont:nn {#2}{#1}}
-\cs_new_protected:Npn \__setCJKmainfont:nn #1#2
- {\__set_family:nnn {\CJKrmdefault}{#2}{#1}}
-\cs_new_protected:Npn \__setCJKsansfont:nn #1#2
- {\__set_family:nnn {\CJKsfdefault}{#2}{#1}}
-\cs_new_protected:Npn \__setCJKmonofont:nn #1#2
- {\__set_family:nnn {\CJKttdefault}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_songti:nn #1#2
- {\__set_family:nnn {songti}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_heiti:nn #1#2
- {\__set_family:nnn {heiti}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_kaishu:nn #1#2
- {\__set_family:nnn {kaishu}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_fangsong:nn #1#2
- {\__set_family:nnn {fangsong}{#2}{#1}}
+\cs_new_protected:Npn \__eb_setCJKmainfont:nn #1#2
+ {\__eb_set_family:nnn {\CJKrmdefault}{#2}{#1}}
+\cs_new_protected:Npn \__eb_setCJKsansfont:nn #1#2
+ {\__eb_set_family:nnn {\CJKsfdefault}{#2}{#1}}
+\cs_new_protected:Npn \__eb_setCJKmonofont:nn #1#2
+ {\__eb_set_family:nnn {\CJKttdefault}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_songti:nn #1#2
+ {\__eb_set_family:nnn {songti}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_heiti:nn #1#2
+ {\__eb_set_family:nnn {heiti}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_kaishu:nn #1#2
+ {\__eb_set_family:nnn {kaishu}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_fangsong:nn #1#2
+ {\__eb_set_family:nnn {fangsong}{#2}{#1}}
-\tl_const:Nn \__option_zhfont_tl
+\tl_const:Nn \__eb_option_zhfont_tl
{UprightFont = *,AutoFakeBold = 1.5,ItalicFont = *}
-\cs_new_protected:Npx \__setCJKmainfont:n #1
- {\__setCJKmainfont:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__setCJKsansfont:n #1
- {\__setCJKsansfont:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__setCJKmonofont:n #1
- {\__setCJKmonofont:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_songti:n #1
- {\__set_zhfont_songti:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_heiti:n #1
- {\__set_zhfont_heiti:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_kaishu:n #1
- {\__set_zhfont_kaishu:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_fangsong:n #1
- {\__set_zhfont_fangsong:nn {#1}{\__option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_setCJKmainfont:n #1
+ {\__eb_setCJKmainfont:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_setCJKsansfont:n #1
+ {\__eb_setCJKsansfont:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_setCJKmonofont:n #1
+ {\__eb_setCJKmonofont:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_songti:n #1
+ {\__eb_set_zhfont_songti:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_heiti:n #1
+ {\__eb_set_zhfont_heiti:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_kaishu:n #1
+ {\__eb_set_zhfont_kaishu:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_fangsong:n #1
+ {\__eb_set_zhfont_fangsong:nn {#1}{\__eb_option_zhfont_tl}}
-\bool_if:NT \l__font_noto_bool
+\bool_if:NT \l__eb_font_noto_bool
{
- \__setmainfont:nn {NotoSerif}
+ \__eb_setmainfont:nn {NotoSerif}
{
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic
}
- \__setsansfont:nn {NotoSans}
+ \__eb_setsansfont:nn {NotoSans}
{
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic
}
- \__setmonofont:nn {NotoSansMono}
+ \__eb_setmonofont:nn {NotoSansMono}
{
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold
}
- \__setCJKmainfont:nn {FZShuSong-Z01S}
+ \__eb_setCJKmainfont:nn {FZShuSong-Z01S}
{
UprightFont = *,
BoldFont = FZHei-B01S,
ItalicFont = FZKai-Z03S
}
- \__setCJKsansfont:n {FZHei-B01S}
- \__setCJKmonofont:n {FZFangSong-Z02S}
- \__set_zhfont_songti:n {FZShuSong-Z01S}
- \__set_zhfont_heiti:n {FZHei-B01S}
- \__set_zhfont_kaishu:n {FZKai-Z03S}
- \__set_zhfont_fangsong:n {FZFangSong-Z02S}
- \cs_new_protected:Npn \songti{\__switch_family:n {songti}}
- \cs_new_protected:Npn \heiti{\__switch_family:n {heiti}}
- \cs_new_protected:Npn \kaishu{\__switch_family:n {kaishu}}
- \cs_new_protected:Npn \fangsong{\__switch_family:n {fangsong}}
+ \__eb_setCJKsansfont:n {FZHei-B01S}
+ \__eb_setCJKmonofont:n {FZFangSong-Z02S}
+ \__eb_set_zhfont_songti:n {FZShuSong-Z01S}
+ \__eb_set_zhfont_heiti:n {FZHei-B01S}
+ \__eb_set_zhfont_kaishu:n {FZKai-Z03S}
+ \__eb_set_zhfont_fangsong:n {FZFangSong-Z02S}
+ \cs_new_protected:Npn \songti{\__eb_switch_family:n {songti}}
+ \cs_new_protected:Npn \heiti{\__eb_switch_family:n {heiti}}
+ \cs_new_protected:Npn \kaishu{\__eb_switch_family:n {kaishu}}
+ \cs_new_protected:Npn \fangsong{\__eb_switch_family:n {fangsong}}
}
\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\normalfont}
@@ -1095,7 +1093,7 @@ The latest version of this license is in
marginparsep = 8pt,
marginparwidth = 2.54cm
}
-\clist_new:N \g__geometry_clist
+\clist_new:N \g__eb_geometry_clist
\__ctex_define:nn {geoset}
{
footnotemargin .dim_set:N = \footnotemargin,
@@ -1104,11 +1102,11 @@ The latest version of this license is in
footparskip .initial:n = 0ex,
footparindent .tl_set:N = \hangfootparindent,
footparindent .initial:n = 2\ccwd,
- list-labelsep .dim_set:N = \list@labelsep,
+ list-labelsep .dim_set:N = \eb@list@labelsep,
list-labelsep .initial:n = \ccwd,
unknown .code:n =
{
- \clist_gput_right:Nx \g__geometry_clist
+ \clist_gput_right:Nx \g__eb_geometry_clist
{
\l_keys_key_str
\tl_if_empty:NF \l_keys_value_tl{ = {#1}}
@@ -1119,7 +1117,7 @@ The latest version of this license is in
\cs_gset:Npn \cleardoublepage
{
\clearpage
- \bool_if:NT \l__page_twoside_bool
+ \bool_if:NT \l__eb_page_twoside_bool
{
\int_if_odd:nF \c@page
{\hbox:n {}\thispagestyle{empty}\clearpage}
@@ -1141,14 +1139,14 @@ The latest version of this license is in
\cs_gset_eq:NN \easyfoot\fancyfoot
\__ctex_define:nn {hdrset}
{
- head-foot .tl_set:N = \l__fancyhf_content_tl,
+ head-foot .tl_set:N = \l__eb_fancyhf_content_tl,
head-foot .initial:n =
{
\easyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
\easyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
\easyhead[EL,OR]{\color{ctex@frame}\thepage}
},
- chap-mark .cs_set:Np = \__fancyhf_chap_mark:n #1,
+ chap-mark .cs_set:Np = \__eb_fancyhf_chap_mark:n #1,
chap-mark .initial:n =
{
\int_compare:nT {\c@secnumdepth > -1}
@@ -1160,7 +1158,7 @@ The latest version of this license is in
\fi
}#1
},
- sec-mark .cs_set:Np = \__fancyhf_sec_mark:n #1,
+ sec-mark .cs_set:Np = \__eb_fancyhf_sec_mark:n #1,
sec-mark .initial:n =
{
\int_compare:nT {\c@secnumdepth > 0}
@@ -1175,7 +1173,7 @@ The latest version of this license is in
{
\group_begin:
\color{ctex@frame}\vspace*{1.5pt}
- \hrule width \textwidth height \l__rule_width_dim
+ \hrule width \textwidth height \l__eb_rule_width_dim
\group_end:
},
footrule .tl_gset:N = \footrule,
@@ -1185,59 +1183,59 @@ The latest version of this license is in
{
\group_begin:
\color{ctex@frame}
- \hrule width 0.35\columnwidth height \l__rule_width_dim
+ \hrule width 0.35\columnwidth height \l__eb_rule_width_dim
\vspace*{2.6pt}
\group_end:
}
}
-\cs_new_protected:Npn \__ifuppercase_chapmark_set:n #1
+\cs_new_protected:Npn \__eb_ifupper_chaptermark_set:n #1
{
- \bool_if:NTF \l__uppercase_bool
- {\text_uppercase:n {\__fancyhf_chap_mark:n {#1}}}
- {\text_titlecase_first:n {\__fancyhf_chap_mark:n {#1}}}
+ \bool_if:NTF \l__eb_uppercase_bool
+ {\text_uppercase:n {\__eb_fancyhf_chap_mark:n {#1}}}
+ {\text_titlecase_first:n {\__eb_fancyhf_chap_mark:n {#1}}}
}
\ctex_at_end_preamble:n
{
- \exp_args:NV \geometry\g__geometry_clist
+ \exp_args:NV \geometry\g__eb_geometry_clist
\pagestyle{fancy}
\fancyhf{}
- \bool_if:NTF \l__page_twoside_bool
+ \bool_if:NTF \l__eb_page_twoside_bool
{
\cs_gset:Npn \chaptermark#1
{
\markboth
- {\__ifuppercase_chapmark_set:n {#1}}
- {\__ifuppercase_chapmark_set:n {#1}}
+ {\__eb_ifupper_chaptermark_set:n {#1}}
+ {\__eb_ifupper_chaptermark_set:n {#1}}
}
- \l__fancyhf_content_tl
+ \l__eb_fancyhf_content_tl
\cs_gset_eq:NN \ps@plain\ps@empty
}{
\cs_gset:Npn \chaptermark#1
- {\markboth{\__ifuppercase_chapmark_set:n {#1}}{}}
- \l__fancyhf_content_tl
+ {\markboth{\__eb_ifupper_chaptermark_set:n {#1}}{}}
+ \l__eb_fancyhf_content_tl
\cs_gset_eq:NN \ps@plain\ps@empty
}
\cs_gset:Npn \sectionmark#1
{
\markright
{
- \bool_if:NTF \l__uppercase_bool
- {\text_uppercase:n {\__fancyhf_sec_mark:n {#1}}}
- {\text_titlecase_first:n {\__fancyhf_sec_mark:n {#1}}}
+ \bool_if:NTF \l__eb_uppercase_bool
+ {\text_uppercase:n {\__eb_fancyhf_sec_mark:n {#1}}}
+ {\text_titlecase_first:n {\__eb_fancyhf_sec_mark:n {#1}}}
}
}
- \bool_if:NT \l__draft_bool
+ \bool_if:NT \l__eb_draft_bool
{
- \bool_if:NTF \l__page_twoside_bool
+ \bool_if:NTF \l__eb_page_twoside_bool
{\easyfoot[C]{\color{gray!60}\sffamily\today}}
{\easyhead[L]{\color{gray!60}\sffamily\today}}
\geometry{showframe}
}
}
-\seq_const_from_clist:Nn \c__toc_headings_level_seq
+\seq_const_from_clist:Nn \c__eb_toc_headings_level_seq
{part,chapter,section,subsection,lists}
-\seq_map_inline:Nn \c__toc_headings_level_seq
+\seq_map_inline:Nn \c__eb_toc_headings_level_seq
{
\ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
\__ctex_define:nn {tocset}
@@ -1249,26 +1247,26 @@ The latest version of this license is in
}
\__ctex_define:nn {tocset}
{
- lists/lolskip .skip_set:N = \l__toc_lolskip_skip,
+ lists/lolskip .skip_set:N = \l__eb_toc_lolskip_skip,
lists/lolskip .initial:n = 0.8pc,
- lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim,
+ lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim,
lists/belowoffset .initial:n = 0pc,
- tocline-fig .cs_set:Np = \labelname@lof#1#2,
+ tocline-fig .cs_set:Np = \eb@labelname@lof#1#2,
tocline-fig .initial:n =
- {\figurename\space#1\hspace{\list@labelsep}#2},
- tocline-tab .cs_set:Np = \labelname@lot#1#2,
+ {\figurename\space#1\hspace{\eb@list@labelsep}#2},
+ tocline-tab .cs_set:Np = \eb@labelname@lot#1#2,
tocline-tab .initial:n =
- {\tablename\space#1\hspace{\list@labelsep}#2},
- tocline-lst .tl_set:N = \labelname@lol,
+ {\tablename\space#1\hspace{\eb@list@labelsep}#2},
+ tocline-lst .tl_set:N = \eb@labelname@lol,
tocline-lst .initial:n =
{
\lstlistingname\space
- \thelstlisting\hspace{\list@labelsep}
+ \thelstlisting\hspace{\eb@list@labelsep}
\lstcaption
},
- belowoffset .dim_set:N = \l__toc_offset_dim,
+ belowoffset .dim_set:N = \l__eb_toc_offset_dim,
belowoffset .initial:n = -1pc,
- line-align .bool_set:N = \l__toc_line_align_bool,
+ line-align .bool_set:N = \l__eb_toc_line_align_bool,
line-align .default:n = true,
line-align .initial:n = true
}
@@ -1302,11 +1300,11 @@ The latest version of this license is in
\IfBooleanTF{#1}
{\thecontentspage}
{
- \bool_if:NTF \l__toc_line_align_bool
+ \bool_if:NTF \l__eb_toc_line_align_bool
{\contentspage}{\thecontentspage}
}
}
-\cs_new_protected:Npn \__titlecontents_set:nn #1#2
+\cs_new_protected:Npn \__eb_titlecontents_set:nn #1#2
{
\titlecontents{#1}
[\use:c {l__toc_#2_indent_tl}]
@@ -1323,13 +1321,13 @@ The latest version of this license is in
{figure}{lists},
{table}{lists},
{lstlisting}{lists}
- }{\__titlecontents_set:nn #1}
+ }{\__eb_titlecontents_set:nn #1}
\prop_new:N \l_label_name_prop
\prop_set_from_keyval:Nn \l_label_name_prop
{
- figure = \labelname@lof,
- table = \labelname@lot
+ figure = \eb@labelname@lof,
+ table = \eb@labelname@lot
}
\cs_gset:Npn \caption@@@addcontentsline#1#2#3#4
{
@@ -1342,21 +1340,21 @@ The latest version of this license is in
{\protect\numberline{\thelstlisting}\lst@@caption}
}{
\let\lstcaption\lst@@caption
- \addcontentsline{lol}{lstlisting}{\labelname@lol}
+ \addcontentsline{lol}{lstlisting}{\eb@labelname@lol}
}
-\__appto_cmd:Nn \@chapter
+\__eb_appto_cmd:Nn \@chapter
{
- \skip_if_eq:nnF {\l__toc_lolskip_skip}{\c_zero_skip}
+ \skip_if_eq:nnF {\l__eb_toc_lolskip_skip}{\c_zero_skip}
{
\addtocontents{lol}
- {\protect\addvspace{\skip_use:N \l__toc_lolskip_skip}}
+ {\protect\addvspace{\skip_use:N \l__eb_toc_lolskip_skip}}
}
- \bool_if:NF \l__class_book_bool
+ \bool_if:NF \l__eb_class_book_bool
{\msg_error:nn {easybook}{no-chapter}}
}
-\__appto_cmd:Nn \@schapter
+\__eb_appto_cmd:Nn \@schapter
{
- \bool_if:NF \l__class_book_bool
+ \bool_if:NF \l__eb_class_book_bool
{\msg_error:nn {easybook}{no-chapter}}
}
\msg_new:nnn {easybook}{no-chapter}
@@ -1365,36 +1363,36 @@ The latest version of this license is in
The~\string\chapter\space~command~will~not~be~used.
}
-\cs_new_protected:Npn \__ifuppercase_set:n #1
+\cs_new_protected:Npn \__eb_ifuppercase_set:n #1
{
- \bool_if:NTF \l__uppercase_bool
+ \bool_if:NTF \l__eb_uppercase_bool
{\text_uppercase:n {#1}}
{\text_titlecase_first:n {#1}}
}
-\cs_new_protected:Npn \__markboth:n #1
+\cs_new_protected:Npn \__eb_markboth:n #1
{
- \bool_if:NTF \l__page_twoside_bool
+ \bool_if:NTF \l__eb_page_twoside_bool
{
\markboth
- {\__ifuppercase_set:n {#1}}
- {\__ifuppercase_set:n {#1}}
- }{\markboth{\__ifuppercase_set:n {#1}}{}}
+ {\__eb_ifuppercase_set:n {#1}}
+ {\__eb_ifuppercase_set:n {#1}}
+ }{\markboth{\__eb_ifuppercase_set:n {#1}}{}}
}
-\tl_set:Nn \l__toc_type_tl{book}
+\tl_set:Nn \l__eb_toc_type_tl{book}
\keys_define:nn {listoc}
{
- article .code:n = \tl_set:Nn \l__toc_type_tl{article},
+ article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article},
book .code:n = {},
- multoc .bool_set:N = \l__multoc_bool,
+ multoc .bool_set:N = \l__eb_multoc_bool,
multoc .default:n = true,
multoc .initial:n = false,
- title .tl_set:N = \toc@title
+ title .tl_set:N = \eb@toc@title
}
-\cs_new_protected:Npn \__title_mark_intoc:n #1
+\cs_new_protected:Npn \__eb_title_mark_intoc:n #1
{
- \tl_if_eq:NnTF \l__toc_type_tl{book}
+ \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
{
\chapter*{\phantomsection#1}
\CTEX@addtocline{chapter}{#1}
@@ -1402,94 +1400,94 @@ The latest version of this license is in
\section*{\phantomsection#1}
\CTEX@addtocline{section}{#1}
}
- \__markboth:n {#1}
+ \__eb_markboth:n {#1}
}
-\cs_new_protected:Npn \__title_mark:n #1
+\cs_new_protected:Npn \__eb_title_mark:n #1
{
- \tl_if_eq:NnTF \l__toc_type_tl{book}
+ \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
{\chapter*{\phantomsection#1}}
{\section*{\phantomsection#1}}
- \__markboth:n {#1}
+ \__eb_markboth:n {#1}
}
-\cs_new_protected:Npn \__ifmultoc_pre_set:
+\cs_new_protected:Npn \__eb_ifmultoc_pre_set:
{
- \bool_if:NTF \l__class_book_bool
+ \bool_if:NTF \l__eb_class_book_bool
{
\if@twocolumn
\@restonecoltrue
- \bool_if:NTF \l__multoc_bool{\twocolumn}{\onecolumn}
+ \bool_if:NTF \l__eb_multoc_bool{\twocolumn}{\onecolumn}
\else
\@restonecolfalse
- \bool_if:NT \l__multoc_bool{\twocolumn}
+ \bool_if:NT \l__eb_multoc_bool{\twocolumn}
\fi
- }{\tl_set:Nn \l__toc_type_tl{article}}
+ }{\tl_set:Nn \l__eb_toc_type_tl{article}}
}
-\cs_new_protected:Npn \__ifmultoc_post_set:
+\cs_new_protected:Npn \__eb_ifmultoc_post_set:
{
- \bool_if:NTF \l__class_book_bool
+ \bool_if:NTF \l__eb_class_book_bool
{
\if@restonecol
\twocolumn
\else
\onecolumn
\fi
- }{\tl_set:Nn \l__toc_type_tl{article}}
+ }{\tl_set:Nn \l__eb_toc_type_tl{article}}
}
-\cs_new_protected:Npn \__title_ifintoc_set:n #1
+\cs_new_protected:Npn \__eb_title_ifintoc_set:n #1
{
\IfBooleanTF{#1}
- {\__title_mark:n {\toc@title}}
- {\__title_mark_intoc:n {\toc@title}}
+ {\__eb_title_mark:n {\eb@toc@title}}
+ {\__eb_title_mark_intoc:n {\eb@toc@title}}
}
\RenewDocumentCommand{\tableofcontents}{o}
{
\group_begin:
- \tl_set_eq:NN \toc@title\contentsname
+ \tl_set_eq:NN \eb@toc@title\contentsname
\IfValueT{#1}{\keys_set:nn {listoc}{#1}}
- \__ifmultoc_pre_set:
- \__title_mark:n {\toc@title}
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_mark:n {\eb@toc@title}
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{toc}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
\RenewDocumentCommand{\listoffigures}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\listfigurename
+ \tl_set_eq:NN \eb@toc@title\listfigurename
\IfValueT{#2}{\keys_set:nn {listoc}{#2}}
- \__ifmultoc_pre_set:
- \__title_ifintoc_set:n {#1}
- \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_ifintoc_set:n {#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lof}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
\RenewDocumentCommand{\listoftables}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\listtablename
+ \tl_set_eq:NN \eb@toc@title\listtablename
\IfValueT{#2}{\keys_set:nn {listoc}{#2}}
- \__ifmultoc_pre_set:
- \__title_ifintoc_set:n {#1}
- \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_ifintoc_set:n {#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lot}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
\NewDocumentCommand{\listoflistings}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\lstlistlistingname
+ \tl_set_eq:NN \eb@toc@title\lstlistlistingname
\IfValueT{#2}{\keys_set:nn {listoc}{#2}}
- \__ifmultoc_pre_set:
- \__title_ifintoc_set:n {#1}
- \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_ifintoc_set:n {#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lol}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
@@ -1502,28 +1500,28 @@ The latest version of this license is in
]
\indexsetup
{
- level = \bool_if:NTF \l__class_book_bool{\chapter*}{\section*},
- toclevel = \bool_if:NTF \l__class_book_bool{chapter}{section},
- firstpagestyle = \bool_if:NTF \l__class_book_bool{plain}{fancy}
+ level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*},
+ toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section},
+ firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy}
}
-\__patch_cmd:Nnn \imki@indexheaders
+\__eb_patch_cmd:Nnn \imki@indexheaders
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
- {\__markboth:n {\indexname}}
+ {\__eb_markboth:n {\indexname}}
-\tl_new:N \l__font_table_tl
-\tl_new:N \l__font_figure_tl
-\tl_new:N \l__font_listing_tl
-\tl_new:N \l__font_footnote_tl
+\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
\__ctex_define:nn {elsefont}
{
- table-cap .tl_set:N = \l__font_table_tl,
+ table-cap .tl_set:N = \l__eb_font_table_tl,
table-cap .initial:n = \sffamily\small,
- figure-cap .tl_set:N = \l__font_figure_tl,
+ figure-cap .tl_set:N = \l__eb_font_figure_tl,
figure-cap .initial:n = \sffamily\small,
- listing-cap .tl_set:N = \l__font_listing_tl,
+ listing-cap .tl_set:N = \l__eb_font_listing_tl,
listing-cap .initial:n = \sffamily\small,
- footnote .tl_set:N = \l__font_footnote_tl,
+ footnote .tl_set:N = \l__eb_font_footnote_tl,
footnote .initial:n = \rmfamily,
marginpar .tl_set:N = \marginfont,
marginpar .initial:n = \rmfamily\footnotesize
@@ -1531,27 +1529,27 @@ The latest version of this license is in
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
-\DeclareCaptionFont{table@font}{\l__font_table_tl}
-\DeclareCaptionFont{figure@font}{\l__font_figure_tl}
-\DeclareCaptionFont{listing@font}{\l__font_listing_tl}
+\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}
\captionsetup
{
format = hang,
% figurewithin = section,
% tablewithin = section,
- font = {stretch = {\fp_use:N \l__spread_caption_fp}},
+ font = {stretch = {\fp_use:N \l__eb_spread_caption_fp}},
labelfont = {color = ctex@frame},
labelsep = ccwd,
singlelinecheck = true,
belowskip = 0pt,aboveskip = 10pt
}
-\captionsetup[table]{font += table@font}
-\captionsetup[figure]{font += figure@font}
-\captionsetup[lstlisting]{font += listing@font}
+\captionsetup[table]{font += eb@table@font}
+\captionsetup[figure]{font += eb@figure@font}
+\captionsetup[lstlisting]{font += eb@listing@font}
\captionsetup[subfigure]
{
labelformat = parens,
- font += figure@font,
+ font += eb@figure@font,
belowskip = 2pt,aboveskip = 6pt
}
\ctex_at_end_package:nn {bicaption}
@@ -1559,27 +1557,27 @@ The latest version of this license is in
\captionsetup[figure][bi-second]{name = Figure}
\captionsetup[table][bi-second]{name = Table}
}
-\cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}}
-\cs_new_protected:Npn \__separator_set:n #1
+\cs_new:Npn \__eb_arabic:n #1{\int_to_arabic:v {c@#1}}
+\cs_new_protected:Npn \__eb_separator_set:n #1
{
\cs_set:cpn {the#1}
{
\int_compare:nT {\c@chapter > 0}
{
\thechapter
- \use:c {l__#1_separator_tl}
+ \use:c {l__eb_#1_separator_tl}
}
- \__arabic:n {#1}
+ \__eb_arabic:n {#1}
}
}
\cs_gset:cpn {thesection}
{
\int_compare:nT {\c@chapter > 0}{\thechapter.}
- \__arabic:n {section}
+ \__eb_arabic:n {section}
}
\clist_map_inline:nn
{figure,table,lstlisting,equation}
- {\__separator_set:n {#1}}
+ {\__eb_separator_set:n {#1}}
\cs_gset_protected:Npn \appendix
{
\int_compare:nNnTF {\c@chapter} > {0}
@@ -1604,37 +1602,37 @@ The latest version of this license is in
}
\AtBeginEnvironment{tabularx}
{
- \exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_table_fp}
\selectfont\ignorespaces
}
\AtBeginEnvironment{tabular}
{
- \exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_table_fp}
\selectfont\ignorespaces
}
\ctex_after_end_preamble:n
{
- \exp_args:Nx \linespread{\fp_use:N \l__spread_line_fp}
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_line_fp}
\selectfont\ignorespaces
}
-\fp_new:N \l__spread_line_fp
-\fp_new:N \l__spread_table_fp
-\fp_new:N \l__spread_math_fp
-\fp_new:N \l__spread_caption_fp
-\fp_new:N \l__spread_footnote_fp
+\fp_new:N \l__eb_spread_line_fp
+\fp_new:N \l__eb_spread_table_fp
+\fp_new:N \l__eb_spread_math_fp
+\fp_new:N \l__eb_spread_caption_fp
+\fp_new:N \l__eb_spread_footnote_fp
\__ctex_define:nn {spread}
{
- line .fp_set:N = \l__spread_line_fp,
+ line .fp_set:N = \l__eb_spread_line_fp,
line .initial:n = 1.3,
- table .fp_set:N = \l__spread_table_fp,
+ table .fp_set:N = \l__eb_spread_table_fp,
table .initial:n = 1.05,
- math .fp_set:N = \l__spread_math_fp,
+ math .fp_set:N = \l__eb_spread_math_fp,
math .initial:n = 1.05,
- caption .fp_set:N = \l__spread_caption_fp,
+ caption .fp_set:N = \l__eb_spread_caption_fp,
caption .initial:n = 1,
- footnote .fp_set:N = \l__spread_footnote_fp,
+ footnote .fp_set:N = \l__eb_spread_footnote_fp,
footnote .initial:n = 1
}
@@ -1658,32 +1656,39 @@ The latest version of this license is in
\graphicspath{{figures/}}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
+\cs_new_protected:Npn \__eb_enumitem_labelval_set:nn #1#2
+ {\SetEnumitemValue{label}{#1}{\color{ctex@emph}#2}}
+\clist_map_inline:nn
+ {
+ {bullet}{\textbullet},
+ {endash}{\normalfont\bfseries\textendash},
+ {asterisk}{\textasteriskcentered},
+ {arabic}{\arabic*.},
+ {alph}{(\alph*)},
+ {roman}{\roman*.},
+ {outline}{\upshape\ding{111}}
+ }{\__eb_enumitem_labelval_set:nn #1}
+\SetEnumitemValue{font}{sf}{\color{ctex@emph}\normalfont\sffamily}
\setlist
{
- labelsep = .75\ccwd,listparindent = 2\ccwd,
+ labelsep = .75\ccwd,listparindent = 2\ccwd,leftmargin = *,
itemsep = .75ex plus .1ex,topsep = .75ex plus .1ex,
partopsep = 0ex,parsep = 0ex
}
\newlist{outlinelist}{itemize}{1}
-\setlist[outlinelist]
- {
- label = \color{ctex@emph}\upshape\ding{111},
- itemsep = .5ex plus .1ex,leftmargin = *
- }
-\setlist[itemize,1]
- {label = \color{ctex@emph}\ensuremath{\bullet},leftmargin = *}
-\setlist[itemize,2]
- {label = \color{ctex@emph}\ensuremath{\circ},leftmargin = *}
-\setlist[enumerate,1]
- {label = \color{ctex@emph}\arabic*.,ref = \arabic*,leftmargin = *}
-\setlist[enumerate,2]
- {label = \color{ctex@emph}(\alph*),ref = \theenumi(\alph*),leftmargin = *}
-\setlist[description]
- {font = \color{ctex@emph}\sf,labelwidth = *,leftmargin = 2\ccwd}
+\setlist[outlinelist]{label = outline,itemsep = .5ex plus .1ex}
+\setlist[itemize,1]{label = bullet}
+\setlist[itemize,2]{label = endash}
+\setlist[itemize,3]{label = asterisk}
+\setlist[enumerate,1]{label = arabic,ref = \arabic*}
+\setlist[enumerate,2]{label = alph,ref = \arabic{enumi}.\alph*}
+\setlist[enumerate,3]{label = roman,ref = \arabic{enumi}.\alph{enumii}.\roman*}
+\setlist*[enumerate,3]{labelwidth = *}
+\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
-\cs_new_protected:Npn \__thmname_set:nn #1#2
- {\tl_const:cn {c__name_#1_tl}{#2}}
-\bool_if:NTF \l__lang_chinese_bool
+\cs_new_protected:Npn \__eb_thmname_set:nn #1#2
+ {\tl_const:cn {c__eb_name_#1_tl}{#2}}
+\tl_if_eq:VnTF \l__ctex_scheme_tl{chinese}
{
\clist_map_inline:nn
{
@@ -1695,7 +1700,7 @@ The latest version of this license is in
{corollary}{推论},
{remark}{注},
{exercise}{练习}
- }{\__thmname_set:nn #1}
+ }{\__eb_thmname_set:nn #1}
}{
\clist_map_inline:nn
{
@@ -1707,59 +1712,64 @@ The latest version of this license is in
{corollary}{Corollary},
{remark}{Remark},
{exercise}{Exercise}
- }{\__thmname_set:nn #1}
+ }{\__eb_thmname_set:nn #1}
}
-\bool_new:N \l__thmbox_bool
-\tl_new:N \l__thm_numberwith_tl
-\tl_new:N \l__thm_headpunct_tl
-\tl_new:N \l__thm_bodyfont_tl
-\tl_new:N \l__thm_notefont_tl
-\tl_new:N \l__thm_headindent_tl
-\tl_new:N \l__thm_spaceabove_tl
-\tl_new:N \l__thm_spacebelow_tl
+\bool_new:N \l__eb_thmbox_bool
+\tl_new:N \l__eb_thm_numberwith_tl
+\tl_new:N \l__eb_thm_headpunct_tl
+\tl_new:N \l__eb_thm_bodyfont_tl
+\tl_new:N \l__eb_thm_notefont_tl
+\tl_new:N \l__eb_thm_headindent_tl
+\tl_new:N \l__eb_thm_spaceabove_tl
+\tl_new:N \l__eb_thm_spacebelow_tl
\RenewDocumentCommand{\newtheorem}{O{}m}
{\AfterPreamble{\declaretheorem[#1]{#2}}}
\__ctex_define:nn {thmset}
{
- thmbox .bool_set:N = \l__thmbox_bool,
+ thmbox .bool_set:N = \l__eb_thmbox_bool,
thmbox .default:n = true,
thmbox .initial:n = false,
- within .tl_set:N = \l__thm_numberwith_tl,
+ within .tl_set:N = \l__eb_thm_numberwith_tl,
within .initial:n = chapter,
- bodyfont .tl_set:N = \l__thm_bodyfont_tl,
+ bodyfont .tl_set:N = \l__eb_thm_bodyfont_tl,
bodyfont .initial:n = {},
- notefont .tl_set:N = \l__thm_notefont_tl,
+ notefont .tl_set:N = \l__eb_thm_notefont_tl,
notefont .initial:n = {},
- headfont .tl_set:N = \l__thm_headfont_tl,
+ headfont .tl_set:N = \l__eb_thm_headfont_tl,
headfont .initial:n = \color{ctex@emph}\sffamily,
- headpunct .tl_set:N = \l__thm_headpunct_tl,
+ headpunct .tl_set:N = \l__eb_thm_headpunct_tl,
headpunct .initial:n = {},
- spacepost .tl_set:N = \l__thm_spacepost_tl,
+ spacepost .tl_set:N = \l__eb_thm_spacepost_tl,
spacepost .initial:n = \ccwd,
- headindent .tl_set:N = \l__thm_headindent_tl,
+ headindent .tl_set:N = \l__eb_thm_headindent_tl,
headindent .initial:n = 0\ccwd,
- spaceabove .tl_set:N = \l__thm_spaceabove_tl,
+ spaceabove .tl_set:N = \l__eb_thm_spaceabove_tl,
spaceabove .initial:n = .75ex plus .1ex,
- spacebelow .tl_set:N = \l__thm_spacebelow_tl,
+ spacebelow .tl_set:N = \l__eb_thm_spacebelow_tl,
spacebelow .initial:n = .75ex plus .1ex
}
-\ctex_at_end_preamble:n
+\tl_const:Nn \c__eb_thmtools_keyval_tl
{
- \declaretheoremstyle[
- spaceabove = \l__thm_spaceabove_tl,
- spacebelow = \l__thm_spacebelow_tl,
- headindent = \l__thm_headindent_tl,
- headfont = \l__thm_headfont_tl,
- notefont = \l__thm_notefont_tl,
+ [
+ spaceabove = \l__eb_thm_spaceabove_tl,
+ spacebelow = \l__eb_thm_spacebelow_tl,
+ headindent = \l__eb_thm_headindent_tl,
+ headfont = \l__eb_thm_headfont_tl,
+ notefont = \l__eb_thm_notefont_tl,
notebraces = {}{},
- bodyfont = \l__thm_bodyfont_tl,
- headpunct = \l__thm_headpunct_tl,
- postheadspace = \l__thm_spacepost_tl,
- within = \l__thm_numberwith_tl,
+ bodyfont = \l__eb_thm_bodyfont_tl,
+ headpunct = \l__eb_thm_headpunct_tl,
+ postheadspace = \l__eb_thm_spacepost_tl,
+ within = \l__eb_thm_numberwith_tl,
headformat = \NAME\space\NUMBER\NOTE
- ]{easy-thm-sty}
+ ]
+ }
+\ctex_at_end_preamble:n
+ {
+ \exp_args:NNc \exp_after:wN
+ \declaretheoremstyle{c__eb_thmtools_keyval_tl}{easy-thm-sty}
\clist_map_inline:nn
{
example,definition,theorem,
@@ -1767,13 +1777,13 @@ The latest version of this license is in
}{
\declaretheorem[
style = easy-thm-sty,
- name = \use:c {c__name_#1_tl}
+ name = \use:c {c__eb_name_#1_tl}
]{#1}
}
\cs_gset_eq:NN \proof\relax
\declaretheorem[
style = easy-thm-sty,
- name = \c__name_remark_tl,
+ name = \c__eb_name_remark_tl,
numbered = no
]{remark}
\declaretheorem[
@@ -1814,10 +1824,10 @@ The latest version of this license is in
\allowdisplaybreaks[4]
\cs_gset:Npn \ULthickness{.75pt}
\skip_set:Nn \jot{4pt plus 1pt minus 1pt}
-\cs_new_protected:Npn \l__math_restore:n #1
+\cs_new_protected:Npn \l__eb_math_restore:n #1
{
\AtBeginEnvironment{#1}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\ignorespaces}
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\ignorespaces}
}
\clist_map_inline:nn
{
@@ -1825,19 +1835,19 @@ The latest version of this license is in
matrix*,pmatrix*,bmatrix*,Bmatrix*,vmatrix*,Vmatrix*,
cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
aligned,alignedat,gathered,multlined,lgathered,rgathered
- }{\l__math_restore:n {#1}}
-\__patch_cmd:Nnn \start@gather
+ }{\l__eb_math_restore:n {#1}}
+\__eb_patch_cmd:Nnn \start@gather
{\collect@body}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
-\__patch_cmd:Nnn \start@align
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect@body}
+\__eb_patch_cmd:Nnn \start@align
{\collect@body}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
-\__patch_cmd:Nnn \start@multline
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect@body}
+\__eb_patch_cmd:Nnn \start@multline
{\collect@body}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
-\__patch_cmd:Nnn \gather@split
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect@body}
+\__eb_patch_cmd:Nnn \gather@split
{\spread@equation}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\spread@equation}
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\spread@equation}
\ctex_after_end_preamble:n
{
\skip_set:Nn \abovedisplayskip{5pt plus 1pt minus 1pt}
@@ -1852,7 +1862,7 @@ The latest version of this license is in
\ctex_at_end_package:nn {tcolorbox}
{
- \__ifpackage_later:nn {tcolorbox}{2020/10/09}
+ \__eb_ifpackage_later:nn {tcolorbox}{2020/10/09}
\tcbset
{
thmsty/.style =
@@ -1887,7 +1897,7 @@ The latest version of this license is in
before~skip = 4ex,after~skip = 2.25ex
},
breakable,
- boxrule = \l__rule_width_dim
+ boxrule = \l__eb_rule_width_dim
}
\NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
{
@@ -1898,10 +1908,10 @@ The latest version of this license is in
\end{tcolorbox}
}{}
\NewDocumentEnvironment{exercise}
- {sO{LightYellow}O{1.}D(){\c__name_exercise_tl}o+b}
+ {sO{LightYellow}O{1.}D(){\c__eb_name_exercise_tl}o+b}
{
\begin{center}
- \bool_if:NTF \l__thmbox_bool
+ \bool_if:NTF \l__eb_thmbox_bool
{
\tcbox[
exersty,
@@ -1962,7 +1972,7 @@ The latest version of this license is in
}
\ctex_at_end_preamble:n
{
- \bool_if:NT \l__thmbox_bool
+ \bool_if:NT \l__eb_thmbox_bool
{
\@ifpackageloaded{tcolorbox}
{
@@ -1976,101 +1986,101 @@ The latest version of this license is in
}
}
-\bool_set_true:N \l__backend_bibtex_bool
-\tl_new:N \l__bib_style_tl
-\tl_new:N \l__bib_otherstyle_tl
-\tl_new:N \l__bib_citestyle_tl
-\tl_new:N \l__bib_file_tl
+\bool_set_true:N \l__eb_backend_bibtex_bool
+\tl_new:N \l__eb_bib_style_tl
+\tl_new:N \l__eb_bib_otherstyle_tl
+\tl_new:N \l__eb_bib_citestyle_tl
+\tl_new:N \l__eb_bib_file_tl
\__ctex_define:nn {bibset}
{
backend .choice:,
backend/bibtex .code:n = {},
backend/biblatex .code:n =
- {\bool_set_false:N \l__backend_bibtex_bool},
+ {\bool_set_false:N \l__eb_backend_bibtex_bool},
bib-style .choice:,
bib-style .value_required:n = true,
bib-style/numerical .code:n =
{
- \tl_set:Nn \l__bib_style_tl{#1}
- \tl_clear:N \l__bib_otherstyle_tl
+ \tl_set:Nn \l__eb_bib_style_tl{#1}
+ \tl_clear:N \l__eb_bib_otherstyle_tl
},
bib-style/authoryear .code:n =
{
- \tl_set:Nn \l__bib_style_tl{#1}
- \tl_clear:N \l__bib_otherstyle_tl
+ \tl_set:Nn \l__eb_bib_style_tl{#1}
+ \tl_clear:N \l__eb_bib_otherstyle_tl
},
bib-style/unknown .code:n =
- {\tl_set_eq:NN \l__bib_otherstyle_tl\l_keys_value_tl},
+ {\tl_set_eq:NN \l__eb_bib_otherstyle_tl\l_keys_value_tl},
bib-style .initial:n = numerical,
cite-style .code:n =
- {\tl_set:Nn \l__bib_citestyle_tl{#1}},
- bibfile .tl_set:N = \l__bib_file_tl,
+ {\tl_set:Nn \l__eb_bib_citestyle_tl{#1}},
+ bibfile .tl_set:N = \l__eb_bib_file_tl,
bibfile .initial:n = refs.bib
}
-\cs_new_protected:Npn \__bibtex_set:
+\cs_new_protected:Npn \__eb_bibtex_set:
{
- \tl_if_empty:NTF \l__bib_otherstyle_tl
+ \tl_if_empty:NTF \l__eb_bib_otherstyle_tl
{
- \tl_if_eq:VnT \l__bib_style_tl{numerical}
+ \tl_if_eq:VnT \l__eb_bib_style_tl{numerical}
{
\bibliographystyle{gbt7714-numerical}
\setcitestyle{comma,square,super}
}
- \tl_if_eq:VnT \l__bib_style_tl{authoryear}
+ \tl_if_eq:VnT \l__eb_bib_style_tl{authoryear}
{\bibliographystyle{gbt7714-author-year}}
\cs_set_eq:NN \cite\citep
- }{\exp_args:NV \bibliographystyle\l__bib_otherstyle_tl}
- \tl_if_empty:NF \l__bib_citestyle_tl
- {\exp_args:NV \setcitestyle\l__bib_citestyle_tl}
+ }{\exp_args:NV \bibliographystyle\l__eb_bib_otherstyle_tl}
+ \tl_if_empty:NF \l__eb_bib_citestyle_tl
+ {\exp_args:NV \setcitestyle\l__eb_bib_citestyle_tl}
\skip_set:Nn \bibsep{0ex}
\NewDocumentCommand{\printbibliography}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\bibname
+ \tl_set_eq:NN \eb@toc@title\bibname
\IfValueT{##2}{\keys_set:nn {listoc}{##2}}
- \__ifmultoc_pre_set:
- \cs_set:Npn \bibsection{\__title_ifintoc_set:n {##1}}
- \exp_args:NV \bibliography\l__bib_file_tl
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_pre_set:
+ \cs_set:Npn \bibsection{\__eb_title_ifintoc_set:n {##1}}
+ \exp_args:NV \bibliography\l__eb_bib_file_tl
+ \__eb_ifmultoc_post_set:
\group_end:
}
}
-\cs_new_protected:Npn \__put_biblatex:n #1
+\cs_new_protected:Npn \__eb_put_biblatex:n #1
{\PassOptionsToPackage{#1}{biblatex}}
-\cs_new_protected:Npn \__biblatex_pre_set:
+\cs_new_protected:Npn \__eb_biblatex_pre_set:
{
- \tl_if_empty:NTF \l__bib_otherstyle_tl
+ \tl_if_empty:NTF \l__eb_bib_otherstyle_tl
{
- \tl_if_eq:VnT \l__bib_style_tl{numerical}
- {\__put_biblatex:n {style = gb7714-2015}}
- \tl_if_eq:VnT \l__bib_style_tl{authoryear}
- {\__put_biblatex:n {style = gb7714-2015ay}}
- }{\__put_biblatex:n {style = \l__bib_otherstyle_tl}}
- \tl_if_empty:NF \l__bib_citestyle_tl
- {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}}
- \__put_biblatex:n {backend = biber}
- }
-\cs_new_protected:Npn \__biblatex_post_set:
- {
- \exp_args:NV \addbibresource\l__bib_file_tl
+ \tl_if_eq:VnT \l__eb_bib_style_tl{numerical}
+ {\__eb_put_biblatex:n {style = gb7714-2015}}
+ \tl_if_eq:VnT \l__eb_bib_style_tl{authoryear}
+ {\__eb_put_biblatex:n {style = gb7714-2015ay}}
+ }{\__eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}}
+ \tl_if_empty:NF \l__eb_bib_citestyle_tl
+ {\__eb_put_biblatex:n {citestyle = \l__eb_bib_citestyle_tl}}
+ \__eb_put_biblatex:n {backend = biber}
+ }
+\cs_new_protected:Npn \__eb_biblatex_post_set:
+ {
+ \exp_args:NV \addbibresource\l__eb_bib_file_tl
\cs_gset:Npn \blx@default@theheading{bibintoc}
- \defbibheading{bibintoc}[\bibname]{\__title_mark_intoc:n {##1}}
+ \defbibheading{bibintoc}[\bibname]{\__eb_title_mark_intoc:n {##1}}
\skip_set:Nn \bibitemsep{0ex}
}
\ctex_at_end_preamble:n
{
- \bool_if:NTF \l__backend_bibtex_bool
+ \bool_if:NTF \l__eb_backend_bibtex_bool
{
\RequirePackage[sort&compress]{natbib}
- \__bibtex_set:
+ \__eb_bibtex_set:
}{
- \__biblatex_pre_set:
+ \__eb_biblatex_pre_set:
\RequirePackage{biblatex}
- \__biblatex_post_set:
+ \__eb_biblatex_post_set:
}
}
@@ -2078,30 +2088,30 @@ The latest version of this license is in
{
\group_begin:
\footnotesize
- \exp_args:Nx \linespread{\fp_use:N \l__spread_footnote_fp}\selectfont
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
\skip_gset:Nn \footnotesep{\ht\strutbox}
\group_end:
- \bool_if:NT \l__chap_withpart_bool
+ \bool_if:NT \l__eb_chap_withpart_bool
{\counterwithin*{chapter}{part}}
- \tl_if_eq:NnT \l__foot_numberwith_tl{part}
+ \tl_if_eq:NnT \l__eb_foot_numberwith_tl{part}
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{part}
}
- \tl_if_eq:NnT \l__foot_numberwith_tl{page}
+ \tl_if_eq:NnT \l__eb_foot_numberwith_tl{page}
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{page}
}
}
-\__patch_cmd:Nnn \@footnotetext
+\__eb_patch_cmd:Nnn \@footnotetext
{\reset@font}
- {\def\baselinestretch{\fp_use:N \l__spread_footnote_fp}\l__font_footnote_tl}
-\__patch_cmd:Nnn \@mpfootnotetext
+ {\def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp}\l__eb_font_footnote_tl}
+\__eb_patch_cmd:Nnn \@mpfootnotetext
{\reset@font}
- {\def\baselinestretch{\fp_use:N \l__spread_footnote_fp}\l__font_footnote_tl}
-\__patch_cmd:Nnn \@makefnmark
- {\normalfont}{\l__font_footnote_tl}
+ {\def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp}\l__eb_font_footnote_tl}
+\__eb_patch_cmd:Nnn \@makefnmark
+ {\normalfont}{\l__eb_font_footnote_tl}
\lstdefinestyle{mystyle}
{
@@ -2158,27 +2168,27 @@ The latest version of this license is in
aboveskip = 1.5ex plus .2ex minus .1ex,
belowskip = 0.55ex plus .2ex minus .1ex,
keepspaces = true,
- framerule = \l__rule_width_dim,
+ framerule = \l__eb_rule_width_dim,
columns = flexible
}
\lstloadlanguages{C,C++,Java,Python,Matlab}
-\clist_new:N \l__hyperref_clist
-\cs_new_protected:Npn \__put_hyperref:n #1
- {\clist_put_right:Nn \l__hyperref_clist{#1}}
-\cs_new_protected:Npn \__define_linkcolor:nnn #1#2#3
+\clist_new:N \l__eb_hyperref_clist
+\cs_new_protected:Npn \__eb_put_hyperref:n #1
+ {\clist_put_right:Nn \l__eb_hyperref_clist{#1}}
+\cs_new_protected:Npn \__eb_define_linkcolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
-\cs_new_protected:Npn \__define_themecolor:nnn #1#2#3
+\cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
-\cs_new:Npn \__linkcolor_set:n #1
+\cs_new:Npn \__eb_linkcolor_set:n #1
{
linkcolor/\clist_item:nn {#1}{1} .code:n =
{
- \__define_linkcolor:nnn
+ \__eb_define_linkcolor:nnn
{\clist_item:nn {#1}{2}}
{\clist_item:nn {#1}{3}}
{\clist_item:nn {#1}{4}}
- \__put_hyperref:n
+ \__eb_put_hyperref:n
{
linkcolor = ctex@link,linkbordercolor = ctex@link,
urlcolor = ctex@url,urlbordercolor = ctex@url,
@@ -2186,33 +2196,33 @@ The latest version of this license is in
}
},
}
-\cs_new:Npn \__themecolor_set:n #1
+\cs_new:Npn \__eb_themecolor_set:n #1
{
color/\clist_item:nn {#1}{1} .code:n =
{
- \__define_themecolor:nnn
+ \__eb_define_themecolor:nnn
{\clist_item:nn {#1}{2}}
{\clist_item:nn {#1}{3}}
{\clist_item:nn {#1}{4}}
},
}
-\cs_new:Npn \__allow_urlbreak:
+\cs_new:Npn \__eb_allow_urlbreak:
{
- \cs_new:Npn \__add_urlbreak_points:
- {\tl_map_function:NN \c__urlbreak_points_tl\do}
- \__appto_cmd:Nn
- \UrlBreaks{\UrlOrds\__add_urlbreak_points:}
+ \cs_new:Npn \__eb_add_urlbreak_points:
+ {\tl_map_function:NN \c__eb_urlbreak_points_tl\do}
+ \__eb_appto_cmd:Nn
+ \UrlBreaks{\UrlOrds\__eb_add_urlbreak_points:}
}
-\tl_const:Nn \c__urlbreak_points_tl
+\tl_const:Nn \c__eb_urlbreak_points_tl
{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789}
\keys_define:nx {ctex/link}
{
hyperlink .choice:,
hyperlink/edge .code:n = {},
- hyperlink/various .code:n = \__put_hyperref:n {colorlinks},
- hyperlink/none .code:n = \__put_hyperref:n {hidelinks},
+ hyperlink/various .code:n = \__eb_put_hyperref:n {colorlinks},
+ hyperlink/none .code:n = \__eb_put_hyperref:n {hidelinks},
hyperlink .default:n = edge,
hyperlink .initial:n = edge,
@@ -2224,17 +2234,17 @@ The latest version of this license is in
{skyblue, 0000ff,004986,eb6877},
{crimson, dc143c,00c1c9,afcd20}
}
- \__linkcolor_set:n
+ \__eb_linkcolor_set:n
linkcolor .default:n = fresh,
linkcolor .initial:n = fresh,
linktoc .choice:,
- linktoc/unknown .code:n = \__put_hyperref:n {linktoc = \exp_not:n {#1}},
+ linktoc/unknown .code:n = \__eb_put_hyperref:n {linktoc = \exp_not:n {#1}},
linktoc .default:n = all,
linktoc .initial:n = all,
unknown .code:n =
{
- \__put_hyperref:x
+ \__eb_put_hyperref:x
{
\exp_not:N \l_keys_key_str
\exp_not:N \tl_if_empty:NF
@@ -2253,7 +2263,7 @@ The latest version of this license is in
{energy, f39800,00a0e9,893895},
{cyberpunk, 601986,eb6877,a4005b}
}
- \__themecolor_set:n
+ \__eb_themecolor_set:n
color .initial:n = none
}
@@ -2261,10 +2271,10 @@ The latest version of this license is in
{
\RequirePackage{hyperref,cleveref}
\urlstyle{same}
- \__allow_urlbreak:
+ \__eb_allow_urlbreak:
\ctex_hypersetup:n {pdfstartview = FitH}
- \exp_args:NV \hypersetup\l__hyperref_clist
- \bool_if:NTF \l__lang_chinese_bool
+ \exp_args:NV \hypersetup\l__eb_hyperref_clist
+ \tl_if_eq:VnTF \l__ctex_scheme_tl{chinese}
{
\keys_set_known:nn {ctex}
{
@@ -2324,25 +2334,25 @@ The latest version of this license is in
{
pagestyle = empty,
number =
- {\bool_if:NTF \l__zhtitle_bool{\chinese{part}}{\thepart}},
+ {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{part}}{\thepart}},
format = \color{ctex@frame}\sffamily\Huge,
aftername =
- {\bool_if:NTF \l__newline_bool{\par\nobreak}{\hspace{\ccwd}}},
+ {\bool_if:NTF \l__eb_newline_bool{\par\nobreak}{\hspace{\ccwd}}},
tocline = \CTEXifname{\CTEXthepart\hspace{\ccwd}}{}#2
},
chapter =
{
% pagestyle = fancy,
number =
- {\bool_if:NTF \l__zhtitle_bool{\chinese{chapter}}{\thechapter}},
+ {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{chapter}}{\thechapter}},
format =
{
\color{ctex@frame}\sffamily\LARGE
- \bool_if:NF \l__newline_bool{\centering}
+ \bool_if:NF \l__eb_newline_bool{\centering}
},
aftername =
{
- \bool_if:NTF \l__newline_bool
+ \bool_if:NTF \l__eb_newline_bool
{\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}
},
beforeskip = -1.5ex,
@@ -2379,7 +2389,7 @@ The latest version of this license is in
}
}
-\bool_if:NF \l__newline_bool
+\bool_if:NF \l__eb_newline_bool
{
\ctex_set:n
{
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index dcd25d8e8e6..c4eba751794 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -13,48 +13,47 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/04/06}{1.24f}{beta}
+\ProvidesExplClass{easybook}{2021/04/07}{1.24g}{beta}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
\cs_generate_variant:Nn \dim_add:Nn {NV}
-\cs_generate_variant:Nn \__put_hyperref:n {x}
+\cs_generate_variant:Nn \__eb_put_hyperref:n {x}
\cs_new_protected:Npn \__ctex_define:nn #1
{\keys_define:nn {ctex/#1}}
-\cs_new_protected:Npn \__put_ctexbook:n #1
+\cs_new_protected:Npn \__eb_put_ctexbook:n #1
{\PassOptionsToClass{#1}{ctexbook}}
-\cs_new_protected:Npn \__patch_cmd:Nnn #1#2#3
+\cs_new_protected:Npn \__eb_patch_cmd:Nnn #1#2#3
{\ctex_patch_cmd_once:NnnnTF #1{}{#2}{#3}{}{\ctex_patch_failure:N #1}}
-\cs_new_protected:Npn \__appto_cmd:Nn #1#2
+\cs_new_protected:Npn \__eb_appto_cmd:Nn #1#2
{\ctex_appto_cmd:NnnTF #1{}{#2}{}{\ctex_patch_failure:N #1}}
-\bool_set_false:N \l__draft_bool
-\bool_set_false:N \l__newline_bool
-\bool_set_false:N \l__font_noto_bool
-\bool_set_true:N \l__zhtitle_bool
-\bool_set_true:N \l__lang_chinese_bool
-\bool_set_true:N \l__page_twoside_bool
-\bool_set_true:N \l__class_book_bool
-\clist_new:N \g__options_clist
+\bool_set_false:N \l__eb_draft_bool
+\bool_set_false:N \l__eb_newline_bool
+\bool_set_false:N \l__eb_font_noto_bool
+\bool_set_true:N \l__eb_zhtitle_bool
+\bool_set_true:N \l__eb_page_twoside_bool
+\bool_set_true:N \l__eb_class_book_bool
+\clist_new:N \g__eb_options_clist
\keys_define:nn {easybook}
{
- draft .code:n = \bool_set_true:N \l__draft_bool,
- newline .code:n = \bool_set_true:N \l__newline_bool,
- entitle .code:n = \bool_set_false:N \l__zhtitle_bool,
- english .code:n = \bool_set_false:N \l__lang_chinese_bool,
- enstyle .meta:n = {newline,entitle,english},
+ draft .code:n = \bool_set_true:N \l__eb_draft_bool,
+ newline .code:n = \bool_set_true:N \l__eb_newline_bool,
+ entitle .code:n = \bool_set_false:N \l__eb_zhtitle_bool,
+ scheme .code:n = \__eb_put_ctexbook:n {scheme = #1},
+ enstyle .meta:n = {newline,entitle,scheme = plain},
font .choices:nn =
{adobe,founder,mac,windows,none}
- {\__put_ctexbook:n {fontset = \l_keys_choice_tl}},
+ {\__eb_put_ctexbook:n {fontset = \l_keys_choice_tl}},
font/noto .code:n =
{
- \bool_set_true:N \l__font_noto_bool
- \__put_ctexbook:n {fontset = none}
+ \bool_set_true:N \l__eb_font_noto_bool
+ \__eb_put_ctexbook:n {fontset = none}
},
font/overleaf .code:n = {},
- font/linux .code:n = \__put_ctexbook:n {fontset = ubuntu},
+ font/linux .code:n = \__eb_put_ctexbook:n {fontset = ubuntu},
font .value_required:n = true,
font .initial:n = overleaf,
@@ -67,26 +66,22 @@
twoside .value_forbidden:n = true,
oneside .code:n =
{
- \bool_set_false:N \l__page_twoside_bool
- \__put_ctexbook:n {oneside}
+ \bool_set_false:N \l__eb_page_twoside_bool
+ \__eb_put_ctexbook:n {oneside}
},
class .choice:,
class .value_required:n = true,
class/book .code:n = {},
- class/article .code:n = \bool_set_false:N \l__class_book_bool,
+ class/article .code:n = \bool_set_false:N \l__eb_class_book_bool,
class .initial:n = book,
unknown .code:n =
- {\clist_gput_right:No \g__options_clist{\CurrentOption}}
+ {\clist_gput_right:No \g__eb_options_clist{\CurrentOption}}
}
\ProcessKeysOptions{easybook}
-\bool_if:NTF \l__lang_chinese_bool
- {\__put_ctexbook:n {scheme = chinese}}
- {\__put_ctexbook:n {scheme = plain}}
-
\clist_map_inline:nn
{
{svgnames}{xcolor},
@@ -101,59 +96,59 @@
{no-math}{fontspec},
{noto,upint}{newtxmath}
}{\PassOptionsToPackage#1}
-\__put_ctexbook:n {\g__options_clist}
+\__eb_put_ctexbook:n {\g__eb_options_clist}
\LoadClass[UTF8]{ctexbook}
-\bool_new:N \l__multoc_bool
-\bool_new:N \l__notomath_bool
-\bool_new:N \l__uppercase_bool
-\bool_new:N \l__chap_withpart_bool
-\tl_new:N \l__foot_numberwith_tl
-\tl_new:N \g__config_tl
+\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 \g__eb_config_tl
-\seq_const_from_clist:Nn \c__options_path_seq
+\seq_const_from_clist:Nn \c__eb_options_path_seq
{
style,link,elsefont,
spread,bibset,thmset,
geoset,hdrset,tocset
}
-\seq_map_inline:Nn \c__options_path_seq
+\seq_map_inline:Nn \c__eb_options_path_seq
{
\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}
\cs_new:cpn {#1}##1{\keys_set:nn {ctex/#1}{##1}}
}
\ctex_define:n
{
- config .tl_set:N = \g__config_tl,
+ config .tl_set:N = \g__eb_config_tl,
lstlistlistingname .tl_set:N = \lstlistlistingname,
lstlistingname .tl_set:N = \lstlistingname
}
\__ctex_define:nn {style}
{
- multoc .bool_set:N = \l__multoc_bool,
+ multoc .bool_set:N = \l__eb_multoc_bool,
multoc .default:n = true,
- withpart .bool_set:N = \l__chap_withpart_bool,
+ withpart .bool_set:N = \l__eb_chap_withpart_bool,
withpart .default:n = true,
withpart .initial:n = false,
- notomath .bool_set:N = \l__notomath_bool,
+ notomath .bool_set:N = \l__eb_notomath_bool,
notomath .default:n = true,
notomath .initial:n = false,
- rulewidth .dim_set:N = \l__rule_width_dim,
+ rulewidth .dim_set:N = \l__eb_rule_width_dim,
rulewidth .initial:n = 0.75pt,
- uppercase .bool_set:N = \l__uppercase_bool,
+ uppercase .bool_set:N = \l__eb_uppercase_bool,
uppercase .default:n = true,
uppercase .initial:n = true,
footwith .choices:nn =
{part,page,chapter}
- {\tl_set_eq:NN \l__foot_numberwith_tl\l_keys_choice_tl},
+ {\tl_set_eq:NN \l__eb_foot_numberwith_tl\l_keys_choice_tl},
footwith .value_required:n = true,
footwith .initial:n = chapter,
- figure-sep .tl_set:N = \l__figure_separator_tl,
- table-sep .tl_set:N = \l__table_separator_tl,
- listing-sep .tl_set:N = \l__lstlisting_separator_tl,
- equation-sep .tl_set:N = \l__equation_separator_tl,
+ figure-sep .tl_set:N = \l__eb_figure_separator_tl,
+ table-sep .tl_set:N = \l__eb_table_separator_tl,
+ listing-sep .tl_set:N = \l__eb_lstlisting_separator_tl,
+ equation-sep .tl_set:N = \l__eb_equation_separator_tl,
number-sep .meta:n =
{
figure-sep = {#1},table-sep = {#1},
@@ -178,11 +173,11 @@
}
\ctex_at_end_preamble:n
{
- \bool_if:NT \l__notomath_bool{\RequirePackage{newtxmath,bm}}
- \tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}}
+ \bool_if:NT \l__eb_notomath_bool{\RequirePackage{newtxmath,bm}}
+ \tl_if_empty:NF \g__eb_config_tl{\file_input:n {\g__eb_config_tl}}
}
-\cs_new_protected:Npn \__ifpackage_later:nn #1#2
+\cs_new_protected:Npn \__eb_ifpackage_later:nn #1#2
{
\@ifpackagelater{#1}{#2}
{}{\msg_warning:nnn {easybook}{package-old}{#1}}
@@ -202,93 +197,93 @@
{ctex}{2020/10/19},
{thmtools}{2020/08/01},
{caption-light}{2020/08/24}
- }{\__ifpackage_later:nn #1}
+ }{\__eb_ifpackage_later:nn #1}
\sys_if_engine_xetex:TF
{
- \cs_new_eq:NN \__set_family:nnn \xeCJK_set_family:nnn
- \cs_new_eq:NN \__switch_family:n \xeCJK_switch_family:n
+ \cs_new_eq:NN \__eb_set_family:nnn \xeCJK_set_family:nnn
+ \cs_new_eq:NN \__eb_switch_family:n \xeCJK_switch_family:n
}{
- \cs_new_eq:NN \__set_family:nnn \ctex_ltj_set_family:nnn
- \cs_new_eq:NN \__switch_family:n \ctex_ltj_switch_family:n
+ \cs_new_eq:NN \__eb_set_family:nnn \ctex_ltj_set_family:nnn
+ \cs_new_eq:NN \__eb_switch_family:n \ctex_ltj_switch_family:n
}
-\cs_new_protected:Npn \__setmainfont:nn #1#2
+\cs_new_protected:Npn \__eb_setmainfont:nn #1#2
{\__fontspec_main_setmainfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__setsansfont:nn #1#2
+\cs_new_protected:Npn \__eb_setsansfont:nn #1#2
{\__fontspec_main_setsansfont:nn {#2}{#1}}
-\cs_new_protected:Npn \__setmonofont:nn #1#2
+\cs_new_protected:Npn \__eb_setmonofont:nn #1#2
{\__fontspec_main_setmonofont:nn {#2}{#1}}
-\cs_new_protected:Npn \__setCJKmainfont:nn #1#2
- {\__set_family:nnn {\CJKrmdefault}{#2}{#1}}
-\cs_new_protected:Npn \__setCJKsansfont:nn #1#2
- {\__set_family:nnn {\CJKsfdefault}{#2}{#1}}
-\cs_new_protected:Npn \__setCJKmonofont:nn #1#2
- {\__set_family:nnn {\CJKttdefault}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_songti:nn #1#2
- {\__set_family:nnn {songti}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_heiti:nn #1#2
- {\__set_family:nnn {heiti}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_kaishu:nn #1#2
- {\__set_family:nnn {kaishu}{#2}{#1}}
-\cs_new_protected:Npn \__set_zhfont_fangsong:nn #1#2
- {\__set_family:nnn {fangsong}{#2}{#1}}
+\cs_new_protected:Npn \__eb_setCJKmainfont:nn #1#2
+ {\__eb_set_family:nnn {\CJKrmdefault}{#2}{#1}}
+\cs_new_protected:Npn \__eb_setCJKsansfont:nn #1#2
+ {\__eb_set_family:nnn {\CJKsfdefault}{#2}{#1}}
+\cs_new_protected:Npn \__eb_setCJKmonofont:nn #1#2
+ {\__eb_set_family:nnn {\CJKttdefault}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_songti:nn #1#2
+ {\__eb_set_family:nnn {songti}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_heiti:nn #1#2
+ {\__eb_set_family:nnn {heiti}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_kaishu:nn #1#2
+ {\__eb_set_family:nnn {kaishu}{#2}{#1}}
+\cs_new_protected:Npn \__eb_set_zhfont_fangsong:nn #1#2
+ {\__eb_set_family:nnn {fangsong}{#2}{#1}}
-\tl_const:Nn \__option_zhfont_tl
+\tl_const:Nn \__eb_option_zhfont_tl
{UprightFont = *,AutoFakeBold = 1.5,ItalicFont = *}
-\cs_new_protected:Npx \__setCJKmainfont:n #1
- {\__setCJKmainfont:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__setCJKsansfont:n #1
- {\__setCJKsansfont:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__setCJKmonofont:n #1
- {\__setCJKmonofont:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_songti:n #1
- {\__set_zhfont_songti:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_heiti:n #1
- {\__set_zhfont_heiti:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_kaishu:n #1
- {\__set_zhfont_kaishu:nn {#1}{\__option_zhfont_tl}}
-\cs_new_protected:Npx \__set_zhfont_fangsong:n #1
- {\__set_zhfont_fangsong:nn {#1}{\__option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_setCJKmainfont:n #1
+ {\__eb_setCJKmainfont:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_setCJKsansfont:n #1
+ {\__eb_setCJKsansfont:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_setCJKmonofont:n #1
+ {\__eb_setCJKmonofont:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_songti:n #1
+ {\__eb_set_zhfont_songti:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_heiti:n #1
+ {\__eb_set_zhfont_heiti:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_kaishu:n #1
+ {\__eb_set_zhfont_kaishu:nn {#1}{\__eb_option_zhfont_tl}}
+\cs_new_protected:Npx \__eb_set_zhfont_fangsong:n #1
+ {\__eb_set_zhfont_fangsong:nn {#1}{\__eb_option_zhfont_tl}}
-\bool_if:NT \l__font_noto_bool
+\bool_if:NT \l__eb_font_noto_bool
{
- \__setmainfont:nn {NotoSerif}
+ \__eb_setmainfont:nn {NotoSerif}
{
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic
}
- \__setsansfont:nn {NotoSans}
+ \__eb_setsansfont:nn {NotoSans}
{
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic
}
- \__setmonofont:nn {NotoSansMono}
+ \__eb_setmonofont:nn {NotoSansMono}
{
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold
}
- \__setCJKmainfont:nn {FZShuSong-Z01S}
+ \__eb_setCJKmainfont:nn {FZShuSong-Z01S}
{
UprightFont = *,
BoldFont = FZHei-B01S,
ItalicFont = FZKai-Z03S
}
- \__setCJKsansfont:n {FZHei-B01S}
- \__setCJKmonofont:n {FZFangSong-Z02S}
- \__set_zhfont_songti:n {FZShuSong-Z01S}
- \__set_zhfont_heiti:n {FZHei-B01S}
- \__set_zhfont_kaishu:n {FZKai-Z03S}
- \__set_zhfont_fangsong:n {FZFangSong-Z02S}
- \cs_new_protected:Npn \songti{\__switch_family:n {songti}}
- \cs_new_protected:Npn \heiti{\__switch_family:n {heiti}}
- \cs_new_protected:Npn \kaishu{\__switch_family:n {kaishu}}
- \cs_new_protected:Npn \fangsong{\__switch_family:n {fangsong}}
+ \__eb_setCJKsansfont:n {FZHei-B01S}
+ \__eb_setCJKmonofont:n {FZFangSong-Z02S}
+ \__eb_set_zhfont_songti:n {FZShuSong-Z01S}
+ \__eb_set_zhfont_heiti:n {FZHei-B01S}
+ \__eb_set_zhfont_kaishu:n {FZKai-Z03S}
+ \__eb_set_zhfont_fangsong:n {FZFangSong-Z02S}
+ \cs_new_protected:Npn \songti{\__eb_switch_family:n {songti}}
+ \cs_new_protected:Npn \heiti{\__eb_switch_family:n {heiti}}
+ \cs_new_protected:Npn \kaishu{\__eb_switch_family:n {kaishu}}
+ \cs_new_protected:Npn \fangsong{\__eb_switch_family:n {fangsong}}
}
\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\normalfont}
@@ -305,7 +300,7 @@
marginparsep = 8pt,
marginparwidth = 2.54cm
}
-\clist_new:N \g__geometry_clist
+\clist_new:N \g__eb_geometry_clist
\__ctex_define:nn {geoset}
{
footnotemargin .dim_set:N = \footnotemargin,
@@ -314,11 +309,11 @@
footparskip .initial:n = 0ex,
footparindent .tl_set:N = \hangfootparindent,
footparindent .initial:n = 2\ccwd,
- list-labelsep .dim_set:N = \list@labelsep,
+ list-labelsep .dim_set:N = \eb@list@labelsep,
list-labelsep .initial:n = \ccwd,
unknown .code:n =
{
- \clist_gput_right:Nx \g__geometry_clist
+ \clist_gput_right:Nx \g__eb_geometry_clist
{
\l_keys_key_str
\tl_if_empty:NF \l_keys_value_tl{ = {#1}}
@@ -329,7 +324,7 @@
\cs_gset:Npn \cleardoublepage
{
\clearpage
- \bool_if:NT \l__page_twoside_bool
+ \bool_if:NT \l__eb_page_twoside_bool
{
\int_if_odd:nF \c@page
{\hbox:n {}\thispagestyle{empty}\clearpage}
@@ -351,14 +346,14 @@
\cs_gset_eq:NN \easyfoot\fancyfoot
\__ctex_define:nn {hdrset}
{
- head-foot .tl_set:N = \l__fancyhf_content_tl,
+ head-foot .tl_set:N = \l__eb_fancyhf_content_tl,
head-foot .initial:n =
{
\easyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
\easyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
\easyhead[EL,OR]{\color{ctex@frame}\thepage}
},
- chap-mark .cs_set:Np = \__fancyhf_chap_mark:n #1,
+ chap-mark .cs_set:Np = \__eb_fancyhf_chap_mark:n #1,
chap-mark .initial:n =
{
\int_compare:nT {\c@secnumdepth > -1}
@@ -370,7 +365,7 @@
\fi
}#1
},
- sec-mark .cs_set:Np = \__fancyhf_sec_mark:n #1,
+ sec-mark .cs_set:Np = \__eb_fancyhf_sec_mark:n #1,
sec-mark .initial:n =
{
\int_compare:nT {\c@secnumdepth > 0}
@@ -385,7 +380,7 @@
{
\group_begin:
\color{ctex@frame}\vspace*{1.5pt}
- \hrule width \textwidth height \l__rule_width_dim
+ \hrule width \textwidth height \l__eb_rule_width_dim
\group_end:
},
footrule .tl_gset:N = \footrule,
@@ -395,59 +390,59 @@
{
\group_begin:
\color{ctex@frame}
- \hrule width 0.35\columnwidth height \l__rule_width_dim
+ \hrule width 0.35\columnwidth height \l__eb_rule_width_dim
\vspace*{2.6pt}
\group_end:
}
}
-\cs_new_protected:Npn \__ifuppercase_chapmark_set:n #1
+\cs_new_protected:Npn \__eb_ifupper_chaptermark_set:n #1
{
- \bool_if:NTF \l__uppercase_bool
- {\text_uppercase:n {\__fancyhf_chap_mark:n {#1}}}
- {\text_titlecase_first:n {\__fancyhf_chap_mark:n {#1}}}
+ \bool_if:NTF \l__eb_uppercase_bool
+ {\text_uppercase:n {\__eb_fancyhf_chap_mark:n {#1}}}
+ {\text_titlecase_first:n {\__eb_fancyhf_chap_mark:n {#1}}}
}
\ctex_at_end_preamble:n
{
- \exp_args:NV \geometry\g__geometry_clist
+ \exp_args:NV \geometry\g__eb_geometry_clist
\pagestyle{fancy}
\fancyhf{}
- \bool_if:NTF \l__page_twoside_bool
+ \bool_if:NTF \l__eb_page_twoside_bool
{
\cs_gset:Npn \chaptermark#1
{
\markboth
- {\__ifuppercase_chapmark_set:n {#1}}
- {\__ifuppercase_chapmark_set:n {#1}}
+ {\__eb_ifupper_chaptermark_set:n {#1}}
+ {\__eb_ifupper_chaptermark_set:n {#1}}
}
- \l__fancyhf_content_tl
+ \l__eb_fancyhf_content_tl
\cs_gset_eq:NN \ps@plain\ps@empty
}{
\cs_gset:Npn \chaptermark#1
- {\markboth{\__ifuppercase_chapmark_set:n {#1}}{}}
- \l__fancyhf_content_tl
+ {\markboth{\__eb_ifupper_chaptermark_set:n {#1}}{}}
+ \l__eb_fancyhf_content_tl
\cs_gset_eq:NN \ps@plain\ps@empty
}
\cs_gset:Npn \sectionmark#1
{
\markright
{
- \bool_if:NTF \l__uppercase_bool
- {\text_uppercase:n {\__fancyhf_sec_mark:n {#1}}}
- {\text_titlecase_first:n {\__fancyhf_sec_mark:n {#1}}}
+ \bool_if:NTF \l__eb_uppercase_bool
+ {\text_uppercase:n {\__eb_fancyhf_sec_mark:n {#1}}}
+ {\text_titlecase_first:n {\__eb_fancyhf_sec_mark:n {#1}}}
}
}
- \bool_if:NT \l__draft_bool
+ \bool_if:NT \l__eb_draft_bool
{
- \bool_if:NTF \l__page_twoside_bool
+ \bool_if:NTF \l__eb_page_twoside_bool
{\easyfoot[C]{\color{gray!60}\sffamily\today}}
{\easyhead[L]{\color{gray!60}\sffamily\today}}
\geometry{showframe}
}
}
-\seq_const_from_clist:Nn \c__toc_headings_level_seq
+\seq_const_from_clist:Nn \c__eb_toc_headings_level_seq
{part,chapter,section,subsection,lists}
-\seq_map_inline:Nn \c__toc_headings_level_seq
+\seq_map_inline:Nn \c__eb_toc_headings_level_seq
{
\ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
\__ctex_define:nn {tocset}
@@ -459,26 +454,26 @@
}
\__ctex_define:nn {tocset}
{
- lists/lolskip .skip_set:N = \l__toc_lolskip_skip,
+ lists/lolskip .skip_set:N = \l__eb_toc_lolskip_skip,
lists/lolskip .initial:n = 0.8pc,
- lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim,
+ lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim,
lists/belowoffset .initial:n = 0pc,
- tocline-fig .cs_set:Np = \labelname@lof#1#2,
+ tocline-fig .cs_set:Np = \eb@labelname@lof#1#2,
tocline-fig .initial:n =
- {\figurename\space#1\hspace{\list@labelsep}#2},
- tocline-tab .cs_set:Np = \labelname@lot#1#2,
+ {\figurename\space#1\hspace{\eb@list@labelsep}#2},
+ tocline-tab .cs_set:Np = \eb@labelname@lot#1#2,
tocline-tab .initial:n =
- {\tablename\space#1\hspace{\list@labelsep}#2},
- tocline-lst .tl_set:N = \labelname@lol,
+ {\tablename\space#1\hspace{\eb@list@labelsep}#2},
+ tocline-lst .tl_set:N = \eb@labelname@lol,
tocline-lst .initial:n =
{
\lstlistingname\space
- \thelstlisting\hspace{\list@labelsep}
+ \thelstlisting\hspace{\eb@list@labelsep}
\lstcaption
},
- belowoffset .dim_set:N = \l__toc_offset_dim,
+ belowoffset .dim_set:N = \l__eb_toc_offset_dim,
belowoffset .initial:n = -1pc,
- line-align .bool_set:N = \l__toc_line_align_bool,
+ line-align .bool_set:N = \l__eb_toc_line_align_bool,
line-align .default:n = true,
line-align .initial:n = true
}
@@ -512,11 +507,11 @@
\IfBooleanTF{#1}
{\thecontentspage}
{
- \bool_if:NTF \l__toc_line_align_bool
+ \bool_if:NTF \l__eb_toc_line_align_bool
{\contentspage}{\thecontentspage}
}
}
-\cs_new_protected:Npn \__titlecontents_set:nn #1#2
+\cs_new_protected:Npn \__eb_titlecontents_set:nn #1#2
{
\titlecontents{#1}
[\use:c {l__toc_#2_indent_tl}]
@@ -533,13 +528,13 @@
{figure}{lists},
{table}{lists},
{lstlisting}{lists}
- }{\__titlecontents_set:nn #1}
+ }{\__eb_titlecontents_set:nn #1}
\prop_new:N \l_label_name_prop
\prop_set_from_keyval:Nn \l_label_name_prop
{
- figure = \labelname@lof,
- table = \labelname@lot
+ figure = \eb@labelname@lof,
+ table = \eb@labelname@lot
}
\cs_gset:Npn \caption@@@addcontentsline#1#2#3#4
{
@@ -552,21 +547,21 @@
{\protect\numberline{\thelstlisting}\lst@@caption}
}{
\let\lstcaption\lst@@caption
- \addcontentsline{lol}{lstlisting}{\labelname@lol}
+ \addcontentsline{lol}{lstlisting}{\eb@labelname@lol}
}
-\__appto_cmd:Nn \@chapter
+\__eb_appto_cmd:Nn \@chapter
{
- \skip_if_eq:nnF {\l__toc_lolskip_skip}{\c_zero_skip}
+ \skip_if_eq:nnF {\l__eb_toc_lolskip_skip}{\c_zero_skip}
{
\addtocontents{lol}
- {\protect\addvspace{\skip_use:N \l__toc_lolskip_skip}}
+ {\protect\addvspace{\skip_use:N \l__eb_toc_lolskip_skip}}
}
- \bool_if:NF \l__class_book_bool
+ \bool_if:NF \l__eb_class_book_bool
{\msg_error:nn {easybook}{no-chapter}}
}
-\__appto_cmd:Nn \@schapter
+\__eb_appto_cmd:Nn \@schapter
{
- \bool_if:NF \l__class_book_bool
+ \bool_if:NF \l__eb_class_book_bool
{\msg_error:nn {easybook}{no-chapter}}
}
\msg_new:nnn {easybook}{no-chapter}
@@ -575,36 +570,36 @@
The~\string\chapter\space~command~will~not~be~used.
}
-\cs_new_protected:Npn \__ifuppercase_set:n #1
+\cs_new_protected:Npn \__eb_ifuppercase_set:n #1
{
- \bool_if:NTF \l__uppercase_bool
+ \bool_if:NTF \l__eb_uppercase_bool
{\text_uppercase:n {#1}}
{\text_titlecase_first:n {#1}}
}
-\cs_new_protected:Npn \__markboth:n #1
+\cs_new_protected:Npn \__eb_markboth:n #1
{
- \bool_if:NTF \l__page_twoside_bool
+ \bool_if:NTF \l__eb_page_twoside_bool
{
\markboth
- {\__ifuppercase_set:n {#1}}
- {\__ifuppercase_set:n {#1}}
- }{\markboth{\__ifuppercase_set:n {#1}}{}}
+ {\__eb_ifuppercase_set:n {#1}}
+ {\__eb_ifuppercase_set:n {#1}}
+ }{\markboth{\__eb_ifuppercase_set:n {#1}}{}}
}
-\tl_set:Nn \l__toc_type_tl{book}
+\tl_set:Nn \l__eb_toc_type_tl{book}
\keys_define:nn {listoc}
{
- article .code:n = \tl_set:Nn \l__toc_type_tl{article},
+ article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article},
book .code:n = {},
- multoc .bool_set:N = \l__multoc_bool,
+ multoc .bool_set:N = \l__eb_multoc_bool,
multoc .default:n = true,
multoc .initial:n = false,
- title .tl_set:N = \toc@title
+ title .tl_set:N = \eb@toc@title
}
-\cs_new_protected:Npn \__title_mark_intoc:n #1
+\cs_new_protected:Npn \__eb_title_mark_intoc:n #1
{
- \tl_if_eq:NnTF \l__toc_type_tl{book}
+ \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
{
\chapter*{\phantomsection#1}
\CTEX@addtocline{chapter}{#1}
@@ -612,94 +607,94 @@
\section*{\phantomsection#1}
\CTEX@addtocline{section}{#1}
}
- \__markboth:n {#1}
+ \__eb_markboth:n {#1}
}
-\cs_new_protected:Npn \__title_mark:n #1
+\cs_new_protected:Npn \__eb_title_mark:n #1
{
- \tl_if_eq:NnTF \l__toc_type_tl{book}
+ \tl_if_eq:NnTF \l__eb_toc_type_tl{book}
{\chapter*{\phantomsection#1}}
{\section*{\phantomsection#1}}
- \__markboth:n {#1}
+ \__eb_markboth:n {#1}
}
-\cs_new_protected:Npn \__ifmultoc_pre_set:
+\cs_new_protected:Npn \__eb_ifmultoc_pre_set:
{
- \bool_if:NTF \l__class_book_bool
+ \bool_if:NTF \l__eb_class_book_bool
{
\if@twocolumn
\@restonecoltrue
- \bool_if:NTF \l__multoc_bool{\twocolumn}{\onecolumn}
+ \bool_if:NTF \l__eb_multoc_bool{\twocolumn}{\onecolumn}
\else
\@restonecolfalse
- \bool_if:NT \l__multoc_bool{\twocolumn}
+ \bool_if:NT \l__eb_multoc_bool{\twocolumn}
\fi
- }{\tl_set:Nn \l__toc_type_tl{article}}
+ }{\tl_set:Nn \l__eb_toc_type_tl{article}}
}
-\cs_new_protected:Npn \__ifmultoc_post_set:
+\cs_new_protected:Npn \__eb_ifmultoc_post_set:
{
- \bool_if:NTF \l__class_book_bool
+ \bool_if:NTF \l__eb_class_book_bool
{
\if@restonecol
\twocolumn
\else
\onecolumn
\fi
- }{\tl_set:Nn \l__toc_type_tl{article}}
+ }{\tl_set:Nn \l__eb_toc_type_tl{article}}
}
-\cs_new_protected:Npn \__title_ifintoc_set:n #1
+\cs_new_protected:Npn \__eb_title_ifintoc_set:n #1
{
\IfBooleanTF{#1}
- {\__title_mark:n {\toc@title}}
- {\__title_mark_intoc:n {\toc@title}}
+ {\__eb_title_mark:n {\eb@toc@title}}
+ {\__eb_title_mark_intoc:n {\eb@toc@title}}
}
\RenewDocumentCommand{\tableofcontents}{o}
{
\group_begin:
- \tl_set_eq:NN \toc@title\contentsname
+ \tl_set_eq:NN \eb@toc@title\contentsname
\IfValueT{#1}{\keys_set:nn {listoc}{#1}}
- \__ifmultoc_pre_set:
- \__title_mark:n {\toc@title}
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_mark:n {\eb@toc@title}
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{toc}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
\RenewDocumentCommand{\listoffigures}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\listfigurename
+ \tl_set_eq:NN \eb@toc@title\listfigurename
\IfValueT{#2}{\keys_set:nn {listoc}{#2}}
- \__ifmultoc_pre_set:
- \__title_ifintoc_set:n {#1}
- \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_ifintoc_set:n {#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lof}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
\RenewDocumentCommand{\listoftables}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\listtablename
+ \tl_set_eq:NN \eb@toc@title\listtablename
\IfValueT{#2}{\keys_set:nn {listoc}{#2}}
- \__ifmultoc_pre_set:
- \__title_ifintoc_set:n {#1}
- \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_ifintoc_set:n {#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lot}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
\NewDocumentCommand{\listoflistings}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\lstlistlistingname
+ \tl_set_eq:NN \eb@toc@title\lstlistlistingname
\IfValueT{#2}{\keys_set:nn {listoc}{#2}}
- \__ifmultoc_pre_set:
- \__title_ifintoc_set:n {#1}
- \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
- \vspace*{\dim_use:N \l__toc_offset_dim}
+ \__eb_ifmultoc_pre_set:
+ \__eb_title_ifintoc_set:n {#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lol}
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_post_set:
\group_end:
}
@@ -712,28 +707,28 @@
]
\indexsetup
{
- level = \bool_if:NTF \l__class_book_bool{\chapter*}{\section*},
- toclevel = \bool_if:NTF \l__class_book_bool{chapter}{section},
- firstpagestyle = \bool_if:NTF \l__class_book_bool{plain}{fancy}
+ level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*},
+ toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section},
+ firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy}
}
-\__patch_cmd:Nnn \imki@indexheaders
+\__eb_patch_cmd:Nnn \imki@indexheaders
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
- {\__markboth:n {\indexname}}
+ {\__eb_markboth:n {\indexname}}
-\tl_new:N \l__font_table_tl
-\tl_new:N \l__font_figure_tl
-\tl_new:N \l__font_listing_tl
-\tl_new:N \l__font_footnote_tl
+\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
\__ctex_define:nn {elsefont}
{
- table-cap .tl_set:N = \l__font_table_tl,
+ table-cap .tl_set:N = \l__eb_font_table_tl,
table-cap .initial:n = \sffamily\small,
- figure-cap .tl_set:N = \l__font_figure_tl,
+ figure-cap .tl_set:N = \l__eb_font_figure_tl,
figure-cap .initial:n = \sffamily\small,
- listing-cap .tl_set:N = \l__font_listing_tl,
+ listing-cap .tl_set:N = \l__eb_font_listing_tl,
listing-cap .initial:n = \sffamily\small,
- footnote .tl_set:N = \l__font_footnote_tl,
+ footnote .tl_set:N = \l__eb_font_footnote_tl,
footnote .initial:n = \rmfamily,
marginpar .tl_set:N = \marginfont,
marginpar .initial:n = \rmfamily\footnotesize
@@ -741,27 +736,27 @@
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
-\DeclareCaptionFont{table@font}{\l__font_table_tl}
-\DeclareCaptionFont{figure@font}{\l__font_figure_tl}
-\DeclareCaptionFont{listing@font}{\l__font_listing_tl}
+\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}
\captionsetup
{
format = hang,
% figurewithin = section,
% tablewithin = section,
- font = {stretch = {\fp_use:N \l__spread_caption_fp}},
+ font = {stretch = {\fp_use:N \l__eb_spread_caption_fp}},
labelfont = {color = ctex@frame},
labelsep = ccwd,
singlelinecheck = true,
belowskip = 0pt,aboveskip = 10pt
}
-\captionsetup[table]{font += table@font}
-\captionsetup[figure]{font += figure@font}
-\captionsetup[lstlisting]{font += listing@font}
+\captionsetup[table]{font += eb@table@font}
+\captionsetup[figure]{font += eb@figure@font}
+\captionsetup[lstlisting]{font += eb@listing@font}
\captionsetup[subfigure]
{
labelformat = parens,
- font += figure@font,
+ font += eb@figure@font,
belowskip = 2pt,aboveskip = 6pt
}
\ctex_at_end_package:nn {bicaption}
@@ -769,27 +764,27 @@
\captionsetup[figure][bi-second]{name = Figure}
\captionsetup[table][bi-second]{name = Table}
}
-\cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}}
-\cs_new_protected:Npn \__separator_set:n #1
+\cs_new:Npn \__eb_arabic:n #1{\int_to_arabic:v {c@#1}}
+\cs_new_protected:Npn \__eb_separator_set:n #1
{
\cs_set:cpn {the#1}
{
\int_compare:nT {\c@chapter > 0}
{
\thechapter
- \use:c {l__#1_separator_tl}
+ \use:c {l__eb_#1_separator_tl}
}
- \__arabic:n {#1}
+ \__eb_arabic:n {#1}
}
}
\cs_gset:cpn {thesection}
{
\int_compare:nT {\c@chapter > 0}{\thechapter.}
- \__arabic:n {section}
+ \__eb_arabic:n {section}
}
\clist_map_inline:nn
{figure,table,lstlisting,equation}
- {\__separator_set:n {#1}}
+ {\__eb_separator_set:n {#1}}
\cs_gset_protected:Npn \appendix
{
\int_compare:nNnTF {\c@chapter} > {0}
@@ -814,37 +809,37 @@
}
\AtBeginEnvironment{tabularx}
{
- \exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_table_fp}
\selectfont\ignorespaces
}
\AtBeginEnvironment{tabular}
{
- \exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_table_fp}
\selectfont\ignorespaces
}
\ctex_after_end_preamble:n
{
- \exp_args:Nx \linespread{\fp_use:N \l__spread_line_fp}
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_line_fp}
\selectfont\ignorespaces
}
-\fp_new:N \l__spread_line_fp
-\fp_new:N \l__spread_table_fp
-\fp_new:N \l__spread_math_fp
-\fp_new:N \l__spread_caption_fp
-\fp_new:N \l__spread_footnote_fp
+\fp_new:N \l__eb_spread_line_fp
+\fp_new:N \l__eb_spread_table_fp
+\fp_new:N \l__eb_spread_math_fp
+\fp_new:N \l__eb_spread_caption_fp
+\fp_new:N \l__eb_spread_footnote_fp
\__ctex_define:nn {spread}
{
- line .fp_set:N = \l__spread_line_fp,
+ line .fp_set:N = \l__eb_spread_line_fp,
line .initial:n = 1.3,
- table .fp_set:N = \l__spread_table_fp,
+ table .fp_set:N = \l__eb_spread_table_fp,
table .initial:n = 1.05,
- math .fp_set:N = \l__spread_math_fp,
+ math .fp_set:N = \l__eb_spread_math_fp,
math .initial:n = 1.05,
- caption .fp_set:N = \l__spread_caption_fp,
+ caption .fp_set:N = \l__eb_spread_caption_fp,
caption .initial:n = 1,
- footnote .fp_set:N = \l__spread_footnote_fp,
+ footnote .fp_set:N = \l__eb_spread_footnote_fp,
footnote .initial:n = 1
}
@@ -868,32 +863,39 @@
\graphicspath{{figures/}}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
+\cs_new_protected:Npn \__eb_enumitem_labelval_set:nn #1#2
+ {\SetEnumitemValue{label}{#1}{\color{ctex@emph}#2}}
+\clist_map_inline:nn
+ {
+ {bullet}{\textbullet},
+ {endash}{\normalfont\bfseries\textendash},
+ {asterisk}{\textasteriskcentered},
+ {arabic}{\arabic*.},
+ {alph}{(\alph*)},
+ {roman}{\roman*.},
+ {outline}{\upshape\ding{111}}
+ }{\__eb_enumitem_labelval_set:nn #1}
+\SetEnumitemValue{font}{sf}{\color{ctex@emph}\normalfont\sffamily}
\setlist
{
- labelsep = .75\ccwd,listparindent = 2\ccwd,
+ labelsep = .75\ccwd,listparindent = 2\ccwd,leftmargin = *,
itemsep = .75ex plus .1ex,topsep = .75ex plus .1ex,
partopsep = 0ex,parsep = 0ex
}
\newlist{outlinelist}{itemize}{1}
-\setlist[outlinelist]
- {
- label = \color{ctex@emph}\upshape\ding{111},
- itemsep = .5ex plus .1ex,leftmargin = *
- }
-\setlist[itemize,1]
- {label = \color{ctex@emph}\ensuremath{\bullet},leftmargin = *}
-\setlist[itemize,2]
- {label = \color{ctex@emph}\ensuremath{\circ},leftmargin = *}
-\setlist[enumerate,1]
- {label = \color{ctex@emph}\arabic*.,ref = \arabic*,leftmargin = *}
-\setlist[enumerate,2]
- {label = \color{ctex@emph}(\alph*),ref = \theenumi(\alph*),leftmargin = *}
-\setlist[description]
- {font = \color{ctex@emph}\sf,labelwidth = *,leftmargin = 2\ccwd}
+\setlist[outlinelist]{label = outline,itemsep = .5ex plus .1ex}
+\setlist[itemize,1]{label = bullet}
+\setlist[itemize,2]{label = endash}
+\setlist[itemize,3]{label = asterisk}
+\setlist[enumerate,1]{label = arabic,ref = \arabic*}
+\setlist[enumerate,2]{label = alph,ref = \arabic{enumi}.\alph*}
+\setlist[enumerate,3]{label = roman,ref = \arabic{enumi}.\alph{enumii}.\roman*}
+\setlist*[enumerate,3]{labelwidth = *}
+\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
-\cs_new_protected:Npn \__thmname_set:nn #1#2
- {\tl_const:cn {c__name_#1_tl}{#2}}
-\bool_if:NTF \l__lang_chinese_bool
+\cs_new_protected:Npn \__eb_thmname_set:nn #1#2
+ {\tl_const:cn {c__eb_name_#1_tl}{#2}}
+\tl_if_eq:VnTF \l__ctex_scheme_tl{chinese}
{
\clist_map_inline:nn
{
@@ -905,7 +907,7 @@
{corollary}{推论},
{remark}{注},
{exercise}{练习}
- }{\__thmname_set:nn #1}
+ }{\__eb_thmname_set:nn #1}
}{
\clist_map_inline:nn
{
@@ -917,59 +919,64 @@
{corollary}{Corollary},
{remark}{Remark},
{exercise}{Exercise}
- }{\__thmname_set:nn #1}
+ }{\__eb_thmname_set:nn #1}
}
-\bool_new:N \l__thmbox_bool
-\tl_new:N \l__thm_numberwith_tl
-\tl_new:N \l__thm_headpunct_tl
-\tl_new:N \l__thm_bodyfont_tl
-\tl_new:N \l__thm_notefont_tl
-\tl_new:N \l__thm_headindent_tl
-\tl_new:N \l__thm_spaceabove_tl
-\tl_new:N \l__thm_spacebelow_tl
+\bool_new:N \l__eb_thmbox_bool
+\tl_new:N \l__eb_thm_numberwith_tl
+\tl_new:N \l__eb_thm_headpunct_tl
+\tl_new:N \l__eb_thm_bodyfont_tl
+\tl_new:N \l__eb_thm_notefont_tl
+\tl_new:N \l__eb_thm_headindent_tl
+\tl_new:N \l__eb_thm_spaceabove_tl
+\tl_new:N \l__eb_thm_spacebelow_tl
\RenewDocumentCommand{\newtheorem}{O{}m}
{\AfterPreamble{\declaretheorem[#1]{#2}}}
\__ctex_define:nn {thmset}
{
- thmbox .bool_set:N = \l__thmbox_bool,
+ thmbox .bool_set:N = \l__eb_thmbox_bool,
thmbox .default:n = true,
thmbox .initial:n = false,
- within .tl_set:N = \l__thm_numberwith_tl,
+ within .tl_set:N = \l__eb_thm_numberwith_tl,
within .initial:n = chapter,
- bodyfont .tl_set:N = \l__thm_bodyfont_tl,
+ bodyfont .tl_set:N = \l__eb_thm_bodyfont_tl,
bodyfont .initial:n = {},
- notefont .tl_set:N = \l__thm_notefont_tl,
+ notefont .tl_set:N = \l__eb_thm_notefont_tl,
notefont .initial:n = {},
- headfont .tl_set:N = \l__thm_headfont_tl,
+ headfont .tl_set:N = \l__eb_thm_headfont_tl,
headfont .initial:n = \color{ctex@emph}\sffamily,
- headpunct .tl_set:N = \l__thm_headpunct_tl,
+ headpunct .tl_set:N = \l__eb_thm_headpunct_tl,
headpunct .initial:n = {},
- spacepost .tl_set:N = \l__thm_spacepost_tl,
+ spacepost .tl_set:N = \l__eb_thm_spacepost_tl,
spacepost .initial:n = \ccwd,
- headindent .tl_set:N = \l__thm_headindent_tl,
+ headindent .tl_set:N = \l__eb_thm_headindent_tl,
headindent .initial:n = 0\ccwd,
- spaceabove .tl_set:N = \l__thm_spaceabove_tl,
+ spaceabove .tl_set:N = \l__eb_thm_spaceabove_tl,
spaceabove .initial:n = .75ex plus .1ex,
- spacebelow .tl_set:N = \l__thm_spacebelow_tl,
+ spacebelow .tl_set:N = \l__eb_thm_spacebelow_tl,
spacebelow .initial:n = .75ex plus .1ex
}
-\ctex_at_end_preamble:n
+\tl_const:Nn \c__eb_thmtools_keyval_tl
{
- \declaretheoremstyle[
- spaceabove = \l__thm_spaceabove_tl,
- spacebelow = \l__thm_spacebelow_tl,
- headindent = \l__thm_headindent_tl,
- headfont = \l__thm_headfont_tl,
- notefont = \l__thm_notefont_tl,
+ [
+ spaceabove = \l__eb_thm_spaceabove_tl,
+ spacebelow = \l__eb_thm_spacebelow_tl,
+ headindent = \l__eb_thm_headindent_tl,
+ headfont = \l__eb_thm_headfont_tl,
+ notefont = \l__eb_thm_notefont_tl,
notebraces = {}{},
- bodyfont = \l__thm_bodyfont_tl,
- headpunct = \l__thm_headpunct_tl,
- postheadspace = \l__thm_spacepost_tl,
- within = \l__thm_numberwith_tl,
+ bodyfont = \l__eb_thm_bodyfont_tl,
+ headpunct = \l__eb_thm_headpunct_tl,
+ postheadspace = \l__eb_thm_spacepost_tl,
+ within = \l__eb_thm_numberwith_tl,
headformat = \NAME\space\NUMBER\NOTE
- ]{easy-thm-sty}
+ ]
+ }
+\ctex_at_end_preamble:n
+ {
+ \exp_args:NNc \exp_after:wN
+ \declaretheoremstyle{c__eb_thmtools_keyval_tl}{easy-thm-sty}
\clist_map_inline:nn
{
example,definition,theorem,
@@ -977,13 +984,13 @@
}{
\declaretheorem[
style = easy-thm-sty,
- name = \use:c {c__name_#1_tl}
+ name = \use:c {c__eb_name_#1_tl}
]{#1}
}
\cs_gset_eq:NN \proof\relax
\declaretheorem[
style = easy-thm-sty,
- name = \c__name_remark_tl,
+ name = \c__eb_name_remark_tl,
numbered = no
]{remark}
\declaretheorem[
@@ -1024,10 +1031,10 @@
\allowdisplaybreaks[4]
\cs_gset:Npn \ULthickness{.75pt}
\skip_set:Nn \jot{4pt plus 1pt minus 1pt}
-\cs_new_protected:Npn \l__math_restore:n #1
+\cs_new_protected:Npn \l__eb_math_restore:n #1
{
\AtBeginEnvironment{#1}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\ignorespaces}
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\ignorespaces}
}
\clist_map_inline:nn
{
@@ -1035,19 +1042,19 @@
matrix*,pmatrix*,bmatrix*,Bmatrix*,vmatrix*,Vmatrix*,
cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
aligned,alignedat,gathered,multlined,lgathered,rgathered
- }{\l__math_restore:n {#1}}
-\__patch_cmd:Nnn \start@gather
+ }{\l__eb_math_restore:n {#1}}
+\__eb_patch_cmd:Nnn \start@gather
{\collect@body}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
-\__patch_cmd:Nnn \start@align
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect@body}
+\__eb_patch_cmd:Nnn \start@align
{\collect@body}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
-\__patch_cmd:Nnn \start@multline
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect@body}
+\__eb_patch_cmd:Nnn \start@multline
{\collect@body}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
-\__patch_cmd:Nnn \gather@split
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\collect@body}
+\__eb_patch_cmd:Nnn \gather@split
{\spread@equation}
- {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\spread@equation}
+ {\linespread{\fp_use:N \l__eb_spread_math_fp}\selectfont\spread@equation}
\ctex_after_end_preamble:n
{
\skip_set:Nn \abovedisplayskip{5pt plus 1pt minus 1pt}
@@ -1062,7 +1069,7 @@
\ctex_at_end_package:nn {tcolorbox}
{
- \__ifpackage_later:nn {tcolorbox}{2020/10/09}
+ \__eb_ifpackage_later:nn {tcolorbox}{2020/10/09}
\tcbset
{
thmsty/.style =
@@ -1097,7 +1104,7 @@
before~skip = 4ex,after~skip = 2.25ex
},
breakable,
- boxrule = \l__rule_width_dim
+ boxrule = \l__eb_rule_width_dim
}
\NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
{
@@ -1108,10 +1115,10 @@
\end{tcolorbox}
}{}
\NewDocumentEnvironment{exercise}
- {sO{LightYellow}O{1.}D(){\c__name_exercise_tl}o+b}
+ {sO{LightYellow}O{1.}D(){\c__eb_name_exercise_tl}o+b}
{
\begin{center}
- \bool_if:NTF \l__thmbox_bool
+ \bool_if:NTF \l__eb_thmbox_bool
{
\tcbox[
exersty,
@@ -1172,7 +1179,7 @@
}
\ctex_at_end_preamble:n
{
- \bool_if:NT \l__thmbox_bool
+ \bool_if:NT \l__eb_thmbox_bool
{
\@ifpackageloaded{tcolorbox}
{
@@ -1186,101 +1193,101 @@
}
}
-\bool_set_true:N \l__backend_bibtex_bool
-\tl_new:N \l__bib_style_tl
-\tl_new:N \l__bib_otherstyle_tl
-\tl_new:N \l__bib_citestyle_tl
-\tl_new:N \l__bib_file_tl
+\bool_set_true:N \l__eb_backend_bibtex_bool
+\tl_new:N \l__eb_bib_style_tl
+\tl_new:N \l__eb_bib_otherstyle_tl
+\tl_new:N \l__eb_bib_citestyle_tl
+\tl_new:N \l__eb_bib_file_tl
\__ctex_define:nn {bibset}
{
backend .choice:,
backend/bibtex .code:n = {},
backend/biblatex .code:n =
- {\bool_set_false:N \l__backend_bibtex_bool},
+ {\bool_set_false:N \l__eb_backend_bibtex_bool},
bib-style .choice:,
bib-style .value_required:n = true,
bib-style/numerical .code:n =
{
- \tl_set:Nn \l__bib_style_tl{#1}
- \tl_clear:N \l__bib_otherstyle_tl
+ \tl_set:Nn \l__eb_bib_style_tl{#1}
+ \tl_clear:N \l__eb_bib_otherstyle_tl
},
bib-style/authoryear .code:n =
{
- \tl_set:Nn \l__bib_style_tl{#1}
- \tl_clear:N \l__bib_otherstyle_tl
+ \tl_set:Nn \l__eb_bib_style_tl{#1}
+ \tl_clear:N \l__eb_bib_otherstyle_tl
},
bib-style/unknown .code:n =
- {\tl_set_eq:NN \l__bib_otherstyle_tl\l_keys_value_tl},
+ {\tl_set_eq:NN \l__eb_bib_otherstyle_tl\l_keys_value_tl},
bib-style .initial:n = numerical,
cite-style .code:n =
- {\tl_set:Nn \l__bib_citestyle_tl{#1}},
- bibfile .tl_set:N = \l__bib_file_tl,
+ {\tl_set:Nn \l__eb_bib_citestyle_tl{#1}},
+ bibfile .tl_set:N = \l__eb_bib_file_tl,
bibfile .initial:n = refs.bib
}
-\cs_new_protected:Npn \__bibtex_set:
+\cs_new_protected:Npn \__eb_bibtex_set:
{
- \tl_if_empty:NTF \l__bib_otherstyle_tl
+ \tl_if_empty:NTF \l__eb_bib_otherstyle_tl
{
- \tl_if_eq:VnT \l__bib_style_tl{numerical}
+ \tl_if_eq:VnT \l__eb_bib_style_tl{numerical}
{
\bibliographystyle{gbt7714-numerical}
\setcitestyle{comma,square,super}
}
- \tl_if_eq:VnT \l__bib_style_tl{authoryear}
+ \tl_if_eq:VnT \l__eb_bib_style_tl{authoryear}
{\bibliographystyle{gbt7714-author-year}}
\cs_set_eq:NN \cite\citep
- }{\exp_args:NV \bibliographystyle\l__bib_otherstyle_tl}
- \tl_if_empty:NF \l__bib_citestyle_tl
- {\exp_args:NV \setcitestyle\l__bib_citestyle_tl}
+ }{\exp_args:NV \bibliographystyle\l__eb_bib_otherstyle_tl}
+ \tl_if_empty:NF \l__eb_bib_citestyle_tl
+ {\exp_args:NV \setcitestyle\l__eb_bib_citestyle_tl}
\skip_set:Nn \bibsep{0ex}
\NewDocumentCommand{\printbibliography}{so}
{
\group_begin:
- \tl_set_eq:NN \toc@title\bibname
+ \tl_set_eq:NN \eb@toc@title\bibname
\IfValueT{##2}{\keys_set:nn {listoc}{##2}}
- \__ifmultoc_pre_set:
- \cs_set:Npn \bibsection{\__title_ifintoc_set:n {##1}}
- \exp_args:NV \bibliography\l__bib_file_tl
- \__ifmultoc_post_set:
+ \__eb_ifmultoc_pre_set:
+ \cs_set:Npn \bibsection{\__eb_title_ifintoc_set:n {##1}}
+ \exp_args:NV \bibliography\l__eb_bib_file_tl
+ \__eb_ifmultoc_post_set:
\group_end:
}
}
-\cs_new_protected:Npn \__put_biblatex:n #1
+\cs_new_protected:Npn \__eb_put_biblatex:n #1
{\PassOptionsToPackage{#1}{biblatex}}
-\cs_new_protected:Npn \__biblatex_pre_set:
+\cs_new_protected:Npn \__eb_biblatex_pre_set:
{
- \tl_if_empty:NTF \l__bib_otherstyle_tl
+ \tl_if_empty:NTF \l__eb_bib_otherstyle_tl
{
- \tl_if_eq:VnT \l__bib_style_tl{numerical}
- {\__put_biblatex:n {style = gb7714-2015}}
- \tl_if_eq:VnT \l__bib_style_tl{authoryear}
- {\__put_biblatex:n {style = gb7714-2015ay}}
- }{\__put_biblatex:n {style = \l__bib_otherstyle_tl}}
- \tl_if_empty:NF \l__bib_citestyle_tl
- {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}}
- \__put_biblatex:n {backend = biber}
- }
-\cs_new_protected:Npn \__biblatex_post_set:
- {
- \exp_args:NV \addbibresource\l__bib_file_tl
+ \tl_if_eq:VnT \l__eb_bib_style_tl{numerical}
+ {\__eb_put_biblatex:n {style = gb7714-2015}}
+ \tl_if_eq:VnT \l__eb_bib_style_tl{authoryear}
+ {\__eb_put_biblatex:n {style = gb7714-2015ay}}
+ }{\__eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}}
+ \tl_if_empty:NF \l__eb_bib_citestyle_tl
+ {\__eb_put_biblatex:n {citestyle = \l__eb_bib_citestyle_tl}}
+ \__eb_put_biblatex:n {backend = biber}
+ }
+\cs_new_protected:Npn \__eb_biblatex_post_set:
+ {
+ \exp_args:NV \addbibresource\l__eb_bib_file_tl
\cs_gset:Npn \blx@default@theheading{bibintoc}
- \defbibheading{bibintoc}[\bibname]{\__title_mark_intoc:n {##1}}
+ \defbibheading{bibintoc}[\bibname]{\__eb_title_mark_intoc:n {##1}}
\skip_set:Nn \bibitemsep{0ex}
}
\ctex_at_end_preamble:n
{
- \bool_if:NTF \l__backend_bibtex_bool
+ \bool_if:NTF \l__eb_backend_bibtex_bool
{
\RequirePackage[sort&compress]{natbib}
- \__bibtex_set:
+ \__eb_bibtex_set:
}{
- \__biblatex_pre_set:
+ \__eb_biblatex_pre_set:
\RequirePackage{biblatex}
- \__biblatex_post_set:
+ \__eb_biblatex_post_set:
}
}
@@ -1288,30 +1295,30 @@
{
\group_begin:
\footnotesize
- \exp_args:Nx \linespread{\fp_use:N \l__spread_footnote_fp}\selectfont
+ \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
\skip_gset:Nn \footnotesep{\ht\strutbox}
\group_end:
- \bool_if:NT \l__chap_withpart_bool
+ \bool_if:NT \l__eb_chap_withpart_bool
{\counterwithin*{chapter}{part}}
- \tl_if_eq:NnT \l__foot_numberwith_tl{part}
+ \tl_if_eq:NnT \l__eb_foot_numberwith_tl{part}
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{part}
}
- \tl_if_eq:NnT \l__foot_numberwith_tl{page}
+ \tl_if_eq:NnT \l__eb_foot_numberwith_tl{page}
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{page}
}
}
-\__patch_cmd:Nnn \@footnotetext
+\__eb_patch_cmd:Nnn \@footnotetext
{\reset@font}
- {\def\baselinestretch{\fp_use:N \l__spread_footnote_fp}\l__font_footnote_tl}
-\__patch_cmd:Nnn \@mpfootnotetext
+ {\def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp}\l__eb_font_footnote_tl}
+\__eb_patch_cmd:Nnn \@mpfootnotetext
{\reset@font}
- {\def\baselinestretch{\fp_use:N \l__spread_footnote_fp}\l__font_footnote_tl}
-\__patch_cmd:Nnn \@makefnmark
- {\normalfont}{\l__font_footnote_tl}
+ {\def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp}\l__eb_font_footnote_tl}
+\__eb_patch_cmd:Nnn \@makefnmark
+ {\normalfont}{\l__eb_font_footnote_tl}
\lstdefinestyle{mystyle}
{
@@ -1368,27 +1375,27 @@
aboveskip = 1.5ex plus .2ex minus .1ex,
belowskip = 0.55ex plus .2ex minus .1ex,
keepspaces = true,
- framerule = \l__rule_width_dim,
+ framerule = \l__eb_rule_width_dim,
columns = flexible
}
\lstloadlanguages{C,C++,Java,Python,Matlab}
-\clist_new:N \l__hyperref_clist
-\cs_new_protected:Npn \__put_hyperref:n #1
- {\clist_put_right:Nn \l__hyperref_clist{#1}}
-\cs_new_protected:Npn \__define_linkcolor:nnn #1#2#3
+\clist_new:N \l__eb_hyperref_clist
+\cs_new_protected:Npn \__eb_put_hyperref:n #1
+ {\clist_put_right:Nn \l__eb_hyperref_clist{#1}}
+\cs_new_protected:Npn \__eb_define_linkcolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
-\cs_new_protected:Npn \__define_themecolor:nnn #1#2#3
+\cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
-\cs_new:Npn \__linkcolor_set:n #1
+\cs_new:Npn \__eb_linkcolor_set:n #1
{
linkcolor/\clist_item:nn {#1}{1} .code:n =
{
- \__define_linkcolor:nnn
+ \__eb_define_linkcolor:nnn
{\clist_item:nn {#1}{2}}
{\clist_item:nn {#1}{3}}
{\clist_item:nn {#1}{4}}
- \__put_hyperref:n
+ \__eb_put_hyperref:n
{
linkcolor = ctex@link,linkbordercolor = ctex@link,
urlcolor = ctex@url,urlbordercolor = ctex@url,
@@ -1396,33 +1403,33 @@
}
},
}
-\cs_new:Npn \__themecolor_set:n #1
+\cs_new:Npn \__eb_themecolor_set:n #1
{
color/\clist_item:nn {#1}{1} .code:n =
{
- \__define_themecolor:nnn
+ \__eb_define_themecolor:nnn
{\clist_item:nn {#1}{2}}
{\clist_item:nn {#1}{3}}
{\clist_item:nn {#1}{4}}
},
}
-\cs_new:Npn \__allow_urlbreak:
+\cs_new:Npn \__eb_allow_urlbreak:
{
- \cs_new:Npn \__add_urlbreak_points:
- {\tl_map_function:NN \c__urlbreak_points_tl\do}
- \__appto_cmd:Nn
- \UrlBreaks{\UrlOrds\__add_urlbreak_points:}
+ \cs_new:Npn \__eb_add_urlbreak_points:
+ {\tl_map_function:NN \c__eb_urlbreak_points_tl\do}
+ \__eb_appto_cmd:Nn
+ \UrlBreaks{\UrlOrds\__eb_add_urlbreak_points:}
}
-\tl_const:Nn \c__urlbreak_points_tl
+\tl_const:Nn \c__eb_urlbreak_points_tl
{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789}
\keys_define:nx {ctex/link}
{
hyperlink .choice:,
hyperlink/edge .code:n = {},
- hyperlink/various .code:n = \__put_hyperref:n {colorlinks},
- hyperlink/none .code:n = \__put_hyperref:n {hidelinks},
+ hyperlink/various .code:n = \__eb_put_hyperref:n {colorlinks},
+ hyperlink/none .code:n = \__eb_put_hyperref:n {hidelinks},
hyperlink .default:n = edge,
hyperlink .initial:n = edge,
@@ -1434,17 +1441,17 @@
{skyblue, 0000ff,004986,eb6877},
{crimson, dc143c,00c1c9,afcd20}
}
- \__linkcolor_set:n
+ \__eb_linkcolor_set:n
linkcolor .default:n = fresh,
linkcolor .initial:n = fresh,
linktoc .choice:,
- linktoc/unknown .code:n = \__put_hyperref:n {linktoc = \exp_not:n {#1}},
+ linktoc/unknown .code:n = \__eb_put_hyperref:n {linktoc = \exp_not:n {#1}},
linktoc .default:n = all,
linktoc .initial:n = all,
unknown .code:n =
{
- \__put_hyperref:x
+ \__eb_put_hyperref:x
{
\exp_not:N \l_keys_key_str
\exp_not:N \tl_if_empty:NF
@@ -1463,7 +1470,7 @@
{energy, f39800,00a0e9,893895},
{cyberpunk, 601986,eb6877,a4005b}
}
- \__themecolor_set:n
+ \__eb_themecolor_set:n
color .initial:n = none
}
@@ -1471,10 +1478,10 @@
{
\RequirePackage{hyperref,cleveref}
\urlstyle{same}
- \__allow_urlbreak:
+ \__eb_allow_urlbreak:
\ctex_hypersetup:n {pdfstartview = FitH}
- \exp_args:NV \hypersetup\l__hyperref_clist
- \bool_if:NTF \l__lang_chinese_bool
+ \exp_args:NV \hypersetup\l__eb_hyperref_clist
+ \tl_if_eq:VnTF \l__ctex_scheme_tl{chinese}
{
\keys_set_known:nn {ctex}
{
@@ -1534,25 +1541,25 @@
{
pagestyle = empty,
number =
- {\bool_if:NTF \l__zhtitle_bool{\chinese{part}}{\thepart}},
+ {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{part}}{\thepart}},
format = \color{ctex@frame}\sffamily\Huge,
aftername =
- {\bool_if:NTF \l__newline_bool{\par\nobreak}{\hspace{\ccwd}}},
+ {\bool_if:NTF \l__eb_newline_bool{\par\nobreak}{\hspace{\ccwd}}},
tocline = \CTEXifname{\CTEXthepart\hspace{\ccwd}}{}#2
},
chapter =
{
% pagestyle = fancy,
number =
- {\bool_if:NTF \l__zhtitle_bool{\chinese{chapter}}{\thechapter}},
+ {\bool_if:NTF \l__eb_zhtitle_bool{\chinese{chapter}}{\thechapter}},
format =
{
\color{ctex@frame}\sffamily\LARGE
- \bool_if:NF \l__newline_bool{\centering}
+ \bool_if:NF \l__eb_newline_bool{\centering}
},
aftername =
{
- \bool_if:NTF \l__newline_bool
+ \bool_if:NTF \l__eb_newline_bool
{\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}
},
beforeskip = -1.5ex,
@@ -1589,7 +1596,7 @@
}
}
-\bool_if:NF \l__newline_bool
+\bool_if:NF \l__eb_newline_bool
{
\ctex_set:n
{