From 5f2b3969a73a6756d3cd224240ae1be6408d5801 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 3 Feb 2022 03:00:49 +0000 Subject: CTAN sync 202202030300 --- macros/latex/contrib/easybook/easybook.dtx | 12 +- macros/latex/contrib/easybook/easybook.pdf | Bin 575857 -> 575027 bytes macros/latex/contrib/easybook/easybook.tex | 206 ++++++------ macros/latex/contrib/mathtools/README.md | 2 +- macros/latex/contrib/mathtools/empheq.dtx | 36 +-- macros/latex/contrib/mathtools/empheq.ins | 2 +- macros/latex/contrib/mathtools/empheq.pdf | Bin 311680 -> 329716 bytes macros/latex/contrib/mathtools/mathtools.dtx | 354 ++++++++++++++------- macros/latex/contrib/mathtools/mathtools.ins | 1 + macros/latex/contrib/mathtools/mathtools.pdf | Bin 456865 -> 498903 bytes macros/latex/contrib/mathtools/mhsetup.dtx | 10 +- macros/latex/contrib/mathtools/mhsetup.ins | 93 ++++++ macros/latex/contrib/mathtools/mhsetup.pdf | Bin 236759 -> 255014 bytes macros/latex/contrib/sillypage/README.md | 9 +- .../latex/contrib/sillypage/sillypage-example.pdf | Bin 103728 -> 103728 bytes macros/latex/contrib/sillypage/sillypage.dtx | 162 ++++++++-- macros/latex/contrib/sillypage/sillypage.ins | 8 +- macros/latex/contrib/sillypage/sillypage.pdf | Bin 196129 -> 219530 bytes macros/latex/contrib/siunitx/CHANGELOG.md | 9 +- macros/latex/contrib/siunitx/siunitx-code.pdf | Bin 608200 -> 607585 bytes macros/latex/contrib/siunitx/siunitx-print.dtx | 19 +- macros/latex/contrib/siunitx/siunitx.dtx | 2 +- macros/latex/contrib/siunitx/siunitx.pdf | Bin 639472 -> 639462 bytes macros/latex/contrib/siunitx/siunitx.tex | 14 +- 24 files changed, 648 insertions(+), 291 deletions(-) create mode 100644 macros/latex/contrib/mathtools/mhsetup.ins (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index a95ac16fc4..ec17a0f52b 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/02/01}{1.59} +\ProvidesExplClass{easybook}{2022/02/02}{1.60} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -305,7 +305,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2022/02/01}{1.59} +\ProvidesExplPackage{easybase}{2022/02/02}{1.60} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -377,8 +377,7 @@ \tl_if_blank:nTF {#2} { \msg_warning:nnn { easybase } { package-repeat-load-ii } {#1} } { \msg_warning:nnnn { easybase } { package-repeat-load-i } {#1} {#2} } - } - {#3\disable@package@load{#1}{}} + }{#3} } \msg_new:nnn { easybase } { package-repeat-load-i } { @@ -1849,8 +1848,7 @@ { asterisk } { \textasteriskcentered }, { arabic } { \arabic*. }, { alph } { (\alph*) }, - { roman } { \roman*. }, - { outline } { \upshape\ding{111} } + { roman } { \roman*. } } { \eb_enumitem_label_set:nn #1 } \SetEnumitemValue{font}{sf}{\color{ctex@emph}\normalfont\sffamily} @@ -2343,7 +2341,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/01}{1.59} +\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/02}{1.60} {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 cca5377c8e..e9d8282bef 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 8c16272c70..355b35bd00 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.59, - date = 2022/02/01, + version = v1.60, + date = 2022/02/02, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -86,6 +86,16 @@ \newcommand{\spemmeta}{\splitmeta[\code{|}]} \newsplitarg[\spemmeta]{\spemcoarg}{[}{]} \newcommand{\harg}{\textcolor{argument}{\code{-}}} +\RenewDocumentCommand{\key}{s} + { + \IfBooleanTF{#1}{\cnltx@key@aux*}{\cnltx@key@aux{}} + \meta + } +\RenewDocumentCommand{\keyis}{s} + { + \IfBooleanTF{#1}{\cnltx@key@aux*}{\cnltx@key@aux{}} + \@firstofone + } % A tag that distinguishes the options for different paths \NewDocumentCommand{\dtag}{O{\ding{73}}} { @@ -238,10 +248,10 @@ \keychoice{scheme}{chinese,plain}\Default{chinese} 文档主题方案选项 \option{scheme} 扩展了 C\TeX 文档类中同名选项原有的作用范围,选项值 \code{plain} 可使各类标题变为英文形式。包括章节标题、图表标题和定理名等。 \opt{enmode} - 同时开启 \option{newline} 和 \keyis-{scheme}{plain} 选项以符合英文原生风格。 + 同时开启 \option{newline} 和 \keyis{scheme}{plain} 选项以符合英文原生风格。 \keychoice{paper}{a4paper,b5paper,c5paper,letterpaper,other paper}\dtag\Default{a4paper} 文档页面尺寸选项将参数交给 \pkg*{geometry} 宏包处理,可使用它支持的所有标准纸张规格。 - \keyval-{config}{配置文件列表} + \keyval{config}{配置文件列表} 载入用户配置的文件名列表,文件列表以花括号包裹并以英文逗号分隔。文件名应包含如 \code{tex}、\code{def} 或 \code{cfg} 等扩展名。若配置文件不在当前文件夹则文件名需要包含路径。 \keybool{floatpage}\dtag\Default{false} 开启这个选项后浮动环境 \env*{table} 和 \env*{figure} 的比例参数会使用默认值。关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。 @@ -254,7 +264,7 @@ \keychoice{cjkfont}{adobe,fandol,founder,mac,macnew,macold,ubuntu,windows,none} 中文字体采用 C\TeX 宏集包含的字库并与其一致,具体配置方案可以查看 C\TeX 使用手册。它与 \option*{fontset} 选项是等效的,如果没有指定 \option{cjkfont} 的值,将会自动检测操作系统并选择相应的字体。 - 如果需要使用其它中文字体,可以在启用选项 \keyis-{cjkfont}{none} 后,再使用 \pkg*{xeCJK} 宏包的相关命令设置字体以及声明字体族: + 如果需要使用其它中文字体,可以在启用选项 \keyis{cjkfont}{none} 后,再使用 \pkg*{xeCJK} 宏包的相关命令设置字体以及声明字体族: \begin{ctexexam} \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi] \setCJKsansfont{SimHei} @@ -295,9 +305,9 @@ \keychoice{class}{book,article}\dtag\Default{book} 使用 \cls*{easybook} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \code{article} 会变为 \code{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令。此时\ref{sec:document command} 中目录命令的 \option{chapter} 选项会失效,将以 \code{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。 \opt{book}\dtag - 开启 \cls*{book} 书籍模式,与 \keyis*-{class}{book} 等效。 + 开启 \cls*{book} 书籍模式,与 \keyis*{class}{book} 等效。 \opt{article}\dtag - 开启 \cls*{article} 文章模式,与 \keyis*-{class}{article} 等效。 + 开启 \cls*{article} 文章模式,与 \keyis*{class}{article} 等效。 \end{options} \section{文档命令} @@ -337,17 +347,17 @@ 使当前目录标题按照 \code{section} 节级别输出。 \opt{none} 使当前目录没有 \code{chapter} 或 \code{section} 级别的标题,仅输出目录原始内容。 - \keyval-{multoc}{整数}\Default{2} + \keyval{multoc}{整数}\Default{2} 与 \module*{style} 模块的 \option{multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同类型目录的排版栏数。\meta{整数} 为目录栏数,不指定栏数值则默认为双栏。 \kvsplit{title}{中文目录标题,英文目录标题} 用于更改目录的标题。标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入文档主目录 \cs*{tableofcontents}\parg{} 命令。 \keychoice{bilist}{mix,new}\Default{new} 确定文档主目录中双语标题列表的输出排列方式。选项 \code{mix} 使每个英文标题条目在中文目录中跟随对应的中文标题输出,\code{new} 则新建一个英文目录输出英文标题。 - \keyval-{format}{目录标题格式} + \keyval{format}{目录标题格式} 在 \cls*{book} 模式且 \option{chapter} 选项开启或者 \cls*{article} 模式的情况下,\option{format} 用于设置目录标题的格式。 - \keyval-{aftertitle}{目录标题格式} + \keyval{aftertitle}{目录标题格式} 目录标题文本之后插入的代码。 - \keyval-{pagestyle}{标题页的页面格式}\Default{empty} + \keyval{pagestyle}{标题页的页面格式}\Default{empty} 目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 C\TeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。 \end{options} @@ -366,7 +376,7 @@ \begin{options} \kvsplit{biname}{英文目录前名字,英文目录后名字}\Module{chapter}\Default{Chapter\cs*{space}} 更改英文目录 \code{chapter} 级别的标题编号前后名字,类似于 C\TeX 的 \option*{name} 选项。 - \keyval-{binmuber}{英文目录数字输出命令}\Default{\cs*{arabic}\Marg{chapter}} + \keyval{binmuber}{英文目录数字输出命令}\Default{\cs*{arabic}\Marg{chapter}} 更改英文目录 \code{chapter} 级别的标题编号输出格式,类似于 C\TeX 的 \option*{number} 选项。 \end{options} @@ -392,15 +402,15 @@ 上下标命令键值列表中共同的选项如下所示。当下面除 \option{mode} 以外的选项用于 \module*{style} 模块全局设置时,它们将根据前面最近一个命令的类型设定相应值。 \begin{options} - \keyval-{vmove}{刚性长度}\Default{0pt} + \keyval{vmove}{刚性长度}\Default{0pt} 上标或下标的垂直偏移。如果是上下标命令使用则代表上标和上标间的额外垂直距离 \option{vsep}。 - \keyval-{hmove}{刚性长度}\Default{0pt} + \keyval{hmove}{刚性长度}\Default{0pt} 上标或下标的水平偏移。如果是上下标命令使用则代表上标和上标的共同偏移。 - \keyval-{cmd}{格式命令} + \keyval{cmd}{格式命令} 上标或下标的格式命令选项。最后一个命令可以带有一个参数,这个参数用于接受上标或下标。 - \keyval-{height}{刚性长度} + \keyval{height}{刚性长度} 段落中当前行上标或下标的基线与前一行的间距。 - \keyval-{depth}{刚性长度} + \keyval{depth}{刚性长度} 段落中当前行上标或下标的基线与下一行的间距。 \keychoice{mode}{text,math,match}\Default{match} 上标或下标的输出格式。可以为文本 \code{text} 或数学 \code{math} 模式。当使用选项 \code{match} 时可以根据当前段落所处的模式自动匹配。 @@ -450,9 +460,9 @@ \command{DeclareThemeColor}[\splitmarg{风格名称,ctex@frame,ctex@emph,ctex@verb}] 声明新的颜色主题命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成主题颜色列表。类似地更改超链接颜色见\ref{subsec:hyperlinks}。 \end{commands} - \keyval-{color-every}{HTML颜色代码} + \keyval{color-every}{HTML颜色代码} 统一设置主题的各部分颜色。参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。 - \keyval-{multoc}{整数}\Default{2} + \keyval{multoc}{整数}\Default{2} 使目录多栏排版,与\ref{sec:document command} 中目录命令的同名选项有相同效果。 \keybool{withpart}\Default{false} 使章标题跟随部分计数器编号,当开启新的一部分时章编号从 1 开始。 @@ -472,42 +482,42 @@ \subsubsection{连字符} \begin{options} - \keyval-{hyphen-figure}{图片连字符}\Default{\Marg{.}} + \keyval{hyphen-figure}{图片连字符}\Default{\Marg{.}} 设置图片题注编号的连字符。 - \keyval-{hyphen-table}{表格连字符}\Default{\Marg{.}} + \keyval{hyphen-table}{表格连字符}\Default{\Marg{.}} 设置表格题注编号的连字符。 - \keyval-{hyphen-listing}{代码连字符}\Default{\Marg{.}} + \keyval{hyphen-listing}{代码连字符}\Default{\Marg{.}} 设置代码题注编号的连字符。 - \keyval-{hyphen-equation}{公式连字符}\Default{\Marg{.}} + \keyval{hyphen-equation}{公式连字符}\Default{\Marg{.}} 设置公式题注编号的连字符。 - \keyval-{hyphen-every}{连字符}\Default{\Marg{.}} + \keyval{hyphen-every}{连字符}\Default{\Marg{.}} 统一设置上述所有编号的连字符。 \end{options} \subsubsection{上下标全局设置} \label{subsubsec:super-sub-script} \begin{options} - \keyval-{spvmove}{刚性长度}\Default{0pt} + \keyval{spvmove}{刚性长度}\Default{0pt} 上标命令 \cs{super} 对应的上标垂直偏移量。 - \keyval-{sphmove}{刚性长度}\Default{0pt} + \keyval{sphmove}{刚性长度}\Default{0pt} 上标命令 \cs{super} 对应的上标水平偏移量。 - \keyval-{sbvmove}{刚性长度}\Default{0pt} + \keyval{sbvmove}{刚性长度}\Default{0pt} 下标命令 \cs{sub} 对应的下标垂直偏移量。 - \keyval-{sbhmove}{刚性长度}\Default{0pt} + \keyval{sbhmove}{刚性长度}\Default{0pt} 下标命令 \cs{sub} 对应的下标水平偏移量。 \opt{nohmove} - 同时取消上标和下标的 \meta{水平偏移},与 \keyis-{sphmove}{0pt} 和 \keyis-{sbhmove}{0pt} 等效。 + 同时取消上标和下标的 \meta{水平偏移},与 \keyis{sphmove}{0pt} 和 \keyis{sbhmove}{0pt} 等效。 \opt{novmove} - 同时取消上标和下标的 \meta{垂直偏移},与 \keyis-{spvmove}{0pt} 和 \keyis-{sbvmove}{0pt} 等效。 - \keyval-{spcmd}{格式命令} + 同时取消上标和下标的 \meta{垂直偏移},与 \keyis{spvmove}{0pt} 和 \keyis{sbvmove}{0pt} 等效。 + \keyval{spcmd}{格式命令} 上标命令 \cs{super} 对应的上标的格式命令。 - \keyval-{sbcmd}{格式命令} + \keyval{sbcmd}{格式命令} 下标命令 \cs{sub} 对应的下标的格式命令。 - \keyval-{spbhmove}{刚性长度}\Default{0pt} + \keyval{spbhmove}{刚性长度}\Default{0pt} 上下标命令 \cs{supersub} 对应的上下标共同水平偏移量。 \kvsplit{spbcmd}{上标格式,下标格式} 上下标命令 \cs{supersub} 对应的上下标格式命令。以英文逗号分隔为前后两个部分分别设置上下标格式,也可以只有前部分,表示上标的格式。 - \keyval-{vsep}{刚性长度}\Default{0.6ex} + \keyval{vsep}{刚性长度}\Default{0.6ex} 上下标命令 \cs{supersub} 对应的上下标额外垂直距离。 \keychoice{halign}{l,c,r}\Default{l} 上下标命令 \cs{supersub} 对应的上下标水平对齐方式,有左 \code{l}、居中 \code{c} 和右 \code{r} 三种对齐方式。 @@ -525,7 +535,7 @@ \command{DeclareLinkColor}[\splitmarg{风格名称,ctex@link,ctex@url,ctex@cite}] 声明新的超链接颜色样式命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成超链接颜色列表。 \end{commands} - \keyval-{linkcolor-every}{HTML颜色代码} + \keyval{linkcolor-every}{HTML颜色代码} 统一设置超链接的各部分颜色。参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。 \keychoice{linktoc}{none,section,page,all}\Default{all} 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。 @@ -535,44 +545,44 @@ \label{subsec:spacing} 行距因子用于设置各种行距倍数,\meta{数值} 是不带有长度单位的浮点数。各类行距既可以在导言区全局设置,也可以在正文中设置对后面生效。 \begin{options} - \keyval-{line}{数值}\Module{spread}\Default{1.354} + \keyval{line}{数值}\Module{spread}\Default{1.354} 正文行距因子,注意 C\TeX 宏集原有的行距选项 \option*{linespread} 失效。 - \keyval-{table}{数值}\Default{1.354} + \keyval{table}{数值}\Default{1.354} 表格内容行距因子。对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。 - \keyval-{math}{数值}\Default{1.3} + \keyval{math}{数值}\Default{1.3} 数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。 - \keyval-{caption-figure}{数值}\Default{1.2} + \keyval{caption-figure}{数值}\Default{1.2} 图片题注的行距因子。 - \keyval-{caption-table}{数值}\Default{1.2} + \keyval{caption-table}{数值}\Default{1.2} 表格题注的行距因子。 - \keyval-{caption-listing}{数值}\Default{1.2} + \keyval{caption-listing}{数值}\Default{1.2} 代码题注的行距因子。 - \keyval-{caption-every}{数值}\Default{1.2} + \keyval{caption-every}{数值}\Default{1.2} 同时设置图片、表格和代码题注的行距因子。 - \keyval-{footnote}{数值}\Default{1.2} + \keyval{footnote}{数值}\Default{1.2} 脚注内容整体的行距因子,可以使用 \option{fnpara-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同\footnote{若在正文区中更改脚注行距,脚注横线下方的间距不会随当前行距改变。}。 \begin{ctexexam} \ebspread{footnote = 1.3} \ebhdrset{fnpara-form = \linespread{1.2}\selectfont} \end{ctexexam} - \keyval-{every}{数值} + \keyval{every}{数值} 统一设置上述所有的行距因子。 \end{options} \subsection{其它字体} \label{subsec:other font} \begin{options} - \keyval-{caption-table}{字体命令}\Module{subfont}\Default{\cs*{sffamily}\cs*{small}} + \keyval{caption-table}{字体命令}\Module{subfont}\Default{\cs*{sffamily}\cs*{small}} 设置表格题注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{caption-figure}{字体命令}\Default{\cs*{sffamily}\cs*{small}} + \keyval{caption-figure}{字体命令}\Default{\cs*{sffamily}\cs*{small}} 设置图片题注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{caption-listing}{字体命令}\Default{\cs*{sffamily}\cs*{small}} + \keyval{caption-listing}{字体命令}\Default{\cs*{sffamily}\cs*{small}} 设置代码题注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{caption-every}{字体命令}\Default{\cs*{sffamily}\cs*{small}} + \keyval{caption-every}{字体命令}\Default{\cs*{sffamily}\cs*{small}} 同时设置图片、表格和代码题注的字体命令。 - \keyval-{footnote}{字体命令} + \keyval{footnote}{字体命令} 设置脚注标记与内容的字体,包括字体族、字体系列和字体形状命令。 - \keyval-{marginpar}{字体命令}\Default{\cs*{footnotesize}} + \keyval{marginpar}{字体命令}\Default{\cs*{footnotesize}} 设置边注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 \end{options} @@ -592,9 +602,9 @@ 参考文献处理后端。默认用传统的 \hologo{BibTeX} 处理参考文献\footnote{使用 \hologo{BibTeX} 引擎时加载 \pkg*{natbib} 宏包,使用 \hologo{biber} 时将加载 \pkg*{biblatex} 宏包。}。 \keychoice{bibstyle}{numerical,authoryear,other sty}\Default{numerical} 参考文献格式使用中国参考文献推荐标准 GB/T 7714-2015,对应顺序编码制和著者—出版年制两种风格。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \code{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg*{biblatex} 宏包支持的参考文献风格名称。 - \keyval-{citestyle}{标注风格} - 标注参考文献的风格。选项 \keyis-{backend}{bibtex} 下可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,选项 \keyis-{backend}{biblatex} 下可使用 \pkg*{biblatex} 宏包支持的标注风格名称。 - \keyval-{datafile}{参考文献数据库列表} + \keyval{citestyle}{标注风格} + 标注参考文献的风格。选项 \keyis{backend}{bibtex} 下可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,选项 \keyis{backend}{biblatex} 下可使用 \pkg*{biblatex} 宏包支持的标注风格名称。 + \keyval{datafile}{参考文献数据库列表} 参考文献数据库的文件名列表,文件列表以花括号包裹并以英文逗号分隔。使用 \hologo{biber} 处理时要带有 \code{bib} 后缀,若参考文献文件不在当前文件夹则文件名需要包含路径。不设置参考文献数据库名时 \module*{bibset} 模块中的选项会失效,即不自动载入 \pkg*{natbib} 或 \pkg*{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。 \end{options} @@ -656,25 +666,25 @@ \command{declaretheoremstyle}[\oarg{键值列表1}\marg{定理样式}\oarg{键值列表2}] 定理样式声明命令,键值列表支持自身以及定理声明命令 \cs{declaretheorem} 的所有选项。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,其中支持的选项如下: \begin{options} - \keyval-{headfont}{字体命令} + \keyval{headfont}{字体命令} 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{notefont}{字体命令} + \keyval{notefont}{字体命令} 定理题注部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{bodyfont}{字体命令} + \keyval{bodyfont}{字体命令} 定理内容部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{headpunct}{代码} + \keyval{headpunct}{代码} 紧随定理标题末尾的标记代码,位于定理第一段内容的间距 \option{postheadspace} 之前,可以是字符或插入换行符 \cs*{newline} 等命令。 - \keyval-{headindent}{刚性长度} + \keyval{headindent}{刚性长度} 定理标题的缩进。默认无缩进,可用 \cs*{parindent} 命令设置为段落缩进。 - \keyval-{postheadspace}{刚性长度} + \keyval{postheadspace}{刚性长度} 定理标题后与定理第一段内容的间距。 - \keyval-{spaceabove}{弹性长度} + \keyval{spaceabove}{弹性长度} 定理环境前的间距,使用 \pkg*{tcolorbox} 的盒子环境包装后被覆盖。 - \keyval-{spacebelow}{弹性长度} + \keyval{spacebelow}{弹性长度} 定理环境后的间距,使用 \pkg*{tcolorbox} 的盒子环境包装后被覆盖。 \kvsplit-{notebraces}{\marg{左括号}\marg{右括号}} 设置定理题注两边的括号,两个必选参数分别代表左括号和右括号。 - \keyval-{headformat}{标题排列} + \keyval{headformat}{标题排列} 定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中命令 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。 \end{options} @@ -696,8 +706,8 @@ \label{subsec:page margins} 模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。 \begin{options}\noitemsep - \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*{0pt} - \keyval-{footruleskip}{页脚线间距}\Default*{3.5pt} + \keyval{headruleskip}{页眉线间距}\Module{geoset}\Default*{0pt} + \keyval{footruleskip}{页脚线间距}\Default*{3.5pt} \kvsplit*{hdivide}{左边距,页面文本宽度,右边距}\default{} \kvsplit*{hmargin}{左边距,右边距}\default{} \keyval*-{textheight}{页面文本高度}\default{} @@ -717,11 +727,11 @@ \label{subsec:header and footer} 模块 \module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。在 \cls*{book} 模式时使用标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。重新设置标题标记选项时标记大小写选项 \option{uppercase} 会失效。 \begin{options} - \keyval-{chap-mark}{标题标记}\Module{hdrset} + \keyval{chap-mark}{标题标记}\Module{hdrset} 标题标记命令 \cs*{chaptermark} 的内容,包括了标签选项 \option{chap-label} 的内容。 - \keyval-{sec-mark}{标题标记} + \keyval{sec-mark}{标题标记} 标题标记命令 \cs*{sectionmark} 的内容,包括了标签选项 \option{sec-label} 的内容。 - \keyval-{subsec-mark}{标题标记} + \keyval{subsec-mark}{标题标记} 标题标记命令 \cs*{subsectionmark} 的内容,包括了标签选项 \option{subsec-label} 的内容。 \kvsplit-{chap-label}{\oarg{数字输出命令}\marg{距离命令}}\Default{\cs*{hspace}\Marg{1em}} 标题标记命令 \cs*{chaptermark} 内容的标签(标题有编号时)。比标题标记选项更常用,可选参数是对应于章节编号计数器的输出命令,必选参数是编号与标题之间的距离命令: @@ -736,15 +746,15 @@ 标题标记命令 \cs*{sectionmark} 内容的标签,用法与 \option{chap-label} 类似。 \kvsplit-{subsec-label}{\oarg{数字输出命令}\marg{距离命令}}\Default{\cs*{hspace}\Marg{0.5em}} 标题标记命令内容 \cs*{subsectionmark} 的标签,用法与 \option{chap-label} 类似。 - \keyval-{headrule}{横线命令} + \keyval{headrule}{横线命令} 绘制页眉横线的选项,可以使用 \cs*{hrule} 或下述 \cs{markrule} 等画线命令来绘制横线。 - \keyval-{footrule}{横线命令} + \keyval{footrule}{横线命令} 绘制页脚横线的选项,可以使用 \cs*{hrule} 或下述 \cs{markrule} 等画线命令来绘制横线。 - \keyval-{footnoterule}{横线命令} + \keyval{footnoterule}{横线命令} 绘制脚注横线的选项,可以使用 \cs*{hrule} 或下述 \cs{markrule} 等画线命令来绘制横线。 - \keyval-{headrulewd}{刚性长度}\Default{0.5pt} + \keyval{headrulewd}{刚性长度}\Default{0.5pt} 页眉横线默认的粗细。 - \keyval-{footnoterulewd}{刚性长度}\Default{0.5pt} + \keyval{footnoterulewd}{刚性长度}\Default{0.5pt} 脚注横线默认的粗细。 \end{options} @@ -776,16 +786,16 @@ 模块 \module*{hdrset} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号、对齐方式和缩进距离等,以及脚注内容的首行缩进、行距和字体等。基本思想是默认脚注和自定义编号脚注标记的格式分离,两种类型脚注各自正文和内容的标记又共享格式,默认脚注中正文和内容标记的编号类型分离。 \begin{options} \keychoice{footnotetype}{hang,default,flush,bottom}\Module{hdrset}\Default{hang} - 脚注的类型。悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型。在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用: + 脚注的类型。悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用: \begin{ctexexam} \ebhdrset{footnotetype = default,footnotetype = bottom} \ebhdrset{footnotetype = {hang,bottom}} \end{ctexexam} - \keyval-{fnindent}{刚性长度}\Default{0.75em} + \keyval{fnindent}{刚性长度}\Default{0.75em} 每个脚注首段的首行缩进(选项 \option*{hang} 为整体缩进),等于长度 \cs{footindent} 的值。 - \keyval-{fnparskip}{弹性长度}\Default{0ex} + \keyval{fnparskip}{弹性长度}\Default{0ex} 不同脚注的段落间距,等于长度 \cs{footparskip} 的值。 - \keyval-{fnparindent}{刚性长度}\Default{2em} + \keyval{fnparindent}{刚性长度}\Default{2em} 每个脚注第二段及之后段落的首行缩进,等于长度 \cs{footparindent} 的值。 \keychoice{fntext-pos}{normal,super}\Default{super} 设置脚注内容标记的位置,正常文本或是上标形式。 @@ -822,7 +832,7 @@ \keychoice{fntext-vmove}{fixed length,match}\Default{0pt} 脚注内容标记的垂直偏移。可以设为刚性长度,或用 \code{match} 匹配 \option*{spvmove} 全局的值。 \keychoice{fnmate-form}{format code,match} - 默认脚注标记的格式,选项 \code{match} 可以匹配 \option*{spcmd} 全局的值。一般配合 \keyis-{fnmate-num}{plain} 原生编号形式使用,例如用 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈: + 默认脚注标记的格式,选项 \code{match} 可以匹配 \option*{spcmd} 全局的值。一般配合 \keyis{fnmate-num}{plain} 原生编号形式使用,例如用 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈: \begin{ctexexam} \usepackage{circledsteps} \ebhdrset @@ -860,7 +870,7 @@ \end{commands} \keychoice{fnboth-form}{format code,match} 同时设定默认脚注标记 \option{fnmate-form} 和自定义脚注标记 \option{fncust-form} 的格式。两种脚注标记匹配上标格式 \option*{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。标记格式选项含有字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注标记。 - \keyval-{fnpara-form}{格式代码} + \keyval{fnpara-form}{格式代码} 脚注内容的格式,在此设置字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注内容。 \kvsplit{fntext-code}{前代码,后代码} 可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码。也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,一般用于在脚注内容标记与脚注首行间插入一点距离,或与脚注正文标记的格式稍有不同。 @@ -877,17 +887,17 @@ \label{subsec:catalog style} 模块 \module*{tocset} 将使用 \pkg*{titletoc} 宏包处理目录样式。模块或扩展包括了 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 二级路径,而使用 \module*{list} 路径可以统一设置图片、表格和代码目录的样式。选项前带有 \ding{73} 符号表示支持所有相应\textbf{标题级别}的路径,其它选项则处于 \module*{tocset} 路径下。目前支持标准的论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。 \begin{options} - \keyval-{tocformat}{条目格式}\dtag\smodule{tocset}% + \keyval{tocformat}{条目格式}\dtag\smodule{tocset}% 目录中各级别条目的格式。可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。 - \keyval-{tocformat+}{条目格式}\dtag + \keyval{tocformat+}{条目格式}\dtag 与 \option{tocformat} 用法一样,只是在已有的格式命令后附加代码。 - \keyval-{tocindent}{刚性长度}\dtag + \keyval{tocindent}{刚性长度}\dtag 各级别目录中的标题左边缩进距离,通常标题级别越低缩进越大。 - \keyval-{tocrule}{引导线命令}\dtag + \keyval{tocrule}{引导线命令}\dtag 引导线选项 \option{tocrule} 中一般可以使用基于 \cs*{xleaders} 命令的 \cs{tocrule} 绘制引导线。 - \keyval-{tocafter}{距离命令}\dtag\Default{\cs*{hspace}\Marg{1em}} + \keyval{tocafter}{距离命令}\dtag\Default{\cs*{hspace}\Marg{1em}} 在各级别目录中标签与标题间的代码,默认为插入 \code{1em} 横向距离。 - \keyval-{tocline}{条目定义}\dtag + \keyval{tocline}{条目定义}\dtag 这个选项扩展了图片、表格或代码题注在目录文件中的定义。选项中参数 \code{\#1} 代表相应题注编号 \cs*{the}\meta{计数器} 的值,参数 \code{\#2} 代表相应题注内容。 \begin{ctexexam}[labelref = exam:list command usage] \ctexset @@ -922,19 +932,19 @@ \begin{options} \keybool{hang}\Default{true} 悬挂缩进选项 \option{hang} 使目录标题为悬挂缩进形式。缩进距离为标签及其与标题间距的长度,但此时标题编号会失去超链接。这个选项对所有标题级别有效。 - \keyval-{lolskip}{弹性长度}\Default{10pt} + \keyval{lolskip}{弹性长度}\Default{10pt} 代码目录中每章代码标题的额外距离。与 C\TeX 的表格和图片目录中每章间的标题距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。 - \keyval-{between}{代码钩子} + \keyval{between}{代码钩子} 目录标题与内容间的钩子,一般插入负的垂直距离代码用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。 \keybool{dotalign}\Default{true} 引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间距,否则会与页码相连。 - \keyval-{pagenumwd}{刚性长度}\Default{1.55em} + \keyval{pagenumwd}{刚性长度}\Default{1.55em} 目录条目页码的宽度。开启 \option{dotalign} 选项时宽度越大引导线与页码的距离就越大。 - \keyval-{tocafter-every}{距离命令}\Default{\cs*{hspace}\Marg{1em}} + \keyval{tocafter-every}{距离命令}\Default{\cs*{hspace}\Marg{1em}} 统一设置所有级别在目录中标签与标题间的代码。 - \keyval-{tocindent-every}{刚性长度} + \keyval{tocindent-every}{刚性长度} 统一设置所有级别的目录标题左边缩进。 - \keyval-{tocrule-every}{引导线命令} + \keyval{tocrule-every}{引导线命令} 统一设置所有级别的目录引导线样式。 \end{options} @@ -1040,8 +1050,8 @@ \end{environments} \begin{options}\noitemsep - \keyval-{lstlistlistingname}{代码目录标题名}\default{} - \keyval-{lstlistingname}{代码题注标题名} + \keyval{lstlistlistingname}{代码目录标题名}\default{} + \keyval{lstlistingname}{代码题注标题名} 代码目录名与代码环境题注名选项 \option*{lstlistlistingname} 和 \option*{lstlistingname} 用法与 C\TeX 使用手册标题汉化一节类似,可以看作对这节的扩展。 \end{options} @@ -1190,21 +1200,21 @@ \command{seteqcomp}[\marg{键值列表1}] 对照环境的 \meta{键值列表1} 可以使用 \cs{seteqcomp} 全局设置,它的选项如下: \begin{options} - \keyval-{width}{符号宽度}\Default{10pt} + \keyval{width}{符号宽度}\Default{10pt} 设置适当的符号宽度可以防止文字重叠和边界溢出等问题。 - \keyval-{delim}{引导符}\Default{——} + \keyval{delim}{引导符}\Default{——} 全局的符号对照引导符。\cs{symb} 局部的 \meta{引导符} 和对齐方式是基于这个符号的宽度。 - \keyval-{space}{符号间隙}\Default{0.25em} + \keyval{space}{符号间隙}\Default{0.25em} 符号间隙为引导符两侧与符号和说明文字间的距离。 \keychoice{item-align}{l,c,r}\Default{r} 符号的对齐方式,分为左 \code{l}、中 \code{c} 和右 \code{r} 三种对齐方式。 \keychoice{delim-align}{l,c,r}\Default{c} 引导符的对齐方式,分为左 \code{l}、中 \code{c} 和右 \code{r} 三种对齐方式。 - \keyval-{enumitem}{键值列表2} + \keyval{enumitem}{键值列表2} 可以使用选项 \option{enumitem} 或命令 \cs{seteqcomplist} 调整对照列表的水平和垂直间距。 - \keyval-{intro}{首行文字} + \keyval{intro}{首行文字} 符号对照的说明文字。应当为简短的几个字,只显示在第一行,其后为悬挂缩进的对照列表。 - \keyval-{font}{符号字体} + \keyval{font}{符号字体} 符号的字体。数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。 \keychoice{mode}{math,text}\Default{math} 符号字体模式,可以为数学字体或者文本字体。 diff --git a/macros/latex/contrib/mathtools/README.md b/macros/latex/contrib/mathtools/README.md index 1cad9aafcf..ad2eb329cc 100644 --- a/macros/latex/contrib/mathtools/README.md +++ b/macros/latex/contrib/mathtools/README.md @@ -50,7 +50,7 @@ probably be an integral part of LaTeX3. Copyright (C) 2002-2011 Morten Hoegholm Copyright (C) 2012-2019 Lars Madsen -Copyright (C) 2020 Lars Madsen, The LaTeX3 Project +Copyright (C) 2020- Lars Madsen, The LaTeX3 Project All rights reserved. diff --git a/macros/latex/contrib/mathtools/empheq.dtx b/macros/latex/contrib/mathtools/empheq.dtx index 7f4b76b8ae..c0ecdec027 100644 --- a/macros/latex/contrib/mathtools/empheq.dtx +++ b/macros/latex/contrib/mathtools/empheq.dtx @@ -438,8 +438,8 @@ and the derived files % \subsection{Using the \env{empheq} environment} % % The package defines a single environment -% \SpecialEnvIndex{empheq}\env{empheq} and the usage is kind of straight -% forward: +% \SpecialEnvIndex{empheq}\env{empheq} and the usage is kind of +% straightforward: % \begin{codesyntax} % |\begin{empheq}|\oarg{markup instructions}\marg{\AmS{} env_name}\\ % \mbox{}\quad\meta{contents of \AmS{} environment}\\ @@ -462,7 +462,7 @@ and the derived files % E&=mc^2 + \int_a^a x\, dx % \end{empheq} % Maybe not the most impressive example, but as you can see the -% contents of the environment is exactly the same as for the regular +% contents of the environment are exactly the same as for the regular % \env{align*} evironment from \pkg{amsmath}. The rest of the \AmS{} % environments are chosen the same way by typing the name as the % mandatory argument of \env{empheq} with the exception of the @@ -572,7 +572,7 @@ and the derived files % \end{codesyntax} % The key \key{box} specifies the kind of box you would like to put % around the display. It can be any kind of box, as long as the -% contents of the box is situated on the baseline like in a +% contents of the box are situated on the baseline like in a % \fbox{\cs{fbox}}. % \begin{verbatim} % \begin{empheq}[box=\fbox]{align} @@ -614,7 +614,7 @@ and the derived files % this manual features centered math displays.} you may want the % math display and not the outer box to align at the left margin (or % rather: the indentation). If you make sure the contents of the -% outer box is centered horizontally inside the box, \key{marginbox} +% outer box are centered horizontally inside the box, \key{marginbox} % will align it properly. You shouldn't set both \key{box} and % \key{marginbox} at the same time, as this is surely not what you % want and the package will silently use the last one in the list. @@ -762,7 +762,7 @@ and the derived files % versions prior to and including~0.7e. If you have documents produced % with versions prior to~0.7e, then you have to load the package % \pkg{empheq07} instead. \pkg{empheq07} now exists as a separate package -% package with its own documentation, but I strongly recommend switching +% with its own documentation, but I strongly recommend switching % to the new version because it is so much better. % % \subsection{Package options} @@ -802,7 +802,7 @@ and the derived files % \opt{ntheorem} option. In order for this to work properly, an % \pkg{amsmath} bug\footnote{See the \LaTeX{} Bugs Database % \url{http://www.latex-project.org/cgi-bin/ltxbugs2html} under -% \AmS\LaTeX{} problem report 3624.} is fixed. For more information +% \AmS-\LaTeX{} problem report 3624.} is fixed. For more information % on this option see \S \vref{sec:ntheorem-support}. % % \subsubsection{Using \env{multline}} @@ -930,14 +930,14 @@ and the derived files % for the pseudo environment |\[ ... \]| (it's not really an % environment), \footnote{With the option \opt{oldmultline} the % \env{multline} and \env{multline*} environments aren't supported -% either because their syntax in \pkg{empheq} then differ from their +% either because their syntax in \pkg{empheq} then differs from their % syntax in \pkg{amsmath}.} because a)~you don't really need markup % instructions for a one line display, and b)~would you really like % a syntax like % \begin{verbatim} % \[[box=\fbox] a=b \] % \end{verbatim} -% where its difficult to see whether or not there is a typo? +% where it's difficult to see whether or not there is a typo? % Choosing \opt{overload} is meant for people who don't want to % change their entire document into \pkg{empheq} syntax. I have no % problems with that; just be careful when you fiddle with @@ -1089,7 +1089,7 @@ and the derived files % packages where \pkg{empheq} has to provide workarounds and they % can be divided into two categories. % \begin{description} -% \item[Compatibility] Some packages affect \LaTeX' labelling +% \item[Compatibility] Some packages affect \LaTeX's labelling % mechanism and since \pkg{empheq} internally has to turn off % labels and related code temporarily, hooks must be provided for % these packages. Examples of such packages are \pkg{hyperref} and @@ -1184,7 +1184,7 @@ and the derived files % be lost. In the future \pkg{ntheorem} should be able to test for % this and add \verb|\usetagform{default}| automatically. % -% Users who use \verb|\usetagform| to get another tag design, should +% Users who use \verb|\usetagform| to get another tag design should % make sure to postpone this configuration until \emph{after} loading % \pkg{ntheorem}. % @@ -1270,7 +1270,7 @@ and the derived files % % The good news is that this is where \pkg{empheq} sets in. % Basically all you need to do is to use the \env{empheq} -% environment to type set your equations inside the theorem +% environment to typeset your equations inside the theorem % environments: % \begin{verbatim} % \begin{Theorem} @@ -1346,7 +1346,7 @@ and the derived files % sub-formula inside the \cs{left}-\cs{right} pair is to be % vertically centered and given its height $h_1$ and its depth $h_2$ % we want to produce a delimiter with total height $h$, where $h = -% 2 \max(h_1,h_2)$. \TeX' rules on this is that the minimum +% 2 \max(h_1,h_2)$. \TeX's rules on this are that the minimum % delimiter size $h_{\min}$ must meet the requirements % \[ % h_{\min}\geq h \frac{f}{1000} \quad\land \quad h_{\min}\geq h-\delta @@ -1437,7 +1437,7 @@ and the derived files % % \subsection{About \texorpdfstring{$\cs{eqref}$}{\textbackslash eqref}} % -% Internally \env{empheq} separate the displayed math from +% Internally \env{empheq} separates the displayed math from % the corresponding equation numbers such that we can add special % delimiters or boxes. This is done by nullifying (or rather % conveniently redefining) an internal command called @@ -1709,7 +1709,7 @@ and the derived files % \bibitem{fancybox} % Timothy Van Zandt, % \emph{The \pkg{fancybox} package} Version 1.3, -% 2000/09/19 +% 2000/09/19. % (Available from CTAN as file \texttt{fancybox.sty}.) % % \bibitem{Raht03} @@ -1728,19 +1728,19 @@ and the derived files % \changes{v1.06}{2004/03/13}{Added \pkg{calc} to the \refname} % \bibitem{Thorup:calc:1998} % Kresten~Krab Thorup, Frank Jensen, and Chris Rowley. -% \emph{The {\pkg{calc}} package}, Version 4.1b, 1998/07/07, +% \emph{The {\pkg{calc}} package}, Version 4.1b, 1998/07/07. % (Available from CTAN as file \texttt{calc.dtx}.) % % \bibitem{ntheorem} % Wolfgang May and Andreas Schlechte, % \emph{The \pkg{ntheorem} package} Version 1.203, -% 2002/01/07, +% 2002/01/07. % (Available from CTAN as file \texttt{ntheorem.dtx}.) % % \changes{v2.10}{2004/07/26}{Added \pkg{showkeys} to the \refname} % \bibitem{Carlisle:showkeys:1997} % David Carlisle. \emph{The {\pkg{showkeys}} package}, v3.12, -% 1997/06/12, (Available from CTAN as file \texttt{showkeys.dtx}.) +% 1997/06/12. (Available from CTAN as file \texttt{showkeys.dtx}.) % % \end{thebibliography} % diff --git a/macros/latex/contrib/mathtools/empheq.ins b/macros/latex/contrib/mathtools/empheq.ins index 632545df72..265efeb2bb 100644 --- a/macros/latex/contrib/mathtools/empheq.ins +++ b/macros/latex/contrib/mathtools/empheq.ins @@ -33,7 +33,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: empheq 2017/03/31 v2.15 empheq} +\Msg{* Package: empheq 2020/03/24 v2.16 empheq} \Msg{************************************************************************} \keepsilent diff --git a/macros/latex/contrib/mathtools/empheq.pdf b/macros/latex/contrib/mathtools/empheq.pdf index bd5ffddff8..234fbb975c 100644 Binary files a/macros/latex/contrib/mathtools/empheq.pdf and b/macros/latex/contrib/mathtools/empheq.pdf differ diff --git a/macros/latex/contrib/mathtools/mathtools.dtx b/macros/latex/contrib/mathtools/mathtools.dtx index b065615eb0..15cf76b323 100644 --- a/macros/latex/contrib/mathtools/mathtools.dtx +++ b/macros/latex/contrib/mathtools/mathtools.dtx @@ -2,7 +2,7 @@ % % Copyright (C) 2004-2011 by Morten Hoegholm % Copyright (C) 2012-2019 by Lars Madsen -% Copyright (C) 2020 by Lars Madsen, The LaTeX3 team +% Copyright (C) 2020- by Lars Madsen, The LaTeX3 team % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -133,7 +133,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{mathtools.drv}% - [2021/04/12 v1.27 mathematical typesetting tools] + [2022/02/02 v1.28 mathematical typesetting tools] \documentclass{ltxdoc} \IfFileExists{fourier.sty}{\usepackage{fourier}}{} @@ -239,6 +239,7 @@ and the derived files } + \expandafter\def\expandafter\MakePrivateLetters\expandafter{% \MakePrivateLetters \catcode`\_=11\relax } @@ -294,6 +295,16 @@ and the derived files \def\theindex{\MTtheindex\MakePrivateLetters} +\NewDocumentCommand\Framebox{ o O{c} m }{% + \IfNoValueTF{#1}{% + \framebox{\footnotesize\strut #3}% + }{% + \framebox[#1][#2]{\footnotesize\strut #3}% + }% +} + + + %\usepackage[draft]{fixme} %\fxsetup{ % multiuser, @@ -322,7 +333,7 @@ colorlinks, % % \GetFileInfo{mathtools.drv} % -% \CheckSum{3529} +% \CheckSum{3581} % % \title{The \pkg{mathtools} package\thanks{This file has version number % \fileversion, last revised \filedate.}} @@ -335,7 +346,7 @@ colorlinks, % \begin{abstract} % \noindent The \pkg{mathtools} package is an extension package to % \pkg{amsmath}. There are two things on \pkg{mathtools}' agenda: -% (1)~correct various bugs/defeciencies in \pkg{amsmath} until +% (1)~correct various bugs/deficiencies in \pkg{amsmath} until % these are fixed by the \AmS{} and (2)~provide useful tools % for mathematical typesetting, be it a small macro for % typesetting a prescript or an underbracket, or entirely new @@ -400,7 +411,7 @@ colorlinks, % The option \opt{fixamsmath} (default) fixes two bugs in % \pkg{amsmath}.\footnote{See the online \LaTeX{} bugs database % \url{http://www.latex-project.org/cgi-bin/ltxbugs2html} under -% \AmS\LaTeX{} problem reports 3591 and 3614.} Should you for some +% \AmS-\LaTeX{} problem reports 3591 and 3614.} Should you for some % reason not want to fix these bugs then just add the option % \opt{donotfixamsmathbugs} (if you can do it without typos). The % reason for this extremely long name is that I really don't see why @@ -553,14 +564,14 @@ colorlinks, % \endgroup % Notice how the limit of the right summation sign is typeset in a % more compact style than the left. It is because \TeX{} sets the -% limits of operators in a \emph{cramped} style. For each of \TeX' +% limits of operators in a \emph{cramped} style. For each of \TeX's % four math styles (\cs{displaystyle}, \cs{textstyle}, % \cs{scriptstyle}, and \cs{scriptscriptstyle}), there also exists a % cramped style that doesn't raise exponents as much. Besides in the % limits of operators, \TeX{} also automatically uses these cramped % styles in radicals such as \cs{sqrt} and in the denominators of % fractions, but unfortunately there are no primitive commands that -% allows you to detect crampedness or switch to it. +% allow you to detect crampedness or switch to it. % % \pkg{mathtools} offers the command \cs{cramped} which forces a % cramped style in normal un-cramped math. Additionally you can @@ -594,7 +605,7 @@ colorlinks, % \end{quote} % Typesetting on a grid is generally considered quite desirable, but % as the second line of the example shows, the exponents of $2$ -% causes the line to be too tall for the normal value of +% cause the line to be too tall for the normal value of % \cs{baselineskip}, so \TeX{} inserts a \cs{lineskip} (normal value % is \the\lineskip). In order to circumvent the problem, we can % force a cramped style so that the exponents aren't raised as much: @@ -785,7 +796,7 @@ colorlinks, % \label{sec:swapping} % % One feature that the plain old \env{equation} environment has that -% the \AmS\ environments does not (because of technical reasons), is +% the \AmS\ environments do not (because of technical reasons) is % the feature of using less space above the equation if the situation % presents itself. The \AmS\ environments cannot do this, but one can % manually, using @@ -822,7 +833,7 @@ colorlinks, % % In this section various tools for altering the appearance of tags % are shown. All of the tools here can be used at any point in the -% document but they should probably be affect the whole document, so +% document but they should probably affect the whole document, so % the preamble is the best place to issue them. % % \subsubsection{The appearance of tags} @@ -896,6 +907,13 @@ colorlinks, % \SpecialKeyIndex{showmanualtags}$\key{showmanualtags}=\texttt{true}\vert\texttt{false}$\\ % \SpecialUsageIndex{\refeq}\cs{refeq}\marg{label} % \end{codesyntax} +% First of, one should always use \cs{eqref} when referring to +% equation numbers. When \opt{showonlyrefs} is true, we monitor +% \cs{eqref}\marg{label}, and those used will get an equation number, +% whereas those not used will not. Note: We do \emph{not} monitor the +% normal \cs{ref} command! See the follow paragraph for situations +% for what to do when \cs{eqref} cannot be used to refer to the equation. +% % An equation where the tag is produced with a manual \cs{tag*} % shouldn't be referenced with the normal \cs{eqref} because that % would format it according to the current tag format. Using just @@ -994,8 +1012,8 @@ colorlinks, % \cs{ref}. % % \medskip\noindent\textbf{BUG 1:} Unfortunately the use of the -% \key{showonlyref} introduce a bug within amsmath's typesetting -% of formula versus equation number. This bug manifest itself by +% \key{showonlyref} introduces a bug within amsmath's typesetting +% of formula versus equation number. This bug manifests itself by % allowing formulas to be typeset close to or over the equation % number. Currently no general fix is known, other than making sure % that one's formulas are not long enough to touch the equation @@ -1007,7 +1025,7 @@ colorlinks, % number is recorded such that the formula or the equation number can % be moved (if necessary) in the typesetting part. When % \key{showonlyref} is enabled, the width of the equation number -% depend on whether or not this number is referred~to. To determine +% depends on whether or not this number is referred~to. To determine % this, we need to know the current label. But the current label is % \emph{not} known in the measuring phase. Thus the measured width is % always zero (because no label equals not referred to) and therefore @@ -1019,7 +1037,7 @@ colorlinks, % \pkg{ntheorem} option \key{thmmarks} is active. The shown equation % numbers may come out wrong (seems to be multiplied by 2). Or the end % marker may be placed in the wrong place if a proof ends with a -% displayed formula, and that formula is not refered to. +% displayed formula, and that formula is not referred to. % % There are two possible solutions to this both involving \pkg{empheq}. % The easiest fix is to add the following line @@ -1029,7 +1047,7 @@ colorlinks, % before loading \pkg{ntheorem}. But the \texttt{overload} option of % course disables things like \cs{intertext} and \cs{shotintertext}. % -% The other thing to try is to use drop the \texttt{overload} option +% The other thing to try is to drop the \texttt{overload} option % and use \env{empheq} on the very last expression, as in % \begin{verbatim} % \begin{empheq}{align} @@ -1125,10 +1143,22 @@ colorlinks, % \cs{xLeftrightarrow} we added a space to the argument(s), making % the arrow slightly longer and moving the argument away from the % large arrow head. -% -% -% % +% \begin{codesyntax} +% \SpecialUsageIndex{\xlongrightarrow} +% \cs{xlongrightarrow}\oarg{sub}\marg{sup}\texttt{~~~~} +% \SpecialUsageIndex{\xlongleftarrow} +% \cs{xlongleftarrow}\oarg{sub}\marg{sup}\texttt{~~~~} +% \end{codesyntax} +% \FeatureRequest{rbrito {\footnotesize (issue \#12)}}{added 2022}% +% Similar to \cs{xright/leftarrow} but based on the \emph{long} +% versions. For short arguments it stays the same length as the +% \cs{long...} base arrow. +% \begin{align*} +% A & \longrightarrow B & A & \longleftarrow B \\ +% A & \xlongrightarrow[b]{a} B & A & \xlongleftarrow[b]{a} B \\ +% A & \xlongrightarrow[below]{above} B & A & \xlongleftarrow[below]{above} B \\ +% \end{align*} % % \subsubsection{Braces and brackets} % @@ -1205,13 +1235,13 @@ colorlinks, % As \cs{overbrace} has the exact same problems, there are good % reasons for \pkg{mathtools} to make redefinitions of % \cs{underbrace} and \cs{overbrace}. These new versions work -% equally well in all font sizes and fixes the spacing issues and +% equally well in all font sizes and fix the spacing issues and % apart from working with the default Computer Modern fonts, they % also work with the packages \pkg{mathpazo}, \pkg{pamath}, % \pkg{fourier}, \pkg{eulervm}, \pkg{cmbright}, and \pkg{mathptmx}. % If you use the \pkg{ccfonts} to get the full Concrete fonts, the % original version saved under the names \cs{LaTeXunderbrace} and -% \cs{LaTeXoverbrace} are better, due to of the special design of +% \cs{LaTeXoverbrace} is better, due to the special design of % the Concrete extensible braces. In that case you should probably % just add the lines % \begin{verbatim} @@ -1270,7 +1300,7 @@ colorlinks, % type valid in the usual \env{array} environment. % % While we are at it, we also provide fenced versions of the -% \env{smallmatrix} environment, To keep up with the naming of the +% \env{smallmatrix} environment. To keep up with the naming of the % large matrix environments, we provide both a starred and a % non-starred version. Since \env{smallmatrix} is defined in a % different manner than the \env{matrix} environment, the option to @@ -1322,9 +1352,9 @@ colorlinks, % the default is \cs{,}. % % As an extra trick the fences will behave as open and closing fences -% in constract to their auto-scaling nature.\footnote{\cs{left} and +% despite their auto-scaling nature.\footnote{\cs{left} and % \cs{right} creates an \emph{inner} construction, and not as one -% might expect something where a preceeding \cs{sin} sees an opening +% might expect something where a preceding \cs{sin} sees an opening % fence, thus the space before or after may be too large. Inside this % construction they behave.} % @@ -1358,19 +1388,21 @@ colorlinks, % right and preceded by a hard space of size \key{lastline-preskip}. % Both these hard spaces have a default value of \cs{multlinegap}. % Here we use a `t' in the first optional argument denoting a -% top-aligned building block (the default is `c'). +% top-aligned building block (the default is `c').\footnote{The helper macro +% \cs{Framebox}\marg{...} is equivalent to +% \cs{framebox}\marg{\cs{footnotesize}\cs{strut} ...}} % \begin{verbatim} % \[ % A = \begin{multlined}[t] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} B % \] % \end{verbatim} % \[ % A = \begin{multlined}[t] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} B % \] % Note also that \env{multlined} gives you access to an extended @@ -1379,25 +1411,25 @@ colorlinks, % \begin{verbatim} % \[ % \begin{multlined} -% \framebox[.65\columnwidth]{First line} \\ -% \framebox[.5\columnwidth]{Second line} \\ +% \Framebox[.65\columnwidth]{First line} \\ +% \Framebox[.5\columnwidth]{Second line} \\ % \shoveleft{L+E+F+T} \\ % \shoveright{R+I+G+H+T} \\ % \shoveleft[1cm]{L+E+F+T} \\ % \shoveright[\widthof{$R+I+G+H+T$}]{R+I+G+H+T} \\ -% \framebox[.65\columnwidth]{Last line} +% \Framebox[.65\columnwidth]{Last line} % \end{multlined} % \] % \end{verbatim} % \[ % \begin{multlined} -% \framebox[.65\columnwidth]{First line} \\ -% \framebox[.5\columnwidth]{Second line} \\ +% \Framebox[.65\columnwidth]{First line} \\ +% \Framebox[.5\columnwidth]{Second line} \\ % \shoveleft{L+E+F+T} \\ % \shoveright{R+I+G+H+T} \\ % \shoveleft[1cm]{L+E+F+T} \\ % \shoveright[\widthof{$R+I+G+H+T$}]{R+I+G+H+T} \\ -% \framebox[.65\columnwidth]{Last line} +% \Framebox[.65\columnwidth]{Last line} % \end{multlined} % \] % @@ -1406,15 +1438,15 @@ colorlinks, % \begin{verbatim} % \[ % \begin{multlined}[b][7cm] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} = B % \] % \end{verbatim} % \[ % \begin{multlined}[b][7cm] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} = B % \] % There can be two optional arguments (position and width) and @@ -1428,14 +1460,14 @@ colorlinks, % not work as expected. The implementation contains an `invisible' % line after the first \env{multline} row, inside an \env{array} this % line is no longer `invisible' because \env{array} sets -% \cs{baselineskip} to zero. Currently we have no general workaround +% \cs{baselineskip} to zero. We have no general workaround % for this. % % \medskip\noindent % \textbf{Bug 2:} % \CommentAdded{2015/11/12} % Due to the way \env{multlined} is implemented, certain -% constructions does not work inside \env{multlined}. We have added a +% constructions do not work inside \env{multlined}. We have added a % hook (\cs{MultlinedHook}) that can be added to. The default value % is a fix for \env{subarray} and \env{crampedsubarray} and thus for % \cs{substack} and \cs{crampedsubstack} (and a few others, thus add @@ -1484,7 +1516,7 @@ colorlinks, % \cs{end}\arg{cases*} % \end{codesyntax} % \FeatureRequest{Lars Madsen}{2004/07/01} -% Anyone who have tried to use an integral in the regular +% Anyone who has tried to use an integral in the regular % \env{cases} environment from \pkg{amsmath} will have noticed that % it is set as % \[ @@ -1552,16 +1584,19 @@ colorlinks, % \SpecialEnvIndex{\MoveEqLeft}\cs{MoveEqLeft}\oarg{number} % \end{codesyntax} % \ProvidedBy{Lars Madsen}{2008/06/05} In \cite{Swanson}, Ellen -% Swanson recommends that when ever one has a long displayed formula, +% Swanson recommends that whenever one has a long displayed formula, % spanning several lines, and it is unfeasible to align against a % relation within the first line, then all lines in the display % should be aligned at the left most edge of the first line, and all % subsequent lines should be indented by 2\,em (or if needed by a % smaller amount). That is we are talking about displays that end up -% looking like this +% looking like this\footnote{Maintainer (daleif)'s note: This is one +% of my most used constructions whenever I edit manuscripts. I'd +% rather use this than for example \env{multline} as I find it gives +% the text a more consistent look.} % \begin{align*} -% \MoveEqLeft \framebox[10cm][c]{Long first line}\\ -% & = \framebox[6cm][c]{ \hphantom{g} 2nd line}\\ +% \MoveEqLeft \Framebox[10cm][c]{Long first line}\\ +% & = \Framebox[6cm][c]{2nd line}\\ % & \leq \dots % \end{align*} % Traditionally one could do this by starting subsequent lines by @@ -1569,8 +1604,8 @@ colorlinks, % was made using \cs{MoveEqLeft}: % \begin{verbatim} % \begin{align*} -% \MoveEqLeft \framebox[10cm][c]{Long first line}\\ -% & = \framebox[6cm][c]{ \hphantom{g} 2nd line}\\ +% \MoveEqLeft \Framebox[10cm][c]{Long first line}\\ +% & = \Framebox[6cm][c]{2nd line}\\ % & \leq \dots % \end{align*} % \end{verbatim} @@ -1581,22 +1616,22 @@ colorlinks, % to accommodate the extra distance to the alignment point: % \begin{verbatim} % \begin{align*} -% \MoveEqLeft[3] \framebox[10cm][c]{Part 1}\\ -% = {} & \framebox[8cm][c]{2nd line}\\ -% & + \framebox[4cm][c]{ last part} +% \MoveEqLeft[3] \Framebox[10cm][c]{Part 1}\\ +% = {} & \Framebox[8cm][c]{2nd line}\\ +% & + \Framebox[4cm][c]{last part} % \end{align*} % \end{verbatim} % \begin{align*} -% \MoveEqLeft[3] \framebox[10cm][c]{Long first line}\\ -% = {} & \framebox[6cm][c]{ 2nd line}\\ -% & + \framebox[4cm][c]{ last part} +% \MoveEqLeft[3] \Framebox[10cm][c]{Long first line}\\ +% = {} & \Framebox[6cm][c]{2nd line}\\ +% & + \Framebox[4cm][c]{last part} % \end{align*} % % % \noindent\textbf{Caveat regarding \cs{MoveEqLeft}}: If the first % part of the equation starts with say \verb|[a]|, \cs{MoveEqLeft} may % attempt to eat it! You can prevent this by specifying the optional -% argument (remember the default is the same as \cs{MoveEqLeft[2]} or +% argument (remember the default is the same as \cs{MoveEqLeft[2]}) or % by using \cs{MoveEqLeft\{\}}. % % \subsubsection{Boxing a single line in an alignment} @@ -1634,8 +1669,8 @@ colorlinks, % & = g(x) % \end{align*} % One can have multiple boxes on each line, and the -% >>\texttt{\textnormal{\&}}\quad right hand side<< can even be -% missing. Here is an example of how the padding in the box can be changed +% ``\texttt{\textnormal{\&}}\quad right hand side'' can even be +% missing. Here is an example of how the padding in the box can be changed. % \begin{verbatim} % \begin{align*} % \setlength\fboxsep{1em} @@ -1648,7 +1683,7 @@ colorlinks, % \Aboxed{ f(x) &= 0 } & \Aboxed{ g(x) &= b} \\ % \Aboxed{ h(x) } & \Aboxed{ i(x) } % \end{align*} -% Note how the \cs{fboxsep} change only affect the box coming +% Note how the \cs{fboxsep} change only affects the box coming % immediately after it. % % \marginpar{\strut\\% @@ -1661,6 +1696,33 @@ colorlinks, % use of \texttt{\&}. Just add a set of braces around the construction % you want to hide. % +% \medskip\noindent\textbf{Tip:} At times users want a \cs{Aboxed} +% with a different type of box. To help we provide a \cs{Aboxed} builder: +% \begin{codesyntax} +% \SpecialUsageIndex{\MakeAboxedCommand}\cs{MakeAboxedCommand}\cs{Aboxedname}\cs{boxmacro} +% \end{codesyntax} +% where \cs{boxname} should be a macro taking a single argument. The +% normal \cs{Aboxed} is the same as +% \verb|\MakeAboxedCommand\Aboxed\fbox|. Thus you can do +% \newcommand\myboxA[1]{\fcolorbox{gray}{yellow}{#1}} +% \newcommand\myboxB[1]{{\fboxsep=5pt\fboxrule=2pt\fbox{#1}}} +% \MakeAboxedCommand\AboxedA\myboxA +% \MakeAboxedCommand\AboxedB\myboxB +% \begin{align*} +% \AboxedA{ f(x) &= x^2 } & \AboxedB{ f(x) &= x^2 } +% \end{align*} +% via +% \begin{verbatim} +% \newcommand\myboxA[1]{\fcolorbox{gray}{yellow}{#1}} +% \newcommand\myboxB[1]{{\fboxsep=5pt\fboxrule=2pt\fbox{#1}}} +% \MakeAboxedCommand\AboxedA\myboxA +% \MakeAboxedCommand\AboxedB\myboxB +% \begin{align*} +% \AboxedA{ f(x) &= x^2 } & \AboxedB{ f(x) &= x^2 } +% \end{align*} +% \end{verbatim} +% +% % \subsubsection{Adding arrows between lines in an alignment} % % This first macro is a bit misleading, it is only intended to be @@ -1713,7 +1775,7 @@ colorlinks, % % \subsubsection{Centered \texorpdfstring{\cs{vdots}}{\textbackslash vdots}} % -% If one want to mark a vertical continuation, there is +% If one wants to mark a vertical continuation, there is % the \verb?\vdots? command, but combine this with an alignment and % we get something rather suboptimal % \FeatureRequest{Bruno Le Floch \\(and many others)}{2011/01/25} @@ -1735,7 +1797,7 @@ colorlinks, % \SpecialKeyIndex{shortvdotsadjustabove}\makebox{$\key{shortvdotsadjustabove}=\meta{length}$}\\ % \SpecialKeyIndex{shortvdotsadjustbelow}\makebox{$\key{shortvdotsadjustbelow}=\meta{length}$} % \end{codesyntax} -% Two examples in one +% Two examples in one % \begin{verbatim} % \begin{align*} % a &= b \\ @@ -1754,7 +1816,7 @@ colorlinks, % & = d % \end{align*} % Thus \verb?\vdotswithin{=}? creates a box corresponding to -% \verb?{}={}? and typeset a >>$\vdots$<< centered inside it. When +% \verb?{}={}? and typesets a ``$\vdots$'' centered inside it. When % doing this as a normal line in an alignment leaves us with excessive % space which \verb?\shortvdotswithin{=}? takes care with for us. % @@ -1842,7 +1904,7 @@ colorlinks, % \cs{shortintertext} and \cs{intertext}. \tsxPosting{Tobias Weh % \\(referring to a suggestion by Chung-chieh Shan)}{2011/05/29} % It can be illustrated using the following example, an interested -% reader, can apply it with and without the original \cs{intertext} +% reader can apply it with and without the original \cs{intertext} % and \cs{shortintertext}. % \begin{verbatim} % % the original \intertext and \shortintertext @@ -1859,8 +1921,8 @@ colorlinks, % \myline % \end{verbatim} % -% We now fix this internaly for both \cs{intertext} and -% \cs{shortintertext}, plus we add the possibility to fine tune +% We now fix this internally for both \cs{intertext} and +% \cs{shortintertext}, plus we add the possibility to fine-tune % spacing around these constructions. The original versions can be % brought back using the \texttt{original-x} keys below. % \begin{codesyntax} @@ -1909,7 +1971,7 @@ colorlinks, % \abs{\frac{a}{b}} % \] % Here it won't give a nice result, so you have to manually put in -% either \cs{left}--\cs{right} pair or a \cs{bigl}--\cs{bigr} pair. +% either a \cs{left}--\cs{right} pair or a \cs{bigl}--\cs{bigr} pair. % Both methods mean that you have to delete your \cs{abs} command, % which may not sound like an ideal solution. % @@ -1959,10 +2021,10 @@ colorlinks, % \cs{DeclarePairedDelimiterX} extends the features of % \cs{DeclarePairedDelimiter} such that the user will get a macro % which is fenced off at either end, plus the capability to provide -% the \meta{body} for what ever the macro should do within these +% the \meta{body} for whatever the macro should do within these % fences. % -% Inside the \meta{body} part, the macro \cs{delimsize} refer to the +% Inside the \meta{body} part, the macro \cs{delimsize} refers to the % size of the outer fences. It can then be used inside \meta{body} to % scale any inner fences. % @@ -1990,16 +2052,16 @@ colorlinks, % {#1\,\delimsize\vert\,\mathopen{}#2\,\delimsize\vert\,\mathopen{}#3} % \end{verbatim} % \begin{itshape} -% Note the use of >>\verb|\mathopen{}|<< in the \meta{body} of +% Note the use of `\verb|\mathopen{}|' in the \meta{body} of % \cs{braket}, this is very important when a scalable delimiter is % being used and it does not present itself as a left or right % delimiter. You will see why it is needed if you use -% \verb|\braket{A}{-B}| in a version without +% \verb|\braket{A}{-B}{C}| in a version without % \verb|\mathopen{}|.\footnote{Basically, the problem is that % \cs{vert} is a `symbol', thus $\vert-B$ is interpreted -% \emph{subtraction}, not a symbol followed by negative $B$. When -% \cs{mathopen\{\}} is added, \TeX\ is told that an opening -% delimiter just occurred, and it will adjust the minus +% \emph{subtraction}, not a symbol followed by negative $B$ (aka a +% sign). When \cs{mathopen\{\}} is added, \TeX\ is told that an +% opening delimiter just occurred, and it will adjust the minus % accordingly.} % \end{itshape} % @@ -2041,8 +2103,8 @@ colorlinks, % is a feature of the \cs{left}\dots\cs{right} construction). % \fi % -% With the inner scaling, we can provide macros whos syntax closely -% follow the mathematical meaning. Fx for building sets, try +% With the inner scaling, we can provide macros whose syntax closely +% follows the mathematical meaning. Fx for building sets, try % this\footnote{The reason for using a separate \cs{SetSymbol} macro % has to do with complicated set definitions, where the condition % spans several lines. In this case \cs{Set} cannot be used. Thus it @@ -2082,7 +2144,7 @@ colorlinks, % \cs{mathchoice\{}\cs{:\}\{}\cs{:\}\{}\cs{,\}\{}\cs{,\}} instead of \cs{nonscript}\cs{:}.} % % Combining with \pkg{etoolbox} it becomes easy to make a function -% that automatically provide a marker for a blank argument: +% that automatically provides a marker for a blank argument: % \begin{verbatim} % \usepackage{etoolbox} % \DeclarePairedDelimiterX\norm[1]\lVert\rVert{ @@ -2101,7 +2163,7 @@ colorlinks, % \FeatureRequest{Barbara Beeton (on TSE)}{2013/10/07} % \cs{DeclarePairedDelimiterX} has an annoying caveat: it is very hard % to make a macro \verb|\lnorm{a}| that should result in $\lVert -% a\rVert_2$.\footnote{The added >>\texttt{\_2}<< is hard to get around +% a\rVert_2$.\footnote{The added `\texttt{\_2}' is hard to get around % the argument parsing.} % % As a consequence we provide @@ -2128,14 +2190,14 @@ colorlinks, % \end{verbatim} % Thus giving support for \verb|\Prob{A \given B}|. % -% \medskip\noindent\textbf{Note 1:} As the number of arguments increase +% \medskip\noindent\textbf{Note 1:} As the number of arguments increases % the \cs{DeclarePairedDelimiter...} macros become hard for users to % understand. A key-value interface would be better. This is planed % for a future release. In % \url{http://tex.stackexchange.com/a/136767/3929} there is a % suggested replacement for \cs{DeclarePairedDelimiter}, that greatly % reduces the number of macros and provides a key-val -% interface. However, the code use \pkg{xparse}, and if we want to use +% interface. However, the code uses \pkg{xparse}, and if we want to use % \pkg{xparse} for some of our macros, we might just as well rewrite % the entire \pkg{mathtools} package in \pkg{expl3}. Also it is not % obvious how to get \pkg{xparse} to support \verb|[3]| for the number @@ -2143,7 +2205,7 @@ colorlinks, % % \medskip\noindent\textbf{Note 2:} If you want to define your own % manual scaler macros, it is important that you besides \cs{foo} also -% defines \cs{fool} and \cs{foor}. When a scaler is specified, in say +% define \cs{fool} and \cs{foor}. When a scaler is specified, in say % \cs{abs[\cs{big}]}\marg{arg}, we actually use \cs{bigl} and % \cs{bigr}. % @@ -2155,7 +2217,7 @@ colorlinks, % auto scaled \cs{left} and \cs{right} fences behave as opening and % closing fences, i.e.\ $\sin(x)$ vs. $\sin\left(x\right)$ (the later % made via \verb|$\sin\left(x\right)$|), notice the gap between -% '$\sin$' and '('. In some special cases it may be useful to be +% `$\sin$' and `('. In some special cases it may be useful to be % able to tinker with the behavior. % \begin{codesyntax} % \SpecialUsageIndex{\reDeclarePairedDelimiterInnerWrapper} @@ -2176,7 +2238,7 @@ colorlinks, % \reDeclarePairedDelimiterInnerWrapper\abs{nostarnonscaled}{\mathinner{#1#2#3}} % \reDeclarePairedDelimiterInnerWrapper\abs{nostarscaled}{\mathinner{#1#2#3}} % \end{verbatim} -% The default values for the call backs corresponds to +% The default values for the call backs correspond to % \begin{verbatim} % star: \mathopen{}\mathclose\bgroup #1#2\aftergroup\egroup #3 % nostarnonscaled: \mathopen#1#2\mathclose#3 @@ -2205,7 +2267,7 @@ colorlinks, % construction. Currently, this can only be applied to macros made % using \cs{DeclarePairedDelimiter} and \emph{not} macros made using % \cs{DeclarePairedDelimiterX} or \cs{DeclarePairedDelimiterXPP} as -% the contents is typeset inside a group (to limit \cs{delimsize}) +% the contents are typeset inside a group (to limit \cs{delimsize}) % and thus hide any \verb|&| or \verb|\\| from \env{align} and % \env{align} breaks down. % @@ -2300,7 +2362,7 @@ colorlinks, % the equal sign, leading to an odd-looking output. The command % \cs{vcentcolon} is a shorthand for such a vertically centered % colon, and can be used as in |$a \vcentcolon= b$| and results in -% the desired output: $a \vcentcolon= b$. % for now +% the desired output: $a \vcentcolon= b$. % See also the \pkg{colonequals} package. % % Typing \cs{vcentcolon} every time is quite tedious, so one can use @@ -2341,11 +2403,11 @@ colorlinks, % \SpecialUsageIndex{\Colonsim}\cs{Colonsim}\\ % \SpecialUsageIndex{\dblcolon}\cs{dblcolon} % \end{codesyntax} -% The font packages \pkg{txfonts} and \pkg{pxfonts} provides various +% The font packages \pkg{txfonts} and \pkg{pxfonts} provide various % symbols that include a vertically centered colon but with tighter % spacing. For example, the combination |:=| exists as the symbol % \cs{coloneqq} which typesets as $\coloneqq$ instead of -% $\vcentcolon=$. The primary disadvantage of using these fonts are +% $\vcentcolon=$. The primary disadvantage of using these fonts is % the support packages' lack of support for \pkg{amsmath} (and thus % \pkg{mathtools}) and worse yet, the side-bearings are way too % tight; see~\cite{A-W:MG04} for examples. If you're not using these @@ -2375,11 +2437,11 @@ colorlinks, % \end{codesyntax} % % \noindent -% \textbf{Note:} that these symbols are constructed via +% \textbf{Note:} These symbols are constructed via % features from the \pkg{graphicx} package, and thus may not display % correctly in most DVI previewers. Also note that \cs{nuparrow} and % \cs{ndownarrow} are constructed via \cs{nrightarrow} and -% \cs{nleftarrrow} respectively, so these needs to be +% \cs{nleftarrrow} respectively, so these need to be % present. Usually this is done via \pkg{amssymb}, but some packages % may be incompatible with \pkg{amssymb} so the user will have to % load \pkg{amssymb} or a similar package, that provides @@ -2442,15 +2504,15 @@ colorlinks, % \par % \end{quote} % \noindent -% As of 2013, \cs(\cs) are robust, as is the italic corrected versions. +% As of 2013, \cs(\cs) are robust, as are the italic corrected versions. % % \medskip\noindent \textbf{Caveat:} Italic correction is a % treacherous area. For example any penalties will cancel the italic % correction inserted by % \verb|\(| (for an explanation see \cite{TBT}, section 4.3.3). We -% have changed Michaels original to accommodate one specific penalty +% have changed Michael's original to accommodate one specific penalty % construction: the \emph{tie}, i.e., -% >>\verb|text~\(|<< will work as expected (as~of July, 2014). +% `\verb|text~\(|' will work as expected (as~of July, 2014). % % \subsection{Left sub/superscripts} % @@ -2692,7 +2754,7 @@ colorlinks, % \medskip\noindent \textbf{Note:} If you try to nest \cs{splitfrac} % inside each other you may need to add \cs{mathstrut} to the first % argument of the nested fraction to get the spacing look even. It is -% not added by default as often a more cramped looked is desired: +% not added by default as often a more cramped look is desired: % \begin{verbatim} % \[ % \frac{ @@ -2748,9 +2810,9 @@ colorlinks, % \FeatureRequest{Frank Mittelbach}{2020} In typography we use % \emph{struts} to ensure specific line spacing. In text we have the % \cs{strut} and in math \cs{mathstrut}. Both have no width, but -% equals the height and depth of an »(« from the current text/math +% equal the height and depth of an »(« from the current text/math % font and size. In math we often need to make minute adjustments in -% macro definitiones etc. The \emph{extended} math strut +% macro definitions etc. The \emph{extended} math strut % \cs{xmathstrut} allows to \emph{increase} (decrease if negative) % the math strut in two ways. % @@ -2759,7 +2821,7 @@ colorlinks, % \verb|\xmathstrut{0.1}| % \end{center} % will give you a new strut where 10\% of the \emph{total height of -% the normal math stut} (\verb|\mathstrut=\xmathstrut{0}|) will be +% the normal math strut} (\verb|\mathstrut=\xmathstrut{0}|) will be % added to both \emph{the height} and \emph{the depth} of the % original strut (thus 20\% gets added in total). On the other hand % \begin{center} @@ -2809,6 +2871,7 @@ colorlinks, % \llap{\rlap{\rule{18mm}{0.1pt}}\quad}a \vfb{\mathstrut} \ \vfb{\xmathstrut{0}}\ % \vfb{\xmathstrut{0.5} } \ \vfb{\xmathstrut{-0.1} }\ \vfb{\xmathstrut[0.5]{0}} a % \] +% \newpage % \begin{verbatim} % \newcommand\vfb[1]{\begingroup\fboxsep=0pt\boxed{\,#1\,}\endgroup} % \[ @@ -2983,7 +3046,7 @@ colorlinks, % \begin{macrocode} %<*package> \ProvidesPackage{mathtools}% - [2021/04/12 v1.27 mathematical typesetting tools] + [2021/02/02 v1.28 mathematical typesetting tools] % \end{macrocode} % \changes{v1.10}{2011/02/12}{Might as well make sure that we need the % latest version of \texttt{mhsetup}} @@ -2996,14 +3059,17 @@ colorlinks, % We'd like to make \cs{(}\cs{)} and \cs{[}\cs{]} robust. This can % easily be done via the \pkg{fixltx2e} package, but auto loading that % package may cause problems for some. We make copies instead. +% Update 2021: We have removed robustifying \cs{(}\cs{)}\cs{[}\cs{]} +% as this is now in the \LaTeX\ kernel. We still use +% \verb|\EQ_MakeRobust| elsewhere though. % \begin{macro}{\EQ_MakeRobust} % \begin{macro}{\forced_EQ_MakeRobust} % \begin{macrocode} % borrowed from fixltx2e \def\EQ_MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% - \@latex@error{The control sequence `\string#1' is undefined!% - \MessageBreak There is nothing here to make robust}% + \@latex@error{The~control~sequence~`\string#1'~is~undefined!% + \MessageBreak There~is~nothing~here~to~make~robust}% \@eha }% {% @@ -3021,7 +3087,7 @@ colorlinks, \noexpand\protect\expandafter\noexpand \csname\expandafter\@gobble\string#1\space\endcsname}% }% - {\@latex@info{The control sequence `\string#1' is already robust}}% + {\@latex@info{The~control~sequence~`\string#1'~is~already~robust}}% }% } % \end{macrocode} @@ -3030,8 +3096,8 @@ colorlinks, % \begin{macrocode} \def\forced_EQ_MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% - \@latex@error{The control sequence `\string#1' is undefined!% - \MessageBreak There is nothing here to make robust}% + \@latex@error{The~control~sequence~`\string#1'~is~undefined!% + \MessageBreak There~is~nothing~here~to~make~robust}% \@eha }% {% @@ -3129,18 +3195,20 @@ colorlinks, } % \end{macrocode} % \end{macro} -% \changes{v1.13}{2013/02/11}{Make \cs{(}\cs{)} and \cs{[}\cs{]} -% robust} -% We start of with making \cs{(}\cs{)} and \cs{[}\cs{]} robust, -% unless the user explicitly asked us not to. -% \begin{macrocode} -\MH_if_boolean:nT {robustify}{ - \EQ_MakeRobust\( - \EQ_MakeRobust\) - \EQ_MakeRobust\[ - \EQ_MakeRobust\] -} -% \end{macrocode} +% ^^A \changes{v1.13}{2013/02/11}{Make \cs{(}\cs{)} and \cs{[}\cs{]} +% ^^A robust} +% ^^A We start of with making \cs{(}\cs{)} and \cs{[}\cs{]} robust, +% ^^A unless the user explicitly asked us not to. +% ^^A \changes{v1.28}{2021/12/31}{Removed robustifying \cs{(}\cs{)} and +% ^^A \cs{[}\cs{]} as this is now in the \LaTeX{} kernel.} +% ^^A % \begin{macrocode} +% ^^A \MH_if_boolean:nT {robustify}{ +% ^^A \EQ_MakeRobust\( +% ^^A \EQ_MakeRobust\) +% ^^A \EQ_MakeRobust\[ +% ^^A \EQ_MakeRobust\] +% ^^A } +% ^^A % \end{macrocode} % % % \section{Macros I got ideas for myself} @@ -3541,6 +3609,8 @@ colorlinks, % \changes{v1.24}{2020/03/13}{Added spaces to move the argument away % from the arrow head in \cs{xLeftarrow}, \cs{xRightarrow} and % \cs{xLeftrightarrow}. Suggested by FM} +% \changes{1.28}{2022/01/01}{Added \cs{xlongrightarrow} and +% \cs{xlongleftarrow} as suggested in Issue \#12} % \begin{macrocode} \providecommand*\xleftrightarrow[2][]{% \ext@arrow 3095\MT_leftrightarrow_fill:{#1}{#2}} @@ -3578,6 +3648,13 @@ colorlinks, \arrowfill@\leftharpoondown\relbar\relbar} \def\MT_leftharpoonup_fill:{% \arrowfill@\leftharpoonup\relbar\relbar} +% \end{macrocode} +% 2022: added \verb+_fill:+ macros based upon \cs{longrightarrow} and \cs{longleftarrow} +% \begin{macrocode} +\def\MT_longrightarrow_fill:{% + \arrowfill@\relbar\relbar\longrightarrow} +\def\MT_longleftarrow_fill:{% + \arrowfill@\longleftarrow\relbar\relbar} \providecommand*\xrightharpoondown[2][]{% \ext@arrow 0359\MT_rightharpoondown_fill:{#1}{#2}} \providecommand*\xrightharpoonup[2][]{% @@ -3599,6 +3676,14 @@ colorlinks, $\ext@arrow 3095\MT_leftharpoondown_fill:{#1}{\phantom{#2}}$}% \kern-\wd0 \lower.22ex\box0}} % \end{macrocode} +% 2022: added \verb+\xlong...+ macros based upon \cs{longrightarrow} +% and \cs{longleftarrow} +% \begin{macrocode} +\providecommand*\xlongrightarrow[2][]{% + \ext@arrow 0359\MT_longrightarrow_fill:{#1}{#2}} +\providecommand*\xlongleftarrow[2][]{% + \ext@arrow 3095\MT_longleftarrow_fill:{#1}{#2}} +% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} @@ -5349,12 +5434,55 @@ colorlinks, \def\@Aboxed#1\ENDDNE{% \ifnum0=`{}\fi \setbox \z@ \hbox{$\displaystyle#1{}\m@th$\kern\fboxsep \kern\fboxrule }% - \edef\@tempa {\kern \wd\z@ &\kern -\the\wd\z@ \fboxsep - \the\fboxsep \fboxrule \the\fboxrule }\@tempa \boxed {#1#2}% + \edef\@tempa {\kern \wd\z@ &\kern -\the\wd\z@ +% \end{macrocode} +% The \verb|\fboxsep\the\fboxsep...| line ensures that you can use +% \verb|\fboxsep=10pt\Aboxed{...}| in a pinch. +% \begin{macrocode} + \fboxsep\the\fboxsep \fboxrule \the\fboxrule }\@tempa \boxed {#1#2}% } % \end{macrocode} % \end{macro} % +% \begin{macro}{\MakeAboxedCommand} +% \changes{1.28}{2022/01/01}{Added} +% At times users want macros equivalent to \cs{Aboxed} but with a +% different box as the base. So we provide one +% \begin{macrocode} +\newcommand\MakeAboxedCommand[2]{ + % #1: command to create + % #2: box command to use + \newcommand#1[1]{\let\bgroup{\romannumeral-`}% + \@nameuse{@@\MH_cs_to_str:N #1}##1&&\ENDDNE} + \@namedef{@@\MH_cs_to_str:N #1}##1&##2&##3\ENDDNE{% +% \end{macrocode} +% Instead of hardcoding the kerning of box rule and box sep, we record +% the width of an empty box and kern half of it. +% \begin{macrocode} + \settowidth\@tempdimc{#2{}}% + \ifnum0=`{}\fi \setbox \z@ + \hbox{$\displaystyle##1{}\m@th$\kern0.5\@tempdimc}% +% \end{macrocode} +% The \verb|\fboxsep\the\fboxsep...| line enables +% \verb|\fboxsep=10\Command{...&...}|. Of course only works for boxed +% that uses \cs{fboxsep} and \cs{fboxrule}. +% \begin{macrocode} + \edef\@tempa{\kern\wd\z@&\kern-\the\wd\z@% + \fboxsep\the\fboxsep \fboxrule \the\fboxrule}% + \@tempa% +% \end{macrocode} +% Instead of using \cs{boxed} directly, we mimick the definition of +% \cs{boxed} and should thus be able to use any box. +% \begin{macrocode} + #2{\m@th$\displaystyle ##1##2$}% + } +} + +% \end{macrocode} +% +% \end{macro} +% +% % \begin{macro}{\ArrowBetweenLines} % \changes{v1.05}{2008/06/05}{Added \cs{ArrowBetweenLines} as it % belongs here and not just in my \LaTeX book (daleif)} diff --git a/macros/latex/contrib/mathtools/mathtools.ins b/macros/latex/contrib/mathtools/mathtools.ins index dbc22bd44e..81a5ef50c2 100644 --- a/macros/latex/contrib/mathtools/mathtools.ins +++ b/macros/latex/contrib/mathtools/mathtools.ins @@ -12,6 +12,7 @@ %% Copyright (C) 2012-2019 by Lars Madsen %% Copyright (C) 2020- by Lars Madsen, the LaTeX3 project %% +%% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either %% version 1.3c of this license or (at your option) any later diff --git a/macros/latex/contrib/mathtools/mathtools.pdf b/macros/latex/contrib/mathtools/mathtools.pdf index 800eba8211..9a1ab1198a 100644 Binary files a/macros/latex/contrib/mathtools/mathtools.pdf and b/macros/latex/contrib/mathtools/mathtools.pdf differ diff --git a/macros/latex/contrib/mathtools/mhsetup.dtx b/macros/latex/contrib/mathtools/mhsetup.dtx index bf89bc9c88..8d967baf87 100644 --- a/macros/latex/contrib/mathtools/mhsetup.dtx +++ b/macros/latex/contrib/mathtools/mhsetup.dtx @@ -190,7 +190,7 @@ and the derived files % \cs{InternalSyntaxOn} which makes |_| and |:| letters and then % automatically restores the category codes at the end of the % package. This usually works fine but when you try to load -% \pkg{amstext} you will experience that \TeX{} goes into an +% \pkg{\mbox{amstext}} you will experience that \TeX{} goes into an % infinite loop. Packages containing code like % |\@for\@tempa:=\@tempb\do{...}| will not work correctly either, % thus we provide an alternative version here with the pair of @@ -207,7 +207,7 @@ and the derived files % The standard behavior of scanning for optional arguments in % \LaTeX{} allows any number of spaces preceding the optional % argument and that is not always good in math. For that reason -% \pkg{amsmath} makes sure that commands like |\\| disallows spaces +% \pkg{amsmath} makes sure that commands like |\\| disallow spaces % before the optional argument but at the same time it fails to % provide ``safe'' environments. What would you expect from the % following input? @@ -338,7 +338,7 @@ and the derived files % The whole idea is to provide programming tools that are convenient % but not yet widely available. I hope this'll be obsolete soon! % -% Firstly we setup a few helper functions. +% Firstly we set up a few helper functions. % \begin{macro}{\MH_let:NwN} % An alias for \cs{let}. % \begin{macrocode} @@ -354,8 +354,8 @@ and the derived files % \end{macrocode} % \end{macro} % \begin{macro}{\MH_let:cc} -% This one has takes a \cs{csname}-\cs{endcsname} name and \cs{let}s -% it to a another \cs{csname}-\cs{endcsname} name. To be used in +% This one takes a \cs{csname}-\cs{endcsname} name and \cs{let}s +% it to another \cs{csname}-\cs{endcsname} name. To be used in % constructions with weird characters like \texttt{*} or alike in % them and can take a \cs{global} prefix if wanted (we want that % later on). diff --git a/macros/latex/contrib/mathtools/mhsetup.ins b/macros/latex/contrib/mathtools/mhsetup.ins new file mode 100644 index 0000000000..edf6baa824 --- /dev/null +++ b/macros/latex/contrib/mathtools/mhsetup.ins @@ -0,0 +1,93 @@ +%% +%% This is file `mhsetup.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mhsetup.dtx (with options: `install') +%% +%% This is a generated file. +%% +%% Copyright (C) 2002-2007,2010 by Morten Hoegholm +%% Copyright (C) 2017-2019 by Lars Madsen +%% Copyright (C) 2020- by Lars Madsen, The LaTeX3 team +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Lars Madsen +%% , The LaTeX3 team https://github.com/latex3/mathtools +%% +%% This work consists of the main source file mhsetup.dtx +%% and the derived files +%% mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv. +%% +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: mhsetup 2017/03/31 v1.3 mhsetup} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\preamble + +This is a generated file. + +Copyright (C) 2002-2007,2010 by Morten Hoegholm +Copyright (C) 2017-2019 by Lars Madsen +Copyright (C) 2020- by Lars Madsen, The LaTeX3 team + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3 of this license or (at your option) any later +version. The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +This Current Maintainer of this work is Lars Madsen +, The LaTeX3 team https://github.com/latex3/mathtools + +This work consists of the main source file mhsetup.dtx +and the derived files + mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv. + +\endpreamble + +\generate{% + \file{mhsetup.ins}{\from{mhsetup.dtx}{install}}% + \file{mhsetup.drv}{\from{mhsetup.dtx}{driver}}% + \usedir{tex/latex/mh}% + \file{mhsetup.sty}{\from{mhsetup.dtx}{package}}% +} + +\obeyspaces +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* mhsetup.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `mhsetup.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +\endinput +%% +%% End of file `mhsetup.ins'. diff --git a/macros/latex/contrib/mathtools/mhsetup.pdf b/macros/latex/contrib/mathtools/mhsetup.pdf index 2c818dd7cb..796893b4b3 100644 Binary files a/macros/latex/contrib/mathtools/mhsetup.pdf and b/macros/latex/contrib/mathtools/mhsetup.pdf differ diff --git a/macros/latex/contrib/sillypage/README.md b/macros/latex/contrib/sillypage/README.md index 8a1807f417..4c00f7756b 100644 --- a/macros/latex/contrib/sillypage/README.md +++ b/macros/latex/contrib/sillypage/README.md @@ -13,6 +13,10 @@ Simply add `\usepackage{sillypage}` to your document. Then: image for the value of that counter. - Use the macro `\sillystep` to print the step number `n` from the sequence of steps. +- Write `\pagenumbering{sillynumeral}` in you document to use a silly + numeral system. +- Use the macro `\sillynumeral` to get the silly numeral system + representation from the provided `n` value. ## A sample document @@ -32,7 +36,7 @@ Here we go: ## Installation notes -Just note that `sillywalk-map.png` should go under the `tex/` subtree +Just note that `sillywalk-map.pdf` should go under the `tex/` subtree (as it is required by `sillypage.sty`) instead of the `doc/` counterpart. ## Isn't this package too silly? @@ -41,11 +45,12 @@ Yes. ## Authors -Blame these three individuals: +Blame these individuals: - Phelype Oleinik - Paulo Cereda - samcarter +- Ulrike Fischer ## License diff --git a/macros/latex/contrib/sillypage/sillypage-example.pdf b/macros/latex/contrib/sillypage/sillypage-example.pdf index 878dde7288..bc4284ede8 100644 Binary files a/macros/latex/contrib/sillypage/sillypage-example.pdf and b/macros/latex/contrib/sillypage/sillypage-example.pdf differ diff --git a/macros/latex/contrib/sillypage/sillypage.dtx b/macros/latex/contrib/sillypage/sillypage.dtx index 4795c81c03..18e31a3589 100644 --- a/macros/latex/contrib/sillypage/sillypage.dtx +++ b/macros/latex/contrib/sillypage/sillypage.dtx @@ -2,7 +2,8 @@ % Copyright (C) 2022 % by Phelype Oleinik % Paulo Cereda -% and samcarter +% samcarter +% and Ulrike Fischer % % This work may be distributed and/or modified under the conditions of % the LaTeX Project Public License, either version 1.3c of this license @@ -15,11 +16,11 @@ % version 2005/12/01 or later. % % This work is "maintained" (as per the LPPL maintenance status) -% by Phelype Oleinik and Paulo Cereda. +% by Phelype Oleinik, Paulo Cereda, samcarter and Ulrike Fischer. % %<*package> -\def\sillypageDate{2022-01-20} -\def\sillypageVersion{1.3} +\def\sillypageDate{2022-02-02} +\def\sillypageVersion{1.4} % %<*driver> \documentclass[a4paper,full]{l3doc} @@ -60,6 +61,12 @@ % E-mail: % \href{mailto:sam.carter8@aol.com} % {sam.carter8\meta{at}aol.com}^^A +% }\\ +% Ulrike \emph{flying lessons} Fischer\thanks +% {^^A +% E-mail: +% \href{mailto:fischer@troubleshooting-tex.de} +% {fischer\meta{at}troubleshooting-tex.de}^^A % }^^A % } % @@ -136,6 +143,25 @@ % silly walk cycle. % \end{function} % +% \begin{function}{\pagenumbering{sillynumeral}} +% \begin{syntax} +% \cs{pagenumbering}\{sillynumeral\} +% \end{syntax} +% Write \cs{pagenumbering}|{sillynumeral}| in you document to use a +% silly numeral system, in which each page will be converted to a unique +% composition of silly steps. Note that this macro differs from its +% \cs{silly} counterpart, as the former is a proper base 12 numeral +% system whereas the latter simply walks through a 12-cycle silly routine. +% \end{function} +% +% \begin{function}{\sillynumeral} +% \begin{syntax} +% \cs{sillynumeral} \Arg{integer} +% \end{syntax} +% Provides the silly numeral system representation from the provided +% \meta{integer} value. This is a proper base 12 numeral system. +% \end{function} +% % \bigskip % % What a silly yet marvellous interface! @@ -197,49 +223,127 @@ % % \begin{macrocode} %<*package> +%<@@=silly> % \end{macrocode} % % \subsection{Package requirements} % % \begin{macrocode} -\ProvidesPackage{sillypage}[\sillypageDate\space\sillypageVersion\space - The silly walk as page numbering style] +\ProvidesExplPackage + {sillypage} {\sillypageDate} {\sillypageVersion} + {The silly walk as page numbering style} \RequirePackage{graphicx} % \end{macrocode} % -% \subsection{Loading} -% \begin{macro}{\silly,\sillystep} -% \begin{macro}[int]{\@silly} -% \begin{macro}{ +% \subsection{Picture-specific macros} +% +% \begin{macro}[int]{ % \silly@steps, % \silly@picture, % \silly@height} % \begin{macrocode} -\newcommand*\silly[1]{\expandafter\@silly\csname c@#1\endcsname} -\newcommand*\sillystep[1]{\@silly{#1}} -\newcommand*\@silly[1]{\expandafter\@silly@walk - \expandafter{\number\numexpr#1\relax}} -\newcommand*\silly@steps{12}% -\newcommand*\silly@height{.8cm}% -\newcommand*\silly@picture{sillywalk-map.pdf}% +\newcommand*\silly@steps{12} +\newcommand*\silly@height{.8cm} +\newcommand*\silly@picture{sillywalk-map.pdf} % \end{macrocode} % \end{macro} +% +% \subsection{Single step macros} +% +% \begin{macro}{\silly,\sillystep} +% \begin{macro}[int]{\@silly} +% \begin{macro}{\@@_step:n} +% \begin{macrocode} +\NewDocumentCommand \silly { m } { \exp_args:Nv \@@_step:n { c@#1 } } +\NewDocumentCommand \sillystep { m } { \@@_step:n {#1} } +\newcommand*\@silly { \@@_step:n } +\cs_new:Npn \@@_step:n #1 + { + \@@_step_aux:eN + { \int_eval:n { \int_mod:nn { #1-1 } { \silly@steps } +1 } } + \c_false_bool + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Multi step macros} +% +% \begin{macro}{\sillynumeral} +% \begin{macro}[int]{\@sillynumeral} +% \begin{macro}{\@@_numeral:n,\@@_numeral_aux:n} +% \begin{macrocode} +\NewDocumentCommand \sillynumeral { m } { \@@_numeral:n {#1} } +\newcommand*\@sillynumeral { \@@_numeral:n } +\cs_new:Npn \@@_numeral:n #1 + { + \exp_args:Ne \str_map_function:nN + { \int_to_base:nn {#1} { 12 } } \@@_numeral_aux:n + } +\cs_new:Npn \@@_numeral_aux:n #1 + { \@@_step_aux:eN { "\char_uppercase:N #1+1 } \c_true_bool } +% \end{macrocode} +% \end{macro} +% \end{macro} % \end{macro} +% +% \subsection{Internals} +% +% \begin{macro}{\@@_step_aux:nN,\@@_step_aux:eN,\@@_trim_step:nN} +% \begin{macrocode} +\cs_new:Npn \@@_step_aux:nN #1 #2 + { + \cs_if_exist_use:cF { texorpdfstring } { \use_i:nn } + { \@@_trim_step:nN {#1} #2 } + {#1} + } +\cs_generate_variant:Nn \@@_step_aux:nN { e } +\cs_new:Npn \@@_trim_step:nN #1 #2 + { +%<@@=> + \exp_args:Nee \@@silly@place@picture@@nn + { + \bool_if:NT #2 + { + trim = \int_case:nn {#1} + { + { 1 } { 57 ~ 0 ~ 42 ~ 0 } + { 2 } { 59 ~ 0 ~ 29 ~ 0 } + { 3 } { 53 ~ 0 ~ 21 ~ 0 } + { 4 } { 62 ~ 0 ~ 11 ~ 0 } + { 5 } { 50 ~ 0 ~ 8 ~ 0 } + { 6 } { 33 ~ 0 ~ 27 ~ 0 } + { 7 } { 45 ~ 0 ~ 13 ~ 0 } + { 8 } { 56 ~ 0 ~ 27 ~ 0 } + { 9 } { 38 ~ 0 ~ 12 ~ 0 } + { 10 } { 7 ~ 0 ~ 43 ~ 0 } + { 11 } { 33 ~ 0 ~ 33 ~ 0 } + { 12 } { 57 ~ 0 ~ 7 ~ 0 } + } + , clip + } + } + { \int_eval:n {#1} } + } +% \end{macrocode} % \end{macro} % -% \begin{macro}[int]{\@silly@walk,\@silly@walk@} +% \begin{macro}[int]{\@@silly@place@picture@@nn} % \begin{macrocode} -\def\@silly@walk#1{% - \@ifundefined{texorpdfstring}{\@firstoftwo}{\texorpdfstring}% - {\@silly@walk@{#1}}% TeX - {#1}}% pdf string -\def\@silly@walk@#1{% - \ifnum#1>\silly@steps\space - \expandafter\@silly@walk@\expandafter - {\number\numexpr#1-\silly@steps\expandafter}% - \else - \includegraphics[height=\silly@height,page=#1]{\silly@picture}% - \fi} +\DeclareRobustCommand \@@silly@place@picture@@nn [2] + { + \includegraphics + [ #1, page=#2, height=\silly@height ] + { \silly@picture } + } +\AtBeginDocument + { + \cs_if_exist_use:NF \pdfstringdefDisableCommands { \use_none:n } + { \cs_set:Npn \@@silly@place@picture@@nn #1 #2 {#2} } + } +\DeclareHookRule { begindocument } + { sillypage } { after } { hyperref } % \end{macrocode} % \end{macro} % diff --git a/macros/latex/contrib/sillypage/sillypage.ins b/macros/latex/contrib/sillypage/sillypage.ins index 4d85a866a6..8c3f6c6a2d 100644 --- a/macros/latex/contrib/sillypage/sillypage.ins +++ b/macros/latex/contrib/sillypage/sillypage.ins @@ -2,7 +2,8 @@ %% Copyright (C) 2022 %% by Phelype Oleinik %% Paulo Cereda -%% and samcarter +%% samcarter +%% and Ulrike Fischer %% %% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3c of this license @@ -15,7 +16,7 @@ %% version 2005/12/01 or later. %% %% This work is "maintained" (as per the LPPL maintenance status) -%% by Phelype Oleinik, Paulo Cereda and samcarter. +%% by Phelype Oleinik, Paulo Cereda, samcarter and Ulrike Fischer. %% \def\projectname{sillypage}% \def\nameofplainTeX{plain}% @@ -35,6 +36,7 @@ This is a generated file. Copyright 2022 Phelype Oleinik /phelype.oleinik@latex-project.org/ Paulo Cereda /cereda.paulo@gmail.com/ samcarter /sam.carter8@aol.com/ + Ulrike Fischer /fischer@troubleshooting-tex.de/ This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at @@ -50,7 +52,7 @@ and version 1.3c or later is part of all distributions of LaTeX version \postamble This work is "maintained" (as per the LPPL maintenance status) -by Phelype Oleinik, Paulo Cereda and samcarter. +by Phelype Oleinik, Paulo Cereda, samcarter and Ulrike Fischer. This work consists of the files \projectname.dtx, and \projectname.ins, diff --git a/macros/latex/contrib/sillypage/sillypage.pdf b/macros/latex/contrib/sillypage/sillypage.pdf index 9789f40c0a..6f3533869b 100644 Binary files a/macros/latex/contrib/sillypage/sillypage.pdf and b/macros/latex/contrib/sillypage/sillypage.pdf differ diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md index fe87b241ca..8a218bd89c 100644 --- a/macros/latex/contrib/siunitx/CHANGELOG.md +++ b/macros/latex/contrib/siunitx/CHANGELOG.md @@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ## [Unreleased] +## [v3.0.46] - 2022-02-02 + +### Fixed +- Spacing around math symbols in text mode (see issue + [\#583](https://github.com/josephwright/siunitx/issues/583)) + ## [v3.0.45] - 2022-01-27 ### Fixed @@ -1692,7 +1698,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ### Added - First public testing release (as `si`) -[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.45...HEAD +[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.46...HEAD +[v3.0.46]: https://github.com/josephwright/siunitx/compare/v3.0.45...v3.0.46 [v3.0.45]: https://github.com/josephwright/siunitx/compare/v3.0.44...v3.0.45 [v3.0.44]: https://github.com/josephwright/siunitx/compare/v3.0.43...v3.0.44 [v3.0.43]: https://github.com/josephwright/siunitx/compare/v3.0.42...v3.0.43 diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf index 85b1e4892d..ecd6faf3e6 100644 Binary files a/macros/latex/contrib/siunitx/siunitx-code.pdf and b/macros/latex/contrib/siunitx/siunitx-code.pdf differ diff --git a/macros/latex/contrib/siunitx/siunitx-print.dtx b/macros/latex/contrib/siunitx/siunitx-print.dtx index 337901d47f..8f1e4bb467 100644 --- a/macros/latex/contrib/siunitx/siunitx-print.dtx +++ b/macros/latex/contrib/siunitx/siunitx-print.dtx @@ -843,13 +843,22 @@ \tl_set:Nn \l_@@_tmp_tl {#1} \tl_if_empty:NF \l_siunitx_unit_font_tl { \exp_after:wN \cs_set_eq:NN \l_siunitx_unit_font_tl \use:n } - \cs_set:Npn \mathord ##1 {##1} - \cs_set:Npn \pm { \exp_not:N \textpm } + \cs_set:Npn \mathord ##1 + { + \str_case:nnF {##1} + { + { \cdot } { \exp_not:N \textperiodcentered } + { \pm } { \exp_not:N \textpm } + { \times } { \exp_not:N \texttimes } + } + {##1} + } + \cs_set:Npn \pm { \: \exp_not:N \textpm \: } \tl_map_inline:nn { \mp \ge \le \gg \ll } { \cs_set:Npn ##1 { \exp_not:N \ensuremath { \exp_not:N ##1 } } } - \cs_set:Npn \cdot { \exp_not:N \textperiodcentered } - \cs_set:Npn \times { \exp_not:N \texttimes } + \cs_set:Npn \cdot { \: \exp_not:N \textperiodcentered \: } + \cs_set:Npn \times { \: \exp_not:N \texttimes \: } \protected@edef \l_@@_tmp_tl { \l_@@_tmp_tl } \@@_text_replace:N \l_@@_tmp_tl \@@_text_replace_aux:n { \tl_use:N \l_@@_tmp_tl } @@ -992,7 +1001,7 @@ \cs_new_protected:Npn \@@_text_fraction:Nnn #1#2#3 { \ensuremath - { + { #1 { \mbox { \@@_text_replace:n {#2} } } { \mbox { \@@_text_replace:n {#3} } } diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx index db79b498a9..e860a803b3 100644 --- a/macros/latex/contrib/siunitx/siunitx.dtx +++ b/macros/latex/contrib/siunitx/siunitx.dtx @@ -121,7 +121,7 @@ % % Identify the package and give the over all version information. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2022-01-27} {3.0.45} +\ProvidesExplPackage {siunitx} {2022-02-02} {3.0.46} {A comprehensive (SI) units package} % \end{macrocode} % diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf index c15a2e4192..c4f79568c0 100644 Binary files a/macros/latex/contrib/siunitx/siunitx.pdf and b/macros/latex/contrib/siunitx/siunitx.pdf differ diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex index f6ad528345..1c8e8f62ab 100644 --- a/macros/latex/contrib/siunitx/siunitx.tex +++ b/macros/latex/contrib/siunitx/siunitx.tex @@ -141,7 +141,7 @@ for those people who are interested. \begin{minipage}{0.48\linewidth} \LaTeXdemo@input \end{minipage}% - \hfil + \hspace{\fill}% \begin{minipage}{0.48\linewidth} \usebox\LaTeXdemo@box \end{minipage}% @@ -1060,7 +1060,7 @@ alignment in these situations: this is, in effect, a macro version of the \multicolumn{2}{c}{\tablenum[table-format = 4.4]{4563.21}} \\ \bottomrule \end{tabular} - \hfil + \hspace{\fill}% \begin{tabular}{@{}lr@{}} \toprule Heading & Heading \\ @@ -2649,7 +2649,7 @@ controlled by the \opt{table-align-text-before} and \opt{\ldots-after} \NoteMark{d} 88 & \NoteMark{d} 88 \\ \bottomrule \end{tabular} - \hfil + \hspace{\fill}% \sisetup{table-format = 2.4\NoteMark{a}} \begin{tabular}{@{} S @@ -2860,7 +2860,7 @@ same value (one of \opt{center}, \opt{right} or \opt{left}). \pkg{siunitx} allows the user to switch between the typographic conventions of different (geographical) areas by using locales. Currently, the package is supplied with configurations for locales \opt{UK}, \opt{US}, \opt{DE} -(Germany), \opt{FR} (French), \opt{SI} (Slovene) and \opt{ZA} (South Africa). +(Germany), \opt{FR} (French), \opt{SI} (Slovene) and \opt{ZA} (South Africa). The \opt{locale} option is used to switch to a particular locale. \begin{LaTeXdemo} @@ -3440,7 +3440,7 @@ collected, easiest to do using the \pkg{collcell} package. \begin{table} \caption{Tables where numbers have different units.% \label{tab:xmpl:mixed}} - \hfil + \hspace{\fill}% \begin{tabular} { @{} @@ -3457,7 +3457,7 @@ collected, easiest to do using the \pkg{collcell} package. \mu / \unit{\per\mm} & 0.532 & 0.894 \\ \bottomrule \end{tabular} - \hfil + \hspace{\fill}% \begin{tabular} { @{} @@ -3473,7 +3473,7 @@ collected, easiest to do using the \pkg{collcell} package. 4.23 & \joule\per\mole \\ \bottomrule \end{tabular} - \hfil + \hspace{\fill}% \end{table} \end{LaTeXdemo} -- cgit v1.2.3