summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-15 03:01:01 +0000
committerNorbert Preining <norbert@preining.info>2021-07-15 03:01:01 +0000
commit55ae461252a599d6bc951065a37c16a8971fc560 (patch)
tree1b73269f29ae053c3fa9f00a365b009569df721a /macros/latex/contrib/easybook/easybook.dtx
parent3303a89b11161d66ec78811056b85306f696cc09 (diff)
CTAN sync 202107150300
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx306
1 files changed, 198 insertions, 108 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 2070d0dfd9..f7c4e25dfe 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,11 +28,11 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/13\hskip\ccwd\relax v1.27d\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/14\hskip\ccwd\relax v1.27e\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
-% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装与增强。虽然 \CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并已载入一些常用宏包用于实现一般的排版需求,同时也具有 \cls{article} 文档类的功能,使用户可以简便地进行设置。它适用于排版中英文学位论文、学术书籍或者是笔记。
+% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,同时兼具 \cls{book} 与 \cls{article} 文档类的用途,它的基础宏包 \pkg{easybase} 还可以搭配 \CTeX 和标准文档类使用。\cls{easybook} 考虑了一些细节并载入一些几乎必备的宏包进行包装和改进,提供多个命令和接口可以使用户简便地进行设置。它适用于排版中英文学位论文、学术书籍或者是笔记。
% \end{abstract}
% \tableofcontents
%
@@ -148,7 +148,7 @@
% cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
% \end{syntax}
% 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
-% \changes{v1.27d}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
+% \changes{v1.27e}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
% \end{function}
%
% 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
@@ -666,30 +666,37 @@
% \end{ctexexam}
%
% \subsubsection{脚注格式}
-% \begin{function}[EXP,added = 2021-05-12]{fnmargin,fnparskip,fnparindent,fnhang,fnmark-pos,fnmark-num,fnmark-num,fnmark-form,afterfnmark}
+% \begin{function}[EXP,added = 2021-05-12,updated = 2021-07-14]{fnmargin,fnparskip,fnparindent,footnotetype,fnmark-pos,fnmark-num,fnmark-num,fnmark-form,fntext-form,afterfnmark}
% \begin{syntax}
% fnmargin = <刚性长度|(0.75\tn{ccwd})>
% fnparskip = <弹性长度|(0ex)>
% fnparindent = <刚性长度|(2\tn{ccwd})>
-% fnhang = <(true)|false>
+% footnotetype = <(hang)|default|bottom>
% fnmark-pos = <normal|(super)>
% fnmark-num = <(plain)|pifont|pifont*|pifont-sans|pifont-sans*>
% fnmark-form = <格式代码>
+% fntext-form = <格式代码>
% afterfnmark = <格式代码>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
% \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。}
+% \changes{v1.27e}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
% \end{function}
%
% \begin{optdesc}
-% \item[fnmargin] 脚注首段缩进距离,等于长度 \tn{footnotemargin} 的值。
-% \item[fnparskip] 脚注段落间距,仅在脚注为悬挂缩进时有效。
-% \item[fnparindent] 脚注段落缩进,仅在脚注为悬挂缩进时有效。
-% \item[fnhang] 脚注是否为悬挂缩进的格式,默认开启。
-% \item[fnmark-pos] 设置脚注编号的位置,正常文本或是上标形式。
-% \item[fnmark-num] 脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。
-% \item[fnmark-form] 脚注标记的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。
-% \item[afterfnmark] 脚注标记后的代码,由于脚注标记处于水平盒子中,它一般用于设置标记与文本间的距离。
+% \item[fnmargin] 脚注首段缩进距离,等于长度 \tn{footnotemargin} 的值。
+% \item[fnparskip] 脚注段落间距,等于长度 \tn{footparskip} 的值。
+% \item[fnparindent] 脚注段落缩进,等于长度 \tn{footparindent} 的值。
+% \item[footnotetype] 脚注的类型,悬挂缩进 \opt{hang} 是默认值,\opt{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\opt{bottom} 使脚注始终位于页面底端。这是个复合选项,\opt{bottom} 可以与前两种类型重复或复合使用:
+% \begin{ctexexam}
+% \hdrset{footnotetype = default,footnotetype = bottom}
+% \hdrset{footnotetype = {hang,bottom}}
+% \end{ctexexam}
+% \item[fnmark-pos] 设置脚注编号的位置,正常文本或是上标形式。
+% \item[fnmark-num] 脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。
+% \item[fnmark-form] 脚注标记的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注标记,一般配合 \opt{fnmark-num = plain} 使用。
+% \item[fntext-form] 脚注内容的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注内容。
+% \item[afterfnmark] 脚注标记后的代码,由于脚注标记处于水平盒子中,它一般用于设置标记与文本间的距离。
% \end{optdesc}
%
% \subsection{目录样式}
@@ -844,7 +851,7 @@
% \tn{end}\{hangparas\}
% \end{syntax}
% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27d}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
+% \changes{v1.27e}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
% \end{function}
%
% \subsection{代码}
@@ -1094,7 +1101,6 @@
% \begin{description}[font = \normalfont\sffamily]
% \item[ctex] 提供中文排版的通用框架。
% \item[xcolor] 提供任意颜色的设定与混合,已载入了 \opt{svgnames} 颜色库。
-% \item[footmisc] 更改脚注排版的方法的集合。
% \item[amsmath] 提供 \LaTeX 中的数学功能。
% \item[thmtools] 用于通常需要的排版定理支持。
% \item[marginnote] 增强了边注输出的功能。
@@ -1174,7 +1180,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/13}{1.27d}
+\ProvidesExplClass{easybook}{2021/07/14}{1.27e}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1469,18 +1475,20 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/13}{1.27d}
+\ProvidesExplPackage{easybase}{2021/07/14}{1.27e}
{Typeset Chinese theses or books}
-\cs_generate_variant:Nn \ctex_define:nn { nx }
\cs_generate_variant:Nn \int_to_arabic:n { v }
\cs_generate_variant:Nn \int_to_alph:n { v }
\cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
-\cs_generate_variant:Nn \eb_put_hyperref:n { x }
-\cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
-\cs_generate_variant:Nn \int_compare:nNnT { oNnT }
+\cs_generate_variant:Nn \dim_set:Nn { NV }
\cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV }
+\cs_generate_variant:Nn \skip_set:Nn { NV }
+\cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
+\cs_generate_variant:Nn \ctex_define:nn { nx }
+\cs_generate_variant:Nn \eb_put_hyperref:n { x }
\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
+
\cs_new_protected:Npn \ctex_define:nn #1
{ \keys_define:nn { ctex/#1 } }
\cs_new_protected:Npn \eb_clist_map_inline:nn #1#2
@@ -1535,8 +1543,7 @@
\NewDocumentCommand{\LoadPackage}{O{}m}
{
\seq_set_split:Nnn \l_tmpb_seq { + } {#2}
- \int_compare:oNnT
- { \seq_count:N \l_tmpb_seq } = { 1 }
+ \int_compare:nNnT { \seq_count:N \l_tmpb_seq } = { 1 }
{ \PassOptionsToPackage{#1}{#2} }
\seq_map_function:NN
\l_tmpb_seq \eb_match_load_package:n
@@ -1656,7 +1663,6 @@
\LoadPackage
{
- footmisc[stable,bottom]+
spbmark[ctex]+
ulem[normalem]+
enumitem[shortlabels,inline]+
@@ -1758,8 +1764,6 @@
{ \use:c { eb@mark@#1@label@layout }{##1} }
}
}
-
-\tl_new:N \l__eb_fnmark_number_choice_tl
\cs_gset_eq:NN \easyhead \fancyhead
\cs_gset_eq:NN \easyfoot \fancyfoot
\NewDocumentCommand{\markrule}
@@ -1773,26 +1777,6 @@
\tl_if_novalue:nF {#5} { \vspace*{#5} }
\group_end:
}
-\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
- {
- \str_case:VnF \l__eb_fnmark_number_choice_tl
- {
- { plain } { \int_use:N #1 }
- { pifont } { \eb_fnmark_counter_pifont:N #1 }
- { pifont* } { \eb_fnmark_counter_pifont_neg:N #1 }
- { pifont-sans } { \eb_fnmark_counter_pifont_sans:N #1 }
- { pifont-sans* } { \eb_fnmark_counter_pifont_sans_neg:N #1 }
- }
- { \int_use:N #1 }
- }
\ctex_define:nn { hdrset }
{
head-foot .tl_set:N = \l__eb_fancyhf_content_tl,
@@ -1832,32 +1816,7 @@
footrule .initial:n = { },
footnoterule .tl_gset:N = \footnoterule,
footnoterule .initial:n =
- { \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[+2.6pt] },
-
- 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_choice_tl \l_keys_choice_tl
- },
- fnmark-num .value_required:n = true
+ { \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[+2.6pt] }
}
\cs_set_eq:NN \eb_mark_uppercase:n \text_uppercase:n
@@ -1910,17 +1869,60 @@
\cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape }
}
+\tl_new:N \l__eb_fnmark_number_choice_tl
+\bool_new:N \l__eb_fntext_bottom_bool
\ctex_define:nn { style }
{
footwith .choices:nn =
{ part,page,chapter }
- {
- \tl_set_eq:NN
- \l__eb_foot_counter_parent_choice_tl \l_keys_choice_tl
- },
+ { \tl_set:Nn \l__eb_foot_counter_parent_choice_tl {#1} },
footwith .value_required:n = true,
footwith .initial:n = chapter
}
+\ctex_define:nn { hdrset }
+ {
+ fnmargin .dim_set:N = \footnotemargin,
+ fnmargin .initial:n = 0.75\ccwd,
+ fnparskip .skip_set:N = \footparskip,
+ fnparskip .initial:n = 0ex,
+ fnparindent .dim_set:N = \footparindent,
+ fnparindent .initial:n = 2\ccwd,
+ fntext-form .tl_set:N = \l__eb_fntext_format_tl,
+
+ 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,
+
+ footnotetype .multichoices:nn =
+ { default,hang,bottom,para }
+ {
+ \tl_if_eq:nnTF { bottom } {#1}
+ { \bool_set_true:N \l__eb_fntext_bottom_bool }
+ { \tl_set:Nn \l__eb_footnotetype_choice_tl {#1} }
+ },
+ footnotetype .value_required:n = true,
+ footnotetype .initial:n = hang,
+
+ fnmark-num .choices:nn =
+ { plain,pifont,pifont*,pifont-sans,pifont-sans* }
+ { \tl_set:Nn \l__eb_fnmark_number_choice_tl {#1} },
+ fnmark-num .value_required:n = true,
+
+ unknown .code:n =
+ {
+ \msg_warning:nnx
+ { easybase } { ignore-hdrset } { \l_keys_key_str }
+ }
+ }
+\msg_new:nnn { easybase } { ignore-hdrset }
+ {
+ #1~is~an~unknown~hdrset~option. \\
+ Please~check~the~user~manual~for~the~supported~options.
+ }
+
\eb_at_end_preamble:n
{
\group_begin:
@@ -1936,9 +1938,88 @@
{ part } { \counterwithin*{footnote}{part} }
{ page } { \counterwithin*{footnote}{page} }
}
- \bool_if:NTF \l__eb_footnote_hang_bool
- { \booltrue{FN@hangfoot} }
- { \boolfalse{FN@hangfoot} }
+ \bool_if:NT \l__eb_fntext_bottom_bool
+ {
+ \cs_set:Npn \@makecol
+ {
+ \setbox\@outputbox\box\@cclv
+ \xdef\@freelist{\@freelist\@midlist}
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \eb@footmisc@ifvoid\footins{}
+ {
+ \setbox\@outputbox\vbox
+ \bgroup
+ \boxmaxdepth\@maxdepth
+ \unvbox\@outputbox
+ \vfill\relax
+ \vskip\skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ \egroup
+ }
+ \eb@footmisc@ifvoid\@kludgeins
+ {\@makespecialcolbox}
+ {
+ \setbox\@outputbox\vbox to\@colht
+ {
+ \@texttop\dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }
+ }
+ \global\maxdepth\@maxdepth
+ }
+ }
+ }
+\cs_set:Npn \@makefntext #1
+ {
+ \group_begin:
+ \str_case:Vn \l__eb_footnotetype_choice_tl
+ {
+ { hang } { \use_i:nn }
+ { default } { \use_ii:nn }
+ }
+ {
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \dim_compare:nNnTF { \footnotemargin } > { 0pt }
+ { \hbox_to_wd:nn { \footnotemargin } { \eb@makefnmark\hss } }
+ { \eb@makefnmark }
+ }
+ \dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box }
+ \dim_zero:N \rightmargin
+ \dim_set_eq:NN \linewidth \columnwidth
+ \dim_sub:Nn \linewidth { \leftmargin }
+ \parshape\@ne\leftmargin\linewidth
+ \@setpar{{\@@par}}
+ \mode_leave_vertical:
+ \hbox_overlap_left:n { \box_use:N \l_tmpa_box }
+ }
+ {
+ \noindent
+ \dim_compare:nNnTF { \footnotemargin } > { 0pt }
+ { \hbox_to_wd:nn { \footnotemargin } { \hss\eb@makefnmark } }
+ {
+ \dim_compare:nNnTF { \footnotemargin } = { 0pt }
+ { \hbox_overlap_left:n { \eb@makefnmark } }
+ {
+ \hbox_overlap_left:n
+ {
+ \hbox_to_wd:nn
+ { -\footnotemargin }
+ { \eb@makefnmark\hss }
+ }
+ }
+ }
+ }
+ \skip_set:NV \parskip \footparskip
+ \dim_set:NV \parindent \footparindent
+ \l__eb_fntext_format_tl{#1}
+ \tl_if_eq:NnT \l__eb_footnotetype_choice_tl { hang } { \par }
+ \group_end:
}
\eb_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext }
{ \reset@font }
@@ -1949,22 +2030,16 @@
}
\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}}
\providecommand{\spb@textsuperscript@save}{\textsuperscript}
-\ctex_after_end_preamble:n
+\cs_set:Npn \@makefnmark
{
- \ExplSyntaxOn\char_set_catcode_letter:N \@
- \eb_patch_cmd:nnn { \H@@footnotemark,\@footnotemark }
- { \@makefnmark }
+ \hbox:n
{
- \hbox:n
- {
- \tl_use:N \l__eb_subfont_footnote_tl
- \tl_use:N \l__eb_fnmark_format_tl
- {\super{\@thefnmark}[0pt]}
- }
+ \tl_use:N \l__eb_subfont_footnote_tl
+ \tl_use:N \l__eb_fnmark_format_tl
+ {\super{\@thefnmark}[0pt]}
}
- \ExplSyntaxOff\char_set_catcode_other:N \@
}
-\cs_set:Npn \@makefnmark
+\cs_new:Npn \eb@makefnmark
{
\hbox:n
{
@@ -1978,7 +2053,7 @@
}
}
\tl_clear:N \@thefnmark
-\cs_new:Npn \eb@makefnmark #1
+\cs_new:Npn \eb@@makefnmark #1
{
\tl_if_empty:oF {#1}
{
@@ -1987,12 +2062,33 @@
\group_end:
}
}
+\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
+ {
+ \str_case:VnF \l__eb_fnmark_number_choice_tl
+ {
+ { plain } { \int_use:N #1 }
+ { pifont } { \eb_fnmark_counter_pifont:N #1 }
+ { pifont* } { \eb_fnmark_counter_pifont_neg:N #1 }
+ { pifont-sans } { \eb_fnmark_counter_pifont_sans:N #1 }
+ { pifont-sans* } { \eb_fnmark_counter_pifont_sans_neg:N #1 }
+ }
+ { \int_use:N #1 }
+ }
\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext }
-\cs_new:Npn \Footnotemark #1 { \eb@makefnmark{#1}\@footnotemark }
-\cs_new:Npn \Footnotetext #1 { \eb@makefnmark{#1}\@footnotetext }
+\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark }
+\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext }
\cs_new:Npn \eb_alph:n #1 { \int_to_alph:v { c@#1 } }
\cs_set:Npn \thefootnote { \eb_footnote_counter:N \c@footnote }
\cs_set:Npn \thempfootnote { \eb_alph:n { mpfootnote } }
+\cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi }
\contentsuse{lstlisting}{lol}
\seq_put_left:Nn \c__ctex_headings_seq { chapter }
@@ -2470,6 +2566,7 @@
\ctex_at_end_package:nn { imakeidx }
{
+ \makeindex
\RenewDocumentCommand{\printindex}{st+oD(){\imki@jobname}}
{
\group_begin:
@@ -2559,10 +2656,7 @@
noto,notosans,times,libertine,
charter,garamond,none,nc,stix
}
- {
- \tl_gset_eq:NN
- \l__eb_subfont_math_choice_tl \l_keys_choice_tl
- },
+ { \tl_set:Nn \l__eb_subfont_math_choice_tl {#1} },
math .value_required:n = true,
math .initial:n = times
}
@@ -2746,8 +2840,6 @@
\cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle
\RenewDocumentCommand{\declaretheorem}{O{}mO{}}
{\AfterPreamble{\eb@declaretheorem@save[#1,#3]{#2}}}
-\cs_new_protected:Npn \eb@declaretheorem #1#2
- { \declaretheorem[#2]{#1} }
\RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
{\eb@declaretheoremsyle@save[#1,#3]{#2}}
\cs_set_eq:NN \newtheorem \declaretheorem
@@ -2755,11 +2847,10 @@
{mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}}
{
\eb_thm_name_set:nnn {#1} {#2} {#3}
- \eb@declaretheorem{#1}
- {
- name = \tl_use:c { c__eb_name_#1_tl },
- style = easy-theorem,#5
- }
+ \declaretheorem{#1}[
+ name = \tl_use:c { c__eb_name_#1_tl },
+ style = easy-theorem,#5
+ ]
\bool_if:NT \l__eb_thmbox_bool
{
\@ifpackageloaded{tcolorbox}
@@ -2892,7 +2983,7 @@
{
\skip_set:Nn \abovedisplayskip { 6pt plus 1pt minus 1pt }
\skip_set:Nn \belowdisplayskip { 6pt plus 1pt minus 1pt }
- \skip_set:Nn \abovedisplayshortskip { 0pt }
+ \skip_set:Nn \abovedisplayshortskip { 0pt plus 1pt minus 1pt }
\skip_set:Nn \belowdisplayshortskip { 6pt plus 1pt minus 1pt }
}
\ctex_at_end_package:nn { unicode-math }
@@ -3200,7 +3291,6 @@
\urlstyle{same}
\eb_allow_urlbreak:
\exp_args:NV \hypersetup \l__eb_hyperref_clist
- \use:c { makeindex }
}
\labelformat{part}{\CTEXthepart}
@@ -3242,7 +3332,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/13}{1.27d}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/14}{1.27e}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1