summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-13 03:01:44 +0000
committerNorbert Preining <norbert@preining.info>2024-02-13 03:01:44 +0000
commitff59efb1f42e705d74a6d50a1f8dbd7988ccf380 (patch)
tree5da1e898aa276a82243afc394d373a15170d43d0 /macros/latex/contrib/easybook/easybook.dtx
parent275a181f003d2af5b7d9ca34f2b15f6511b3ea29 (diff)
CTAN sync 202402130301
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx64
1 files changed, 31 insertions, 33 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 8124d21bad..16f5b792c0 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/02/11}{2024ab}
+\ProvidesExplClass{easybook}{2024/02/12}{2024ac}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/02/11}{2024ab}
+\ProvidesExplPackage{easybase}{2024/02/12}{2024ac}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -334,21 +334,6 @@
}
\cs_new_protected:Npn \eb_at_end_preamble:n
{ \BeforeBeginEnvironment{document} }
-\cs_new_protected:Npn \eb_match_load_package:n #1
- {
- \regex_match:nnTF { \[ } {#1}
- {
- \seq_set_split:Nnn \l_tmpa_seq { [ } {#1}
- \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl
- \seq_pop_right:NN \l_tmpa_seq \l_tmpb_tl
- \IfFileExists{\l_tmpa_tl.sty}
- {
- \exp_last_unbraced:Nx \RequirePackage
- { [\l_tmpb_tl }{\l_tmpa_tl}
- }{}
- }
- { \IfFileExists{#1.sty}{\RequirePackage{#1}}{} }
- }
\cs_new_protected:Npn \eb_if_package_loaded:nnF #1#2#3
{
\IfPackageLoadedTF{#1}
@@ -376,13 +361,26 @@
{ \eb@usepackage@save{##1}[#3] }
}
}
-\NewDocumentCommand{\LoadPackage}{O{}m}
+\cs_new_protected:Npn \eb_match_load_package:n #1
{
- \seq_set_split:Nnn \l_tmpb_seq { + } {#2}
- \int_compare:nNnT { \seq_count:N \l_tmpb_seq } = { 1 }
- { \PassOptionsToPackage{#1}{#2} }
- \seq_map_function:NN
- \l_tmpb_seq \eb_match_load_package:n
+ \regex_match:nnTF { \[.*\] } {#1}
+ { \eb@case@load@package #1 }
+ { \eb@case@load@package{#1} }
+ }
+\NewDocumentCommand{\eb@case@load@package}{omO{}}
+ {
+ \IfNoValueTF{#1}
+ {\IfFileExists{#2.sty}{\RequirePackage{#2}[#3]}{}}
+ {\IfFileExists{#2.sty}{\RequirePackage[#1]{#2}[#3]}{}}
+ }
+\cs_new_protected:Npn \LoadPackage #1
+ {
+ \int_compare:nTF { \clist_count:n {#1} <= 1 }
+ { \RequirePackage }
+ {
+ \eb_seq_map_inline:nn {#1}
+ { \eb_match_load_package:n {##1} }
+ }
}
\bool_set_true:N \l__eb_class_mode_book_bool
@@ -485,14 +483,14 @@
\LoadPackage
{
- spbmark[text]+
- ulem[normalem]+
- enumitem[shortlabels,inline]+
- chemformula+siunitx+pifont+
- geometry+marginnote+
- pdfpages+multicol+
- fancyhdr+titletoc+caption+
- tabularray+
+ [text]{spbmark},
+ [normalem]{ulem},
+ [{shortlabels,inline}]{enumitem},
+ chemformula,siunitx,pifont,
+ geometry,marginnote,
+ pdfpages,multicol,
+ fancyhdr,titletoc,caption,
+ tabularray,
listings
}
\cs_new_protected:Npn \eb_package_date_check:nn #1#2
@@ -605,7 +603,7 @@
{\tl_set:cn { eb@mark@#1@label } {##1##2}}
\cs_new_protected:cpn { eb_mark_#1_name_parse:n } ##1
{
- \regex_match:nnTF { \[ } {##1}
+ \regex_match:nnTF { \[.*\] } {##1}
{ \use:c { eb@mark@#1@label@layout }##1 }
{ \use:c { eb@mark@#1@label@layout }{##1} }
}
@@ -2343,7 +2341,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/11}{2024ab}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/12}{2024ac}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2