summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-19 21:27:11 +0000
committerKarl Berry <karl@freefriends.org>2021-03-19 21:27:11 +0000
commit851304f3d24cb5dc6e079b2a9be566bce054ab2b (patch)
treeca950f673e0139de4e3e67d9f12bd35e8efa75c6
parent739b02ea0fe14b3d8a4b99bcdd89b55c940a8698 (diff)
easybook (19mar21)
git-svn-id: svn://tug.org/texlive/trunk@58538 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/easybook/chapter2.tex4
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook-demo.pdfbin268534 -> 262611 bytes
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook-demo.tex8
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook.pdfbin257018 -> 258261 bytes
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx359
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls259
6 files changed, 323 insertions, 307 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/chapter2.tex b/Master/texmf-dist/doc/latex/easybook/chapter2.tex
index 4cf3e8113c3..5b42327bd11 100644
--- a/Master/texmf-dist/doc/latex/easybook/chapter2.tex
+++ b/Master/texmf-dist/doc/latex/easybook/chapter2.tex
@@ -58,7 +58,7 @@ The Stokes formula is an extension of the basic calculus formula in the case of
这是一个证明,末尾自动添加证明结束符。
\end{proof}
-\begin{mybox}*[My title][MintCream]
+\begin{mybox}*[MintCream](My title)
\index{z@自定义盒子}
\zhlipsum*[3][name = aspirin]
\tcblower
@@ -66,7 +66,7 @@ The Stokes formula is an extension of the basic calculus formula in the case of
\end{mybox}
\zhlipsum*[3][name = aspirin]
-\begin{exercise}[LightYellow][1.][习题]
+\begin{exercise}[LightYellow][1.](习题)
\index{x@习题环境}
\item 设$w = f(x + y + z,xyz)$,$f$具有二阶连续偏导数,求$\dfrac{{\partial w}}{{\partial x}}$和$\dfrac{{{\partial ^2}w}}{{\partial x\partial z}}$。
\item 已知$y = y(x)$在任意点$x$处的增量$\Delta y = \dfrac{y\Delta x}{1 + x^2} + \alpha$,其中$\alpha$是$\Delta x$的高阶无穷小($\Delta x\to 0$时),$y(0) = \pi$,则$y(1) = \uline{\mbox{\hspace{2em}}}$。
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
index 294969ee653..1be2e7f933d 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 616abff2815..867240ca0c3 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
+++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
@@ -44,7 +44,7 @@
thmset =
{
thmbox = true,
- numberwith = {chapter},
+ numberwith = chapter,
bodyfont = \normalfont,
headpunct = {.}
},
@@ -77,7 +77,7 @@
{
format = \addvspace{1pc}\sffamily\large,
indent = 0\ccwd,
- rule = \tocrule[0.7pc][1.2]{$\cdot$}[\bfseries]
+ rule = \tocrule[0.7pc](1.2){$\cdot$}[\bfseries]
}
},
bibset =
@@ -89,6 +89,8 @@
% tocdepth = 2
}
+\usepackage{zhlipsum,bicaption,tcolorbox}
+
\begin{document}
\title{\sffamily easybook书籍文档类}
\author
@@ -97,7 +99,7 @@
\url{https://latexstudio.net} \\
\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/03/18\hskip\ccwd\relax v1.23u}
+\date{2021/03/19\hskip\ccwd\relax v1.23v}
\frontmatter[roman]
\maketitle
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf
index 9346232eb78..dc22bed42de 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 e894992e1a5..7269f8bcd5c 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -51,7 +51,7 @@ The latest version of this license is in
%
% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.23u}{2021/03/18}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
+% \changes{v1.23v}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
%
% \CheckSum{0}
%
@@ -73,7 +73,7 @@ The latest version of this license is in
%
% \title{\sffamily easybook书籍文档类}
% \author{瞿毅}
-% \date{2021/03/18\hskip\ccwd\relax v1.23u\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/03/19\hskip\ccwd\relax v1.23v\thanks{\url{https://gitee.com/texl3/easybook}}}
% \maketitle
% \begin{abstract}
% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
@@ -85,8 +85,7 @@ The latest version of this license is in
% 模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
% \begin{itemize}
% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
-% \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
-% \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
+% \item 由于用到了一些宏包较新的功能,建议安装最新的\TeX 发行版并将所有宏包升级为最新,目前在 \hologo{MiKTeX} 21.2和 \TeX Live 2020可以正常编译。
% \end{itemize}
%
% \subsection{编译步骤}
@@ -123,7 +122,7 @@ The latest version of this license is in
% \end{itemize}
%
% \begin{function}[rEXP,added = 2021-01-05]{draft}
-% 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
+% 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不载入 \pkg{tcolorbox} 宏包支持盒子环境也会提高编译速度,详情见小节 \ref{subsec:box}。
% \end{function}
%
% \begin{function}[rEXP,added = 2021-01-05]{newline}
@@ -165,7 +164,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.23u}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
+% \changes{v1.23v}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
% \end{function}
%
% \subsection{文档命令}
@@ -181,7 +180,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.23u}{2021/02/20}{重新定义文档结构划分命令。}
+% \changes{v1.23v}{2021/02/20}{重新定义文档结构划分命令。}
% \end{function}
%
% \begin{function}{multoc,book,article}
@@ -189,7 +188,7 @@ 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.23u}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
+% \changes{v1.23v}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
% \end{function}
%
% \section{接口选项}
@@ -226,9 +225,9 @@ The latest version of this license is in
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{style/...}
% \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-% \changes{v1.23u}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-% \changes{v1.23u}{2021/02/09}{增加控制页面横线粗细的选项。}
-% \changes{v1.23u}{2021/03/15}{增加控制编号连接符的选项。}
+% \changes{v1.23v}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+% \changes{v1.23v}{2021/02/09}{增加控制页面横线粗细的选项。}
+% \changes{v1.23v}{2021/03/15}{增加控制编号连接符的选项。}
% \end{function}
%
% \begin{optdesc}
@@ -290,7 +289,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.23u}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+% \changes{v1.23v}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
% \end{function}
%
% \begin{optdesc}
@@ -302,17 +301,17 @@ The latest version of this license is in
% \end{optdesc}
%
% \subsection{其它字体}
-% \begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{table-cap,figure-cap,listing-cap,footnote,marginpart}
+% \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}>
% figure-cap = <\tn{sffamily}\tn{small}>
% listing-cap = <\tn{sffamily}\tn{small}>
% footnote = <\tn{rmfamily}>
-% marginpart = <\tn{rmfamily}\tn{footnotesize}>
+% marginpar = <\tn{rmfamily}\tn{footnotesize}>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{elsefont/...}
% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-% \changes{v1.23u}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+% \changes{v1.23v}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
% \end{function}
%
% \begin{optdesc}
@@ -333,7 +332,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.23u}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+% \changes{v1.23v}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
% \end{function}
%
% \begin{optdesc}
@@ -377,7 +376,7 @@ The latest version of this license is in
% \end{function}
%
% \begin{optdesc}
-% \item[thmbox] 开启定理及习题环境的盒子边框。
+% \item[thmbox] 开启定理及习题环境的盒子边框,需载入 \pkg{tcolorbox} 宏包才生效。
% \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
% \item[headpunct] 定理标题末尾后的标记,在换行符或第一段内容的间隔之前。
% \item[bodyfont] 定理内容部分的字体。
@@ -395,7 +394,7 @@ The latest version of this license is in
% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
% \end{syntax}
% 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
-% \changes{v1.23u}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+% \changes{v1.23v}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -463,8 +462,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.23u}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-% \changes{v1.23u}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+% \changes{v1.23v}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+% \changes{v1.23v}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
% \end{function}
%
% \begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
@@ -516,7 +515,7 @@ The latest version of this license is in
%
% \begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
% \begin{syntax}
-% \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
+% \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\parg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
% \end{syntax}
% \tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
% \begin{ctexexam}
@@ -528,7 +527,7 @@ The latest version of this license is in
% {
% format = \addvspace{8pt}\large,
% indent = 1.5\ccwd,
-% rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
+% rule = \tocrule[0.6pc](1.1){.}[\zihao{5}]
% }
% }
% }
@@ -544,7 +543,7 @@ The latest version of this license is in
% \tn{item} <行间公式>
% \tn{end}\marg{环境名}
% \end{syntax}
-% \opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
+% \pkg{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\env{multline} 环境用于一行无法放下的长公式,\env{gather} 环境用于每行居中的公式组,\env{align} 环境用于多列对齐的公式组。
% \end{function}
%
% \subsection{列表}
@@ -554,7 +553,7 @@ The latest version of this license is in
% \tn{item} <列表内容>
% \tn{end}\marg{环境名}
% \end{syntax}
-% \pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \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]
@@ -564,14 +563,14 @@ The latest version of this license is in
%
% \subsubsection{排序列表}
% \label{subsec:sort list}
-% 使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
+% 使用 \opt{enumerate} 环境可创建排序列表,使用 \env{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \env{enumerate} 与 \env{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
% \begin{ctexexam}
% \begin{enumerate*}[(a)]
% \begin{enumerate}[\bfseries{Item} I]
% \end{ctexexam}
%
% \subsubsection{常规列表}
-% 使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
+% 使用 \env{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
%
% 用$\star$取代默认的符号
% \begin{ctexexam}
@@ -580,7 +579,7 @@ The latest version of this license is in
% \end{ctexexam}
%
% \subsubsection{主题列表}
-% 使用 \opt{description} 环境可创建带有主题词的列表。
+% 使用 \env{description} 环境可创建带有主题词的列表。
% \begin{ctexexam}
% \begin{description}
% \item[主题一] 内容一
@@ -609,35 +608,36 @@ The latest version of this license is in
%
% \subsection{习题}
% \label{subsec:exercise}
-% \begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{exercise}
% \begin{syntax}
-% \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
+% \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}
% \tn{item} <习题内容>
% \tn{end}\marg{exercise}
% \end{syntax}
-% 习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
+% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要。注意,环境具有相同定界符的可选参数只能\textbf{从右往左}省略,省略的参数使用默认值。
% \begin{ctexexam}
-% \begin{exercise}[LightYellow][1.][习题]
+% \begin{exercise}[LightYellow][1.](习题)
% \item 习题内容
% \item 习题内容
% \end{exercise}
% \end{ctexexam}
-% \changes{v1.23u}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+% \changes{v1.23v}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
% \end{function}
%
% \subsection{盒子}
-% 盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
+% \label{subsec:box}
+% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包,它们的配置的选项同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
%
% \subsubsection{摘要盒子}
-% \begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{outline}
% \begin{syntax}
-% \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
+% \tn{begin}\marg{outline}\parg{标题名称}\oarg{配置选项}
% \tn{item} <摘要内容>
% \tn{end}\marg{outline}
% \end{syntax}
% 摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
% \begin{ctexexam}
-% \begin{outline}[标题名称]
+% \begin{outline}(标题名称)
% \item 摘要内容
% \item 摘要内容
% \end{outline}
@@ -645,15 +645,15 @@ The latest version of this license is in
% \end{function}
%
% \subsubsection{段落盒子}
-% \begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{mybox}
% \begin{syntax}
-% \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
+% \tn{begin}\marg{mybox}\oarg{颜色名|(MintCream)}\parg{段落标题}\oarg{配置选项}
% <盒子内容>
% \tn{end}\marg{mybox}
% \end{syntax}
% 环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
% \begin{ctexexam}
-% \begin{mybox}*[段落标题][MintCream]
+% \begin{mybox}*[MintCream](段落标题)
% 盒子内容
% \tcblower % 盒子上下部分分界线
% 盒子内容
@@ -706,7 +706,7 @@ The latest version of this license is in
% \tn{ch}\oarg{选项}\marg{输入}
% \tn{chemfig}\oarg{键值列表}\marg{分子代码}
% \end{syntax}
-% 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
+% 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐在导言区载入 \pkg{chemfig} 宏包,使用\tn{chemfig} 命令完成。
% \end{function}
%
% \subsection{引用}
@@ -747,22 +747,22 @@ The latest version of this license is in
% 命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
% \end{function}
%
-% \subsection{插入文档}
-% \begin{function}[added = 2021-03-14]{\includepdf}
+% \subsection{双语标题}
+% \begin{function}[added = 2021-03-19]{\bicaption,\bicaptionbox}
% \begin{syntax}
-% \tn{includepdf}\oarg{键值列表}\marg{文档名}
+% \tn{bicaption}\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2}
+% \tn{bicaptionbox}\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2}
+% \oarg{宽度}\oarg{内部位置}\marg{内容}
% \end{syntax}
-% 该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
+% 可以实现中英文双语标题,使用此功能需要在导言区载入 \pkg{bicaption} 宏包,具体用法见说明文档。
% \end{function}
%
-% \subsection{横向页面}
-% \begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
+% \subsection{插入文档}
+% \begin{function}[added = 2021-03-14]{\includepdf}
% \begin{syntax}
-% \tn{begin}\marg{环境名}\oarg{位置}
-% <插入图片或表格>
-% \tn{end}\marg{环境名}
+% \tn{includepdf}\oarg{键值列表}\marg{文档名}
% \end{syntax}
-% 该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
+% 该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
% \end{function}
%
% \subsection{指定行距的段落}
@@ -780,7 +780,7 @@ The latest version of this license is in
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/18}{1.23u}{}
+\ProvidesExplClass{easybook}{2021/03/19}{1.23v}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -863,7 +863,7 @@ The latest version of this license is in
{normalem}{ulem},
{protrusion = false}{microtype},
{shortlabels,inline}{enumitem},
- {most}{tcolorbox},
+ {many}{tcolorbox},
{xindy}{imakeidx},
{CJKmath = true}{xeCJK},
{no-math}{fontspec},
@@ -932,18 +932,17 @@ The latest version of this license is in
\RequirePackage
{
xcolor,
- pdfpages,
footmisc,setspace,
amsmath,amsthm,thmtools,cases,
chemformula,siunitx,ulem,
geometry,marginnote,nccfoots,
- rotfloat,graphicx,
+ pdfpages,graphicx,
fancyhdr,titletoc,
- caption,bicaption,subcaption,
- microtype,zhlipsum,pifont,
+ caption-light,subcaption,
+ pifont,microtype,
tabularx,multirow,makecell,booktabs,
- paralist,tasks,enumitem,
- tcolorbox,
+ tasks,enumitem,
+ listings,
imakeidx
}
\ctex_at_end_preamble:n
@@ -1089,7 +1088,6 @@ The latest version of this license is in
}
\cs_gset_eq:NN \easyhead\fancyhead
\cs_gset_eq:NN \easyfoot\fancyfoot
-\cs_gset_eq:NN \easypagestyle\fancypagestyle
\__ctex_define:nn {hdrset}
{
head-foot .tl_set:N = \l__fancyhf_content_tl,
@@ -1243,7 +1241,7 @@ The latest version of this license is in
belowoffset .initial:n = -1pc
}
-\NewDocumentCommand{\tocrule}{O{0.7pc}O{1.2}mO{}}
+\NewDocumentCommand{\tocrule}{O{0.7pc}D(){1.2}mO{}}
{
\normalsize\normalfont
\titlerule*[#1]{\scalebox{#2}{#3}}#4\contentspage
@@ -1342,8 +1340,7 @@ The latest version of this license is in
{
\if@twocolumn
\@restonecoltrue
- \onecolumn
- \bool_if:NT \l__multoc_bool{\twocolumn}
+ \bool_if:NTF \l__multoc_bool{\twocolumn}{\onecolumn}
\else
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
@@ -1476,8 +1473,11 @@ The latest version of this license is in
font += figure@font,
belowskip = 2pt,aboveskip = 6pt
}
-\captionsetup[figure][bi-second]{name = Figure}
-\captionsetup[table][bi-second]{name = Table}
+\ctex_at_end_package:nn {bicaption}
+ {
+ \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
{
@@ -1571,7 +1571,14 @@ The latest version of this license is in
\setlist
{
labelsep = .75\ccwd,listparindent = 2\ccwd,
- itemsep = .75ex plus .1ex,parsep = 0ex,topsep = .75ex plus .1ex,partopsep = 0ex
+ 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 = *}
@@ -1583,13 +1590,6 @@ The latest version of this license is in
{label = \color{ctex@emph}(\alph*),ref = \theenumi(\alph*),leftmargin = *}
\setlist[description]
{font = \color{ctex@emph}\sf,labelwidth = *,leftmargin = 2\ccwd}
-\newlist{outlinelist}{itemize}{1}
-\setlist[outlinelist]
- {label = \color{ctex@emph}\upshape\ding{111},itemsep = .5ex plus .1ex,leftmargin = *}
-\skip_set:Nn \pltopsep{.75ex plus .1ex}
-\skip_set:Nn \plpartopsep{0ex}
-\skip_set:Nn \plitemsep{.75ex plus .1ex}
-\skip_set:Nn \plparsep{0ex}
\cs_new_protected:Npn \__thmname_set:nn #1#2
{\tl_const:cn {c__name_#1_tl}{#2}}
@@ -1754,123 +1754,130 @@ The latest version of this license is in
\cs_gset:Npn \tagform@#1
{\maketag@@@{\color{ctex@emph}(\ignorespaces#1\unskip\@@italiccorr)}}
-\tcbset
+\ctex_at_end_package:nn {tcolorbox}
{
- thmsty/.style =
+ \tcbset
+ {
+ thmsty/.style =
+ {
+ enhanced~jigsaw,pad~at~break* = 3pt,
+ opacityback = 0,
+ colframe = ctex@emph,
+ left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
+ arc = 0pt
+ },
+ outlinesty/.style =
+ {
+ enhanced,nofloat,
+ tikznode~boxed~title,
+ interior~style = white,colframe = ctex@emph,
+ colbacktitle = white,coltitle = ctex@emph,
+ fonttitle = \large\sffamily,fontupper = \itshape,
+ boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
+ attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
+ arc = 3pt,
+ after~skip = 3ex,
+ left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc,
+ boxsep = 5pt
+ },
+ exersty/.style =
+ {
+ enhanced,on~line,
+ arc = 5pt,
+ fontupper = \sffamily\Large,
+ boxrule = 1pt,boxsep = 0pt,
+ left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
+ before~skip = 4ex,after~skip = 2.25ex
+ },
+ breakable,
+ boxrule = \l__rule_width_dim
+ }
+ \NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
+ {
+ \begin{tcolorbox}[outlinesty,title = #1,IfValueT = {#2}{#2}]
+ \begin{outlinelist}
+ #3
+ \end{outlinelist}
+ \end{tcolorbox}
+ }{}
+ \NewDocumentEnvironment{exercise}
+ {sO{LightYellow}O{1.}D(){\c__name_exercise_tl}o+b}
+ {
+ \begin{center}
+ \bool_if:NTF \l__thmbox_bool
+ {
+ \tcbox[
+ exersty,
+ colback = #2,colframe = black,
+ drop~fuzzy~shadow = #2,
+ IfValueT = {#5}{#5},
+ phantom =
+ \IfBooleanF{#1}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ }
+ ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
+ }{
+ \sffamily\Large
+ \IfBooleanF{#1}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ \CTEXthesection\hspace{0.5\ccwd}
+ }#4
+ }
+ \end{center}
+ \begin{enumerate}[#3,labelsep = 0.5\ccwd]
+ #6
+ \end{enumerate}
+ }{}
+ \DeclareTColorBox{mybox}{sO{MintCream}d()O{}}
{
enhanced~jigsaw,pad~at~break* = 3pt,
- opacityback = 0,
- colframe = ctex@emph,
+ IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph},
+ IfValueT = {#3}{title = #3},
+ coltitle = black,colbacktitle = white,
+ fonttitle = \sffamily,
left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
- arc = 0pt
- },
- outlinesty/.style =
+ arc = 0pt,
+ toptitle = 2pt,bottomtitle = 2pt,
+ beforeafter~skip=2ex,
+ halign~upper = left,halign~lower = left,
+ center~title,#4
+ }
+ \DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
{
- enhanced,nofloat,
- tikznode~boxed~title,
- interior~style = white,colframe = ctex@emph,
- colbacktitle = white,coltitle = ctex@emph,
- fonttitle = \large\sffamily,fontupper = \itshape,
- boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
- attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
- arc = 3pt,
- after~skip = 3ex,
- left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc,
- boxsep = 5pt
- },
- exersty/.style =
+ nobeforeafter,tcbox~raise~base,
+ blank,fuzzy~halo = 2pt~with~#1,#3
+ }{#2}
+ \DeclareTotalTCBox{\concise}{O{Aqua}vO{}}
{
- enhanced,on~line,
- arc = 5pt,
- fontupper = \sffamily\Large,
- boxrule = 1pt,boxsep = 0pt,
- left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
- before~skip = 4ex,after~skip = 2.25ex
- },
- breakable,
- boxrule = \l__rule_width_dim
+ nobeforeafter,tcbox~raise~base,
+ top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
+ boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
+ colback = #1!15!white,#3
+ }{#2}
}
\ctex_at_end_preamble:n
{
\bool_if:NT \l__thmbox_bool
{
- \tcolorboxenvironment{theorem}{thmsty}
- \tcolorboxenvironment{definition}{thmsty}
- \tcolorboxenvironment{lemma}{thmsty}
- \tcolorboxenvironment{corollary}{thmsty}
- \tcolorboxenvironment{proposition}{thmsty}
- \tcolorboxenvironment{example}{thmsty}
+ \@ifpackageloaded{tcolorbox}
+ {
+ \tcolorboxenvironment{theorem}{thmsty}
+ \tcolorboxenvironment{definition}{thmsty}
+ \tcolorboxenvironment{lemma}{thmsty}
+ \tcolorboxenvironment{corollary}{thmsty}
+ \tcolorboxenvironment{proposition}{thmsty}
+ \tcolorboxenvironment{example}{thmsty}
+ }{}
}
}
-\NewDocumentEnvironment{outline}{O{\abstractname}o}
- {
- \begin{tcolorbox}[outlinesty,title = #1,IfValueT = {#2}{#2}]
- \begin{outlinelist}
- }{
- \end{outlinelist}
- \end{tcolorbox}
- }
-\NewDocumentEnvironment{exercise}{sO{LightYellow}O{1.}O{\c__name_exercise_tl}o}
- {
- \begin{center}
- \bool_if:NTF \l__thmbox_bool
- {
- \tcbox[
- exersty,
- colback = #2,colframe = black,
- drop~fuzzy~shadow = #2,
- IfValueT = {#5}{#5},
- phantom =
- \IfBooleanF{#1}
- {
- \CTEX@ifnametrue
- \refstepcounter{section}
- \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
- \CTEX@addtocline{section}{#4}
- }
- ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
- }{
- \sffamily\Large
- \IfBooleanF{#1}
- {
- \CTEX@ifnametrue
- \refstepcounter{section}
- \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
- \CTEX@addtocline{section}{#4}
- \CTEXthesection\hspace{0.5\ccwd}
- }#4
- }
- \end{center}
- \begin{compactenum}[#3]
- }{
- \end{compactenum}
- }
-\DeclareTColorBox{mybox}{soO{MintCream}O{}}
- {
- enhanced~jigsaw,pad~at~break* = 3pt,
- IfBooleanTF = {#1}{colback = #3}{opacityback = 0,colframe = ctex@emph},
- IfValueT = {#2}{title = #2},
- coltitle = black,colbacktitle = white,
- fonttitle = \sffamily,
- left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
- arc = 0pt,
- toptitle = 2pt,bottomtitle = 2pt,
- beforeafter~skip=2ex,
- halign~upper = left,halign~lower = left,
- center~title,#4
- }
-\DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
- {
- nobeforeafter,tcbox~raise~base,
- blank,fuzzy~halo = 2pt~with~#1,#3
- }{#2}
-\DeclareTotalTCBox{\concise}{O{Aqua}vO{}}
- {
- nobeforeafter,tcbox~raise~base,
- top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
- boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
- colback = #1!15!white,#3
- }{#2}
\bool_set_true:N \l__backend_bibtex_bool
\tl_new:N \l__bib_style_tl
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 2802bf40edd..fff5697b188 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -13,7 +13,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/18}{1.23u}{}
+\ProvidesExplClass{easybook}{2021/03/19}{1.23v}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -96,7 +96,7 @@
{normalem}{ulem},
{protrusion = false}{microtype},
{shortlabels,inline}{enumitem},
- {most}{tcolorbox},
+ {many}{tcolorbox},
{xindy}{imakeidx},
{CJKmath = true}{xeCJK},
{no-math}{fontspec},
@@ -165,18 +165,17 @@
\RequirePackage
{
xcolor,
- pdfpages,
footmisc,setspace,
amsmath,amsthm,thmtools,cases,
chemformula,siunitx,ulem,
geometry,marginnote,nccfoots,
- rotfloat,graphicx,
+ pdfpages,graphicx,
fancyhdr,titletoc,
- caption,bicaption,subcaption,
- microtype,zhlipsum,pifont,
+ caption-light,subcaption,
+ pifont,microtype,
tabularx,multirow,makecell,booktabs,
- paralist,tasks,enumitem,
- tcolorbox,
+ tasks,enumitem,
+ listings,
imakeidx
}
\ctex_at_end_preamble:n
@@ -322,7 +321,6 @@
}
\cs_gset_eq:NN \easyhead\fancyhead
\cs_gset_eq:NN \easyfoot\fancyfoot
-\cs_gset_eq:NN \easypagestyle\fancypagestyle
\__ctex_define:nn {hdrset}
{
head-foot .tl_set:N = \l__fancyhf_content_tl,
@@ -476,7 +474,7 @@
belowoffset .initial:n = -1pc
}
-\NewDocumentCommand{\tocrule}{O{0.7pc}O{1.2}mO{}}
+\NewDocumentCommand{\tocrule}{O{0.7pc}D(){1.2}mO{}}
{
\normalsize\normalfont
\titlerule*[#1]{\scalebox{#2}{#3}}#4\contentspage
@@ -575,8 +573,7 @@
{
\if@twocolumn
\@restonecoltrue
- \onecolumn
- \bool_if:NT \l__multoc_bool{\twocolumn}
+ \bool_if:NTF \l__multoc_bool{\twocolumn}{\onecolumn}
\else
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
@@ -709,8 +706,11 @@
font += figure@font,
belowskip = 2pt,aboveskip = 6pt
}
-\captionsetup[figure][bi-second]{name = Figure}
-\captionsetup[table][bi-second]{name = Table}
+\ctex_at_end_package:nn {bicaption}
+ {
+ \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
{
@@ -804,7 +804,14 @@
\setlist
{
labelsep = .75\ccwd,listparindent = 2\ccwd,
- itemsep = .75ex plus .1ex,parsep = 0ex,topsep = .75ex plus .1ex,partopsep = 0ex
+ 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 = *}
@@ -816,13 +823,6 @@
{label = \color{ctex@emph}(\alph*),ref = \theenumi(\alph*),leftmargin = *}
\setlist[description]
{font = \color{ctex@emph}\sf,labelwidth = *,leftmargin = 2\ccwd}
-\newlist{outlinelist}{itemize}{1}
-\setlist[outlinelist]
- {label = \color{ctex@emph}\upshape\ding{111},itemsep = .5ex plus .1ex,leftmargin = *}
-\skip_set:Nn \pltopsep{.75ex plus .1ex}
-\skip_set:Nn \plpartopsep{0ex}
-\skip_set:Nn \plitemsep{.75ex plus .1ex}
-\skip_set:Nn \plparsep{0ex}
\cs_new_protected:Npn \__thmname_set:nn #1#2
{\tl_const:cn {c__name_#1_tl}{#2}}
@@ -987,123 +987,130 @@
\cs_gset:Npn \tagform@#1
{\maketag@@@{\color{ctex@emph}(\ignorespaces#1\unskip\@@italiccorr)}}
-\tcbset
+\ctex_at_end_package:nn {tcolorbox}
{
- thmsty/.style =
+ \tcbset
+ {
+ thmsty/.style =
+ {
+ enhanced~jigsaw,pad~at~break* = 3pt,
+ opacityback = 0,
+ colframe = ctex@emph,
+ left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
+ arc = 0pt
+ },
+ outlinesty/.style =
+ {
+ enhanced,nofloat,
+ tikznode~boxed~title,
+ interior~style = white,colframe = ctex@emph,
+ colbacktitle = white,coltitle = ctex@emph,
+ fonttitle = \large\sffamily,fontupper = \itshape,
+ boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
+ attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
+ arc = 3pt,
+ after~skip = 3ex,
+ left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc,
+ boxsep = 5pt
+ },
+ exersty/.style =
+ {
+ enhanced,on~line,
+ arc = 5pt,
+ fontupper = \sffamily\Large,
+ boxrule = 1pt,boxsep = 0pt,
+ left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
+ before~skip = 4ex,after~skip = 2.25ex
+ },
+ breakable,
+ boxrule = \l__rule_width_dim
+ }
+ \NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
+ {
+ \begin{tcolorbox}[outlinesty,title = #1,IfValueT = {#2}{#2}]
+ \begin{outlinelist}
+ #3
+ \end{outlinelist}
+ \end{tcolorbox}
+ }{}
+ \NewDocumentEnvironment{exercise}
+ {sO{LightYellow}O{1.}D(){\c__name_exercise_tl}o+b}
+ {
+ \begin{center}
+ \bool_if:NTF \l__thmbox_bool
+ {
+ \tcbox[
+ exersty,
+ colback = #2,colframe = black,
+ drop~fuzzy~shadow = #2,
+ IfValueT = {#5}{#5},
+ phantom =
+ \IfBooleanF{#1}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ }
+ ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
+ }{
+ \sffamily\Large
+ \IfBooleanF{#1}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ \CTEXthesection\hspace{0.5\ccwd}
+ }#4
+ }
+ \end{center}
+ \begin{enumerate}[#3,labelsep = 0.5\ccwd]
+ #6
+ \end{enumerate}
+ }{}
+ \DeclareTColorBox{mybox}{sO{MintCream}d()O{}}
{
enhanced~jigsaw,pad~at~break* = 3pt,
- opacityback = 0,
- colframe = ctex@emph,
+ IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph},
+ IfValueT = {#3}{title = #3},
+ coltitle = black,colbacktitle = white,
+ fonttitle = \sffamily,
left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
- arc = 0pt
- },
- outlinesty/.style =
+ arc = 0pt,
+ toptitle = 2pt,bottomtitle = 2pt,
+ beforeafter~skip=2ex,
+ halign~upper = left,halign~lower = left,
+ center~title,#4
+ }
+ \DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
{
- enhanced,nofloat,
- tikznode~boxed~title,
- interior~style = white,colframe = ctex@emph,
- colbacktitle = white,coltitle = ctex@emph,
- fonttitle = \large\sffamily,fontupper = \itshape,
- boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
- attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
- arc = 3pt,
- after~skip = 3ex,
- left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc,
- boxsep = 5pt
- },
- exersty/.style =
+ nobeforeafter,tcbox~raise~base,
+ blank,fuzzy~halo = 2pt~with~#1,#3
+ }{#2}
+ \DeclareTotalTCBox{\concise}{O{Aqua}vO{}}
{
- enhanced,on~line,
- arc = 5pt,
- fontupper = \sffamily\Large,
- boxrule = 1pt,boxsep = 0pt,
- left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
- before~skip = 4ex,after~skip = 2.25ex
- },
- breakable,
- boxrule = \l__rule_width_dim
+ nobeforeafter,tcbox~raise~base,
+ top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
+ boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
+ colback = #1!15!white,#3
+ }{#2}
}
\ctex_at_end_preamble:n
{
\bool_if:NT \l__thmbox_bool
{
- \tcolorboxenvironment{theorem}{thmsty}
- \tcolorboxenvironment{definition}{thmsty}
- \tcolorboxenvironment{lemma}{thmsty}
- \tcolorboxenvironment{corollary}{thmsty}
- \tcolorboxenvironment{proposition}{thmsty}
- \tcolorboxenvironment{example}{thmsty}
+ \@ifpackageloaded{tcolorbox}
+ {
+ \tcolorboxenvironment{theorem}{thmsty}
+ \tcolorboxenvironment{definition}{thmsty}
+ \tcolorboxenvironment{lemma}{thmsty}
+ \tcolorboxenvironment{corollary}{thmsty}
+ \tcolorboxenvironment{proposition}{thmsty}
+ \tcolorboxenvironment{example}{thmsty}
+ }{}
}
}
-\NewDocumentEnvironment{outline}{O{\abstractname}o}
- {
- \begin{tcolorbox}[outlinesty,title = #1,IfValueT = {#2}{#2}]
- \begin{outlinelist}
- }{
- \end{outlinelist}
- \end{tcolorbox}
- }
-\NewDocumentEnvironment{exercise}{sO{LightYellow}O{1.}O{\c__name_exercise_tl}o}
- {
- \begin{center}
- \bool_if:NTF \l__thmbox_bool
- {
- \tcbox[
- exersty,
- colback = #2,colframe = black,
- drop~fuzzy~shadow = #2,
- IfValueT = {#5}{#5},
- phantom =
- \IfBooleanF{#1}
- {
- \CTEX@ifnametrue
- \refstepcounter{section}
- \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
- \CTEX@addtocline{section}{#4}
- }
- ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
- }{
- \sffamily\Large
- \IfBooleanF{#1}
- {
- \CTEX@ifnametrue
- \refstepcounter{section}
- \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
- \CTEX@addtocline{section}{#4}
- \CTEXthesection\hspace{0.5\ccwd}
- }#4
- }
- \end{center}
- \begin{compactenum}[#3]
- }{
- \end{compactenum}
- }
-\DeclareTColorBox{mybox}{soO{MintCream}O{}}
- {
- enhanced~jigsaw,pad~at~break* = 3pt,
- IfBooleanTF = {#1}{colback = #3}{opacityback = 0,colframe = ctex@emph},
- IfValueT = {#2}{title = #2},
- coltitle = black,colbacktitle = white,
- fonttitle = \sffamily,
- left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
- arc = 0pt,
- toptitle = 2pt,bottomtitle = 2pt,
- beforeafter~skip=2ex,
- halign~upper = left,halign~lower = left,
- center~title,#4
- }
-\DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
- {
- nobeforeafter,tcbox~raise~base,
- blank,fuzzy~halo = 2pt~with~#1,#3
- }{#2}
-\DeclareTotalTCBox{\concise}{O{Aqua}vO{}}
- {
- nobeforeafter,tcbox~raise~base,
- top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
- boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
- colback = #1!15!white,#3
- }{#2}
\bool_set_true:N \l__backend_bibtex_bool
\tl_new:N \l__bib_style_tl