texlive[59174] Master/texmf-dist: easybook (12may21)

commits+karl at tug.org commits+karl at tug.org
Wed May 12 22:02:13 CEST 2021


Revision: 59174
          http://tug.org/svn/texlive?view=revision&revision=59174
Author:   karl
Date:     2021-05-12 22:02:13 +0200 (Wed, 12 May 2021)
Log Message:
-----------
easybook (12may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
    trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
    trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls

Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-05-12 20:02:00 UTC (rev 59173)
+++ trunk/Master/texmf-dist/source/latex/easybook/easybook.dtx	2021-05-12 20:02:13 UTC (rev 59174)
@@ -24,11 +24,11 @@
 % \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
 % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
 % \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
-% \changes{v1.25g}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
+% \changes{v1.25h}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
 %
 % \title{\sffamily easybook 文档类手册}
 % \author{瞿毅}
-% \date{2021/05/10\hskip\ccwd\relax v1.25g\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/05/12\hskip\ccwd\relax v1.25h\thanks{\url{https://gitee.com/texl3/easybook}}}
 %
 % \maketitle
 % \begin{abstract}
@@ -118,7 +118,7 @@
 % \end{syntax}
 % 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
 % \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25g}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \changes{v1.25h}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
 % \end{function}
 %
 % \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -169,7 +169,7 @@
 %   \tn{listoflistings*+}\oarg{键值列表}
 % \end{syntax}
 % \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
-% \changes{v1.25g}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
+% \changes{v1.25h}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
 % \end{function}
 %
 % \begin{function}{multoc,title,format,aftertitle,pagestyle,book,article}
@@ -200,7 +200,7 @@
 % 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。
 %
 % 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下
-% \changes{v1.25g}{2021/05/05}{增加与双语目录配合的标题命令。}
+% \changes{v1.25h}{2021/05/05}{增加与双语目录配合的标题命令。}
 % \end{function}
 %
 % \begin{function}{biname,binmuber}
@@ -299,7 +299,7 @@
 % \opt{refset} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。
 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
 % \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
-% \changes{v1.25g}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
+% \changes{v1.25h}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
 % \end{function}
 %
 % \begin{optdesc}
@@ -344,7 +344,7 @@
 %
 % \subsection{其它字体}
 % \label{subsec:other font}
-% \begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{table-cap,figure-cap,listing-cap,footnote,marginpar}
+% \begin{function}[EXP,added = 2021-01-08,updated = 2021-05-12]{table-cap,figure-cap,listing-cap,footnote,marginpar}
 % \begin{syntax}
 %   table-cap = <\tn{sffamily}\tn{small}>
 %   figure-cap = <\tn{sffamily}\tn{small}>
@@ -361,32 +361,31 @@
 %   \item[table-cap] 表格标题的字体设置。
 %   \item[figure-cap] 图片标题的字体设置。
 %   \item[listing-cap] 代码标题的字体设置。
-%   \item[footnote] 脚注的字体设置,请不要使用字号命令。
+%   \item[footnote] 脚注的字体设置,包括脚注标记与内容的字体。
 %   \item[marginpar] 边注的字体设置。
 % \end{optdesc}
 %
 % \subsection{参考文献}
 % \label{subsec:reference}
-% \begin{function}[EXP,added = 2021-01-11,updated = 2021-04-09]{loadpkg,backend,bib-style,cite-style,datafile}
+% \begin{function}[EXP,added = 2021-01-11,updated = 2021-05-11]{backend,bib-style,cite-style,datafile}
 % \begin{syntax}
-%   loadpkg = <(true)|false>
 %   backend = <(bibtex)|biblatex>
 %   bib-style = <(numerical)|authoryear|其它格式>
 %   cite-style = <标注风格>
-%   datafile = <refs.bib>
+%   datafile = <参考文献数据库名>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{bibset/...}
 % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
 % \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
 % \changes{v1.24}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
+% \changes{v1.25h}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
 % \end{function}
 %
 % \begin{optdesc}
-%   \item[loadpkg] 是否载入 \pkg{natbib} 或 \pkg{biblatex} 宏包,关闭此选项后需要在导言区手动载入参考文献宏包,之后可使用相关配置命令(见下文)或完全自行设置参考文献。
 %   \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
 %   \item[bib-style] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
 %   \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
-%   \item[datafile] 参考文献数据库的文件名,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,若不在当前文件夹名称需要包含路径,默认是一个在当前文件夹以 \opt{refs.bib} 命名的文件。
+%   \item[datafile] 参考文献数据库的文件名,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,若不在当前文件夹名称需要包含路径。只有设置数据库的文件名才会载入 \pkg{natbib} 或 \pkg{biblatex} 宏包,之后才可使用相关配置命令,否则需要自行配置参考文献。
 % \end{optdesc}
 %
 % \begin{function}[added = 2021-01-11,updated = 2021-04-09]{\printbibliography,\EbBibtexSet,\EbBiblatexPreset,\EbBiblatexPostset}
@@ -393,7 +392,7 @@
 % \begin{syntax}
 %   \tn{printbibliography}\oarg{键值列表}
 % \end{syntax}
-% 关闭 \opt{loadpkg} 选项时 \opt{bibset} 中的选项会失效,但是后三个命令保存了 \opt{bibset} 模块预置的参考文献选项与配置,与对应宏包配合使用它们时 \opt{bibset} 中的选项仍然有效,也可以不使用它们完全自行设置参考文献方案。开启 \opt{loadpkg} 选项对它们重新定义也可以达到重新设置参考文献的效果。
+% 不设置参考文献数据库名时 \opt{bibset} 中的选项会失效,但是后三个命令保存了 \opt{bibset} 模块预置的参考文献选项与配置,与对应宏包配合使用它们时 \opt{bibset} 中的选项仍然有效,也可以不使用它们完全自行设置参考文献方案。设置参考文献数据库名时对它们重新定义也可以达到重新设置参考文献的效果。
 % \end{function}
 %
 % \begin{optdesc}
@@ -488,11 +487,8 @@
 %
 % \subsection{页面尺寸}
 % \label{subsec:page margins}
-% \begin{function}[EXP,added = 2021-01-13,updated = 2021-03-21]{footnotemargin,footparskip,footparindent,left,top,hmargin,textwidth,includehead}
+% \begin{function}[EXP,added = 2021-01-13,updated = 2021-05-11]{left,top,hmargin,textwidth,includehead}
 % \begin{syntax}
-%   footnotemargin = <脚注首行缩进|(0.5\tn{ccwd})>
-%   footparskip = <脚注段落间距|(0ex)>
-%   footparindent = <脚注分段缩进|(2\tn{ccwd})>
 %   left = <页面左边距>
 %   top = <页面上边距>
 %   hmargin = \marg{左边距,右边距}
@@ -500,7 +496,7 @@
 %   includehead = <true|(false)>
 % \end{syntax}
 % \ding{229} 以上选项路径为 \opt{geoset/...} \\
-% 预置的页面尺寸与 \cls{Word} 的默认值接近,\opt{geoset} 会将前4个选项以外的其它选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
+% 预置的页面尺寸与 \cls{Word} 的默认值接近,\opt{geoset} 会将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
 % \changes{v1.21}{2021/01/13}{增加配置页面尺寸的选项。}
 % \end{function}
 %
@@ -560,6 +556,25 @@
 %     }
 % \end{ctexexam}
 %
+% \subsubsection{脚注格式}
+% \begin{function}[EXP,added = 2021-05-12]{fnmargin,fnparskip,fnparindent,fnhang,fnmark-pos,fnmark-num,fnmark-num,fnmark-form,afterfnmark}
+% \begin{syntax}
+%   fnmargin = <脚注首段缩进|(0.75\tn{ccwd})>
+%   fnparskip = <脚注段落间距|(0ex)>
+%   fnparindent = <脚注段落缩进|(2\tn{ccwd})>
+%   fnhang = <(true)|false>
+%   fnmark-pos = <normal|(super)>
+%   fnmark-num = <(plain)|pifont|pifont*|pifont-sans|pifont-sans*>
+%   fnmark-form = <脚注标记的格式>
+%   afterfnmark = <脚注标记后的代码>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
+% 上面几个选项用于设置脚注格式,\opt{fnparskip} 和 \opt{fnparindent} 选项仅在 \opt{fnhang = true} 时有效。\opt{fnhang} 用于将脚注设置为悬挂缩进的格式,\opt{fnmark-pos} 选项设置脚注编号的位置,正常文本或是上标形式。\opt{fnmark-num} 选项设置脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括1-10。
+%
+% \opt{fnmark-form} 是脚注标记的格式,默认为空,在此设置字体命令会覆盖 \opt{elsefont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
+% \changes{v1.25h}{2021/05/12}{增加脚注样式设置选项。}
+% \end{function}
+%
 % \subsection{目录样式}
 % \label{subsec:catalog style}
 % \begin{function}[EXP,added = 2021-01-13,updated = 2021-05-01]{format,format+,indent,rule,numsep}
@@ -951,7 +966,7 @@
 %<*class>
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/05/10}{1.25g}{beta}
+\ProvidesExplClass{easybook}{2021/05/12}{1.25h}{beta}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -963,14 +978,19 @@
   { \PassOptionsToClass{#1}{ctexbook} }
 \cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
   {
-    \ctex_patch_cmd_once:NnnnTF #1 { } { #2 } { #3 }
+    \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
       { } { \ctex_patch_failure:N #1 }
   }
 \cs_new_protected:Npn \eb_appto_cmd:Nn #1#2
   {
-    \ctex_appto_cmd:NnnTF #1 { } { #2 }
+    \ctex_appto_cmd:NnnTF #1 { } {#2}
       { } { \ctex_patch_failure:N #1 }
   }
+\cs_new_protected:Npn \eb_preto_cmd:Nn #1#2
+  {
+    \ctex_preto_cmd:NnnTF #1 { } {#2}
+      { } { \ctex_patch_failure:N #1 }
+  }
 \cs_new_protected:Npn \eb_at_end_preamble:n
   { \ctex_gadd_ltxhook:nn { env/document/before } }
 \cs_gset_eq:NN \PackageWarning \use_none:nn
@@ -1041,7 +1061,7 @@
 \clist_map_inline:nn
   {
     { svgnames } { xcolor },
-    { hang,stable } { footmisc },
+    { stable } { footmisc },
     { normalem } { ulem },
     { protrusion = false } { microtype },
     { list = off } { bicaption },
@@ -1278,12 +1298,6 @@
 \clist_new:N \g__eb_geometry_clist
 \eb_ctex_define:nn { geoset }
   {
-    footnotemargin .dim_set:N = \footnotemargin,
-    footnotemargin .initial:n = 0.5\ccwd,
-    footparskip .tl_set:N     = \hangfootparskip,
-    footparskip .initial:n    = 0ex,
-    footparindent .tl_set:N   = \hangfootparindent,
-    footparindent .initial:n  = 2\ccwd,
     unknown .code:n =
       {
         \clist_gput_right:Nx \g__eb_geometry_clist
@@ -1383,8 +1397,31 @@
         \hrule width 0.35\columnwidth height \l__eb_rule_width_dim
         \vspace*{2.6pt}
         \group_end:
-      }
+      },
+
+    fnmargin .dim_set:N     = \footnotemargin,
+    fnmargin .initial:n     = 0.75\ccwd,
+    fnparskip .tl_set:N     = \hangfootparskip,
+    fnparskip .initial:n    = 0ex,
+    fnparindent .tl_set:N   = \hangfootparindent,
+    fnparindent .initial:n  = 2\ccwd,
+
+    fnhang .bool_set:N      = \l__eb_footnote_hang_bool,
+    fnhang .default:n       = true,
+    fnhang .initial:n       = true,
+    fnmark-pos .tl_set:N    = \l__eb_fnmark_position_tl,
+    fnmark-pos .initial:n   = super,
+    afterfnmark .tl_set:N   = \l__eb_fnmark_after_tl,
+    afterfnmark .initial:n  =
+      { \tl_if_eq:NnF \l__eb_fnmark_position_tl { super } { \space } },
+    fnmark-form .tl_set:N   = \l__eb_fnmark_format_tl,
+
+    fnmark-num .choices:nn        =
+      { plain,pifont,pifont*,pifont-sans,pifont-sans* }
+      { \tl_gset_eq:NN \l__eb_fnmark_number_tl \l_keys_choice_tl },
+    fnmark-num .value_required:n  = true
   }
+
 \cs_new:Npn \eb_upper_number_mark_bool:nn #1#2
   {
     \bool_if:NT \l__eb_uppercase_bool
@@ -1428,6 +1465,108 @@
       }
   }
 
+\eb_at_end_preamble:n
+  {
+    \group_begin:
+    \footnotesize
+    \exp_args:Nx
+    \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
+    \exp_args:NNNo \group_end:
+    \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
+    \bool_if:NT \l__eb_chap_withpart_bool
+      { \counterwithin*{chapter}{part} }
+    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
+      {
+        \counterwithout*{footnote}{chapter}
+        \counterwithin*{footnote}{part}
+      }
+    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
+      {
+        \counterwithout*{footnote}{chapter}
+        \counterwithin*{footnote}{page}
+      }
+    \bool_if:NTF \l__eb_footnote_hang_bool
+      { \booltrue{FN at hangfoot} } { \boolfalse{FN at hangfoot} }
+  }
+\eb_patch_cmd:Nnn \@footnotetext
+  { \reset at font }
+  {
+    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
+    \selectfont\ignorespaces
+    \l__eb_font_footnote_tl
+  }
+\eb_patch_cmd:Nnn \@mpfootnotetext
+  { \reset at font }
+  {
+    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
+    \selectfont\ignorespaces
+    \l__eb_font_footnote_tl
+  }
+\ctex_after_end_preamble:n
+  {
+    \ExplSyntaxOn\char_set_catcode_letter:N \@
+    \eb_patch_cmd:Nnn \@footnotemark
+      { \@makefnmark }
+      {
+        \tl_use:N \l__eb_font_footnote_tl
+        \tl_use:N \l__eb_fnmark_format_tl
+          {\hbox:n { \textsuperscript{\@thefnmark} }}
+      }
+    \ExplSyntaxOff\char_set_catcode_other:N \@
+  }
+\cs_set:Npn \@makefnmark
+  {
+    \tl_use:N \l__eb_font_footnote_tl
+    \tl_use:N \l__eb_fnmark_format_tl
+      {
+        \hbox:n
+          {
+            \tl_if_eq:NnT \l__eb_fnmark_position_tl {super}
+              { \textsuperscript }{\@thefnmark}
+            \tl_use:N \l__eb_fnmark_after_tl
+          }
+      }
+  }
+\cs_set:Npn \thefootnote { \eb_footnote_counter:N \c at footnote }
+\cs_set:Npn \thempfootnote { \int_to_alph:n { \c at mpfootnote } }
+
+\cs_new_protected:Npn \eb_fnmark_number_set:nn #1#2
+  { \tl_const:cn { c__eb_fnmark_number_#1_tl } {#2} }
+\clist_map_inline:nn
+  {
+    { plain } { plain },
+    { pifont } { pifont },
+    { pifont_neg } { pifont* },
+    { pifont_sans } { pifont-sans },
+    { pifont_sans_neg } { pifont-sans* }
+  }
+  { \eb_fnmark_number_set:nn #1 }
+\cs_new:Npn \eb_fnmark_counter_pifont:N #1
+  { \ding{\int_eval:n { 171 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1
+  { \ding{\int_eval:n { 181 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_sans:N #1
+  { \ding{\int_eval:n { 191 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_sans_neg:N #1
+  { \ding{\int_eval:n { 201 + #1 }} }
+\cs_new:Npn \eb_footnote_counter:N #1
+  {
+    \tl_case:NnF \l__eb_fnmark_number_tl
+      {
+        \c__eb_fnmark_number_plain_tl
+          { \int_use:N #1 }
+        \c__eb_fnmark_number_pifont_tl
+          { \eb_fnmark_counter_pifont:N #1 }
+        \c__eb_fnmark_number_pifont_neg_tl
+          { \eb_fnmark_counter_pifont_neg:N #1 }
+        \c__eb_fnmark_number_pifont_sans_tl
+          { \eb_fnmark_counter_pifont_sans:N #1 }
+        \c__eb_fnmark_number_pifont_sans_neg_tl
+          { \eb_fnmark_counter_pifont_sans_neg:N #1 }
+      }
+      { \int_use:N #1 }
+  }
+
 \seq_const_from_clist:Nn \c__eb_toc_headings_level_seq
   { part,chapter,section,subsection,list }
 \seq_map_inline:Nn \c__eb_toc_headings_level_seq
@@ -1552,12 +1691,12 @@
 
     section/format  = \addvspace{0.35pc},
     section/indent  =
-      { \bool_if:NTF \l__eb_class_book_bool {1.5\ccwd } { 0\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 1.5\ccwd } { 0\ccwd } },
     section/rule    = \tocrule{$\cdot$},
 
     subsection/format = \addvspace{0.35pc},
     subsection/indent =
-      { \bool_if:NTF \l__eb_class_book_bool {3.8\ccwd } { 1.4\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 3.8\ccwd } { 1.4\ccwd } },
     subsection/rule   = \tocrule{$\cdot$},
 
     list/format = \addvspace{0.2pc},
@@ -2410,7 +2549,7 @@
 \tl_new:N \l__eb_bib_style_tl
 \tl_new:N \l__eb_bib_otherstyle_tl
 \tl_new:N \l__eb_bib_citestyle_tl
-\tl_new:N \l__eb_bib_file_tl
+\tl_new:N \l__eb_bib_datafile_tl
 
 \eb_ctex_define:nn { bibset }
   {
@@ -2437,13 +2576,8 @@
 
     cite-style .code:n  =
       { \tl_set:Nn \l__eb_bib_citestyle_tl {#1} },
-    datafile .tl_set:N  = \l__eb_bib_file_tl,
-    datafile .initial:n = refs.bib,
+    datafile .tl_set:N  = \l__eb_bib_datafile_tl,
 
-    loadpkg .bool_set:N = \l__eb_bib_loadpkg_bool,
-    loadpkg .default:n  = true,
-    loadpkg .initial:n  = true,
-
     bitoc-title .tl_set:N   = \l__eb_bib_bitoc_title,
     bitoc-title .initial:n  = Reference
   }
@@ -2473,7 +2607,7 @@
         \eb_multoc_pre_bool:
         \tl_set:Nn \bibsection
           { \eb_title_number_intoc_bool:nn {##2} {##1} }
-        \exp_args:NV \bibliography \l__eb_bib_file_tl
+        \exp_args:NV \bibliography \l__eb_bib_datafile_tl
         \eb_multoc_post_bool:
         \group_end:
       }
@@ -2496,7 +2630,7 @@
   }
 \cs_new_protected:Npn \EbBiblatexPostset
   {
-    \exp_args:NV \addbibresource \l__eb_bib_file_tl
+    \exp_args:NV \addbibresource \l__eb_bib_datafile_tl
     \tl_gset:Nn \blx at default@theheading { bibintoc }
     \defbibheading{bibintoc}[\bibname]
       {\eb_biber_title_level_bool:n {##1}}
@@ -2504,7 +2638,7 @@
   }
 \eb_at_end_preamble:n
   {
-    \bool_if:NT \l__eb_bib_loadpkg_bool
+    \tl_if_empty:NF \l__eb_bib_datafile_tl
       {
         \bool_if:NTF \l__eb_backend_bibtex_bool
           {
@@ -2519,45 +2653,6 @@
       }
   }
 
-\eb_at_end_preamble:n
-  {
-    \group_begin:
-    \footnotesize
-    \exp_args:Nx
-    \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
-    \exp_args:NNNo \group_end:
-    \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
-    \bool_if:NT \l__eb_chap_withpart_bool
-      { \counterwithin*{chapter}{part} }
-    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
-      {
-        \counterwithout*{footnote}{chapter}
-        \counterwithin*{footnote}{part}
-      }
-    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
-      {
-        \counterwithout*{footnote}{chapter}
-        \counterwithin*{footnote}{page}
-      }
-  }
-\eb_patch_cmd:Nnn \@footnotetext
-  { \reset at font }
-  {
-    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
-    \selectfont\ignorespaces
-    \l__eb_font_footnote_tl
-  }
-\eb_patch_cmd:Nnn \@mpfootnotetext
-  { \reset at font }
-  {
-    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
-    \selectfont\ignorespaces
-    \l__eb_font_footnote_tl
-  }
-\eb_patch_cmd:Nnn \@makefnmark
-  { \normalfont } { \l__eb_font_footnote_tl }
-\cs_gset:Npn \thempfootnote { \int_to_alph:n { \c at mpfootnote } }
-
 \lstdefinestyle{easy-listings}
   {
     language      = [LaTeX]TeX,

Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-05-12 20:02:00 UTC (rev 59173)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls	2021-05-12 20:02:13 UTC (rev 59174)
@@ -13,7 +13,7 @@
 %%   https://creativecommons.org/licenses/by/4.0/legalcode
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/05/10}{1.25g}{beta}
+\ProvidesExplClass{easybook}{2021/05/12}{1.25h}{beta}
 
 \cs_generate_variant:Nn \eb_ctex_define:nn { nx }
 \cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -25,14 +25,19 @@
   { \PassOptionsToClass{#1}{ctexbook} }
 \cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
   {
-    \ctex_patch_cmd_once:NnnnTF #1 { } { #2 } { #3 }
+    \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
       { } { \ctex_patch_failure:N #1 }
   }
 \cs_new_protected:Npn \eb_appto_cmd:Nn #1#2
   {
-    \ctex_appto_cmd:NnnTF #1 { } { #2 }
+    \ctex_appto_cmd:NnnTF #1 { } {#2}
       { } { \ctex_patch_failure:N #1 }
   }
+\cs_new_protected:Npn \eb_preto_cmd:Nn #1#2
+  {
+    \ctex_preto_cmd:NnnTF #1 { } {#2}
+      { } { \ctex_patch_failure:N #1 }
+  }
 \cs_new_protected:Npn \eb_at_end_preamble:n
   { \ctex_gadd_ltxhook:nn { env/document/before } }
 \cs_gset_eq:NN \PackageWarning \use_none:nn
@@ -103,7 +108,7 @@
 \clist_map_inline:nn
   {
     { svgnames } { xcolor },
-    { hang,stable } { footmisc },
+    { stable } { footmisc },
     { normalem } { ulem },
     { protrusion = false } { microtype },
     { list = off } { bicaption },
@@ -340,12 +345,6 @@
 \clist_new:N \g__eb_geometry_clist
 \eb_ctex_define:nn { geoset }
   {
-    footnotemargin .dim_set:N = \footnotemargin,
-    footnotemargin .initial:n = 0.5\ccwd,
-    footparskip .tl_set:N     = \hangfootparskip,
-    footparskip .initial:n    = 0ex,
-    footparindent .tl_set:N   = \hangfootparindent,
-    footparindent .initial:n  = 2\ccwd,
     unknown .code:n =
       {
         \clist_gput_right:Nx \g__eb_geometry_clist
@@ -445,8 +444,31 @@
         \hrule width 0.35\columnwidth height \l__eb_rule_width_dim
         \vspace*{2.6pt}
         \group_end:
-      }
+      },
+
+    fnmargin .dim_set:N     = \footnotemargin,
+    fnmargin .initial:n     = 0.75\ccwd,
+    fnparskip .tl_set:N     = \hangfootparskip,
+    fnparskip .initial:n    = 0ex,
+    fnparindent .tl_set:N   = \hangfootparindent,
+    fnparindent .initial:n  = 2\ccwd,
+
+    fnhang .bool_set:N      = \l__eb_footnote_hang_bool,
+    fnhang .default:n       = true,
+    fnhang .initial:n       = true,
+    fnmark-pos .tl_set:N    = \l__eb_fnmark_position_tl,
+    fnmark-pos .initial:n   = super,
+    afterfnmark .tl_set:N   = \l__eb_fnmark_after_tl,
+    afterfnmark .initial:n  =
+      { \tl_if_eq:NnF \l__eb_fnmark_position_tl { super } { \space } },
+    fnmark-form .tl_set:N   = \l__eb_fnmark_format_tl,
+
+    fnmark-num .choices:nn        =
+      { plain,pifont,pifont*,pifont-sans,pifont-sans* }
+      { \tl_gset_eq:NN \l__eb_fnmark_number_tl \l_keys_choice_tl },
+    fnmark-num .value_required:n  = true
   }
+
 \cs_new:Npn \eb_upper_number_mark_bool:nn #1#2
   {
     \bool_if:NT \l__eb_uppercase_bool
@@ -490,6 +512,108 @@
       }
   }
 
+\eb_at_end_preamble:n
+  {
+    \group_begin:
+    \footnotesize
+    \exp_args:Nx
+    \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
+    \exp_args:NNNo \group_end:
+    \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
+    \bool_if:NT \l__eb_chap_withpart_bool
+      { \counterwithin*{chapter}{part} }
+    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
+      {
+        \counterwithout*{footnote}{chapter}
+        \counterwithin*{footnote}{part}
+      }
+    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
+      {
+        \counterwithout*{footnote}{chapter}
+        \counterwithin*{footnote}{page}
+      }
+    \bool_if:NTF \l__eb_footnote_hang_bool
+      { \booltrue{FN at hangfoot} } { \boolfalse{FN at hangfoot} }
+  }
+\eb_patch_cmd:Nnn \@footnotetext
+  { \reset at font }
+  {
+    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
+    \selectfont\ignorespaces
+    \l__eb_font_footnote_tl
+  }
+\eb_patch_cmd:Nnn \@mpfootnotetext
+  { \reset at font }
+  {
+    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
+    \selectfont\ignorespaces
+    \l__eb_font_footnote_tl
+  }
+\ctex_after_end_preamble:n
+  {
+    \ExplSyntaxOn\char_set_catcode_letter:N \@
+    \eb_patch_cmd:Nnn \@footnotemark
+      { \@makefnmark }
+      {
+        \tl_use:N \l__eb_font_footnote_tl
+        \tl_use:N \l__eb_fnmark_format_tl
+          {\hbox:n { \textsuperscript{\@thefnmark} }}
+      }
+    \ExplSyntaxOff\char_set_catcode_other:N \@
+  }
+\cs_set:Npn \@makefnmark
+  {
+    \tl_use:N \l__eb_font_footnote_tl
+    \tl_use:N \l__eb_fnmark_format_tl
+      {
+        \hbox:n
+          {
+            \tl_if_eq:NnT \l__eb_fnmark_position_tl {super}
+              { \textsuperscript }{\@thefnmark}
+            \tl_use:N \l__eb_fnmark_after_tl
+          }
+      }
+  }
+\cs_set:Npn \thefootnote { \eb_footnote_counter:N \c at footnote }
+\cs_set:Npn \thempfootnote { \int_to_alph:n { \c at mpfootnote } }
+
+\cs_new_protected:Npn \eb_fnmark_number_set:nn #1#2
+  { \tl_const:cn { c__eb_fnmark_number_#1_tl } {#2} }
+\clist_map_inline:nn
+  {
+    { plain } { plain },
+    { pifont } { pifont },
+    { pifont_neg } { pifont* },
+    { pifont_sans } { pifont-sans },
+    { pifont_sans_neg } { pifont-sans* }
+  }
+  { \eb_fnmark_number_set:nn #1 }
+\cs_new:Npn \eb_fnmark_counter_pifont:N #1
+  { \ding{\int_eval:n { 171 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1
+  { \ding{\int_eval:n { 181 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_sans:N #1
+  { \ding{\int_eval:n { 191 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_sans_neg:N #1
+  { \ding{\int_eval:n { 201 + #1 }} }
+\cs_new:Npn \eb_footnote_counter:N #1
+  {
+    \tl_case:NnF \l__eb_fnmark_number_tl
+      {
+        \c__eb_fnmark_number_plain_tl
+          { \int_use:N #1 }
+        \c__eb_fnmark_number_pifont_tl
+          { \eb_fnmark_counter_pifont:N #1 }
+        \c__eb_fnmark_number_pifont_neg_tl
+          { \eb_fnmark_counter_pifont_neg:N #1 }
+        \c__eb_fnmark_number_pifont_sans_tl
+          { \eb_fnmark_counter_pifont_sans:N #1 }
+        \c__eb_fnmark_number_pifont_sans_neg_tl
+          { \eb_fnmark_counter_pifont_sans_neg:N #1 }
+      }
+      { \int_use:N #1 }
+  }
+
 \seq_const_from_clist:Nn \c__eb_toc_headings_level_seq
   { part,chapter,section,subsection,list }
 \seq_map_inline:Nn \c__eb_toc_headings_level_seq
@@ -614,12 +738,12 @@
 
     section/format  = \addvspace{0.35pc},
     section/indent  =
-      { \bool_if:NTF \l__eb_class_book_bool {1.5\ccwd } { 0\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 1.5\ccwd } { 0\ccwd } },
     section/rule    = \tocrule{$\cdot$},
 
     subsection/format = \addvspace{0.35pc},
     subsection/indent =
-      { \bool_if:NTF \l__eb_class_book_bool {3.8\ccwd } { 1.4\ccwd } },
+      { \bool_if:NTF \l__eb_class_book_bool { 3.8\ccwd } { 1.4\ccwd } },
     subsection/rule   = \tocrule{$\cdot$},
 
     list/format = \addvspace{0.2pc},
@@ -1472,7 +1596,7 @@
 \tl_new:N \l__eb_bib_style_tl
 \tl_new:N \l__eb_bib_otherstyle_tl
 \tl_new:N \l__eb_bib_citestyle_tl
-\tl_new:N \l__eb_bib_file_tl
+\tl_new:N \l__eb_bib_datafile_tl
 
 \eb_ctex_define:nn { bibset }
   {
@@ -1499,13 +1623,8 @@
 
     cite-style .code:n  =
       { \tl_set:Nn \l__eb_bib_citestyle_tl {#1} },
-    datafile .tl_set:N  = \l__eb_bib_file_tl,
-    datafile .initial:n = refs.bib,
+    datafile .tl_set:N  = \l__eb_bib_datafile_tl,
 
-    loadpkg .bool_set:N = \l__eb_bib_loadpkg_bool,
-    loadpkg .default:n  = true,
-    loadpkg .initial:n  = true,
-
     bitoc-title .tl_set:N   = \l__eb_bib_bitoc_title,
     bitoc-title .initial:n  = Reference
   }
@@ -1535,7 +1654,7 @@
         \eb_multoc_pre_bool:
         \tl_set:Nn \bibsection
           { \eb_title_number_intoc_bool:nn {##2} {##1} }
-        \exp_args:NV \bibliography \l__eb_bib_file_tl
+        \exp_args:NV \bibliography \l__eb_bib_datafile_tl
         \eb_multoc_post_bool:
         \group_end:
       }
@@ -1558,7 +1677,7 @@
   }
 \cs_new_protected:Npn \EbBiblatexPostset
   {
-    \exp_args:NV \addbibresource \l__eb_bib_file_tl
+    \exp_args:NV \addbibresource \l__eb_bib_datafile_tl
     \tl_gset:Nn \blx at default@theheading { bibintoc }
     \defbibheading{bibintoc}[\bibname]
       {\eb_biber_title_level_bool:n {##1}}
@@ -1566,7 +1685,7 @@
   }
 \eb_at_end_preamble:n
   {
-    \bool_if:NT \l__eb_bib_loadpkg_bool
+    \tl_if_empty:NF \l__eb_bib_datafile_tl
       {
         \bool_if:NTF \l__eb_backend_bibtex_bool
           {
@@ -1581,45 +1700,6 @@
       }
   }
 
-\eb_at_end_preamble:n
-  {
-    \group_begin:
-    \footnotesize
-    \exp_args:Nx
-    \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
-    \exp_args:NNNo \group_end:
-    \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
-    \bool_if:NT \l__eb_chap_withpart_bool
-      { \counterwithin*{chapter}{part} }
-    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
-      {
-        \counterwithout*{footnote}{chapter}
-        \counterwithin*{footnote}{part}
-      }
-    \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
-      {
-        \counterwithout*{footnote}{chapter}
-        \counterwithin*{footnote}{page}
-      }
-  }
-\eb_patch_cmd:Nnn \@footnotetext
-  { \reset at font }
-  {
-    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
-    \selectfont\ignorespaces
-    \l__eb_font_footnote_tl
-  }
-\eb_patch_cmd:Nnn \@mpfootnotetext
-  { \reset at font }
-  {
-    \linespread{\fp_use:N \l__eb_spread_footnote_fp}
-    \selectfont\ignorespaces
-    \l__eb_font_footnote_tl
-  }
-\eb_patch_cmd:Nnn \@makefnmark
-  { \normalfont } { \l__eb_font_footnote_tl }
-\cs_gset:Npn \thempfootnote { \int_to_alph:n { \c at mpfootnote } }
-
 \lstdefinestyle{easy-listings}
   {
     language      = [LaTeX]TeX,



More information about the tex-live-commits mailing list.