From b34dcff9ba90395c74cefedb4106a48221c772f4 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 16 Jan 2022 21:16:37 +0000
Subject: easybook (16jan22)

git-svn-id: svn://tug.org/texlive/trunk@61623 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/easybook/easybook.dtx  | 55 +++++++++++++---------
 1 file changed, 33 insertions(+), 22 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 bd76ebd4756..ec8cfcee744 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/01/15}{1.46B}
+\ProvidesExplClass{easybook}{2022/01/15}{1.46C}
   {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/01/15}{1.46B}
+\ProvidesExplPackage{easybase}{2022/01/15}{1.46C}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -590,7 +590,7 @@
 \ctex_define:nn { geoset }
   {
     headruleskip .tl_set:N  = \headruleskip,
-    headruleskip .initial:n = 1.5pt,
+    headruleskip .initial:n = 0pt,
     footruleskip .tl_set:N  = \footruleskip,
     footruleskip .initial:n = 3.5pt,
     unknown .code:n         =
@@ -1477,16 +1477,16 @@
 
 \ctex_define:nn { style }
   {
-    connect-figure .tl_set:N    = \l__eb_connect_figure_tl,
-    connect-table .tl_set:N     = \l__eb_connect_table_tl,
-    connect-listing .tl_set:N   = \l__eb_connect_lstlisting_tl,
-    connect-equation .tl_set:N  = \l__eb_connect_equation_tl,
-    connect-every .meta:n       =
+    hyphen-figure .tl_set:N   = \l__eb_hyphen_figure_tl,
+    hyphen-table .tl_set:N    = \l__eb_hyphen_table_tl,
+    hyphen-listing .tl_set:N  = \l__eb_hyphen_lstlisting_tl,
+    hyphen-equation .tl_set:N = \l__eb_hyphen_equation_tl,
+    hyphen-every .meta:n      =
       {
-        connect-figure  = #1,connect-table    = #1,
-        connect-listing = #1,connect-equation = #1
+        hyphen-figure  = #1,hyphen-table    = #1,
+        hyphen-listing = #1,hyphen-equation = #1
       },
-    connect-every .initial:n    = { . },
+    hyphen-every .initial:n   = { . },
     unknown .code:n = \eb_msg_abandon_option:n { style }
   }
 \eb_seq_map_inline:nn
@@ -1497,7 +1497,7 @@
         \int_compare:nNnT { \c@chapter } > { 0 }
           {
             \thechapter
-            \tl_use:c { l__eb_connect_#1_tl }
+            \tl_use:c { l__eb_hyphen_#1_tl }
           }
         \int_to_arabic:v { c@#1 }
       }
@@ -2182,6 +2182,7 @@
   }
 \eb_at_end_preamble:n
   {
+    \providecommand{\bibname}{\refname}
     \clist_if_empty:NF \l__eb_bib_datafile_clist
       {
         \bool_if:NTF \l__eb_backend_bibtex_bool
@@ -2371,11 +2372,25 @@
     \exp_args:NV \hypersetup \l__eb_hyperref_clist
   }
 
-\labelformat{part}{\CTEXthepart}
-\labelformat{chapter}{\CTEXthechapter}
-\labelformat{figure}{\figurename~#1}
-\labelformat{table}{\tablename~#1}
-\providecommand{\bibname}{\refname}
+\AtBeginDocument
+  {
+    \@ifpackageloaded{cleveref}{}
+      {
+        \labelformat{part}{\CTEXthepart}
+        \labelformat{chapter}{\CTEXthechapter}
+        \labelformat{figure}{\figurename~#1}
+        \labelformat{table}{\tablename~#1}
+        \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
+          {
+            \labelformat{section}{节 #1}
+            \labelformat{subsection}{小节 #1}
+          }
+          {
+            \labelformat{section}{Section~#1}
+            \labelformat{subsection}{Subsection~#1}
+          }
+      }
+  }
 \ctex_define:n
   {
     lstlistlistingname .tl_set:N  = \listlstlistingname,
@@ -2393,8 +2408,6 @@
         lstlistlistingname  = 代码索引,
         lstlistingname      = 代码
       }
-    \labelformat{section}{节 #1}
-    \labelformat{subsection}{小节 #1}
   }
   {
     \keys_set_known:nn { ctex }
@@ -2403,12 +2416,10 @@
         lstlistlistingname  = List~of~Codes,
         lstlistingname      = Code
       }
-    \labelformat{section}{Section~#1}
-    \labelformat{subsection}{Subsection~#1}
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/15}{1.46B}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/15}{1.46C}
   {Customization of tcolorbox for easybook}
 
 \cs_set_protected:Npn \addtotcbstyle #1#2
-- 
cgit v1.2.3

