From 30ebcb04bb501c56bfac1652a749eda69ba28c34 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Thu, 9 Sep 2021 03:00:35 +0000
Subject: CTAN sync 202109090300

---
 macros/latex/contrib/easybook/easybook.dtx | 173 ++++++++++++++---------------
 1 file changed, 85 insertions(+), 88 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 2150fef75c..ee291bcbb1 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/09/06}{1.30}
+\ProvidesExplClass{easybook}{2021/09/08}{1.3a}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -297,14 +297,13 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/09/06}{1.30}
+\ProvidesExplPackage{easybase}{2021/09/08}{1.3a}
   {Typeset Chinese theses or books}
 
 \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_add:Nn { NV,Nv }
 \cs_generate_variant:Nn \skip_set:Nn { NV }
 \cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
 \cs_generate_variant:Nn \ctex_define:nn { nx }
@@ -1128,12 +1127,6 @@
         #1/numsep .dim_set:c  = eb@toc@#1@numsep,
         #1/unknown .code:n    = \eb_msg_unknown_option:n { tocset }
       }
-    \seq_if_in:NnF \c__ctex_headings_seq { subparagraph }
-      {
-        \ctex_define:nn { tocset }
-          { #1/belowskip .skip_set:c = l__eb_toc_#1_below_skip }
-      }
-    \seq_pop:NN \c__ctex_headings_seq \l_tmpa_tl
     \titlecontents{#1}
       [\dim_use:c { l__eb_toc_#1_indent_dim }]
       {\tl_use:c { l__eb_toc_#1_format_tl }}
@@ -1155,7 +1148,16 @@
 \c__ctex_headings_seq \eb_toc_assign_keys:n
 \ctex_define:n { tocset/list .meta:nn = { ctex/tocset/list } {#1} }
 \eb_clist_map_inline:nn
-  { format,format+,format~+,indent,rule,numsep,belowskip }
+  { figure,table,lstlisting }
+  {
+    \ctex_define:nn { tocset }
+      {
+        #1/voffset .skip_set:c  = l__eb_toc_#1_voffset_skip,
+        #1/tocline .cs_set:cp   = { eb@labelname@#1 } ##1,
+      }
+  }
+\eb_clist_map_inline:nn
+  { format,format+,format~+,indent,rule,numsep,voffset,tocline }
   {
     \ctex_define:nn { tocset }
       {
@@ -1187,66 +1189,44 @@
 \ctex_define:nn { tocset }
   {
     lolskip .skip_set:N     = \eb@toc@lolskip,
-    lolskip .initial:n      = 0.8pc,
-    belowoffset .skip_set:N = \l__eb_toc_offset_skip,
-    belowoffset .initial:n  =
-      { \bool_if:NTF \l__eb_class_book_bool { -1pc } { -0.35pc } },
+    lolskip .initial:n      = 10pt,
+    toc-voffset .skip_set:N = \l__eb_toc_voffset_skip,
+    toc-voffset .initial:n  =
+      { \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.35pc } },
     line-align .bool_set:N  = \l__eb_toc_line_align_bool,
     line-align .default:n   = true,
     line-align .initial:n   = true,
 
-    tocline-fig .cs_set:Np  = \eb@labelname@lof #1,
-    tocline-fig .initial:n  =
-      {
-        \figurename\space #1
-        \notbool{eb@titletoc@hang@fix}
-          {\hspace{\eb@toc@figure@numsep}}{}
-      },
-    tocline-tab .cs_set:Np  = \eb@labelname@lot #1,
-    tocline-tab .initial:n  =
-      {
-        \tablename\space #1
-        \notbool{eb@titletoc@hang@fix}
-          {\hspace{\eb@toc@table@numsep}}{}
-      },
-    tocline-lst .tl_set:N   = \eb@labelname@lol,
-    tocline-lst .initial:n  =
-      {
-        \lstlistingname\space\thelstlisting
-        \notbool{eb@titletoc@hang@fix}
-          {\hspace{\eb@toc@lstlisting@numsep}}{}
-      },
-
     hang .choice:,
-    hang/true .code:n     = \booltrue{eb@titletoc@hang@fix},
-    hang/false .code:n    = { },
-    hang .default:n       = true,
-    hang .initial:n       = false,
-
-    numsep-all .meta:n    =
-      {
-        part/numsep       = #1,
-        chapter/numsep    = #1,
-        section/numsep    = #1,
-        subsection/numsep = #1,
-        list/numsep       = #1
+    hang/true .code:n       = \booltrue{eb@titletoc@hang@fix},
+    hang/false .code:n      = { },
+    hang .default:n         = true,
+    hang .initial:n         = false,
+
+    numsep-all .meta:n      =
+      {
+        part/numsep         = #1,
+        chapter/numsep      = #1,
+        section/numsep      = #1,
+        subsection/numsep   = #1,
+        list/numsep         = #1
       },
-    numsep-all .initial:n = 1em,
-    indent-all .meta:n    =
-      {
-        part/indent       = #1,
-        chapter/indent    = #1,
-        section/indent    = #1,
-        subsection/indent = #1,
-        list/indent       = #1
+    numsep-all .initial:n   = 1em,
+    indent-all .meta:n      =
+      {
+        part/indent         = #1,
+        chapter/indent      = #1,
+        section/indent      = #1,
+        subsection/indent   = #1,
+        list/indent         = #1
       },
-    rule-all .meta:n      =
+    rule-all .meta:n        =
       {
-        part/rule         = #1,
-        chapter/rule      = #1,
-        section/rule      = #1,
-        subsection/rule   = #1,
-        list/rule         = #1
+        part/rule           = #1,
+        chapter/rule        = #1,
+        section/rule        = #1,
+        subsection/rule     = #1,
+        list/rule           = #1
       }
   }
 \ctex_set:n
@@ -1273,45 +1253,64 @@
   }
 \ctex_set:nn { tocset }
   {
-    part/format       = \addvspace{1pc}\sffamily\large,
-    part/indent       = 0em,
-    part/rule         = \tocrule{}[\bfseries],
+    part/format         = \addvspace{1pc}\sffamily\large,
+    part/indent         = 0em,
+    part/rule           = \tocrule{}[\bfseries],
 
-    chapter/format    = \addvspace{1pc}\sffamily\large,
-    chapter/indent    = 0em,
-    chapter/rule      = \tocrule{$\cdot$}[\bfseries],
+    chapter/format      = \addvspace{1pc}\sffamily\large,
+    chapter/indent      = 0em,
+    chapter/rule        = \tocrule{$\cdot$}[\bfseries],
 
-    section/format    =
+    section/format      =
       {
         \addvspace{0.35pc}
         \bool_if:NF \l__eb_class_book_bool { \sffamily }
       },
-    section/indent    =
+    section/indent      =
       { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
-    section/rule      =
+    section/rule        =
       {
         \bool_if:NTF \l__eb_class_book_bool
           { \tocrule{$\cdot$} }
           { \tocrule{$\cdot$}[\bfseries] }
       },
 
-    subsection/format = \addvspace{0.35pc},
-    subsection/indent =
+    subsection/format   = \addvspace{0.35pc},
+    subsection/indent   =
       { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
-    subsection/rule   = \tocrule{$\cdot$},
+    subsection/rule     = \tocrule{$\cdot$},
+
+    list/format         = \addvspace{0.2pc},
+    list/indent         = 0em,
+    list/rule           = \tocrule{$\cdot$},
+    list/voffset        =
+      { 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt } },
 
-    list/format       = \addvspace{0.2pc},
-    list/indent       = 0em,
-    list/rule         = \tocrule{$\cdot$},
-    list/belowskip    =
-      { \bool_if:NTF \l__eb_class_book_bool { 0pc } { 0.15pc } }
+    figure/tocline      =
+      {
+        \figurename\space #1
+        \notbool{eb@titletoc@hang@fix}
+          {\hspace{\eb@toc@figure@numsep}}{}
+      },
+    table/tocline       =
+      {
+        \tablename\space #1
+        \notbool{eb@titletoc@hang@fix}
+          {\hspace{\eb@toc@table@numsep}}{}
+      },
+    lstlisting/tocline  =
+      {
+        \lstlistingname\space\thelstlisting
+        \notbool{eb@titletoc@hang@fix}
+          {\hspace{\eb@toc@lstlisting@numsep}}{}
+      }
   }
 
 \prop_new:N \l__eb_list_label_name_prop
 \prop_set_from_keyval:Nn \l__eb_list_label_name_prop
   {
-    figure  = \eb@labelname@lof,
-    table   = \eb@labelname@lot
+    figure  = \eb@labelname@figure,
+    table   = \eb@labelname@table
   }
 \cs_gset:Npn \caption@@@addcontentsline #1#2#3#4
   {
@@ -1330,7 +1329,7 @@
     \addcontentsline{lol}{lstlisting}
       {
         \ifbool{eb@titletoc@hang@fix}{\eb@numberline}{}
-          {\eb@labelname@lol}\lst@@caption
+          {\eb@labelname@lstlisting}\lst@@caption
       }
   }
 
@@ -1542,9 +1541,7 @@
     \tl_set_eq:Nc \eb@toc@title { list#4name }
     \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
     \eb_title_number_intoc_spec:nn {#2} {#1}
-    \skip_add:Nv
-    \l__eb_toc_offset_skip { l__eb_toc_#4_below_skip }
-    \vspace*{\dim_use:N \l__eb_toc_offset_skip}
+    \vspace*{-\dim_use:c { l__eb_toc_#4_voffset_skip }}
     \eb_toc_start_multi_column_ext:n {#5}
     \group_end:
   }
@@ -1568,12 +1565,12 @@
     \tl_set:Nn \eb@bitoc@title { Contents }
     \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}}
     \eb_title_mark_notoc:n { \eb@toc@title }
-    \vspace*{\dim_use:N \l__eb_toc_offset_skip}
+    \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
     \eb_toc_start_multi_column_ext:n { toc }#3
     \IfBooleanT{#1}
       {
         \eb_title_mark_notoc:n { \eb@bitoc@title }
-        \vspace*{\dim_use:N \l__eb_toc_offset_skip}
+        \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
         \eb_toc_start_multi_column_ext:n { tec }
       }
     \group_end:
@@ -2400,7 +2397,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/06}{1.30}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/08}{1.3a}
   {Customization of tcolorbox for easybook}
 
 \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
-- 
cgit v1.2.3

