diff options
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r-- | macros/latex/contrib/easybook/easybook.dtx | 83 |
1 files changed, 48 insertions, 35 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index ce53b48600..9e6d709139 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/12/08}{1.41N} +\ProvidesExplClass{easybook}{2021/12/10}{1.41O} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -270,25 +270,23 @@ { \hspace{1em} } }, beforeskip = -1.5ex, - afterskip = 3ex, - lotskip = 0.8pc, - lofskip = 0.8pc + afterskip = 4ex }, section = { hang = true, format = \color{ctex@frame}\sffamily\Large, aftername = \hspace{0.5em}, - beforeskip = 1.5ex plus .2ex minus .1ex, - afterskip = 1.5ex plus .2ex minus .1ex + beforeskip = 2ex plus .2ex minus .1ex, + afterskip = 2ex plus .2ex minus .1ex }, subsection = { hang = true, format = \color{ctex@frame}\sffamily\large, aftername = \hspace{0.5em}, - beforeskip = 1.3ex plus .2ex minus .1ex, - afterskip = 1.3ex plus .2ex minus .1ex + beforeskip = 1.5ex plus .2ex minus .1ex, + afterskip = 1.5ex plus .2ex minus .1ex }, subsubsection = { @@ -311,7 +309,7 @@ %<*package> \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 } @@ -1896,7 +1894,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: { @@ -1956,13 +1954,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{}} @@ -1978,14 +1975,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 @@ -2048,17 +2050,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] } @@ -2430,7 +2433,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/08}{1.41N} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/10}{1.41O} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 @@ -2489,7 +2492,7 @@ blank,on~line,center, sharpish~corners, fontupper = \Large\sffamily, - beforeafter~skip = 3.75ex plus .2ex minus .1ex + beforeafter~skip = 5ex plus .2ex minus .1ex } \deftcbstyle{tc-easybox} { @@ -2572,7 +2575,7 @@ \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} +\DeclareDocumentEnvironment{outline}{O{}D(){\abstractname}o+b} { \begin{eb@tc@outline@box}{#2}{IfValueT = {#3}{#3}} \begin{eb@outline@list}[#1] @@ -2580,7 +2583,7 @@ \end{eb@outline@list} \end{eb@tc@outline@box} }{} -\NewDocumentEnvironment{exercise}{st+od()O{}+b} +\DeclareDocumentEnvironment{exercise}{st-od()O{}+b} { \IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} } \IfBooleanF{#2} @@ -2637,9 +2640,19 @@ coltitle = #2,tc-ebparbox,#4 } \DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}} - {colback = #1!10!white,colframe = #1!50!black,tc-ebfbox,#3}{#2} + { + colback = #1!10!white, + colframe = #1!50!black, + tc-ebfbox,#3 + }{#2} \DeclareTotalTCBox{\ebemph}{O{DarkSeaGreen}vO{}} - {fuzzy~halo = 2pt~with~#1,tc-ebemph,#3}{#2} + { + fuzzy~halo = 2pt~with~#1, + tc-ebemph,#3 + }{#2} \DeclareTotalTCBox{\eblink}{O{Aqua}vO{}} - {colback = #1,colframe = #1,tc-eblink,#3}{#2} + { + colback = #1,colframe = #1, + tc-eblink,#3 + }{#2} %</tcolorbox>
\ No newline at end of file |