summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx28
1 files changed, 18 insertions, 10 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 2133ffe524..62519599eb 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/06/23}{2024cl}
+\ProvidesExplClass{easybook}{2024/06/24}{2024cm}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/06/23}{2024cl}
+\ProvidesExplPackage{easybase}{2024/06/24}{2024cm}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -383,7 +383,7 @@
}
}
\providecommand{\NewHookWithArguments}[2]{}
-\ProvideDocumentCommand{\AddToHookWithArguments}{mom}{}
+\ProvideDocumentCommand{\AddToHookWithArguments}{mo+m}{}
\bool_set_true:N \l__eb_class_mode_book_bool
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1795,9 +1795,18 @@
}
\cs_set_protected:Npn \AllotPartialExt #1#2
{
- \tl_set:cn { ttl@partial#1 } {#2}
- \AddToHookWithArguments{cmd/ttl@writepartial/before}[ttl/#1]
- {\ttl@topartial{#1}{##1}{##2}}
+ \tl_if_exist:cTF { ttl@partial#1 }
+ { \msg_warning:nnnn { easybase } { repeated-ptoc } {#1} {#2} }
+ {
+ \tl_set:cn { ttl@partial#1 } {#2}
+ \AddToHookWithArguments{cmd/ttl@writepartial/before}[ttl/#1]
+ {\ttl@topartial{#1}{##1}{##2}}
+ }
+ }
+\msg_new:nnn { easybase } { repeated-ptoc }
+ {
+ Local~directory~file~'#2'~of~directory~type~'#1'~is \\
+ repeatedly~allocated.
}
\AllotPartialExt{lol}{pll}
@@ -1823,16 +1832,15 @@
}
\RegisterTitleIfname{toc}
-\cs_set_eq:NN \eb@ctexsetii \ctex_set:nn
\cs_new_protected:Npn \SetTocStyle #1#2#3
{
\cs_set_protected:cpn { eb@toc@style@set@#1@#2 }
- { \eb@ctexsetii{#1}{#3} }
+ { \ctex_set:nn {#1} {#3} }
}
\cs_new_protected:Npn \UseTocStyle #1#2#3
{
\cs_if_exist:cTF { eb@toc@style@set@#1@#2 }
- { \addtocontents{#3}{\@nameuse{eb@toc@style@set@#1@#2}} }
+ { \addtocontents{#3}{\string\csuse{eb@toc@style@set@#1@#2}} }
{ \msg_warning:nnnn { easybase } { undefined-toc-style } {#2} {#1} }
}
\msg_new:nnn { easybase } { undefined-toc-style }
@@ -2625,7 +2633,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/06/23}{2024cl}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/06/24}{2024cm}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2