From 6f47968cdf2699c851e65e60f9d916eededb00d0 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 12 Feb 2022 21:17:17 +0000
Subject: easybook (12feb22)

git-svn-id: svn://tug.org/texlive/trunk@61990 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/easybook/easybook.dtx  | 77 +++++++---------------
 1 file changed, 22 insertions(+), 55 deletions(-)

(limited to 'Master/texmf-dist/source/latex/easybook/easybook.dtx')

diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index 3e1a1609b5e..d242a6773be 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -15,7 +15,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/02/11}{1.623}
+\ProvidesExplClass{easybook}{2022/02/12}{1.624}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -305,7 +305,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/02/11}{1.623}
+\ProvidesExplPackage{easybase}{2022/02/12}{1.624}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1202,17 +1202,15 @@
 \ctex_define:n { figure/#1 .meta:nn = { ctex/#1 } {##1} }
 \ctex_define:n { table/#1 .meta:nn = { ctex/#1 } {##1} }
 \ctex_define:n { list/#1 .meta:nn = { ctex/#1 } {##1} }
-\cs_new_protected:Npn \eb_titletoc_if_hang_fix:n #1
+\cs_new_protected:Npn \eb_toc_entry_if_hang:n #1
   {
-    \bool_if:NT \l__eb_titletoc_hang_fix_bool
+    \bool_if:NT \l__eb_toc_entry_hang_bool
+      { \contentspush }
       {
-        \contentspush
-          {
-            \bool_if:NT \l__eb_toc_number_color_bool
-              { \color{ctex@toc@number} }
-            \thecontentslabel
-            \tl_use:c { l__eb_toc_#1_after_tl }
-          }
+        \bool_if:NT \l__eb_toc_number_color_bool
+          { \textcolor{ctex@toc@number} }
+          { \thecontentslabel }
+        \tl_use:c { l__eb_toc_#1_after_tl }
       }
   }
 \cs_new_protected:Npn \eb_toc_assign_keys:n #1
@@ -1224,13 +1222,15 @@
         #1/tocformat~+ .code:n  = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
         #1/tocindent .dim_set:c = l__eb_toc_#1_indent_dim,
         #1/tocrule .tl_set:c    = l__eb_toc_#1_rule_tl,
-        #1/tocafter .tl_set:c   = l__eb_toc_#1_after_tl
+        #1/tocafter .tl_set:c   = l__eb_toc_#1_after_tl,
+        #1/tocbelow .tl_set:c   = l__eb_toc_#1_below_tl
       }
     \titlecontents{#1}
       [\dim_use:c { l__eb_toc_#1_indent_dim }]
       {\tl_use:c { l__eb_toc_#1_format_tl }}
-      {\eb_titletoc_if_hang_fix:n {#1}}{}
+      {\eb_toc_entry_if_hang:n {#1}}{}
       {\tl_use:c { l__eb_toc_#1_rule_tl }}
+      [\tl_use:c { l__eb_toc_#1_below_tl }]
   }
 \seq_map_function:NN
 \c__ctex_headings_seq \eb_toc_assign_keys:n
@@ -1280,26 +1280,21 @@
     lolskip .skip_set:N   = \eb@toc@lol@skip,
     lolskip .initial:n    = 10pt,
     between .tl_set:N     = \l__eb_toc_main_between_hook_tl,
-    between .initial:n    =
-      {
-        \bool_if:NTF \l__eb_class_mode_book_bool 
-          { \vspace*{-1pc} }
-          { \vspace*{-0.2pc} }
-      },
+    between .initial:n = \bool_if:NT \l__eb_class_mode_book_bool { \vspace*{-1pc} },
     dotalign .bool_set:N  = \l__eb_toc_dot_align_bool,
     dotalign .default:n   = true,
     dotalign .initial:n   = true,
-    hang .bool_set:N      = \l__eb_titletoc_hang_fix_bool,
+    hang .bool_set:N      = \l__eb_toc_entry_hang_bool,
     hang .default:n       = true,
     hang .initial:n       = true,
     pagenumwd .code:n     = \contentsmargin{#1},
     pagenumwd .initial:n  = 1.55em,
     unknown .code:n = \eb_msg_deprecated_option:n { tocset }
   }
-\NewDocumentCommand{\tocrule}{st-O{0.7pc}D(){1.2}mO{}}
+\NewDocumentCommand{\tocrule}{st-O{0.7pc}d()mO{}}
   {
     \normalsize\normalfont
-    \titlerule*[#3]{\scalebox{#4}{#5}}#6
+    \titlerule*[#3]{\IfValueTF{#4}{\scalebox{#4}{#5}}{#5}}#6
     \bgroup
     \IfBooleanF{#2}
       {
@@ -1313,44 +1308,20 @@
       }
     \egroup
   }
-\cs_set_eq:NN \ctexnumberline \CTEXnumberline
 \cs_new:Npn \p@numberline { \protect\numberline }
-\cs_set:Npn \CTEXnumberline #1
-  {
-    \CTEXifname
-      {
-        \bool_if:NTF \l__eb_titletoc_hang_fix_bool
-          { \p@numberline{\use:c { CTEXthe#1 }} }
-          {
-            \use:c { CTEXthe#1 }
-            \tl_use:c { l__eb_toc_#1_after_tl }
-          }
-      }{}
-  }
 \cs_new:Npn \listnumberline #1
-  {
-    \bool_if:NTF \l__eb_titletoc_hang_fix_bool 
-      { \p@numberline{\use:c { #1name }~\use:c { the#1 }} }
-      {
-        \use:c { #1name }~\use:c { the#1 }
-        \tl_use:c { l__eb_toc_#1_after_tl }
-      }
-  }
+  { \p@numberline{\use:c { #1name }~\use:c { the#1 }} }
 \ctex_set:n
   {
     part/tocformat        = \addvspace{1pc}\sffamily\large,
     part/tocindent        = 0em,
     part/tocrule          = \tocrule{}[\bfseries],
     part/tocline          = \CTEXnumberline{#1}#2,
-    chapter/tocformat     = \addvspace{1pc}\sffamily\large,
+    chapter/tocformat     = \addvspace{1pc}\sffamily,
     chapter/tocindent     = 0em,
     chapter/tocrule       = \tocrule{$\cdot$}[\bfseries],
     chapter/tocline       = \CTEXnumberline{#1}#2,
-    section/tocformat     =
-      {
-        \addvspace{0.2pc}
-        \bool_if:NF \l__eb_class_mode_book_bool { \sffamily }
-      },
+    section/tocformat = \bool_if:NF \l__eb_class_mode_book_bool { \sffamily },
     section/tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 1.5em } { 0em },
     section/tocrule       =
       {
@@ -1358,15 +1329,11 @@
           { \tocrule{$\cdot$} }
           { \tocrule{$\cdot$}[\bfseries] }
       },
-    section/tocline       = \CTEXnumberline{#1}#2,
-    subsection/tocformat  = \addvspace{0.2pc},
     subsection/tocindent  = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.4em },
     subsection/tocrule    = \tocrule{$\cdot$},
-    subsection/tocline    = \CTEXnumberline{#1}#2,
-    list/tocformat        = \addvspace{0.2pc},
     list/tocindent        = 0em,
     list/tocrule          = \tocrule{$\cdot$},
-    list/between = \vspace*{-0.2pc\bool_if:NT \l__eb_class_mode_book_bool { - 10pt }},
+    list/between = \bool_if:NT \l__eb_class_mode_book_bool { \vspace*{-10pt} },
     table/tocline         = \listnumberline{table}#2,
     figure/tocline        = \listnumberline{figure}#2,
     lstlisting/tocline    = \listnumberline{lstlisting}#2
@@ -2332,7 +2299,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/11}{1.623}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/12}{1.624}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \addtotcbstyle #1#2
-- 
cgit v1.2.3

