summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-04 01:49:16 +0000
committerNorbert Preining <preining@logic.at>2021-04-04 01:49:16 +0000
commit425b066c37d773e7d575b5c3749d3f3bc3f1dca3 (patch)
tree3a8f6f48fb8ad28242c4426d4fa529b6d2e7a3f7 /Master/texmf-dist/source
parent010fef6beed8d8f505513fdc9c92bc110a954082 (diff)
easybook (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx340
1 files changed, 179 insertions, 161 deletions
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index 0a587aea748..05a6d659913 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -51,29 +51,11 @@ The latest version of this license is in
%
% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.23z}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
-%
-% \CheckSum{0}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
+% \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
%
% \title{\sffamily easybook书籍文档类}
% \author{瞿毅}
-% \date{2021/03/23\hskip\ccwd\relax v1.23z\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/04/01\hskip\ccwd\relax v1.24b\thanks{\url{https://gitee.com/texl3/easybook}}}
% \maketitle
% \begin{abstract}
% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
@@ -118,7 +100,7 @@ The latest version of this license is in
% 标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
% \begin{itemize}
% \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
-% \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
+% \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 或节 \ref{sec:interface options} 中此选项所属模块接口命令设定。
% \end{itemize}
%
% \begin{function}[rEXP,added = 2021-01-05]{draft}
@@ -164,7 +146,7 @@ The latest version of this license is in
% class = <(book)|article>
% \end{syntax}
% 设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
-% \changes{v1.23z}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
+% \changes{v1.23}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
% \end{function}
%
% \subsection{文档命令}
@@ -180,7 +162,7 @@ The latest version of this license is in
% \tn{listoflistings*}\oarg{键值列表}
% \end{syntax}
% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
-% \changes{v1.23z}{2021/02/20}{重新定义文档结构划分命令。}
+% \changes{v1.23}{2021/02/20}{重新定义文档结构划分命令。}
% \end{function}
%
% \begin{function}{multoc,book,article}
@@ -188,15 +170,27 @@ The latest version of this license is in
% multoc = <true|(false)>
% \end{syntax}
% \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
-% \changes{v1.23z}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
+% \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
% \end{function}
%
% \section{接口选项}
+% \label{sec:interface options}
% \begin{function}[added = 2021-01-05]{\ctexset}
% \begin{syntax}
% \tn{ctexset}\marg{键值列表}
% \end{syntax}
-% \cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
+% \cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的键值列表仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名
+% \begin{center}
+% \begin{tabular}{*{5}{c}}
+% \toprule
+% \hyperref[subsec:style]{风格} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:reference]{参考文献} \\
+% style & link & elsefont & spread & bibset \\
+% \midrule
+% \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面边距} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
+% thmset & geoset & hdrset & tocset & \\
+% \bottomrule
+% \end{tabular}
+% \end{center}
% \end{function}
%
% \begin{function}[EXP,added = 2021-01-08]{config}
@@ -208,13 +202,14 @@ The latest version of this license is in
% \end{function}
%
% \subsection{风格}
+% \label{subsec:style}
% \begin{function}[EXP,added = 2021-01-05,updated = 2021-03-18]{color,multoc,withpart,footwith,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
% \begin{syntax}
% color = <(none)|seaside|energy|cyberpunk>
% multoc = <true|(false)>
% withpart = <true|(false)>
% footwith = <part|(chapter)|page>
-% notomath = <(true)|false>
+% notomath = <true|(false)>
% rulewidth = <(0.75pt)>
% uppercase = <(true)|false>
% figure-sep = <(.)>
@@ -225,9 +220,9 @@ The latest version of this license is in
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{style/...}
% \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-% \changes{v1.23z}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-% \changes{v1.23z}{2021/02/09}{增加控制页面横线粗细的选项。}
-% \changes{v1.23z}{2021/03/15}{增加控制编号连接符的选项。}
+% \changes{v1.23}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+% \changes{v1.23}{2021/02/09}{增加控制页面横线粗细的选项。}
+% \changes{v1.23}{2021/03/15}{增加控制编号连接符的选项。}
% \end{function}
%
% \begin{optdesc}
@@ -242,7 +237,7 @@ The latest version of this license is in
% \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式。
% \item[withpart] 使章跟随每一部分编号,默认不跟随。
% \item[footwith] 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从1开始。
-% \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
+% \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。此选项默认关闭,此时可以使用 \pkg{unicode-math} 等宏包自定义数学字体。
% \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
% \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
% \item[figure-sep] 图片标题编号的连接符。
@@ -278,6 +273,7 @@ The latest version of this license is in
% \end{optdesc}
%
% \subsection{行距}
+% \label{subsec:spacing}
% \begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{line,table,math,caption,footnote}
% \begin{syntax}
% line = <(1.3)>
@@ -289,7 +285,7 @@ The latest version of this license is in
% \ding{229} 以上选项路径为 \opt{spread/...} \\
% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
% \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-% \changes{v1.23z}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+% \changes{v1.23}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
% \end{function}
%
% \begin{optdesc}
@@ -301,6 +297,7 @@ The latest version of this license is in
% \end{optdesc}
%
% \subsection{其它字体}
+% \label{subsec:other font}
% \begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{table-cap,figure-cap,listing-cap,footnote,marginpar}
% \begin{syntax}
% table-cap = <\tn{sffamily}\tn{small}>
@@ -311,7 +308,7 @@ The latest version of this license is in
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{elsefont/...}
% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-% \changes{v1.23z}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+% \changes{v1.23}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
% \end{function}
%
% \begin{optdesc}
@@ -323,6 +320,7 @@ The latest version of this license is in
% \end{optdesc}
%
% \subsection{参考文献}
+% \label{subsec:reference}
% \begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{backend,bib-style,cite-style,bibfile}
% \begin{syntax}
% backend = <(bibtex)|biblatex>
@@ -332,7 +330,7 @@ The latest version of this license is in
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{bibset/...}
% \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-% \changes{v1.23z}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+% \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
% \end{function}
%
% \begin{optdesc}
@@ -358,10 +356,11 @@ The latest version of this license is in
% \end{function}
%
% \subsection{定理样式}
-% \begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
+% \label{subsec:theorem of style}
+% \begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmbox,within,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
% \begin{syntax}
% thmbox = <true|(false)>
-% numberwith = <(chapter)|section|其它环境|空置>
+% within = <(chapter)|section|其它环境|空置>
% headpunct = <(未设置)>
% bodyfont = <(未设置)>
% notefont = <(未设置)>
@@ -377,7 +376,7 @@ The latest version of this license is in
%
% \begin{optdesc}
% \item[thmbox] 开启定理及习题环境的盒子边框,需载入 \pkg{tcolorbox} 宏包才生效。
-% \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
+% \item[within] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
% \item[headpunct] 定理标题末尾后的标记,在换行符或第一段内容的间隔之前。
% \item[bodyfont] 定理内容部分的字体。
% \item[notefont] 定理副标题内容的字体。
@@ -394,7 +393,7 @@ The latest version of this license is in
% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
% \end{syntax}
% 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
-% \changes{v1.23z}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -409,9 +408,9 @@ The latest version of this license is in
% \end{optdesc}
%
% \subsubsection{新的定理样式}
-% 定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
+% 定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{easythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
% \begin{ctexexam}
-% \newtheorem[style = mythm,name = 定理名]{定理环境名}
+% \newtheorem[style = easythm,name = 定理名]{定理环境名}
% \end{ctexexam}
% 若要给定理环境增加边框,可以如下进行设置
% \begin{ctexexam}
@@ -423,6 +422,7 @@ The latest version of this license is in
% \end{ctexexam}
%
% \subsection{页面边距}
+% \label{subsec:page margins}
% \begin{function}[EXP,added = 2021-01-13,updated = 2021-03-21]{footnotemargin,footparskip,footparindent,list-labelsep,left,top,hmargin,textwidth,includehead}
% \begin{syntax}
% footnotemargin = <脚注首行缩进|(0.5\tn{ccwd})>
@@ -438,22 +438,20 @@ The latest version of this license is in
% \ding{229} 以上选项路径为 \opt{geoset/...} \\
% \opt{geoset} 会将前4个选项以外的其它选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
% \begin{ctexexam}
-% \ctexset
+% \geoset
% {
-% geoset =
-% {
-% top = 2.5cm,
-% bottom = 2.5cm,
-% left = 3.2cm,
-% right = 3.2cm,
-% list-labelsep = \hspace{0.5\ccwd}
-% }
+% top = 2.5cm,
+% bottom = 2.5cm,
+% left = 3.2cm,
+% right = 3.2cm,
+% list-labelsep = \hspace{0.5\ccwd}
% }
% \end{ctexexam}
% \changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
% \end{function}
%
% \subsection{页眉页脚}
+% \label{subsec:header and footer}
% \begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
% \begin{syntax}
% head-foot = <页眉页脚中的内容>
@@ -467,8 +465,8 @@ The latest version of this license is in
% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
% \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
% \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-% \changes{v1.23z}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-% \changes{v1.23z}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+% \changes{v1.23}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+% \changes{v1.23}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
% \end{function}
%
% \begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
@@ -478,24 +476,22 @@ The latest version of this license is in
% \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代表左、中、右部分。单面打印时,含有偶数的选项无效。
% \begin{ctexexam}
-% \ctexset
+% \hdrset
% {
-% hdrset =
+% head-foot =
% {
-% head-foot =
-% {
-% \easyhead[ER]{\leftmark}
-% \easyhead[OL]{\rightmark}
-% \easyhead[EL,OR]{\textbf{\thepage}}
-% },
-% sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
-% headrule = {\hrule width \textwidth height 1pt}
-% }
+% \easyhead[ER]{\leftmark}
+% \easyhead[OL]{\rightmark}
+% \easyhead[EL,OR]{\textbf{\thepage}}
+% },
+% sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
+% headrule = {\hrule width \textwidth height 1pt}
% }
% \end{ctexexam}
% \end{function}
%
% \subsection{目录样式}
+% \label{subsec:catalog style}
% \begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{format,indent,rule}
% \begin{syntax}
% format = <目录标题格式>
@@ -524,16 +520,13 @@ The latest version of this license is in
% \end{syntax}
% \tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
% \begin{ctexexam}
-% \ctexset
+% \tocset
% {
-% tocset =
+% chapter =
% {
-% chapter =
-% {
-% format = \addvspace{8pt}\large,
-% indent = 1.5\ccwd,
-% rule = \tocrule[0.6pc](1.1){.}[\zihao{5}]
-% }
+% format = \addvspace{8pt}\large,
+% indent = 1.5\ccwd,
+% rule = \tocrule[0.6pc](1.1){.}[\zihao{5}]
% }
% }
% \end{ctexexam}
@@ -626,7 +619,7 @@ The latest version of this license is in
% \item 习题内容
% \end{exercise}
% \end{ctexexam}
-% \changes{v1.23z}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+% \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
% \end{function}
%
% \subsection{盒子}
@@ -650,19 +643,19 @@ The latest version of this license is in
% \end{function}
%
% \subsubsection{段落盒子}
-% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{mybox}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{easybox}
% \begin{syntax}
-% \tn{begin}\marg{mybox}\oarg{颜色名|(MintCream)}\parg{段落标题}\oarg{配置选项}
+% \tn{begin}\marg{easybox}\oarg{颜色名|(MintCream)}\parg{段落标题}\oarg{配置选项}
% <盒子内容>
-% \tn{end}\marg{mybox}
+% \tn{end}\marg{easybox}
% \end{syntax}
-% 环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
+% 环境 \opt{easybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
% \begin{ctexexam}
-% \begin{mybox}*[MintCream](段落标题)
+% \begin{easybox}*[MintCream](段落标题)
% 盒子内容
% \tcblower % 盒子上下部分分界线
% 盒子内容
-% \end{mybox}
+% \end{easybox}
% \end{ctexexam}
% \end{function}
%
@@ -785,7 +778,7 @@ The latest version of this license is in
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/23}{1.23z}{beta}
+\ProvidesExplClass{easybook}{2021/04/01}{1.24b}{beta}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -810,21 +803,21 @@ The latest version of this license is in
\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},
+ 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},
font .choice:,
font .value_required:n = true,
font/overleaf .code:n = {},
- font/adobe .code:n = {\__put_ctexbook:n {fontset = #1}},
- font/founder .code:n = {\__put_ctexbook:n {fontset = #1}},
- font/mac .code:n = {\__put_ctexbook:n {fontset = #1}},
- font/windows .code:n = {\__put_ctexbook:n {fontset = #1}},
- font/linux .code:n = {\__put_ctexbook:n {fontset = ubuntu}},
- font/none .code:n = {\__put_ctexbook:n {fontset = #1}},
+ font/adobe .code:n = \__put_ctexbook:n {fontset = #1},
+ font/founder .code:n = \__put_ctexbook:n {fontset = #1},
+ font/mac .code:n = \__put_ctexbook:n {fontset = #1},
+ font/windows .code:n = \__put_ctexbook:n {fontset = #1},
+ font/linux .code:n = \__put_ctexbook:n {fontset = ubuntu},
+ font/none .code:n = \__put_ctexbook:n {fontset = #1},
font/noto .code:n =
{
\bool_set_true:N \l__font_noto_bool
@@ -834,7 +827,7 @@ The latest version of this license is in
paper .choice:,
paper .value_required:n = true,
- paper/unknown .code:n = {\PassOptionsToPackage{#1}{geometry}},
+ paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
paper .initial:n = a4paper,
oneside .value_forbidden:n = true,
@@ -848,7 +841,7 @@ The latest version of this license is in
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__class_book_bool,
class .initial:n = book,
unknown .code:n =
@@ -891,7 +884,10 @@ The latest version of this license is in
geoset,hdrset,tocset
}
\seq_map_inline:Nn \c__options_path_seq
- {\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}}
+ {
+ \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,
@@ -907,7 +903,7 @@ The latest version of this license is in
withpart .initial:n = false,
notomath .bool_set:N = \l__notomath_bool,
notomath .default:n = true,
- notomath .initial:n = true,
+ notomath .initial:n = false,
rulewidth .dim_set:N = \l__rule_width_dim,
rulewidth .initial:n = 0.75pt,
uppercase .bool_set:N = \l__uppercase_bool,
@@ -945,7 +941,7 @@ The latest version of this license is in
pdfpages,graphicx,
fancyhdr,titletoc,
caption-light,subcaption,
- tabularx,multirow,makecell,booktabs,
+ tabularx,multirow,booktabs,
tasks,enumitem,
listings,
imakeidx
@@ -1392,7 +1388,7 @@ The latest version of this license is in
\fi
}{\tl_set:Nn \l__toc_type_tl{article}}
}
-\cs_new_protected:Npn \__ifmultoc_after_set:
+\cs_new_protected:Npn \__ifmultoc_post_set:
{
\bool_if:NTF \l__class_book_bool
{
@@ -1411,7 +1407,7 @@ The latest version of this license is in
\__title_mark:n {\contentsname}
\vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{toc}
- \__ifmultoc_after_set:
+ \__ifmultoc_post_set:
\group_end:
}
\RenewDocumentCommand{\listoffigures}{so}
@@ -1425,7 +1421,7 @@ The latest version of this license is in
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
\vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lof}
- \__ifmultoc_after_set:
+ \__ifmultoc_post_set:
\group_end:
}
\RenewDocumentCommand{\listoftables}{so}
@@ -1439,7 +1435,7 @@ The latest version of this license is in
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
\vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lot}
- \__ifmultoc_after_set:
+ \__ifmultoc_post_set:
\group_end:
}
\NewDocumentCommand{\listoflistings}{so}
@@ -1453,7 +1449,7 @@ The latest version of this license is in
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
\vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lol}
- \__ifmultoc_after_set:
+ \__ifmultoc_post_set:
\group_end:
}
@@ -1651,24 +1647,24 @@ The latest version of this license is in
{
\clist_map_inline:nn
{
- {theorem}{定理},
+ {example}{例},
{definition}{定义},
+ {theorem}{定理},
+ {proposition}{性质},
{lemma}{引理},
{corollary}{推论},
- {proposition}{性质},
- {example}{例},
{remark}{注},
{exercise}{练习}
}{\__thmname_set:nn #1}
}{
\clist_map_inline:nn
{
- {theorem}{Theorem},
+ {example}{Example},
{definition}{Definition},
+ {theorem}{Theorem},
+ {proposition}{Proposition},
{lemma}{Lemma},
{corollary}{Corollary},
- {proposition}{Proposition},
- {example}{Example},
{remark}{Remark},
{exercise}{Exercise}
}{\__thmname_set:nn #1}
@@ -1690,24 +1686,24 @@ The latest version of this license is in
thmbox .bool_set:N = \l__thmbox_bool,
thmbox .default:n = true,
thmbox .initial:n = false,
- numberwith .tl_set:N = \l__thm_numberwith_tl,
- numberwith .initial:n = {chapter},
- headpunct .tl_set:N = \l__thm_headpunct_tl,
- headpunct .initial:n = {},
+ within .tl_set:N = \l__thm_numberwith_tl,
+ within .initial:n = chapter,
bodyfont .tl_set:N = \l__thm_bodyfont_tl,
bodyfont .initial:n = {},
notefont .tl_set:N = \l__thm_notefont_tl,
notefont .initial:n = {},
headfont .tl_set:N = \l__thm_headfont_tl,
- headfont .initial:n = {\color{ctex@emph}\sffamily},
+ headfont .initial:n = \color{ctex@emph}\sffamily,
+ headpunct .tl_set:N = \l__thm_headpunct_tl,
+ headpunct .initial:n = {},
+ spacepost .tl_set:N = \l__thm_spacepost_tl,
+ spacepost .initial:n = \ccwd,
headindent .tl_set:N = \l__thm_headindent_tl,
- headindent .initial:n = {0\ccwd},
+ headindent .initial:n = 0\ccwd,
spaceabove .tl_set:N = \l__thm_spaceabove_tl,
- spaceabove .initial:n = {.75ex plus .1ex},
+ spaceabove .initial:n = .75ex plus .1ex,
spacebelow .tl_set:N = \l__thm_spacebelow_tl,
- spacebelow .initial:n = {.75ex plus .1ex},
- spacepost .tl_set:N = \l__thm_spacepost_tl,
- spacepost .initial:n = {\ccwd}
+ spacebelow .initial:n = .75ex plus .1ex
}
\ctex_at_end_preamble:n
{
@@ -1721,27 +1717,31 @@ The latest version of this license is in
bodyfont = \l__thm_bodyfont_tl,
headpunct = \l__thm_headpunct_tl,
postheadspace = \l__thm_spacepost_tl,
- numberwithin = \l__thm_numberwith_tl,
+ within = \l__thm_numberwith_tl,
headformat = \NAME\space\NUMBER\NOTE
- ]{mythm}
- \declaretheorem[style = mythm,name = \c__name_theorem_tl]{theorem}
- \declaretheorem[style = mythm,name = \c__name_definition_tl]{definition}
- \declaretheorem[style = mythm,name = \c__name_lemma_tl]{lemma}
- \declaretheorem[style = mythm,name = \c__name_corollary_tl]{corollary}
- \declaretheorem[style = mythm,name = \c__name_proposition_tl]{proposition}
- \declaretheorem[style = mythm,name = \c__name_example_tl]{example}
+ ]{easythm}
+ \clist_map_inline:nn
+ {
+ example,definition,theorem,
+ proposition,lemma,corollary
+ }{
+ \declaretheorem[
+ style = easythm,
+ name = \use:c {c__name_#1_tl}
+ ]{#1}
+ }
\cs_gset_eq:NN \proof\relax
- \declaretheorem{remark}[
- style = mythm,
+ \declaretheorem[
+ style = easythm,
name = \c__name_remark_tl,
numbered = no
- ]
- \declaretheorem{proof}[
- style = mythm,
+ ]{remark}
+ \declaretheorem[
+ style = easythm,
name = \proofname,
numbered = no,
qed = \qedsymbol
- ]
+ ]{proof}
}
\settasks
@@ -1891,7 +1891,7 @@ The latest version of this license is in
#6
\end{enumerate}
}{}
- \DeclareTColorBox{mybox}{sO{MintCream}d()O{}}
+ \DeclareTColorBox{easybox}{sO{MintCream}d()O{}}
{
enhanced~jigsaw,pad~at~break* = 3pt,
IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph},
@@ -1999,7 +1999,7 @@ The latest version of this license is in
{\__title_mark_intoc:n {\bibname}}
}
\exp_args:NV \bibliography\l__bib_file_tl
- \__ifmultoc_after_set:
+ \__ifmultoc_post_set:
\group_end:
}
}
@@ -2018,7 +2018,7 @@ The latest version of this license is in
{\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}}
\__put_biblatex:n {backend = biber}
}
-\cs_new_protected:Npn \__biblatex_after_set:
+\cs_new_protected:Npn \__biblatex_post_set:
{
\exp_args:NV \addbibresource\l__bib_file_tl
\cs_gset:Npn \blx@default@theheading{bibintoc}
@@ -2034,7 +2034,7 @@ The latest version of this license is in
}{
\__biblatex_pre_set:
\RequirePackage{biblatex}
- \__biblatex_after_set:
+ \__biblatex_post_set:
}
}
@@ -2071,9 +2071,29 @@ The latest version of this license is in
{
language = [LaTeX]TeX,
texcsstyle =
- *\lst@ifdisplaystyle\bfseries\color{ctex@verb}\else\color{ctex@verb}\fi,
+ {
+ *\lst@ifdisplaystyle
+ \bfseries\color{ctex@verb}
+ \else
+ \color{ctex@verb}
+ \fi
+ },
basicstyle =
- \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi,
+ {
+ \ttfamily\lst@ifdisplaystyle
+ \small
+ \else
+ \color{ctex@verb}
+ \fi
+ },
+ keywordstyle =
+ {
+ \lst@ifdisplaystyle
+ \bfseries\color{ctex@verb}
+ \else
+ \color{ctex@verb}
+ \fi
+ },
framexleftmargin = 0pt,
framexrightmargin = 0pt,
xleftmargin = 3pt,
@@ -2084,9 +2104,7 @@ The latest version of this license is in
rulecolor = \color{ctex@frame},
commentstyle = \color{gray},
emphstyle = \color{ctex@emph},
- emph = {caption,makecell,subcaption,tabularx},
- keywordstyle =
- \lst@ifdisplaystyle\bfseries\color{ctex@verb}\else\color{ctex@verb}\fi,
+ emph = {caption,multirow,subcaption,tabularx},
morekeywords =
{
includegraphics,setmainfont,setsansfont,setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont,setCJKfamilyfont,RequirePackage
@@ -2157,8 +2175,8 @@ The latest version of this license is in
{
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 = \__put_hyperref:n {colorlinks},
+ hyperlink/none .code:n = \__put_hyperref:n {hidelinks},
hyperlink .default:n = edge,
hyperlink .initial:n = edge,
@@ -2175,7 +2193,7 @@ The latest version of this license is in
linkcolor .initial:n = fresh,
linktopage .choice:,
- linktopage/true .code:n = {\__put_hyperref:n {linktocpage}},
+ linktopage/true .code:n = \__put_hyperref:n {linktocpage},
linktopage/false .code:n = {},
linktopage .default:n = true,
linktopage .initial:n = false
@@ -2187,7 +2205,7 @@ The latest version of this license is in
\clist_map_function:nN
{
{none, 000000,000000,000000},
- {seaside, 4682B4,004986,a40000},
+ {seaside, 4682B4,004986,2E8B57},
{energy, f39800,00a0e9,893895},
{cyberpunk, 601986,eb6877,a4005b}
}
@@ -2263,10 +2281,10 @@ The latest version of this license is in
pagestyle = empty,
number =
{\bool_if:NTF \l__zhtitle_bool{\chinese{part}}{\thepart}},
- format = {\color{ctex@frame}\sffamily\Huge},
+ format = \color{ctex@frame}\sffamily\Huge,
aftername =
{\bool_if:NTF \l__newline_bool{\par\nobreak}{\hspace{\ccwd}}},
- tocline = {\CTEXifname{\CTEXthepart\hspace{\ccwd}}{}#2}
+ tocline = \CTEXifname{\CTEXthepart\hspace{\ccwd}}{}#2
},
chapter =
{
@@ -2283,37 +2301,37 @@ The latest version of this license is in
\bool_if:NTF \l__newline_bool
{\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}
},
- beforeskip = {-1.5ex},
- afterskip = {3ex},
- lotskip = {0.8pc},
- lofskip = {0.8pc},
- tocline = {\CTEXifname{\CTEXthechapter\hspace{\ccwd}}{}#2}
+ beforeskip = -1.5ex,
+ afterskip = 3ex,
+ lotskip = 0.8pc,
+ lofskip = 0.8pc,
+ tocline = \CTEXifname{\CTEXthechapter\hspace{\ccwd}}{}#2
},
section =
{
hang = true,
- format = {\color{ctex@frame}\sffamily\Large},
- aftername = {\hspace{0.5\ccwd}},
- beforeskip = {1.5ex plus .2ex minus .1ex},
- afterskip = {1.5ex plus .2ex minus .1ex},
- tocline = {\CTEXifname{\CTEXthesection\hspace{\ccwd}}{}#2}
+ format = \color{ctex@frame}\sffamily\Large,
+ aftername = \hspace{0.5\ccwd},
+ beforeskip = 1.5ex plus .2ex minus .1ex,
+ afterskip = 1.5ex plus .2ex minus .1ex,
+ tocline = \CTEXifname{\CTEXthesection\hspace{\ccwd}}{}#2
},
subsection =
{
hang = true,
- format = {\color{ctex@frame}\sffamily\large},
- aftername = {\hspace{0.5\ccwd}},
- beforeskip = {1.3ex plus .2ex minus .1ex},
- afterskip = {1.3ex plus .2ex minus .1ex},
- tocline = {\CTEXifname{\CTEXthesubsection\hspace{\ccwd}}{}#2}
+ format = \color{ctex@frame}\sffamily\large,
+ aftername = \hspace{0.5\ccwd},
+ beforeskip = 1.3ex plus .2ex minus .1ex,
+ afterskip = 1.3ex plus .2ex minus .1ex,
+ tocline = \CTEXifname{\CTEXthesubsection\hspace{\ccwd}}{}#2
},
subsubsection =
{
hang = true,
- format = {\color{ctex@frame}\sffamily},
- aftername = {\hspace{0.5\ccwd}},
- beforeskip = {\parskip},
- afterskip = {\parskip}
+ format = \color{ctex@frame}\sffamily,
+ aftername = \hspace{0.5\ccwd},
+ beforeskip = \parskip,
+ afterskip = \parskip
}
}