diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook/easybase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 62 |
1 files changed, 43 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index c26e8937c5b..153dad9cb12 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}[2021/11/15] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2024/02/08}{2024z} +\ProvidesExplPackage{easybase}{2024/02/11}{2024ab} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -461,18 +461,42 @@ { \ding{\int_eval:n { 191 + #1 }} } \cs_new_protected:Npn \eb_fnmarktext_counter_pisans_neg:N #1 { \ding{\int_eval:n { 201 + #1 }} } -\cs_new_protected:Npn \DefineFntSymbols #1#2#3 +\cs_new:Npn \eb_fnt_map_symbols_list:n #1 + { + \eb_fnt_map_symbols_list:nn #1 + \q_recursion_tail \q_recursion_tail + \q_recursion_stop + } +\cs_new:Npn \eb_fnt_map_symbols_list:nn #1#2 + { + \quark_if_recursion_tail_stop:n {#1} + \quark_if_recursion_tail_stop:n {#2} + { #1 + \int_use:N \c@footnote } {#2} + \eb_fnt_map_symbols_list:nn + } +\cs_new_protected:Npn \SetFntSymbsList #1#2#3 { \cs_set_protected:cpn { eb@use@fnt@symbol@#1 } { - \cs_set:Npn \eb_int_to_symbols:n ####1 - { \int_to_symbols:nnn {####1} {#2} {#3} } + \cs_set:Npx \eb_int_to_symbols:n ####1 + { + \exp_not:N \int_to_symbols:nnn {####1} + { #2 + \int_use:N \c@footnote } + { \eb_fnt_map_symbols_list:n {#3} } + } } } -\cs_new_protected:Npn \setfntsymbol #1 - { \use:c { eb@use@fnt@symbol@#1 } } -\DefineFntSymbols{empty}{1}{} -\setfntsymbol{empty} +\cs_new_protected:Npn \UseFntSymbsList #1 + { + \cs_if_exist_use:cF { eb@use@fnt@symbol@#1 } + { \msg_warning:nnn { easybase } { undefined-fntsymbol } {#1} } + } +\msg_new:nnn { easybase } { undefined-fntsymbol } + { The~list~of~footnote~symbols~'#1'~isn't~defined. } +\SetFntSymbsList{empty}{1}{} +\UseFntSymbsList{empty} +\cs_set_eq:NN \DefineFntSymbols \SetFntSymbsList +\cs_set_eq:NN \setfntsymbol \UseFntSymbsList \cs_new:Npn \eb_int_format_trans:NN #1 { \str_case:nn {#1} @@ -569,13 +593,13 @@ \clist_new:N \l__eb_footnote_value_clist \ctex_define:nn { hdrset } { - fnfirstindent .dim_set:N = \fnfirstindent, - fnfirstindent .initial:n = 0.8em, - fnafterindent .dim_set:N = \fnafterindent, + fnfirstindent .tl_set:N = \fnfirstindent, + fnfirstindent .initial:n = 1em, + fnafterindent .tl_set:N = \fnafterindent, fnafterindent .initial:n = 2em, - fnparskip .skip_set:N = \fnparskip, + fnparskip .tl_set:N = \fnparskip, fnparskip .initial:n = 0ex plus .1ex, - footnotesep .skip_set:N = \footnotesep, + footnotesep .dim_set:N = \footnotesep, fnpara-format .tl_set:N = \l__eb_fnpara_format_tl, fntext-pos .tl_set:N = \l__eb_fntext_position_tl, fntext-pos .initial:n = super, @@ -1201,7 +1225,7 @@ \tl_use:c { l__eb_toc_#1_after_tl } } } -\cs_new_protected:Npn \eb@toc@format@define #1 +\cs_new_protected:Npn \eb_toc_format_define:n #1 { \ctex_define:n { @@ -1215,7 +1239,7 @@ #1/tocbelow .tl_set:c = l__eb_toc_#1_below_tl } } -\cs_new_protected:Npn \eb@toc@format@initial #1 +\cs_new_protected:Npn \eb_toc_format_initial:n #1 { \titlecontents{#1} [\dim_use:c { l__eb_toc_#1_indent_dim }] @@ -1232,8 +1256,8 @@ } \cs_new_protected:Npn \RegisterTocName #1 { - \eb@toc@format@define{#1} - \eb@toc@format@initial{#1} + \eb_toc_format_define:n {#1} + \eb_toc_format_initial:n {#1} } \seq_map_function:NN \c__ctex_headings_seq \RegisterTocName @@ -1306,12 +1330,12 @@ \cs_set_eq:NN \eb@ctexsetii \ctex_set:nn \cs_new_protected:Npn \SetTocStyle #1#2#3 { - \tl_set:cn { eb@toc@style@set@#1@#2 } + \cs_set:cpn { eb@toc@style@set@#1@#2 } { \eb@ctexsetii{#1}{#3} } } \cs_new_protected:Npn \UseTocStyle #1#2#3 { - \tl_if_exist:cTF { eb@toc@style@set@#1@#2 } + \cs_if_exist:cTF { eb@toc@style@set@#1@#2 } { \addtocontents{#3}{\@nameuse{eb@toc@style@set@#1@#2}} } { \msg_warning:nnnn { easybase } { undefined-toc-style } {#2} {#1} } } |