From cef58753eba8ad7e2071195dbd92454febe82d32 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 27 Jul 2021 03:01:57 +0000 Subject: CTAN sync 202107270301 --- macros/latex/contrib/easybook/easybook.dtx | 117 ++++++++++++++++++----------- 1 file changed, 74 insertions(+), 43 deletions(-) (limited to 'macros/latex/contrib/easybook/easybook.dtx') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index e2de071e35..82c1980c7b 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -29,7 +29,7 @@ % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/07/25\hskip 1em\relax v1.27p\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/07/25\hskip 1em\relax v1.27q\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} @@ -61,7 +61,7 @@ % \end{document} % \end{frameverb} % -% 或者直接使用 \pkg{easybase} 宏包,目前适用于 \cls{ctexbook}、\cls{ctexrep}、\cls{ctexart} 以及标准文档类。它的宏包选项有 \opt{class}、\opt{draft}、\opt{paper} 和 \opt{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在 \textbf{标准文档类} 后载入时还可以使用 \pkg{ctex} 宏包的选项,将会传递给 \pkg{ctex} 宏包。 +% 或者直接使用 \pkg{easybase} 宏包,目前适用于 \cls{ctexbook}、\cls{ctexrep}、\cls{ctexart} 以及标准文档类。它的宏包选项有 \opt{class}、\opt{draft}、\opt{paper} 和 \opt{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在\textbf{标准文档类}后载入时还可以使用 \pkg{ctex} 宏包的选项,将会传递给 \pkg{ctex} 宏包。 % \begin{frameverb} % \documentclass{ctexbook} % @@ -87,7 +87,7 @@ % xelatex -shell-escape easybook % \end{frameverb} % 当然也可以使用 \opt{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\ -% \ding{72} 需要注意正确 \textbf{编译索引} 要增加 \opt{-shell-escape} 命令行选项。 +% \ding{72} 需要注意正确\textbf{编译索引}要增加 \opt{-shell-escape} 命令行选项。 % % \section{文档类选项} % \label{sec:document class options} @@ -113,7 +113,7 @@ % \begin{syntax} % scheme = <(chinese)|plain> % \end{syntax} -% \opt{scheme} 代表文档的主题,扩展了此选项在 \CTeX 文档类中原有的作用范围,\opt{plain} 选项可使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如 \textbf{第一章} 变为 \textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。 +% \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,updated = 2021-04-29]{enmode} @@ -149,7 +149,7 @@ % cjkfont = % \end{syntax} % 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。 -% \changes{v1.27p}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。} +% \changes{v1.27q}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。} % \end{function} % % 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族: @@ -246,7 +246,7 @@ % \tn{bisection*}\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题} % \tn{bisubsection*}\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题} % \end{syntax} -% 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有 bichapter、bisection 和 bisubsection 三个计数器,并对应 \tn{the}\meta{计数器} 的值,可以用于 \opt{binumber} 选项更改英文目录中的编号。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下 \textbf{不需要使用}。 +% 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有 bichapter、bisection 和 bisubsection 三个计数器,并对应 \tn{the}\meta{计数器} 的值,可以用于 \opt{binumber} 选项更改英文目录中的编号。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。 % \changes{v1.25}{2021/05/05}{增加与双语目录配合的标题命令。} % \end{function} % @@ -497,7 +497,7 @@ % \begin{syntax} % \tn{printbibliography}\oarg{键值列表} % \end{syntax} -% 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下: +% 两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下: % \end{function} % % \begin{function}{heading,title,prenote,section,type,filter} @@ -597,7 +597,7 @@ % \begin{itemize} % \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的环境名。 % \item 自动定义交叉引用的格式,引用标签前缀为定理名称。 -% \item 定理盒子选项 \opt{thmbox} 仍然生效,盒子样式选项是用于设置定理盒子样式的名称,它需要 \pkg{tcolorbox} 的 \tn{tcbset} 接口命令设定,默认为 \opt{tc-theorem}。 +% \item 定理盒子选项 \opt{thmbox} 仍然生效,盒子样式选项是用于设置定理盒子样式的名称,它需要 \pkg{tcolorbox} 的 \tn{tcbset} 接口命令或 \tn{tcbappstyle} 设定,默认为 \opt{tc-theorem}。 % \item 默认使用 \opt{easy-theorem} 定理样式,可在最后一个选项使用 \opt{style} 更改样式。 % \end{itemize} % \item[\tn{declaretheoremstyle}] 定义新的定理样式,\meta{键值列表} 中包括上述定理样式以及 \tn{declaretheorem} 的所有选项。 @@ -614,6 +614,11 @@ % \tcolorboxenvironment{定理环境名}{tc-theorem} % \end{ctexexam} % +% 使用 \tn{tcbappstyle} 命令调整开启定理盒子时默认的样式,第一个参数为 \opt{theorem},关于命令的介绍在小节 \ref{subsec:exercise}。 +% \begin{ctexexam} +% \tcbappstyle{theorem}{colback = GreenYellow} +% \end{ctexexam} +% % 定义一个新的定理样式可用于 \tn{declaretheorem} 的 \opt{style} 选项: % \begin{ctexexam} % \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5em]{定理样式名} @@ -726,7 +731,7 @@ % \end{syntax} % \ding{229} 以上选项路径为 \opt{hdrset/...} \\ % \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。} -% \changes{v1.27p}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。} +% \changes{v1.27q}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。} % \end{function} % % \begin{optdesc} @@ -914,7 +919,7 @@ % \tn{end}\{hangparas\} % \end{syntax} % \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。 -% \changes{v1.27p}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。} +% \changes{v1.27q}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。} % \end{function} % % \subsection{代码} @@ -940,29 +945,41 @@ % \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。} % \end{function} % -% \meta{键值列表2} 为 \pkg{tcolorbox} 的盒子样式选项,例如 \opt{boxsep} 和 \opt{fontupper}等。\meta{键值列表3} 的选项与 \pkg{enumitem} 的排序列表相同,不过第一个选项无法是短编号形式,这被 \opt{number} 选项代替。\meta{键值列表1} 也用于设置标题样式,包含的选项如下: -% \begin{function}{color,title,number,numsep,label} +% \meta{键值列表2} 为 \pkg{tcolorbox} 的盒子样式选项,例如 \opt{boxsep} 和 \opt{fontupper} 等,也可以使用下述 \opt{tcolorbox} 选项。\meta{键值列表3} 的选项与 \pkg{enumitem} 的排序列表相同,也可以使用下述 \opt{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \opt{number} 选项代替。\meta{键值列表1} 也用于设置标题样式,包含的选项如下: +% \begin{function}{color,title,number,numsep,tcolorbox,enumitem,label} % \begin{syntax} % color = <标题背景颜色名|(DeepSkyBlue)> % title = <环境标题> % number = <习题编号格式|(1.)> % numsep = <编号与标题的间距|(0.5em)> +% tcolorbox = \{<键值列表2>\} +% enumitem = \{<键值列表3>\} % label = <标签内容> % \end{syntax} % \opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。 % \end{function} % -% \begin{function}{\setexercise,\exerprologue,\tcphantomifname} +% \begin{function}{\setexercise,\tcbappstyle,\setexerlist,\exerprologue,\tcphantomifname} % \begin{syntax} -% \tn{setexercise}\marg{键值列表} +% \tn{setexercise}\marg{键值列表1} +% \tn{tcbappstyle*}\marg{风格名称}\marg{键值列表2} +% \tn{setexerlist}\marg{键值列表3} % \tn{exerprologue}\marg{序言内容} % \tn{tcphantomifname}\marg{编号代码}\marg{不编号代码} % \end{syntax} -% 可以通过 \tn{setexercise} 命令使用键值列表设置上述习题选项的默认值。\tn{exerprologue} 命令在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。\tn{tcphantomifname} 命令根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \tn{addcontentsline} 命令将习题标题加入目录。 % \end{function} % +% \begin{optdesc} +% \item[\tn{setexercise}] 这个命令可以全局设置上述习题综合选项 \meta{键值列表1} 的默认值。 +% \item[\tn{tcbappstyle*}] 这是 \pkg{tcolorbox} 宏包盒子风格定义命令,带有星号的命令可以\textbf{新建或重置}一个名为 \opt{tc-}\meta{风格名称} 的盒子风格,否则是修改\textbf{已存在}的风格。在这里可以设置标题选项 \meta{键值列表2} 的值,第一个参数为 \opt{exercise},也可以修改小节 \ref{subsec:box} 本文档类支持的其它盒子环境风格。 +% \item[\tn{setexerlist}] 这个命令用于设置习题条目选项 \meta{键值列表3} 的值。 +% \item[\tn{exerprologue}] 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。 +% \item[\tn{tcphantomifname}] 根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \tn{addcontentsline} 命令将习题标题加入目录。 +% \end{optdesc} +% % \begin{ctexexam} % \tcphantomifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{} +% \tcbappstyle{exercise}{boxsep = 5pt} % \exerprologue{习题前的一段文本} % \begin{exercise}+[color = LightSkyBlue](after skip = 2pc)[itemsep = 1ex] % \item 第一题 @@ -972,19 +989,21 @@ % % \subsection{盒子} % \label{subsec:box} -% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区 \textbf{手动载入} \pkg{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。 +% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。 % % \subsubsection{摘要盒子} -% \begin{function}[added = 2021-01-05,updated = 2021-05-02]{outline} +% \begin{function}[added = 2021-01-05,updated = 2021-05-02]{\setoutlinelist,outline} % \begin{syntax} -% \tn{begin}\{outline\}\oarg{列表配置选项}\parg{标题名称}\oarg{盒子配置选项} +% \tn{setoutlinelist}\marg{键值列表1} +% \tn{begin}\{outline\}\oarg{键值列表1}\parg{标题名称}\oarg{键值列表2} % \ \tn{item} <摘要内容> % \tn{end}\{outline\} % \end{syntax} -% 摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。列表配置选项与 \pkg{enumitem} 宏包中列表的选项相同,可以设置摘要条目的各种距离。 +% 摘要盒子 \env{outline} 可用于章前摘要,它的标题是可选参数,默认标题是摘要。\meta{键值列表1} 与 \pkg{enumitem} 宏包中列表配置选项相同,可以设置摘要条目的各种距离,使用 \tn{setoutlinelist} 命令对它进行全局设置。\meta{键值列表2} 是摘要盒子样式选项,可以使用 \tn{tcbappstyle} 命令对它进行全局设置,命令第一个参数为 \opt{outline}。 % \end{function} % % \begin{ctexexam} +% \tcbappstyle{outline}{arc = 6pt} % \begin{outline}[leftmargin = *](标题名称) % \item 摘要内容 % \item 摘要内容 @@ -998,7 +1017,7 @@ % \ <盒子内容> % \tn{end}\{easybox\} % \end{syntax} -% 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。 +% 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。如果 \meta{配置选项} 较长且希望在原有基础上更改为全局固定的样式,可以使用 \tn{tcbappstyle} 命令设置,命令第一个参数为 \opt{easybox}。 % \end{function} % % \begin{ctexexam} @@ -1015,7 +1034,7 @@ % \ <盒子内容> % \tn{end}\{ebparbox\} % \end{syntax} -% 环境 \env{ebparbox} 与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。 +% 环境 \env{ebparbox} 用法与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。 % \changes{v1.24}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。} % \end{function} % @@ -1060,7 +1079,7 @@ % \changes{v1.26}{2021/06/30}{增加计数器使用命令 \tn{UseCounter}。} % \end{function} % -% 需要注意的是 \tn{UseCounter} 仅具有 \textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。 +% 需要注意的是 \tn{UseCounter} 仅具有\textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。 % % 在一定的场合下可能用到 \tn{UseCounter} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器,使用 \tn{labelformat} 设置计数器的引用标签需添加 eb@: % \begin{ctexexam} @@ -1090,25 +1109,27 @@ % \end{function} % % \subsection{公式符号对照} -% \begin{function}[added = 2021-07-22]{\seteqcomp,\symb,eqcomp} +% \begin{function}[added = 2021-07-22]{\seteqcomp,\seteqcomplist,\symb,eqcomp} % \begin{syntax} % \tn{seteqcomp}\marg{键值列表} +% \tn{seteqcomplist}\marg{键值列表2} % \tn{symb*}\marg{符号}\oarg{引导符} % \tn{begin}\{eqcomp\}\oarg{键值列表1}\parg{键值列表2} % \ \tn{symb}\marg{符号}\oarg{引导符}<说明文字> % \tn{end}\{eqcomp\} % \end{syntax} % 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表的 \meta{键值列表2} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。\meta{键值列表1} 也可以使用 \tn{seteqcomp} 全局设置,它的选项如下: -% \changes{v1.27p}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。} +% \changes{v1.27q}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。} % \end{function} % -% \begin{function}{width,delim,space,item-align,delim-align,intro,font,mode} +% \begin{function}{width,delim,space,item-align,delim-align,enumitem,intro,font,mode} % \begin{syntax} % width = <符号宽度|(2em)> % delim = <引导符|(——)> % space = <符号间隙|(0.25em)> % item-align = % delim-align = +% enumitem = \{<键值列表2>\} % intro = <首行文字> % font = <符号字体> % mode = <(math)|text> @@ -1121,6 +1142,7 @@ % \item[space] 符号间隙为引导符两侧与符号和说明文字间的距离。 % \item[item-align] 符号的对齐方式,分为左(\opt{l})、中(\opt{c})和右(\opt{r})三种对齐方式。 % \item[delim-align] 引导符的对齐方式,分为左(\opt{l})、中(\opt{c})和右(\opt{r})三种对齐方式。 +% \item[enumitem] 可以使用选项 \opt{enumitem} 或命令 \tn{seteqcomplist} 调整对照列表的水平垂直间距。 % \item[intro] 符号对照的说明文字,应当为简短的几个字,只显示在第一行,其后为悬挂缩进的对照列表。 % \item[font] 符号的字体,数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。 % \item[mode] 符号字体模式,可以为数学字体或者文本字体。 @@ -1318,7 +1340,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/07/25}{1.27p} +\ProvidesExplClass{easybook}{2021/07/25}{1.27q} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -1602,7 +1624,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/07/25}{1.27p} +\ProvidesExplPackage{easybase}{2021/07/25}{1.27q} {Typeset Chinese theses or books} \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -2992,6 +3014,9 @@ \setlist[enumerate,2]{label = alph,ref = enumii,labelwidth = *} \setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *} \setlist[description]{font = sf,labelwidth = *,leftmargin = 2em} +\cs_new:Npn \setexerlist #1 { \setlist*[eb@exercise@list]{#1} } +\cs_new:Npn \seteqcomplist #1 { \setlist*[eb@eqcomp@list]{#1} } +\cs_new:Npn \setoutlinelist #1 { \setlist*[eb@outline@list]{#1} } \keys_define:nn { eb/eqcomp } { @@ -3005,6 +3030,7 @@ item-align .initial:n = r, delim-align .tl_set:N = \l__eb_eqsymb_delim_align_tl, delim-align .initial:n = c, + enumitem .code:n = \seteqcomplist{#1}, intro .tl_set:N = \l__eb_eqsymb_intro_tl, font .tl_set:N = \l__eb_eqsymb_font_tl, mode .tl_set:N = \l__eb_eqsymb_mode_tl, @@ -3232,10 +3258,18 @@ title .initial:n = \c__eb_name_exercise_tl, numsep .dim_set:N = \eb@toc@exercise@numsep, numsep .initial:n = 0.5em, - label .tl_set:N = \eb@tc@exercise@label + label .tl_set:N = \eb@tc@exercise@label, + enumitem .code:n = \setexerlist{#1}, + tcolorbox .code:n = \tcbappstyle{exercise}{#1} } \cs_new_protected:Npn \setexercise #1 { \keys_set:nn { eb/exercise } {#1} } +\NewDocumentCommand{\tcbappstyle}{smm} + { + \IfBooleanTF{#1} + {\tcbset{tc-#2/.style = {#3}}} + {\tcbset{tc-#2/.append~style = {#3}}} + } \ctex_at_end_package:nn { tcolorbox } { \eb_package_date_check:nn { tcolorbox } { 2020/10/09 } @@ -3554,17 +3588,11 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/25}{1.27p} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/25}{1.27q} {Customization of tcolorbox for easybook} -\cs_new_protected:Npn \eb_tcb_theorem_set:n #1 - { \tcbset{tc-theorem/.style = {#1}} } -\cs_new_protected:Npn \eb_tcb_outline_set:n #1 - { \tcbset{tc-outline/.style = {#1}} } -\cs_new_protected:Npn \eb_tcb_exercise_set:n #1 - { \tcbset{tc-exercise/.style = {#1}} } \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } -\eb_tcb_theorem_set:n +\tcbappstyle*{theorem} { enhanced~jigsaw,pad~at~break* = 3pt, opacityback = 0, @@ -3575,7 +3603,7 @@ top = \eb@tc@line@skip,bottom = \eb@tc@line@skip, middle = \eb@tc@line@skip } -\eb_tcb_outline_set:n +\tcbappstyle*{outline} { enhanced,nofloat, tikznode~boxed~title, @@ -3588,13 +3616,15 @@ arc = 3pt, left = 2pc,right = 2pc,top = 1.5pc,bottom = 1pc } -\eb_tcb_exercise_set:n +\tcbappstyle*{exercise} { blank,on~line,center, sharpish~corners, fontupper = \Large\sffamily, beforeafter~skip = 3.75ex plus .2ex minus .1ex } +\tcbappstyle*{easybox}{} +\tcbappstyle*{ebparbox}{} \tcbset { breakable, @@ -3603,7 +3633,6 @@ boxrule = \l__eb_rule_width_dim } -\newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1} \tl_new:N \p@eb@exercise \tl_new:N \eb@tc@list@prologue \cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} } @@ -3637,13 +3666,15 @@ \hspace{\use:c { eb@toc@#1@numsep }} } +\newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1} +\newtcolorbox{eb@tc@outline@box}[2]{title = #1,tc-outline,#2} \NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b} { - \begin{tcolorbox}[tc-outline,title = #2,IfValueT = {#3}{#3}] + \begin{eb@tc@outline@box}{#2}{IfValueT = {#3}{#3}} \begin{eb@outline@list}[#1] #4 \end{eb@outline@list} - \end{tcolorbox} + \end{eb@tc@outline@box} }{} \NewDocumentEnvironment{exercise}{st+od()O{}+b} { @@ -3693,7 +3724,7 @@ bottomtitle = \eb@tc@line@skip, beforeafter~skip = 1.75ex plus .2ex minus .1ex, halign~upper = left,halign~lower = left, - center~title,#4 + center~title,tc-easybox,#4 } \DeclareTColorBox{ebparbox}{sO{DarkSlateBlue}d()O{}} { @@ -3717,7 +3748,7 @@ left = 8pt, middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip, beforeafter~skip = 1.75ex plus .2ex minus .1ex, - colframe = #2,coltitle = #2,#4 + colframe = #2,coltitle = #2,tc-ebparbox,#4 } \DeclareTotalTCBox{\ebemph}{O{DarkSeaGreen}vO{}} {on~line,blank,fuzzy~halo = 2pt~with~#1,#3}{#2} -- cgit v1.2.3