summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-10-18 03:01:28 +0000
committerNorbert Preining <norbert@preining.info>2021-10-18 03:01:28 +0000
commitad3ad18aa939862832c90a74bcf41e8a5570ff65 (patch)
tree377bed46b478634d32730a255c1a93050ee17e87 /macros/latex/contrib/easybook/easybook.dtx
parent54592d609e44d5cff9e5d940befbcb3330d92b10 (diff)
CTAN sync 202110180301
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx56
1 files changed, 31 insertions, 25 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7b8737e4b5..ac09fdcaf7 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/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 }