diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-17 20:47:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-17 20:47:14 +0000 |
commit | 5d5ad318827c31a935fa5aa9fb879bd195608378 (patch) | |
tree | dcaa2b77ea5bf7b9b2aeec6060364938b4bd764b /Master/texmf-dist/source/latex | |
parent | 2165d47a69127b7df2e6af8181c4034b546ff489 (diff) |
easybook (17oct21)
git-svn-id: svn://tug.org/texlive/trunk@60788 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index 7b8737e4b53..ac09fdcaf72 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/16}{1.3L} +\ProvidesExplClass{easybook}{2021/10/16}{1.3N} {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/16}{1.3L} +\ProvidesExplPackage{easybase}{2021/10/16}{1.3N} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1017,8 +1017,8 @@ } \cs_set_protected:Npn \footnote { - \@ifnextchar [ - {\@xfootnote} + \peek_meaning:NTF [ + { \@xfootnote } { \exp_args:NV \stepcounter \@mpfn \eb_current_label:n { @footnote } @@ -1030,8 +1030,8 @@ } \cs_set:Npn \footnotemark { - \@ifnextchar [ - {\@xfootnotemark} + \peek_meaning:NTF [ + { \@xfootnotemark } { \stepcounter{footnote} \protected@xdef\eb@thefnmark{\the@footnote} @@ -1153,7 +1153,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 { @@ -1162,7 +1162,7 @@ \thecontentslabel \hspace{\use:c { eb@toc@#1@numsep }} } - }{} + } }{} {\tl_use:c { l__eb_toc_#1_rule_tl }} } @@ -1212,8 +1212,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 }} @@ -1222,7 +1222,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, @@ -1233,13 +1232,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 @@ -1302,20 +1297,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 } @@ -1330,10 +1325,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} @@ -1342,7 +1338,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 } } @@ -1932,6 +1928,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 { @@ -1958,6 +1955,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, @@ -2385,7 +2391,7 @@ } %</package> %<*tcolorbox> -\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 } |