diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook/easybase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 5da7c26c70a..5c3ce19c7ba 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/08}{1.41N} +\ProvidesExplPackage{easybase}{2021/12/10}{1.41O} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1605,7 +1605,7 @@ mode .initial:n = math } \cs_new_protected:Npn \seteqcomp #1 - { \keys_set:nn { eb/eqcomp} {#1} } + { \keys_set:nn { eb/eqcomp } {#1} } \cs_new:Npn \eb_eqsymb_left_margin_calc: { @@ -1665,13 +1665,12 @@ \ignorespaces } -\cs_new_protected:Npn \eb_thm_name_set:nnn #1#2#3 +\cs_new_protected:Npn \eb_thm_biname_set:nnn #1#2#3 { \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } - { \tl_const:cn { c__eb_name_#1_tl } {#3} } - { \tl_const:cn { c__eb_name_#1_tl } {#2} } + { \tl_set:cn { c__eb_thm_biname_#1_tl } {#3} } + { \tl_set:cn { c__eb_thm_biname_#1_tl } {#2} } } -\cs_undefine:N \proof \cs_set_eq:NN \eb@declaretheorem@save \declaretheorem \cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle \RenewDocumentCommand{\declaretheorem}{O{}mO{}} @@ -1687,14 +1686,19 @@ \NewDocumentCommand{\deftheorem} {mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}} { - \eb_thm_name_set:nnn {#1} {#2} {#3} + \AtBeginDocument + { + \cs_undefine:c {#1} + \cs_undefine:c { c@#1 } + } + \eb_thm_biname_set:nnn {#1} {#2} {#3} \declaretheorem{#1}[ - name = \tl_use:c { c__eb_name_#1_tl }, - style = easy-theorem,#5 + name = \tl_use:c { c__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_name_#1_tl }~##1} + \labelformat{#1}{\tl_use:c { c__eb_thm_biname_#1_tl }~##1} } \prop_new:N \l__eb_thmtools_entry_prop @@ -1757,17 +1761,18 @@ \clist_put_right:Nx \c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl } \exp_last_unbraced:NNV - \declaretheoremstyle[\c__eb_thmtools_entry_clist]{easy-theorem} - \deftheorem{exam}{例} - \deftheorem{conj}{猜想} - \deftheorem{defi}{定义} - \deftheorem{prop}{性质} - \deftheorem{lemm}{引理} - \deftheorem{theo}{定理} - \deftheorem{corol}{推论} - \deftheorem{assum}{假设} + \declaretheoremstyle[\c__eb_thmtools_entry_clist]{eb-theorem} + \deftheorem{lemma}{引理} \deftheorem{axiom}{公理} - \deftheorem{rema}{注}[numbered = no] + \deftheorem{example}{例} + \deftheorem{problem}{问题} + \deftheorem{theorem}{定理} + \deftheorem{corollary}{推论} + \deftheorem{assumption}{假设} + \deftheorem{conjecture}{猜想} + \deftheorem{definition}{定义} + \deftheorem{proposition}{性质} + \deftheorem{remark}{注}[numbered = no] \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] } |