From 5bc44ca57dbc5dac1c9beae2df2712cdb16dc563 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 10 Aug 2021 03:01:45 +0000 Subject: CTAN sync 202108100301 --- macros/latex/contrib/easybook/easybook.dtx | 78 +++++++++++++++++++---------- macros/latex/contrib/easybook/easybook.pdf | Bin 583892 -> 584706 bytes macros/latex/contrib/easybook/easybook.tex | 39 +++++++++++---- 3 files changed, 79 insertions(+), 38 deletions(-) (limited to 'macros/latex/contrib/easybook') 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 @@ } % %<*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 } diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index 2f7d0b55ac..3d0183b324 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 fe2228bc1a..34b22931d2 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -11,8 +11,8 @@ { name = easybook, title = EASYBOOK 使用手册, - version = v1.28F, - date = 2021/08/06, + version = v1.28H, + date = 2021/08/09, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = quee123@foxmail.com, @@ -268,7 +268,7 @@ \keyval-{columns}{目录栏数}\Default{2} 设置目录的栏数,仅在 \keyis-{multoc}{true} 时有效,默认为双栏。 \kvsplit{title}{中文目录标题,英文目录标题}\newline - 用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录 \cs*{tableofcontents+} 命令。 + 用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录 \cs*{tableofcontents}\parg{} 命令。 \keyval-{format}{目录标题格式}\Default 在书籍模式且 \option{chapter} 选项开启或者文章模式的情况下,\option{format} 用于设置目录标题的格式。 \keyval-{aftertitle}{目录标题格式}\Default @@ -281,14 +281,14 @@ 双语目录标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{binumber} 选项更改英文目录中的编号。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。 \begin{commands} \command{bichapter}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}] - \code{chapter} 级别的双语目录标题命令,具有独立的 \code{bichapter} 计数器。 + \code{chapter} 章级别的双语目录标题命令,具有独立的 \code{bichapter} 计数器。 \command{bisection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}] - \code{section} 级别的双语目录标题命令,具有独立的 \code{bisection} 计数器。 + \code{section} 节级别的双语目录标题命令,具有独立的 \code{bisection} 计数器。 \command{bisubsection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}] - \code{subsection} 级别的双语目录标题命令,具有独立的 \code{bisubsection} 计数器。 + \code{subsection} 小节级别的双语目录标题命令,具有独立的 \code{bisubsection} 计数器。 \end{commands} -它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录的格式是一致的,共享使用 \module*{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下: +它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs*{chapter}\sarg{} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录的格式是一致的,共享使用 \module*{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下: \begin{options} \kvsplit{biname}{英文目录前名字,英文目录后名字}\Module{chapter}\Default{Chapter\cs*{space}} 更改英文目录 \code{chapter} 级别的标题编号前后名字,类似 C\TeX 的 \option*{name} 选项。 @@ -304,7 +304,7 @@ \end{commands} \subsection{上标和下标} -上标和下标的功能来自 \pkg*{spbmark} 宏包,\cs{super}、\cs{sub} 和 \cs{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。 +上标和下标的功能来自 \pkg*{spbmark} 宏包,\cs{super}、\cs{sub} 和 \cs{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。 \begin{commands} \command{super}[\sarg\oarg{垂直偏移}\splitoarg{高度,深度}\darg{格式代码}\marg{内容}\oarg{水平偏移}] 上标命令,与简短命令 \cs{sp} 等效。水平和垂直偏移进行距离微调,可以为带有长度单位的正值或负值,为正值时代表向上或向右移动,否则相反,默认均为 \code{0pt}。\meta{格式代码} 可以插入字体或颜色等命令,代码中的最后一个命令可以接受一个为上标或下标的参数。 @@ -398,6 +398,10 @@ 下标垂直偏移量,对应 \cs{sub} 命令的参数 \meta{垂直偏移}。 \keyval-{sub-hshift}{刚性长度}\Default{0pt} 下标水平偏移量,对应 \cs{sub} 命令的参数 \meta{水平偏移}。 + \opt{nohshift}\Default! + 同时取消上标和下标的 \meta{水平偏移},与 \keyis-{super-hshift}{0pt} 和 \keyis-{sub-hshift}{0pt} 等效。 + \opt{novshift}\Default! + 同时取消上标和下标的 \meta{垂直偏移},与 \keyis-{super-vshift}{0pt} 和 \keyis-{sub-vshift}{0pt} 等效。 \keyval-{super-format}{上标格式}\Default 上标的格式,对应 \cs{super} 命令的参数 \meta{格式代码}。 \keyval-{sub-format}{下标格式}\Default @@ -676,13 +680,13 @@ \subsubsection{脚注格式} \begin{options} \keyval-{fnmargin}{刚性长度}\Module{hdrset}\Default{0.75em} - 脚注首段缩进距离,等于长度 \cs{footnoteindent} 的值. + 脚注首段缩进距离,等于长度 \cs{footnoteindent} 的值。 \keyval-{fnparskip}{弹性长度}\Default{0ex} 脚注段落间距,等于长度 \cs{footparskip} 的值。 \keyval-{fnparindent}{刚性长度}\Default{2em} 脚注段落缩进,等于长度 \cs{footparindent} 的值。 \keychoice{footnotetype}{hang,default,bottom}\Default{hang} - 脚注的类型,悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。这是个复合选项,\option{bottom} 可以与前两种类型重复或复合使用: + 脚注的类型,悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。这是个复合选项,\code{bottom} 可以与前两种类型重复或复合使用: \begin{ctexexam} \hdrset{footnotetype = default,footnotetype = bottom} \hdrset{footnotetype = {hang,bottom}} @@ -702,7 +706,19 @@ \keychoice{fnboth-num}{plain,pifont,pifont*,pifont-sans,pifont-sans*,短编号}\Default{plain} 同时设定脚注正文标记编号 \option{fnmark-num} 与脚注内容标记编号 \option{fntext-num} 的格式。目前脚注编号格式选项对于迷你页环境 \env*{minipage} 无效,其中的脚注保持默认英文字母的编号形式。 \keyval-{fnmark-form}{格式代码}\Default - 脚注标记的格式,在此设置字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注标记,一般配合 \keyis-{fnmark-num}{plain} 使用。 + 脚注标记的格式,一般配合选项 \keyis-{fnmark-num}{plain} 使用,例如配合 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈: + \begin{ctexexam} + \usepackage{circledsteps} + \hdrset + { + fnmark-pos = normal, + fnmark-form = \tiny\Circled + } + \end{ctexexam} + \keyval-{fncust-form}{格式代码}\Default + 单独设定自定义脚注标记的格式,自定义脚注的命令与用法见小节 \ref{subsubsec:custom footnotes}。 + \keyval-{fnboth-form}{格式代码}\Default + 同时设定脚注标记 \option{fnmark-form} 和自定义脚注标记 \option{fncust-form} 的格式。标记格式选项含有字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注标记。 \keyval-{fntext-form}{格式代码}\Default 脚注内容的格式,在此设置字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注内容。 \kvsplit{fnmark-code}{前代码,后代码}\newline @@ -1106,6 +1122,7 @@ \end{commands} \subsubsection{自定义脚注} +\label{subsubsec:custom footnotes} \begin{commands}\noitemsep \command{Footnote}[\oarg{内容标记}\marg{正文标记}\marg{脚注文本}]\default{} \command{Footnotetext}[\marg{内容标记}\marg{脚注文本}]\default{} -- cgit v1.2.3