From 2127350faee9892fffe1d3e8ada729a8877f0e35 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 8 Mar 2021 22:57:05 +0000
Subject: easybook (8mar21) (branch)

git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58235 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/easybook/easybook.cls | 114 +++++++++++-----------
 1 file changed, 57 insertions(+), 57 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/easybook/easybook.cls')

diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 29fce05d8af..29fb884d845 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -9,7 +9,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/06}{1.23j}{}
+\ProvidesExplClass{easybook}{2021/03/08}{1.23k}{}
 
 \cs_generate_variant:Nn \keys_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -103,6 +103,7 @@
     bibset              .meta:nn = {ctex/bibset}{#1},
     thmset              .meta:nn = {ctex/thmset}{#1},
     geoset              .meta:nn = {ctex/geoset}{#1},
+    hdrset              .meta:nn = {ctex/hdrset}{#1},
     tocset              .meta:nn = {ctex/tocset}{#1},
     config              .tl_set:N = \g__config_tl,
     lstlistlistingname  .tl_set:N = \lstlistlistingname,
@@ -321,14 +322,36 @@
 \cs_gset_eq:NN \easyhead\fancyhead
 \cs_gset_eq:NN \easyfoot\fancyfoot
 \cs_gset_eq:NN \easypagestyle\fancypagestyle
-\ctex_define:n
+\__ctex_define:nn {hdrset}
   {
-    hdrset  .tl_set:N = \l__fancyhf_content_tl,
-    hdrset  .initial:n =
+    head-foot .tl_set:N = \l__fancyhf_content_tl,
+    head-foot .initial:n =
       {
         \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
         \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
         \easyhead[EL,OR]{\color{ctex@frame}\thepage}
+      },
+    chap-mark .tl_set:N = \l__fancyhf_chap_mark_tl,
+    chap-mark .initial:n =
+      {
+        \int_compare:nT {\c@secnumdepth > -1}
+          {
+            \if@mainmatter
+              \ifodd\CTEX@chapter@numbering
+                \CTEXthechapter\hspace{\ccwd}
+              \fi
+            \fi
+          }
+      },
+    sec-mark  .tl_set:N = \l__fancyhf_sec_mark_tl,
+    sec-mark  .initial:n =
+      {
+        \int_compare:nT {\c@secnumdepth > 0}
+          {
+            \ifodd\CTEX@section@numbering
+              \CTEXthesection\hspace{0.5\ccwd}
+            \fi
+          }
       }
   }
 \ctex_at_end_preamble:n
@@ -343,26 +366,10 @@
             \markboth
               {
                 \bool_if:NT \l__uppercase_bool{\MakeUppercase}
-                  {
-                    \ifnum\c@secnumdepth>\m@ne
-                      \if@mainmatter
-                        \ifodd\CTEX@chapter@numbering
-                          \CTEXthechapter\hspace{\ccwd}
-                        \fi
-                      \fi
-                    \fi#1
-                  }
+                  {\l__fancyhf_chap_mark_tl#1}
               }{
                 \bool_if:NT \l__uppercase_bool{\MakeUppercase}
-                  {
-                    \ifnum\c@secnumdepth>\m@ne
-                      \if@mainmatter
-                        \ifodd\CTEX@chapter@numbering
-                          \CTEXthechapter\hspace{\ccwd}
-                        \fi
-                      \fi
-                    \fi#1
-                  }
+                  {\l__fancyhf_chap_mark_tl#1}
               }
           }
         \l__fancyhf_content_tl
@@ -373,15 +380,7 @@
             \markboth
               {
                 \bool_if:NT \l__uppercase_bool{\MakeUppercase}
-                  {
-                    \ifnum\c@secnumdepth>\m@ne
-                      \if@mainmatter
-                        \ifodd\CTEX@chapter@numbering
-                          \CTEXthechapter\hspace{\ccwd}
-                        \fi
-                      \fi
-                    \fi#1
-                  }
+                  {\l__fancyhf_chap_mark_tl#1}
               }{}
           }
         \l__fancyhf_content_tl
@@ -392,13 +391,7 @@
         \markright
           {
             \bool_if:NT \l__uppercase_bool{\MakeUppercase}
-              {
-                \ifnum\c@secnumdepth>\z@
-                  \ifodd\CTEX@section@numbering
-                    \CTEXthesection\hspace{0.5\ccwd}
-                  \fi
-                \fi#1
-              }
+              {\l__fancyhf_sec_mark_tl#1}
           }
       }
     \cs_gset:Npn \headrule
@@ -522,19 +515,26 @@
 \cs_new_protected:Npn \__markboth:n #1
   {
     \bool_if:NTF \l__page_twoside_bool
-      {\markboth{\MakeUppercase#1}{\MakeUppercase#1}}
-      {\markboth{\MakeUppercase#1}{}}
+      {
+        \markboth
+          {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1}
+          {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1}
+      }{
+        \markboth
+          {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1}
+          {}
+      }
   }
 \cs_new_protected:Npn \__title_mark_intoc:n #1
   {
     \chapter*{\phantomsection#1}
     \CTEX@addtocline{chapter}{#1}
-    \__markboth:n #1
+    \__markboth:n {#1}
   }
 \cs_new_protected:Npn \__title_mark:n #1
   {
     \chapter*{\phantomsection#1}
-    \__markboth:n #1
+    \__markboth:n {#1}
   }
 \cs_gset:Npn \tableofcontents
   {
@@ -635,7 +635,7 @@
   }
 \__patch_cmd:Nnn \imki@indexheaders
   {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
-  {\__markboth:n \indexname}
+  {\__markboth:n {\indexname}}
 
 \tl_new:N \l__table_font_tl
 \tl_new:N \l__figure_font_tl
@@ -1046,31 +1046,31 @@
 
 \__ctex_define:nn {bibset}
   {
-    backend             .choice:,
-    backend/bibtex      .code:n = {},
-    backend/biblatex    .code:n =
+    backend           .choice:,
+    backend/bibtex    .code:n = {},
+    backend/biblatex  .code:n =
       {\bool_set_false:N \l__backend_bibtex_bool},
 
-    bibstyle            .choice:,
-    bibstyle            .value_required:n = true,
-    bibstyle/numerical  .code:n =
+    bib-style             .choice:,
+    bib-style             .value_required:n = true,
+    bib-style/numerical   .code:n =
       {
         \tl_set:Nn  \l__bib_style_tl{#1}
         \tl_clear:N \l__bib_mysty_tl
       },
-    bibstyle/authoryear .code:n =
+    bib-style/authoryear  .code:n =
       {
         \tl_set:Nn  \l__bib_style_tl{#1}
         \tl_clear:N \l__bib_mysty_tl
       },
-    bibstyle/unknown    .code:n =
+    bib-style/unknown     .code:n =
       {\tl_set_eq:NN \l__bib_mysty_tl\l_keys_value_tl},
-    bibstyle            .initial:n = numerical,
+    bib-style             .initial:n = numerical,
 
-    citestyle           .code:n =
+    cite-style  .code:n =
       {\tl_set:Nn \l__bib_citesty_tl{#1}},
-    bibfile             .tl_set:N = \l__bib_file_tl,
-    bibfile             .initial:n = ref/refs.bib
+    bibfile     .tl_set:N = \l__bib_file_tl,
+    bibfile     .initial:n = ref/refs.bib
   }
 
 \cs_new_protected:Npn \__bibtex_set:
@@ -1092,7 +1092,7 @@
       {\exp_args:NV \setcitestyle\l__bib_citesty_tl}
     \cs_set:Npn \bibsection{\__title_mark_intoc:n \bibname}
     \skip_set:Nn \bibsep{0ex}
-    \NewDocumentCommand\printbibliography{o}
+    \NewDocumentCommand{\printbibliography}{o}
       {\exp_args:NV \bibliography\l__bib_file_tl}
   }
 \cs_new_protected:Npn \__put_biblatex:n #1
@@ -1101,7 +1101,7 @@
   {
     \tl_if_empty:NTF \l__bib_mysty_tl
       {
-        \tl_if_eq:VnT \l__bib_style_tl{number}
+        \tl_if_eq:VnT \l__bib_style_tl{numerical}
           {\__put_biblatex:n {style = gb7714-2015}}
         \tl_if_eq:VnT \l__bib_style_tl{authoryear}
           {\__put_biblatex:n {style = gb7714-2015ay}}
-- 
cgit v1.2.3

