diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/easybook/easybook.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 115 |
1 files changed, 57 insertions, 58 deletions
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index d1a50adb6b1..6fef9a504ac 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/20}{1.3S} +\ProvidesExplClass{easybook}{2021/10/21}{1.3X} {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/20}{1.3S} +\ProvidesExplPackage{easybase}{2021/10/21}{1.3X} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -394,7 +394,7 @@ { The~macro~package~#1~has~been~reloaded. \\ Please~pass~the~arguments~by \\ - the~\string\PassOptionsToPackage{\#1}{#1}\space~command. + the~\string\PassOptionsToPackage{\#1}{#1}\ command. } \cs_set_eq:NN \eb@usepackage@save \usepackage \RenewDocumentCommand{\usepackage}{O{}m} @@ -523,7 +523,7 @@ \msg_new:nnn { easybase } { no-chapter } { Your~document~class~is~in~article~mode. \\ - The~\string\chapter\space~command~will~not~be~used. + The~\string\chapter\ command~will~not~be~used. } \LoadPackage @@ -778,23 +778,23 @@ footwith .value_required:n = true, footwith .initial:n = chapter } -\NewDocumentCommand{\eb_assign_fnmark_code:n} +\NewDocumentCommand{\eb_assign_fntext_code:n} {>{\SplitArgument{1}{,}}m} {\eb_assign_fnmark_code_pos:nn #1} \cs_new_protected:Npn \eb_assign_fnmark_code_pos:nn #1#2 { - \tl_set:Nn \l__eb_fnmark_before_tl {#1} + \tl_set:Nn \l__eb_fntext_before_tl {#1} \tl_if_novalue:nTF {#2} - { \tl_clear:N \l__eb_fnmark_after_tl } - { \tl_set:Nn \l__eb_fnmark_after_tl {#2} } + { \tl_clear:N \l__eb_fntext_after_tl } + { \tl_set:Nn \l__eb_fntext_after_tl {#2} } } -\cs_new:Npn \eb_fnmark_counter_pifont:N #1 +\cs_new:Npn \eb_fnmate_counter_pifont:N #1 { \ding{\int_eval:n { 171 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1 +\cs_new:Npn \eb_fnmate_counter_pifont_neg:N #1 { \ding{\int_eval:n { 181 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pisans:N #1 +\cs_new:Npn \eb_fnmate_counter_pisans:N #1 { \ding{\int_eval:n { 191 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pisans_neg:N #1 +\cs_new:Npn \eb_fnmate_counter_pisans_neg:N #1 { \ding{\int_eval:n { 201 + #1 }} } \cs_new:Npn \eb_int_format_trans:NN #1 { @@ -808,41 +808,41 @@ { c } { \exp_args:NV \zhnumber } } } -\cs_new_protected:Npn \eb_fnmark_normal_label_set:nn #1#2 +\cs_new_protected:Npn \eb_fnmate_normal_label_set:nn #1#2 { - \tl_set:Nn \l__eb_fnmark_number_type_tl {#1} + \tl_set:Nn \l__eb_fnmate_number_type_tl {#1} \cs_set:cpx {#2} { - \str_case:VnT \l__eb_fnmark_number_type_tl + \str_case:VnT \l__eb_fnmate_number_type_tl { { plain } { \exp_not:N \int_use:N } { pifont } - { \exp_not:N \eb_fnmark_counter_pifont:N } + { \exp_not:N \eb_fnmate_counter_pifont:N } { pifont* } - { \exp_not:N \eb_fnmark_counter_pifont_neg:N } + { \exp_not:N \eb_fnmate_counter_pifont_neg:N } { pisans } - { \exp_not:N \eb_fnmark_counter_pisans:N } + { \exp_not:N \eb_fnmate_counter_pisans:N } { pisans* } - { \exp_not:N \eb_fnmark_counter_pisans_neg:N } + { \exp_not:N \eb_fnmate_counter_pisans_neg:N } } { \exp_not:N \c@footnote } } } -\cs_new_protected:Npn \eb_fnmark_short_label_set:nn #1#2 +\cs_new_protected:Npn \eb_fnmate_short_label_set:nn #1#2 { - \tl_set:Nn \l__eb_fnmark_short_tokens_tl {#1} + \tl_set:Nn \l__eb_fnmate_short_tokens_tl {#1} \eb_clist_map_inline:nn { A,a,1,I,i,c } { \tl_if_in:nnT {#1} {##1} { - \tl_replace_once:Nnn \l__eb_fnmark_short_tokens_tl {##1} + \tl_replace_once:Nnn \l__eb_fnmate_short_tokens_tl {##1} { \eb_int_format_trans:NN ##1 \c@footnote } \seq_map_break: } } - \cs_set_eq:cN {#2} \l__eb_fnmark_short_tokens_tl + \cs_set_eq:cN {#2} \l__eb_fnmate_short_tokens_tl } \cs_new_protected:Npn \eb_footnote_choice_handle:n #1 { @@ -863,7 +863,7 @@ { \tl_set:Nn \l__eb_footnote_choice_tl {#1} } } } -\cs_new_protected:Npn \eb_fn_shift_set:nnn #1#2#3 +\cs_new_protected:Npn \eb_fnmate_shift_set:nnn #1#2#3 { \str_if_eq:nnTF {#1} { match } { @@ -872,7 +872,7 @@ } { \tl_set:cn { l__eb_fn#2_#3shift_tl } {#1} } } -\cs_new_protected:Npn \eb_fn_format_set:nn #1#2 +\cs_new_protected:Npn \eb_fnboth_format_set:nn #1#2 { \str_if_eq:nnTF {#1} { match } { \bool_set_true:c { l__eb_fn#2_format_match_bool } } @@ -898,11 +898,11 @@ fntext-pos .tl_set:N = \l__eb_fntext_position_tl, fntext-pos .initial:n = super, - fntext-code .code:n = \eb_assign_fnmark_code:n {#1}, + fntext-code .code:n = \eb_assign_fntext_code:n {#1}, fntext-code .initial:n = - { ,\tl_if_eq:NnF \l__eb_fntext_position_tl { super } { \space } }, - fnmate-form .code:n = \eb_fn_format_set:nn {#1} { mate }, - fncust-form .code:n = \eb_fn_format_set:nn {#1} { cust }, + { ,\tl_if_eq:NnF \l__eb_fntext_position_tl { super } { ~ } }, + fnmate-form .code:n = \eb_fnboth_format_set:nn {#1} { mate }, + fncust-form .code:n = \eb_fnboth_format_set:nn {#1} { cust }, fnboth-form .meta:n = { fnmate-form = #1,fncust-form = #1 }, footnotetype .multichoices:nn = @@ -911,25 +911,25 @@ footnotetype .value_required:n = true, footnotetype .initial:n = hang, - fnmark-vshift .code:n = \eb_fn_shift_set:nnn {#1} { mark } { v }, - fnmark-hshift .code:n = \eb_fn_shift_set:nnn {#1} { mark } { h }, - fntext-vshift .code:n = \eb_fn_shift_set:nnn {#1} { text } { v }, + fnmark-vshift .code:n = \eb_fnmate_shift_set:nnn {#1} { mark } { v }, + fnmark-hshift .code:n = \eb_fnmate_shift_set:nnn {#1} { mark } { h }, + fntext-vshift .code:n = \eb_fnmate_shift_set:nnn {#1} { text } { v }, fnmark-vshift .initial:n = 0pt, fnmark-hshift .initial:n = 0pt, fntext-vshift .initial:n = 0pt, fnmark-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } - { \eb_fnmark_normal_label_set:nn {#1} { the@footnote } }, + { \eb_fnmate_normal_label_set:nn {#1} { the@footnote } }, fnmark-num .value_required:n = true, fnmark-num/unknown .code:n = - { \eb_fnmark_short_label_set:nn {#1} { the@footnote } }, + { \eb_fnmate_short_label_set:nn {#1} { the@footnote } }, fntext-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } - { \eb_fnmark_normal_label_set:nn {#1} { thefootnote } }, + { \eb_fnmate_normal_label_set:nn {#1} { thefootnote } }, fntext-num .value_required:n = true, fntext-num/unknown .code:n = - { \eb_fnmark_short_label_set:nn {#1} { thefootnote } }, + { \eb_fnmate_short_label_set:nn {#1} { thefootnote } }, fnboth-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnboth-num .initial:n = plain, unknown .code:n = \eb_msg_unknown_option:n { hdrset } @@ -1103,7 +1103,7 @@ \ProvideDocumentCommand{\super}{omo}{\textsuperscript{#3}} \providecommand{\spbset}{\use_none:n} -\NewDocumentCommand{\eb@fnmark@super}{sm} +\NewDocumentCommand{\eb@fnmate@super}{sm} { \IfBooleanTF{#1} {\super[\l__eb_fntext_vshift_tl]{#2}[0pt]} @@ -1113,7 +1113,7 @@ [\l__eb_fnmark_hshift_tl] } } -\cs_new_protected:Npn \eb_fnmark_format_initial: +\cs_new_protected:Npn \eb_fnmate_format_initial: { \bool_if:NTF \l__eb_normal_footnote_bool { @@ -1135,24 +1135,24 @@ { \hbox:n { - \eb_fnmark_format_initial: + \eb_fnmate_format_initial: \tl_if_eq:NnTF \@mpfn { footnote } - { \eb@fnmark@super{\eb@thefnmark} } - { \eb@fnmark@super{\@thefnmark} } + { \eb@fnmate@super{\eb@thefnmark} } + { \eb@fnmate@super{\@thefnmark} } } } \cs_new:Npn \eb@makefnmark { \hbox:n { - \eb_fnmark_format_initial: + \eb_fnmate_format_initial: \tl_if_eq:NnT \l__eb_fntext_position_tl { super } - { \eb@fnmark@super* } + { \eb@fnmate@super* } { - \tl_use:N \l__eb_fnmark_before_tl + \tl_use:N \l__eb_fntext_before_tl {\l__eb_fnmate_format_tl{\@thefnmark}} } - \tl_use:N \l__eb_fnmark_after_tl + \tl_use:N \l__eb_fntext_after_tl } } @@ -1374,19 +1374,19 @@ figure/tocline = { - \figurename\space #1 + \figurename~#1 \bool_if:NF \eb@titletoc@hang@fix@bool { \hspace{\eb@toc@figure@numsep} } }, table/tocline = { - \tablename\space #1 + \tablename~#1 \bool_if:NF \eb@titletoc@hang@fix@bool { \hspace{\eb@toc@table@numsep} } }, lstlisting/tocline = { - \lstlistingname\space\thelstlisting + \lstlistingname~\thelstlisting \bool_if:NF \eb@titletoc@hang@fix@bool { \hspace{\eb@toc@lstlisting@numsep} } }, @@ -1432,17 +1432,16 @@ \tl_use:c { the#1 } } } -\NewDocumentCommand{\counteruse}{soD(){arabic}mmO{.}d()} +\NewDocumentCommand{\counteruse}{soD(){arabic}mO{.}d()} { \IfBooleanF{#1}{\stepcounter{#4}} - \IfValueT{#7}{\setcounter{#4}{#7}} + \IfValueT{#6}{\setcounter{#4}{#6}} \tl_set:cn { theeb@#4 } { - \IfValueT{#2}{\use:c { the#2 }#6} - \use:c {#3}{#4}\space #5 + \IfValueT{#2}{\use:c { the#2 }#5} + \use:c {#3}{#4} } \tl_use:c { theeb@#4 } - \tl_remove_once:cn { theeb@#4 } {#5} \eb_current_label:n { eb@#4 } } \cs_new:Npn \eb_section_counter_prefix:n #1 @@ -2041,7 +2040,7 @@ \def\NAME { \the\thm@headfont ##1 - \peek_meaning:NT \NUMBER { \tl_if_blank:nF {##2} { \space } } + \peek_meaning:NT \NUMBER { \tl_if_blank:nF {##2} { \ } } } } \ctex_set:nn { thmset } @@ -2143,11 +2142,11 @@ enumitem .code:n = \setexerlist{#1}, tcolorbox .code:n = \addtcbstyle{exercise}{#1} } -\cs_new_protected:Npn \setexercise #1 +\cs_set_protected:Npn \setexercise #1 { \keys_set:nn { eb/exercise } {#1} } -\cs_new_protected:Npn \addtcbstyle #1#2 +\cs_set_protected:Npn \addtcbstyle #1#2 { \tcbset{#1/.append~style = {#2}} } -\cs_new_protected:Npn \newtcbstyle #1#2 +\cs_set_protected:Npn \newtcbstyle #1#2 { \tcbset{#1/.style = {#2}} } \cs_new_protected:Npn \tcbappstyle { \@ifstar{\newtcbstyle}{\addtcbstyle} } @@ -2470,7 +2469,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/20}{1.3S} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/21}{1.3X} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } |