From 5d5ad318827c31a935fa5aa9fb879bd195608378 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Oct 2021 20:47:14 +0000 Subject: easybook (17oct21) git-svn-id: svn://tug.org/texlive/trunk@60788 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/easybook/easybase.sty | 52 ++++++++++++---------- Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 +- .../texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 +- 3 files changed, 31 insertions(+), 25 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 2335169466c..1ab895b4862 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}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/10/16}{1.3L} +\ProvidesExplPackage{easybase}{2021/10/16}{1.3N} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -718,8 +718,8 @@ } \cs_set_protected:Npn \footnote { - \@ifnextchar [ - {\@xfootnote} + \peek_meaning:NTF [ + { \@xfootnote } { \exp_args:NV \stepcounter \@mpfn \eb_current_label:n { @footnote } @@ -731,8 +731,8 @@ } \cs_set:Npn \footnotemark { - \@ifnextchar [ - {\@xfootnotemark} + \peek_meaning:NTF [ + { \@xfootnotemark } { \stepcounter{footnote} \protected@xdef\eb@thefnmark{\the@footnote} @@ -854,7 +854,7 @@ [\dim_use:c { l__eb_toc_#1_indent_dim }] {\tl_use:c { l__eb_toc_#1_format_tl }} { - \ifbool{eb@titletoc@hang@fix} + \bool_if:NT \eb@titletoc@hang@fix@bool { \contentspush { @@ -863,7 +863,7 @@ \thecontentslabel \hspace{\use:c { eb@toc@#1@numsep }} } - }{} + } }{} {\tl_use:c { l__eb_toc_#1_rule_tl }} } @@ -913,8 +913,8 @@ { \CTEXifname { - \ifbool{eb@titletoc@hang@fix} - {\eb@numberline{\use:c { CTEXthe#1 }}} + \bool_if:NTF \eb@titletoc@hang@fix@bool + { \eb@numberline{\use:c { CTEXthe#1 }} } { \use:c { CTEXthe#1 } \hspace{\use:c { eb@toc@#1@numsep }} @@ -923,7 +923,6 @@ } \cs_new:Npn \eb@numberline { \protect\numberline } \cs_set_eq:NN \EBNumberLine \CTEXnumberline -\newbool{eb@titletoc@hang@fix} \ctex_define:nn { tocset } { lolskip .skip_set:N = \eb@toc@lolskip, @@ -934,13 +933,9 @@ line-align .bool_set:N = \l__eb_toc_line_align_bool, line-align .default:n = true, line-align .initial:n = true, - - hang .choice:, - hang/true .code:n = \booltrue{eb@titletoc@hang@fix}, - hang/false .code:n = { }, + hang .bool_set:N = \eb@titletoc@hang@fix@bool, hang .default:n = true, hang .initial:n = false, - unknown .code:n = \eb_msg_unknown_option:n { tocset } } \ctex_set:n @@ -1003,20 +998,20 @@ figure/tocline = { \figurename\space #1 - \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@figure@numsep}}{} + \bool_if:NF \eb@titletoc@hang@fix@bool + { \hspace{\eb@toc@figure@numsep} } }, table/tocline = { \tablename\space #1 - \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@table@numsep}}{} + \bool_if:NF \eb@titletoc@hang@fix@bool + { \hspace{\eb@toc@table@numsep} } }, lstlisting/tocline = { \lstlistingname\space\thelstlisting - \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lstlisting@numsep}}{} + \bool_if:NF \eb@titletoc@hang@fix@bool + { \hspace{\eb@toc@lstlisting@numsep} } }, numsep-all = 1em } @@ -1031,10 +1026,11 @@ { \addcontentsline{#1}{#2} { - \ifbool{eb@titletoc@hang@fix}{\eb@numberline}{} + \bool_if:NT \eb@titletoc@hang@fix@bool { \eb@numberline } {\prop_item:Nn \l__eb_list_label_name_prop {#2}{#3}}#4 } } +\cs_set_eq:NN \eb@if@boolT \bool_if:NT \ctex_patch_cmd:Nnn \lst@MakeCaption { \addcontentsline{lol}{lstlisting} @@ -1043,7 +1039,7 @@ { \addcontentsline{lol}{lstlisting} { - \ifbool{eb@titletoc@hang@fix}{\eb@numberline}{} + \eb@if@boolT\eb@titletoc@hang@fix@bool{\eb@numberline} {\eb@toc@label@lstlisting{}}\lst@@caption } } @@ -1633,6 +1629,7 @@ Please~load~the~tcolorbox~macro~package. } \cs_set_eq:NN \EBNewTheorem \DeclareTheorem + \prop_new:N \l__eb_thmtools_entry_prop \clist_const:Nn \c__eb_thmtools_entry_clist { @@ -1659,6 +1656,15 @@ notebraces .tl_set:N = \l__eb_thm_notebraces_tl, unknown .code:n = \eb_msg_unknown_option:n { thmset } } +\eb_at_end_patch_cmd:nnn \thmt@setheadstyle + { \def\NAME{\the\thm@headfont ##1} } + { + \def\NAME + { + \the\thm@headfont ##1 + \peek_meaning:NT \NUMBER { \tl_if_blank:nF {##2} { \space } } + } + } \ctex_set:nn { thmset } { spaceabove = 0.75ex plus .1ex, diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index d153b20420b..65704d5130d 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/10/16}{1.3L} +\ProvidesExplClass{easybook}{2021/10/16}{1.3N} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 975947f0444..6a9af92f8b0 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -18,7 +18,7 @@ %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/16}{1.3L} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/16}{1.3N} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } -- cgit v1.2.3