diff options
Diffstat (limited to 'macros/latex')
32 files changed, 1004 insertions, 571 deletions
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf Binary files differindex 63218b58a1..e0f895c924 100644 --- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf +++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex index e2b64fb8b0..cc9887d612 100644 --- a/macros/latex/contrib/easybook/doc/easybook-demo.tex +++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex @@ -99,7 +99,7 @@ \url{https://latexstudio.net} \\ \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} } -\date{2021/03/21\hskip\ccwd\relax v1.23x} +\date{2021/03/23\hskip\ccwd\relax v1.23z} \frontmatter[roman] \maketitle diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf Binary files differindex 062649bceb..742fb38739 100644 --- a/macros/latex/contrib/easybook/doc/easybook.pdf +++ b/macros/latex/contrib/easybook/doc/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 3206e3da32..0a587aea74 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -51,7 +51,7 @@ The latest version of this license is in % % \changes{v1.20}{2021/01/09}{修改和完善用户文档。} % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。} -% \changes{v1.23x}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。} +% \changes{v1.23z}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。} % % \CheckSum{0} % @@ -73,7 +73,7 @@ The latest version of this license is in % % \title{\sffamily easybook书籍文档类} % \author{瞿毅} -% \date{2021/03/21\hskip\ccwd\relax v1.23x\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/03/23\hskip\ccwd\relax v1.23z\thanks{\url{https://gitee.com/texl3/easybook}}} % \maketitle % \begin{abstract} % \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。 @@ -164,7 +164,7 @@ The latest version of this license is in % class = <(book)|article> % \end{syntax} % 设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。 -% \changes{v1.23x}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。} +% \changes{v1.23z}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。} % \end{function} % % \subsection{文档命令} @@ -180,7 +180,7 @@ The latest version of this license is in % \tn{listoflistings*}\oarg{键值列表} % \end{syntax} % \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下 -% \changes{v1.23x}{2021/02/20}{重新定义文档结构划分命令。} +% \changes{v1.23z}{2021/02/20}{重新定义文档结构划分命令。} % \end{function} % % \begin{function}{multoc,book,article} @@ -188,7 +188,7 @@ The latest version of this license is in % multoc = <true|(false)> % \end{syntax} % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。 -% \changes{v1.23x}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。} +% \changes{v1.23z}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。} % \end{function} % % \section{接口选项} @@ -225,9 +225,9 @@ The latest version of this license is in % \end{syntax} % \ding{229} 以上选项路径为 \opt{style/...} % \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。} -% \changes{v1.23x}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} -% \changes{v1.23x}{2021/02/09}{增加控制页面横线粗细的选项。} -% \changes{v1.23x}{2021/03/15}{增加控制编号连接符的选项。} +% \changes{v1.23z}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} +% \changes{v1.23z}{2021/02/09}{增加控制页面横线粗细的选项。} +% \changes{v1.23z}{2021/03/15}{增加控制编号连接符的选项。} % \end{function} % % \begin{optdesc} @@ -289,7 +289,7 @@ The latest version of this license is in % \ding{229} 以上选项路径为 \opt{spread/...} \\ % 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 % \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。} -% \changes{v1.23x}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} +% \changes{v1.23z}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} % \end{function} % % \begin{optdesc} @@ -311,7 +311,7 @@ The latest version of this license is in % \end{syntax} % \ding{229} 以上选项路径为 \opt{elsefont/...} % \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。} -% \changes{v1.23x}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} +% \changes{v1.23z}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} % \end{function} % % \begin{optdesc} @@ -332,7 +332,7 @@ The latest version of this license is in % \end{syntax} % \ding{229} 以上选项路径为 \opt{bibset/...} % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。} -% \changes{v1.23x}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} +% \changes{v1.23z}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} % \end{function} % % \begin{optdesc} @@ -394,7 +394,7 @@ The latest version of this license is in % \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名} % \end{syntax} % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。 -% \changes{v1.23x}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。} +% \changes{v1.23z}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。} % \end{function} % % \begin{optdesc} @@ -467,8 +467,8 @@ The latest version of this license is in % \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。 % \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。} % \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。} -% \changes{v1.23x}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。} -% \changes{v1.23x}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。} +% \changes{v1.23z}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。} +% \changes{v1.23z}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。} % \end{function} % % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot} @@ -626,7 +626,7 @@ The latest version of this license is in % \item 习题内容 % \end{exercise} % \end{ctexexam} -% \changes{v1.23x}{2021/02/08}{增加准确的习题盒子标题目录锚点。} +% \changes{v1.23z}{2021/02/08}{增加准确的习题盒子标题目录锚点。} % \end{function} % % \subsection{盒子} @@ -691,10 +691,10 @@ The latest version of this license is in % \subsection{物理量} % \begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange} % \begin{syntax} -% \tn{num}\oarg{选项}\marg{数字} -% \tn{si}\oarg{选项}\marg{单位} -% \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位} -% \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位} +% \tn{num}\oarg{键值列表}\marg{数字} +% \tn{si}\oarg{键值列表}\marg{单位} +% \tn{SI}\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位} +% \tn{SIrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位} % \end{syntax} % \pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。 % \begin{ctexexam} @@ -708,7 +708,7 @@ The latest version of this license is in % \subsection{化学式} % \begin{function}[added = 2021-01-05]{\ch,\chemfig} % \begin{syntax} -% \tn{ch}\oarg{选项}\marg{输入} +% \tn{ch}\oarg{键值列表}\marg{输入} % \tn{chemfig}\oarg{键值列表}\marg{分子代码} % \end{syntax} % 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐在导言区载入 \pkg{chemfig} 宏包,使用\tn{chemfig} 命令完成。 @@ -785,7 +785,7 @@ The latest version of this license is in %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/03/21}{1.23x}{beta} +\ProvidesExplClass{easybook}{2021/03/23}{1.23z}{beta} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -884,17 +884,16 @@ The latest version of this license is in \tl_new:N \l__foot_numberwith_tl \tl_new:N \g__config_tl +\seq_const_from_clist:Nn \c__options_path_seq + { + style,link,elsefont, + spread,bibset,thmset, + geoset,hdrset,tocset + } +\seq_map_inline:Nn \c__options_path_seq + {\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}} \ctex_define:n { - style .meta:nn = {ctex/style}{#1}, - link .meta:nn = {ctex/link}{#1}, - spread .meta:nn = {ctex/spread}{#1}, - elsefont .meta:nn = {ctex/elsefont}{#1}, - bibset .meta:nn = {ctex/bibset}{#1}, - thmset .meta:nn = {ctex/thmset}{#1}, - geoset .meta:nn = {ctex/geoset}{#1}, - hdrset .meta:nn = {ctex/hdrset}{#1}, - tocset .meta:nn = {ctex/tocset}{#1}, config .tl_set:N = \g__config_tl, lstlistlistingname .tl_set:N = \lstlistlistingname, lstlistingname .tl_set:N = \lstlistingname @@ -941,12 +940,11 @@ The latest version of this license is in xcolor, footmisc,setspace, amsmath,amsthm,thmtools,cases, - chemformula,siunitx,ulem, + chemformula,siunitx,ulem,pifont, geometry,marginnote,nccfoots, pdfpages,graphicx, fancyhdr,titletoc, caption-light,subcaption, - pifont,microtype, tabularx,multirow,makecell,booktabs, tasks,enumitem, listings, @@ -1159,17 +1157,21 @@ The latest version of this license is in headrule .tl_gset:N = \headrule, headrule .initial:n = { - \color{ctex@frame}\vspace{1.5pt} + \group_begin: + \color{ctex@frame}\vspace*{1.5pt} \hrule width \textwidth height \l__rule_width_dim + \group_end: }, footrule .tl_gset:N = \footrule, footrule .initial:n = {}, footnoterule .tl_gset:N = \footnoterule, footnoterule .initial:n = { + \group_begin: \color{ctex@frame} \hrule width 0.35\columnwidth height \l__rule_width_dim - \vspace*{2.6pt}\color{black} + \vspace*{2.6pt} + \group_end: } } \ctex_at_end_preamble:n @@ -1225,58 +1227,49 @@ The latest version of this license is in } } -\ctex_define:n +\seq_const_from_clist:Nn \c__toc_headings_level_seq + {part,chapter,section,subsection,lists} +\seq_map_inline:Nn \c__toc_headings_level_seq { - tocset/part .meta:nn = {ctex/tocset/part}{#1}, - tocset/chapter .meta:nn = {ctex/tocset/chapter}{#1}, - tocset/section .meta:nn = {ctex/tocset/section}{#1}, - tocset/subsection .meta:nn = {ctex/tocset/subsection}{#1}, - tocset/list .meta:nn = {ctex/tocset/list}{#1}, + \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}} + \__ctex_define:nn {tocset} + { + #1/format .tl_set:c = l__toc_#1_format_tl, + #1/indent .tl_set:c = l__toc_#1_indent_tl, + #1/rule .tl_set:c = l__toc_#1_rule_tl + } } \__ctex_define:nn {tocset} { - part/format .tl_set:N = \l__toc_part_format_tl, - part/format .initial:n = \addvspace{1pc}\sffamily\large, - part/indent .tl_set:N = \l__toc_part_indent_tl, - part/indent .initial:n = 0\ccwd, - part/rule .tl_set:N = \l__toc_part_rule_tl, - part/rule .initial:n = \tocrule{}[\bfseries], - - chapter/format .tl_set:N = \l__toc_chapter_format_tl, - chapter/format .initial:n = \addvspace{1pc}\sffamily\large, - chapter/indent .tl_set:N = \l__toc_chapter_indent_tl, - chapter/indent .initial:n = 0\ccwd, - chapter/rule .tl_set:N = \l__toc_chapter_rule_tl, - chapter/rule .initial:n = \tocrule{$\cdot$}[\bfseries], - - section/format .tl_set:N = \l__toc_section_format_tl, - section/format .initial:n = \addvspace{0.35pc}, - section/indent .tl_set:N = \l__toc_section_indent_tl, - section/indent .initial:n = 1.5\ccwd, - section/rule .tl_set:N = \l__toc_section_rule_tl, - section/rule .initial:n = \tocrule{$\cdot$}, - - subsection/format .tl_set:N = \l__toc_subsection_format_tl, - subsection/format .initial:n = \addvspace{0.35pc}, - subsection/indent .tl_set:N = \l__toc_subsection_indent_tl, - subsection/indent .initial:n = 3.8\ccwd, - subsection/rule .tl_set:N = \l__toc_subsection_rule_tl, - subsection/rule .initial:n = \tocrule{$\cdot$}, - - lists/format .tl_set:N = \l__toc_lists_format_tl, - lists/format .initial:n = \addvspace{0.2pc}, - lists/indent .tl_set:N = \l__toc_lists_indent_tl, - lists/indent .initial:n = 0\ccwd, - lists/rule .tl_set:N = \l__toc_lists_rule_tl, - lists/rule .initial:n = \tocrule{$\cdot$}, lists/lolskip .skip_set:N = \l__toc_lolskip_skip, lists/lolskip .initial:n = 0.8pc, lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim, lists/belowoffset .initial:n = 0pc, - belowoffset .dim_set:N = \l__toc_offset_dim, belowoffset .initial:n = -1pc } +\ctex_set:nn {tocset} + { + part/format = \addvspace{1pc}\sffamily\large, + part/indent = 0\ccwd, + part/rule = \tocrule{}[\bfseries], + + chapter/format = \addvspace{1pc}\sffamily\large, + chapter/indent = 0\ccwd, + chapter/rule = \tocrule{$\cdot$}[\bfseries], + + section/format = \addvspace{0.35pc}, + section/indent = 1.5\ccwd, + section/rule = \tocrule{$\cdot$}, + + subsection/format = \addvspace{0.35pc}, + subsection/indent = 3.8\ccwd, + subsection/rule = \tocrule{$\cdot$}, + + lists/format = \addvspace{0.2pc}, + lists/indent = 0\ccwd, + lists/rule = \tocrule{$\cdot$} + } \NewDocumentCommand{\tocrule}{O{0.7pc}D(){1.2}mO{}} { @@ -1549,7 +1542,7 @@ The latest version of this license is in \__arabic:n {section} } \clist_map_inline:nn - {{figure},{table},{lstlisting},{equation}} + {figure,table,lstlisting,equation} {\__separator_set:n {#1}} \cs_gset_protected:Npn \appendix { @@ -1788,10 +1781,10 @@ The latest version of this license is in } \clist_map_inline:nn { - {array},{matrix},{pmatrix},{bmatrix},{Bmatrix},{vmatrix},{Vmatrix}, - {matrix*},{pmatrix*},{bmatrix*},{Bmatrix*},{vmatrix*},{Vmatrix*}, - {cases},{cases*},{dcases},{dcases*},{rcases},{rcases*},{drcases},{drcases*}, - {aligned},{alignedat},{gathered},{multlined},{lgathered},{rgathered} + array,matrix,pmatrix,bmatrix,Bmatrix,vmatrix,Vmatrix, + matrix*,pmatrix*,bmatrix*,Bmatrix*,vmatrix*,Vmatrix*, + cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*, + aligned,alignedat,gathered,multlined,lgathered,rgathered }{\l__math_restore:n {#1}} \__patch_cmd:Nnn \start@gather {\collect@body} @@ -2020,9 +2013,7 @@ The latest version of this license is in {\__put_biblatex:n {style = gb7714-2015}} \tl_if_eq:VnT \l__bib_style_tl{authoryear} {\__put_biblatex:n {style = gb7714-2015ay}} - }{ - \__put_biblatex:n {style = \l__bib_otherstyle_tl} - } + }{\__put_biblatex:n {style = \l__bib_otherstyle_tl}} \tl_if_empty:NF \l__bib_citestyle_tl {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}} \__put_biblatex:n {backend = biber} @@ -2117,7 +2108,6 @@ The latest version of this license is in columns = flexible } \lstloadlanguages{C,C++,Java,Python,Matlab} -\AtBeginEnvironment{verbatim}{\microtypesetup{activate = false}} \clist_new:N \l__hyperref_clist \cs_new_protected:Npn \__put_hyperref:n #1 diff --git a/macros/latex/contrib/memoir/README b/macros/latex/contrib/memoir/README index 199f5d9e9c..00ab227b2f 100644 --- a/macros/latex/contrib/memoir/README +++ b/macros/latex/contrib/memoir/README @@ -27,6 +27,22 @@ o Backmatter: Command glossary ~ 40 pages Bibliography, indexes ~ 50 pages +Changed (2021/03/23) + +o memoir v3.7o + +-- \footref will be added to the kernel, so we now "provide" it instead +-- as of late 2020 the caption package will now adjust it self to the + class. It will even map several of the caption styling macros the + class provides onto the the corresponding setup in the caption + package. Special thanks to Axel Sommerfeldt for this + feature. Therefore we no longer reset in preparation for caption. +-- The mparhack package is no longer marked as emulated as we did not + emulate the fix for the bug regarding \if@firstcolumn. If a document + specifies as twocolumn, we automatically load mparhack +-- some internal cleanup and added some recommended alternatives + + Changed (2020/10/04) @@ -568,12 +584,12 @@ Earlier changes are noted at the end. 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 + version 1.3c of this license or (at your option) any later version. The latest version of the license is in http://www.latex-project.org/lppl.txt - and version 1.3 or later is part of all distributions of - LaTeX version 2003/06/01 or later. + and version 1.3c or later is part of all distributions of + LaTeX version 2008/05/04 or later. This work has the LPPL maintenance status "maintained". diff --git a/macros/latex/contrib/memoir/doc-src/memman.tex b/macros/latex/contrib/memoir/doc-src/memman.tex index 9ac76c5a16..03a1af27e2 100644 --- a/macros/latex/contrib/memoir/doc-src/memman.tex +++ b/macros/latex/contrib/memoir/doc-src/memman.tex @@ -11888,8 +11888,8 @@ like: \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-03-09 13:41:30 +0100 (Fri, 09 Mar 2018) $} -{$LastChangedRevision: 587 $} +{$LastChangedDate: 2021-03-22 14:24:31 +0100 (Mon, 22 Mar 2021) $} +{$LastChangedRevision: 706 $} {$LastChangedBy: daleif@math.au.dk $} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -12663,6 +12663,49 @@ if necessary reset it to its original value --- the default value for \section{Lists} +\LMnote{2013/05/16}{Added hint about enumitem} +\LMnote{2018/03/09}{Changed hint to be a recommended section} +\begin{recommended} + The \theclass\ class does not provide high level interfaces to + configure the appearance of lists. We provide some simple tools to + adjust vertical spacing, see below. + + Users seeking more control can have a look at the excellent + \Lpack{enumitem} package by Javier Bezos. If loaded as + \begin{lcode} + \usepackage[shortlabels]{enumitem} + \end{lcode} + then our + \begin{lcode} + \begin{enumerate}[i)] + \item \label{item:tst} ... + \end{lcode} + syntax will work out of the box. + + One key difference: In \theclass\ \verb?\ref{item:tst}? will give + you `i', whereas, if \Lpack{enumitem} is loaded the full formatting + is returned from the cross reference, i.e., `i)'. This is fully + configurable in \Lpack{enumitem}. + + Note that, \cmd{\tightlists}, \cmd{\defaultlists}, \cmd{\firmlists}, + \cmd{\firmlists*} presented below, are not supported by + \Lpack{enumitem}, it provides a highlevel key based interface + instead. + + Tip: If you use the the new kernel environment hooks (see + \cite{LTHOOKS}, or use \cmd{\AtBeginEnvironment} from + \Lpack{etoolbox}), then you can fx add default formatting of + \Pe{enumerate} to all of your theorem constructions and then no need + to use + \begin{lcode} + \begin{enumerate}[(a)] + \end{lcode} + every single time, because you wanted lists use use letters inside + theorems, and something else outside. +\end{recommended} + + + \index{list|(} %| Standard \ltx\ provides four kinds of lists. There is a general \Ie{list} @@ -12839,49 +12882,6 @@ counter typeset as a lowercase Roman numeral followed by a single parenthesis ... \end{lcode} - -\LMnote{2013/05/16}{Added hint about enumitem} -\LMnote{2018/03/09}{Changed hint to be a recommended section} -\begin{recommended} - \theclass\ does not provide high level interfaces to configure the - appearance. We provide some simple tools to adjust vertical spacing, - see below. - - Users seeking more control can have a look at the excellent \Lpack{enumitem} - package by Javier Bezos. If loaded as - \begin{lcode} - \usepackage[shortlabels]{enumitem} - \end{lcode} - then our - \begin{lcode} - \begin{enumerate}[i)] - \item \label{item:tst} ... - \end{lcode} - syntax will work out of the box. - - One key difference: In \theclass\ \verb?\ref{item:tst}? will give you - `i', whereas, if \Lpack{enumitem} is loaded the full formatting is - returned from the cross reference, i.e., `i)'. This is fully - configurable in \Lpack{enumitem}. - - Note that, \cmd{\tightlists}, \cmd{\defaultlists}, \cmd{\firmlists}, - \cmd{\firmlists*} presented below, are not supported by - \Lpack{enumitem}, it provides a highlevel key based interface - instead. - - Another feature from \Lpack{enumitem} that I (LM) uses a lot is to - combine the \cmd{\setlist} with \cmd{\AtBeginEnvironment} from the - \Lpack{etoolbox} package to specifically adjust enumerate used - inside certain theorem constructions. That wway we can control the - apparence of the lists from the preamble and does not need to use - say - \begin{lcode} - \begin{enumerate}[(a)] - \end{lcode} - every single time. -\end{recommended} - - \index{list!tight|(} %| @@ -15454,8 +15454,8 @@ before the stuff you want to have moved out of, say, a part. \svnidlong {$Ignore: $} -{$LastChangedDate: 2020-03-15 19:48:39 +0100 (Sun, 15 Mar 2020) $} -{$LastChangedRevision: 682 $} +{$LastChangedDate: 2021-03-22 11:32:59 +0100 (Mon, 22 Mar 2021) $} +{$LastChangedRevision: 705 $} {$LastChangedBy: daleif@math.au.dk $} @@ -15622,16 +15622,16 @@ Tufte \LaTeX\ collection. \senv{margintable}\oarg{len} float material \eenv{margintable} \\ \end{syntax} \glossary(marginfigure)% - {\senv{marginfigure}\oarg{length}}% - {Environment which inserts its contents into the margin, and enables - figure captions. The optional argument should be a length and is used -to perform manual up/down adjustments to the placement.} +{\senv{marginfigure}\oarg{length}}% +{Environment which inserts its contents into the margin, and enables + figure captions. The optional argument should be a length and is + used to perform manual up/down adjustments to the placement.} \glossary(margintable)% - {\senv{margintable}\oarg{length}}% - {Environment which inserts its contents into the margin, and enables +{\senv{margintable}\oarg{length}}% +{Environment which inserts its contents into the margin, and enables figure captions.The optional argument should be a length and is used -to perform manual up/down adjustments to the placement.} -Because this is inserted differently than the ordinary \Ie{figure} or + to perform manual up/down adjustments to the placement.} Because +this is inserted differently than the ordinary \Ie{figure} or \Ie{table} floats, one might get into the situation where a figure float inserted before a margin float, might float \emph{past} the margin float and thus have different caption numbering. For this @@ -15639,6 +15639,10 @@ reason the margin float contain a float blocking device such that any unplaced floats are forced to be placed before we start typesetting a margin figure. +Additionally, note that the term ``float'' is used very lightly +here. As things are placed using \cmd{\marginpar}, margin floats only +``float'' on the page it self, they never float on to the next page. + \fancybreak{} The \Ie{marginfigure} and \Ie{margintable} environments can of course @@ -16093,6 +16097,13 @@ and \cs{subcaption}.} \index{float!placement|(}%| +Note that this section is not just relevant to the class, but for +\ltx\ in general. The main difference for placement between the class +and, say, the \Lclass{book} class are the default values of some +settings. + + + The general format for a float environment is: \\ \senv{float}\oarg{loc} ... \eenv{float} or for double column\index{float!double column} floats: \\ @@ -16456,15 +16467,19 @@ figure\index{figure} environment. The commands described below are very similar to those supplied by the \Lpack{ccaption} package~\cite{CCAPTION}. -As an alternative (it has more features that what the class offers) we -recommend the \Lpack{caption} package by Axel Sommerfeldt. In fact if -the \Lpack{caption} package is loaded, the class will detect it and -reset it self such that \Lpack{caption} can take over. This also means -that all the macros described in the next section will have no effect -if \Lpack{caption} is loaded (either intentionally or -unintentionally). - - +\begin{recommended} + As an alternative to the styling features in the class we recommend + the \Lpack{caption} package by Axel Sommerfeldt (many more features + compared to the class). + + As of late 2020, Axel was kind enough to add a feature to + \Lpack{caption} such that if loaded with \theclass\ then + \Lpack{caption} will map most of the styling commands presented in + the next section onto the equivalent settings used by the + \Lpack{caption} package. Just make sure your settings are set + \emph{after} loading \Lpack{caption}.\footnotemark +\end{recommended} +\footnotetext{Be aware that other packages may auto load \Lpack{caption}.} \section{Caption styling} @@ -20342,8 +20357,8 @@ illustrate these points. \svnidlong {$Ignore: $} -{$LastChangedDate: 2020-03-25 19:00:55 +0100 (Wed, 25 Mar 2020) $} -{$LastChangedRevision: 686 $} +{$LastChangedDate: 2021-03-22 14:24:31 +0100 (Mon, 22 Mar 2021) $} +{$LastChangedRevision: 706 $} {$LastChangedBy: daleif@math.au.dk $} \chapter{Page notes} \label{chap:mnotes} @@ -21143,7 +21158,7 @@ The default corresponds to \verb?\marginparmargin{outer}?. \small \item[Two column document] If the note is placed in the first column, to the left, otherwise to the right, irrespective the - document being one- or two-side and of the users choices + document being one- or two-side and of the users choices. \item[One sided document] If user specified \emph{left}, notes are placed to the left, otherwise to the right. \item[Two sided document] depends on whether a recto or verso page: @@ -21173,14 +21188,17 @@ The original convoluted methods of specifying the margin for \cmd{\marginpar} is deprecated, although still supported; if you need to know what they are then you can read all about them in \texttt{memoir.dtx}. - Sometimes \ltx\ gets confused near a page break and a note just after -a break may get put into the wrong\index{margin note!wrong margin} margin -(the wrong margin for the current -page but the right one if the note fell on the previous page). If this occurs -then inserting the \cmd{\strictpagecheck} declaration before -any \cmd{\marginpar} -command is used will prevent this, at the cost of at least one additional -\ltx\ run. +Sometimes \ltx\ gets confused near a page break and a note just after +a break may get put into the wrong\index{margin note!wrong margin} +margin (the wrong margin for the current page but the right one if the +note fell on the previous page). If this occurs then inserting the +\cmd{\strictpagecheck} declaration before any \cmd{\marginpar} command +is used will prevent this, at the cost of at least one additional +\ltx\ run. Note: In twocolumn mode the \Lpack{mparhack} package is +automatically loaded as it fixes a bug, there the test for whether one +is in the first column may fail.\footnote{If you want to use + \Lpack{mparhack} with the \Lopt{debug} option, use + \cs{RequirePackage[debug]\{mparhack\}} before \cs{documentclass}.} \section{Side notes} @@ -23930,8 +23948,8 @@ and the result is shown on the next page. \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-03-06 15:58:01 +0100 (Tue, 06 Mar 2018) $} -{$LastChangedRevision: 584 $} +{$LastChangedDate: 2021-03-22 14:24:31 +0100 (Mon, 22 Mar 2021) $} +{$LastChangedRevision: 706 $} {$LastChangedBy: daleif@math.au.dk $} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -24067,13 +24085,8 @@ In the \Ie{snugshaded} environment the box clings more closely to its contents than it does in the \Ie{shaded} environment. \begin{recommended} - Since the class was originally written, much have happened in the - gfx generating capabilities in LaTeX, especially the popularity of - TikZ has provided many more extensive box and graphics generating - packages. - - As of 2018 one of the most impressive packages for all sorts of - boxes is the \Lpack{tcolorbox} package by Thomas~F.~Sturm. + See the \Lpack{tcolorbox} package by Thomas~F.~Sturm. An impressive + system of boxes and decorations and much much more. All based on TikZ. \end{recommended} @@ -28144,8 +28157,8 @@ pdflatex memman \svnidlong {$Ignore: $} -{$LastChangedDate: 2020-10-04 21:52:58 +0200 (Sun, 04 Oct 2020) $} -{$LastChangedRevision: 696 $} +{$LastChangedDate: 2021-03-22 18:32:04 +0100 (Mon, 22 Mar 2021) $} +{$LastChangedRevision: 707 $} {$LastChangedBy: daleif@math.au.dk $} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -28814,6 +28827,20 @@ but they do not produce any warning messages. \section{Changing macros} \label{sec:addtodef} +\begin{recommended} + See also the \Lpack{xpatch} (which extends the patching capabilities + of \Lpack{etoolbox}) and \Lpack{letltxmacro} packages. + + Additionally the LaTeX-format of October 2020 include some new + hooking features fx to hook into environments, see \cite{LTHOOKS} + (see section 2.8.1 for some utility macros). The new format also + adds \cs{NewCommandCopy} and \cs{RenewCommandCopy} which are + extended versions of what \Lpack{letltxmacro} provides. +\end{recommended} + + + + Commands are provided for extending simple macro definitions.\index{extend a macro}\index{add to a macro} @@ -29984,42 +30011,46 @@ and where they used. \begin{table} \centering -\caption{Defined words and phrases}\label{tab:defwordsphrases} +\caption{Some defined words and phrases. \textsuperscript{*} marks + macros under language control + (\Lpack{babel}), see the \cs{addto}\cs{captions}\meta{language} + feature in \Lpack{babel}. }\label{tab:defwordsphrases} +\newcommand\B{\textsuperscript{*}} \begin{tabular}{lll}\toprule -Macro & Default & Usage \\ \midrule -\cmd{\abstractname} & \abstractname\ & title for \Ie{abstract} environment \\ -\cmd{\alsoname} & \alsoname\ & used by \cmd{\seealso} \\ -\cmd{\amname} & \amname\ & used in printing time of day \\ -\cmd{\appendixname} & \appendixname\ & name for an appendix heading \\ -\cmd{\appendixpagename} & \appendixpagename\ & name for an \cmd{\appendixpage} \\ -\cmd{\appendixtocname} & \appendixtocname\ & ToC entry announcing appendices \\ -\cmd{\bibname} & \bibname\ & title for \cmd{\thebibliography} \\ -\cmd{\bookname} & \bookname\ & name for \cmd{\book} heading \\ -\cmd{\bookrefname} & \bookrefname\ & used by \cmd{\Bref} \\ -\cmd{\chaptername} & \chaptername\ & name for \cmd{\chapter} heading \\ -\cmd{\chapterrefname} & \chapterrefname\ & used by \cmd{\Cref} \\ -\cmd{\contentsname} & \contentsname\ & title for \cmd{\tableofcontents} \\ -\cmd{\figurename} & \figurename\ & name for figure \cmd{\caption} \\ -\cmd{\figurerefname} & \figurerefname\ & used by \cmd{\fref} \\ -\cmd{\glossaryname} & Glossary & title for \cmd{\theglossary} \\ -\cmd{\indexname} & \indexname\ & title for \cmd{\theindex} \\ -\cmd{\lcminusname} & \lcminusname\ & used in named number formatting \\ -\cmd{\listfigurename} & \listfigurename\ & title for \cmd{\listoffigugres} \\ -\cmd{\listtablename} & \listtablename\ & title for \cmd{\listoftables} \\ -\cmd{\minusname} & \minusname\ & used in named number formatting \\ -\cmd{\namenumberand} & \namenumberand\ & used in named number formatting \\ -\cmd{\namenumbercomma} & \namenumbercomma\ & used in named number formatting \\ -\cmd{\notesname} & \notesname\ & title of \cmd{\notedivision} \\ -\cmd{\pagename} & \pagename\ & for your use \\ -\cmd{\pagerefname} & \pagerefname\ & used by \cmd{\pref} \\ -\cmd{\partname} & \partname\ & name for \cmd{\part} heading \\ -\cmd{\partrefname} & \partrefname\ & used by \cmd{\Pref} \\ -\cmd{\pmnane} & \pmname\ & used in printing time of day \\ -\cmd{\sectionrefname} & \sectionrefname\ & used by \cmd{\Sref} \\ -\cmd{\seename} & \seename\ & used by \cmd{\see} \\ -\cmd{\tablename} & \tablename\ & name for table \cmd{\caption} \\ -\cmd{\tablerefname} & \tablerefname\ & used by \cmd{\tref} \\ -\cmd{\ucminusname} & \ucminusname\ & used in named number formatting \\ +Macro & Default & Usage \\ \midrule +\cmd{\abstractname} & \abstractname\B & title for \Ie{abstract} environment \\ +\cmd{\alsoname} & \alsoname\B & used by \cmd{\seealso} \\ +\cmd{\amname} & \amname\ & used in printing time of day \\ +\cmd{\appendixname} & \appendixname\B & name for an appendix heading \\ +\cmd{\appendixpagename} & \appendixpagename\ & name for an \cmd{\appendixpage} \\ +\cmd{\appendixtocname} & \appendixtocname\ & ToC entry announcing appendices \\ +\cmd{\bibname} & \bibname\B & title for \cmd{\thebibliography} \\ +\cmd{\bookname} & \bookname\ & name for \cmd{\book} heading \\ +\cmd{\bookrefname} & \bookrefname\ & used by \cmd{\Bref} \\ +\cmd{\chaptername} & \chaptername\B & name for \cmd{\chapter} heading \\ +\cmd{\chapterrefname} & \chapterrefname\ & used by \cmd{\Cref} \\ +\cmd{\contentsname} & \contentsname\B & title for \cmd{\tableofcontents} \\ +\cmd{\figurename} & \figurename\B & name for figure \cmd{\caption} \\ +\cmd{\figurerefname} & \figurerefname\ & used by \cmd{\fref} \\ +\cmd{\glossaryname} & Glossary & title for \cmd{\theglossary} \\ +\cmd{\indexname} & \indexname\B & title for \cmd{\theindex} \\ +\cmd{\lcminusname} & \lcminusname\ & used in named number formatting \\ +\cmd{\listfigurename} & \listfigurename\B & title for \cmd{\listoffigugres} \\ +\cmd{\listtablename} & \listtablename\B & title for \cmd{\listoftables} \\ +\cmd{\minusname} & \minusname\ & used in named number formatting \\ +\cmd{\namenumberand} & \namenumberand\ & used in named number formatting \\ +\cmd{\namenumbercomma} & \namenumbercomma\ & used in named number formatting \\ +\cmd{\notesname} & \notesname\ & title of \cmd{\notedivision} \\ +\cmd{\pagename} & \pagename\ & for your use \\ +\cmd{\pagerefname} & \pagerefname\ & used by \cmd{\pref} \\ +\cmd{\partname} & \partname\B & name for \cmd{\part} heading \\ +\cmd{\partrefname} & \partrefname\ & used by \cmd{\Pref} \\ +\cmd{\pmnane} & \pmname\ & used in printing time of day \\ +\cmd{\sectionrefname} & \sectionrefname\ & used by \cmd{\Sref} \\ +\cmd{\seename} & \seename\B & used by \cmd{\see} \\ +\cmd{\tablename} & \tablename\B & name for table \cmd{\caption} \\ +\cmd{\tablerefname} & \tablerefname\ & used by \cmd{\tref} \\ +\cmd{\ucminusname} & \ucminusname\ & used in named number formatting \\ \bottomrule \end{tabular} \end{table} @@ -30144,13 +30175,36 @@ a similar internal command to ensure that the packages are not loaded following some later \cmd{\usepackage} command. The names of the emulated packages are written to the \pixfile{log} file. At the time of writing the emulated packages are: -\Lpack{abstract}, \Lpack{appendix}, \Lpack{array}, \Lpack{booktabs}, -\Lpack{ccaption}, \Lpack{chngcntr}, \Lpack{crop}, \Lpack{dcolumn}, -\Lpack{delarray}, \Lpack{enumerate}, \Lpack{epigraph}, %%%%%% \Lpack{framed}, -\Lpack{ifmtarg}, \Lpack{ifpdf}, \Lpack{index}, \Lpack{makeidx}, -\Lpack{moreverb}, \Lpack{needspace}, \Lpack{newfile}, \Lpack{nextpage}, -\Lpack{pagenote}, \Lpack{patchcmd}, \Lpack{parskip}, \Lpack{setspace}, \Lpack{shortvrb}, \Lpack{showidx}, -\Lpack{tabularx}, \Lpack{titleref}, \Lpack{tocbibind}, \Lpack{tocloft}, +\Lpack{abstract}, +\Lpack{appendix}, +%\Lpack{array}, + \Lpack{booktabs}, +\Lpack{ccaption}, + \Lpack{chngcntr}, + \Lpack{crop}, +% \Lpack{dcolumn}, +%\Lpack{delarray}, + \Lpack{enumerate}, + \Lpack{epigraph}, + %%%%%% \Lpack{framed}, +\Lpack{ifmtarg}, + \Lpack{ifpdf}, + \Lpack{index}, + \Lpack{makeidx}, +\Lpack{moreverb}, + \Lpack{needspace}, + \Lpack{newfile}, + \Lpack{nextpage}, +\Lpack{pagenote}, + \Lpack{patchcmd}, + \Lpack{parskip}, + \Lpack{setspace}, + \Lpack{shortvrb}, + \Lpack{showidx}, +%\Lpack{tabularx}, + \Lpack{titleref}, + \Lpack{tocbibind}, + \Lpack{tocloft}, \Lpack{verbatim}, and \Lpack{verse}. @@ -38881,6 +38935,15 @@ access CTAN is available at \url{http://www.tug.org}. \newblock (Available as \texttt{alltt.dtx} and \texttt{alltt.ins} from CTAN via \CTANurl{/macros/latex/base/}) +\bibitem[Bra20]{SOURCE2E} + Johannes Braams \textit{et al}. + \newblock \emph{The \LaTeXe\ Sourses}. + \newblock October, 2020. + \newblock (Available from CTAN via \CTANurl{/pkg/source2e}) + + + + %%% keep \bibitem[Bri99]{BRINGHURST99} Robert Bringhurst. diff --git a/macros/latex/contrib/memoir/memman.pdf b/macros/latex/contrib/memoir/memman.pdf Binary files differindex ceaa77861d..82de66876c 100644 --- a/macros/latex/contrib/memoir/memman.pdf +++ b/macros/latex/contrib/memoir/memman.pdf diff --git a/macros/latex/contrib/memoir/memoir.dtx b/macros/latex/contrib/memoir/memoir.dtx index 123d6371c1..f63ba259ab 100644 --- a/macros/latex/contrib/memoir/memoir.dtx +++ b/macros/latex/contrib/memoir/memoir.dtx @@ -8,19 +8,19 @@ % % 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 +% version 1.3c of this license or (at your option) any % later version. % The latest version of the license is in % http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of -% LaTeX version 2003/06/01 or later. +% and version 1.3c or later is part of all distributions of +% LaTeX version 2008/05/04 or later. % % This work has the LPPL maintenance status "maintained". % % This work consists of the files listed in the README file. % % \fi -% \CheckSum{31219} +% \CheckSum{30999} % % \changes{v0.1}{2001/05/20}{First public alpha release} % \changes{v0.2}{2001/06/03}{First beta release} @@ -125,7 +125,8 @@ % \changes{v3.7m}{2020/09/10}{More preparations for october kernel update} % \changes{v3.7n}{2020/10/04}{Foced # doubling in AtBegin/EndX macros % to ensure backwards compatability} -% +% \changes{v3.7o}{2021/03/23}{Maintenance and a provide for the kernel} +% % \def\dtxfile{memoir.dtx} % % \def\fileversion{v0.1} \def\filedate{2001/05/20} @@ -187,6 +188,7 @@ % \def\fileversion{v3.7l} \def\filedate{2020/06/02} % \def\fileversion{v3.7m} \def\filedate{2020/09/10} % \def\fileversion{v3.7n} \def\filedate{2020/10/04} +% \def\fileversion{v3.7o} \def\filedate{2021/03/23} % \title{The LaTeX \Lpack{memoir} class for configurable book % typesetting: Source code\thanks{This % file (\texttt{\dtxfile}) has version number \fileversion, last revised @@ -417,11 +419,11 @@ % Announce the name, option files and version for LaTeX2e files: % \begin{macrocode} %<class>\ProvidesClass{memoir}% -%<class> [2020/10/04 v3.7n configurable book, report, article document class] +%<class> [2021/03/23 v3.7o configurable book, report, article document class] % \end{macrocode} % In the manual it is useful to know the current version. % \begin{macrocode} -%<class>\newcommand\memversion{v3.7n, 2020/10/04} +%<class>\newcommand\memversion{v3.7o, 2021/03/23} %<9pt>\ProvidesFile{mem9.clo}% %<9pt> [2008/01/30 v0.4 memoir class 9pt size option] %<10pt>\ProvidesFile{mem10.clo}% @@ -9668,8 +9670,8 @@ % non-zero \cs{parskip} to not interfer with the placement of the title} % \begin{macrocode} \def\@makechapterhead#1{% - \chapterheadstart% \vspace*{50\p@}% - {%\parindent \z@ \raggedright \normalfont + \chapterheadstart% + {% \parskip \z@ \parindent \z@ \memRTLraggedright \normalfont % \end{macrocode} @@ -9677,7 +9679,7 @@ % \begin{macrocode} \ifm@m@And \printchaptername \chapternamenum \printchapternum - \afterchapternum % \par\nobreak \vskip 20\p@ + \afterchapternum % \else \printchapternonum \fi @@ -9685,8 +9687,8 @@ % Typeset the title. % \begin{macrocode} \interlinepenalty\@M - \printchaptertitle{#1} % \Huge \bfseries #1 - \afterchaptertitle % \par\nobreak \vskip 40\p@ + \printchaptertitle{#1} % + \afterchaptertitle % }} % \end{macrocode} @@ -9838,7 +9840,7 @@ % \begin{macrocode} \def\@makeschapterhead#1{% \chapterheadstart - {%\parindent \z@ \raggedright \normalfont + {% \parskip \z@% \parindent \z@ \memRTLraggedright \normalfont \printchapternonum @@ -9966,9 +9968,7 @@ % \begin{macrocode} \newcommand*{\reparticle}{% \chapterstyle{reparticle} -%%% \setsecheadstyle{\normalfont\large\bfseries\raggedright} \setsecheadstyle{\normalfont\large\bfseries\memRTLraggedright}% -%%% \setsubsecheadstyle{\normalfont\bfseries\raggedright} \setsubsecheadstyle{\normalfont\bfseries\memRTLraggedright}% } @@ -10072,7 +10072,6 @@ \renewcommand*{\printchapternum}{} \renewcommand*{\afterchapternum}{} \renewcommand*{\printchaptertitle}[1]{% - %%% \raggedright\Large\scshape\MakeLowercase{##1}} \memRTLraggedright\Large\scshape\MakeTextLowercase{##1}} \renewcommand*{\afterchaptertitle}{% \vskip\onelineskip \hrule\vskip\onelineskip}} @@ -10383,7 +10382,6 @@ \setlength{\midchapskip}{\textwidth}% \rightblock \addtolength{\midchapskip}{-\beforechapskip} \renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}} -%%% \renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright} \renewcommand*{\chaptitlefont}{\huge\rmfamily\memRTLraggedright} \renewcommand*{\chapnumfont}{\chaptitlefont} \renewcommand*{\printchaptername}{} @@ -10580,7 +10578,6 @@ \renewcommand*{\chapnumfont}{\normalfont\huge\bfseries}% \renewcommand*{\printchapternum}{\chapnumfont \thechapter\quad}% \renewcommand*{\afterchapternum}{}% -%%% \renewcommand*{\chaptitlefont}{\chapnumfont\raggedright}} \renewcommand*{\chaptitlefont}{\chapnumfont\memRTLraggedright}} % \end{macrocode} @@ -10935,7 +10932,6 @@ \setaftersecskip{2.3ex \@plus .2ex} \newcommand{\secheadstyle}{} \newcommand{\setsecheadstyle}[1]{\renewcommand{\secheadstyle}{#1}} -%%% \setsecheadstyle{\Large\bfseries\raggedright} \setsecheadstyle{\Large\bfseries\memRTLraggedright} % \end{macrocode} @@ -10997,7 +10993,6 @@ \setaftersubsecskip{1.5ex \@plus .2ex} \newcommand{\subsecheadstyle}{} \newcommand{\setsubsecheadstyle}[1]{\renewcommand{\subsecheadstyle}{#1}} -%%% \setsubsecheadstyle{\large\bfseries\raggedright} \setsubsecheadstyle{\large\bfseries\memRTLraggedright} % \end{macrocode} @@ -11052,20 +11047,19 @@ \newlength{\subsubsecindent} \newcommand{\setsubsubsecindent}[1]{% \setlength{\subsubsecindent}{#1}} - \setsubsubsecindent{\z@} +\setsubsubsecindent{\z@} \newskip\beforesubsubsecskip \newcommand{\setbeforesubsubsecskip}[1]{% \setlength{\beforesubsubsecskip}{#1}} - \setbeforesubsubsecskip{-3.25ex \@plus -1ex \@minus -.2ex} +\setbeforesubsubsecskip{-3.25ex \@plus -1ex \@minus -.2ex} \newskip\aftersubsubsecskip \newcommand{\setaftersubsubsecskip}[1]{% \setlength{\aftersubsubsecskip}{#1}} - \setaftersubsubsecskip{1.5ex \@plus .2ex} +\setaftersubsubsecskip{1.5ex \@plus .2ex} \newcommand{\subsubsecheadstyle}{} \newcommand{\setsubsubsecheadstyle}[1]{% \renewcommand{\subsubsecheadstyle}{#1}} -%%% \setsubsubsecheadstyle{\normalsize\bfseries\raggedright} - \setsubsubsecheadstyle{\normalsize\bfseries\memRTLraggedright} +\setsubsubsecheadstyle{\normalsize\bfseries\memRTLraggedright} % \end{macrocode} % \end{macro} @@ -11571,7 +11565,6 @@ \setsecindent{\z@}% \setbeforesecskip{-3.5ex \@plus -1ex \@minus -.2ex}% \setaftersecskip{2.3ex \@plus .2ex}% -%%% \setsecheadstyle{\Large\bfseries\raggedright}% \setsecheadstyle{\Large\bfseries\memRTLraggedright}% % \end{macrocode} % Default \cs{subsection} style @@ -11582,7 +11575,6 @@ \setsubsecindent{\z@}% \setbeforesubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}% \setaftersubsecskip{1.5ex \@plus .2ex}% -%%% \setsubsecheadstyle{\large\bfseries\raggedright}% \setsubsecheadstyle{\large\bfseries\memRTLraggedright}% % \end{macrocode} % Default \cs{subsubsection} style @@ -11593,7 +11585,6 @@ \setsubsubsecindent{\z@}% \setbeforesubsubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}% \setaftersubsubsecskip{1.5ex \@plus .2ex}% -%%% \setsubsubsecheadstyle{\normalsize\bfseries\raggedright}% \setsubsubsecheadstyle{\normalsize\bfseries\memRTLraggedright}% % \end{macrocode} % Default \cs{paragraph} style @@ -11656,19 +11647,16 @@ \setbeforesecskip{-1.333\onelineskip \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}% -%%% \setsecheadstyle{\normalfont\scshape\raggedright}% \setsecheadstyle{\normalfont\scshape\memRTLraggedright}% % subsection \setbeforesubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsecheadstyle{\normalfont\bfseries\raggedright}% \setsubsecheadstyle{\normalfont\bfseries\memRTLraggedright}% % subsubsection \setbeforesubsubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsubsecheadstyle{\normalfont\normalsize\itshape\raggedright}% \setsubsubsecheadstyle{\normalfont\normalsize\itshape\memRTLraggedright}% % paragraph \setbeforeparaskip{1.0\onelineskip @@ -11697,13 +11685,11 @@ \setbeforesecskip{-1\onelineskip \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}% -%%% \setsecheadstyle{\normalfont\raggedright\scshape\MakeLowercase}% \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeTextLowercase}% % subsection \setbeforesubsecskip{-1.0\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{1.0\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsecheadstyle{\sethangfrom{\noindent ####1}\normalfont\itshape\raggedright}% \setsubsecheadstyle{\sethangfrom{\noindent ####1}\normalfont\itshape\memRTLraggedright}% % subsubsection \setbeforesubsubsecskip{1.0\onelineskip @@ -11813,17 +11799,14 @@ % section \setbeforesecskip{-3.5ex \@plus -1ex \@minus -.2ex}% \setaftersecskip{2.3ex \@plus .2ex}% -%%% \setsecheadstyle{\normalfont\Large\sffamily\bfseries\raggedright}% \setsecheadstyle{\normalfont\Large\sffamily\bfseries\memRTLraggedright}% % subsection \setbeforesubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}% \setaftersubsecskip{1.5ex \@plus .2ex}% -%%% \setsubsecheadstyle{\normalfont\large\sffamily\bfseries\raggedright}% \setsubsecheadstyle{\normalfont\large\sffamily\bfseries\memRTLraggedright}% % subsubsection \setbeforesubsubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}% \setaftersubsubsecskip{1.5ex \@plus .2ex}% -%%% \setsubsubsecheadstyle{\normalfont\normalsize\sffamily\bfseries\raggedright}% \setsubsubsecheadstyle{\normalfont\normalsize\sffamily\bfseries\memRTLraggedright}% % paragraph \setbeforeparaskip{3.25ex \@plus 1ex \@minus .2ex}% @@ -11889,19 +11872,16 @@ \setbeforesecskip{-2\onelineskip \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}% -%%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}% \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}% % subsection \setbeforesubsecskip{-1.2\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsecheadstyle{\normalfont\Large\itshape\raggedright}% \setsubsecheadstyle{\normalfont\Large\itshape\memRTLraggedright}% % subsubsection \setbeforesubsubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsubsecheadstyle{\normalfont\normalsize\bfseries\raggedright}% \setsubsubsecheadstyle{\normalfont\normalsize\bfseries\memRTLraggedright}% % paragraph \setbeforeparaskip{1.0\onelineskip @@ -11930,19 +11910,16 @@ \setbeforesecskip{-1.333\onelineskip \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}% -%%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}% \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}% % subsection \setbeforesubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsecheadstyle{\normalfont\Large\itshape\raggedright}% \setsubsecheadstyle{\normalfont\Large\itshape\memRTLraggedright}% % subsubsection \setbeforesubsubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% -%%% \setsubsubsecheadstyle{\normalfont\normalsize\raggedright\scshape\MakeLowercase}% \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeTextLowercase}% % paragraph \setbeforeparaskip{1.0\onelineskip @@ -12547,9 +12524,7 @@ % \begin{macrocode} \newcommand*{\raggedrightthenleft}{% \parindent \z@ -%%% \leftskip \z@ \@plus 1fill \memRTLleftskip \z@ \@plus 1fill -%%% \rightskip\@flushglue \memRTLrightskip\@flushglue \parfillskip \z@ \everypar{\hskip \z@ \@plus -1fill}} @@ -21421,7 +21396,6 @@ % margin captions. % \begin{macrocode} \newcommand*{\sidecapstyle}{% -%%% \captionnamefont{\bfseries}% \ifscapmargleft \captionstyle{\raggedleft}% \else @@ -27178,7 +27152,9 @@ % from \file{ltfloat.dtx}. % \changes{v1.0}{2001/10/30}{Added \cs{footref}} % \begin{macrocode} -\newcommand{\footref}[1]{% +% \changes{v3.7o}{2021/02/24}{in 2021/05 \cs{footref} will be in the +% kernel, thus we make it provide} +\providecommand{\footref}[1]{% \begingroup \unrestored@protected@xdef\@thefnmark{\ref{#1}}% \endgroup @@ -36587,7 +36563,15 @@ \EmulatedPackage{index}[2008/07/23] \EmulatedPackage{makeidx}[2008/07/23] \EmulatedPackage{moreverb}[2008/07/23] -\EmulatedPackage{mparhack}[2008/07/23] +% \end{macrocode} +% \changes{v3.7o}{2021/03/22}{removed mparhack emulation, as we don't +% emulate all of it, especially not the fix for \cs{if@firstcolumn}, +% instead load it if twocolumn } +% \begin{macrocode} +\if@twocolumn + \RequirePackage{mparhack} +\fi + %\EmulatedPackage{mparhack}[2008/07/23] \EmulatedPackage{needspace}[2008/07/23] \EmulatedPackage{newfile}[2008/07/23] \EmulatedPackage{nextpage}[2008/07/23] @@ -36615,95 +36599,14 @@ % % \subsection{Interaction with the \Lpack{caption} package} % -% Although the author of the \Lpack{caption} package has, over the -% years, made it work with many other classes he has not extended it -% to either recognise or work with the memoir class. Some authors want -% to use the \Lpack{caption} package, hence\ldots -% -% The easiest manner in which to make the \Lpack{caption} package to -% work with the class, is to restore the kernel defaults for the main -% captioning macros. -% -% Kill changes to the caption macros when the \Lpack{caption} package -% is used. The \Lpack{caption} package checks the definitions of the -% \cs{@makecaption}, \cs{caption} and \cs{@caption} macros. These need -% to be identical to the definitions in the standard classes for the -% package to disbelieve that the \Lpack{memoir} class is being used. +% As of 2020, whenever the \Lpack{caption} package is loaded with the +% memoir class, it will map relevant memoir captioning macros onto the +% corresponding features provided by \Lpack{caption}. As this is now +% done automatically, we have removed the code that reset \cs{caption} +% to something more friendly to \Lpack{caption} in earler versions of +% the class. % -% \begin{macro}{\@makecaption} -% \begin{macro}{\caption} -% \begin{macro}{\@caption} -% \changes{v1.61803}{2008/01/30}{Killed memoir's captioning when the caption -% package is used (mempatch v4.9).} -% \changes{v3.6k}{2012/05/04}{Changed the warning text to be more -% informative.} -% \changes{v3.7i}{2018/12/19}{Users still get spooked by the warning, -% tried to rewrite it in a better manner} -% \begin{macrocode} -%%% revert changes to captioning macros if the caption package is used. -\AtBeginPackage{caption}{ - %\ClassWarningNoLine{memoir}{% - \ClassInfo{memoir}{% - For the caption package to function properly with memoir, - we will now reset \string\caption\space and friends to - kernel defaults and then let the^^Jcaption package take over. - Remember: all caption configuration now goes via the caption - package interface, not the interface from the memoir class. - } - - \long\def\@makecaption##1##2{% - \vskip\abovecaptionskip - \sbox\@tempboxa{##1: ##2}% - \ifdim \wd\@tempboxa >\hsize - ##1: ##2\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% - \fi - \vskip\belowcaptionskip} - - \def\caption{% - \ifx\@captype\@undefined - \@latex@error{\noexpand\caption outside float}\@ehd - \expandafter\@gobble - \else - \refstepcounter\@captype - \expandafter\@firstofone - \fi - {\@dblarg{\@caption\@captype}}% - } - - \long\def\@caption##1[##2]##3{% - \par - \addcontentsline{\csname ext@##1\endcsname}{##1}% - {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}% - \begingroup - \@parboxrestore - \if@minipage - \@setminipage - \fi - \normalsize - \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par - \endgroup} - -% \end{macrocode} -% By request of the \Lpack{caption} package author (Axel Sommerfeldt), -% we also restore the caption skips to the kernel defaults. The class -% sets both to be 0.5\cs{onelineskip}, which may cause confusion when -% using certain features in the \Lpack{caption} package. -% \changes{v3.6k}{2012/05/04}{Added \cs{captionXskip} reset to default -% values.} -% \begin{macrocode} - - \setlength\abovecaptionskip{10\p@} - \setlength\belowcaptionskip{0\p@} - -} % end \AtBeginPackage - -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} +% \changes{v3.7o}{2021/03/15}{removed code to reset for the caption package} % % \subsection{Interaction with the \Lpack{float} package} % diff --git a/macros/latex/contrib/memoir/memoir.ins b/macros/latex/contrib/memoir/memoir.ins index 51d5199da7..06f849e901 100644 --- a/macros/latex/contrib/memoir/memoir.ins +++ b/macros/latex/contrib/memoir/memoir.ins @@ -6,12 +6,12 @@ %% %% 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 +%% version 1.3c of this license or (at your option) any %% later version. %% The latest version of the license is in %% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of -%% LaTeX version 2003/06/01 or later. +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2008/05/04 or later. %% %% This work has the LPPL maintenance status "maintained". %% (Note: Lars Madsen is gradually taking over maintenance) diff --git a/macros/latex/contrib/memoir/mempatch.dtx b/macros/latex/contrib/memoir/mempatch.dtx index eeb291600c..560af702e5 100644 --- a/macros/latex/contrib/memoir/mempatch.dtx +++ b/macros/latex/contrib/memoir/mempatch.dtx @@ -7,12 +7,12 @@ % % 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 +% version 1.3c of this license or (at your option) any % later version. % The latest version of the license is in % http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of -% LaTeX version 2003/06/01 or later. +% and version 1.3c or later is part of all distributions of +% LaTeX version 2008/05/04 or later. % % This work has the LPPL maintenance status "maintained". % diff --git a/macros/latex/contrib/memoir/mempatch.ins b/macros/latex/contrib/memoir/mempatch.ins index a42ac89c6c..3dfe4b0cd2 100644 --- a/macros/latex/contrib/memoir/mempatch.ins +++ b/macros/latex/contrib/memoir/mempatch.ins @@ -6,12 +6,12 @@ %% %% 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 +%% version 1.3c of this license or (at your option) any %% later version. %% The latest version of the license is in %% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of -%% LaTeX version 2003/06/01 or later. +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2008/05/04 or later. %% %% This work has the LPPL maintenance status "maintained". %% diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf Binary files differindex 21154fbe67..f9d2004bed 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index 9ae1a3a8ab..8656d61f09 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -1,4 +1,4 @@ -% -*- coding: utf-8 ; -*- +% -*- coding: utf-8 ; -*- \documentclass[dvipsnames]{article}% dvipsnames is for xcolor (loaded by Tikz, loaded by nicematrix) \usepackage{xltxtra} \usepackage[french]{babel} @@ -521,6 +521,9 @@ d'intérêt que si |draw| est utilisée) ; le fond dessiné par |fill|) avec un rayon égal à la valeur de cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur par défaut est la valeur initiale des \emph{rounded corners} de Tikz.}). +\item \colorbox{yellow!50}{\textbf{Nouveau 5.13}}\enskip la clé |borders| permet +de ne tracer que certaines des bordures du bloc : cette clé prend comme valeur +une liste d'éléments parmi les suivants : |left|, |right|, |top| et |bottom|. \end{itemize} @@ -748,7 +751,8 @@ Marie & Pauline \\ \hline \bigskip -En revanche, les filets verticaux ne sont pas tracés à l'intérieur des blocs. +En revanche, les filets verticaux ne sont pas tracés à l'intérieur des blocs +(créés par |\Block|: cf.~p.~\pageref{Block}). \bigskip @@ -898,6 +902,19 @@ p.~\pageref{OnlyMainNiceMatrix}. +\bigskip +\subsection{La commande \textbackslash Hline} + +On a dit que les traits verticaux spécifiés par un symbole «\verb+|+» dans le +préambule (pour les environnements à préambule, bien entendu) n'étaient pas +tracés dans les blocs.\footnote{Ces blocs sont ceux créés par les commandes + \verb|\Block| et \verb|\multicolumn| mais aussi ceux délimités implicitement + par des lignes en pointillés continues (créées par \verb|\Cdots|, etc.).} + +\smallskip +\colorbox{yellow!50}{\textbf{Nouveau 5.13}}\enskip Pour proposer des filets horizontaux +ayant le même comportement, l'extension \pkg{nicematrix} fournit la commande +|\Hline|. \bigskip @@ -925,6 +942,10 @@ $\begin{pNiceMatrix}[vlines,rules/width=0.2pt] 1 & 2 & 3 & 4 & 5 & 6 \end{pNiceMatrix}$ +\medskip +\colorbox{yellow!50}{\textbf{Nouveau 5.13}}\enskip Il est possible de donner à +la clé |vlines| une liste de numéros qui seront les numéros des filets verticaux +qui seront tracés. Il en est de même pour |hlines|. \subsection{La clé hvlines} @@ -957,6 +978,8 @@ arum & iris & jacinthe & muguet \subsection{La clé hvlines-except-corners} +\label{except-corners} + La clé |hvlines-except-corners| demande le tracé de tous les filets horizontaux et verticaux sauf dans les blocs (y compris dans les blocs virtuels déterminés par des lignes en pointillés) et sauf dans les coins vides. @@ -1020,6 +1043,10 @@ prendre en considération, les coins étant désignés par |NW|, |SW|, |NE| et | 1&5&10&10&5&1 \end{NiceTabular} +\medskip +$\triangleright$ Le concept de coins est aussi utilisé par la commande +|\arraycolor| dans le |\CodeBefore| qui accepte en option une clé +|except-corners| : cf.~p.~\pageref{arraycolor}. \subsection{La commande \textbackslash diagbox} @@ -1101,17 +1128,18 @@ Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour indiquer dans le préambule un trait vertical en pointillés avec l'option |letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|. Ainsi libérée, la lettre «|:|» peut être utilisée par ailleurs (par exemple par -l'extension \pkg{arydshln}). +l'extension \pkg{arydshln}\footnote{On remarquera néanmoins que l'extension + \pkg{arydshln} n'est pas parfaitement compatible avec l'extension \pkg{nicematrix}.}). \bigskip \emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie \pkg{nicematrix}) est chargée, les traits verticaux et horizontaux que l'on insère rendent le tableau plus large ou plus long d'une quantité égale à la -largeur du trait\footnote{En fait, cela est vrai pour |\hline| et «\verb+|+» - mais pas pour |\cline| : cf. p.~\pageref{remark-cline}}. Avec -\pkg{nicematrix}, les lignes en pointillés tracées par |\hdottedline| et «|:|» -ont ce même effet. +largeur du trait\footnote{En fait, avec l'extension \pkg{array}, cela est vrai + pour |\hline| et «\verb+|+» mais pas pour |\cline| : cf. + p.~\pageref{remark-cline}}. Avec \pkg{nicematrix}, les lignes en pointillés +tracées par |\hdottedline| et «|:|» ont ce même effet. @@ -1160,7 +1188,7 @@ L'extension \pkg{nicematrix} propose des outils qui permettent d'éviter ces inconvénients. \end{itemize} -\subsection{Les outils de nicematrix dans le code-before} +\subsection{Les outils de nicematrix dans le \textbackslash CodeBefore} L'extension \pkg{nicematrix} propose des outils (indépendants de \pkg{colortbl}) pour tracer d'abord les rectangles colorés, puis le contenu des cases et les @@ -1189,10 +1217,10 @@ proposée : on peut placer le contenu de ce |code-before| entre les mots-clés \smallskip De nouvelles commandes sont disponibles dans ce |\CodeBefore| : -|\cellcolor|, |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors| et -|\chessboardcolors|.\footnote{On pourra remarquer que, dans le - \verb|code-before|, des nœuds PGF/Tikz correspondant à la position des filets - éventuels sont également accessibles : cf. p.~\pageref{noeuds-i}.} +|\cellcolor|, |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors| +|\chessboardcolors| et |\arraycolor|.\footnote{On pourra remarquer que, dans le + \verb|\CodeBefore|, des nœuds PGF/Tikz de la forme \verb+(i-|j)+ correspondant + à la position des filets éventuels sont également accessibles : cf. p.~\pageref{noeuds-i}.} \label{code-before} \medskip @@ -1214,7 +1242,7 @@ format $i$-$j$ où $i$ est le numéro de ligne et $j$ le numéro de colonne. \begin{BVerbatim}[boxwidth=10cm,baseline=c] \begin{NiceTabular}{|c|c|c|} \CodeBefore - ~emphase#\cellcolor{red!15}{3-1,2-2,1-3}@ + ~emphase#\cellcolor[HTML]{FFFF88}{3-1,2-2,1-3}@ \Body \hline a & b & c \\ \hline @@ -1224,7 +1252,7 @@ h & i & j \\ \hline \end{BVerbatim} \begin{NiceTabular}{|c|c|c|} \CodeBefore - \cellcolor{red!15}{3-1,2-2,1-3} + \cellcolor[HTML]{FFFF88}{3-1,2-2,1-3} \Body \hline a & b & c \\ \hline @@ -1349,7 +1377,7 @@ couleur.\footnote{Autrement, la couleur d'une rangée ne dépend que de la parit de son numéro.} -\item Avec la clé |respect-blocks|, qui est de type booléen, les ``rangées'' +\item Avec la clé |respect-blocks|, qui est de type booléen, les «rangées» colorées alternativement peuvent s'étendre sur plusieurs rangées réelles du tableau pour englober les blocs (créés par la commande |\Block| : cf.~p.~\pageref{Block}). \end{itemize} @@ -1361,7 +1389,7 @@ tableau pour englober les blocs (créés par la commande |\Block| : cf.~p.~\page \begin{BVerbatim}[baseline=c,boxwidth=9cm] \begin{NiceTabular}{clr}[hvlines] \CodeBefore - ~emphase#{\rowcolors{2}{blue!10}{}[cols=2-3,restart]}@ + ~emphase#\rowcolors{2}{blue!10}{}[cols=2-3,restart]@ \Body \Block{1-*}{Résultats} \\ \Block{2-1}{A}& Pierre & 12 \\ @@ -1439,7 +1467,7 @@ couleurs et colorie les cases en quinconces avec les deux couleurs. \begin{BVerbatim}[baseline=c,boxwidth=9cm] $\begin{pNiceMatrix}[r,margin] \CodeBefore - ~emphase#code-before=\chessboardcolors{red!15}{blue!15}@ + ~emphase#\chessboardcolors{red!15}{blue!15}@ \Body 1 & -1 & 1 \\ -1 & 1 & -1 \\ @@ -1459,6 +1487,42 @@ $\begin{pNiceMatrix}[baseline=1, r, margin] \medskip On a utilisé la clé |r| qui impose que toutes les colonnes soient alignées à droite (cf. p.~\pageref{key-R}). + +\item \colorbox{yellow!50}{\textbf{Nouveau 5.13}}\enskip La commande +|\arraycolor| prend en argument obligatoire une couleur et colorie tout le +tableau (sauf les éventuelles rangées et colonnes extérieures: cf.~p.~\pageref{exterior}) avec cette +couleur. Elle est surtout intéressante du fait de la clé |except-corners| +qu'elle accepte entre crochets en troisième argument (optionnel). La définition +des coins a été donnée p.~\pageref{except-corners} quand on a présenté la clé +|hvlines-except-corners|. + +\label{arraycolor} + +\medskip +\begin{BVerbatim}[boxwidth=10cm,baseline=c] +\begin{NiceTabular}{*{6}{c}}[cell-space-top-limit=3pt] +\CodeBefore + ~emphase#\arraycolor{blue!10}[except-corners=NE]@ +\Body +1\\ +1&1\\ +1&2&1\\ +1&3&3&1\\ +1&4&6&4&1\\ +1&5&10&10&5&1 +\end{NiceTabular} +\end{BVerbatim} +\begin{NiceTabular}{*{6}{c}}[cell-space-top-limit=3pt] +\CodeBefore + \arraycolor{blue!10}[except-corners=NE] +\Body +1\\ +1&1\\ +1&2&1\\ +1&3&3&1\\ +1&4&6&4&1\\ +1&5&10&10&5&1 +\end{NiceTabular} \end{itemize} \bigskip @@ -1704,9 +1768,6 @@ $\begin{array}{c} \end{array}$ \end{NiceMatrixBlock} -\medskip -\textbf{Plusieurs compilations peuvent être nécessaires pour obtenir le résultat désiré.} - \bigskip @@ -2431,7 +2492,6 @@ p.~\pageref{customization}). \label{sub-matrix} -\colorbox{yellow!30}{Nouveau 5.10}\enskip La commande |\SubMatrix| permet de positionner des délimiteurs sur une partie du tableau, partie qui est considérée comme une sous-matrice. La commande |\SubMatrix| prend cinq arguments : @@ -2497,20 +2557,7 @@ environnements à délimiteurs ou comme option de |\CodeAfter|) ; \item |slim| qui est une clé booléenne : lorsqu'elle est utilisée la position horizontale des délimiteurs est calculée uniquement sur le contenu des cases de la sous-matrice alors, que, dans le cas général, elle est calculée sur le -contenu des cases des colonnes mises en jeu (voir exemple ci-dessous). -\end{itemize} - -Ces clés sont aussi accessibles dans |\NiceMatrixOptions|, au niveau des -environnements de \pkg{nicematrix} ou comme option de |\CodeAfter| avec le -préfixe |sub-matrix|, c'est-à-dire qu'elles sont alors nommées -|sub-matrix/left-xshift|, |sub-matrix/right-xshift|, |sub-matrix/xshift|, etc. - -\medskip -\colorbox{yellow!50}{\textbf{Nouveau 5.12}}\enskip Il y a aussi les clés -suivantes, qui ne sont accessibles que pour une commande |\SubMatrix| -individuelle : -% -\begin{itemize} +contenu des cases des colonnes mises en jeu (voir exemple ci-dessous) ; \item |vlines| contient une liste de numéros de filets verticaux à tracer dans la sous-matrice (si cette clé est utilisée sans valeur, tous les filets verticaux sont tracés) ; @@ -2521,6 +2568,12 @@ On remarquera que tous ces filets sont dessinés après la construction du table principal : les colonnes et les rangées ne sont pas écartées. \bigskip +Ces clés sont aussi accessibles dans |\NiceMatrixOptions|, au niveau des +environnements de \pkg{nicematrix} ou comme option de |\CodeAfter| avec le +préfixe |sub-matrix|, c'est-à-dire qu'elles sont alors nommées +|sub-matrix/left-xshift|, |sub-matrix/right-xshift|, |sub-matrix/xshift|, etc. + +\bigskip \begin{scope} \hfuzz=12cm \fvset{commandchars=\~\#\!}% @@ -3585,6 +3638,10 @@ l'intersection du filet horizontal de numéro $i$ et du filet vertical de numéro~$j$ (ou plutôt la position potentielle de ces filets car ils ne sont peut-être pas tracés). Ces nœuds sont accessibles dans le |\CodeAfter| mais aussi dans le |code-before|. + + +\colorbox{yellow!50}{Nouveau 5.13}\enskip Le dernier nœud a aussi un alias nommé +|last|. \begin{center} \begin{NiceTabular}{ccc}[hvlines,rules={width=1pt,color=gray}] rose & tulipe & lys \\ @@ -3648,7 +3705,6 @@ horizontal~$i$ et du filet vertical~$j$ avec la syntaxe |(|$i$\verb+-|+$j$|)|. \label{node-sub-matrix} -\colorbox{yellow!30}{Nouveau 5.10}\enskip La commande |\SubMatrix| disponible dans le |\CodeAfter| a été présentée p.~\pageref{sub-matrix}. @@ -4233,8 +4289,8 @@ $\begin{pNiceMatrix}[first-row,first-col] \subsection{Empilements de matrices} -On a souvent besoin de présetner des matrices empilées les unes au-dessus des -autres (par exemple pour la résolutiond de systèmes linéaires). +On a souvent besoin de présenter des matrices empilées les unes au-dessus des +autres (par exemple pour la résolution de systèmes linéaires). \medskip @@ -4416,11 +4472,11 @@ Bien sûr, ce tableau ne pourra pas être coupé par un saut de page. 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] 12 & -8 &7 &5 & 3 \\ 0 & 64 &-41 & 1 & 19 \\ -~emphase#\CodeAfter@ -~emphase# \SubMatrix({1-1}{4-5})[vlines=4]@ -~emphase# \SubMatrix({5-1}{8-5})[vlines=4]@ -~emphase# \SubMatrix({9-1}{11-5})[vlines=4]@ -~emphase# \SubMatrix({12-1}{13-5})[vlines=4]@ +~emphase#\CodeAfter [sub-matrix/vlines=4]@ +~emphase# \SubMatrix({1-1}{4-5})@ +~emphase# \SubMatrix({5-1}{8-5})@ +~emphase# \SubMatrix({9-1}{11-5})@ +~emphase# \SubMatrix({12-1}{13-5})@ \end{NiceMatrix}\] \end{Verbatim} @@ -4442,11 +4498,11 @@ Bien sûr, ce tableau ne pourra pas être coupé par un saut de page. 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] 12 & -8 &7 &5 & 3 \\ 0 & 64 &-41 & 1 & 19 \\ -\CodeAfter - \SubMatrix({1-1}{4-5})[vlines=4] - \SubMatrix({5-1}{8-5})[vlines=4] - \SubMatrix({9-1}{11-5})[vlines=4] - \SubMatrix({12-1}{13-5})[vlines=4] +\CodeAfter [sub-matrix/vlines=4] + \SubMatrix({1-1}{4-5}) + \SubMatrix({5-1}{8-5}) + \SubMatrix({9-1}{11-5}) + \SubMatrix({12-1}{13-5}) \end{NiceMatrix}\] \end{scope} diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index a84069b7c8..38269b145c 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{5.12} -\def\myfiledate{2021/03/10} +\def\myfileversion{5.13} +\def\myfiledate{2021/03/23} % % %<*batchfile> @@ -346,7 +346,7 @@ version 2005/12/01 or later. % immediately after an |\item| of list. One should remark that the presence of a % |\hline| at the beginning of the array doesn't prevent the alignment of the % baseline with the baseline of the first row (with |{tabular}| or |{array}| of -% \pkg{array}, one must use |\firsthline|. +% \pkg{array}, one must use |\firsthline|). % % \medskip % \begin{BVerbatim}[baseline=c,boxwidth=9cm] @@ -566,6 +566,10 @@ version 2005/12/01 or later. % |fill|) with a radius equal to the value of that key (the default value is % 4~pt\footnote{This value is the initial value of the \emph{rounded corners} of % Tikz.}). +% \item \colorbox{yellow!50}{\textbf{New 5.13}}\enskip the key |borders| provides +% the ability to draw only some borders of the blocks; the value of that key is +% a (comma-separated) list of elements covered by |left|, |right|, |top| and +% |bottom|. % \end{itemize} % % \interitem @@ -780,7 +784,8 @@ version 2005/12/01 or later. % % % \bigskip -% However, the vertical rules are not drawn in the blocks. +% However, the vertical rules are not drawn in the blocks (created by |\Block|: +% cf.~p.~\pageref{Block}). % % \bigskip % If you use \pkg{booktabs} (which provides |\toprule|, |\midrule|, @@ -920,6 +925,18 @@ version 2005/12/01 or later. % he should consider the command |\OnlyMainNiceMatrix| described on % page~\pageref{OnlyMainNiceMatrix}. % +% +% \subsection{The command \textbackslash Hline} +% +% We have said that the vertical rules specified by a symbol ``\verb+|+'' in the +% preamble (for the environments with preamble, of course) are not drawn in the +% blocks.\footnote{Those blocks are those created by the commands \verb|\Block| +% and |\multicolumn| but also those implicitely determined by the continuous +% dotted lines (created by \verb|\Cdots|, etc.).} +% +% \smallskip +% \colorbox{yellow!50}{\textbf{New 5.13}}\enskip In order to have horizontal +% rules with the same behaviour, \pkg{nicematrix} provides the command |\Hline|. % % % \subsection{The keys hlines and vlines} @@ -928,7 +945,7 @@ version 2005/12/01 or later. % the vertical rules excepted in the blocks, created by |\Block| and the virtual % blocks determined by dotted lines: |\Cdots|, |\Vdots|, etc.. In fact, in the % environments with delimiters (as |{pNiceMatrix}| or |{bNiceArray}|) the -% exteriors rules are not drawn (as expected). +% exterior rules are not drawn (as expected). % % \medskip % \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] @@ -945,6 +962,11 @@ version 2005/12/01 or later. % \end{pNiceMatrix}$ % % +% \bigskip +% \colorbox{yellow!50}{\textbf{New 5.13}}\enskip It's possible to provide to the +% key |vlines| a (comma-separated) list of numbers, which are the numbers of the +% vertical rules to draw. The key |hlines| has a similar behaviour. +% % % \subsection{The key hvlines} % \label{hvlines} @@ -978,6 +1000,8 @@ version 2005/12/01 or later. % % \subsection{The key hvlines-except-corners} % +% \label{except-corners} +% % The key |hvlines-except-corners| draws all the horizontal and vertical rules, % excepted in the blocks (and the virtual blocks determined by dotted lines) and % excepted in the empty corners. @@ -1041,6 +1065,10 @@ version 2005/12/01 or later. % 1&5&10&10&5&1 % \end{NiceTabular} % +% \bigskip +% $\triangleright$ The concept of corner is also used by the command +% |\arraycolor| in the |\CodeBefore| which takes in as option a key +% |except-corners|: cf.~p.~\pageref{arraycolor}. % % \subsection{The command \textbackslash diagbox} % @@ -1119,14 +1147,16 @@ version 2005/12/01 or later. % It's possible to change in \pkg{nicematrix} the letter used to specify a % vertical dotted line with the option |letter-for-dotted-lines| available in % |\NiceMatrixOptions|. Thus released, the letter ``|:|'' can be used otherwise -% (for example by the package \pkg{arydshln}). +% (for example by the package \pkg{arydshln}\footnote{However, one should remark +% that the package \pkg{arydshln} is not fully compatible with +% \pkg{nicematrix}.}). % % \bigskip -% \emph{Remark} : In the package \pkg{array} (on which the package +% \emph{Remark}: In the package \pkg{array} (on which the package % \pkg{nicematrix} relies), horizontal and vertical rules make the array larger -% or wider by a quantity equal to the width of the rule\footnote{In fact, this -% is true only for |\hline| and ``"|"'' but not for |\cline|: cf -% p.~\pageref{remark-cline}}. In \pkg{nicematrix}, the dotted lines drawn by +% or wider by a quantity equal to the width of the rule\footnote{In fact, with +% \pkg{array}, this is true only for |\hline| and ``"|"'' but not for |\cline|: +% cf p.~\pageref{remark-cline}}. In \pkg{nicematrix}, the dotted lines drawn by % |\hdottedline| and ``|:|'' do likewise. % % @@ -1147,7 +1177,7 @@ version 2005/12/01 or later. % However, there is two drawbacks: % \begin{itemize} % \item The package \pkg{colortbl} patches \pkg{array}, leading to some -% incompatibilities (for example with the command |\hdotsfor|). +% incompatibilities (for instance with the command |\hdotsfor|). % % \item The package \pkg{colortbl} constructs the array row by row, alterning % colored rectangles, rules and contents of the cells. The resulting @@ -1171,7 +1201,7 @@ version 2005/12/01 or later. % The package \pkg{nicematrix} provides tools to avoid those problems. % \end{itemize} % -% \subsection{The tools of nicematrix in the code-before} +% \subsection{The tools of nicematrix in the \textbackslash CodeBefore} % % The package \pkg{nicematrix} provides some tools (independent of % \pkg{colortbl}) to draw the colored panels first, and, then, the content @@ -1198,10 +1228,11 @@ version 2005/12/01 or later. % \end{Verbatim} % % New commands are available in that |\CodeBefore|: |\cellcolor|, -% |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors| and -% |\chessboardcolors|.\footnote{Remark that, in the \verb|code-before|, some -% PGF/Tikz nodes corresponding to the position to the potential rules are -% available: cf.~p.~\pageref{nodes-i}.} +% |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|, +% |\chessboardcolors| and |arraycolor|.\footnote{Remark that, in the +% \verb|\CodeBefore|, PGF/Tikz nodes of the form ``\verb+(i-|j)+'' are also +% available to indicate the position to the potential rules: +% cf.~p.~\pageref{nodes-i}.} % \label{code-before} % % \medskip @@ -1224,7 +1255,7 @@ version 2005/12/01 or later. % \begin{BVerbatim}[boxwidth=10cm,baseline=c] % \begin{NiceTabular}{|c|c|c|} % \CodeBefore -% ~emphase#\cellcolor{red!15}{3-1,2-2,1-3}@ +% ~emphase#\cellcolor[HTML]{FFFF88}{3-1,2-2,1-3}@ % \Body % \hline % a & b & c \\ \hline @@ -1234,7 +1265,7 @@ version 2005/12/01 or later. % \end{BVerbatim} % \begin{NiceTabular}{|c|c|c|} % \CodeBefore -% \cellcolor{red!15}{3-1,2-2,1-3} +% \cellcolor[HTML]{FFFF88}{3-1,2-2,1-3} % \Body % \hline % a & b & c \\ \hline @@ -1436,7 +1467,7 @@ version 2005/12/01 or later. % \begin{BVerbatim}[baseline=c,boxwidth=9cm] % $\begin{pNiceMatrix}[r,margin] % \CodeBefore -% ~emphase#code-before=\chessboardcolors{red!15}{blue!15}@ +% ~emphase#\chessboardcolors{red!15}{blue!15}@ % \Body % 1 & -1 & 1 \\ % -1 & 1 & -1 \\ @@ -1454,7 +1485,47 @@ version 2005/12/01 or later. % \end{scope} % % \medskip -% We have used the key |r| which aligns all the columns rightwards (cf. p.~\pageref{key-R}). +% We have used the key |r| which aligns all the columns rightwards (cf. +% p.~\pageref{key-R}). +% +% +% \item \colorbox{yellow!50}{\textbf{New 5.13}}\enskip +% The command |\arraycolor| takes in as mandatory argument a color and color +% the whole tabular with that color (excepted the potential exterior rows and +% columns: cf.~p.~\pageref{exterior}). This command is useful thanks to its key +% |except-corners| (in the third argument, which is a optional argument between +% square brackets). The definition of these ``corners'' has been given +% p.~\pageref{except-corners} when we have presented the key +% |hvlines-except-corners|. +% +% \label{arraycolor} +% +% +% \medskip +% \begin{BVerbatim}[boxwidth=10cm,baseline=c] +% \begin{NiceTabular}{*{6}{c}}[cell-space-top-limit=3pt] +% \CodeBefore +% ~emphase#\arraycolor{blue!10}[except-corners=NE]@ +% \Body +% 1\\ +% 1&1\\ +% 1&2&1\\ +% 1&3&3&1\\ +% 1&4&6&4&1\\ +% 1&5&10&10&5&1 +% \end{NiceTabular} +% \end{BVerbatim} +% \begin{NiceTabular}{*{6}{c}}[cell-space-top-limit=3pt] +% \CodeBefore +% \arraycolor{blue!10}[except-corners=NE] +% \Body +% 1\\ +% 1&1\\ +% 1&2&1\\ +% 1&3&3&1\\ +% 1&4&6&4&1\\ +% 1&5&10&10&5&1 +% \end{NiceTabular} % \end{itemize} % % @@ -1695,10 +1766,6 @@ version 2005/12/01 or later. % \end{array}$ % \end{NiceMatrixBlock} % -% \medskip -% \textbf{Several compilations may be necessary to achieve the job.} -% -% % % \bigskip % \section{The exterior rows and columns} @@ -2405,7 +2472,6 @@ version 2005/12/01 or later. % % \label{sub-matrix} % -% \colorbox{yellow!30}{New 5.10}\enskip % The command |\SubMatrix| provides a way to put delimiters on a portion % of the array considered as a submatrix. The command |\SubMatrix| takes in five % arguments: @@ -2469,33 +2535,24 @@ version 2005/12/01 or later. % position of the delimiters is computed by using only the contents of the cells % of the submatrix whereas, in the general case, the position is computed by % taking into account the cells of the whole columns implied in the submatrix -% (see example below). -% \end{itemize} -% -% These keys are also available in |\NiceMatrixOptions|, at the level of the -% environments of \pkg{nicematrix} or as option of the command |\CodeAfter| with -% the prefix |sub-matrix| which means that their names are therefore -% |sub-matrix/left-xshift|, |sub-matrix/right-xshift|, |sub-matrix/xshift|, etc. -% -% \bigskip -% \medskip -% \colorbox{yellow!50}{\textbf{New 5.12}}\enskip There is also the following -% keys, which are available only for an individual command |\SubMatrix|: -% -% \begin{itemize} +% (see example below). ; % \item |vlines| contents a list of numbers of vertical rules that will be drawn in % the sub-matrix (if this key is used without value, all the vertical rules of % the sub-matrix are drawn); -% % \item |hlines| is similar to |vlines| but for the horizontal rules; -% % \item |hvlines|, which must be used without value, draws all the vertical and % horizontal rules. % \end{itemize} % One should remark that these keys add their rules after the construction of % the main matrix: no space is added between the rows and the columns of the % array for theses rules. -% +% +% \bigskip +% All these keys are also available in |\NiceMatrixOptions|, at the level of the +% environments of \pkg{nicematrix} or as option of the command |\CodeAfter| with +% the prefix |sub-matrix| which means that their names are therefore +% |sub-matrix/left-xshift|, |sub-matrix/right-xshift|, |sub-matrix/xshift|, etc. +% % \bigskip % \begin{scope} % \hfuzz=12cm @@ -3538,6 +3595,9 @@ version 2005/12/01 or later. % number~$j$ (more specifically the potential position of those rules because % maybe there are not actually drawn). These nodes are available in the % |code-before| and the |\CodeAfter|. +% +% \colorbox{yellow!50}{\textbf{New 5.13}}\enskip The last node has also an alias called +% |last|. % \begin{center} % \begin{NiceTabular}{ccc}[hvlines,rules/width=1pt,rules/color=gray] % rose & tulipe & lys \\ @@ -3599,7 +3659,6 @@ version 2005/12/01 or later. % % \label{node-sub-matrix} % -% \colorbox{yellow!30}{New 5.10}\enskip % The command |\SubMatrix| available in the |\CodeAfter| has been described % p.~\pageref{sub-matrix}. % @@ -3892,7 +3951,7 @@ version 2005/12/01 or later. % \pkg{amsmath} prefer to delete these spaces with explicit instructions % |\hskip -\arraycolsep|\footnote{And not by inserting |@{}| on both sides of the % preamble of the array. As a consequence, the length of the |\hline| is not -% modified and may appear too long, in particular when using square brackets}. +% modified and may appear too long, in particular when using square brackets.}. % The package \pkg{nicematrix} does the same in all its environments, % |{NiceArray}| included. However, if the user wants the environment % |{NiceArray}| behaving by default like the environment |{array}| of @@ -4349,11 +4408,11 @@ version 2005/12/01 or later. % 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] % 12 & -8 &7 &5 & 3 \\ % 0 & 64 &-41 & 1 & 19 \\ -% ~emphase#\CodeAfter@ -% ~emphase# \SubMatrix({1-1}{4-5})[vlines=4]@ -% ~emphase# \SubMatrix({5-1}{8-5})[vlines=4]@ -% ~emphase# \SubMatrix({9-1}{11-5})[vlines=4]@ -% ~emphase# \SubMatrix({12-1}{13-5})[vlines=4]@ +% ~emphase#\CodeAfter [sub-matrix/vlines=4]@ +% ~emphase# \SubMatrix({1-1}{4-5})@ +% ~emphase# \SubMatrix({5-1}{8-5})@ +% ~emphase# \SubMatrix({9-1}{11-5})@ +% ~emphase# \SubMatrix({12-1}{13-5})@ % \end{NiceMatrix}\] % \end{Verbatim} % @@ -4374,11 +4433,11 @@ version 2005/12/01 or later. % 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] % 12 & -8 &7 &5 & 3 \\ % 0 & 64 &-41 & 1 & 19 \\ -% \CodeAfter -% \SubMatrix({1-1}{4-5})[vlines=4] -% \SubMatrix({5-1}{8-5})[vlines=4] -% \SubMatrix({9-1}{11-5})[vlines=4] -% \SubMatrix({12-1}{13-5})[vlines=4] +% \CodeAfter [sub-matrix/vlines=4] +% \SubMatrix({1-1}{4-5}) +% \SubMatrix({5-1}{8-5}) +% \SubMatrix({9-1}{11-5}) +% \SubMatrix({12-1}{13-5}) % \end{NiceMatrix}\] % \end{scope} % @@ -5606,11 +5665,12 @@ version 2005/12/01 or later. % \end{macrocode} % % \medskip -% The following parameters correspond to the keys |fill|, |draw| and +% The following parameters correspond to the keys |fill|, |draw|, |borders| and % |rounded-corners| of the command |\Block|. % \begin{macrocode} \tl_new:N \l_@@_fill_tl \tl_new:N \l_@@_draw_tl +\clist_new:N \l_@@_borders_clist \dim_new:N \l_@@_rounded_corners_dim % \end{macrocode} % @@ -5659,6 +5719,8 @@ version 2005/12/01 or later. \dim_new:N \l_@@_submatrix_right_xshift_dim \clist_new:N \l_@@_hlines_clist \clist_new:N \l_@@_vlines_clist +\clist_new:N \l_@@_submatrix_hlines_clist +\clist_new:N \l_@@_submatrix_vlines_clist % \end{macrocode} % % @@ -7497,7 +7559,8 @@ version 2005/12/01 or later. } \endpgfpicture % \end{macrocode} -% Now, you create the diagonal nodes by using the |row| nodes and the |col| nodes. +% Now, you create the diagonal nodes by using the |row| nodes and the |col| +% nodes. If the engine is |xetex| or |luatex| we also create the ``½ nodes''. % \begin{macrocode} \@@_create_diag_nodes: % \end{macrocode} @@ -7519,6 +7582,7 @@ version 2005/12/01 or later. \cs_set_eq:NN \roundedrectanglecolor \@@_roundedrectanglecolor \cs_set_eq:NN \rowcolor \@@_rowcolor \cs_set_eq:NN \rowcolors \@@_rowcolors + \cs_set_eq:NN \arraycolor \@@_arraycolor \cs_set_eq:NN \columncolor \@@_columncolor \cs_set_eq:NN \chessboardcolors \@@_chessboardcolors \cs_set_eq:NN \SubMatrix \@@_SubMatrix_in_code_before @@ -7527,7 +7591,7 @@ version 2005/12/01 or later. % by the user between instructions in the |code-before|. % \begin{macrocode} \bool_if:NT \l_@@_NiceTabular_bool \c_math_toggle_token - \seq_clear_new:N \l_@@_colors_seq + \seq_gclear_new:N \g_@@_colors_seq % \end{macrocode} % Here is the |\CodeBefore|. As of now, the keys that may be provided to the % keyword |\CodeBefore| are the same as keys that may be provided to @@ -7699,9 +7763,10 @@ version 2005/12/01 or later. % |\CodeBefore|). By definition, the |\CodeBefore| must be executed before the % body of the array... % \begin{macrocode} - \@@_pre_array: + \@@_pre_array: } % \end{macrocode} +% % % \bigskip % \subsection*{The environment \{NiceArrayWithDelims\}} @@ -9511,15 +9576,10 @@ version 2005/12/01 or later. % \end{macrocode} % % \medskip +% Now, you create the diagonal nodes by using the |row| nodes and the |col| +% nodes. If the engine is |xetex| or |luatex| we also create the ``½ nodes''. % \begin{macrocode} - \@@_create_diag_nodes: - \str_if_empty:NF \l_@@_name_str - { - \pgfpicture - \pgfrememberpicturepositiononpagetrue - \pgfnodealias { \l_@@_name_str - ##1 } { \@@_env: - ##1 } - \endpgfpicture - } + \@@_create_diag_nodes: % \end{macrocode} % % By default, the diagonal lines will be parallelized\footnote{It's possible to @@ -9584,7 +9644,9 @@ version 2005/12/01 or later. % % \bigskip % The following computes the ``corners'' (made up of empty cells) but if there -% is no corner to compute, it will do nothing. +% is no corner to compute, it will do nothing. The corners are computed +% in |\l_@@_empty_corner_cells_seq| which will contain all the empty cells (and +% not in a block) considered in the corners of the array. % \begin{macrocode} \@@_compute_corners: % \end{macrocode} @@ -9804,18 +9866,50 @@ version 2005/12/01 or later. % \bigskip % The following command creates the diagonal nodes (in fact, if the matrix is % not a square matrix, not all the nodes are on the diagonal). -% % \begin{macrocode} \cs_new_protected:Npn \@@_create_diag_nodes: { + \pgfpicture + \pgfrememberpicturepositiononpagetrue \int_step_inline:nn { \int_max:nn \c@iRow \c@jCol + 1 } { - \pgfpicture - \pgfrememberpicturepositiononpagetrue \@@_qpoint:n { row - \int_min:nn { ##1 } { \c@iRow + 1 } } \dim_set_eq:NN \l_tmpa_dim \pgf@y \@@_qpoint:n { col - \int_min:nn { ##1 } { \c@jCol + 1 } } \pgfcoordinate { \@@_env: - ##1 } { \pgfpoint \pgf@x \l_tmpa_dim } + } + \pgfnodealias + { \@@_env: - last } + { \@@_env: - \int_eval:n { \int_max:nn \c@iRow \c@jCol + 1 } } + \endpgfpicture + } +% \end{macrocode} +% +% \bigskip +% As for now, the ½ nodes are not documented and they are created only in the +% native \textsc{utf8} engines, that is to say XeLaTeX and LuaLaTeX. +% \begin{macrocode} +\bool_if:nT + { \sys_if_engine_xetex_p: || \sys_if_engine_luatex_p: } + { \tl_put_right:Nn \@@_create_diag_nodes: \@@_create_half_nodes: } +% \end{macrocode} +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_create_half_nodes: + { + \int_step_inline:nn { \int_max:nn \c@iRow \c@jCol } + { + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgfcoordinate { \@@_env: - ##1 ½ } + { + \pgfpointscale { 0.5 } + { + \pgfpointadd + { \@@_qpoint:n { ##1 } } + { \@@_qpoint:n { \int_eval:n { ##1 + 1 } } } + } + } \endpgfpicture } } @@ -11564,13 +11658,13 @@ version 2005/12/01 or later. % the execution of the |code-before|) don't directly draw the corresponding % rectangles. Instead, they store their instructions color by color: % \begin{itemize} -% \item A sequence |\l_@@_colors_seq| will be built containing all the colors +% \item A sequence |\g_@@_colors_seq| will be built containing all the colors % used by at least one of these instructions. Each \emph{color} may be prefixed % by it color model (eg: |[gray]{0.5}|). -% \item For the color whose index in |\l_@@_colors_seq| is equal to~$i$, a list of +% \item For the color whose index in |\g_@@_colors_seq| is equal to~$i$, a list of % instructions which use that color will be constructed in the token list -% |\l_@@_color_|$i$|_tl|. In that token list, the instructions will -% |\@@_rowcolor:n|, |\@@_columncolor:n| and |\@@_rectanglecolor:nn| +% |\g_@@_color_|$i$|_tl|. In that token list, the instructions will be written +% using |\@@_rowcolor:n|, |\@@_columncolor:n| and |\@@_rectanglecolor:nn| % (corresponding of |\@@_rowcolor|, |\@@_columncolor| and |\@@_rectanglecolor|). % \end{itemize} % @@ -11578,8 +11672,11 @@ version 2005/12/01 or later. % bigskip % |#1| is the color and |#2| is an instruction using that color. Despite its % name, the command |\@@_add_to_color_seq| doesn't only add a color to -% |\l_@@_colors_seq|: it also updates the corresponding token list -% |\l_@@_color_|$i$|_tl|. +% |\g_@@_colors_seq|: it also updates the corresponding token list +% |\g_@@_color_|$i$|_tl|. We add in a global way because the final user may use +% the instructions such as |\cellcolor| in a loop of \pkg{pgffor} in the +% |\CodeBefore| (and we recall that a loop of \pkg{pgffor} is encapsulated in a +% group). % \begin{macrocode} \cs_new_protected:Npn \@@_add_to_colors_seq:nn #1 #2 { @@ -11589,21 +11686,21 @@ version 2005/12/01 or later. % |\l_tmpa_int| will remain equal to $0$. % \begin{macrocode} \int_zero:N \l_tmpa_int - \seq_map_indexed_inline:Nn \l_@@_colors_seq + \seq_map_indexed_inline:Nn \g_@@_colors_seq { \tl_if_eq:nnT { #1 } { ##2 } { \int_set:Nn \l_tmpa_int { ##1 } } } \int_compare:nNnTF \l_tmpa_int = \c_zero_int % \end{macrocode} % First, the case where the color is a \emph{new} color (not in the sequence). % \begin{macrocode} { - \seq_put_right:Nn \l_@@_colors_seq { #1 } - \tl_set:cn { l_@@_color _ \seq_count:N \l_@@_colors_seq _ tl } { #2 } + \seq_gput_right:Nn \g_@@_colors_seq { #1 } + \tl_gset:cx { g_@@_color _ \seq_count:N \g_@@_colors_seq _ tl } { #2 } } % \end{macrocode} % Now, the case where the color is \emph{not} a new color (the color is in the % sequence at the position |\l_tmpa_int|). % \begin{macrocode} - { \tl_put_right:cn { l_@@_color _ \int_use:N \l_tmpa_int _tl } { #2 } } + { \tl_gput_right:cx { g_@@_color _ \int_use:N \l_tmpa_int _tl } { #2 } } } % \end{macrocode} % @@ -11620,10 +11717,11 @@ version 2005/12/01 or later. { \pgfpicture \pgf@relevantforpicturesizefalse - \seq_map_indexed_inline:Nn \l_@@_colors_seq + \seq_map_indexed_inline:Nn \g_@@_colors_seq { \color ##2 - \use:c { l_@@_color _ ##1 _tl } + \use:c { g_@@_color _ ##1 _tl } + \tl_gclear:c { g_@@_color _ ##1 _tl } \pgfusepath { fill } } \endpgfpicture @@ -11771,7 +11869,87 @@ version 2005/12/01 or later. } % \end{macrocode} % +% \bigskip +% \begin{macrocode} +\keys_define:nn { NiceMatrix / arraycolor } + { + except-corners .clist_set:N = \l_tmpa_clist , + except-corners .default:n = { NW , SW , NE , SE } + } +% \end{macrocode} +% +% \bigskip +% The command |\@@_arraycolor| (linked to |\arraycolor| at the beginning of +% the |\CodeBefore|) will color the whole tabular (excepted the potential +% exterior rows and columns). The third argument is a optional argument which a +% list of pairs key-value. As for now, there is only one key: |except-corners|. +% When that key is used, the cells in the corners are not colored. +% \begin{macrocode} +\NewDocumentCommand \@@_arraycolor { O { } m O { } } + { + \keys_set:nn { NiceMatrix / arraycolor } { #3 } +% \end{macrocode} +% If the key |except-corners| is not used, it's easy: we only have a rectangle +% fo fill. +% \begin{macrocode} + \clist_if_empty:NTF \l_tmpa_clist + { + \@@_rectanglecolor [ #1 ] { #2 } + { 1 - 1 } { \int_use:N \c@iRow - \int_use:N \c@jCol } + } +% \end{macrocode} +% The interesting case is when the key |except-corners| is used. In that case, +% we can't fill now the tabular because we don't know the list of the cells +% of the corners. That's why we postpone the treatment in the |\CodeAfter|. +% \begin{macrocode} + { + \tl_gput_left:Nx \g_@@_internal_code_after_tl + { + \@@_arraycolor_code_after:nnn + { #1 } + { \exp_not:n { #2 } } + { \l_tmpa_clist } + } + } + } +% \end{macrocode} +% +% \bigskip +% The following command will be used in the |\CodeAfter|. |#1| is the color +% model, |#2| the color and |#3| the value of the key |except-corners| (a +% sublist of |{NW,NE,SW,SE}|). +% \begin{macrocode} +\cs_new_protected:Npn \@@_arraycolor_code_after:nnn #1 #2 #3 + { + \group_begin: +% \end{macrocode} +% First, we compute the corners. +% \begin{macrocode} + \clist_set:Nn \l_@@_except_corners_clist { #3 } + \@@_compute_corners: +% \end{macrocode} +% Now, for each cell of the array (excepted the potential exterior rows and +% columns) we check whether we have to fill that cell. When we have to fill the +% cell, we do the job by writing an instruction in the |\CodeBefore| (in fact, +% the ``|\CodeBefore|'' which will be written on the |aux| file for the next +% run). +% \begin{macrocode} + \int_step_inline:nn \c@iRow + { + \int_step_inline:nn \c@jCol + { + \seq_if_in:NnF \l_@@_empty_corner_cells_seq { ##1 - ####1 } + { + \tl_gput_left:Nx \g_nicematrix_code_before_tl + { \@@_cellcolor [ #1 ] { \exp_not:n { #2 } } { ##1 - ####1 } } + } + } + } + \group_end: + } +% \end{macrocode} % +% % \bigskip % \begin{macrocode} \keys_define:nn { NiceMatrix / rowcolors } @@ -13755,6 +13933,8 @@ version 2005/12/01 or later. rounded-corners .default:n = 4 pt , color .code:n = \color { #1 } \tl_set:Nn \l_@@_draw_tl { #1 } , color .value_required:n = true , + borders .clist_set:N = \l_@@_borders_clist , + borders .value_required:n = true , line-width .dim_set:N = \l_@@_line_width_dim , line-width .value_required:n = true , l .code:n = \tl_set:Nn \l_@@_pos_of_block_tl l , @@ -13843,11 +14023,8 @@ version 2005/12/01 or later. \keys_set:nn { NiceMatrix / Block / SecondPass } { #5 } % \end{macrocode} % -% % \begin{macrocode} - \bool_lazy_or:nnT - { ! \tl_if_empty_p:N \l_@@_draw_tl } - { \dim_compare_p:nNn \l_@@_line_width_dim > \c_zero_dim } + \tl_if_empty:NF \l_@@_draw_tl { \tl_gput_right:Nx \g_nicematrix_code_after_tl { @@ -13862,6 +14039,19 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} + \clist_if_empty:NF \l_@@_borders_clist + { + \tl_gput_right:Nx \g_nicematrix_code_after_tl + { + \@@_stroke_borders_block:nnn + { \exp_not:n { #5 } } + { #1 - #2 } + { \int_use:N \l_@@_last_row_int - \int_use:N \l_@@_last_col_int } + } + } +% \end{macrocode} +% +% \begin{macrocode} \tl_if_empty:NF \l_@@_fill_tl { \tl_gput_right:Nx \g_nicematrix_code_before_tl @@ -14153,7 +14343,7 @@ version 2005/12/01 or later. % % \bigskip % The first argument of |\@@_stroke_block:nnn| is a list of options for the % rectangle that you will stroke. The second argument is the upper-left cell of -% the block (with, as usual, the syntex $i$|-|$j$) and the third is the last +% the block (with, as usual, the syntax $i$|-|$j$) and the third is the last % cell of the block (with the same syntax). % \begin{macrocode} \cs_new_protected:Npn \@@_stroke_block:nnn #1 #2 #3 @@ -14204,7 +14394,7 @@ version 2005/12/01 or later. { \pgfpoint \l_tmpd_dim \l_tmpa_dim } \pgfsetlinewidth { 1.1 \l_@@_line_width_dim } % \end{macrocode} -% We can't use |\pgfusepathqtroke| because of the key |rounded-corners|. +% We can't use |\pgfusepathqstroke| because of the key |rounded-corners|. % \begin{macrocode} \pgfusepath { stroke } } @@ -14217,10 +14407,6 @@ version 2005/12/01 or later. % \begin{macrocode} \keys_define:nn { NiceMatrix / BlockStroke } { -% \end{macrocode} -% We will uncomment the following line when we will give to the key |color| of -% the command |\Block| its new definition. -% \begin{macrocode} color .tl_set:N = \l_@@_draw_tl , draw .tl_set:N = \l_@@_draw_tl , draw .default:n = default , @@ -14231,6 +14417,94 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip +% The first argument of |\@@_stroke_borders_block:nnn| is a list of options for +% the borders that you will stroke. The second argument is the upper-left cell +% of the block (with, as usual, the syntax $i$|-|$j$) and the third is the last +% cell of the block (with the same syntax). +% \begin{macrocode} +\cs_new_protected:Npn \@@_stroke_borders_block:nnn #1 #2 #3 + { + \dim_set_eq:NN \l_@@_line_width_dim \arrayrulewidth + \keys_set_known:nn { NiceMatrix / BlockBorders } { #1 } + \dim_compare:nNnTF \l_@@_rounded_corners_dim > \c_zero_dim + { \@@_error:n { borders~forbidden } } + { + \clist_map_inline:Nn \l_@@_borders_clist + { + \clist_if_in:nnF { top , bottom , left , right } { ##1 } + { \@@_error:nn { bad~border } { ##1 } } + } + \@@_cut_on_hyphen:w #2 \q_stop + \tl_set_eq:NN \l_tmpc_tl \l_tmpa_tl + \tl_set_eq:NN \l_tmpd_tl \l_tmpb_tl + \@@_cut_on_hyphen:w #3 \q_stop + \tl_set:Nx \l_tmpa_tl { \int_eval:n { \l_tmpa_tl + 1 } } + \tl_set:Nx \l_tmpb_tl { \int_eval:n { \l_tmpb_tl + 1 } } + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgf@relevantforpicturesizefalse + \CT@arc@ + \pgfsetlinewidth { 1.1 \l_@@_line_width_dim } + \clist_if_in:NnT \l_@@_borders_clist { right } + { \@@_stroke_vertical:n \l_tmpb_tl } + \clist_if_in:NnT \l_@@_borders_clist { left } + { \@@_stroke_vertical:n \l_tmpd_tl } + \clist_if_in:NnT \l_@@_borders_clist { bottom } + { \@@_stroke_horizontal:n \l_tmpa_tl } + \clist_if_in:NnT \l_@@_borders_clist { top } + { \@@_stroke_horizontal:n \l_tmpc_tl } + \endpgfpicture + } + } +% \end{macrocode} +% +% \medskip +% The following command is used to stroke the left border and the right border. +% The argument |#1| is the number of column (in the sense of the |col| node). +% \begin{macrocode} +\cs_new_protected:Npn \@@_stroke_vertical:n #1 + { + \@@_qpoint:n \l_tmpc_tl + \dim_set:Nn \l_tmpb_dim { \pgf@y + 0.5 \l_@@_line_width_dim } + \@@_qpoint:n \l_tmpa_tl + \dim_set:Nn \l_tmpc_dim { \pgf@y + 0.5 \l_@@_line_width_dim } + \@@_qpoint:n { #1 } + \pgfpathmoveto { \pgfpoint \pgf@x \l_tmpb_dim } + \pgfpathlineto { \pgfpoint \pgf@x \l_tmpc_dim } + \pgfusepathqstroke + } +% \end{macrocode} +% +% \medskip +% The following command is used to stroke the top border and the bottom border. +% The argument |#1| is the number of row (in the sense of the |row| node). +% \begin{macrocode} +\cs_new_protected:Npn \@@_stroke_horizontal:n #1 + { + \@@_qpoint:n \l_tmpd_tl + \clist_if_in:NnTF \l_@@_borders_clist { left } + { \dim_set:Nn \l_tmpa_dim { \pgf@x - 0.5 \l_@@_line_width_dim } } + { \dim_set:Nn \l_tmpa_dim { \pgf@x + 0.5 \l_@@_line_width_dim } } + \@@_qpoint:n \l_tmpb_tl + \dim_set:Nn \l_tmpb_dim { \pgf@x + 0.5 \l_@@_line_width_dim } + \@@_qpoint:n { #1 } + \pgfpathmoveto { \pgfpoint \l_tmpa_dim \pgf@y } + \pgfpathlineto { \pgfpoint \l_tmpb_dim \pgf@y } + \pgfusepathqstroke + } +% \end{macrocode} +% +% \bigskip +% Here is the set of keys for the command |\@@_stroke_borders_block:nnn|. +% \begin{macrocode} +\keys_define:nn { NiceMatrix / BlockBorders } + { + borders .clist_set:N = \l_@@_borders_clist , + rounded-corners .dim_set:N = \l_@@_rounded_corners_dim , + rounded-corners .default:n = 4 pt , + line-width .dim_set:N = \l_@@_line_width_dim + } +% \end{macrocode} % % \subsection*{How to draw the dotted lines transparently} % \begin{macrocode} @@ -14456,7 +14730,10 @@ version 2005/12/01 or later. % square brackets. Here is the corresponding set of keys. % \begin{macrocode} \keys_define:nn { NiceMatrix } - { CodeAfter / rules .inherit:n = NiceMatrix / rules } + { + CodeAfter / rules .inherit:n = NiceMatrix / rules , + CodeAfter / sub-matrix .inherit:n = NiceMatrix / sub-matrix + } \keys_define:nn { NiceMatrix / CodeAfter } { sub-matrix .code:n = \keys_set:nn { NiceMatrix / sub-matrix } { #1 } , @@ -14639,11 +14916,21 @@ version 2005/12/01 or later. delimiters / color .value_required:n = true , slim .bool_set:N = \l_@@_submatrix_slim_bool , slim .default:n = true , + hlines .clist_set:N = \l_@@_submatrix_hlines_clist , + hlines .default:n = all , + vlines .clist_set:N = \l_@@_submatrix_vlines_clist , + vlines .default:n = all , + hvlines .meta:n = { hlines, vlines } , + hvlines .value_forbidden:n = true , } \keys_define:nn { NiceMatrix } { SubMatrix .inherit:n = NiceMatrix / sub-matrix , CodeAfter / sub-matrix .inherit:n = NiceMatrix / sub-matrix , + NiceMatrix / sub-matrix .inherit:n = NiceMatrix / sub-matrix , + NiceArray / sub-matrix .inherit:n = NiceMatrix / sub-matrix , + pNiceArray / sub-matrix .inherit:n = NiceMatrix / sub-matrix , + NiceMatrixOptions / sub-matrix .inherit:n = NiceMatrix / sub-matrix , } % \end{macrocode} % @@ -14653,9 +14940,9 @@ version 2005/12/01 or later. % \begin{macrocode} \keys_define:nn { NiceMatrix / SubMatrix } { - hlines .clist_set:N = \l_@@_hlines_clist , + hlines .clist_set:N = \l_@@_submatrix_hlines_clist , hlines .default:n = all , - vlines .clist_set:N = \l_@@_vlines_clist , + vlines .clist_set:N = \l_@@_submatrix_vlines_clist , vlines .default:n = all , hvlines .meta:n = { hlines, vlines } , hvlines .value_forbidden:n = true , @@ -14738,8 +15025,6 @@ version 2005/12/01 or later. { \@@_error:n { SubMatrix~too~large } } { \str_clear_new:N \l_@@_submatrix_name_str - \clist_clear:N \l_@@_hlines_clist - \clist_clear:N \l_@@_vlines_clist \keys_set:nn { NiceMatrix / SubMatrix } { #5 } \pgfpicture \pgfrememberpicturepositiononpagetrue @@ -14837,9 +15122,9 @@ version 2005/12/01 or later. % The last argument of |\int_step_inline:nn| or |\clist_map_inline:Nn| is given % by curryfication. % \begin{macrocode} - \tl_if_eq:NnTF \l_@@_vlines_clist { all } + \tl_if_eq:NnTF \l_@@_submatrix_vlines_clist { all } { \int_step_inline:nn { \l_@@_last_j_tl - \l_@@_first_j_tl } } - { \clist_map_inline:Nn \l_@@_vlines_clist } + { \clist_map_inline:Nn \l_@@_submatrix_vlines_clist } { \bool_lazy_and:nnTF { \int_compare_p:nNn { ##1 } > 0 } @@ -14862,9 +15147,9 @@ version 2005/12/01 or later. % The last argument of |\int_step_inline:nn| or |\clist_map_inline:Nn| is given % by curryfication. % \begin{macrocode} - \tl_if_eq:NnTF \l_@@_hlines_clist { all } + \tl_if_eq:NnTF \l_@@_submatrix_hlines_clist { all } { \int_step_inline:nn { \l_@@_last_i_tl - \l_@@_first_i_tl } } - { \clist_map_inline:Nn \l_@@_hlines_clist } + { \clist_map_inline:Nn \l_@@_submatrix_hlines_clist } { \bool_lazy_and:nnTF { \int_compare_p:nNn { ##1 } > 0 } @@ -14910,8 +15195,8 @@ version 2005/12/01 or later. % % \medskip % If the key |name| has been used for the command |\SubMatrix|, we create a PGF -% node with that name for the submatrix (this node does not take into account -% the delimiters that we will put after). +% node with that name for the submatrix (this node does not encompass the +% delimiters that we will put after). % \begin{macrocode} \str_if_empty:NF \l_@@_submatrix_name_str { @@ -15577,6 +15862,16 @@ version 2005/12/01 or later. If~you~go~on,~this~specification~of~corner~will~be~ignored. } % \end{macrocode} +% +% \begin{macrocode} +\@@_msg_new:nn { bad~border } + { + #1~is~an~incorrect~specification~for~a~border~(in~the~key~ + 'borders'~of~the~command~\token_to_str:N \Block).~The~available~ + values~are:~left,~right,~top~and~bottom.\\ + If~you~go~on,~this~specification~of~border~will~be~ignored. + } +% \end{macrocode} % % \begin{macrocode} \@@_msg_new:nn { last-col~non~empty~for~NiceArray } @@ -15642,6 +15937,16 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} +\@@_msg_new:nn { borders~forbidden } + { + You~can't~use~the~key~'borders'~of~the~command~\token_to_str:N \Block\ + because~the~option~'rounded-corners'~ + is~in~force~with~a~non-zero~value.\\ + If~you~go~on,~this~key~will~be~ignored. + } +% \end{macrocode} +% +% \begin{macrocode} \@@_msg_new:nn { bottomrule~without~booktabs } { You~can't~use~the~key~'tabular/bottomrule'~because~you~haven't~ @@ -15702,7 +16007,7 @@ version 2005/12/01 or later. For~a~list~of~the~available~keys,~type~H~<return>. } { - The~available~keys~are~(in~alphabetic~order):~c,~draw,~fill,~l,~ + The~available~keys~are~(in~alphabetic~order):~borders,~c,~draw,~fill,~l,~ line-width,~rounded-corners~and~r. } % \end{macrocode} @@ -16426,7 +16731,7 @@ version 2005/12/01 or later. % % New command |\SubMatrix| available in the |\CodeAfter|. % -% It's possible to provide options (between brackets) to the command |\CodeAfter|. +% It's possible to provide options (between brackets) to the keyword |\CodeAfter|. % % A (non fatal) error is raised when the key |transparent|, which is % deprecated, is used. @@ -16434,10 +16739,10 @@ version 2005/12/01 or later. % \subsection*{Changes between versions 5.10 and 5.11} % % It's now possible, in the |code-before| and in the |\CodeAfter|, to use the -% syntax \verb+(i-|j)+ for the Tikz node at the intersection of the (potential) +% syntax \verb+|(i-|j)+ for the Tikz node at the intersection of the (potential) % horizontal rule number~$i$ and the (potential) vertical rule number~$j$. % -% % \subsection*{Changes between versions 5.11 and 5.12} +% \subsection*{Changes between versions 5.11 and 5.12} % % Keywords |\CodeBefore| and |\Body| (alternative syntax to the key % |code-before|). @@ -16448,6 +16753,18 @@ version 2005/12/01 or later. % |\CodeAfter|. % % New key |rounded-corners| for the command |\Block|. +% +% \subsection*{Changes between versions 5.12 and 5.13} +% +% New command |\arraycolor| in the |\CodeBefore| (with its key +% |except-corners|). +% +% New key |borders| for the command |\Block|. +% +% New command |\Hline| (for horizontal rules not drawn in the blocks). +% +% The keys |vlines| and |hlines| takes in as value a (comma-separated) list of +% numbers (for the rules to draw). % % \PrintIndex % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf Binary files differindex 18b9e7af32..00cce2d6b7 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix.pdf diff --git a/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf b/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf Binary files differindex 080a36e29f..486b53bab7 100644 --- a/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf +++ b/macros/latex/contrib/uantwerpendocs/beamerthemeuantwerpenuserguide.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf Binary files differindex d96f0c6cb9..ef18520d43 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpenbamathesis-example.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf Binary files differindex 894345c7db..0faf5cd26a 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpencoursetext-example.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx index 4911505a0e..264e1a7307 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx +++ b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.dtx @@ -32,11 +32,11 @@ %<le>\ProvidesClass{uantwerpenletter} %<ex>\ProvidesClass{uantwerpenexam} %<bmr>\ProvidesPackage{beamerthemeuantwerpen} -%<ct|bmt|mt|pt|le|ex|brm> [2021/03/21 v3.1 .dtx skeleton file] +%<ct|bmt|mt|pt|le|ex|brm> [2021/03/23 v3.2 .dtx skeleton file] % %<mt>\errmessage{This class is obsolete, use the uantwerpenbamathesis class instead !} -\def\fileversion{3.1} -\def\filedate{2021/03/21} +\def\fileversion{3.2} +\def\filedate{2021/03/23} %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage{makeidx} @@ -104,6 +104,8 @@ % UAntwerpen and added a beamer template} % \changes{v3.1}{2021/03/21}{\@ Renamed generic images to be unique % for TexLive distribution} +% \changes{v3.2}{2021/03/21}{\@ Small bugfixes (e.g., frame numbering +% instead of page numbering)} % % % \DoNotIndex{\newcommand,\newenvironment,\begin,\bfseries,\draw,\clip,\else,\fi,\if,\fill,\filldraw,\ifthenelse,\ifx,\textwidth,\node,\\} @@ -4606,7 +4608,10 @@ L: \@qrlectureri \heading{Remarks} \begin{itemize} - \item You don't need to specify the normal canvas, it is the default. + \item You don't need to specify the normal canvas, it is the + default. + \item In handout mode the negative and negativefill canvas will be + typeset as normal canvas (to allow for easy printing). \item The graphic option has many variants that we will discuss later. \end{itemize} \end{frame} @@ -5256,7 +5261,7 @@ L: \@qrlectureri \def\appropriatelogo{\logopos} \def\appropriateslidenumber{% \usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% } \ProcessOptions @@ -5404,6 +5409,9 @@ L: \@qrlectureri \setbeamercolor{inverse heading}{fg=white} \setbeamercolor{inverse subheading}{fg=white!75!maincolor} +\setbeamercolor{block body}{bg=black!4} +\setbeamercolor{block title}{bg=black!8} + \setbeamercolor{itemize item}{parent=normal text} \setbeamercolor{enumerate item}{parent=normal text} \setbeamercolor{itemize subitem}{parent=normal text} @@ -5473,12 +5481,10 @@ L: \@qrlectureri % following line: % \let\ifluatex\relax \iftutex - \usefonttheme{professionalfonts} \usepackage{cmbright} \usefonttheme{serif} \usepackage{fontspec} \setmainfont{Calibri} - \usepackage{sfmath} \usepackage{sansmathaccent} \fi \fi @@ -5729,13 +5735,26 @@ L: \@qrlectureri \gdef\maybeinverse{} } +\mode<handout|trans> + +\define@key{beamerframe}{negativefill}[true]{ +} + +\define@key{beamerframe}{negative}[true]{ +} + +\mode +<all> + +\mode<beamer|second> + \define@key{beamerframe}{negativefill}[true]{ \gdef\maybeinverse{inverse }% \usebeamercolor[fg]{\maybeinverse normal text}% \setbeamertemplate{title page}[negativefill] \setbeamertemplate{section page}[negative]% \setbeamertemplate{subsection page}[negative]% - \setbeamertemplate{background canvas}[negativefill] + \setbeamertemplate{background canvas}[negativefill]% } \define@key{beamerframe}{negative}[true]{ @@ -5744,9 +5763,12 @@ L: \@qrlectureri \setbeamertemplate{title page}[negative] \setbeamertemplate{section page}[negative]% \setbeamertemplate{subsection page}[negative]% - \setbeamertemplate{background canvas}[negative] + \setbeamertemplate{background canvas}[negative]% } +\mode +<all> + \define@key{beamerframe}{graphicfill}[{\includegraphics[scale=0.1,min width=\paperwidth,min height=\paperheight]{Images/uantwerpen-01.jpg}}]{ \gdef\maybeinverse{inverse }% @@ -5895,7 +5917,7 @@ L: \@qrlectureri {% \gdef\appropriatelogo{\logomonowhite}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \color{maincolor}\vrule width\paperwidth height\paperheight } @@ -5937,7 +5959,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \pgfmathsetmacro\dx{0.5*\pw-1.2}% \pgfmathsetmacro\dy{\ph-1.6}% \begin{tikzpicture} @@ -5955,7 +5977,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \pgfmathsetmacro\dx{0.25*\pw-1.2}% \pgfmathsetmacro\dy{\ph-1.6}% \begin{tikzpicture} @@ -5974,7 +5996,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \pgfmathsetmacro\dx{0.5*\pw-1.2}% \pgfmathsetmacro\dy{\ph-1.6}% \begin{tikzpicture} @@ -5992,7 +6014,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \pgfmathsetmacro\dx{0.25*\pw-1.2}% \pgfmathsetmacro\dy{\ph-1.6}% \begin{tikzpicture} @@ -6010,7 +6032,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \pgfmathsetmacro\dx{\pw-1.6}% \pgfmathsetmacro\dy{0.5*\ph-0.8}% \begin{tikzpicture} @@ -6028,7 +6050,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in head/foot}% - \insertpagenumber/\inserttotalframenumber}% + \insertframenumber/\inserttotalframenumber}% \pgfmathsetmacro\dx{\pw-1.6}% \pgfmathsetmacro\dy{0.5*\ph-0.8}% \begin{tikzpicture} @@ -6047,7 +6069,7 @@ L: \@qrlectureri \gdef\maybeinverse{}% \gdef\appropriatelogo{\logopos}% \gdef\appropriateslidenumber{\usebeamercolor{pageno in - head/foot}\insertpagenumber/\inserttotalframenumber}% + head/foot}\insertframenumber/\inserttotalframenumber}% } @@ -6063,7 +6085,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.5*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{title in title page} - \huge\bfseries\inserttitle\\[1ex] + \LARGE\bfseries\inserttitle\\[1ex] \usebeamercolor[fg]{subtitle in title page} \color{fg}\large\bfseries\insertsubtitle \end{beamercolorbox} @@ -6073,7 +6095,7 @@ L: \@qrlectureri color=basecolor, align=center] at (0.5*\textwidth,0.25*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{author in title page} - \Large\bfseries\insertauthor + \large\bfseries\insertauthor \end{beamercolorbox} }; \node[ @@ -6081,7 +6103,7 @@ L: \@qrlectureri color=basecolor, align=center] at (0.5*\textwidth,0.15*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{date in title page} - \large\bfseries\insertdate + \normalsize\bfseries\insertdate \end{beamercolorbox} }; \end{tikzpicture} @@ -6095,7 +6117,7 @@ L: \@qrlectureri text width=0.98\textwidth, align=center] at (0.5*\textwidth,0.5*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse title in title page} - \huge\bfseries\inserttitle\\[1ex] + \LARGE\bfseries\inserttitle\\[1ex] \usebeamercolor[fg]{\maybeinverse subtitle in title page} \color{fg}\large\bfseries\insertsubtitle \end{beamercolorbox} @@ -6104,7 +6126,7 @@ L: \@qrlectureri text width=0.98\textwidth, align=center,] at (0.5*\textwidth,0.25*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse author in title page} - \Large\bfseries\insertauthor + \large\bfseries\insertauthor \end{beamercolorbox} }; \node[ @@ -6112,7 +6134,7 @@ L: \@qrlectureri color=basecolor, align=center] at (0.5*\textwidth,0.15*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse date in title page} - \large\bfseries\insertdate + \normalsize\bfseries\insertdate \end{beamercolorbox} }; \end{tikzpicture} @@ -6131,7 +6153,7 @@ L: \@qrlectureri color=maincolor, align=center] at (0.5*\textwidth,0.5*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse title in title page} - \huge\bfseries\inserttitle\\[1ex] + \LARGE\bfseries\inserttitle\\[1ex] \usebeamercolor[fg]{inverse subtitle in title page} \color{fg}\large\bfseries\insertsubtitle \end{beamercolorbox} @@ -6141,7 +6163,7 @@ L: \@qrlectureri color=maincolor, align=center] at (0.5*\textwidth,0.25*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse author in title page} - \Large\bfseries\insertauthor + \large\bfseries\insertauthor \end{beamercolorbox} }; \node[ @@ -6149,7 +6171,7 @@ L: \@qrlectureri color=basecolor, align=center] at (0.5*\textwidth,0.15*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse date in title page} - \large\bfseries\insertdate + \normalsize\bfseries\insertdate \end{beamercolorbox} }; \end{tikzpicture} @@ -6164,7 +6186,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.55*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{section title} - \LARGE\bfseries\insertsectionnumber.~\insertsection + \Large\bfseries\insertsectionnumber.~\insertsection \end{beamercolorbox} }; \end{tikzpicture} @@ -6179,7 +6201,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.55*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{section title} - \LARGE\bfseries\insertsectionnumber.~\insertsection + \Large\bfseries\insertsectionnumber.~\insertsection \end{beamercolorbox} }; \node[ @@ -6187,7 +6209,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.45*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{subsection title} - \Large\bfseries\insertsubsection + \large\bfseries\insertsubsection \end{beamercolorbox} }; \end{tikzpicture} @@ -6202,7 +6224,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.55*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse section title} - \LARGE\bfseries\insertsectionnumber.~\insertsection + \Large\bfseries\insertsectionnumber.~\insertsection \end{beamercolorbox} }; \end{tikzpicture} @@ -6217,7 +6239,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.55*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse section title} - \LARGE\bfseries\insertsectionnumber.~\insertsection + \Large\bfseries\insertsectionnumber.~\insertsection \end{beamercolorbox} }; \node[ @@ -6225,7 +6247,7 @@ L: \@qrlectureri text=basecolor, align=center] at (0.5*\textwidth,0.45*\ph) { \begin{beamercolorbox}[wd=\textwidth,center]{inverse subsection title} - \Large\bfseries\insertsubsection + \large\bfseries\insertsubsection \end{beamercolorbox} }; \end{tikzpicture} diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf Binary files differindex f94af0de36..dee1f993f9 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpendocs.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf Binary files differindex b5715c0532..b33cfe3477 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example1.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf Binary files differindex ebddd3bd5d..7e606d13f7 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpenexam-example2.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf Binary files differindex 52f9961b08..1caa00fe49 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpenletter-example.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf Binary files differindex 35b92551a4..5d49fcba41 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example1.pdf diff --git a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf Binary files differindex e0da263b97..2469c14255 100644 --- a/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf +++ b/macros/latex/contrib/uantwerpendocs/uantwerpenphdthesis-example2.pdf diff --git a/macros/latex/contrib/yathesis/CHANGELOG.md b/macros/latex/contrib/yathesis/CHANGELOG.md index 0beea06af7..0c3e311d28 100644 --- a/macros/latex/contrib/yathesis/CHANGELOG.md +++ b/macros/latex/contrib/yathesis/CHANGELOG.md @@ -1,5 +1,21 @@ # [Unreleased] +# [1.0.6] - 2021-03-23 + +## Added +- Command allowing, for each chapter, to specify a text inserted between its + head and its possible automatic local table of contents (issue gh #82, + https://git.io/JYeVe). + +## Changed +- Table listing the members of the committee: + - with \textwidth as width, + - with 3 and not 4 columns in case president is not specified. +- Documentation revised. + +## Fixed +- Bug gh #81 (https://git.io/JYeVY). + # [1.0.5] - 2021-02-05 ## Changed diff --git a/macros/latex/contrib/yathesis/README.md b/macros/latex/contrib/yathesis/README.md index deb9aa55b4..0c5847d223 100644 --- a/macros/latex/contrib/yathesis/README.md +++ b/macros/latex/contrib/yathesis/README.md @@ -1,6 +1,6 @@ ----------------------------------------------------------------------- -- `yathesis` --- Yet Another Thesis Class, version 1.0.5 +- `yathesis` --- Yet Another Thesis Class, version 1.0.6 - E-mail: `denis.bitouze@univ-littoral.fr` - Released under the LaTeX Project Public License v1.3c or later. See http://www.latex-project.org/lppl.txt diff --git a/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf b/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf Binary files differindex 968136c3b2..660246072f 100644 --- a/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf +++ b/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf diff --git a/macros/latex/contrib/yathesis/exemples/specimen/bibliographie.bib b/macros/latex/contrib/yathesis/exemples/specimen/bibliographie.bib index 9f7bcc7dab..7d709625ff 100644 --- a/macros/latex/contrib/yathesis/exemples/specimen/bibliographie.bib +++ b/macros/latex/contrib/yathesis/exemples/specimen/bibliographie.bib @@ -22,7 +22,7 @@ editor = {O'Connor, Arhur and Arago, François}, title = {Discours prononcé à l'Assemblée Nationale au nom de l'Académie des Sciences à la séance du - \DTMdate{1790-06-12}}, + 12 juin 1790}, booktitle = {Œuvres de Condorcet}, publisher = {Firmin Didot Frères}, address = {Paris}, diff --git a/macros/latex/contrib/yathesis/exemples/specimen/these.pdf b/macros/latex/contrib/yathesis/exemples/specimen/these.pdf Binary files differindex f536b3154b..542b26972c 100644 --- a/macros/latex/contrib/yathesis/exemples/specimen/these.pdf +++ b/macros/latex/contrib/yathesis/exemples/specimen/these.pdf diff --git a/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx b/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx index 8c8ec7cc9f..26e5c67978 100644 --- a/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx +++ b/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx @@ -1328,7 +1328,7 @@ int factorielle(int n) editor = {O'Connor, Arhur and Arago, François}, title = {Discours prononcé à l'Assemblée Nationale au nom de l'Académie des Sciences à la séance du - \DTMdate{1790-06-12}}, + 12 juin 1790}, booktitle = {Œuvres de Condorcet}, publisher = {Firmin Didot Frères}, address = {Paris}, diff --git a/macros/latex/contrib/yathesis/source/yathesis.dtx b/macros/latex/contrib/yathesis/source/yathesis.dtx index 025220931d..bb7e782366 100644 --- a/macros/latex/contrib/yathesis/source/yathesis.dtx +++ b/macros/latex/contrib/yathesis/source/yathesis.dtx @@ -23,7 +23,7 @@ %<*readme> ----------------------------------------------------------------------- -- `yathesis` --- Yet Another Thesis Class, version 1.0.5 +- `yathesis` --- Yet Another Thesis Class, version 1.0.6 - E-mail: `denis.bitouze@univ-littoral.fr` - Released under the LaTeX Project Public License v1.3c or later. See http://www.latex-project.org/lppl.txt @@ -70,8 +70,8 @@ Typesetting the documentation of the class requires: \fi %</internal> %<*class|install> -\def\yathesisversion{1.0.5} -\def\yathesisdate{2021-02-05} +\def\yathesisversion{1.0.6} +\def\yathesisdate{2021-03-23} %</class|install> %<*install> \input docstrip.tex @@ -433,6 +433,7 @@ This work consists of the file yathesis.dtx \newbool{YAD@two@titles} \newbool{YAD@cover@page} \newbool{YAD@supervisor@specified} +\newbool{YAD@committeepresident@specified} \newbool{YAD@symbols@isolated} \newbool{YAD@logo@before} \newbool{YAD@valid@day} @@ -1045,6 +1046,10 @@ This work consists of the file yathesis.dtx % \begin{macrocode} \RequirePackage{array}[2008/09/09]% % \end{macrocode} +% Pour des tableaux de largeur déterminée +% \begin{macrocode} +\RequirePackage{tabularx}[2020/01/15]% +% \end{macrocode} % Pour effectuer des manipulations sur des chaîne de caractères % \begin{macrocode} \RequirePackage{xstring}[2013/10/13]% @@ -2062,6 +2067,7 @@ This work consists of the file yathesis.dtx % \begin{macro}{\committeepresident} % \begin{macrocode} \newcommand*{\committeepresident}[3][]{% + \booltrue{YAD@committeepresident@specified} \yadsetup{#1}% \ifboolexpr{% bool {YAD@female} or % @@ -2260,8 +2266,9 @@ This work consists of the file yathesis.dtx }% }% }% + \ifbool{YAD@committeepresident@specified}{% & -% Fonction + % Fonction \YAD@reach@file{% \ifthenelse{\DTLiseq{\YAD@committeemember@role}{}}{% \ifdraft{% @@ -2275,9 +2282,11 @@ This work consists of the file yathesis.dtx }% }% }% - \DTLiflastrow{% - \\[.15cm] - }{% + }{% + }% + \DTLiflastrow{% + \\[.15cm] + }{% \\ }% }% @@ -2287,11 +2296,10 @@ This work consists of the file yathesis.dtx \small% \DTLifdbempty{YAD@staffs}{}{% \ifthenelse{\DTLrowcount{YAD@supervisors}>1}{% - \newcolumntype{u}{>{\itshape}lll}% + \begin{tabular}[t]{>{\itshape}lll} }{% - \newcolumntype{u}{>{\itshape}l@{ }ll}% + \begin{tabular}[t]{>{\itshape}l@{ }ll} }% - \begin{tabular}[t]{u} \DTLforeach*{YAD@supervisors}{% \YAD@committeemember@lastname=lastname,% \YAD@committeemember@firstname=firstname,% @@ -2358,8 +2366,16 @@ This work consists of the file yathesis.dtx % \newcommand*{\YAD@committee@tabular}{% \small% - \begin{tabular}[t]{>{\itshape}llp{5cm}l} - \multicolumn{4}{@{}l}{\bfseries\YAD@translation{committeemembers}}% + \ifbool{YAD@committeepresident@specified}{% + \begin{tabularx}{\textwidth}[t]{>{\itshape}ll>{\raggedright\arraybackslash}Xl} + }{% + \begin{tabularx}{\textwidth}[t]{>{\itshape}ll>{\raggedright\arraybackslash}X} + }% + \ifbool{YAD@committeepresident@specified}{% + \multicolumn{4}{@{}l}{\bfseries\YAD@translation{committeemembers}}% + }{% + \multicolumn{3}{@{}l}{\bfseries\YAD@translation{committeemembers}}% + }% \\[.25cm] \DTLforeach*{YAD@staffs}{% \YAD@the@staff=YAD@the@staff% @@ -2367,7 +2383,7 @@ This work consists of the file yathesis.dtx % \YAD@display@staff{\YAD@the@staff}% }% - \end{tabular}% + \end{tabularx}% }% % \end{macrocode} % @@ -3993,7 +4009,7 @@ This work consists of the file yathesis.dtx % Affichage des directeurs de thèse et du jury % \begin{macrocode} \noindent% - \begin{minipage}[c][\YAD@otherboxheight][c]{\YAD@titleboxwidth} + \begin{minipage}[c][\YAD@otherboxheight][c]{\textwidth} \YAD@supervisors@tabular% \par% \ifboolexpr{% @@ -5107,11 +5123,19 @@ This work consists of the file yathesis.dtx % \begin{macrocode} \renewcommand\addcontentsline[3]{}% \begingroup - \titlespacing*{\section}{\dimen@}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex} - \section*{% - \large% - \translate{lbl-localtocname}% - }% +% \end{macrocode} +% In order to avoid the issue +% \url|https://github.com/dbitouze/yathesis/issues/81|, we don't rely on an +% unumbered section anymore and instead simulate it. +% \begin{macrocode} + \vspace{3.5ex plus 1ex minus .2ex}% + \noindent\hspace{\dimen@}% + {% + \normalfont\large\bfseries% + \translate{lbl-localtocname}% + } + \vspace{2.3ex plus .2ex}% + \par% \endgroup % \end{macrocode} % We don't want the header contain the title of the previous (dummy) section in case @@ -5171,6 +5195,13 @@ This work consists of the file yathesis.dtx \YAD@setlinestyle {subparagraph}{\YAD@numwidthG}% } % \end{macrocode} +% Because we don't rely anymore on an unumbered section for the local ToCs, any +% ×\label× added after a ×\chapter× refers to the \package{etoc}'s counter +% ×etoc@tocid× attached to the local ToCs and, in case \package{etoc} is used, +% we have to tell ×\autoref× to refer to the underlying chapter instead. +% \begin{macrocode} +\newcommand*{\etoc@tocidautorefname}{\MakeLowercase{\chaptername}}% +% \end{macrocode} % % \begin{macrocode} \newcommand*\YAD@computenumwidths@ [2] {% #1 pour `etoc' ou `local', #2=pour le @@ -5225,6 +5256,16 @@ This work consists of the file yathesis.dtx % % \section{Machinerie pour les tables des matières locales} % +% On fournit une commande permettant de définir un \enquote{chapeau} qui sera +% inséré entre les têtes de chapitres et leurs éventuelles tables des matières +% automatiques. +% +% \begin{macrocode} +\newcommand{\leadchapter}[1]{% + \def\YAD@leadchapter{#1}% +} +% \end{macrocode} +% % Les tables des matières locales ne sont pas imprimées si elles sont vides. % \begin{macrocode} \etocchecksemptiness @@ -5270,8 +5311,13 @@ This work consists of the file yathesis.dtx \booltrue{YAD@nextwithlocaltoc}% } \apptocmd{\@makechapterhead}{% + \YAD@ifemptyorundef{\YAD@leadchapter}{% + }{% + \YAD@leadchapter% + \let\YAD@leadchapter\relax + } \ifbool{YAD@localtocs}% - {% + {% \YAD@localtoc% \renewcommand{\YAD@localtoc}{\YAD@default@localtoc}% \ifbool{YAD@nextwithlocaltoc}% @@ -6539,8 +6585,9 @@ This work consists of the file yathesis.dtx % % \begin{macrocode} # mode: yathesis.cls -# denisbitouze, 2020-04-05 +# denisbitouze, 2021-03-23 # +#include:class-book #include:adjustbox #include:array #include:babel @@ -6570,6 +6617,7 @@ This work consists of the file yathesis.dtx #include:nonumonpart #include:pgfopts #include:setspace +#include:tabularx #include:tcolorbox #include:textcase #include:titlesec @@ -6799,6 +6847,7 @@ frametitle=#shadowbox,ovalbox,none,fbox # # Preliminary part # +\colophontext{texte%text}#n* \disclaimer{clause%text}#n \makedisclaimer#n \makedisclaimer*#n @@ -6913,6 +6962,7 @@ name= \stoplocaltocs \nextwithlocaltoc \nextwithoutlocaltoc +\leadchapter{texte%text} # # Customization # |