diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-11 21:18:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-11 21:18:38 +0000 |
commit | 027724299ad310e639ea7cd6648a10213f83734b (patch) | |
tree | 117e14485733dfef0b2938e9b22c9ab5213963fc /Master/texmf-dist/source | |
parent | 837b68932893186d5a192f1e7effe8ae60ff5629 (diff) |
easybook (11dec21)
git-svn-id: svn://tug.org/texlive/trunk@61276 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 56 |
1 files changed, 35 insertions, 21 deletions
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{}} { |