summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-24 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2021-07-24 03:01:03 +0000
commit9c5706814f2f593a9f52c51ad02b61e9bacd9ee4 (patch)
treefd31ea72f451724d8ad7908c945f0f6a40cdcda9 /macros/latex
parent9e46b83b2d49ad6f5d4285266a81c9af1dd3d74e (diff)
CTAN sync 202107240301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx35
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin598988 -> 599164 bytes
-rw-r--r--macros/latex/contrib/ifallfalse/README.md4
-rw-r--r--macros/latex/contrib/ifallfalse/ifallfalse.dtx47
-rw-r--r--macros/latex/contrib/ifallfalse/ifallfalse.pdfbin176927 -> 178390 bytes
-rw-r--r--macros/latex/contrib/macrolist/README.md2
-rw-r--r--macros/latex/contrib/macrolist/macrolist.dtx13
-rw-r--r--macros/latex/contrib/macrolist/macrolist.pdfbin188569 -> 184302 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin463891 -> 466543 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex84
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx416
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin1339461 -> 1355018 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin326597 -> 327901 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin202113 -> 204461 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-fr.pdfbin203801 -> 206071 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc.dtx17
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx34
-rw-r--r--macros/latex/contrib/spbmark/spbmark.dtx56
-rw-r--r--macros/latex/contrib/spbmark/spbmark.pdfbin68498 -> 68676 bytes
19 files changed, 526 insertions, 182 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 6f1bd7bf07..accfe35b85 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,7 +28,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/22\hskip 1em\relax v1.27L\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/22\hskip 1em\relax v1.27N\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -148,7 +148,7 @@
% cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
% \end{syntax}
% 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
-% \changes{v1.27L}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
+% \changes{v1.27N}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
% \end{function}
%
% 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
@@ -548,7 +548,7 @@
% \end{function}
%
% \begin{optdesc}
-% \item[thmbox] 开启定理环境盒子的边框,需载入 \pkg{tcolorbox} 宏包才生效。这个选项与 \pkg{thmtools} 中并不一致,\pkg{thmtools} 的同名选项包括 L、M 和 S 三个参数。
+% \item[thmbox] 开启定理环境盒子的边框,需载入 \pkg{tcolorbox} 宏包才生效。这个选项与 \pkg{thmtools} 中并不一致,\pkg{thmtools} 的同名选项包括 \opt{L}、\opt{M} 和 \opt{S} 三个参数。
% \item[within] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
% \item[headpunct] 定理标题末尾后的标记,在换行符或第一段内容的间隔之前。
% \item[bodyfont] 定理内容部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
@@ -684,7 +684,7 @@
% \tn{easyfoot}\oarg{位置}\marg{内容}
% \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
% \end{syntax}
-% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C 和 R 代表左、中和右部分。单面打印时,含有偶数的选项无效。
+% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共 12 个部分,可选参数中 \opt{E} 和 \opt{O} 代表偶数和奇数,\opt{L}、\opt{C} 和 \opt{R} 代表左、中和右部分。单面打印时,含有偶数的选项无效。
% \changes{v1.26}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
% \end{function}
%
@@ -717,7 +717,7 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
% \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。}
-% \changes{v1.27L}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
+% \changes{v1.27N}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
% \end{function}
%
% \begin{optdesc}
@@ -747,7 +747,7 @@
% numsep = <编号后间距|(1em)>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{tocset/(level)/...} \\
-% \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{(level)} 代表 part、chapter、section、subsection、figure、table 和 lstlisting 级别的目录,而使用 list 级别可以统一设置图片、表格和代码目录的样式。
+% \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{(level)} 代表 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection}、\opt{figure}、\opt{table} 和 \opt{lstlisting} 级别的目录,而使用 \opt{list} 级别可以统一设置图片、表格和代码目录的样式。
% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
% \changes{v1.24}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
% \changes{v1.25}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
@@ -905,7 +905,7 @@
% \tn{end}\{hangparas\}
% \end{syntax}
% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27L}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
+% \changes{v1.27N}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
% \end{function}
%
% \subsection{代码}
@@ -1079,7 +1079,7 @@
% \tn{end}\{eqcomp\}
% \end{syntax}
% 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表第二个 \meta{键值列表} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。第一个 \meta{键值列表} 也可以使用 \tn{seteqcomp} 全局设置,选项如下:
-% \changes{v1.27L}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。}
+% \changes{v1.27N}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。}
% \end{function}
%
% \begin{function}{width,delim,space,item-align,delim-align,intro,font,mode}
@@ -1099,8 +1099,8 @@
% \item[width] 设置适当的符号宽度可以防止文字重叠和边界溢出等问题。
% \item[delim] 符号对照的引导符,\tn{symb} 的 \meta{引导符} 和对齐方式是基于这个符号的宽度。
% \item[space] 符号间隙为引导符两侧与符号和说明文字间的距离。
-% \item[item-align] 符号的对齐方式,分为左(l)、中(c)和右(r)三种对齐方式。
-% \item[delim-align] 引导符的对齐方式,分为左(l)、中(c)和右(r)三种对齐方式。
+% \item[item-align] 符号的对齐方式,分为左(\opt{l})、中(\opt{c})和右(\opt{r})三种对齐方式。
+% \item[delim-align] 引导符的对齐方式,分为左(\opt{l})、中(\opt{c})和右(\opt{r})三种对齐方式。
% \item[intro] 符号对照的说明文字,应当为简短的几个字,只显示在第一行,其后为悬挂缩进的对照列表。
% \item[font] 符号的字体,数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。
% \item[mode] 符号字体模式,可以为数学字体或者文本字体。
@@ -1308,6 +1308,13 @@
% \newblock (2020-12-31)
% \urlprefix\url{https://www.ctan.org/pkg/biblatex}
%
+% \bibitem{eqexpl}
+% Konstantin Morenko.
+% \newblock \textit{The \pkg{eqexpl} package} [EB/OL].
+% \newblock version 1.1,
+% \newblock (2019-07-01)
+% \urlprefix\url{https://www.ctan.org/pkg/eqexpl}
+%
% \bibitem{xmuthesis}
% Camuse Cao.
% \newblock \textit{\pkg{xmuthesis}: 厦门大学论文模板} [EB/OL].
@@ -1327,7 +1334,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/22}{1.27L}
+\ProvidesExplClass{easybook}{2021/07/22}{1.27N}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1621,7 +1628,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/22}{1.27L}
+\ProvidesExplPackage{easybase}{2021/07/22}{1.27N}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -3001,7 +3008,7 @@
item-align .initial:n = r,
delim-align .tl_set:N = \l__eb_eqsymb_delim_align_tl,
delim-align .initial:n = c,
- intro .tl_set: = \l__eb_eqsymb_intro_tl,
+ intro .tl_set:N = \l__eb_eqsymb_intro_tl,
font .tl_set:N = \l__eb_eqsymb_font_tl,
mode .tl_set:N = \l__eb_eqsymb_mode_tl,
mode .initial:n = math
@@ -3562,7 +3569,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/22}{1.27L}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/22}{1.27N}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 2462854b67..d1fb4c495f 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/ifallfalse/README.md b/macros/latex/contrib/ifallfalse/README.md
index 925d98f471..072e82ff87 100644
--- a/macros/latex/contrib/ifallfalse/README.md
+++ b/macros/latex/contrib/ifallfalse/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package ifallfalse - version 1.0.1 (2021/07/12)
+# The LaTeX package ifallfalse - version 2.0.0 (2021/07/22)
> Copyright (C) 2021 Dennis Chen <proofprogram@gmail.com>
>
@@ -36,4 +36,4 @@ Run
pdflatex ifallfalse.dtx
-to generate `ifallfalse.pdf`, which contains the package documentation.
+to generate `ifallfalse.pdf`, which contains the package documentation. \ No newline at end of file
diff --git a/macros/latex/contrib/ifallfalse/ifallfalse.dtx b/macros/latex/contrib/ifallfalse/ifallfalse.dtx
index 9d5e630f73..adfe09065e 100644
--- a/macros/latex/contrib/ifallfalse/ifallfalse.dtx
+++ b/macros/latex/contrib/ifallfalse/ifallfalse.dtx
@@ -15,7 +15,7 @@
% \iffalse
%<package>
%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{ifallfalse}[2021/07/12 v1.0.1 Compare string against set of other strings]
+%<package>\ProvidesPackage{ifallfalse}[2021/07/22 v2.0.0 Compare string against set of other strings]
%<*driver>
\documentclass{ltxdoc}
@@ -30,14 +30,16 @@
%</driver>
% \fi
%
-% \changes{v.1.0.1}{2021/07/12}{Fix errant references to allfalse environment and add limitations}
+% \changes{v2.0.0}{2021/07/22}{Add comments after lines in allfalse to prevent extra spacing from popping up}
+% \changes{v1.0.1}{2021/07/12}{Fix errant references to allfalse environment and add limitations}
% \changes{v1.0.0}{2021/07/01}{Initial version}
%
% \GetFileInfo{ifallfalse.sty}
%
% \title{\textsf{ifallfalse} -- Compare string against set of strings}
% \author{Dennis Chen \\ proofprogram@gmail.com}
-% \date{\fileversion, v. \filedate\thanks{\url{https://github.com/chennisden/ifallfalse}}}
+% \changes{v2.0.0}{2021/07/22}{Remove errant `v' in date}
+% \date{\fileversion, \filedate\thanks{\url{https://github.com/chennisden/ifallfalse}}}
%
% \maketitle
%
@@ -52,11 +54,11 @@
% \DescribeEnv{allfalse}
% To set up an allfalse environment, simply write
% \begin{verbatim}
-%\begin{allfalse}{string}{action}
+%\begin{allfalse}{string}{true branch}{false branch}
%
%\end{allfalse}
% \end{verbatim}
-% \textsf{string} will be compared to the set of strings (which we will declare via |\orcheck|), and if \textsf{string} does not match the set of strings, \textsf{action} will be executed.
+% \textsf{string} will be compared to the set of strings (which we will declare via |\orcheck|), and if \textsf{string} does not match the set of strings, \textsf{false branch} will be executed. Otherwise, \textsf{true branch} will be executed.
%
% \DescribeMacro{\orcheck}
%
@@ -71,12 +73,16 @@
% \section{Example}
%
% Here is a simple example to demonstrate how \textsf{allfalse} is used.
+%
+% \changes{v2.0.0}{2021/07/22}{Change allfalse environment to match update}
+% \changes{v2.0.0}{2021/07/22}{Use ifallfalse package in example}
% \begin{verbatim}
%\documentclass{minimal}
+%\usepackage{ifallfalse}
%
%\begin{document}
%
-%\begin{allfalse}{purple}{This color is not red, blue, or green!}
+%\begin{allfalse}{purple}{}{This color is not red, blue, or green!}
% \orcheck{red}
% \orcheck{blue}
% \orcheck{green}
@@ -85,24 +91,35 @@
%\end{document}
% \end{verbatim}
%
-% In this case, because \textsf{purple} does not match \textsf{red}, \textsf{blue}, or \textsf{green}, the action --- which is printing \textsf{This color is not red, blue, or green!} --- will execute at that location inside the document.
+% In this case, because \textsf{purple} does not match \textsf{red}, \textsf{blue}, or \textsf{green}, the false branch --- which is \textsf{This color is not red, blue, or green!} --- will execute at that location inside the document.
%
% \section{Implementation}
%
% These are the implementation details of package \textsf{allfalse}. Because the package is so short, we can explain everything.
%
+% \changes{v2.0.0}{2021/07/22}{Create true and false branch}
% \begin{environment}{allfalse}
% When setting up allfalse, we locally define the |\comparedstring| macro with the first argument that the environment takes in. This is what will be compared against all the strings passed in through the |\orcheck| declarations inside the environment.
%
% Then, we define our body of logic (which we will be adding onto through |\orcheck|) to just initially consist of the action we would like to perform if |\comparedstring| matches none of the strings passed in through |\orcheck|.
+%
+% Finally, we execute our logicbody, which will change |\ifallfalse@branch| to be false if appropriate. Then, the appropriate action will be executed.
% \begin{macrocode}
-\newenvironment{allfalse}[2]
-{
- \def\comparedstring{#1}
- \def\logicbody{#2}
+\newenvironment{allfalse}[3]
+{%
+ \newif\ifallfalse@branch\allfalse@branchtrue%
+ \def\comparedstring{#1}%
+ \def\trueaction{#2}%
+ \def\falseaction{#3}%
+ \def\logicbody{\protect\allfalse@branchfalse}%
}
-{
- \logicbody
+{%
+ \logicbody%
+ \ifallfalse@branch
+ \trueaction%
+ \else
+ \falseaction%
+ \fi
}
% \end{macrocode}
% \end{environment}
@@ -118,10 +135,10 @@
% \begin{verbatim}
% \if\else
% \if\else
-% \ldots action
+% \ldots \allfalse@branchfalse
% \fi\ldots \fi
% \end{verbatim}
-% Logically, \textsf{action} will only execute if all the conditions are false; in other words, it will only execute if |\comparedstring| does not match any of the strings passed in via |\orcheck|. This is because each |\else| branch must execute.
+% Logically, |\allfalse@branchfalse| will only execute if all the conditions are false; in other words, it will only execute if |\comparedstring| does not match any of the strings passed in via |\orcheck|. This is because each |\else| branch must execute.
% \end{itemize}
% \begin{macrocode}
\newcommand*\@allfalsename{allfalse}
diff --git a/macros/latex/contrib/ifallfalse/ifallfalse.pdf b/macros/latex/contrib/ifallfalse/ifallfalse.pdf
index 44df77fa26..a8bdb834f2 100644
--- a/macros/latex/contrib/ifallfalse/ifallfalse.pdf
+++ b/macros/latex/contrib/ifallfalse/ifallfalse.pdf
Binary files differ
diff --git a/macros/latex/contrib/macrolist/README.md b/macros/latex/contrib/macrolist/README.md
index 61ac3d679d..8eff3b4f96 100644
--- a/macros/latex/contrib/macrolist/README.md
+++ b/macros/latex/contrib/macrolist/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package macrolist - version 1.0.2 (2021/07/17)
+# The LaTeX package macrolist - version 1.1.1 (2021/07/23)
> Copyright (C) 2021 Dennis Chen <proofprogram@gmail.com>
>
diff --git a/macros/latex/contrib/macrolist/macrolist.dtx b/macros/latex/contrib/macrolist/macrolist.dtx
index 7a564fc448..3ccbc85edc 100644
--- a/macros/latex/contrib/macrolist/macrolist.dtx
+++ b/macros/latex/contrib/macrolist/macrolist.dtx
@@ -16,7 +16,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{macrolist}[2021/07/16 v1.0.1 Create lists of macros and perform operations on them]
+\ProvidesPackage{macrolist}[2021/07/23 v1.1.1 Create lists of macros and perform operations on them]
\RequirePackage{pgffor}
%</package>
@@ -75,6 +75,14 @@
}
% \fi
%
+% \changes{v1.1.0}{2021/07/22}{Add listexists}
+% \DescribeMacro{\listexists}
+% Writing |\listexists{listname}{true}{false}| will execute \textsf{true} if \textsf{listname} exists and \textsf{false} otherwise.
+%
+% \iffalse
+\newcommand{\listexists}[3]{\ifcsname c@macrolist@list@#1\endcsname#2\else#3\fi}
+% \fi
+%
% \DescribeMacro{\listelement}
%
% To execute the \textsf{i}th element of \textsf{listname}, write |\listelement{listname}{i}|. Note that \textit{lists are 1-indexed}, meaning the first element is numbered 1, the second element numbered 2, and so on.
@@ -178,10 +186,11 @@
% \fi
%
% \DescribeMacro{\listforeach}
+% \changes{v1.1.1}{2021/07/23}{Fix foreach doc by removing incorrect begin}
%
% To write a for each loop, write
% \begin{verbatim}
-%\begin{listforeach}{listname}{\element}[begin][end]{action}
+%\listforeach{listname}{\element}[begin][end]{action}
% \end{verbatim}
%
%
diff --git a/macros/latex/contrib/macrolist/macrolist.pdf b/macros/latex/contrib/macrolist/macrolist.pdf
index 1f5be69f8b..94986e435d 100644
--- a/macros/latex/contrib/macrolist/macrolist.pdf
+++ b/macros/latex/contrib/macrolist/macrolist.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index 8f455bfe5d..6965309fe9 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index 4db0a583f1..d941d2f9f8 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -29,8 +29,6 @@
\titlespacing*{\section}{0pt}{6.5ex plus 1ex minus .2ex}{4.3ex plus .2ex}
\titlespacing*{\subsection}{0pt}{4.5ex plus 1ex minus .2ex}{2ex plus .2ex}
-\usepackage{multicol}
-\setlength{\columnseprule}{0.4pt}
\def\LetterAt{@}
\def\interitem{\vspace{7mm plus 2 mm minus 3mm}}
@@ -524,7 +522,7 @@ couleur ;
couleur (la valeur par défaut de cette clé est la couleur courante des filets du
tableau) ;
\item la clé |color| prend en argument une couleur et l'applique au contenu et
-trace également le cadre avec cette couleur.
+trace également le cadre avec cette couleur ;
\item la clé |line-width| fixe la largeur des filets servant pour le cadre (n'a
d'intérêt que si |draw| ou |hvlines| est utilisée) ;
\item la clé |rounded-corners| impose des coins arrondis (pour le cadre dessiné
@@ -536,7 +534,15 @@ cette clé prend comme valeur une liste d'éléments parmi les suivants : |left|
|right|, |top| et |bottom| ;
\item les clés |t| et |b| réglent la ligne de base qui sera donnée au bloc quand
celui-ci est constitué de plusieurs lignes (séparées par la commande |\\|) ;
-\item la clé |hvlines| trace tous les filets horizontaux et verticaux dans le bloc.
+\item la clé |hvlines| trace tous les filets horizontaux et verticaux dans le
+bloc ;
+\item \colorbox{yellow!50}{\textbf{Nouveau 5.19}}\enskip quand la clé |tikz| est
+utilisée, le chemin Tikz correspondant au rectangle délimitant le bloc est
+exécuté avec Tikz\footnote{Tikz doit être chargé préalablement (par défaut,
+ \pkg{nicematrix} ne charge que \textsc{pgf}), faute de quoi, une erreur sera
+ levée.} en utilisant comme options la valeur de cette clé |tikz| (qui doit
+donc être une liste de clés Tikz applicables à un chemin de Tikz). Pour des
+exemple d'utilisation de cette clé |tikz|, voir p.~\pageref{tikz-key-examples}.
\end{itemize}
@@ -932,7 +938,7 @@ p.~\pageref{OnlyMainNiceMatrix}.
Les outils proposés par \pkg{nicematrix} pour tracer des filets sont les
suivants :
\begin{itemize}
-\item les clés |hlines|, |vlines| et |hvlines| ;
+\item les clés |hlines|, |vlines|, |hvlines| et |hvlines-except-borders|;
\item le spécificateur «\verb+|+» dans le préambule (pour les environnements à
préambule) ;
\item la commande |\Hline|.
@@ -986,7 +992,7 @@ $\begin{pNiceMatrix}[vlines,rules/width=0.2pt]
-\subsubsection{La clé hvlines}
+\subsubsection{Les clés hvlines et hvlines-except-borders}
\label{hvlines}
La clé |hvlines|, qui ne prend pas de valeur, est la conjonction des clés
@@ -1739,7 +1745,7 @@ Dupont & Chantal & 15 janvier 1998 \\
\colorbox{yellow!50}{\bfseries Nouveau 5.18}\enskip La commande |\RowStyle|
prend en argument des instructions de mise en forme qui seront appliquées à
-chacune des cellules restantes sur la rangée en cours.
+chacune des cases restantes sur la rangée en cours.
\medskip
Elle prend aussi en premier argument optionnel, entre crochets, une liste de
@@ -2902,8 +2908,8 @@ fin de tableau selon un type de liste défini par l'extension \pkg{enumitem}.
\begin{scope}
\fvset{commandchars=\~\#\!}
\begin{Verbatim}
-\begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-\toprule
+\begin{NiceTabular}{@{}llr@{}}
+\toprule \RowStyle{\bfseries}
Nom & Prénom & Date de naissance \\
\midrule
Achard~emphase#\tabularnote{La famille Achard est une très ancienne famille du Poitou.}!
@@ -2918,8 +2924,8 @@ Dupont & Chantal & 15 janvier 1998 \\
\end{scope}
\begin{center}
-\begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-\toprule
+\begin{NiceTabular}{@{}llr@{}}
+\toprule \RowStyle{\bfseries}
Nom & Prénom & Date de naissance \\
\midrule
Achard\tabularnote{La famille Achard est une très ancienne famille du Poitou.}
@@ -3844,11 +3850,11 @@ noix & noisette & brugnon
Les nœuds que l'on vient de décrire ne sont pas accessibles par défaut dans le
|\CodeBefore| (décrit p.~\pageref{code-before}). \par\nobreak
-\colorbox{yellow!50}{\textbf{Nouveau 5.16}}\enskip On peut rendre ces nœuds
-accessibles dans le |\CodeBefore| en utilisant la clé |create-cell-nodes| du
-mot-clé |\CodeBefore| (dans ce cas-là, les nœuds sont créés une première fois
-avant la construction du tableau en utilisant des informations écrites dans le
-fichier |aux| puis recréés lors de la composition du tableau proprement dit).
+On peut rendre ces nœuds accessibles dans le |\CodeBefore| en utilisant la clé
+|create-cell-nodes| du mot-clé |\CodeBefore| (dans ce cas-là, les nœuds sont
+créés une première fois avant la construction du tableau en utilisant des
+informations écrites dans le fichier |aux| puis recréés lors de la composition
+du tableau proprement dit).
\subsection{Les nœuds indiquant la position des filets}
@@ -4294,6 +4300,44 @@ L'extension \pkg{nicematrix} n'est pas compatible avec la classe \cls{ieeeaccess
\section{Exemples}
+\subsection{Utilisation de la clé «tikz» de la commande \textbackslash Block}
+
+\label{tikz-key-examples}
+
+
+\begin{Verbatim}
+\ttfamily \small
+\begin{NiceTabular}{m{4.5cm}m{4.5cm}m{4.5cm}}[hvlines]
+ \Block[~emphase#tikz={pattern=grid,pattern color=lightgray}@]{}
+ {pattern = grid,\\ pattern color = lightgray}
+& \Block[~emphase#tikz={pattern = north west lines,pattern color=blue}@]{}
+ {pattern = north west lines,\\ pattern color = blue}
+& \Block[~emphase#tikz={outer color = red!50, inner color=white }@]{2-1}
+ {outer color = red!50,\\ inner color = white} \\
+ \Block[~emphase#tikz={pattern = sixpointed stars, pattern color = blue!15}@]{}
+ {pattern = sixpointed stars,\\ pattern color = blue!15}
+& \Block[~emphase#tikz={left color = blue!50}@]{}
+ {left color = blue!50} \\
+\end{NiceTabular}
+\end{Verbatim}
+
+\begin{center}
+\ttfamily \small
+\begin{NiceTabular}{m{4.5cm}m{4.5cm}m{4.5cm}}[hvlines]
+ \Block[tikz={pattern=grid,pattern color=lightgray}]{}
+ {pattern = grid,\\ pattern color = lightgray}
+& \Block[tikz={pattern = north west lines,pattern color=blue}]{}
+ {pattern = north west lines,\\ pattern color = blue}
+& \Block[tikz={outer color = red!50, inner color=white }]{2-1}
+ {outer color = red!50,\\ inner color = white} \\
+ \Block[tikz={pattern = sixpointed stars, pattern color = blue!15}]{}
+ {pattern = sixpointed stars,\\ pattern color = blue!15}
+& \Block[tikz={left color = blue!50}]{}
+ {left color = blue!50} \\
+\end{NiceTabular}
+\end{center}
+
+
\subsection{Notes dans les tableaux}
\label{ex:notes}
@@ -4362,8 +4406,8 @@ nombre total de notes dans le tableau). On utilise alors la clé |widest*| de
\ExplSyntaxOff
\fvset{commandchars=\~\#\!}
\begin{Verbatim}
-\begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-\toprule
+\begin{NiceTabular}{@{}llr@{}}
+\toprule \RowStyle{\bfseries}
Nom & Prénom & Date de naissance \\
\midrule
Achard~emphase#\tabularnote{La famille Achard est une très ancienne famille du Poitou.}!
@@ -4377,8 +4421,8 @@ Dupont & Chantal & 15 janvier 1998 \\
\end{Verbatim}
\begin{center}
-\begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-\toprule
+\begin{NiceTabular}{@{}llr@{}}
+\toprule \RowStyle{\bfseries}
Nom & Prénom & Date de naissance \\
\midrule
Achard\tabularnote{La famille Achard est une très ancienne famille du Poitou.}
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index fdaa5ac42a..095a776390 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{5.18}
-\def\myfiledate{2021/07/15}
+\def\myfileversion{5.19}
+\def\myfiledate{2021/07/23}
%
%
%<*batchfile>
@@ -65,8 +65,6 @@ version 2005/12/01 or later.
\usepackage{titlesec}
\titlespacing*{\section}{0pt}{6.5ex plus 1ex minus .2ex}{4.3ex plus .2ex}
\titlespacing*{\subsection}{0pt}{4.5ex plus 1ex minus .2ex}{2ex plus .2ex}
-\usepackage{multicol}
-\setlength{\columnseprule}{0.4pt}
\usepackage{footnotehyper}
\usepackage{varwidth}
\def\LetterAt{@}
@@ -160,7 +158,7 @@ version 2005/12/01 or later.
% The package \pkg{nicematrix} is entirely contained in the file
% |nicematrix.sty|. This file may be put in the current directory or in a
% |texmf| tree. However, the best is to install \pkg{nicematrix} with a TeX
-% distribution as MiKTeX, TeXlive or MacTeX.
+% distribution such as MiKTeX, TeXlive or MacTeX.
%
% \bigskip
% \emph{Remark}: If you use LaTeX via Internet with, for example, Overleaf, you
@@ -583,7 +581,15 @@ version 2005/12/01 or later.
% by |left|, |right|, |top| and |bottom|;
% \item the keys |t| and |b| fix the base line that will be given to the block
% when it has a multi-line content (the lines are separated by |\\|);
-% \item the keys |hvlines| draws all the vertical and horizontal rules in the block.
+% \item the keys |hvlines| draws all the vertical and horizontal rules in the
+% block;
+% \item \colorbox{yellow!50}{\textbf{New 5.19}}\enskip when the key |tikz| is
+% used, the Tikz path corresponding of the rectangle which delimits the block is
+% executed with Tikz\footnote{Tikz should be loaded (by default,
+% \pkg{nicematrix} only loads \textsc{pgf}) and, if it's not, an error will be
+% raised.} by using as options the value of that key |tikz| (which must be a
+% list of keys allowed for a Tikz path). For examples, cf.
+% p.~\pageref{tikz-key-examples}.
% \end{itemize}
%
% \interitem
@@ -955,7 +961,7 @@ version 2005/12/01 or later.
%
% Here are the tools provided by \pkg{nicematrix} for the rules.
% \begin{itemize}
-% \item the keys |hlines|, |vlines| and |hvlines|;
+% \item the keys |hlines|, |vlines|, |hvlines| and |hvlines-except-borders|;
% \item the specifier ``\verb+|+'' in the preamble (for the environments with
% preamble);
% \item the command |\Hline|.
@@ -967,7 +973,7 @@ version 2005/12/01 or later.
% \begin{itemize}
% \item These blocks are:
% \begin{itemize}
-% \item the blocks created by the command |\Block|\footnote{And also the command \verb|\multicolumn| also
+% \item the blocks created by the command |\Block|\footnote{And also the command \verb|\multicolumn| but
% it's recommended to use instead |\Block| in the environments of
% \pkg{nicematrix}.} presented
% p.~\pageref{Block};
@@ -1007,7 +1013,7 @@ version 2005/12/01 or later.
%
%
%
-% \subsubsection{The key hvlines}
+% \subsubsection{The keys hvlines and hvlines-except-borders}
% \label{hvlines}
%
% The key |hvlines| (no value) is the conjonction of the keys |hlines| and |vlines|.
@@ -1035,7 +1041,7 @@ version 2005/12/01 or later.
%
% \bigskip
% \colorbox{yellow!50}{\bfseries New 5.17}\enskip The key
-% |hvlines-except-corners| is similar to the key |hvlines| but does not draw the
+% |hvlines-except-borders| is similar to the key |hvlines| but does not draw the
% rules on the horizontal and vertical borders of the array.
%
% \subsubsection{The (empty) corners}
@@ -1438,7 +1444,7 @@ version 2005/12/01 or later.
% \begin{BVerbatim}[boxwidth=9cm,baseline=c]
% $\begin{NiceArray}{lll}[hvlines]
% \CodeBefore
-% ~emphase#code-before = \rowcolor{red!15}{1,3-5,8-}@
+% ~emphase#\rowcolor{red!15}{1,3-5,8-}@
% \Body
% a_1 & b_1 & c_1 \\
% a_2 & b_2 & c_2 \\
@@ -2670,7 +2676,7 @@ version 2005/12/01 or later.
% \bigskip
% \colorbox{yellow!50}{\bfseries New 5.18}\enskip In fact, the command
% |\SubMatrix| also takes in two optional arguments specified by the
-% traditionnal symbols |^| and |_| for material in superscript and subscript.
+% traditional symbols |^| and |_| for material in superscript and subscript.
%
% \medskip
% \begin{scope}
@@ -2697,7 +2703,7 @@ version 2005/12/01 or later.
% \bigskip
% The options of the command |\SubMatrix| are as follows:
% \begin{itemize}
-% \item |left-xshift| and |right-shift| shift horizontally the delimiters (there
+% \item |left-xshift| and |right-xshift| shift horizontally the delimiters (there
% exists also the key |xshift| which fixes both parameters);
% \item |extra-height| adds a quantity to the total height of the delimiters
% (height |\ht| + depth |\dp|);
@@ -2869,8 +2875,8 @@ version 2005/12/01 or later.
% \begin{scope}
% \fvset{commandchars=\~\#\!}
% \begin{Verbatim}
-% \begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-% \toprule
+% \begin{NiceTabular}{@{}llr@{}}
+% \toprule \RowStyle{\bfseries}
% Last name & First name & Birth day \\
% \midrule
% Achard\tabularnote{~emphase#Achard is an old family of the Poitou.!}
@@ -2885,8 +2891,8 @@ version 2005/12/01 or later.
% \end{scope}
%
% \begin{center}
-% \begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-% \toprule
+% \begin{NiceTabular}{@{}llr@{}}
+% \toprule \RowStyle{\bfseries}
% Last name & First name & Birth day \\
% \midrule
% Achard\tabularnote{Achard is an old family of the Poitou.}
@@ -3796,11 +3802,11 @@ version 2005/12/01 or later.
% The nodes we have described are not available by default in the |\CodeBefore|
% (described p.~\pageref{code-before}).\par\nobreak
%
-% \colorbox{yellow!50}{\textbf{New 5.16}}\enskip It's possible to have these
-% nodes available in the |\CodeBefore| by using the key |create-cell-nodes| of
-% the keyword |\CodeBefore| (in that case, the nodes are created first before
-% the construction of the array by using informations written on the |aux| file
-% and created a second time during the contruction of the array itself).
+% It's possible to have these nodes available in the |\CodeBefore| by using the
+% key |create-cell-nodes| of the keyword |\CodeBefore| (in that case, the nodes
+% are created first before the construction of the array by using informations
+% written on the |aux| file and created a second time during the contruction of
+% the array itself).
%
% \subsection{The nodes which indicate the position of the rules}
%
@@ -4232,6 +4238,43 @@ version 2005/12/01 or later.
%
% \section{Examples}
%
+% \subsection{Utilisation of the key ``tikz'' of the command \textbackslash Block}
+%\label{tikz-key-examples}
+%
+%
+% \begin{Verbatim}
+% \ttfamily \small
+% \begin{NiceTabular}{m{4.5cm}m{4.5cm}m{4.5cm}}[hvlines]
+% \Block[~emphase#tikz={pattern=grid,pattern color=lightgray}@]{}
+% {pattern = grid,\\ pattern color = lightgray}
+% & \Block[~emphase#tikz={pattern = north west lines,pattern color=blue}@]{}
+% {pattern = north west lines,\\ pattern color = blue}
+% & \Block[~emphase#tikz={outer color = red!50, inner color=white }@]{2-1}
+% {outer color = red!50,\\ inner color = white} \\
+% \Block[~emphase#tikz={pattern = sixpointed stars, pattern color = blue!15}@]{}
+% {pattern = sixpointed stars,\\ pattern color = blue!15}
+% & \Block[~emphase#tikz={left color = blue!50}@]{}
+% {left color = blue!50} \\
+% \end{NiceTabular}
+% \end{Verbatim}
+%
+% \begin{center}
+% \ttfamily \small
+% \begin{NiceTabular}{m{4.5cm}m{4.5cm}m{4.5cm}}[hvlines]
+% \Block[tikz={pattern=grid,pattern color=lightgray}]{}
+% {pattern = grid,\\ pattern color = lightgray}
+% & \Block[tikz={pattern = north west lines,pattern color=blue}]{}
+% {pattern = north west lines,\\ pattern color = blue}
+% & \Block[tikz={outer color = red!50, inner color=white }]{2-1}
+% {outer color = red!50,\\ inner color = white} \\
+% \Block[tikz={pattern = sixpointed stars, pattern color = blue!15}]{}
+% {pattern = sixpointed stars,\\ pattern color = blue!15}
+% & \Block[tikz={left color = blue!50}]{}
+% {left color = blue!50} \\
+% \end{NiceTabular}
+% \end{center}
+%
+%
% \subsection{Notes in the tabulars}
%
% \label{ex:notes}
@@ -4302,8 +4345,8 @@ version 2005/12/01 or later.
% }
% \ExplSyntaxOff
% \begin{Verbatim}
-% \begin{NiceTabular}{~@{}llr~@{}}[first-row,code-for-first-row = \bfseries]
-% \toprule
+% \begin{NiceTabular}{~@{}llr~@{}}
+% \toprule \RowStyle{\bfseries}
% Last name & First name & Birth day \\
% \midrule
% Achard\tabularnote{~emphase#Achard is an old family of the Poitou.@}
@@ -4317,8 +4360,8 @@ version 2005/12/01 or later.
% \end{Verbatim}
%
% \begin{center}
-% \begin{NiceTabular}{@{}llr@{}}[first-row,code-for-first-row = \bfseries]
-% \toprule
+% \begin{NiceTabular}{@{}llr@{}}
+% \toprule \RowStyle{\bfseries}
% Last name & First name & Birth day \\
% \midrule
% Achard\tabularnote{Achard is an old family of the Poitou.}
@@ -5002,7 +5045,8 @@ version 2005/12/01 or later.
% \end{macrocode}
%
%
-% We give the traditional declaration of a package written with |expl3|:
+% We give the traditional declaration of a package written with the L3
+% programming layer.
% \begin{macrocode}
\RequirePackage{l3keys2e}
\ProvidesExplPackage
@@ -5250,10 +5294,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% We need that line for the case where you use \verb+||+ with \pkg{colortbl} loaded.
-% \begin{macrocode}
-\cs_set_protected:Npn \CT@drsc@ { }
-% \end{macrocode}
%
% \bigskip
% We have to redefine |\cline| for several reasons. The command |\@@_cline| will
@@ -5478,7 +5518,8 @@ version 2005/12/01 or later.
% For compatibility with versions prior to 5.0, we provide a load-time option
% |define_L_C_R|. With this option, it's possible to use the letters |L|, |C|
% and |R| instead of |l|, |c| and |r| in the preamble of the environments of
-% \pkg{nicematrix} as it was mandatory before version~5.0.
+% \pkg{nicematrix} as it was mandatory before version~5.0. This key will
+% probably be deleted in a future version.
% \begin{macrocode}
\bool_new:N \c_@@_define_L_C_R_bool
% \end{macrocode}
@@ -5639,6 +5680,7 @@ version 2005/12/01 or later.
\tl_new:N \g_@@_aux_tl
% \end{macrocode}
%
+%
% \bigskip
% \begin{macrocode}
\cs_new_protected:Npn \@@_test_if_math_mode:
@@ -5743,6 +5785,21 @@ version 2005/12/01 or later.
\tl_new:N \l_@@_rules_color_tl
% \end{macrocode}
%
+% \bigskip
+% The number of letters |X| in the preamble of the array.
+% \begin{macrocode}
+\int_new:N \g_@@_nb_of_X_int
+% \end{macrocode}
+%
+% If there is at least one |X|-column in the preamble of the array, the
+% following flag will be raised via the |aux| file. The length
+% |l_@@_x_columns_dim| will be the width of the |X|-columns. That value is
+% computed after the contruction of the array during the first compilation in
+% order to be used in the following run.
+% \begin{macrocode}
+\bool_new:N \l_@@_X_columns_aux_bool
+\dim_new:N \l_@@_X_columns_dim
+% \end{macrocode}
%
% \bigskip
% This boolean will be used only to detect in an expandable way whether we are
@@ -5805,9 +5862,9 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% \pkg{expl3} provides scratch dimensions |\l_tmpa_dim| and |\l_tmpb_dim|. We
-% creates two more in the same spirit (if they don't exist yet: that's why we
-% use |\dim_zero_new:N|).
+% The L3 programming layer provides scratch dimensions |\l_tmpa_dim| and
+% |\l_tmpb_dim|. We creates two more in the same spirit (if they don't exist
+% yet: that's why we use |\dim_zero_new:N|).
% \begin{macrocode}
\dim_zero_new:N \l_tmpc_dim
\dim_zero_new:N \l_tmpd_dim
@@ -5933,11 +5990,12 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% The following parameters correspond to the keys |fill|, |draw|, |borders| and
-% |rounded-corners| of the command |\Block|.
+% The following parameters correspond to the keys |fill|, |draw|, |tikz|, |borders|,
+% and |rounded-corners| of the command |\Block|.
% \begin{macrocode}
\tl_new:N \l_@@_fill_tl
\tl_new:N \l_@@_draw_tl
+\seq_new:N \l_@@_tikz_seq
\clist_new:N \l_@@_borders_clist
\dim_new:N \l_@@_rounded_corners_dim
% \end{macrocode}
@@ -5946,8 +6004,7 @@ version 2005/12/01 or later.
% |corners| is used).
%
% \medskip
-% The following token list correspond to the key |color| of the command
-% |\Block|.
+% The following token list correspond to the key |color| of the command |\Block|.
% \begin{macrocode}
\tl_new:N \l_@@_color_tl
% \end{macrocode}
@@ -7126,7 +7183,13 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_Cell:
{
- \tl_gclear:N \g_@@_exit_cell_tl
+% \end{macrocode}
+% The token list |\g_@@_post_treatment_cell_tl| will be set during the
+% composition of the box |\l_@@_cell_box| and will be used \emph{after} the
+% composition in order to modify that box (that's why it's called a
+% \emph{post-treatment}).
+% \begin{macrocode}
+ \tl_gclear:N \g_@@_post_treatment_cell_tl
% \end{macrocode}
% At the beginning of the cell, we link |\CodeAfter| to a command which do
% \emph{not} begin with |\omit| (whereas the standard version of |\CodeAfter|
@@ -7285,7 +7348,12 @@ version 2005/12/01 or later.
{
\@@_math_toggle_token:
\hbox_set_end:
- \g_@@_exit_cell_tl
+% \end{macrocode}
+% The token list |\g_@@_post_treatment_cell_tl| is (potentially) set during the
+% composition of the box |\l_@@_cell_box| and is used now \emph{after} the
+% composition in order to modify that box.
+% \begin{macrocode}
+ \g_@@_post_treatment_cell_tl
\bool_if:NT \g_@@_rotate_bool \@@_rotate_cell_box:
\@@_adjust_size_box:
% \end{macrocode}
@@ -8044,7 +8112,7 @@ version 2005/12/01 or later.
{
\tl_gput_right:Nn \g_@@_row_style_tl
{
- \tl_gput_right:Nn \g_@@_exit_cell_tl
+ \tl_gput_right:Nn \g_@@_post_treatment_cell_tl
{ \dim_set:Nn \l_@@_cell_space_top_limit_dim { #1 } }
}
} ,
@@ -8053,7 +8121,7 @@ version 2005/12/01 or later.
{
\tl_gput_right:Nn \g_@@_row_style_tl
{
- \tl_gput_right:Nn \g_@@_exit_cell_tl
+ \tl_gput_right:Nn \g_@@_post_treatment_cell_tl
{ \dim_set:Nn \l_@@_cell_space_bottom_limit_dim { #1 } }
}
} ,
@@ -8439,6 +8507,29 @@ version 2005/12/01 or later.
% End of the construction of the array (in the box |\l_@@_the_array_box|).
%
% \bigskip
+% Now, if there is at least one |X|-column in the environment, we compute the
+% width that those columns will have (in the next compilation).
+% \begin{macrocode}
+ \int_compare:nNnT \g_@@_nb_of_X_int > 0
+ {
+ \bool_if:NTF \l_@@_X_columns_aux_bool
+ { \dim_set_eq:NN \l_tmpa_dim \l_@@_X_columns_dim }
+ {
+ \dim_set:Nn \l_tmpa_dim
+ {
+ ( \textwidth - \box_wd:N \l_@@_the_array_box )
+ / \int_use:N \g_@@_nb_of_X_int
+ }
+ }
+ \tl_gput_right:Nx \g_@@_aux_tl
+ {
+ \bool_set_true:N \l_@@_X_columns_aux_bool
+ \dim_set:Nn \l_@@_X_columns_dim { \dim_use:N \l_tmpa_dim }
+ }
+ }
+% \end{macrocode}
+%
+% \bigskip
% It the user has used the key |last-row| with a value, we control that the
% given value is correct (since we have just constructed the array, we know the
% real number of rows of the array).
@@ -8626,10 +8717,11 @@ version 2005/12/01 or later.
% current environment.
% \begin{macrocode}
\iow_now:Nn \@mainaux { \ExplSyntaxOn }
+ \iow_now:Nn \@mainaux { \char_set_catcode_space:n { 32 } }
\iow_now:Nx \@mainaux
{
\tl_gset:cn { c_@@_ \int_use:N \g_@@_env_int _ tl }
- \iow_newline: { \iow_newline: \exp_not:V \g_@@_aux_tl }
+ { \exp_not:V \g_@@_aux_tl }
}
\iow_now:Nn \@mainaux { \ExplSyntaxOff }
% \end{macrocode}
@@ -8660,7 +8752,7 @@ version 2005/12/01 or later.
% using |\newcolumntype|).
%
% Since we use the tools of \pkg{array} to do this expansion, we will have a
-% programmation which is not in the style of \pkg{expl3}.
+% programmation which is not in the style of the L3 programming layer.
%
%
% \bigskip
@@ -8686,7 +8778,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% First, we have to store our preamble in the token register |\@temptokena|
-% (those ``token registers'' are \emph{not} supported by \pkg{expl3}).
+% (those ``token registers'' are \emph{not} supported by the L3 programming layer).
% \begin{macrocode}
\exp_args:NV \@temptokena \g_@@_preamble_tl
% \end{macrocode}
@@ -8729,6 +8821,10 @@ version 2005/12/01 or later.
}
}
% \end{macrocode}
+% The number of letters |X| in the preamble of the array.
+% \begin{macrocode}
+ \int_gzero:N \g_@@_nb_of_X_int
+% \end{macrocode}
% The sequence |\g_@@_cols_vlsim_seq| will contain the numbers of the columns
% where you will to have to draw vertical lines in the potential sub-matrices
% (hence the name |vlism|).
@@ -8784,7 +8880,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% We complete the preamble with the potential ``exterior columns''.
+% We complete the preamble with the potential ``exterior columns'' (on both sides).
% \begin{macrocode}
\int_compare:nNnTF \l_@@_first_col_int = 0
{ \tl_gput_left:NV \g_@@_preamble_tl \c_@@_preamble_first_col_tl }
@@ -8811,7 +8907,7 @@ version 2005/12/01 or later.
{ \tl_gput_right:Nn \g_@@_preamble_tl { @ { } } }
}
% \end{macrocode}
-% We add a last column to raise a good error message when the user put more
+% We add a last column to raise a good error message when the user puts more
% columns than allowed by its preamble. However, for technical reasons, it's not
% possible to do that in |{NiceTabular*}| (|\l_@@_tabular_width_dim|=0pt).
% \begin{macrocode}
@@ -8837,8 +8933,8 @@ version 2005/12/01 or later.
@ { \@@_patch_preamble_ii:nn #1 }
| { \@@_patch_preamble_iii:n #1 }
p { \@@_patch_preamble_iv:nnn t #1 }
- m { \@@_patch_preamble_iv:nnn c #1 }
b { \@@_patch_preamble_iv:nnn b #1 }
+ m { \@@_patch_preamble_iv:nnn b #1 }
\@@_w: { \@@_patch_preamble_v:nnnn { } #1 }
\@@_W: { \@@_patch_preamble_v:nnnn { \cs_set_eq:NN \hss \hfil } #1 }
\@@_true_c: { \@@_patch_preamble_vi:n #1 }
@@ -8848,6 +8944,7 @@ version 2005/12/01 or later.
) { \@@_patch_preamble_viii:nn #1 }
] { \@@_patch_preamble_viii:nn #1 }
\} { \@@_patch_preamble_viii:nn #1 }
+ X { \@@_patch_preamble_xii: }
C { \@@_error:nn { old~column~type } #1 }
L { \@@_error:nn { old~column~type } #1 }
R { \@@_error:nn { old~column~type } #1 }
@@ -8959,7 +9056,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% For |p|, |m| and |b|
+% For |p| and |b|
% \begin{macrocode}
\cs_new_protected:Npn \@@_patch_preamble_iv:nnn #1 #2 #3
{
@@ -8968,14 +9065,29 @@ version 2005/12/01 or later.
> {
\@@_Cell:
\begin { minipage } [ #1 ] { \dim_eval:n { #3 } }
- \mode_leave_vertical:
+% \end{macrocode}
+% The following lines have been taken from |array.sty|.
+% \begin{macrocode}
+ \everypar
+ {
+ \vrule height \box_ht:N \@arstrutbox width \c_zero_dim
+ \everypar { }
+ }
+ \g_@@_row_style_tl % added the 2021-07-17
\arraybackslash
- \vrule height \box_ht:N \@arstrutbox depth 0 pt width 0 pt
}
c
< {
- \vrule height 0 pt depth \box_dp:N \@arstrutbox width 0 pt
+% \end{macrocode}
+% The following line has been taken from |array.sty|.
+% \begin{macrocode}
+ \@finalstrut \@arstrutbox
\end { minipage }
+% \end{macrocode}
+% If the letter in the preamble is |m|, you require a post-treatment for the box
+% |\l_@@_cell_box|.
+% \begin{macrocode}
+ \str_if_eq:nnT { #2 } m \@@_center_cell_box:
\@@_end_Cell:
}
}
@@ -8987,6 +9099,42 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+% \bigskip
+% The following command will be used in |m|-columns in order to center
+% vertically the box. In fact, despite its name, the command does not always
+% center the cell. Indeed, if there is only one row in the cell, it should not
+% be centered vertically. It's not possible to know the number of rows of the
+% cell. However, you consider (as in \pkg{array}) that if the height of the cell
+% is no more that the height of |\@arstrutbox|, there is only one row.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_center_cell_box:
+ {
+% \end{macrocode}
+% By putting instructions in |\g_@@_post_treatment_cell_tl|, we require a
+% post-treatment of the box |\l_@@_cell_box|.
+% \begin{macrocode}
+ \tl_gput_right:Nn \g_@@_post_treatment_cell_tl
+ {
+ \int_compare:nNnT
+ { \box_ht:N \l_@@_cell_box }
+ >
+ { \box_ht:N \@arstrutbox }
+ {
+ \hbox_set:Nn \l_@@_cell_box
+ {
+ \box_move_down:nn
+ {
+ ( \box_ht:N \l_@@_cell_box - \box_ht:N \@arstrutbox
+ + \baselineskip ) / 2
+ }
+ { \box_use:N \l_@@_cell_box }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+%
% \medskip
% For |w| and |W|
% \begin{macrocode}
@@ -9192,7 +9340,42 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-%
+% \bigskip
+% For the case of a letter |X|
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_patch_preamble_xii:
+ {
+ \int_gincr:N \g_@@_nb_of_X_int
+% \end{macrocode}
+% We test whether you know the width of the |X|-columns by reading the value in
+% the |aux| file (of course, this is not possible at the first compilation).
+% \begin{macrocode}
+ \bool_if:NTF \l_@@_X_columns_aux_bool
+ { \exp_args:NNNV \@@_patch_preamble_iv:nnn t p \l_@@_X_columns_dim }
+ {
+ \tl_gput_right:Nn \g_@@_preamble_tl
+ {
+ > {
+ \@@_Cell:
+ \tl_set:Nn \l_@@_cell_type_tl { c }
+% \end{macrocode}
+% The following code will nullify the box of the cell.
+% \begin{macrocode}
+ \tl_gput_right:Nn \g_@@_post_treatment_cell_tl
+ { \hbox_set:Nn \l_@@_cell_box { } }
+% \end{macrocode}
+% The content of the cell is composed in |\l_tmpa_box| which will be discarded.
+% \begin{macrocode}
+ }
+ c
+ < { \@@_end_Cell: }
+ }
+ \int_gincr:N \c@jCol
+ \@@_patch_preamble_x:n
+ }
+ }
+% \end{macrocode}
+%
% \bigskip
% \subsection*{The redefinition of \textbackslash multicolumn}
%
@@ -9555,7 +9738,13 @@ version 2005/12/01 or later.
% notes (that means that a |\vtop{\hsize=...}| is not enough).
% \begin{macrocode}
\begin { minipage } [ t ] { \box_wd:N \l_@@_the_array_box }
- \box_use_drop:N \l_@@_the_array_box
+% \end{macrocode}
+% The |\hbox| avoids that the |pgfpicture| inside |\@@_draw_blocks| adds a extra
+% vertical space before the notes.
+% \begin{macrocode}
+ \hbox:n
+ {
+ \box_use_drop:N \l_@@_the_array_box
% \end{macrocode}
% We have to draw the blocks right now because there may be tabular notes in
% some blocks (which are not mono-column: the blocks which are mono-column
@@ -9563,8 +9752,9 @@ version 2005/12/01 or later.
% extra nodes before creating the blocks since there are |medium| nodes to create
% for the blocks.
% \begin{macrocode}
- \@@_create_extra_nodes:
- \seq_if_empty:NF \g_@@_blocks_seq \@@_draw_blocks:
+ \@@_create_extra_nodes:
+ \seq_if_empty:NF \g_@@_blocks_seq \@@_draw_blocks:
+ }
\bool_lazy_or:nnT
{ \int_compare_p:nNn \c@tabularnote > 0 }
{ ! \tl_if_empty_p:V \l_@@_tabularnote_tl }
@@ -9729,6 +9919,10 @@ version 2005/12/01 or later.
\vcenter
{
\vbox_to_ht:nn
+% \end{macrocode}
+% Here, you should use |\box_ht_plus_dp:N| when TeXLive 2021 will be available
+% on Overleaf.
+% \begin{macrocode}
{ \box_ht:N \l_tmpa_box + \box_dp:N \l_tmpa_box }
{ }
}
@@ -9742,6 +9936,10 @@ version 2005/12/01 or later.
\c_math_toggle_token
\left .
\vbox_to_ht:nn
+% \end{macrocode}
+% Here, you should use |\box_ht_plus_dp:N| when TeXLive 2021 will be available
+% on Overleaf.
+% \begin{macrocode}
{ \box_ht:N \l_tmpa_box + \box_dp:N \l_tmpa_box }
{ }
\right #2
@@ -10022,8 +10220,8 @@ version 2005/12/01 or later.
% \begin{macrocode}
\int_gset:Nn \g_tmpa_int 1
\bool_if:NTF \g_@@_last_col_found_bool
- { \prg_replicate:nn { \g_@@_col_total_int - 3 } }
- { \prg_replicate:nn { \g_@@_col_total_int - 2 } }
+ { \prg_replicate:nn { \int_max:nn { \g_@@_col_total_int - 3 } 0 } }
+ { \prg_replicate:nn { \int_max:nn { \g_@@_col_total_int - 2 } 0 } }
{
&
\omit
@@ -10465,8 +10663,7 @@ version 2005/12/01 or later.
\int_use:N \l_@@_first_col_int ,
\int_use:N \c@jCol ,
\int_use:N \g_@@_col_total_int
- }
- \iow_newline:
+ }
}
% \end{macrocode}
% We write also the potential content of |\g_@@_pos_of_blocks_seq| (it will be
@@ -10478,7 +10675,6 @@ version 2005/12/01 or later.
{
\seq_gset_from_clist:Nn \exp_not:N \g_@@_pos_of_blocks_seq
{ \seq_use:Nnnn \g_@@_pos_of_blocks_seq , , , }
- \iow_newline:
}
}
\seq_if_empty:NF \g_@@_multicolumn_cells_seq
@@ -10487,10 +10683,8 @@ version 2005/12/01 or later.
{
\seq_gset_from_clist:Nn \exp_not:N \g_@@_multicolumn_cells_seq
{ \seq_use:Nnnn \g_@@_multicolumn_cells_seq , , , }
- \iow_newline:
\seq_gset_from_clist:Nn \exp_not:N \g_@@_multicolumn_sizes_seq
{ \seq_use:Nnnn \g_@@_multicolumn_sizes_seq , , , }
- \iow_newline:
}
}
% \end{macrocode}
@@ -10674,12 +10868,12 @@ version 2005/12/01 or later.
{
\tl_gset:Nn \exp_not:N \g_@@_code_before_tl
{ \exp_not:V \g_nicematrix_code_before_tl }
- \iow_newline:
}
\bool_set_true:N \l_@@_code_before_bool
}
% \end{macrocode}
-%
+%
+%
% \begin{macrocode}
% \bool_if:NT \l_@@_code_before_bool \@@_write_aux_for_cell_nodes:
% \end{macrocode}
@@ -11787,7 +11981,7 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% \subsection*{The actual instructions for drawing the dotted line with Tikz}
+% \subsection*{The actual instructions for drawing the dotted lines with Tikz}
%
% The command |\@@_draw_line:| should be used in a |{pgfpicture}|. It has six
% implicit arguments:
@@ -11916,7 +12110,7 @@ version 2005/12/01 or later.
\group_begin:
% \end{macrocode}
% The dimension |\l_@@_l_dim| is the length $\ell$ of the line to draw. We use
-% the floating point reals of \pkg{expl3} to compute this length.
+% the floating point reals of the L3 programming layer to compute this length.
% \begin{macrocode}
\dim_zero_new:N \l_@@_l_dim
\dim_set:Nn \l_@@_l_dim
@@ -13373,9 +13567,12 @@ version 2005/12/01 or later.
\dim_set_eq:NN \l_tmpb_dim \pgf@x
\@@_qpoint:n { row - \@@_succ:n { #4 } }
\dim_set_eq:NN \l_tmpc_dim \pgf@y
- \bool_lazy_and:nnT
- { \int_compare_p:nNn { #2 } > 1 }
- { ! \tl_if_blank_p:V \CT@drsc@ }
+ \bool_lazy_all:nT
+ {
+ { \int_compare_p:nNn { #2 } > 1 }
+ { \cs_if_exist_p:N \CT@drsc@ } % condition added in version 5.18a
+ { ! \tl_if_blank_p:V \CT@drsc@ }
+ }
{
\group_begin:
\CT@drsc@
@@ -13768,7 +13965,6 @@ version 2005/12/01 or later.
{
\seq_set_from_clist:Nn \exp_not:N \l_@@_corners_cells_seq
{ \seq_use:Nnnn \l_@@_corners_cells_seq , , , }
- \iow_newline:
}
}
}
@@ -14701,9 +14897,15 @@ version 2005/12/01 or later.
% why we have two macros: |\@@_Block_iv:nnnnn| and |\@@_Block_v:nnnnn| (the five
% arguments of those macros are provided by curryfication).
% \begin{macrocode}
- \bool_lazy_or:nnTF
- { \int_compare_p:nNn { \l_tmpa_int } = 1 }
- { \int_compare_p:nNn { \l_tmpb_int } = 1 }
+ \bool_if:nTF
+ {
+ (
+ \int_compare_p:nNn { \l_tmpa_int } = 1
+ ||
+ \int_compare_p:nNn { \l_tmpb_int } = 1
+ )
+ && ! \tl_if_empty_p:n { #5 }
+ }
{ \exp_args:Nxx \@@_Block_iv:nnnnn }
{ \exp_args:Nxx \@@_Block_v:nnnnn }
{ \l_tmpa_int } { \l_tmpb_int } { #3 } { #4 } { #5 }
@@ -14742,9 +14944,9 @@ version 2005/12/01 or later.
% \end{macrocode}
% For a mono-column block, if the user has specified a color for the column in
% the preamble of the array, we want to fix that color in the box we construct.
-% We do that with |\set@color| and not |\color_ensure_current:| because that
-% command seems to be bugged: it doesn't work in XeLaTeX when \pkg{fontspec} is
-% loaded.
+% We do that with |\set@color| and not |\color_ensure_current:| (in order to use
+% |\color_ensure_current:| safely, you should load \pkg{l3backend} before the
+% |\documentclass| with |\RequirePackage{expl3}|).
% \begin{macrocode}
\tl_if_empty:NTF \l_@@_color_tl
{ \int_compare:nNnT { #2 } = 1 \set@color }
@@ -14932,6 +15134,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block / SecondPass }
{
+ tikz .code:n =
+ \bool_if:NTF \c_@@_tikz_loaded_bool
+ { \seq_put_right:Nn \l_@@_tikz_seq { { #1 } } }
+ { \@@_error:n { tikz~key~without~tikz } } ,
+ tikz .value_required:n = true ,
fill .tl_set:N = \l_@@_fill_tl ,
fill .value_required:n = true ,
draw .tl_set:N = \l_@@_draw_tl ,
@@ -15031,7 +15238,7 @@ version 2005/12/01 or later.
%
% \begin{macrocode}
\cs_new_protected:Npn \@@_Block_v:nnnnnn #1 #2 #3 #4 #5 #6
- {
+ {
% \end{macrocode}
% The sequence of the positions of the blocks will be used when drawing the rules
% (in fact, there is also the |\multicolumn| and the |\diagbox| in that sequence).
@@ -15107,6 +15314,21 @@ version 2005/12/01 or later.
}
}
% \end{macrocode}
+%
+% \begin{macrocode}
+ \seq_if_empty:NF \l_@@_tikz_seq
+ {
+ \tl_gput_right:Nx \g_nicematrix_code_before_tl
+ {
+ \@@_block_tikz:nnnnn
+ { #1 }
+ { #2 }
+ { \int_use:N \l_@@_last_row_int }
+ { \int_use:N \l_@@_last_col_int }
+ { \seq_use:Nn \l_@@_tikz_seq { , } }
+ }
+ }
+% \end{macrocode}
%
% \medskip
% \begin{macrocode}
@@ -15630,6 +15852,25 @@ version 2005/12/01 or later.
line-width .dim_set:N = \l_@@_line_width_dim
}
% \end{macrocode}
+%
+% \bigskip
+% The following command will be used if the key |tikz| has been used for the
+% command |\Block|. The arguments |#1| and |#2| are the coordinates of the first
+% cell and |#3| and |#4| the coordinates of the last cell of the block. |#5| is
+% a comma-separated list of the Tikz keys used with the path.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_block_tikz:nnnnn #1 #2 #3 #4 #5
+ {
+ \begin { tikzpicture }
+ \clist_map_inline:nn { #5 }
+ {
+ \path [ ##1 ]
+ ( #1 -| #2 ) rectangle ( \@@_succ:n { #3 } -| \@@_succ:n { #4 } ) ;
+ }
+ \end { tikzpicture }
+ }
+% \end{macrocode}
+%
%
% \subsection*{How to draw the dotted lines transparently}
% \begin{macrocode}
@@ -16821,7 +17062,7 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-%
+%
% \begin{macrocode}
\@@_msg_new:nn { too~much~cols~for~matrix~with~last~col }
{
@@ -17121,6 +17362,15 @@ version 2005/12/01 or later.
If~you~go~on,~this~specification~of~border~will~be~ignored.
}
% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_msg_new:nn { tikz~key~without~tikz }
+ {
+ You~can't~use~the~key~'tikz'~for~the~command~'\token_to_str:N
+ \Block'~because~you~have~not~loaded~Tikz.~
+ If~you~go~on,~this~key~will~be~ignored.
+ }
+% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { last-col~non~empty~for~NiceArray }
@@ -17257,7 +17507,7 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~b,~borders,~c,~draw,~fill,~
- hvlines,~l,~line-width,~rounded-corners,~r~and~t.
+ hvlines,~l,~line-width,~rounded-corners,~r,~t~and~tikz.
}
% \end{macrocode}
%
@@ -18064,6 +18314,10 @@ version 2005/12/01 or later.
%
% New command |\RowStyle|
%
+% \subsection*{Changes between versions 5.18 and 5.19}
+%
+% New key |tikz| for the command |\Block|.
+%
% \PrintIndex
%
% \tableofcontents
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index 18b8189cdf..db334606da 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index b237591ac0..ee69f8e313 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index ece459f91d..595ebf9f25 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
index eb34d5f83e..40b469a972 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc.dtx b/macros/latex/contrib/projlib/ProjLib-doc.dtx
index 6932d8bf52..6da315bd79 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc.dtx
+++ b/macros/latex/contrib/projlib/ProjLib-doc.dtx
@@ -109,7 +109,7 @@
%<*ProjLib-doc-cn>
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/07/12}}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/07/23}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{2021年7月,北京}
%</ProjLib-doc-cn>
@@ -117,7 +117,7 @@
%<*ProjLib-doc-en>
\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/07/12}}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/07/23}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{July 2021, Beijing}
%</ProjLib-doc-en>
@@ -125,7 +125,7 @@
%<*ProjLib-doc-fr>
\title{La boîte à outils~\,\ProjLib{}\\[.3\baselineskip]\normalsize Manuel d'utilisation}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\ProjLib{}~2021/07/12}}
+\thanks{Correspondant à : \texttt{\ProjLib{}~2021/07/23}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{juillet 2021, à Pékin}
%</ProjLib-doc-fr>
@@ -829,8 +829,8 @@ For details on how to select a language, please refer to the section on \PJLlang
\PJLdraft{} propose les macros suivantes :
\begin{itemize}
- \item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
- \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
+ \item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
+ \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
\end{itemize}
Pour plus de détails sur la façon de sélectionner une langue, veuillez vous référer à la section sur \PJLlang{}.
@@ -1530,11 +1530,11 @@ Ensuite, créez cet environnement de l'une des cinq manières suivantes :
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
\begin{itemize}
- \item Define an unnumbered environment \meta{name of environment}
+ \item Définir un environnement non numéroté \meta{name of environment}
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
\begin{itemize}
- \item Définir un environnement non numéroté \meta{name of environment}, numéroté dans l'ordre 1,2,3,\dots
+ \item Définir un environnement numéroté \meta{name of environment}, numéroté dans l'ordre 1, 2, 3, \dots
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
\begin{itemize}
@@ -1590,7 +1590,6 @@ définit un environnement non numéroté \lstinline|proofidea*| et un environnem
\begin{itemize}[itemsep=.6em]
\item \PJLauthor{} 仍然处于初步阶段,在很多方面还远远比不上相对成熟的 \textsf{authblk}。
\item \PJLlang{}:针对 \textsf{polyglossia} 的设置仍然存在许多问题,因此现在主要功能都是通过 \textsf{babel} 实现的。
- \item \PJLlang{}:语言选项的设定存在问题,如 \texttt{chinese} 会导致 \textsf{babel} 报错,并且不同选项间还可能产生冲突。
\item \PJLpaper{} 的 \texttt{preview} 功能主要是通过 \textsf{geometry} 宏包实现的,因此在 \textsc{\textsf{Koma}} 文档类中效果不好。
\item \PJLthm{} 对于定理类环境的编号与样式设定目前还无法由用户更改。
\item \PJLthm{}:智能引用针对所有 \PJLlang{} 已支持语言的本地化尚不完整,主要是中文、日文与俄文。
@@ -1605,7 +1604,6 @@ définit un environnement non numéroté \lstinline|proofidea*| et un environnem
\begin{itemize}[itemsep=.6em]
\item \PJLauthor{} is still in its preliminary stage, its effect is not as good as the relatively mature \textsf{authblk}.
\item \PJLlang{}: It is still quite problematic with the configuration of \textsf{polyglossia}, so main features are implemented through \textsf{babel} for now.
- \item \PJLlang{}: There are some problems with the language options. For example, \texttt{chinese} will cause errors with \textsf{babel}. Also, conflicts among multiple options may occur.
\item \PJLpaper{}: the \texttt{preview} option is mainly implemented with the help of package \textsf{geometry}, so it does not work quite as well in the \textsc{\textsf{Koma}} document classes.
\item \PJLthm{}: The numbering and theorem-style settings of the theorem-like environments cannot be accessed by the user at present.
\item \PJLthm{}: The localization of \textsf{cleveref} is not yet complete for all supported languages of \PJLlang{}, especially for Chinese, Japanese and Russian.
@@ -1620,7 +1618,6 @@ définit un environnement non numéroté \lstinline|proofidea*| et un environnem
\begin{itemize}[itemsep=.6em]
\item \PJLauthor{} est encore à son stade préliminaire, son effet n'est pas aussi bon que le \textsf{authblk} qui est relativement mature.
\item \PJLlang{} : C'est encore assez problématique avec la configuration de \textsf{polyglossia}, donc les fonctionnalités principales sont implémentées via \textsf{babel} pour le moment.
- \item \PJLlang{} : Il y a quelques problèmes avec les options de langue. Par exemple, \texttt{chinese} provoquera des erreurs avec \textsf{babel}. D'autre part, des conflits entre plusieurs options peuvent survenir.
\item \PJLpaper{} : l'option \texttt{preview} est principalement implémentée à l'aide du package \textsf{geometry}, elle ne fonctionne donc pas aussi bien dans les classes de documents \textsc{\textsf{Koma}}.
\item \PJLthm{} : les paramètres de numérotation et de style théorème des environnements de type théorème ne sont actuellement pas accessibles à l'utilisateur.
\item \PJLthm{} : la localisation de \textsf{cleveref} n'est pas encore finie pour toutes les langues prises en charge par \PJLlang{}, en particulier pour le chinois, le japonais et le russe.
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index b48967e488..634c196156 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -18,57 +18,57 @@
%
%<*ProjLib>
\ProvidesPackage{ProjLib}
- [2021/07/12 The collective interface of ProjLib toolkit]
+ [2021/07/23 The collective interface of ProjLib toolkit]
%</ProjLib>
%
%<*PJLamssim>
\ProvidesPackage{PJLamssim}
- [2021/07/12 Simulate some features of amsart]
+ [2021/07/23 Simulate some features of amsart]
%</PJLamssim>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/07/12 Enhanced author information block]
+ [2021/07/23 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/07/12 Convert yyyy-mm-dd to normal datetime format]
+ [2021/07/23 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/07/12 Some useful macros for the draft stage]
+ [2021/07/23 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/07/12 Multi-language configuration]
+ [2021/07/23 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/07/12 The ProjLib logo]
+ [2021/07/23 The ProjLib logo]
%</PJLlogo>
%
%<*PJLmath>
\ProvidesPackage{PJLmath}
- [2021/07/12 Useful math macros and shortcuts]
+ [2021/07/23 Useful math macros and shortcuts]
%</PJLmath>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/07/12 Paper style configuration]
+ [2021/07/23 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/07/12 Theorem setup and configuration]
+ [2021/07/23 Theorem setup and configuration]
%</PJLthm>
%
%<*PJLtoolkit>
\ProvidesPackage{PJLtoolkit}
- [2021/07/12 Collective interface of ProjLib Toolkit]
+ [2021/07/23 Collective interface of ProjLib Toolkit]
%</PJLtoolkit>
%
%# 下面两行引入宏包的代码是所有文件共用的。
@@ -615,6 +615,18 @@
%# Process options
\ProcessKeyvalOptions*\relax
+%# 从全局参数中去除 chinese 和 Chinese
+%# Remove chinese and Chinese from global options
+\ExplSyntaxOn
+\cs_new_protected:cpn { @clearglobaloption } #1
+ {
+ \clist_remove_all:cn { @classoptionslist } { #1 }
+ }
+\ExplSyntaxOff
+
+\@clearglobaloption{chinese}
+\@clearglobaloption{Chinese}
+
%# 默认语言:英语
%# Default main language: English
\providecommand{\PJLlang@mainlang}{EN}
diff --git a/macros/latex/contrib/spbmark/spbmark.dtx b/macros/latex/contrib/spbmark/spbmark.dtx
index 33498e535e..ba9cc49e69 100644
--- a/macros/latex/contrib/spbmark/spbmark.dtx
+++ b/macros/latex/contrib/spbmark/spbmark.dtx
@@ -23,7 +23,7 @@
%
% \title{\pkg{spbmark} -- Customize superscripts and subscripts}
% \author{Qu Yi}
-% \date{2021/07/22\hskip 1em\relax v1.02\thanks{\url{https://github.com/texl3/spbmark}}}
+% \date{2021/07/22\hskip 1em\relax v1.03\thanks{\url{https://github.com/texl3/spbmark}}}
%
% \maketitle
% \begin{abstract}
@@ -136,7 +136,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2018/12/31]
\RequirePackage{xparse,l3keys2e}
-\ProvidesExplPackage{spbmark}{2021/07/22}{1.02}
+\ProvidesExplPackage{spbmark}{2021/07/22}{1.03}
{Customize superscripts and subscripts}
\cs_new_protected:Npn \spb_define:n { \keys_define:nn { spbmark } }
@@ -175,8 +175,6 @@
\tl_set:Nn \l__spb_boxb_wd_tl { \box_wd:N \l_tmpb_box }
\cs_new:Npn \spb_tmp_boxa_use: { \box_use:N \l_tmpa_box }
\cs_new:Npn \spb_tmp_boxb_use: { \box_use:N \l_tmpb_box }
-\cs_new:Npn \spb_tmp_hboxa_set:n #1 { \hbox_set:Nn \l_tmpa_box {#1} }
-\cs_new:Npn \spb_tmp_hboxb_set:n #1 { \hbox_set:Nn \l_tmpb_box {#1} }
\cs_new:Npn \spb_box_max_dim_horizontal:
{
\skip_horizontal:n
@@ -194,6 +192,26 @@
\spb_boxwd_subtract:nnnn { -0.5 } { 0.5 } {#1} {#2}
\use:c { spb_tmp_#1_use: }
}
+\cs_new:Npn \spb_math_print_store:nnn #1#2#3
+ {
+ \hbox_set:Nn \l_tmpa_box
+ { \ensuremath{#1{\spb_math:nn {#2} {#3}}} }
+ }
+\cs_new:Npn \spb_text_print_store:nnn #1#2#3
+ {
+ \hbox_set:Nn \l_tmpa_box
+ { #1{\use:c { spb@text#2script@save }{#3}} }
+ }
+\cs_new:Npn \spb_math_print_store:nnnn #1#2#3#4
+ {
+ \hbox_set:Nn \l_tmpa_box { \ensuremath{#1{\spb@sp@save{#2}}} }
+ \hbox_set:Nn \l_tmpb_box { \ensuremath{#3{\spb@sb@save{#4}}} }
+ }
+\cs_new:Npn \spb_text_print_store:nnnn #1#2#3#4
+ {
+ \hbox_set:Nn \l_tmpa_box { #1{\spb@textsuperscript@save{#2}} }
+ \hbox_set:Nn \l_tmpb_box { #3{\spb@textsubscript@save{#4}} }
+ }
\cs_set_eq:NN \spb@textsuperscript@save \textsuperscript
\cs_set_eq:NN \spb@textsubscript@save \textsubscript
\cs_set_eq:NN \spb@sp@save \sp
@@ -211,6 +229,7 @@
\tl_if_empty:nF {#1} { \box_set_ht:Nn \l_tmpb_box {#1} }
\tl_if_novalue:nF {#2} { \box_set_dp:Nn \l_tmpb_box {#2} }
}
+
\clist_map_inline:nn
{ super,sub }
{
@@ -222,18 +241,11 @@
}
{
\IfBooleanTF{##1}
+ {\spb_math_print_store:nnn {##4} {#1} {##5}}
{
- \spb_tmp_hboxa_set:n
- { \ensuremath{##4{\spb_math:nn {#1} {##5}}} }
- }{
\mode_if_math:TF
- {
- \spb_tmp_hboxa_set:n
- { \ensuremath{##4{\spb_math:nn {#1} {##5}}} }
- }{
- \spb_tmp_hboxa_set:n
- { ##4{\use:c { spb@text#1script@save }{##5}} }
- }
+ { \spb_math_print_store:nnn {##4} {#1} {##5} }
+ { \spb_text_print_store:nnn {##4} {#1} {##5} }
}
\hbox_set_to_wd:Nnn \l_tmpb_box { \l__spb_boxa_wd_tl + ##6 }
{ \hss\box_move_up:nn {##2} { \spb_tmp_boxa_use: } }
@@ -248,19 +260,11 @@
}
{
\IfBooleanTF{#1}
+ {\spb_math_print_store:nnnn {#4} {#5} {#8} {#6}}
{
- \spb_tmp_hboxa_set:n { \ensuremath{#4{\spb@sp@save{#5}}} }
- \spb_tmp_hboxb_set:n { \ensuremath{#8{\spb@sb@save{#6}}} }
- }{
\mode_if_math:TF
- {
- \spb_tmp_hboxa_set:n { \ensuremath{#4{\spb@sp@save{#5}}} }
- \spb_tmp_hboxb_set:n { \ensuremath{#8{\spb@sb@save{#6}}} }
- }
- {
- \spb_tmp_hboxa_set:n { #4{\spb@textsuperscript@save{#5}} }
- \spb_tmp_hboxb_set:n { #8{\spb@textsubscript@save{#6}} }
- }
+ { \spb_math_print_store:nnnn {#4} {#5} {#8} {#6} }
+ { \spb_text_print_store:nnnn {#4} {#5} {#8} {#6} }
}
\hbox_set_to_wd:Nnn \l_tmpa_box { \l__spb_boxa_wd_tl + #7 }
{ \hss\box_move_up:nn {#2} { \spb_tmp_boxa_use: } }
@@ -282,7 +286,7 @@
\spb_box_max_dim_horizontal:
}
{
- \dim_compare:nTF { \l__spb_boxa_wd_tl > \l__spb_boxb_wd_tl }
+ \dim_compare:nNnTF { \l__spb_boxa_wd_tl } > { \l__spb_boxb_wd_tl }
{ \spb_boxwd_script_align:nn { boxa } { boxb } }
{ \spb_boxwd_script_align:nn { boxb } { boxa } }
}
diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf
index 541ea467ed..1c3f271fe9 100644
--- a/macros/latex/contrib/spbmark/spbmark.pdf
+++ b/macros/latex/contrib/spbmark/spbmark.pdf
Binary files differ