From 6f7d67116e922a6dda38642c40d1518878719465 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 30 Nov 2021 22:51:41 +0000 Subject: easybook (30nov21) git-svn-id: svn://tug.org/texlive/trunk@61192 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/easybook/easybook.pdf | Bin 583057 -> 583250 bytes Master/texmf-dist/doc/latex/easybook/easybook.tex | 28 ++-- .../texmf-dist/source/latex/easybook/easybook.dtx | 159 +++++++++++---------- Master/texmf-dist/tex/latex/easybook/easybase.sty | 125 ++++++++-------- Master/texmf-dist/tex/latex/easybook/easybook.cls | 8 +- .../texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 26 ++-- 6 files changed, 181 insertions(+), 165 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf index 45d99e11415..c0393684122 100644 Binary files a/Master/texmf-dist/doc/latex/easybook/easybook.pdf and b/Master/texmf-dist/doc/latex/easybook/easybook.pdf differ diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.tex b/Master/texmf-dist/doc/latex/easybook/easybook.tex index 168e49d8e4d..af55466e62f 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex @@ -20,8 +20,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.41B, - date = 2021/11/28, + version = v1.41C, + date = 2021/11/29, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -75,6 +75,7 @@ \newsplitarg{\splitmarg}{\{}{\}} \newcommand{\spemmeta}{\splitmeta[\code{|}]} \newsplitarg[\spemmeta]{\spemcoarg}{[}{]} +\newcommand{\harg}{\textcolor{argument}{\code{-}}} \NewDocumentCommand{\passto}{smm} {\IfBooleanF{#1}{\color{Blue}}#3\ifblank{#2}{}{\ttfamily[#2]}} \newcommand{\insertblr}[2] @@ -591,7 +592,7 @@ \kvsplit*{notebraces}{\meta{左括号}\code{\}\{}\meta{右括号}}\Default{\Carg{(}\Carg{)}} 设置定理题注两边的括号,两个必选参数分别代表左括号和右括号。 \keyval-{headformat}{标题排列}\Default{\cs*{NAME}\cs*{NUMBER}\cs*{NOTE}} - 定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中参数 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。 + 定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中命令 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。 \end{options} \subsubsection{新建定理环境} @@ -619,7 +620,7 @@ \begin{itemize} \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的 \meta{环境名}。 \item 自动定义交叉引用的格式,引用标签前缀为相应定理名。 - \item 定理盒子选项 \option{thmframe} 仍然生效,\meta{盒子风格} 可以使用 \cs{newtcbstyle} 命令创建。 + \item 定理盒子选项 \option{thmframe} 仍然生效,\meta{盒子风格} 可以使用 \cs{deftcbstyle} 命令创建。 \item 新建定理环境默认使用的 \meta{定理样式} 为 \code{easy-theorem},而不是 \pkg*{thmtools} 的默认样式。 \end{itemize} @@ -697,9 +698,10 @@ \end{commands} \begin{commands}\noitemsep - \command*{markboth}[\marg{左页页眉内容}\marg{右页页眉内容}]\default{} - \command*{markright}[\marg{右页页眉内容}] - 命令 \cs*{markboth} 和 \cs*{markright} 用于手动设置当前页标题标记,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉标志。上述标记命令内容的选项便是基于这两个命令。如果是单面打印,则 \meta{左页页眉内容} 无效。 + \command*{markboth}[\marg{左页标题标记}\marg{右页标题标记}]\default{} + \command*{markright}[\marg{右页标题标记}]\default{} + \command{markdouble}[\marg{双页标题标记}] + 这三个命令用于手动设置当前页标题标记,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉页脚内容。上述标记命令内容的选项便是基于这三个命令。其中 \cs{markdouble} 根据是否是双面打印设置相应标记。如果是单面打印,则 \meta{左页标题标记} 无效。 \end{commands} \begin{commands} @@ -801,8 +803,8 @@ \end{options} \begin{commands} - \command{tocrule}[\sarg\oarg{引导点间距}\darg{放大因子}\marg{引导点}\oarg{页码格式}] - 目录命令 \cs{tocrule} 生成目录引导线,需要在引导线选项 \option{tocrule} 中使用。带有星号的命令会使当前级别的目录引导线右边与页码相连而不是对齐。\meta{引导点间距} 需带有长度单位,\meta{放大因子} 不带单位,为 \meta{引导点} 的放大倍数,\meta{引导点} 一般为英文句号或 \cs*{cdot} 中心点符号。\meta{页码格式} 的代码位于页码前面,可以设置页码字体和距离等,最后一个命令可以带有一个参数,这个参数为页码编号。 + \command{tocrule}[\sarg\harg\oarg{引导点间距}\darg{放大因子}\marg{引导点}\oarg{页码格式}] + 目录命令 \cs{tocrule} 生成目录引导线,需要在引导线选项 \option{tocrule} 中使用。带有星号的命令会使当前级别的目录引导线右端与页码相连而不是对齐。带有 \harg{} 号的命令不添加引导线后的目录页码。\meta{引导点间距} 需带有长度单位,\meta{放大因子} 不带单位,为 \meta{引导点} 的放大倍数,\meta{引导点} 一般为英文句号或 \cs*{cdot} 中心点符号。\meta{页码格式} 的代码位于页码前面,可以设置页码字体和距离等,最后一个命令可以带有一个参数,这个参数为页码编号。 \command*{CTEXnumberline}[\marg{编号级别}] 目录命令 \cs*{CTEXnumberline} 用于在 C\TeX 文档类的 \option*{tocline} 选项中设置目录的标签,它已经被重新定义,使得目录标签后代码选项 \option{tocafter} 仍然有效。\meta{编号级别} 为 \code{chapter} 和 \code{section} 等,也可用参数 \code{\#1} 代替当前级别类型,标题名用参数 \code{\#2} 代替一般不变。 \begin{ctexexam} @@ -829,7 +831,7 @@ \keyval-{main-voffset}{弹性长度} 文档主目录标题下方的间距补偿,一般为正值,用于抵消目录中首行的额外垂直间距。 \keybool{dotalign}\Default{true} - 引导线选项 \option{dotalign} 可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。 + 引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间隙,否则会与页码连接。 \keyval-{tocafter-all}{距离命令}\Default{\cs*{hspace}\Carg{1em}} 统一设置所有级别在目录中标签与标题间的代码。 \keyval-{tocindent-all}{刚性长度} @@ -995,7 +997,7 @@ \keyval-{color}{标题背景颜色名}\Default{DeepSkyBlue} 习题标题盒子背景颜色,可以使用 \pkg*{xcolor} 自定义颜色或使用色库。 \keyval-{title}{环境标题} - 习题的标题,可以匹配中英文模式,习题环境使用 \parg{} 参数时无效。 + 习题的标题,可以匹配中英文模式,习题环境使用 \parg{} 参数时无效。也可以使用 \option{exercisename} 选项设置习题环境标题的默认值。 \keyval-{number}{习题编号类型}\Default{1.} 标题编号输出选项 \option{number} 为短编号形式,应当包含 \code{A}、\code{a}、\code{I}、\code{i}、或 \code{1} 其中一个符号。 \keyval-{numsep}{编号与标题的间距}\Default{0.5em} @@ -1021,12 +1023,12 @@ \label{subsec:box} 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg*{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。 \begin{commands} - \command{newtcbstyle}[\marg{盒子风格}\marg{键值列表}] + \command{deftcbstyle}[\marg{盒子风格}\marg{键值列表}] 新建或重置一个名称为 \meta{盒子风格} 的 \pkg*{tcolorbox} 宏包盒子风格,可以与 \cs{addtcbstyle} 命令联用。 \command{addtcbstyle}[\marg{盒子风格}\marg{键值列表}] 修改已存在的 \pkg*{tcolorbox} 宏包盒子风格。这个命令可以调整以下即将介绍的预置盒子风格,对于预置盒子来说参数 \meta{盒子风格} 即为它们对应的环境或命令名。 \begin{ctexexam} - \newtcbstyle{mytcb} % 新建一个盒子风格mytcb + \deftcbstyle{mytcb} % 新建一个盒子风格mytcb { colback = Snow,colframe = LimeGreen,coltext = Coral, fontupper = \bfseries,arc = 6pt, diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index c4e52d8a916..18a9524c2c5 100644 --- a/Master/texmf-dist/source/latex/easybook/easybook.dtx +++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx @@ -15,12 +15,12 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/11/28}{1.41B} +\ProvidesExplClass{easybook}{2021/11/29}{1.41C} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool -\bool_set_true:N \l__eb_class_book_bool +\bool_set_true:N \l__eb_class_mode_book_bool \tl_new:N \g__eb_config_tl \tl_new:N \l__eb_font_choice_tl \clist_new:N \g__eb_options_clist @@ -58,7 +58,7 @@ class/book .code:n = { }, class/article .code:n = { - \bool_set_false:N \l__eb_class_book_bool + \bool_set_false:N \l__eb_class_mode_book_bool \eb_put_ctexbook:n { oneside } }, book .meta:n = { class = book }, @@ -253,7 +253,7 @@ \ctex_set:n { secnumdepth = 3, - tocdepth = \bool_if:NTF \l__eb_class_book_bool { 1 } { 2 }, + tocdepth = \bool_if:NTF \l__eb_class_mode_book_bool { 1 } { 2 }, part = { pagestyle = empty, @@ -325,7 +325,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/11/28}{1.41B} +\ProvidesExplPackage{easybase}{2021/11/29}{1.41C} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -423,8 +423,8 @@ { \BeforeBeginEnvironment{document} } \cs_gset_eq:NN \PackageWarning \PackageInfo -\bool_if_exist:NF \l__eb_class_book_bool - { \bool_set_true:N \l__eb_class_book_bool } +\bool_if_exist:NF \l__eb_class_mode_book_bool + { \bool_set_true:N \l__eb_class_mode_book_bool } \bool_if_exist:NF \l__eb_compile_draft_bool { \bool_set_false:N \l__eb_compile_draft_bool } \clist_new:N \g__eb_ctex_options_clist @@ -446,7 +446,7 @@ class/book .code:n = { }, class/article .code:n = { - \bool_set_false:N \l__eb_class_book_bool + \bool_set_false:N \l__eb_class_mode_book_bool \boolfalse{@twoside} \boolfalse{@mparswitch} }, @@ -491,21 +491,21 @@ \eb_clist_map_inline:nn { style,subfont,spread,bibset,thmset,hdrset,tocset } { - \msg_new:nnn { easybase } { ignore-#1 } + \msg_new:nnn { easybase } { abandon-#1 } { - ##1~is~an~unknown~option~of~#1. \\ - Please~check~the~user~manual~for~the~supported~options. + ##1~is~an~abandoned~option~of~#1~module. \\ + Please~browse~the~user~manual~for~the~new~options. } } -\cs_new:Npn \eb_msg_unknown_option:n #1 - { \msg_warning:nnx { easybase } { ignore-#1 } { \l_keys_key_str } } +\cs_new:Npn \eb_msg_abandon_option:n #1 + { \msg_warning:nnx { easybase } { abandon-#1 } { \l_keys_key_str } } \cs_if_exist:NF \chapter { \newcounter{chapter} - \bool_set_false:N \l__eb_class_book_bool + \bool_set_false:N \l__eb_class_mode_book_bool \ctex_define:n { chapter/tocline .code:n = { } } } -\bool_if:NF \l__eb_class_book_bool +\bool_if:NF \l__eb_class_mode_book_bool { \cs_undefine:N \chapter \ctex_after_end_preamble:n @@ -710,24 +710,21 @@ { \eb_mark_nouppercase:n } { \use:c { eb_fancyhf_#1_mark:n } {#2} } } +\cs_set:Npn \markdouble #1 { \markboth{#1}{\ifbool{@twoside}{#1}{}} } \cs_new:Npn \eb@level@markdouble #1#2 - { - \markboth - {\eb_mark_if_uppercase:nn {#1} {#2}} - {\ifbool{@twoside}{\eb_mark_if_uppercase:nn {#1} {#2}}{}} - } + { \markdouble{\eb_mark_if_uppercase:nn {#1} {#2}} } \cs_new:Npn \eb@level@markright #1#2 { \markright{\eb_mark_if_uppercase:nn {#1} {#2}} } \cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} } \cs_gset:Npn \sectionmark #1 { - \bool_if:NTF \l__eb_class_book_bool + \bool_if:NTF \l__eb_class_mode_book_bool { \eb@level@markright{section}{#1} } { \eb@level@markdouble{section}{#1} } } \cs_gset:Npn \subsectionmark #1 { - \bool_if:NF \l__eb_class_book_bool + \bool_if:NF \l__eb_class_mode_book_bool { \eb@level@markright{subsection}{#1} } } \cs_gset_eq:NN \ps@plain \ps@empty @@ -915,7 +912,7 @@ fntext-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { thefootnote }, fnmate-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnmate-num .initial:n = plain, - unknown .code:n = \eb_msg_unknown_option:n { hdrset } + unknown .code:n = \eb_msg_abandon_option:n { hdrset } } \eb_at_end_preamble:n @@ -1287,26 +1284,29 @@ lolskip .skip_set:N = \eb@toc@lolskip, lolskip .initial:n = 10pt, main-voffset .skip_set:N = \l__eb_toc_main_voffset_skip, - main-voffset .initial:n = \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.2pc }, + main-voffset .initial:n = \bool_if:NTF \l__eb_class_mode_book_bool { 1pc } { 0.2pc }, dotalign .bool_set:N = \l__eb_toc_dot_align_bool, dotalign .default:n = true, dotalign .initial:n = true, hang .bool_set:N = \eb@titletoc@hang@fix@bool, hang .default:n = true, hang .initial:n = false, - unknown .code:n = \eb_msg_unknown_option:n { tocset } + unknown .code:n = \eb_msg_abandon_option:n { tocset } } -\NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}} +\NewDocumentCommand{\tocrule}{st-O{0.7pc}D(){1.2}mO{}} { \normalsize\normalfont - \titlerule*[#2]{\scalebox{#3}{#4}}#5 + \titlerule*[#3]{\scalebox{#4}{#5}}#6 \bgroup - \IfBooleanTF{#1} - {\thecontentspage} + \IfBooleanF{#2} { - \bool_if:NTF \l__eb_toc_dot_align_bool - { \contentspage } - { \thecontentspage } + \IfBooleanTF{#1} + {\thecontentspage} + { + \bool_if:NTF \l__eb_toc_dot_align_bool + { \contentspage } + { \thecontentspage } + } } \egroup } @@ -1340,23 +1340,27 @@ chapter/tocindent = 0em, chapter/tocrule = \tocrule{$\cdot$}[\bfseries], chapter/tocline = \CTEXnumberline{#1}#2, - section/tocformat = \addvspace{0.2pc}\bool_if:NF \l__eb_class_book_bool { \sffamily }, - section/tocindent = \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em }, + section/tocformat = + { + \addvspace{0.2pc} + \bool_if:NF \l__eb_class_mode_book_bool { \sffamily } + }, + section/tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 1.5em } { 0em }, section/tocrule = { - \bool_if:NTF \l__eb_class_book_bool + \bool_if:NTF \l__eb_class_mode_book_bool { \tocrule{$\cdot$} } { \tocrule{$\cdot$}[\bfseries] } }, section/tocline = \CTEXnumberline{#1}#2, subsection/tocformat = \addvspace{0.2pc}, - subsection/tocindent = \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em }, + subsection/tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.4em }, subsection/tocrule = \tocrule{$\cdot$}, subsection/tocline = \CTEXnumberline{#1}#2, list/tocformat = \addvspace{0.2pc}, list/tocindent = 0em, list/tocrule = \tocrule{$\cdot$}, - list/voffset = 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt }, + list/voffset = 0.2pc\bool_if:NT \l__eb_class_mode_book_bool { + 10pt }, table/tocline = \listnumberline{table}, figure/tocline = \listnumberline{figure}, lstlisting/tocline = \listnumberline{lstlisting} @@ -1491,7 +1495,7 @@ listing-connect = #1,equation-connect = #1 }, connect-all .initial:n = { . }, - unknown .code:n = \eb_msg_unknown_option:n { style } + unknown .code:n = \eb_msg_abandon_option:n { style } } \eb_clist_map_inline:nn { figure,table,lstlisting,equation } @@ -1507,14 +1511,14 @@ } } -\tl_set:Nx \l__eb_toc_type_tl - { \bool_if:NTF \l__eb_class_book_bool { chapter } { section } } +\tl_set:Nx \l__eb_toc_title_level_tl + { \bool_if:NTF \l__eb_class_mode_book_bool { chapter } { section } } \tl_new:N \eb@bitoc@title \keys_define:nn { eb/listoc } { - section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section }, - chapter .code:n = \tl_set:Nn \l__eb_toc_type_tl { chapter }, - none .code:n = \tl_set:Nn \l__eb_toc_type_tl { none }, + section .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { section }, + chapter .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { chapter }, + none .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { none }, article .meta:n = section, book .meta:n = chapter, multoc .int_set:N = \l__eb_toc_columns_int, @@ -1523,7 +1527,7 @@ columns .meta:n = { multoc = #1 }, title .code:n = \eb_assign_toc_title:n {#1} } -\bool_if:NTF \l__eb_class_book_bool +\bool_if:NTF \l__eb_class_mode_book_bool { \keys_define:nn { } { eb/listoc .inherit:n = ctex/chapter } } { \keys_define:nn { } { eb/listoc .inherit:n = ctex/section } } \NewDocumentCommand{\eb_assign_toc_title:n} @@ -1537,17 +1541,17 @@ { \tl_set:Nn \eb@bitoc@title {#2} } } -\cs_new_protected:Npn \eb_toc_type_section_initial: +\cs_new_protected:Npn \eb_toc_title_level_initial: { - \bool_if:NF \l__eb_class_book_bool + \bool_if:NF \l__eb_class_mode_book_bool { - \tl_if_eq:NnT \l__eb_toc_type_tl { chapter } - { \tl_set:Nn \l__eb_toc_type_tl { section } } + \tl_if_eq:NnT \l__eb_toc_title_level_tl { chapter } + { \tl_set:Nn \l__eb_toc_title_level_tl { section } } } } \cs_new_protected:Npn \eb_title_mark_intoc:n #1 { - \str_case:Vn \l__eb_toc_type_tl + \str_case:Vn \l__eb_toc_title_level_tl { { chapter } { \bichapter*{#1}{\eb@bitoc@title} } { section } { \bisection*{#1}{\eb@bitoc@title} } @@ -1555,7 +1559,7 @@ } \cs_new_protected:Npn \eb_title_mark_notoc:n #1 { - \str_case:Vn \l__eb_toc_type_tl + \str_case:Vn \l__eb_toc_title_level_tl { { chapter } { \chapter*{\phantomsection #1}\chaptermark{#1} } { section } { \section*{\phantomsection #1}\sectionmark{#1} } @@ -1563,10 +1567,10 @@ } \cs_new_protected:Npn \eb_title_number_intoc_spec:nn #1#2 { - \eb_toc_type_section_initial: + \eb_toc_title_level_initial: \IfBooleanTF{#1} { - \str_case:Vn \l__eb_toc_type_tl + \str_case:Vn \l__eb_toc_title_level_tl { { chapter } { \bichapter{\eb@toc@title}{\eb@bitoc@title} } { section } { \bisection{\eb@toc@title}{\eb@bitoc@title} } @@ -1579,7 +1583,7 @@ } \cs_new_protected:Npn \eb_biber_title_level_spec:n #1 { - \bool_if:NTF \l__eb_class_book_bool + \bool_if:NTF \l__eb_class_mode_book_bool { \bichapter*{#1}{\l__eb_bib_en_bitoc_title_tl} } { \bisection*{#1}{\l__eb_bib_en_bitoc_title_tl} } \sectionmark{#1} @@ -1596,7 +1600,7 @@ } \cs_new_protected:Npn \eb_toc_if_title_voffset:n #1 { - \tl_if_eq:NnF \l__eb_toc_type_tl { none } + \tl_if_eq:NnF \l__eb_toc_title_level_tl { none } { \vspace*{-\dim_use:c { l__eb_toc_#1_voffset_skip }} } } \cs_new_protected:Npn \eb_toc_list_parse:nnnnn #1#2#3#4#5 @@ -1628,7 +1632,7 @@ \tl_set_eq:NN \eb@toc@title \contentsname \tl_set:Nn \eb@bitoc@title { Contents } \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}} - \eb_toc_type_section_initial: + \eb_toc_title_level_initial: \eb_title_mark_notoc:n { \eb@toc@title } \eb_toc_if_title_voffset:n { main } \eb_toc_start_multi_column_ext:n { toc }#3 @@ -1727,7 +1731,7 @@ footnote .initial:n = \rmfamily, marginpar .tl_set:N = \marginfont, marginpar .initial:n = \rmfamily\footnotesize, - unknown .code:n = \eb_msg_unknown_option:n { subfont } + unknown .code:n = \eb_msg_abandon_option:n { subfont } } \fp_new:N \l__eb_spread_table_fp @@ -1748,7 +1752,7 @@ footnote .fp_set:N = \l__eb_spread_footnote_fp, footnote .initial:n = 1.2, spread-all .meta:n = { line = #1,table = #1,math = #1,caption = #1,footnote = #1 }, - unknown .code:n = \eb_msg_unknown_option:n { spread } + unknown .code:n = \eb_msg_abandon_option:n { spread } } \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)} @@ -1987,7 +1991,7 @@ thmbox .meta:n = { thmframe = #1 }, thmbox .default:n = true, notebraces .tl_set:N = \l__eb_thm_notebraces_tl, - unknown .code:n = \eb_msg_unknown_option:n { thmset } + unknown .code:n = \eb_msg_abandon_option:n { thmset } } \eb_patch_cmd:wnn \thmt@setheadstyle { \def\NAME{\the\thm@headfont ##1} } @@ -2006,7 +2010,7 @@ headfont = \color{ctex@emph}\sffamily, postheadspace = 1em, notebraces = {(}{)}, - within = \bool_if:NT \l__eb_class_book_bool { chapter }, + within = \bool_if:NT \l__eb_class_mode_book_bool { chapter }, headformat = \NAME\NUMBER\NOTE } \msg_new:nnn { easybase } { need-tcolorbox } @@ -2108,7 +2112,7 @@ datafile .clist_set:N = \l__eb_bib_datafile_clist, bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl, bitoc-title .initial:n = Reference, - unknown .code:n = \eb_msg_unknown_option:n { bibset } + unknown .code:n = \eb_msg_abandon_option:n { bibset } } \cs_new_protected:Npn \eb_natbib_bibtex_set: @@ -2366,7 +2370,8 @@ \ctex_define:n { lstlistlistingname .tl_set:N = \listlstlistingname, - lstlistingname .tl_set:N = \lstlistingname + lstlistingname .tl_set:N = \lstlistingname, + exercisename .tl_set:N = \exercisename } \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } { @@ -2378,7 +2383,8 @@ listfigurename = 图片索引, listtablename = 表格索引, lstlistlistingname = 代码索引, - lstlistingname = 代码 + lstlistingname = 代码, + exercisename = 练习 } \labelformat{equation}{式(#1)} \labelformat{section}{节 #1} @@ -2389,7 +2395,8 @@ { abstractname = Abstract, lstlistlistingname = List~of~Codes, - lstlistingname = Code + lstlistingname = Code, + exercisename = Exercise } \labelformat{equation}{Equation~(#1)} \labelformat{section}{Section~#1} @@ -2397,17 +2404,18 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/28}{1.41B} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/29}{1.41C} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 { \keys_set:nn { eb/exercise } {#1} } \cs_set_protected:Npn \addtcbstyle #1#2 { \tcbset{#1/.append~style = {#2}} } -\cs_set_protected:Npn \newtcbstyle #1#2 +\cs_set_protected:Npn \deftcbstyle #1#2 { \tcbset{#1/.style = {#2}} } \cs_new_protected:Npn \tcbappstyle - { \@ifstar{\newtcbstyle}{\addtcbstyle} } + { \@ifstar{\deftcbstyle}{\addtcbstyle} } +\cs_set_eq:NN \newtcbstyle \deftcbstyle \keys_define:nn { eb/exercise } { color .tl_set:N = \eb@tc@background@color, @@ -2415,7 +2423,7 @@ number .tl_set:N = \eb@tc@list@number, number .initial:n = 1., title .tl_set:N = \eb@tc@exercise@title, - title .initial:n = \c__eb_name_exercise_tl, + title .initial:n = \exercisename, numsep .dim_set:N = \eb@toc@exercise@numsep, numsep .initial:n = 0.5em, tocnumsep .dim_set:N = \eb@toc@exertoc@numsep, @@ -2426,7 +2434,7 @@ } \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } -\newtcbstyle{tc-theorem} +\deftcbstyle{tc-theorem} { enhanced~jigsaw,pad~at~break* = 3pt, opacityback = 0, @@ -2437,7 +2445,7 @@ top = \eb@tc@line@skip,bottom = \eb@tc@line@skip, middle = \eb@tc@line@skip } -\newtcbstyle{tc-outline} +\deftcbstyle{tc-outline} { enhanced,nofloat, tikznode~boxed~title, @@ -2450,14 +2458,14 @@ arc = 3pt, left = 2pc,right = 2pc,top = 1.5pc,bottom = 1pc } -\newtcbstyle{tc-exercise} +\deftcbstyle{tc-exercise} { blank,on~line,center, sharpish~corners, fontupper = \Large\sffamily, beforeafter~skip = 3.75ex plus .2ex minus .1ex } -\newtcbstyle{tc-easybox} +\deftcbstyle{tc-easybox} { enhanced~jigsaw,pad~at~break* = 3pt, center~title, @@ -2471,7 +2479,7 @@ titlerule = 0pt, beforeafter~skip = 1.75ex plus .2ex minus .1ex } -\newtcbstyle{tc-ebparbox} +\deftcbstyle{tc-ebparbox} { frame~hidden, enhanced~jigsaw,pad~at~break* = 3pt, @@ -2481,15 +2489,15 @@ middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip, beforeafter~skip = 1.75ex plus .2ex minus .1ex } -\newtcbstyle{tc-ebemph}{on~line,blank} -\newtcbstyle{tc-eblink} +\deftcbstyle{tc-ebemph}{on~line,blank} +\deftcbstyle{tc-eblink} { standard~jigsaw,on~line, top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt, boxrule = 0.5pt,arc = 1pt, opacityback = 0.2 } -\newtcbstyle{tc-ebfbox} +\deftcbstyle{tc-ebfbox} { on~line,sharpish~corners, top = 1.5pt,bottom = 1.5pt,left = 1pt,right = 1pt, @@ -2511,7 +2519,6 @@ \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1} \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2} } -\eb_thm_name_set:nnn { exercise } { Exercise } { 练习 } \tcphantomifname { \markright diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index ba583221c87..c52f2239093 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybase.sty +++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/11/28}{1.41B} +\ProvidesExplPackage{easybase}{2021/11/29}{1.41C} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -118,8 +118,8 @@ { \BeforeBeginEnvironment{document} } \cs_gset_eq:NN \PackageWarning \PackageInfo -\bool_if_exist:NF \l__eb_class_book_bool - { \bool_set_true:N \l__eb_class_book_bool } +\bool_if_exist:NF \l__eb_class_mode_book_bool + { \bool_set_true:N \l__eb_class_mode_book_bool } \bool_if_exist:NF \l__eb_compile_draft_bool { \bool_set_false:N \l__eb_compile_draft_bool } \clist_new:N \g__eb_ctex_options_clist @@ -141,7 +141,7 @@ class/book .code:n = { }, class/article .code:n = { - \bool_set_false:N \l__eb_class_book_bool + \bool_set_false:N \l__eb_class_mode_book_bool \boolfalse{@twoside} \boolfalse{@mparswitch} }, @@ -186,21 +186,21 @@ \eb_clist_map_inline:nn { style,subfont,spread,bibset,thmset,hdrset,tocset } { - \msg_new:nnn { easybase } { ignore-#1 } + \msg_new:nnn { easybase } { abandon-#1 } { - ##1~is~an~unknown~option~of~#1. \\ - Please~check~the~user~manual~for~the~supported~options. + ##1~is~an~abandoned~option~of~#1~module. \\ + Please~browse~the~user~manual~for~the~new~options. } } -\cs_new:Npn \eb_msg_unknown_option:n #1 - { \msg_warning:nnx { easybase } { ignore-#1 } { \l_keys_key_str } } +\cs_new:Npn \eb_msg_abandon_option:n #1 + { \msg_warning:nnx { easybase } { abandon-#1 } { \l_keys_key_str } } \cs_if_exist:NF \chapter { \newcounter{chapter} - \bool_set_false:N \l__eb_class_book_bool + \bool_set_false:N \l__eb_class_mode_book_bool \ctex_define:n { chapter/tocline .code:n = { } } } -\bool_if:NF \l__eb_class_book_bool +\bool_if:NF \l__eb_class_mode_book_bool { \cs_undefine:N \chapter \ctex_after_end_preamble:n @@ -405,24 +405,21 @@ { \eb_mark_nouppercase:n } { \use:c { eb_fancyhf_#1_mark:n } {#2} } } +\cs_set:Npn \markdouble #1 { \markboth{#1}{\ifbool{@twoside}{#1}{}} } \cs_new:Npn \eb@level@markdouble #1#2 - { - \markboth - {\eb_mark_if_uppercase:nn {#1} {#2}} - {\ifbool{@twoside}{\eb_mark_if_uppercase:nn {#1} {#2}}{}} - } + { \markdouble{\eb_mark_if_uppercase:nn {#1} {#2}} } \cs_new:Npn \eb@level@markright #1#2 { \markright{\eb_mark_if_uppercase:nn {#1} {#2}} } \cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} } \cs_gset:Npn \sectionmark #1 { - \bool_if:NTF \l__eb_class_book_bool + \bool_if:NTF \l__eb_class_mode_book_bool { \eb@level@markright{section}{#1} } { \eb@level@markdouble{section}{#1} } } \cs_gset:Npn \subsectionmark #1 { - \bool_if:NF \l__eb_class_book_bool + \bool_if:NF \l__eb_class_mode_book_bool { \eb@level@markright{subsection}{#1} } } \cs_gset_eq:NN \ps@plain \ps@empty @@ -610,7 +607,7 @@ fntext-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { thefootnote }, fnmate-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnmate-num .initial:n = plain, - unknown .code:n = \eb_msg_unknown_option:n { hdrset } + unknown .code:n = \eb_msg_abandon_option:n { hdrset } } \eb_at_end_preamble:n @@ -982,26 +979,29 @@ lolskip .skip_set:N = \eb@toc@lolskip, lolskip .initial:n = 10pt, main-voffset .skip_set:N = \l__eb_toc_main_voffset_skip, - main-voffset .initial:n = \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.2pc }, + main-voffset .initial:n = \bool_if:NTF \l__eb_class_mode_book_bool { 1pc } { 0.2pc }, dotalign .bool_set:N = \l__eb_toc_dot_align_bool, dotalign .default:n = true, dotalign .initial:n = true, hang .bool_set:N = \eb@titletoc@hang@fix@bool, hang .default:n = true, hang .initial:n = false, - unknown .code:n = \eb_msg_unknown_option:n { tocset } + unknown .code:n = \eb_msg_abandon_option:n { tocset } } -\NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}} +\NewDocumentCommand{\tocrule}{st-O{0.7pc}D(){1.2}mO{}} { \normalsize\normalfont - \titlerule*[#2]{\scalebox{#3}{#4}}#5 + \titlerule*[#3]{\scalebox{#4}{#5}}#6 \bgroup - \IfBooleanTF{#1} - {\thecontentspage} + \IfBooleanF{#2} { - \bool_if:NTF \l__eb_toc_dot_align_bool - { \contentspage } - { \thecontentspage } + \IfBooleanTF{#1} + {\thecontentspage} + { + \bool_if:NTF \l__eb_toc_dot_align_bool + { \contentspage } + { \thecontentspage } + } } \egroup } @@ -1035,23 +1035,27 @@ chapter/tocindent = 0em, chapter/tocrule = \tocrule{$\cdot$}[\bfseries], chapter/tocline = \CTEXnumberline{#1}#2, - section/tocformat = \addvspace{0.2pc}\bool_if:NF \l__eb_class_book_bool { \sffamily }, - section/tocindent = \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em }, + section/tocformat = + { + \addvspace{0.2pc} + \bool_if:NF \l__eb_class_mode_book_bool { \sffamily } + }, + section/tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 1.5em } { 0em }, section/tocrule = { - \bool_if:NTF \l__eb_class_book_bool + \bool_if:NTF \l__eb_class_mode_book_bool { \tocrule{$\cdot$} } { \tocrule{$\cdot$}[\bfseries] } }, section/tocline = \CTEXnumberline{#1}#2, subsection/tocformat = \addvspace{0.2pc}, - subsection/tocindent = \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em }, + subsection/tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.4em }, subsection/tocrule = \tocrule{$\cdot$}, subsection/tocline = \CTEXnumberline{#1}#2, list/tocformat = \addvspace{0.2pc}, list/tocindent = 0em, list/tocrule = \tocrule{$\cdot$}, - list/voffset = 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt }, + list/voffset = 0.2pc\bool_if:NT \l__eb_class_mode_book_bool { + 10pt }, table/tocline = \listnumberline{table}, figure/tocline = \listnumberline{figure}, lstlisting/tocline = \listnumberline{lstlisting} @@ -1186,7 +1190,7 @@ listing-connect = #1,equation-connect = #1 }, connect-all .initial:n = { . }, - unknown .code:n = \eb_msg_unknown_option:n { style } + unknown .code:n = \eb_msg_abandon_option:n { style } } \eb_clist_map_inline:nn { figure,table,lstlisting,equation } @@ -1202,14 +1206,14 @@ } } -\tl_set:Nx \l__eb_toc_type_tl - { \bool_if:NTF \l__eb_class_book_bool { chapter } { section } } +\tl_set:Nx \l__eb_toc_title_level_tl + { \bool_if:NTF \l__eb_class_mode_book_bool { chapter } { section } } \tl_new:N \eb@bitoc@title \keys_define:nn { eb/listoc } { - section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section }, - chapter .code:n = \tl_set:Nn \l__eb_toc_type_tl { chapter }, - none .code:n = \tl_set:Nn \l__eb_toc_type_tl { none }, + section .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { section }, + chapter .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { chapter }, + none .code:n = \tl_set:Nn \l__eb_toc_title_level_tl { none }, article .meta:n = section, book .meta:n = chapter, multoc .int_set:N = \l__eb_toc_columns_int, @@ -1218,7 +1222,7 @@ columns .meta:n = { multoc = #1 }, title .code:n = \eb_assign_toc_title:n {#1} } -\bool_if:NTF \l__eb_class_book_bool +\bool_if:NTF \l__eb_class_mode_book_bool { \keys_define:nn { } { eb/listoc .inherit:n = ctex/chapter } } { \keys_define:nn { } { eb/listoc .inherit:n = ctex/section } } \NewDocumentCommand{\eb_assign_toc_title:n} @@ -1232,17 +1236,17 @@ { \tl_set:Nn \eb@bitoc@title {#2} } } -\cs_new_protected:Npn \eb_toc_type_section_initial: +\cs_new_protected:Npn \eb_toc_title_level_initial: { - \bool_if:NF \l__eb_class_book_bool + \bool_if:NF \l__eb_class_mode_book_bool { - \tl_if_eq:NnT \l__eb_toc_type_tl { chapter } - { \tl_set:Nn \l__eb_toc_type_tl { section } } + \tl_if_eq:NnT \l__eb_toc_title_level_tl { chapter } + { \tl_set:Nn \l__eb_toc_title_level_tl { section } } } } \cs_new_protected:Npn \eb_title_mark_intoc:n #1 { - \str_case:Vn \l__eb_toc_type_tl + \str_case:Vn \l__eb_toc_title_level_tl { { chapter } { \bichapter*{#1}{\eb@bitoc@title} } { section } { \bisection*{#1}{\eb@bitoc@title} } @@ -1250,7 +1254,7 @@ } \cs_new_protected:Npn \eb_title_mark_notoc:n #1 { - \str_case:Vn \l__eb_toc_type_tl + \str_case:Vn \l__eb_toc_title_level_tl { { chapter } { \chapter*{\phantomsection #1}\chaptermark{#1} } { section } { \section*{\phantomsection #1}\sectionmark{#1} } @@ -1258,10 +1262,10 @@ } \cs_new_protected:Npn \eb_title_number_intoc_spec:nn #1#2 { - \eb_toc_type_section_initial: + \eb_toc_title_level_initial: \IfBooleanTF{#1} { - \str_case:Vn \l__eb_toc_type_tl + \str_case:Vn \l__eb_toc_title_level_tl { { chapter } { \bichapter{\eb@toc@title}{\eb@bitoc@title} } { section } { \bisection{\eb@toc@title}{\eb@bitoc@title} } @@ -1274,7 +1278,7 @@ } \cs_new_protected:Npn \eb_biber_title_level_spec:n #1 { - \bool_if:NTF \l__eb_class_book_bool + \bool_if:NTF \l__eb_class_mode_book_bool { \bichapter*{#1}{\l__eb_bib_en_bitoc_title_tl} } { \bisection*{#1}{\l__eb_bib_en_bitoc_title_tl} } \sectionmark{#1} @@ -1291,7 +1295,7 @@ } \cs_new_protected:Npn \eb_toc_if_title_voffset:n #1 { - \tl_if_eq:NnF \l__eb_toc_type_tl { none } + \tl_if_eq:NnF \l__eb_toc_title_level_tl { none } { \vspace*{-\dim_use:c { l__eb_toc_#1_voffset_skip }} } } \cs_new_protected:Npn \eb_toc_list_parse:nnnnn #1#2#3#4#5 @@ -1323,7 +1327,7 @@ \tl_set_eq:NN \eb@toc@title \contentsname \tl_set:Nn \eb@bitoc@title { Contents } \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}} - \eb_toc_type_section_initial: + \eb_toc_title_level_initial: \eb_title_mark_notoc:n { \eb@toc@title } \eb_toc_if_title_voffset:n { main } \eb_toc_start_multi_column_ext:n { toc }#3 @@ -1422,7 +1426,7 @@ footnote .initial:n = \rmfamily, marginpar .tl_set:N = \marginfont, marginpar .initial:n = \rmfamily\footnotesize, - unknown .code:n = \eb_msg_unknown_option:n { subfont } + unknown .code:n = \eb_msg_abandon_option:n { subfont } } \fp_new:N \l__eb_spread_table_fp @@ -1443,7 +1447,7 @@ footnote .fp_set:N = \l__eb_spread_footnote_fp, footnote .initial:n = 1.2, spread-all .meta:n = { line = #1,table = #1,math = #1,caption = #1,footnote = #1 }, - unknown .code:n = \eb_msg_unknown_option:n { spread } + unknown .code:n = \eb_msg_abandon_option:n { spread } } \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)} @@ -1682,7 +1686,7 @@ thmbox .meta:n = { thmframe = #1 }, thmbox .default:n = true, notebraces .tl_set:N = \l__eb_thm_notebraces_tl, - unknown .code:n = \eb_msg_unknown_option:n { thmset } + unknown .code:n = \eb_msg_abandon_option:n { thmset } } \eb_patch_cmd:wnn \thmt@setheadstyle { \def\NAME{\the\thm@headfont ##1} } @@ -1701,7 +1705,7 @@ headfont = \color{ctex@emph}\sffamily, postheadspace = 1em, notebraces = {(}{)}, - within = \bool_if:NT \l__eb_class_book_bool { chapter }, + within = \bool_if:NT \l__eb_class_mode_book_bool { chapter }, headformat = \NAME\NUMBER\NOTE } \msg_new:nnn { easybase } { need-tcolorbox } @@ -1803,7 +1807,7 @@ datafile .clist_set:N = \l__eb_bib_datafile_clist, bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl, bitoc-title .initial:n = Reference, - unknown .code:n = \eb_msg_unknown_option:n { bibset } + unknown .code:n = \eb_msg_abandon_option:n { bibset } } \cs_new_protected:Npn \eb_natbib_bibtex_set: @@ -2061,7 +2065,8 @@ \ctex_define:n { lstlistlistingname .tl_set:N = \listlstlistingname, - lstlistingname .tl_set:N = \lstlistingname + lstlistingname .tl_set:N = \lstlistingname, + exercisename .tl_set:N = \exercisename } \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } { @@ -2073,7 +2078,8 @@ listfigurename = 图片索引, listtablename = 表格索引, lstlistlistingname = 代码索引, - lstlistingname = 代码 + lstlistingname = 代码, + exercisename = 练习 } \labelformat{equation}{式(#1)} \labelformat{section}{节 #1} @@ -2084,7 +2090,8 @@ { abstractname = Abstract, lstlistlistingname = List~of~Codes, - lstlistingname = Code + lstlistingname = Code, + exercisename = Exercise } \labelformat{equation}{Equation~(#1)} \labelformat{section}{Section~#1} diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 7cae1be57f3..1e788a86a93 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -20,12 +20,12 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/11/28}{1.41B} +\ProvidesExplClass{easybook}{2021/11/29}{1.41C} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool -\bool_set_true:N \l__eb_class_book_bool +\bool_set_true:N \l__eb_class_mode_book_bool \tl_new:N \g__eb_config_tl \tl_new:N \l__eb_font_choice_tl \clist_new:N \g__eb_options_clist @@ -63,7 +63,7 @@ class/book .code:n = { }, class/article .code:n = { - \bool_set_false:N \l__eb_class_book_bool + \bool_set_false:N \l__eb_class_mode_book_bool \eb_put_ctexbook:n { oneside } }, book .meta:n = { class = book }, @@ -258,7 +258,7 @@ \ctex_set:n { secnumdepth = 3, - tocdepth = \bool_if:NTF \l__eb_class_book_bool { 1 } { 2 }, + tocdepth = \bool_if:NTF \l__eb_class_mode_book_bool { 1 } { 2 }, part = { pagestyle = empty, diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 9db6c0b5c06..a7f908ba370 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -18,17 +18,18 @@ %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/28}{1.41B} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/29}{1.41C} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 { \keys_set:nn { eb/exercise } {#1} } \cs_set_protected:Npn \addtcbstyle #1#2 { \tcbset{#1/.append~style = {#2}} } -\cs_set_protected:Npn \newtcbstyle #1#2 +\cs_set_protected:Npn \deftcbstyle #1#2 { \tcbset{#1/.style = {#2}} } \cs_new_protected:Npn \tcbappstyle - { \@ifstar{\newtcbstyle}{\addtcbstyle} } + { \@ifstar{\deftcbstyle}{\addtcbstyle} } +\cs_set_eq:NN \newtcbstyle \deftcbstyle \keys_define:nn { eb/exercise } { color .tl_set:N = \eb@tc@background@color, @@ -36,7 +37,7 @@ number .tl_set:N = \eb@tc@list@number, number .initial:n = 1., title .tl_set:N = \eb@tc@exercise@title, - title .initial:n = \c__eb_name_exercise_tl, + title .initial:n = \exercisename, numsep .dim_set:N = \eb@toc@exercise@numsep, numsep .initial:n = 0.5em, tocnumsep .dim_set:N = \eb@toc@exertoc@numsep, @@ -47,7 +48,7 @@ } \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } -\newtcbstyle{tc-theorem} +\deftcbstyle{tc-theorem} { enhanced~jigsaw,pad~at~break* = 3pt, opacityback = 0, @@ -58,7 +59,7 @@ top = \eb@tc@line@skip,bottom = \eb@tc@line@skip, middle = \eb@tc@line@skip } -\newtcbstyle{tc-outline} +\deftcbstyle{tc-outline} { enhanced,nofloat, tikznode~boxed~title, @@ -71,14 +72,14 @@ arc = 3pt, left = 2pc,right = 2pc,top = 1.5pc,bottom = 1pc } -\newtcbstyle{tc-exercise} +\deftcbstyle{tc-exercise} { blank,on~line,center, sharpish~corners, fontupper = \Large\sffamily, beforeafter~skip = 3.75ex plus .2ex minus .1ex } -\newtcbstyle{tc-easybox} +\deftcbstyle{tc-easybox} { enhanced~jigsaw,pad~at~break* = 3pt, center~title, @@ -92,7 +93,7 @@ titlerule = 0pt, beforeafter~skip = 1.75ex plus .2ex minus .1ex } -\newtcbstyle{tc-ebparbox} +\deftcbstyle{tc-ebparbox} { frame~hidden, enhanced~jigsaw,pad~at~break* = 3pt, @@ -102,15 +103,15 @@ middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip, beforeafter~skip = 1.75ex plus .2ex minus .1ex } -\newtcbstyle{tc-ebemph}{on~line,blank} -\newtcbstyle{tc-eblink} +\deftcbstyle{tc-ebemph}{on~line,blank} +\deftcbstyle{tc-eblink} { standard~jigsaw,on~line, top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt, boxrule = 0.5pt,arc = 1pt, opacityback = 0.2 } -\newtcbstyle{tc-ebfbox} +\deftcbstyle{tc-ebfbox} { on~line,sharpish~corners, top = 1.5pt,bottom = 1.5pt,left = 1pt,right = 1pt, @@ -132,7 +133,6 @@ \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1} \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2} } -\eb_thm_name_set:nnn { exercise } { Exercise } { 练习 } \tcphantomifname { \markright -- cgit v1.2.3