From da02fd6ad1c5fb45c5ec641bf236d8de4745709f Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Wed, 4 Aug 2021 03:00:43 +0000
Subject: CTAN sync 202108040300

---
 macros/latex/contrib/easybook/easybook.dtx | 77 +++++++++++++++++-------------
 1 file changed, 43 insertions(+), 34 deletions(-)

(limited to 'macros/latex/contrib/easybook/easybook.dtx')

diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index ab3c09ae3c..c899f15504 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -8,7 +8,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/08/02}{1.28c}
+\ProvidesExplClass{easybook}{2021/08/03}{1.28d}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -292,11 +292,12 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/08/02}{1.28c}
+\ProvidesExplPackage{easybase}{2021/08/03}{1.28d}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
 \cs_generate_variant:Nn \dim_set:Nn { NV }
+\cs_generate_variant:Nn \dim_sign:n { V }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
 \cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV }
 \cs_generate_variant:Nn \skip_set:Nn { NV }
@@ -924,17 +925,19 @@
       }
       {
         \noindent
-        \dim_compare:nNnTF { \footnoteindent } > { 0pt }
+        \int_case:nn { \dim_sign:V \footnoteindent }
+          {
+            { 1 } { \use_i:nnn }
+            { 0 } { \use_ii:nnn }
+            { -1 } { \use_iii:nnn }
+          }
           { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } }
+          { \hbox_overlap_left:n { \eb@makefnmark } }
           {
-            \dim_compare:nNnTF { \footnoteindent } = { 0pt }
-              { \hbox_overlap_left:n { \eb@makefnmark } }
+            \hbox_overlap_left:n
               {
-                \hbox_overlap_left:n
-                  {
-                    \hbox_to_wd:nn { -\footnoteindent }
-                      { \eb@makefnmark\hss }
-                  }
+                \hbox_to_wd:nn { -\footnoteindent }
+                  { \eb@makefnmark\hss }
               }
           }
       }
@@ -1228,10 +1231,19 @@
     chapter/indent    = 0em,
     chapter/rule      = \tocrule{$\cdot$}[\bfseries],
 
-    section/format    = \addvspace{0.35pc},
+    section/format    =
+      {
+        \addvspace{0.35pc}
+        \bool_if:NF \l__eb_class_book_bool { \sffamily }
+      },
     section/indent    =
       { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
-    section/rule      = \tocrule{$\cdot$},
+    section/rule      =
+      {
+        \bool_if:NTF \l__eb_class_book_bool
+          { \tocrule{$\cdot$} }
+          { \tocrule{$\cdot$}[\bfseries] }
+      },
 
     subsection/format = \addvspace{0.35pc},
     subsection/indent =
@@ -2200,31 +2212,22 @@
   { \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } }
 \cs_new_protected:Npn \DeclareThemeColor #1
   { \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } }
-\cs_new:Npn \eb_link_color_set:n #1
+\clist_map_inline:nn
   {
-    linkcolor/\clist_item:nn {#1} { 1 } .code:n =
-      {
-        \eb_define_link_color:nnn
-          { \clist_item:nn {#1} { 2 } }
-          { \clist_item:nn {#1} { 3 } }
-          { \clist_item:nn {#1} { 4 } }
-        \eb_put_hyperref:n
-          {
-            linkcolor = ctex@link,linkbordercolor = ctex@link,
-            urlcolor  = ctex@url,urlbordercolor   = ctex@url,
-            citecolor = ctex@cite,citebordercolor = ctex@cite
-          }
-      },
+    { linkcolor,link },
+    { color,theme }
   }
-\cs_new:Npn \eb_theme_color_set:n #1
   {
-    color/\clist_item:nn {#1} {1} .code:n =
+    \cs_new:cpn { eb_\clist_item:nn {#1} { 2 }_color_set:n } ##1
       {
-        \eb_define_theme_color:nnn
-          { \clist_item:nn {#1} { 2 } }
-          { \clist_item:nn {#1} { 3 } }
-          { \clist_item:nn {#1} { 4 } }
-      },
+        \clist_item:nn {#1} { 1 }/\clist_item:nn {##1} { 1 } .code:n =
+          {
+            \use:c { eb_define_\clist_item:nn {#1} { 2 }_color:nnn }
+              { \clist_item:nn {##1} { 2 } }
+              { \clist_item:nn {##1} { 3 } }
+              { \clist_item:nn {##1} { 4 } }
+          },
+      }
   }
 
 \bool_set_false:N \l__eb_toc_number_color_bool
@@ -2321,6 +2324,12 @@
     \LoadPackage{hyperref}
     \urlstyle{same}
     \eb_allow_url_break:
+    \eb_put_hyperref:n
+      {
+        linkcolor = ctex@link,linkbordercolor = ctex@link,
+        urlcolor  = ctex@url,urlbordercolor   = ctex@url,
+        citecolor = ctex@cite,citebordercolor = ctex@cite
+      }
     \exp_args:NV \hypersetup \l__eb_hyperref_clist
   }
 
@@ -2363,7 +2372,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/02}{1.28c}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/03}{1.28d}
   {Customization of tcolorbox for easybook}
 
 \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
-- 
cgit v1.2.3

