From 5bc44ca57dbc5dac1c9beae2df2712cdb16dc563 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 10 Aug 2021 03:01:45 +0000
Subject: CTAN sync 202108100301

---
 macros/latex/contrib/easybook/easybook.dtx | 78 +++++++++++++++++++-----------
 1 file changed, 51 insertions(+), 27 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 b48cd00d3d..6a32dd2f6d 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -8,7 +8,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/08/06}{1.28F}
+\ProvidesExplClass{easybook}{2021/08/09}{1.28H}
   {Typeset Chinese theses or books}
 
 \bool_set_false:N \l__eb_compile_draft_bool
@@ -292,7 +292,7 @@
 %<*package>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/08/06}{1.28F}
+\ProvidesExplPackage{easybase}{2021/08/09}{1.28H}
   {Typeset Chinese theses or books}
 
 \cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
@@ -819,6 +819,8 @@
     fnmark-code .initial:n          =
       { ,\tl_if_eq:NnF \l__eb_fnmark_position_tl { super } { \space } },
     fnmark-form .tl_set:N           = \l__eb_fnmark_format_tl,
+    fncust-form .tl_set:N           = \l__eb_fncust_format_tl,
+    fnboth-form .meta:n = { fnmark-form = #1,fncust-form = #1 },
 
     footnotetype .multichoices:nn   =
       { default,hang,bottom,para }
@@ -957,8 +959,7 @@
     \selectfont\ignorespaces
     \l__eb_subfont_footnote_tl
   }
-\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}}
-\providecommand{\spb@textsuperscript@save}{\textsuperscript}
+\ProvideDocumentCommand{\super}{d()mo}{\textsuperscript{#2}}
 \providecommand{\spbset}{\use_none:n}
 \cs_set_protected:Npn \footref #1
   {
@@ -1001,34 +1002,38 @@
         \H@@footnotemark
       }
   }
+\NewDocumentCommand{\eb@fnmark@super}{sm}
+  {
+    \IfBooleanTF{#1}
+      {\super{#2}[0pt]}
+      {\super(\l__eb_fnmark_format_tl){#2}[0pt]}
+  }
+\cs_new_protected:Npn \eb_fnmark_format_initial:
+  {
+    \spbset{super-format = { },nohshift}
+    \tl_use:N \l__eb_subfont_footnote_tl
+  }
 \cs_set:Npn \@makefnmark
   {
     \hbox:n
       {
-        \spbset{super-format = { }}
-        \tl_use:N \l__eb_subfont_footnote_tl
-        \tl_use:N \l__eb_fnmark_format_tl
-          {
-            \tl_if_eq:NnTF \@mpfn { footnote }
-              { \super{\eb@thefnmark}[0pt] }
-              { \super{\@thefnmark}[0pt] }
-          }
+        \eb_fnmark_format_initial:
+        \tl_if_eq:NnTF \@mpfn { footnote }
+          { \eb@fnmark@super{\eb@thefnmark} }
+          { \eb@fnmark@super{\@thefnmark} }
       }
   }
 \cs_new:Npn \eb@makefnmark
   {
     \hbox:n
       {
-        \tl_use:N \l__eb_subfont_footnote_tl
-        \tl_use:N \l__eb_fnmark_format_tl
+        \eb_fnmark_format_initial:
+        \tl_if_eq:NnT \l__eb_fnmark_position_tl { super }
+          { \eb@fnmark@super* }
           {
-            \tl_if_eq:NnT \l__eb_fnmark_position_tl { super }
-              { \spb@textsuperscript@save }
-              {
-                \tl_use:N \l__eb_fnmark_before_tl
-                \@thefnmark
-                \tl_use:N \l__eb_fnmark_after_tl
-              }
+            \tl_use:N \l__eb_fnmark_before_tl
+            \l__eb_fnmark_format_tl{\@thefnmark}
+            \tl_use:N \l__eb_fnmark_after_tl
           }
       }
   }
@@ -1044,16 +1049,35 @@
         \group_end:
       }
   }
-\NewDocumentCommand{\Footnote}{O{#2}m}
+\cs_new_protected:Npn \eb_fncust_format_initial:
+  {
+    \hdrset{fnmark-code = { }}
+    \tl_set_eq:NN
+    \l__eb_fnmark_format_tl \l__eb_fncust_format_tl
+  }
+\NewDocumentCommand{\Footnote}{O{#2}mm}
   {
+    \group_begin:
+    \eb_fncust_format_initial:
     \eb@@makefnmark{#2}{#1}
     \@footnotemark
-    \@footnotetext
+    \@footnotetext{#3}
+    \group_end:
   }
 \cs_new_protected:Npn \Footnotemark #1
-  { \eb@@makefnmark{#1}{#1}\@footnotemark }
-\cs_new_protected:Npn \Footnotetext #1
-  { \eb@@makefnmark{#1}{#1}\@footnotetext }
+  {
+    \group_begin:
+    \eb_fncust_format_initial:
+    \eb@@makefnmark{#1}{#1}\@footnotemark
+    \group_end:
+  }
+\cs_new_protected:Npn \Footnotetext #1#2
+  {
+    \group_begin:
+    \eb_fncust_format_initial:
+    \eb@@makefnmark{#1}{#1}\@footnotetext{#2}
+    \group_end:
+  }
 \cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi }
 \cs_set:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } }
 
@@ -2372,7 +2396,7 @@
   }
 %</package>
 %<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/06}{1.28F}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/09}{1.28H}
   {Customization of tcolorbox for easybook}
 
 \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
-- 
cgit v1.2.3

