From 36c481b02c4fdfaf33325b9f18834c2357b8eec5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 28 Jun 2021 03:01:01 +0000 Subject: CTAN sync 202106280301 --- macros/latex/contrib/easybook/easybook.dtx | 206 +++++++++++++++-------------- macros/latex/contrib/easybook/easybook.pdf | Bin 530458 -> 538360 bytes 2 files changed, 108 insertions(+), 98 deletions(-) (limited to 'macros/latex/contrib/easybook') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 769e0b6abe..ee03bbced6 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -28,7 +28,7 @@ % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/06/25\hskip\ccwd\relax v1.26j\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/06/26\hskip\ccwd\relax v1.26l\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} @@ -157,7 +157,7 @@ % floatpage = % \end{syntax} % 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。 -% \changes{v1.26j}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。} +% \changes{v1.26l}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。} % \end{function} % % \subsection{article 模式} @@ -165,13 +165,13 @@ % \begin{syntax} % class = <(book)|article> % \end{syntax} -% 设置文类风格,默认为 \cls{book} 文档类。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{chapter} 选项会失效,将以 \opt{section} 标题级别输出目录。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则 \opt{book} 宏包选项会失效。 +% 设置文类风格,默认为 \cls{book} 文档类。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、节 \ref{sec:document command} 中打印目录命令的 \opt{chapter} 选项会失效,将以 \opt{section} 标题级别输出目录。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则 \opt{book} 宏包选项会失效。 % \changes{v1.23}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。} % \end{function} % -% \subsection{文档命令} -% \label{subsec:document command} -% \subsubsection{文区命令} +% \section{文档命令} +% \label{sec:document command} +% \subsection{文区命令} % \begin{function}[added = 2021-02-20,updated = 2021-04-29]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage} % \begin{syntax} % \tn{frontmatter*}\oarg{编号格式|(Roman)} @@ -183,7 +183,7 @@ % \changes{v1.23}{2021/02/20}{重新定义文档结构划分命令。} % \end{function} % -% \subsubsection{目录命令} +% \subsection{目录命令} % \begin{function}[added = 2021-02-20,updated = 2021-06-06]{\tableofcontents,\listoffigures,\listoftables,\listoflstlistings} % \begin{syntax} % \tn{tableofcontents+}\oarg{键值列表}\parg{附加代码} @@ -191,7 +191,7 @@ % \tn{listoftables*+}\oarg{键值列表} % \tn{listoflstlistings*+}\oarg{键值列表} % \end{syntax} -% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflstlistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令。目录的键值列表选项如下 +% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflstlistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入目录样式和换页等命令。可选参数的键值列表如下: % \changes{v1.25}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。} % \end{function} % @@ -212,7 +212,7 @@ % % 在书籍模式且 \opt{chapter} 选项开启或者文章模式的情况下,\opt{format} 用于设置目录标题的格式,\opt{aftertitle} 选项的代码将被插入到目录标题内容之后,\opt{pagestyle} 是目录标题所在页的页面格式,除此之外还支持 \opt{ctexset/chapter} 或 \opt{ctexset/section} 所有的章节标题样式选项。\opt{chapter} 选项使目录标题按照 chapter 级别输出,\opt{section} 选项使目录标题按照 section 级别输出,默认为 chapter 级别。 % -% \subsubsection{标题命令} +% \subsection{标题命令} % \begin{function}[added = 2021-05-05,updated = 2021-06-13]{\bichapter,\bisection,\bisubsection} % \begin{syntax} % \tn{bichapter*}\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题} @@ -223,7 +223,7 @@ % \changes{v1.25}{2021/05/05}{增加与双语目录配合的标题命令。} % \end{function} % -% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式默认是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下 +% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式默认是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下: % % \begin{function}{chapter/biname,chapter/binmuber} % \begin{syntax} @@ -239,11 +239,25 @@ % \tn{EBeforeAddBitoc*}\marg{加入目录英文标题前的代码} % \end{syntax} % \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。 -% \changes{v1.26j}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。} +% \changes{v1.26l}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。} % \end{function} % % \tn{EBeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。 % +% \subsection{上标和下标} +% \begin{function}[added = 2021-06-26]{\super,\sub,\supersub,\textsuperscript,\textsubscript} +% \begin{syntax} +% \tn{super*}\oarg{垂直偏移}\parg{格式代码}\marg{内容}\oarg{水平偏移} +% \tn{sub*}\oarg{垂直偏移}\parg{格式代码}\marg{内容}\oarg{水平偏移} +% \tn{supersub*}\oarg{script sep}\oarg{对齐方式}\parg{上标代码} +% \ \marg{上标内容}\marg{下标内容} +% \ \oarg{水平偏移}\parg{下标代码} +% \end{syntax} +% 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsec:style}。 +% \end{function} +% +% 垂直和水平偏移默认值都是0pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。\tn{textsuperscript} 和 \tn{textsubscript} 命令已被重新定义并且分别等价于 \tn{super} 和 \tn{sub},如果您需要使用它们的原始定义创建新命令,则可以使用 \tn{spb@textsuperscript@save} 和 \tn{spb@textsubscript@save} 命令。 +% % \section{接口选项} % \label{sec:interface options} % \begin{function}[added = 2021-01-05]{\ctexset} @@ -299,7 +313,7 @@ % \changes{v1.10}{2021/01/08}{可以自定义主题颜色。} % \end{function} % \item[color-all] 统一设置主题的各部分颜色,参数是6个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。 -% \item[multoc] 开启多栏目录,与小节 \ref{subsec:document command} 中目录命令的同名选项有相同效果。 +% \item[multoc] 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。 % \item[withpart] 使章跟随每一部分编号,默认不跟随。 % \item[footwith] 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从1开始。 % \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。 @@ -312,6 +326,19 @@ % \item[figurepath] 设置插入图片的文件夹路径名,可以有多个路径名,但需要包含在括号内作为间隔,即使只有一个路径。 % \end{optdesc} % +% \begin{function}[EXP,added = 2021-06-26]{super-vshift,super-hshift,sub-vshift,sub-hshift,supersubsep,supersubalign} +% \begin{syntax} +% super-vshift = <刚性长度|(0pt)> +% super-hshift = <刚性长度|(0pt)> +% sub-vshift = <刚性长度|(0pt)> +% sub-hshift = <刚性长度|(0pt)> +% supersubsep = <刚性长度|(0.3ex)> +% supersubalign = <(l)|c|r> +% \end{syntax} +% \ding{229} 以上选项路径为 \opt{style/...} \\ +% 可以使用 \tn{spbset} 命令设置上述选项。各垂直和水平偏移的参数对应 \tn{super} 等上标下标命令的参数,并且具有优先性。\opt{supersubsep} 选项是 \tn{supersub} 命令中上标和下标的间距,\opt{supersubalign} 选项则是上标与下标的水平对齐方式,有左对齐、居中对齐和右对齐。 +% \end{function} +% % \subsection{超链接} % \label{subsec:hyperlinks} % \begin{function}[EXP,added = 2021-01-05,updated = 2021-05-06]{linktype,linkcolor,linkcol-all,linktoc} @@ -426,7 +453,7 @@ % \end{function} % % \begin{optdesc} -% \item[\tn{printbibliography}] 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下 +% \item[\tn{printbibliography}] 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下 % \begin{function}{heading,title} % \begin{syntax} % heading = @@ -482,7 +509,7 @@ % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。 % \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。} % \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EBNewTheorem}。} -% \changes{v1.26j}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。} +% \changes{v1.26l}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。} % \end{function} % % \begin{optdesc} @@ -588,7 +615,7 @@ % \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>] % \end{syntax} % 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 -% \changes{v1.26j}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。} +% \changes{v1.26l}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。} % \end{function} % % 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用+号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子: @@ -933,7 +960,7 @@ % \tn{index}\oarg{索引名}\marg{标签} % \tn{printindex*+}\oarg{键值列表}\parg{索引名} % \end{syntax} -% \pkg{imakeidx} 宏包可使用索引的功能,重新定义了它的 \tn{printindex} 命令用于生成索引目录,\meta{键值列表} 及选项与小节 \ref{subsec:document command} 相同,但 \opt{multoc} 选项和 \pkg{imakeidx} 原本的接口命令 \tn{indexsetup} 部分选项失效。输出不同的索引目录时使用 \meta{索引名} 选项。 +% \pkg{imakeidx} 宏包可使用索引的功能,重新定义了它的 \tn{printindex} 命令用于生成索引目录,\meta{键值列表} 及选项与节 \ref{sec:document command} 相同,但 \opt{multoc} 选项和 \pkg{imakeidx} 原本的接口命令 \tn{indexsetup} 部分选项失效。输出不同的索引目录时使用 \meta{索引名} 选项。 % \changes{v1.24}{2021/05/01}{重新定义 \tn{printindex} 命令与文档适配。} % \end{function} % @@ -1081,7 +1108,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/06/25}{1.26j}{beta} +\ProvidesExplClass{easybook}{2021/06/26}{1.26l}{beta} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool @@ -1257,21 +1284,21 @@ \ctex_set:n { - secnumdepth = 3, - tocdepth = \bool_if:NTF \l__eb_class_book_bool { 1 } { 2 }, - part = + secnumdepth = 3, + tocdepth = \bool_if:NTF \l__eb_class_book_bool { 1 } { 2 }, + part = { - pagestyle = empty, - tocline = \EBNumberLine{#1}#2, - format = \color{ctex@frame}\sffamily\Huge, - aftername = + pagestyle = empty, + tocline = \EBNumberLine{#1}#2, + format = \color{ctex@frame}\sffamily\Huge, + aftername = { \bool_if:NTF \l__eb_title_newline_bool { \par\nobreak } { \hspace{\ccwd} } } }, - chapter = + chapter = { % pagestyle = fancy, format = @@ -1290,7 +1317,7 @@ lotskip = 0.8pc, lofskip = 0.8pc }, - section = + section = { hang = true, format = \color{ctex@frame}\sffamily\Large, @@ -1298,7 +1325,7 @@ beforeskip = 1.5ex plus .2ex minus .1ex, afterskip = 1.5ex plus .2ex minus .1ex }, - subsection = + subsection = { hang = true, format = \color{ctex@frame}\sffamily\large, @@ -1306,7 +1333,7 @@ beforeskip = 1.3ex plus .2ex minus .1ex, afterskip = 1.3ex plus .2ex minus .1ex }, - subsubsection = + subsubsection = { hang = true, format = \color{ctex@frame}\sffamily, @@ -1328,7 +1355,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2021/06/25}{1.26j}{beta} +\ProvidesExplPackage{easybase}{2021/06/26}{1.26l}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn { nx } \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -1483,7 +1510,7 @@ withpart .bool_set:N = \l__eb_chap_counter_withpart_bool, withpart .default:n = true, withpart .initial:n = false, - rulewidth .dim_set:N = \eb@rule@width@dim, + rulewidth .dim_set:N = \l__eb_rule_width_dim, rulewidth .initial:n = 0.75pt, uppercase .bool_set:N = \l__eb_mark_uppercase_bool, uppercase .default:n = true, @@ -1517,6 +1544,7 @@ { xcolor[svgnames]+ footmisc[stable,bottom]+ + spbmark[ctex]+ ulem[normalem]+ enumitem[shortlabels,inline]+ amsmath+amsthm+thmtools+ @@ -1617,6 +1645,7 @@ } } +\tl_new:N \l__eb_fnmark_number_choice_tl \cs_gset_eq:NN \easyhead \fancyhead \cs_gset_eq:NN \easyfoot \fancyfoot \NewDocumentCommand{\markrule} @@ -1664,12 +1693,12 @@ subsec-label .initial:n = \hspace{0.5\ccwd}, headrule .tl_gset:N = \headrule, - headrule .initial:n = \markrule{\eb@rule@width@dim}, + headrule .initial:n = \markrule{\l__eb_rule_width_dim}, footrule .tl_gset:N = \footrule, footrule .initial:n = { }, footnoterule .tl_gset:N = \footnoterule, footnoterule .initial:n = - { \markrule[0.35\textwidth]{\eb@rule@width@dim}[+2.6pt] }, + { \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[+2.6pt] }, fnmargin .dim_set:N = \footnotemargin, fnmargin .initial:n = 0.75\ccwd, @@ -1697,13 +1726,13 @@ fnmark-num .value_required:n = true } -\cs_set_eq:NN \eb@text@uppercase \text_uppercase:n -\cs_set_eq:NN \eb@text@nouppercase \text_titlecase_first:n +\cs_set_eq:NN \eb_mark_uppercase:n \text_uppercase:n +\cs_set_eq:NN \eb_mark_nouppercase:n \text_titlecase_first:n \cs_new:Npn \eb_mark_uppercase_bool:nn #1#2 { \bool_if:NTF \l__eb_mark_uppercase_bool - { \eb@text@uppercase } - { \eb@text@nouppercase }{\use:c { eb_fancyhf_#1_mark:n } {#2}} + { \eb_mark_uppercase:n } + { \eb_mark_nouppercase:n }{\use:c { eb_fancyhf_#1_mark:n } {#2}} } \cs_new:Npn \eb@level@markdouble #1#2 { @@ -1757,15 +1786,18 @@ \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } \bool_if:NT \l__eb_chap_counter_withpart_bool { \counterwithin*{chapter}{part} } - \tl_if_eq:NnT \l__eb_foot_counter_parent_choice_tl { part } - { - \counterwithout*{footnote}{chapter} - \counterwithin*{footnote}{part} - } - \tl_if_eq:NnT \l__eb_foot_counter_parent_choice_tl { page } - { - \counterwithout*{footnote}{chapter} - \counterwithin*{footnote}{page} + \str_case:Vn \l__eb_foot_counter_parent_choice_tl + { + { part } + { + \counterwithout*{footnote}{chapter} + \counterwithin*{footnote}{part} + } + { page } + { + \counterwithout*{footnote}{chapter} + \counterwithin*{footnote}{page} + } } \bool_if:NTF \l__eb_footnote_hang_bool { \booltrue{FN@hangfoot} } @@ -1787,7 +1819,7 @@ \group_begin: \tl_use:N \l__eb_subfont_footnote_tl \tl_use:N \l__eb_fnmark_format_tl - {\hbox:n { \textsuperscript{\@thefnmark} }} + {\hbox:n { \super{\@thefnmark}[0pt] }} \group_end: } \ExplSyntaxOff\char_set_catcode_other:N \@ @@ -1800,7 +1832,7 @@ \hbox:n { \tl_if_eq:NnT \l__eb_fnmark_position_tl { super } - { \textsuperscript }{\@thefnmark} + { \spb@textsuperscript@save }{\@thefnmark} \tl_use:N \l__eb_fnmark_after_tl } } @@ -1830,18 +1862,13 @@ { \ding{\int_eval:n { 201 + #1 }} } \cs_new:Npn \eb_footnote_counter:N #1 { - \tl_case:NnF \l__eb_fnmark_number_choice_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 } + \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 } } @@ -2115,7 +2142,6 @@ { chapter,section,subsection } \seq_map_inline:Nn \c__eb_bitoc_title_level_seq { - \tl_const:cn { c__eb_bitoc_mark_title_#1_tl } {#1} \exp_args:Nc \NewDocumentCommand { bi#1 }{sO{##3}mm} { \IfBooleanTF{##1} @@ -2124,14 +2150,11 @@ \CTEX@addtocline{#1}{##2} \tl_if_empty:oF {##4} { \CTEX@addbitocline{#1}{##4} } \tl_set:Nn \l__eb__bitoc_mark_title_level_tl {#1} - \tl_case:Nn \l__eb__bitoc_mark_title_level_tl + \str_case:nn {#1} { - \c__eb_bitoc_mark_title_chapter_tl - { \eb@level@markdouble{chapter}{##2} } - \c__eb_bitoc_mark_title_section_tl - { \eb@level@section@mark{##2} } - \c__eb_bitoc_mark_title_subsection_tl - { \eb@level@subsection@mark{##2} } + { chapter } { \eb@level@markdouble{chapter}{##2} } + { section } { \eb@level@section@mark{##2} } + { subsection } { \eb@level@subsection@mark{##2} } } }{ \stepcounter{bi#1} @@ -2365,14 +2388,6 @@ \tl_new:N \l__eb_subfont_listing_tl \tl_new:N \l__eb_subfont_footnote_tl -\seq_const_from_clist:Nn \c__eb_subfont_math_choice_seq - { - noto,notosans,times,scholax,stix, - charter,ebgaramond,libertine,none - } -\seq_map_inline:Nn \c__eb_subfont_math_choice_seq - { \tl_const:cn { c__eb_subfont_math_#1_tl } {#1} } - \eb_ctex_define:nn { subfont } { table-cap .tl_set:N = \l__eb_subfont_table_tl, @@ -2386,8 +2401,11 @@ marginpar .tl_set:N = \marginfont, marginpar .initial:n = \rmfamily\footnotesize, - math .choices:xn = - { \seq_use:Nn \c__eb_subfont_math_choice_seq { , } } + math .choices:nn = + { + noto,notosans,times,scholax,stix, + charter,ebgaramond,libertine,none + } { \tl_gset_eq:NN \l__eb_subfont_math_choice_tl \l_keys_choice_tl @@ -2400,24 +2418,16 @@ { \PassOptionsToPackage{#1}{newtxmath} } \eb_at_end_preamble:n { - \tl_case:NnT \l__eb_subfont_math_choice_tl - { - \c__eb_subfont_math_noto_tl - { \eb_put_newtxmath:n { noto } } - \c__eb_subfont_math_notosans_tl - { \eb_put_newtxmath:n { notosans } } - \c__eb_subfont_math_ebgaramond_tl - { \eb_put_newtxmath:n { ebgaramond } } - \c__eb_subfont_math_times_tl - { \eb_put_newtxmath:n { noOT1 } } - \c__eb_subfont_math_libertine_tl - { \eb_put_newtxmath:n { libertine,noOT1 } } - \c__eb_subfont_math_stix_tl - { \eb_put_newtxmath:n { stix2,noOT1 } } - \c__eb_subfont_math_scholax_tl - { \eb_put_newtxmath:n { nc,noOT1 } } - \c__eb_subfont_math_charter_tl - { \eb_put_newtxmath:n { charter,noOT1 } } + \str_case:VnT \l__eb_subfont_math_choice_tl + { + { noto } { \eb_put_newtxmath:n { noto } } + { notosans } { \eb_put_newtxmath:n { notosans } } + { ebgaramond } { \eb_put_newtxmath:n { ebgaramond } } + { times } { \eb_put_newtxmath:n { noOT1 } } + { libertine } { \eb_put_newtxmath:n { libertine,noOT1 } } + { stix } { \eb_put_newtxmath:n { stix2,noOT1 } } + { scholax } { \eb_put_newtxmath:n { nc,noOT1 } } + { charter } { \eb_put_newtxmath:n { charter,noOT1 } } } { \eb@package@load{newtxmath+bm} } } @@ -2525,7 +2535,7 @@ \setcounter{bottomnumber}{4} \setcounter{totalnumber}{8} \allowdisplaybreaks[4] -\tl_gset:Nn \ULthickness { \eb@rule@width@dim } +\tl_gset:Nn \ULthickness { \l__eb_rule_width_dim } \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif} \cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2 @@ -2745,7 +2755,7 @@ boxsep = 0pt, arc = 0pt, fonttitle = \sffamily, - boxrule = \eb@rule@width@dim + boxrule = \l__eb_rule_width_dim } \newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1} \tl_new:N \eb@tc@list@prologue @@ -3020,7 +3030,7 @@ aboveskip = 1.5ex plus .2ex minus .1ex, belowskip = 0.55ex plus .2ex minus .1ex, keepspaces = true, - framerule = \eb@rule@width@dim, + framerule = \l__eb_rule_width_dim, columns = flexible, abovecaptionskip = -1ex, belowcaptionskip = 1.5ex diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index cdf7ede0d4..cd746dcd3e 100644 Binary files a/macros/latex/contrib/easybook/easybook.pdf and b/macros/latex/contrib/easybook/easybook.pdf differ -- cgit v1.2.3