From 363ea487975bcc527ccdb2c9b5dda1b27cf839b2 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 3 Aug 2021 03:03:59 +0000 Subject: CTAN sync 202108030303 --- macros/latex/contrib/easybook/easybook.dtx | 52 ++++++++++++++++++------------ 1 file changed, 32 insertions(+), 20 deletions(-) (limited to 'macros/latex/contrib/easybook/easybook.dtx') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 7f671cf194..ab3c09ae3c 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -8,7 +8,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/08/01}{1.28b} +\ProvidesExplClass{easybook}{2021/08/02}{1.28c} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -292,12 +292,12 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/08/01}{1.28b} +\ProvidesExplPackage{easybase}{2021/08/02}{1.28c} {Typeset Chinese theses or books} -\cs_generate_variant:Nn \int_to_arabic:n { v } \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } \cs_generate_variant:Nn \dim_set:Nn { NV } +\cs_generate_variant:Nn \int_to_arabic:n { v } \cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV } \cs_generate_variant:Nn \skip_set:Nn { NV } \cs_generate_variant:Nn \seq_set_from_clist:Nn { No } @@ -786,20 +786,20 @@ { \exp_not:N \c@footnote } } } -\cs_new_protected:Npn \eb_fnmark_shorter_label_set:nn #1#2 +\cs_new_protected:Npn \eb_fnmark_short_label_set:nn #1#2 { - \tl_set:Nn \l__eb_fnmark_shorter_label_tl {#1} + \tl_set:Nn \l__eb_fnmark_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_shorter_label_tl {##1} + \tl_replace_once:Nnn \l__eb_fnmark_short_tokens_tl {##1} { \eb_int_format_trans:NN ##1 \c@footnote } \seq_map_break: } } - \cs_set_eq:cN {#2} \l__eb_fnmark_shorter_label_tl + \cs_set_eq:cN {#2} \l__eb_fnmark_short_tokens_tl } \bool_new:N \l__eb_fntext_bottom_bool \ctex_define:nn { hdrset } @@ -834,13 +834,13 @@ { \eb_fnmark_normal_label_set:nn {#1} { the@footnote } }, fnmark-num .value_required:n = true, fnmark-num/unknown .code:n = - { \eb_fnmark_shorter_label_set:nn {#1} { the@footnote } }, + { \eb_fnmark_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 } }, fntext-num .value_required:n = true, fntext-num/unknown .code:n = - { \eb_fnmark_shorter_label_set:nn {#1} { thefootnote } }, + { \eb_fnmark_short_label_set:nn {#1} { thefootnote } }, fnboth-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnboth-num .initial:n = plain, @@ -956,12 +956,13 @@ } \ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}} \providecommand{\spb@textsuperscript@save}{\textsuperscript} +\providecommand{\spbset}{\use_none:n} \cs_set_protected:Npn \footref #1 { \group_begin: \unrestored@protected@xdef\eb@thefnmark{\ref{#1}} \group_end: - \@footnotemark + \H@@footnotemark } \cs_set_protected:Npn \footnote { @@ -994,13 +995,14 @@ \setcounter{footnote}{#1} \unrestored@protected@xdef\eb@thefnmark{\the@footnote} \group_end: - \@footnotemark + \H@@footnotemark } } \cs_set:Npn \@makefnmark { \hbox:n { + \spbset{super-format = { }} \tl_use:N \l__eb_subfont_footnote_tl \tl_use:N \l__eb_fnmark_format_tl { @@ -1028,18 +1030,27 @@ } } \tl_clear:N \@thefnmark -\cs_new:Npn \eb@@makefnmark #1 +\tl_new:N \eb@thefnmark +\cs_new:Npn \eb@@makefnmark #1#2 { - \tl_if_empty:oF {#1} + \tl_if_empty:oF {#2} { \group_begin: - \unrestored@protected@xdef\@thefnmark{#1} + \unrestored@protected@xdef\eb@thefnmark{#1} + \unrestored@protected@xdef\@thefnmark{#2} \group_end: } } -\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext } -\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark } -\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext } +\NewDocumentCommand{\Footnote}{O{#2}m} + { + \eb@@makefnmark{#2}{#1} + \@footnotemark + \@footnotetext + } +\cs_new_protected:Npn \Footnotemark #1 + { \eb@@makefnmark{#1}{#1}\@footnotemark } +\cs_new_protected:Npn \Footnotetext #1 + { \eb@@makefnmark{#1}{#1}\@footnotetext } \cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi } \cs_set:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } } @@ -1375,7 +1386,7 @@ \thechapter \tl_use:c { l__eb_#1_connector_tl } } - \eb_arabic:n {#1} + \int_to_arabic:v { c@#1 } } } @@ -2352,7 +2363,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/01}{1.28b} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/02}{1.28c} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } @@ -2500,6 +2511,7 @@ } } \tl_if_empty:NF \eb@tc@list@prologue { \eb@tc@list@prologue } + \exp_last_unbraced:NnNo \begin{eb@exercise@list}[\eb@tc@list@number,#5] #6 \end{eb@exercise@list} @@ -2527,7 +2539,7 @@ IfValueT = {#3}{title = #3}, top = 0pt,bottom = 0pt,right = 0pt,toptitle = 0pt }, - colframe = #2,coltitle = #2,tc-ebparbox,#4 + coltitle = #2,tc-ebparbox,#4 } \DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}} {colback = #1!10!white,colframe = #1!50!black,tc-ebfbox,#3}{#2} -- cgit v1.2.3