From 0c73359c915c22297090c6c23c5ac23a8ec9603e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 12 Mar 2022 03:00:45 +0000 Subject: CTAN sync 202203120300 --- macros/latex/contrib/easybook/easybook.dtx | 88 +++++++++++----------- macros/latex/contrib/easybook/easybook.pdf | Bin 592859 -> 591676 bytes macros/latex/contrib/easybook/easybook.tex | 117 ++++++++++++++--------------- 3 files changed, 101 insertions(+), 104 deletions(-) (limited to 'macros/latex/contrib/easybook') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index cb9c5ee12e..15185e97b7 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2022/03/10}{1.643} +\ProvidesExplClass{easybook}{2022/03/11}{1.645} {Easily typesetting Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -303,7 +303,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2022/03/10}{1.643} +\ProvidesExplPackage{easybase}{2022/03/11}{1.645} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -324,19 +324,16 @@ \seq_set_from_clist:Nn \l_tmpa_seq {#1} \seq_map_inline:Nn \l_tmpa_seq {#2} } -\cs_new_protected:Npn \eb_char_patch_cmd:wnn #1#2#3 +\cs_new_protected:Npn \eb_char_patch_cmd:Nnn #1#2#3 { \ExplSyntaxOn\makeatletter - \eb_patch_cmd:wnn {#1} {#2} {#3} + \eb_patch_cmd:Nnn {#1} {#2} {#3} \ExplSyntaxOff\makeatother } -\cs_new_protected:Npn \eb_patch_cmd:wnn #1#2#3 +\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3 { - \eb_seq_map_inline:nn {#1} - { - \ctex_patch_cmd_once:NnnnTF ##1 { } {#2} {#3} - { } { \ctex_patch_failure:N ##1 } - } + \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3} + { } { \ctex_patch_failure:N #1 } } \cs_new_protected:Npn \eb_preto_cmd:nn #1#2 { \AddToHook{cmd/#1/before}{#2} } @@ -507,7 +504,6 @@ pdfpages+multicol+ fancyhdr+titletoc+caption+ tabularray+ - setspace+ listings } \cs_new_protected:Npn \eb_package_date_check:nn #1#2 @@ -876,10 +872,10 @@ { fnfirstindent .dim_set:N = \fnfirstindent, fnfirstindent .initial:n = 0.8em, - fnparskip .skip_set:N = \fnparskip, - fnparskip .initial:n = 0ex plus .1ex, fnafterindent .tl_set:N = \fnafterindent, fnafterindent .initial:n = 2em, + fnparskip .skip_set:N = \fnparskip, + fnparskip .initial:n = 0ex plus .1ex, fnpara-form .tl_set:N = \l__eb_fnpara_format_tl, fntext-pos .tl_set:N = \l__eb_fntext_position_tl, fntext-pos .initial:n = super, @@ -932,7 +928,7 @@ \eb_fnpara_if_pos_bottom: } \cs_new_protected:Npn \setspread #1 { \linespread{#1}\selectfont } -\cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi } +\cs_new:Npn \eb@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi } \cs_new_protected:Npn \eb_fnpara_if_pos_bottom: { \bool_if:NT \l__eb_fnpara_bottom_bool @@ -943,24 +939,25 @@ \cs_set:Npn \@makecol { \setbox\@outputbox\box\@cclv + \let\@elt\relax \xdef\@freelist{\@freelist\@midlist} \global\let\@midlist\@empty \@combinefloats - \eb@footmisc@ifvoid\footins{} + \eb@ifvoid\footins{} { \setbox\@outputbox\vbox - \bgroup - \boxmaxdepth\@maxdepth - \unvbox\@outputbox - \vfill\relax - \vskip\skip\footins - \color@begingroup - \normalcolor\footnoterule - \unvbox\footins - \color@endgroup - \egroup + { + \boxmaxdepth\@maxdepth + \unvbox\@outputbox + \vfill\relax + \vskip\skip\footins + \color@begingroup + \normalcolor\footnoterule + \unvbox\footins + \color@endgroup + } } - \eb@footmisc@ifvoid\@kludgeins + \eb@ifvoid\@kludgeins {\@makespecialcolbox} { \setbox\@outputbox\vbox to\@colht @@ -1035,17 +1032,21 @@ \tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par } \group_end: } -\eb_patch_cmd:wnn { \@footnotetext,\@mpfootnotetext } - { \reset@font } +\eb_seq_map_inline:nn { \@footnotetext,\@mpfootnotetext } { - \setspread{\fp_use:N \l__eb_spread_footnote_fp} - \tl_use:N \l__eb_subfont_footnote_tl + \eb_patch_cmd:Nnn #1 + { \reset@font } + { + \setspread{\fp_use:N \l__eb_spread_footnote_fp} + \tl_use:N \l__eb_subfont_footnote_tl + } } \cs_set_eq:NN \eb@@makefntext \@makefntext \cs_set_eq:NN \eb@@footnotetext \@footnotetext \ctex_at_end_package:nn { footmisc } { \eb_package_date_check:nn { footmisc } { 2022/02/10 } + \boolfalse{FN@setspace} \ifbool{FN@para}{} { \cs_set_eq:NN \@makefntext \eb@@makefntext @@ -1055,12 +1056,7 @@ { bool {FN@hangfoot} or bool {FN@perpage} or - bool {FN@robust} or - ( - notbool {FN@abovefloats} and - bool {FN@fixskip} and - test {\ifnumcomp{\FN@bottomcases}{=}{1}} - ) + bool {FN@robust} } {\msg_warning:nn { easybase } { footmisc }}{} } @@ -1626,7 +1622,6 @@ \ctex_at_end_package:nn { imakeidx } { - \makeindex \RenewDocumentCommand{\printindex}{st+od()} { \group_begin: @@ -1657,7 +1652,7 @@ \ctex_assign_heading_name:nn { biappendix } {#1} \int_compare:nNnTF { \c@chapter } > { 0 } { - \eb_char_patch_cmd:wnn \CTEX@addbitocline + \eb_char_patch_cmd:Nnn \CTEX@addbitocline { \def\CTEX@prechapter{\CTEX@prebichapter} \def\CTEX@thechapter{\CTEX@bichapter@number} @@ -1944,7 +1939,7 @@ spacebelow = 0ex plus .1ex, headindent = 0em, within = \bool_if:NT \l__eb_class_mode_book_bool { chapter }, - headpunct = {}, + headpunct = :, headfont = \color{ctex@emph}\sffamily, bodyfont = \normalfont, postheadspace = 1em @@ -1979,14 +1974,17 @@ aligned,alignedat,gathered,multlined,lgathered,rgathered } { \setspread{\fp_use:N \l__eb_spread_math_fp} } -\eb_patch_cmd:wnn +\eb_seq_map_inline:nn { \start@gather,\start@align,\start@multline } - { \collect@body } { - \setspread{\fp_use:N \l__eb_spread_math_fp} - \collect@body + \eb_patch_cmd:Nnn #1 + { \collect@body } + { + \setspread{\fp_use:N \l__eb_spread_math_fp} + \collect@body + } } -\eb_patch_cmd:wnn \gather@split +\eb_patch_cmd:Nnn \gather@split { \spread@equation } { \setspread{\fp_use:N \l__eb_spread_math_fp} @@ -2325,7 +2323,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/10}{1.643} +\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/11}{1.645} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index 38e91e5c54..0ef1b36ef4 100644 Binary files a/macros/latex/contrib/easybook/easybook.pdf and b/macros/latex/contrib/easybook/easybook.pdf differ diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index 495bca8f59..b1eb6b71b7 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -21,8 +21,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK使用手册, - version = v1.644, - date = 2022/03/10, + version = v1.645, + date = 2022/03/11, authors = 瞿毅, info = 简便地排版中文学位论文或书籍, email = q1jx@foxmail.com, @@ -104,7 +104,7 @@ \endgroup \IfBooleanF{#1}{\cnltx@checkdefault{\hfill\newline}} } -\newnote{\newtag}[1][New]{\textcolor{red}{\ding{70}\ #1}} +\newnote{\newtag}[1][New]{\textcolor{red}{\fbox{#1}}} % Use a separate module margin marker to prevent overlap \newcommand{\smodule}{\cnltx@module@text{}} \newcommand{\noitemsep}{\setlength{\itemsep}{0ex}} @@ -233,8 +233,8 @@ amsthm & bicaption & ctex & caption & chemformula \\ enumitem & etoolbox & fancyhdr & geometry & hyperref \\ imakeidx & listings & marginnote & mathtools & multicol \\ - pifont & pdfpages & siunitx & spbmark & setspace \\ - thmtools & tcolorbox & titletoc & tabularray & ulem + pifont & pdfpages & siunitx & spbmark & thmtools \\ + tcolorbox & titletoc & tabularray & ulem & } \section{文档类选项} @@ -475,7 +475,7 @@ \keychoice{fntnumwith}{part,chapter,page}\Default{chapter} 使脚注跟随编号的计数器名。默认跟随章计数器,即开启新的一章时脚注编号从1开始。 \keychoice{uppercase}{all,first,none,none*}\Default{all} - 使用 \cs*{rightmark} 和 \cs*{leftmark} 等标题标记命令获取标题内容用于页眉页脚时其中英文的大小写类型。\code{all} 为标题标记中的英文字母全部大写。\code{first} 为标记以英文起始时仅第一个字母大写。\code{none} 不改变标记中英文字母的大小写形式,变体 \code{none*} 则强制标记的字母均为小写形式。 + 使用 \cs{rightmark} 和 \cs{leftmark} 等标题标记命令获取标题内容用于页眉页脚时其中英文的大小写类型。\code{all} 为标题标记中的英文字母全部大写。\code{first} 为标记以英文起始时仅第一个字母大写。\code{none} 不改变标记中英文字母的大小写形式,变体 \code{none*} 则强制标记的字母均为小写形式。 \kvsplit{brackets}{左括号,右括号}\Default{\Marg{(,)}} 设置行间公式编号标签的括号及格式,以英文逗号分隔,分别代表左右括号。\meta{左括号} 可以是带有一个参数的命令,用于接受编号和 \meta{右括号}。将标签括号设置为方括号,并使用无衬线字体: \begin{ctexexam} @@ -802,7 +802,7 @@ 每个脚注首段的首行缩进(选项 \option*{hang} 为整体缩进),等于长度 \cs{fnfirstindent} 的值。 \keyval{fnafterindent}{刚性长度}\Default{2em} 每个脚注第二段及之后段落的首行缩进,等于长度 \cs{fnafterindent} 的值。 - \keyval{fnparskip}{弹性长度}\Default{0ex} + \keyval{fnparskip}{弹性长度}\Default{0ex plus .1ex} 不同脚注的段落间距,等于长度 \cs{fnparskip} 的值。 \keychoice{fntext-pos}{normal,super}\Default{super} 设置脚注内容标记的位置,正常文本或是上标形式。 @@ -1012,9 +1012,9 @@ \subsection{列表} \begin{commands} - \command*{setlist}[\sarg\splitoarg{列表类型,级别}\marg{键值列表}] - 列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制,这是设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs*{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。 - \command*{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}] + \command{setlist}[\sarg\splitoarg{列表类型,级别}\marg{键值列表}] + 列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制,这是设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。 + \command{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}] 克隆基本的 \meta{列表类型} 在其基础上新建一个名为 \meta{列表名} 的列表环境。不要将 \meta{最大级别} 设置过大以避免创建过多的计数器和相关宏。 \begin{ctexexam} \setlist{} % 清除所有列表共享的格式 @@ -1043,7 +1043,7 @@ \subsection{悬挂缩进} \begin{commands} \command{hangpara}[\marg{缩进长度}\marg{缩进开始行数}] - 悬挂缩进命令 \cs{hangpara} 使其后的一个段落保持悬挂缩进,参数与 \env{hangparas} 环境相同,不过只有一个段落。\meta{缩进长度} 可以是带单位的数值或由文本长度测定命令 \cs*{widthof} 提供。 + 悬挂缩进命令 \cs{hangpara} 使其后的一个段落保持悬挂缩进,参数与 \env{hangparas} 环境相同,不过只有一个段落。\meta{缩进长度} 可以是带单位的数值或由文本长度测定命令 \cs{widthof} 提供。 \end{commands} \begin{environments} @@ -1134,14 +1134,14 @@ \subsection{物理量} \begin{commands} - \command*{num}[\oarg{键值列表}\marg{数字}] - \pkg*{siunitx} 宏包的 \cs*{num} 命令可以输出以科学计数法表示的数值。 - \command*{unit}[\oarg{键值列表}\marg{单位}] - 单位格式化命令 \cs*{unit} 包含文字元素(例如字母或数字)时,使用 \Marg{.} 和 \code{\~{}} 放置在单元乘积中间,并使用 \code{\_} 和 \code{\^{}} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。 - \command*{qty}[\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}] - 命令 \cs*{qty} 可用来输出带有单位的量。 - \command*{qtyrange}[\oarg{键值列表}\marg{起始数字}\marg{结束数字}\marg{单位}] - 命令 \cs*{qtyrange} 可以输出带有范围和单位的量。 + \command{num}[\oarg{键值列表}\marg{数字}] + \pkg*{siunitx} 宏包的 \cs{num} 命令可以输出以科学计数法表示的数值。 + \command{unit}[\oarg{键值列表}\marg{单位}] + 单位格式化命令 \cs{unit} 包含文字元素(例如字母或数字)时,使用 \Marg{.} 和 \code{\~{}} 放置在单元乘积中间,并使用 \code{\_} 和 \code{\^{}} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。 + \command{qty}[\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}] + 命令 \cs{qty} 可用来输出带有单位的量。 + \command{qtyrange}[\oarg{键值列表}\marg{起始数字}\marg{结束数字}\marg{单位}] + 命令 \cs{qtyrange} 可以输出带有范围和单位的量。 \begin{ctexexam} \numproduct{-21x3e5} \unit{mL~min^{-1}} @@ -1150,6 +1150,16 @@ \end{ctexexam} \end{commands} +\subsection{化学式} +\begin{commands} + \command{ch}[\oarg{键值列表}\marg{化学式}] + 除了以普通公式的方式,化学式还可用 \pkg*{chemformula} 实现。无机化学式使用 \cs{ch} 命令书写。化合物表达式中的原子数不需要加下标符号,化学计量数与表达式间隔一个空格。 + \begin{ctexexam} + \ch{[Cu(NH3)4]^2+} + \ch{Cu2S + 2 O2 - 2 e^- == 2 Cu^2+ + SO^{2-}_4} + \end{ctexexam} +\end{commands} + \subsection{计数器} \begin{commands}\noitemsep \command{newcounter}[\marg{计数器}\oarg{父计数器}]\default{} @@ -1187,7 +1197,7 @@ \subsection{图表题注} \begin{commands} - \command*{captionsetup}[\oarg{条目名}\marg{键值列表}] + \command{captionsetup}[\oarg{条目名}\marg{键值列表}] 这是 \pkg*{caption} 宏包的接口命令,\meta{键值列表} 提供多个选项更改图表题注的格式。题注主要由三部分组成:标题标签即图表名与题注编号的组合,标题文本本身通常是内容的简短描述,以及将文本与标签分开的题注分隔符。可以在导言区设置整体格式,也可以在正文使用局部更改格式。 \end{commands} @@ -1198,11 +1208,28 @@ 题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动环境 \env*{figure} 和 \env*{table} 中使用。在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定条目名。可以搭配 \pkg*{newfloat} 宏包创建更多类型的浮动环境并设置相应题注。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。 \end{commands} -\subsection{化学式} -\begin{commands}\noitemsep - \command*{ch}[\oarg{键值列表}\marg{化学式}]\default{} - \command*{chemfig}[\oarg{键值列表}\marg{化学式}] - 除了以普通公式的方式,化学式还可用 \pkg*{chemformula} 实现,无机化学式使用 \cs*{ch} 命令书写。有机化学式推荐在导言区载入 \pkg*{chemfig} 宏包,使用 \cs*{chemfig} 命令完成。 +\subsection{索引} +\begin{commands} + \command{indexsetup}[\marg{键值列表}] + \pkg*{imakeidx} 宏包增强了索引的功能。这是它的的接口命令,用于设置索引表的整体格式。 + \command*{index}[\oarg{索引名}\marg{标签}] + 索引标签命令 \cs*{index} 的 \meta{索引名} 与索引输出命令 \cs{printindex} 一致,可以存在多个索引表。 + \command*{makeindex}[\oarg{键值列表}] + 使用 \cs*{makeindex} 命令开启索引收集。这个命令可以重复使用打印多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表就没必要再使用。 + \command{printindex}[\sarg\oarg{键值列表}] + 现在索引表生成命令 \cs{printindex} 被重新定义。\meta{键值列表} 中的选项与\ref{sec:document command} 其它目录命令相同,但是原本接口命令 \cs{indexsetup} 的部分选项失效。 + \begin{options} + \keyval{name}{索引名} + 指定输出名为 \meta{索引名} 的索引表,如果只使用一个索引表则默认为项目文件名不需要指定。 + \end{options} +\end{commands} + +\subsection{边注} +\begin{commands} + \command{marginnote}[\oarg{左文本}\marg{右文本}\oarg{垂直偏移}] + 边注命令用于在两侧页边空白添加标注。如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。 + \command{reversemarginpar} + 边注位置设置命令,用于将边注排版到与默认边空位置相反的边空中。 \end{commands} \subsection{公式符号对照} @@ -1212,8 +1239,8 @@ \begin{ctexexam} \seteqcomp{intro = 上式中} \begin{eqcomp}[width = 1.5em] - \symb{Ab}[$\to$] 符号说明1 - \symb{C}[---] 符号说明2 + \symb{Ab}[$\to$] 符号说明 + \symb{C}[---] 符号说明 \end{eqcomp} \end{ctexexam} \end{environments} @@ -1247,45 +1274,17 @@ \end{options} \end{commands} -\subsection{索引} -\begin{commands} - \command*{indexsetup}[\marg{键值列表}] - \pkg*{imakeidx} 宏包增强了索引的功能。这是它的的接口命令,用于设置索引表的整体格式。 - \command*{index}[\oarg{索引名}\marg{标签}] - 索引标签命令 \cs*{index} 的 \meta{索引名} 与索引输出命令 \cs{printindex} 一致,可以存在多个索引表。 - \command*{makeindex}[\oarg{键值列表}] - 使用 \cs*{makeindex} 命令开启索引收集。这个命令可以重复使用打印多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表就没必要再使用。 - \command{printindex}[\sarg\oarg{键值列表}] - 现在索引表生成命令 \cs{printindex} 被重新定义。\meta{键值列表} 中的选项与\ref{sec:document command} 其它目录命令相同,但是原本接口命令 \cs*{indexsetup} 的部分选项失效。 - \begin{options} - \keyval{name}{索引名} - 指定输出名为 \meta{索引名} 的索引表,如果只使用一个索引表则默认为项目文件名不需要指定。 - \end{options} -\end{commands} - -\subsection{边注} -\begin{commands} - \command{marginnote}[\oarg{左文本}\marg{右文本}\oarg{垂直偏移}] - 命令 \cs{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。 -\end{commands} - \subsection{插入文档} \begin{commands} - \command*{includepdf}[\oarg{键值列表}\marg{文档名}] + \command{includepdf}[\oarg{键值列表}\marg{文档名}] 该命令由文档宏包 \pkg*{pdfpages} 提供。可以将其它 \code{pdf} 文档插入当前文档,比如插入其它软件制作的封面。\meta{键值列表} 可以指定插入页数、逻辑页和横向页面等,详情查看宏包文档。 \end{commands} -\subsection{指定行距的段落} -\begin{environments} - \environment*{spacing}[\marg{浮点数}] - 该环境由行距宏包 \pkg*{setspace} 提供。可以指定环境内段落的行距,使用 \meta{浮点数} 控制行距倍数。 -\end{environments} - \subsection{下划线} \begin{commands}\noitemsep - \command*{uline}[\marg{下划直线}]\default{} - \command*{uuline}[\marg{下划双直线}]\default{} - \command*{uwave}[\marg{下划波浪线}] + \command{uline}[\marg{下划直线}]\default{} + \command{uuline}[\marg{下划双直线}]\default{} + \command{uwave}[\marg{下划波浪线}] \pkg*{ulem} 宏包提供了多种下划线命令,可以重新定义 \cs*{ULthickness} 命令控制下划线的粗细。下划线的深度由 \cs*{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。 \end{commands} -- cgit v1.2.3