diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 79 |
1 files changed, 35 insertions, 44 deletions
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index 053bb668e8d..2872218cb2e 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/10/21}{1.40} +\ProvidesExplClass{easybook}{2021/10/21}{1.40A} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -319,7 +319,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/10/21}{1.40} +\ProvidesExplPackage{easybase}{2021/10/21}{1.40A} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -332,7 +332,7 @@ \cs_generate_variant:Nn \eb_put_hyperref:n { x } \cs_generate_variant:Nn \eb_at_begin_environment:nn { on } -\cs_new_protected:Npn \ctex_define:nn #1 +\cs_set_protected:Npn \ctex_define:nn #1 { \keys_define:nn { ctex/#1 } } \cs_new_protected:Npn \eb_clist_map_inline:nn #1#2 { @@ -386,10 +386,10 @@ \cs_new_protected:Npn \eb_if_package_loaded:nF #1#2 { \@ifpackageloaded{#1} - {\msg_warning:nnn { easybase } { package-loaded } {#1}} + {\msg_warning:nnn { easybase } { package-reloaded } {#1}} {#2\disable@package@load{#1}{}} } -\msg_new:nnn { easybase } { package-loaded } +\msg_new:nnn { easybase } { package-reloaded } { The~macro~package~#1~has~been~reloaded. \\ Please~pass~the~arguments~by \\ @@ -939,7 +939,7 @@ \group_begin: \footnotesize \exp_args:Nx - \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont + \setspread{ \fp_use:N \l__eb_spread_footnote_fp } \exp_args:NNNo \group_end: \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } \bool_if:NT \l__eb_chap_counter_withpart_bool @@ -951,6 +951,7 @@ } \eb_fnpara_if_pos_bottom: } +\cs_new_protected:Npn \setspread #1 { \linespread{#1}\selectfont } \cs_new_protected:Npn \eb_fnpara_if_pos_bottom: { \bool_if:NT \l__eb_fnpara_bottom_bool @@ -1084,8 +1085,7 @@ \eb_patch_cmd:wnn { \@footnotetext,\@mpfootnotetext } { \reset@font } { - \linespread{\fp_use:N \l__eb_spread_footnote_fp} - \selectfont\ignorespaces + \setspread{\fp_use:N \l__eb_spread_footnote_fp} \l__eb_subfont_footnote_tl } \ctex_at_end_package:nn { hyperref } @@ -1809,24 +1809,20 @@ } \IfPackageAtLeastTF{tabularray}{2021/07/01} { - \SetTblrInner - { - rows = {abovesep = 4pt,belowsep = 2pt}, - stretch = \fp_use:N \l__eb_spread_table_fp - } \NewTableCommand{\toprule}[1][1pt]{\hline[#1]} \NewTableCommand{\midrule}[1][0.5pt]{\hline[#1]} \NewTableCommand{\bottomrule}[1][1pt]{\hline[#1]} + \SetTblrInner{stretch = \fp_use:N \l__eb_spread_table_fp} }{} \eb_at_begin_environment:nn { tabular,tabularx } { - \exp_args:Nx \linespread { \fp_use:N \l__eb_spread_table_fp } - \selectfont\ignorespaces + \exp_args:Nx + \setspread { \fp_use:N \l__eb_spread_table_fp } } \ctex_after_end_preamble:n { - \exp_args:Nx \linespread { \fp_use:N \l__eb_spread_line_fp } - \selectfont\ignorespaces + \exp_args:Nx + \setspread { \fp_use:N \l__eb_spread_line_fp } } \bool_if:NF \l__eb_float_page_bool @@ -1982,7 +1978,7 @@ \RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}} {\eb@declaretheoremsyle@save[#1,#3]{#2}} \cs_set_eq:NN \newtheorem \declaretheorem -\NewDocumentCommand{\DeclareTheorem} +\NewDocumentCommand{\deftheorem} {mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}} { \eb_thm_name_set:nnn {#1} {#2} {#3} @@ -2003,21 +1999,21 @@ Now~that~the~thmframe~option~is~true. \\ Please~load~the~tcolorbox~macro~package. } -\cs_set_eq:NN \EBNewTheorem \DeclareTheorem +\cs_set_eq:NN \DeclareTheorem \deftheorem \prop_new:N \l__eb_thmtools_entry_prop \clist_const:Nn \c__eb_thmtools_entry_clist { - spaceabove = \l__eb_thm_spaceabove_tl, - spacebelow = \l__eb_thm_spacebelow_tl, - headindent = \l__eb_thm_headindent_tl, + within = \l__eb_thm_within_tl, headfont = \l__eb_thm_headfont_tl, notefont = \l__eb_thm_notefont_tl, bodyfont = \l__eb_thm_bodyfont_tl, headpunct = \l__eb_thm_headpunct_tl, - postheadspace = \l__eb_thm_postheadspace_tl, - within = \l__eb_thm_within_tl, - headformat = \l__eb_thm_headformat_tl + spaceabove = \l__eb_thm_spaceabove_tl, + spacebelow = \l__eb_thm_spacebelow_tl, + headindent = \l__eb_thm_headindent_tl, + headformat = \l__eb_thm_headformat_tl, + postheadspace = \l__eb_thm_postheadspace_tl } \prop_set_from_keyval:NV \l__eb_thmtools_entry_prop \c__eb_thmtools_entry_clist @@ -2061,14 +2057,14 @@ \declaretheoremstyle[\c__eb_thmtools_entry_clist]{easy-theorem} \eb_thm_name_set:nnn { exercise } { Exercise } { 练习 } \cs_undefine:N \proof - \DeclareTheorem{lemma}{引理} - \DeclareTheorem{example}{例} - \DeclareTheorem{theorem}{定理} - \DeclareTheorem{corollary}{推论} - \DeclareTheorem{definition}{定义} - \DeclareTheorem{proposition}{性质} - \DeclareTheorem{remark}{注}[numbered = no] - \DeclareTheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{lemma}{引理} + \deftheorem{example}{例} + \deftheorem{theorem}{定理} + \deftheorem{corollary}{推论} + \deftheorem{definition}{定义} + \deftheorem{proposition}{性质} + \deftheorem{remark}{注}[numbered = no] + \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] } \setchemformula @@ -2100,22 +2096,19 @@ cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*, aligned,alignedat,gathered,multlined,lgathered,rgathered } - { - \linespread{\fp_use:N \l__eb_spread_math_fp} - \selectfont\ignorespaces - } + { \setspread{\fp_use:N \l__eb_spread_math_fp} } \eb_patch_cmd:wnn { \start@gather,\start@align,\start@multline } { \collect@body } { - \linespread{\fp_use:N \l__eb_spread_math_fp} - \selectfont\collect@body + \setspread{\fp_use:N \l__eb_spread_math_fp} + \collect@body } \eb_patch_cmd:wnn \gather@split { \spread@equation } { - \linespread{\fp_use:N \l__eb_spread_math_fp} - \selectfont\spread@equation + \setspread{\fp_use:N \l__eb_spread_math_fp} + \spread@equation } \ctex_after_end_preamble:n { @@ -2167,12 +2160,10 @@ backend/bibtex .code:n = { }, backend/biblatex .code:n = { \bool_set_false:N \l__eb_backend_bibtex_bool }, - bibstyle .code:n = { \tl_set:Nn \l__eb_bib_all_style_tl {#1} }, bibstyle .value_required:n = true, bibstyle .initial:n = numerical, - citestyle .code:n = { \tl_set:Nn \l__eb_bib_cite_style_tl {#1} }, datafile .clist_set:N = \l__eb_bib_datafile_clist, @@ -2468,7 +2459,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/21}{1.40} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/21}{1.40A} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } |