diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.pdf | bin | 594563 -> 594601 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.tex | 10 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 56 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 36 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 18 |
6 files changed, 75 insertions, 47 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf Binary files differindex 01f18259c0a..5e44f4860a0 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.pdf +++ b/Master/texmf-dist/doc/latex/easybook/easybook.pdf diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.tex b/Master/texmf-dist/doc/latex/easybook/easybook.tex index c0ccb8a86f5..f625f1edf2b 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.41O, - date = 2021/12/10, + version = v1.41P, + date = 2021/12/11, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -593,7 +593,7 @@ 文档类已预置 12 个定理环境,环境名及对应的定理名见小节 \ref{subsec:theorem},它们均使用预置的定理样式 \code{eb-theorem}。下面 \module*{thmset} 模块选项的用法名称与 \pkg*{thmtools} 宏包基本一致,且仅对预置定理样式生效。如果下面的选项不满足需求,可使用支持完整选项的相关命令创建定理环境。 \begin{options} \keybool{thmframe}\Module{thmset}\Default{false} - 给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。\pkg*{thmtools} 具有类似的选项 \option*{thmbox},可在新建定理样式的命令中使用。 + 给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。注意它应当在定理声明命令前使用。\pkg*{thmtools} 具有类似的选项 \option*{thmbox}。 \keyval-{headfont}{字体命令}\Default{\cs*{color}\Carg{ctex@emph}\cs*{sffamily}} 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{notefont}{字体命令}\Default @@ -1052,8 +1052,8 @@ \end{options} \command{setexerlist}[\marg{键值列表3}] 命令 \cs{setexerlist} 用于全局设置习题条目选项 \meta{键值列表3} 的值。\meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。 - \command{exerprologue}[\marg{序言内容}] - 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。 + \command{exerprologue}[\sarg\marg{序言内容}] + 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。带有星号参数的命令会使序言在习题环境一直有效。 \command{tcphantomifname}[\marg{编号代码}\marg{不编号代码}] 命令 \cs{tcphantomifname} 根据使用 \pkg*{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \cs*{addcontentsline} 命令将习题标题加入目录。 \end{commands} diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index 9e6d7091399..5d3b335dee8 100644 --- a/Master/texmf-dist/source/latex/easybook/easybook.dtx +++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/12/10}{1.41O} +\ProvidesExplClass{easybook}{2021/12/11}{1.41P} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -309,7 +309,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/12/10}{1.41O} +\ProvidesExplPackage{easybase}{2021/12/11}{1.41P} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1957,8 +1957,8 @@ \cs_new_protected:Npn \eb_thm_biname_set:nnn #1#2#3 { \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } - { \tl_set:cn { c__eb_thm_biname_#1_tl } {#3} } - { \tl_set:cn { c__eb_thm_biname_#1_tl } {#2} } + { \tl_set:cn { l__eb_thm_biname_#1_tl } {#3} } + { \tl_set:cn { l__eb_thm_biname_#1_tl } {#2} } } \cs_set_eq:NN \eb@declaretheorem@save \declaretheorem \cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle @@ -1982,12 +1982,18 @@ } \eb_thm_biname_set:nnn {#1} {#2} {#3} \declaretheorem{#1}[ - name = \tl_use:c { c__eb_thm_biname_#1_tl }, + name = \tl_use:c { l__eb_thm_biname_#1_tl }, style = eb-theorem,#5 ] \eb_if_thmframe_with_tcolorbox:TF - { \tcolorboxenvironment{#1}{#4} } { } - \labelformat{#1}{\tl_use:c { c__eb_thm_biname_#1_tl }~##1} + { + \bool_if_exist:cTF { l__eb_tcb_repeat_env_#1_bool } + { \bool_set_true:c { l__eb_tcb_repeat_env_#1_bool } } + { \bool_set_false:c { l__eb_tcb_repeat_env_#1_bool } } + \bool_if:cF { l__eb_tcb_repeat_env_#1_bool } + { \tcolorboxenvironment{#1}{#4} } + } { } + \labelformat{#1}{\tl_use:c { l__eb_thm_biname_#1_tl }~##1} } \prop_new:N \l__eb_thmtools_entry_prop @@ -2051,18 +2057,18 @@ \c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl } \exp_last_unbraced:NNV \declaretheoremstyle[\c__eb_thmtools_entry_clist]{eb-theorem} - \deftheorem{lemma}{引理} - \deftheorem{axiom}{公理} - \deftheorem{example}{例} - \deftheorem{problem}{问题} - \deftheorem{theorem}{定理} - \deftheorem{corollary}{推论} + \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{remark}{注}[numbered = no] + \deftheorem{proposition}{性质} \deftheorem{assumption}{假设} \deftheorem{conjecture}{猜想} \deftheorem{definition}{定义} - \deftheorem{proposition}{性质} - \deftheorem{remark}{注}[numbered = no] - \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{corollary}{推论} + \deftheorem{problem}{问题} + \deftheorem{theorem}{定理} + \deftheorem{example}{例} + \deftheorem{axiom}{公理} + \deftheorem{lemma}{引理} } \setchemformula @@ -2433,7 +2439,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/10}{1.41O} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/11}{1.41P} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 @@ -2542,8 +2548,15 @@ \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} } -\cs_new:Npn \tcphantomifname #1#2 +\bool_gset_true:N \g__eb_exer_clear_prologue_bool +\NewDocumentCommand{\exerprologue}{sm} + { + \IfBooleanTF{#1} + {\bool_gset_false:N \g__eb_exer_clear_prologue_bool} + {\bool_gset_true:N \g__eb_exer_clear_prologue_bool} + \tl_gset:Nn \eb@tc@list@prologue {#2} + } +\cs_new_protected:Npn \tcphantomifname #1#2 { \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1} \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2} @@ -2561,7 +2574,7 @@ \eb@tc@exercise@title } }{} -\cs_set:Npn \eb_exercise_label_noempty_use: +\cs_new:Npn \eb_exercise_label_noempty_use: { \eb_current_label:n { eb@exercise } \tl_if_empty:NF \eb@tc@exercise@label @@ -2613,7 +2626,8 @@ \begin{eb@exercise@list}[\eb@tc@list@number,#5] #6 \end{eb@exercise@list} - \tl_gclear:N \eb@tc@list@prologue + \bool_if:NT \g__eb_exer_clear_prologue_bool + { \tl_gclear:N \eb@tc@list@prologue } }{} \DeclareTColorBox{easybox}{sO{Khaki}d()O{}} { diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 5c3ce19c7ba..7b1df4f30e3 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/12/10}{1.41O} +\ProvidesExplPackage{easybase}{2021/12/11}{1.41P} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1668,8 +1668,8 @@ \cs_new_protected:Npn \eb_thm_biname_set:nnn #1#2#3 { \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } - { \tl_set:cn { c__eb_thm_biname_#1_tl } {#3} } - { \tl_set:cn { c__eb_thm_biname_#1_tl } {#2} } + { \tl_set:cn { l__eb_thm_biname_#1_tl } {#3} } + { \tl_set:cn { l__eb_thm_biname_#1_tl } {#2} } } \cs_set_eq:NN \eb@declaretheorem@save \declaretheorem \cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle @@ -1693,12 +1693,18 @@ } \eb_thm_biname_set:nnn {#1} {#2} {#3} \declaretheorem{#1}[ - name = \tl_use:c { c__eb_thm_biname_#1_tl }, + name = \tl_use:c { l__eb_thm_biname_#1_tl }, style = eb-theorem,#5 ] \eb_if_thmframe_with_tcolorbox:TF - { \tcolorboxenvironment{#1}{#4} } { } - \labelformat{#1}{\tl_use:c { c__eb_thm_biname_#1_tl }~##1} + { + \bool_if_exist:cTF { l__eb_tcb_repeat_env_#1_bool } + { \bool_set_true:c { l__eb_tcb_repeat_env_#1_bool } } + { \bool_set_false:c { l__eb_tcb_repeat_env_#1_bool } } + \bool_if:cF { l__eb_tcb_repeat_env_#1_bool } + { \tcolorboxenvironment{#1}{#4} } + } { } + \labelformat{#1}{\tl_use:c { l__eb_thm_biname_#1_tl }~##1} } \prop_new:N \l__eb_thmtools_entry_prop @@ -1762,18 +1768,18 @@ \c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl } \exp_last_unbraced:NNV \declaretheoremstyle[\c__eb_thmtools_entry_clist]{eb-theorem} - \deftheorem{lemma}{引理} - \deftheorem{axiom}{公理} - \deftheorem{example}{例} - \deftheorem{problem}{问题} - \deftheorem{theorem}{定理} - \deftheorem{corollary}{推论} + \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{remark}{注}[numbered = no] + \deftheorem{proposition}{性质} \deftheorem{assumption}{假设} \deftheorem{conjecture}{猜想} \deftheorem{definition}{定义} - \deftheorem{proposition}{性质} - \deftheorem{remark}{注}[numbered = no] - \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{corollary}{推论} + \deftheorem{problem}{问题} + \deftheorem{theorem}{定理} + \deftheorem{example}{例} + \deftheorem{axiom}{公理} + \deftheorem{lemma}{引理} } \setchemformula diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 4cb559626b0..53c708fd4c5 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/12/10}{1.41O} +\ProvidesExplClass{easybook}{2021/12/11}{1.41P} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 98e1ca27c09..a6d651249d8 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -18,7 +18,7 @@ %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/10}{1.41O} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/11}{1.41P} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 @@ -127,8 +127,15 @@ \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} } -\cs_new:Npn \tcphantomifname #1#2 +\bool_gset_true:N \g__eb_exer_clear_prologue_bool +\NewDocumentCommand{\exerprologue}{sm} + { + \IfBooleanTF{#1} + {\bool_gset_false:N \g__eb_exer_clear_prologue_bool} + {\bool_gset_true:N \g__eb_exer_clear_prologue_bool} + \tl_gset:Nn \eb@tc@list@prologue {#2} + } +\cs_new_protected:Npn \tcphantomifname #1#2 { \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1} \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2} @@ -146,7 +153,7 @@ \eb@tc@exercise@title } }{} -\cs_set:Npn \eb_exercise_label_noempty_use: +\cs_new:Npn \eb_exercise_label_noempty_use: { \eb_current_label:n { eb@exercise } \tl_if_empty:NF \eb@tc@exercise@label @@ -198,7 +205,8 @@ \begin{eb@exercise@list}[\eb@tc@list@number,#5] #6 \end{eb@exercise@list} - \tl_gclear:N \eb@tc@list@prologue + \bool_if:NT \g__eb_exer_clear_prologue_bool + { \tl_gclear:N \eb@tc@list@prologue } }{} \DeclareTColorBox{easybox}{sO{Khaki}d()O{}} { |