From 4510872d0b6b2cb43210d1851021152ae77c6a90 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 18 Mar 2021 21:14:08 +0000
Subject: easybook (18mar21) (branch)

git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58524 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/easybook/easybook.cls | 117 ++++++++++------------
 1 file changed, 54 insertions(+), 63 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 71e01c79a13..2802bf40edd 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -5,7 +5,7 @@
 %% The original source files were:
 %%
 %% easybook.dtx  (with options: `class')
-%% Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+%% Copyright (C) 2021 by Qu Yi <quee123@foxmail.com>
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the CC-BY 4.0 License.
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/17}{1.23t}{}
+\ProvidesExplClass{easybook}{2021/03/18}{1.23u}{}
 
 \cs_generate_variant:Nn \keys_define:nn {nx}
 \cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -65,9 +65,9 @@
     paper/unknown .code:n = {\PassOptionsToPackage{#1}{geometry}},
     paper         .initial:n = a4paper,
 
-    oneside   .value_forbidden:n = true,
-    twoside   .value_forbidden:n = true,
-    oneside   .code:n =
+    oneside       .value_forbidden:n = true,
+    twoside       .value_forbidden:n = true,
+    oneside       .code:n =
       {
         \bool_set_false:N \l__page_twoside_bool
         \__put_ctexbook:n {oneside}
@@ -99,17 +99,17 @@
     {most}{tcolorbox},
     {xindy}{imakeidx},
     {CJKmath = true}{xeCJK},
-    {no-math}{fontspec}
+    {no-math}{fontspec},
+    {noto,upint}{newtxmath}
   }{\PassOptionsToPackage#1}
 \__put_ctexbook:n {\g__options_clist}
 \LoadClass[UTF8]{ctexbook}
 
 \bool_new:N \l__multoc_bool
-\bool_new:N \l__chap_withpart_bool
-\bool_new:N \l__foot_perpart_bool
-\bool_new:N \l__foot_perpage_bool
 \bool_new:N \l__notomath_bool
 \bool_new:N \l__uppercase_bool
+\bool_new:N \l__chap_withpart_bool
+\tl_new:N   \l__foot_numberwith_tl
 \tl_new:N   \g__config_tl
 
 \ctex_define:n
@@ -129,35 +129,37 @@
   }
 \__ctex_define:nn {style}
   {
-    multoc    .bool_set:N = \l__multoc_bool,
-    multoc    .default:n = true,
-    withpart  .bool_set:N = \l__chap_withpart_bool,
-    withpart  .default:n = true,
-    withpart  .initial:n = false,
-    perpart   .bool_set:N = \l__foot_perpart_bool,
-    perpart   .default:n = true,
-    perpart   .initial:n = false,
-    perpage   .bool_set:N = \l__foot_perpage_bool,
-    perpage   .default:n = true,
-    perpage   .initial:n = false,
-    notomath  .bool_set:N = \l__notomath_bool,
-    notomath  .default:n = true,
-    notomath  .initial:n = true,
-    rulewidth .dim_set:N = \l__rule_width_dim,
-    rulewidth .initial:n = 0.75pt,
-    uppercase .bool_set:N = \l__uppercase_bool,
-    uppercase .default:n = true,
-    uppercase .initial:n = true,
-    figure-sep    .tl_set:N = \l__figure_separator_tl,
-    table-sep     .tl_set:N = \l__table_separator_tl,
-    listing-sep   .tl_set:N = \l__lstlisting_separator_tl,
-    equation-sep  .tl_set:N = \l__equation_separator_tl,
-    number-sep    .meta:n =
+    multoc            .bool_set:N = \l__multoc_bool,
+    multoc            .default:n = true,
+    withpart          .bool_set:N = \l__chap_withpart_bool,
+    withpart          .default:n = true,
+    withpart          .initial:n = false,
+    footwith          .choice:,
+    footwith          .value_required:n = true,
+    footwith/part     .code:n =
+      {\tl_set:Nn \l__foot_numberwith_tl{#1}},
+    footwith/page     .code:n =
+      {\tl_set:Nn \l__foot_numberwith_tl{#1}},
+    footwith/chapter  .code:n = {},
+    footwith          .initial:n = chapter,
+    notomath          .bool_set:N = \l__notomath_bool,
+    notomath          .default:n = true,
+    notomath          .initial:n = true,
+    rulewidth         .dim_set:N = \l__rule_width_dim,
+    rulewidth         .initial:n = 0.75pt,
+    uppercase         .bool_set:N = \l__uppercase_bool,
+    uppercase         .default:n = true,
+    uppercase         .initial:n = true,
+    figure-sep        .tl_set:N = \l__figure_separator_tl,
+    table-sep         .tl_set:N = \l__table_separator_tl,
+    listing-sep       .tl_set:N = \l__lstlisting_separator_tl,
+    equation-sep      .tl_set:N = \l__equation_separator_tl,
+    number-sep        .meta:n =
       {
         figure-sep = {#1},table-sep = {#1},
         listing-sep = {#1},equation-sep = {#1}
       },
-    number-sep    .initial:n = {.}
+    number-sep        .initial:n = {.}
   }
 
 \RequirePackage
@@ -177,19 +179,9 @@
     tcolorbox,
     imakeidx
   }
-\RequirePackage[
-  lang = {chinese-utf8},
-  type = {CC},
-  modifier = {by},
-  version = {4.0}
-  ]{doclicense}
 \ctex_at_end_preamble:n
   {
-    \bool_if:NT \l__notomath_bool
-      {
-        \RequirePackage[noto,upint]{newtxmath}
-        \RequirePackage{bm}
-      }
+    \bool_if:NT \l__notomath_bool{\RequirePackage{newtxmath,bm}}
     \tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}}
   }
 
@@ -333,15 +325,15 @@
 \cs_gset_eq:NN \easypagestyle\fancypagestyle
 \__ctex_define:nn {hdrset}
   {
-    head-foot .tl_set:N = \l__fancyhf_content_tl,
-    head-foot .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 =
+    chap-mark     .tl_set:N = \l__fancyhf_chap_mark_tl,
+    chap-mark     .initial:n =
       {
         \int_compare:nT {\c@secnumdepth > -1}
           {
@@ -352,8 +344,8 @@
             \fi
           }
       },
-    sec-mark  .tl_set:N = \l__fancyhf_sec_mark_tl,
-    sec-mark  .initial:n =
+    sec-mark      .tl_set:N = \l__fancyhf_sec_mark_tl,
+    sec-mark      .initial:n =
       {
         \int_compare:nT {\c@secnumdepth > 0}
           {
@@ -1121,9 +1113,9 @@
 
 \__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},
 
     bib-style             .choice:,
@@ -1142,10 +1134,10 @@
       {\tl_set_eq:NN \l__bib_otherstyle_tl\l_keys_value_tl},
     bib-style             .initial:n = numerical,
 
-    cite-style  .code:n =
+    cite-style            .code:n =
       {\tl_set:Nn \l__bib_citestyle_tl{#1}},
-    bibfile     .tl_set:N = \l__bib_file_tl,
-    bibfile     .initial:n = refs.bib
+    bibfile               .tl_set:N = \l__bib_file_tl,
+    bibfile               .initial:n = refs.bib
   }
 
 \cs_new_protected:Npn \__bibtex_set:
@@ -1232,12 +1224,12 @@
       {\cs_gset:Npn \hangfootparindent{2\ccwd}}
     \bool_if:NT \l__chap_withpart_bool
       {\counterwithin*{chapter}{part}}
-    \bool_if:NT \l__foot_perpart_bool
+    \tl_if_eq:NnT \l__foot_numberwith_tl{part}
       {
         \counterwithout*{footnote}{chapter}
         \counterwithin*{footnote}{part}
       }
-    \bool_if:NT \l__foot_perpage_bool
+    \tl_if_eq:NnT \l__foot_numberwith_tl{page}
       {
         \counterwithout*{footnote}{chapter}
         \counterwithin*{footnote}{page}
@@ -1383,12 +1375,11 @@
 
 \ctex_at_end_preamble:n
   {
-    \RequirePackage[pdfstartview = FitH,bookmarksnumbered]{hyperref}
-    \RequirePackage{cleveref}
+    \RequirePackage{hyperref,cleveref}
     \urlstyle{same}
-    \exp_args:NV \hypersetup\l__hyperref_clist
     \__allow_urlbreak:
-
+    \ctex_hypersetup:n {pdfstartview = FitH,bookmarksnumbered}
+    \exp_args:NV \hypersetup\l__hyperref_clist
     \bool_if:NTF \l__lang_chinese_bool
       {
         \keys_set_known:nn {ctex}
-- 
cgit v1.2.3

