From 336dc3af0631d4ffa06e2c4768b81b3d8eff855a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 12 Jan 2022 21:18:16 +0000 Subject: easybook (12jan22) git-svn-id: svn://tug.org/texlive/trunk@61582 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/easybook/easybook.dtx | 79 +++++++++++----------- 1 file changed, 41 insertions(+), 38 deletions(-) (limited to 'Master/texmf-dist/source/latex/easybook') diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index 7f0054c846c..a162847fa6f 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}{2022/01/08}{1.45} +\ProvidesExplClass{easybook}{2022/01/12}{1.46} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -306,7 +306,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2022/01/08}{1.45} +\ProvidesExplPackage{easybase}{2022/01/12}{1.46} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -804,6 +804,7 @@ } { \exp_not:N \c@footnote } } + \cs_set_eq:NN \thedownfootnote \thefootnote } \cs_new_protected:Npn \eb_fnmate_short_label_set:Nn #1#2 { @@ -819,6 +820,7 @@ } } \cs_set_eq:NN #1 \l__eb_fnmate_short_tokens_tl + \cs_set_eq:NN \thedownfootnote \thefootnote } \cs_new_protected:Npn \eb_footnote_value_handle:n #1 { @@ -895,9 +897,9 @@ fnmark-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } - { \eb_fnmate_normal_label_set:Nn \the@up@footnote {#1} }, + { \eb_fnmate_normal_label_set:Nn \theupfootnote {#1} }, fnmark-num .value_required:n = true, - fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:Nn \the@up@footnote {#1}, + fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:Nn \theupfootnote {#1}, fntext-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } { \eb_fnmate_normal_label_set:Nn \thefootnote {#1} }, @@ -1048,9 +1050,9 @@ { \@xfootnote } { \exp_args:NV \stepcounter \@mpfn - \eb_current_label:n { @up@footnote } + \eb_current_label:n { upfootnote } \protected@xdef\@thefnmark{\thempfn} - \protected@xdef\@the@up@fnmark{\the@up@footnote} + \protected@xdef\@the@up@fnmark{\theupfootnote} \@footnotemark \@footnotetext } @@ -1061,7 +1063,7 @@ { \@xfootnotemark } { \stepcounter{footnote} - \protected@xdef\@the@up@fnmark{\the@up@footnote} + \protected@xdef\@the@up@fnmark{\theupfootnote} \@footnotemark } } @@ -1077,7 +1079,7 @@ { \group_begin: \setcounter{footnote}{#1} - \unrestored@protected@xdef\@the@up@fnmark{\the@up@footnote} + \unrestored@protected@xdef\@the@up@fnmark{\theupfootnote} \group_end: \H@@footnotemark } @@ -1096,6 +1098,9 @@ ] } } +\bool_set_true:N \l__eb_normal_footnote_bool +\bool_new:N \l__eb_fnmate_format_match_bool +\bool_new:N \l__eb_fncust_format_match_bool \cs_new_protected:Npn \eb_fnmate_format_initial: { \bool_if:NTF \l__eb_normal_footnote_bool @@ -1110,34 +1115,29 @@ \bool_if:NF \l__eb_fnmate_format_match_bool { \spbset{spcmd = { }} } \tl_use:N \l__eb_subfont_footnote_tl } -\bool_set_true:N \l__eb_normal_footnote_bool -\bool_new:N \l__eb_fnmate_format_match_bool -\bool_new:N \l__eb_fncust_format_match_bool -\cs_set:Npn \@makefnmark +\cs_new_protected:Npn \defupfntmark #1 + { \cs_set:Npn \@makefnmark { \hbox:n {#1} } } +\cs_new_protected:Npn \defdownfntmark #1 + { \cs_set:Npn \eb@makefnmark { \hbox:n {#1} } } +\defupfntmark { - \hbox:n - { - \eb_fnmate_format_initial: - \tl_if_eq:NnTF \@mpfn { footnote } - { \eb@fnmate@super{\@the@up@fnmark} } - { \eb@fnmate@super{\@thefnmark} } - } + \eb_fnmate_format_initial: + \tl_if_eq:NnTF \@mpfn { footnote } + { \eb@fnmate@super{\@the@up@fnmark} } + { \eb@fnmate@super{\@thefnmark} } } -\cs_new:Npn \eb@makefnmark +\defdownfntmark { - \hbox:n + \eb_fnmate_format_initial: + \tl_if_eq:NnT \l__eb_fntext_position_tl { super } + { \eb@fnmate@super* } { - \eb_fnmate_format_initial: - \tl_if_eq:NnT \l__eb_fntext_position_tl { super } - { \eb@fnmate@super* } - { - \tl_use:N \l__eb_fntext_before_tl - \bgroup - \l__eb_fnmate_format_tl{\@thefnmark} - \egroup - } - \tl_use:N \l__eb_fntext_after_tl + \tl_use:N \l__eb_fntext_before_tl + \bgroup + \l__eb_fnmate_format_tl{\@thefnmark} + \egroup } + \tl_use:N \l__eb_fntext_after_tl } \tl_clear:N \@thefnmark @@ -1437,7 +1437,10 @@ \def\CTEX@thechapter{\CTEX@bichapter@number} \def\CTEX@postchapter{\CTEX@postbichapter} \eb@before@addbitoc@hook - \addcontentsline{tec}{#1}{\use:c { CTEX@#1@tocline }{#1}{#2}} + \tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix } + { \addcontentsline{toc}{#1} } + { \addcontentsline{tec}{#1} } + { \use:c { CTEX@#1@tocline }{#1}{#2} } \group_end: } \eb_seq_map_inline:nn @@ -1515,7 +1518,8 @@ multoc .default:n = 2, multoc .initial:n = 1, columns .meta:n = { multoc = #1 }, - title .code:n = \eb_assign_toc_title:n {#1} + title .code:n = \eb_assign_toc_title:n {#1}, + bilist .tl_gset:N = \g__eb_bilist_permute_value_tl } \bool_if:NTF \l__eb_class_mode_book_bool { \keys_define:nn { } { eb/listoc .inherit:n = ctex/chapter } } @@ -1842,8 +1846,8 @@ \SetEnumitemValue{font}{sf}{\color{ctex@emph}\normalfont\sffamily} \SetEnumitemValue{ref}{enumii}{\arabic{enumi}.\alph*} \SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*} -\setlist{nosep,align = left,mode = unboxed} -\setlist*{leftmargin = *,labelsep = 0.5em,listparindent = 2em} +\setlist{nosep,labelsep = 0.5em,listparindent = 2em} +\setlist[1]{leftmargin = *,align = left,mode = unboxed} \setlist[itemize,1]{label = bullet} \setlist[itemize,2]{label = endash} \setlist[itemize,3]{label = asterisk} @@ -2064,6 +2068,7 @@ number-mode = match, range-phrase = \ensuremath{\sim}, range-units = single, + print-unity-mantissa = false, table-alignment-mode = none, group-digits = none } @@ -2389,7 +2394,6 @@ lstlistlistingname = 代码索引, lstlistingname = 代码 } - \labelformat{equation}{式(#1)} \labelformat{section}{节 #1} \labelformat{subsection}{小节 #1} } @@ -2400,13 +2404,12 @@ lstlistlistingname = List~of~Codes, lstlistingname = Code } - \labelformat{equation}{Equation~(#1)} \labelformat{section}{Section~#1} \labelformat{subsection}{Subsection~#1} } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/08}{1.45} +\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/12}{1.46} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 -- cgit v1.2.3