From e5ca43f7439d850f4193a932455792429cff61eb Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 21 Jun 2021 03:01:17 +0000 Subject: CTAN sync 202106210301 --- macros/latex/contrib/docassembly/README.md | 5 +- macros/latex/contrib/docassembly/docassembly.dtx | 22 +- .../latex/contrib/docassembly/docs/docassembly.pdf | Bin 341939 -> 357824 bytes macros/latex/contrib/hvfloat/Changes | 2 + .../contrib/hvfloat/doc/examples/after1s1c.pdf | Bin 80294 -> 80294 bytes .../contrib/hvfloat/doc/examples/after2s2c.pdf | Bin 86722 -> 86720 bytes .../latex/contrib/hvfloat/doc/examples/capPos.pdf | Bin 95389 -> 95390 bytes .../contrib/hvfloat/doc/examples/default1s1c.pdf | Bin 81992 -> 81992 bytes .../contrib/hvfloat/doc/examples/default1s2c.pdf | Bin 83277 -> 83375 bytes .../contrib/hvfloat/doc/examples/default2s1c.pdf | Bin 79445 -> 79445 bytes .../contrib/hvfloat/doc/examples/default2s2c.pdf | Bin 85824 -> 85825 bytes .../hvfloat/doc/examples/doublepage2s1c.pdf | Bin 2314854 -> 2317102 bytes .../hvfloat/doc/examples/doublepage2s2c.pdf | Bin 619034 -> 619035 bytes .../contrib/hvfloat/doc/examples/even1s1c.pdf | Bin 77658 -> 77658 bytes .../contrib/hvfloat/doc/examples/even1s2c.pdf | Bin 86404 -> 86404 bytes .../contrib/hvfloat/doc/examples/even2s1c.pdf | Bin 84814 -> 84815 bytes .../contrib/hvfloat/doc/examples/even2s2c.pdf | Bin 85098 -> 85100 bytes .../contrib/hvfloat/doc/examples/fullpage1s2c.pdf | Bin 86780 -> 86778 bytes .../contrib/hvfloat/doc/examples/inner1s2c.pdf | Bin 84024 -> 84024 bytes .../contrib/hvfloat/doc/examples/inner2s1c.pdf | Bin 83981 -> 83979 bytes .../contrib/hvfloat/doc/examples/inner2s2c.pdf | Bin 84014 -> 84014 bytes .../contrib/hvfloat/doc/examples/left2s2c.pdf | Bin 85512 -> 85511 bytes .../hvfloat/doc/examples/multi-after1s1c.pdf | Bin 142630 -> 142627 bytes .../hvfloat/doc/examples/multi-default1s1c.pdf | Bin 146172 -> 146171 bytes .../hvfloat/doc/examples/multi-default1s2c.pdf | Bin 94584 -> 94585 bytes .../hvfloat/doc/examples/multi-default2s1c.pdf | Bin 146347 -> 146344 bytes .../hvfloat/doc/examples/multi-default2s2c.pdf | Bin 92183 -> 92184 bytes .../hvfloat/doc/examples/multi-inner2s2c.pdf | Bin 89788 -> 89789 bytes .../hvfloat/doc/examples/multi-outer2s2c.pdf | Bin 92989 -> 92987 bytes .../hvfloat/doc/examples/multi-right1s1c.pdf | Bin 145741 -> 145742 bytes .../latex/contrib/hvfloat/doc/examples/odd1s1c.pdf | Bin 77875 -> 77806 bytes .../latex/contrib/hvfloat/doc/examples/odd1s1c.tex | 7 +- .../latex/contrib/hvfloat/doc/examples/odd1s2c.pdf | Bin 86523 -> 86525 bytes .../latex/contrib/hvfloat/doc/examples/odd2s1c.pdf | Bin 174225 -> 174218 bytes .../latex/contrib/hvfloat/doc/examples/odd2s2c.pdf | Bin 85568 -> 85567 bytes .../contrib/hvfloat/doc/examples/outer1s2c.pdf | Bin 86320 -> 86320 bytes .../contrib/hvfloat/doc/examples/outer2s1c.pdf | Bin 84295 -> 84295 bytes .../contrib/hvfloat/doc/examples/outer2s2c.pdf | Bin 84682 -> 84682 bytes .../hvfloat/doc/examples/paper-after1s1c.pdf | Bin 79175 -> 79176 bytes .../hvfloat/doc/examples/paper-default1s1c.pdf | Bin 79887 -> 79887 bytes .../hvfloat/doc/examples/paper-default1s2c.pdf | Bin 90510 -> 90508 bytes .../hvfloat/doc/examples/paper-default2s1c.pdf | Bin 87941 -> 0 bytes .../hvfloat/doc/examples/paper-default2s1c.tex | 81 -- .../hvfloat/doc/examples/paper-default2s2c.pdf | Bin 90335 -> 90333 bytes .../hvfloat/doc/examples/paper-inner2s2c.pdf | Bin 87857 -> 87859 bytes .../hvfloat/doc/examples/paper-right1s1c.pdf | Bin 80203 -> 80205 bytes .../contrib/hvfloat/doc/examples/right1s1c.pdf | Bin 80126 -> 80126 bytes .../contrib/hvfloat/doc/examples/right1s2c.pdf | Bin 89343 -> 89342 bytes .../contrib/hvfloat/doc/examples/right2s1c.pdf | Bin 81033 -> 81033 bytes .../contrib/hvfloat/doc/examples/right2s2c.pdf | Bin 85585 -> 85585 bytes .../latex/contrib/hvfloat/doc/examples/runAll.sh | 6 +- .../latex/contrib/hvfloat/doc/examples/runEXA.sh | 4 +- .../contrib/hvfloat/doc/examples/sub-after1s1c.pdf | Bin 143886 -> 143893 bytes .../contrib/hvfloat/doc/examples/sub-after2s2c.pdf | Bin 144710 -> 144709 bytes .../hvfloat/doc/examples/sub-default1s1c.pdf | Bin 143924 -> 144111 bytes .../hvfloat/doc/examples/sub-default1s2c.pdf | Bin 144163 -> 144341 bytes .../hvfloat/doc/examples/sub-default2s2c.pdf | Bin 143452 -> 143647 bytes .../contrib/hvfloat/doc/examples/sub-right1s1c.pdf | Bin 143820 -> 143826 bytes .../contrib/hvfloat/doc/examples/sub-right1s2c.pdf | Bin 144816 -> 144812 bytes .../contrib/hvfloat/doc/examples/sub-right2s2c.pdf | Bin 144264 -> 144268 bytes .../contrib/hvfloat/doc/examples/wide1s2c.pdf | Bin 120957 -> 120954 bytes .../contrib/hvfloat/doc/examples/wide2s2c.pdf | Bin 121931 -> 121929 bytes macros/latex/contrib/hvfloat/doc/hvfloat.pdf | Bin 7114688 -> 7119431 bytes macros/latex/contrib/hvfloat/doc/hvfloat.tex | 7 +- .../latex/contrib/hvfloat/doc/images/missing.txt | 4 - macros/latex/contrib/hvfloat/latex/hvfloat-fps.sty | 10 +- macros/latex/contrib/hvfloat/latex/hvfloat.sty | 170 ++-- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 462567 -> 461406 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 421 +++++---- macros/latex/contrib/nicematrix/nicematrix.dtx | 952 ++++++++++----------- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1305091 -> 1300431 bytes 71 files changed, 805 insertions(+), 886 deletions(-) delete mode 100644 macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.pdf delete mode 100644 macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.tex delete mode 100644 macros/latex/contrib/hvfloat/doc/images/missing.txt (limited to 'macros/latex') diff --git a/macros/latex/contrib/docassembly/README.md b/macros/latex/contrib/docassembly/README.md index 6765966759..e5897f2e8c 100644 --- a/macros/latex/contrib/docassembly/README.md +++ b/macros/latex/contrib/docassembly/README.md @@ -9,7 +9,7 @@ %% macros/latex/base/lppl.txt; either version 1.2 of %% %% the License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Dated: 2021-06-18 +Dated: 2021-06-19 Targeted audience: LaTeX authors who love their pdflatex, lualtex, xelatex, or dvips -> ps2pdf workflow, who also own Acrobat Pro application. @@ -25,6 +25,9 @@ package, which generally restricted to a dvips -> distiller workflow. Now, these methods are available to all those who own Acrobat, no matter what PDF creator used. +What's New (2021-06-19) Moved some documentation from this package to + the acrotex-js package. New require acrotex-js dated 2021/06/19 or later. + Now, I simply must get back to my retirement. D. P. Story diff --git a/macros/latex/contrib/docassembly/docassembly.dtx b/macros/latex/contrib/docassembly/docassembly.dtx index 429ee327e4..0f92b42948 100644 --- a/macros/latex/contrib/docassembly/docassembly.dtx +++ b/macros/latex/contrib/docassembly/docassembly.dtx @@ -14,7 +14,7 @@ % %\NeedsTeXFormat{LaTeX2e}[1997/12/01] %\ProvidesPackage{docassembly} -% [2021/06/18 v1.1 docassembly: Post PDF creation assembly (dps)] +% [2021/06/19 v1.2 docassembly: Post PDF creation assembly (dps)] %<*driver> \documentclass{ltxdoc} \usepackage{amstext} @@ -88,14 +88,15 @@ % or even the much hated \app{dvips \texttt{->} Adobe Distiller}). % \end{minipage}} % \end{center} -% This package requires \pkg{insdljs},\footnote{Part of the \pkg{acrotex} bundle} which loads \pkg{hyperref}. It also requires +% This package requires \pkg{insdljs}\marginpar{\raggedleft\itshape\pkg{insdljs} pkg},\footnote{Part of the \pkg{acrotex} bundle} which loads \pkg{hyperref}. It also requires % the successful installation of the file \texttt{aeb\_pro.js}, which is distributed -% by the \pkg{acrotex-js} package. Version 1.6.1 of -% \texttt{aeb\_pro.js} is required.\footnote{If you already have \pkg{aeb\_pro} installed on your +% by the \pkg{acrotex-js} package\marginpar{\raggedleft\itshape\pkg{acrotex-js} pkg}, dated 2021/06/19 or later. Version 1.6.1 of +% \texttt{aeb\_pro.js} is required\marginpar{\raggedleft\itshape Version 1.6.1 required}.\footnote{If you already have \pkg{aeb\_pro} installed on your % system, be sure you have Version 1.6.1 of \texttt{aeb\_pro.js}, if not, use the version % of \texttt{aeb\_pro.js} that comes with \pkg{acrotex-js}.} Installation of \texttt{aeb\_pro.js} % is explained in \texttt{install\_jsfiles.pdf}, found in the \texttt{docs} folder of the \pkg{acrotex-js} package. % +% \changes{v1.2}{2021/06/19}{Revise documentation to reflect changes in changes in the \string\pkg{acrotex-js} package} % \changes{v1.1}{2021/06/18}{The \string\texttt{aeb\_pro.js} file is now distributed by the % \string\pkg{acrotex-js} package} % \changes{v1.0}{2021/06/11}{First publication version of this package} @@ -113,7 +114,11 @@ % % \paragraph*{Installation of \texttt{aeb\_pro.js}.} This file is essential to the % correct functioning of this package. It is important, therefore, to correctly -% install it. Follow the instructions of \texttt{docs/install\_jsfiles.pdf}. +% install it. If \texttt{aeb\_pro.js} is not already installed, download (if not already on your system) +% and install the \pkg{acrotex-js} package (dated 2021/06/19 or later);\footnote{\url{https://www.ctan.org/pkg/acrotex-js}} \texttt{aeb\_pro.js} is located +% in the \texttt{js-files} folder. Refer to the documentation of the \pkg{acrotex-js} package, +% \texttt{docs/install\_jsfiles.pdf}, for information on how to install \texttt{aeb\_pro.js}. +% The current version of \texttt{aeb\_pro.js} is Version 1.6.1. % % \paragraph*{Demo files.} Demo files are contained in the \texttt{examples} folder. % They illustrate all the security restricted methods of this package. @@ -140,6 +145,7 @@ % Require \pkg{insdljs} for this little exercise. % \begin{macrocode} \RequirePackage{insdljs} +\execJSOn % \end{macrocode} % The critical JavaScript files are no longer distributed with this package, % but are distributed by the \pkg{acrotex-js} package. This package must be @@ -157,10 +163,9 @@ Before continuing, install this package,\MessageBreak read the documentation, and place\MessageBreak aeb_pro.js in the expected folder} - \def\reqpkg{\usepackage{acrotex-js}} + \def\reqpkg{\usepackage{acrotex-js}[2021/06/19]} } \reqpkg -\execJSOn % \end{macrocode} % % \section{Document Assembly Methods}\label{s:DAM} @@ -187,7 +192,8 @@ % executed in a verbatim environment where `\verb!\!' is still the escape % character. Each of the JavaScript helper commands expects a left % parenthesis `\texttt{(}' following the command name \emph{on the -% same line} as the command name.\footnote{This requirement is consistent with JavaScript function usage.} +% same line} as the command name.\footnote{This requirement is consistent +% with JavaScript function usage.} % See the example below for correct usage. %\begin{verbatim} %\begin{docassembly} diff --git a/macros/latex/contrib/docassembly/docs/docassembly.pdf b/macros/latex/contrib/docassembly/docs/docassembly.pdf index f4aba50587..c782c598d6 100644 Binary files a/macros/latex/contrib/docassembly/docs/docassembly.pdf and b/macros/latex/contrib/docassembly/docs/docassembly.pdf differ diff --git a/macros/latex/contrib/hvfloat/Changes b/macros/latex/contrib/hvfloat/Changes index fd9d99736d..d3e0318635 100644 --- a/macros/latex/contrib/hvfloat/Changes +++ b/macros/latex/contrib/hvfloat/Changes @@ -1,4 +1,5 @@ hvfloat.sty: +2.30 2021-06-20 - fix for introduced bug for multifloats 2.29 2021-06-15 - some more fixes for doublepage objects - added option sameHeight for same text height on left and right page with a doublepage object @@ -53,5 +54,6 @@ hvfloat.tex: the source of the documentation hvfloat-fps.sty +0.03 2020-06-20 - dont't give a message when package is loaded 0.02 2017-09-20 - small changes 0.01 2017-09-16 - first CTAN version diff --git a/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf index 8aa7da3cf1..d74d1e268e 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf index b90848de1d..9567c26d36 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf b/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf index d7816f6ad2..072c584f82 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf and b/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf index 32a7d1db77..ff8eec9e74 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf index 47eb520a09..752c54810d 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf index 29cde239da..6ac3baf5ad 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf index 539adf324a..388cf97645 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf index 41032411ce..dd444dd08a 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf index 5f2de396a7..7aa01b02f8 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf index e0051dc4cb..cc6273ead8 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf index 288a92fff9..eb062f70e2 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf index 11e4c5882e..4f86812e09 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf index 8c8d5e7cec..263b9afc8a 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf index 1d6f74c767..9cdd2ea882 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf index 8b3eac8c60..05ac77f5dd 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf index 682c3d3940..200ac470d6 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf index 93d370456c..94d1d37488 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf index 00919f05cc..406285913d 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf index 3ed7100f4f..6db4613d89 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf index 0c39135590..16b1cbfb19 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf index 95c0d74717..a4c58d96b9 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf index 2b1867b088..b955807071 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf index d9e38b05b8..75107f1a34 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf index 256ed12d1f..4370c39d84 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf index 179b315444..164dc77f64 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf index 9013d94523..1c3c610031 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf index 8480522fb2..fe0ca31256 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.tex b/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.tex index ae4ea4dd4a..dfce04c36b 100644 --- a/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.tex +++ b/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.tex @@ -41,7 +41,12 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca {fig:fullpage0} \Blindtext -\Blindtext + +\hvblindtext + +\hvblindtext + +\hvblindtext \begin{lstlisting} \hvFloat[fullpage,capPos=oddPage]% diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf index e35c4fc529..c24ac2fa55 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf index 0bc26ee3e3..a357bdc1e1 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf index 1bd90be749..d7a49ea30d 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf index 0ee59f70b1..ca7e1e56ec 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf index a2ed22f860..323011e26f 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf index 3fa8364ebe..11003f09da 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf index 7d2d7801d4..495d644d55 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf index 5f4946f300..443aae8d5f 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf index 3e1e0287d5..bba76eb320 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.pdf deleted file mode 100644 index 640629b541..0000000000 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.pdf and /dev/null differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.tex b/macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.tex deleted file mode 100644 index 4db0220481..0000000000 --- a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s1c.tex +++ /dev/null @@ -1,81 +0,0 @@ -\documentclass{scrartcl} -%% $Id: paper-default2s2c.tex 72 2021-05-02 11:40:10Z herbert $ - -\input{preamble.ltx} -\setlength\columnseprule{0.4pt} - -\begin{document} -\title{Example for FULLPAGE floats} -\author{Herbert Voß} -\maketitle - -\tableofcontents - -\blinddocument - -\section{File \texttt{\jobname}} - -\begin{lstlisting} -The FULLPAGE image~\vref{fig:FULLPAGE0} has a caption~\vpageref{fig:FULLPAGE0-cap}. -\end{lstlisting} - -The FULLPAGE image~\vref{fig:FULLPAGE0} has a caption~\vpageref{fig:FULLPAGE0-cap}. - -\begin{lstlisting} -\hvFloat*[FULLPAGE]% - {figure}% - {\includegraphics[FULLPAGE]{frose}}% - [A FULLPAGE float with the default caption setting]% - {A default caption of a ``FULLPAGE'' object with the default setting, which - is a ``left'' caption which means that it always appears before the object. - This can be an even or odd page. And some more text whch has no - real meaning because it fills only the space for a long caption.}% - {fig:FULLPAGE0} -\end{lstlisting} - - -\Float[default] -\hvFloat*[FULLPAGE]% - {figure}% - {\includegraphics[FULLPAGE]{frose}}% - [A FULLPAGE float with the default caption setting]% - {A default caption of a ``FULLPAGE'' object with the default setting, which - is a ``left'' caption which means that it always appears before the object. - This can be an even or odd page. And some more text whch has no - real meaning because it fills only the space for a long caption.}% - {fig:FULLPAGE0} - -\blinddocument - -\begin{lstlisting} -\hvFloat*[FULLPAGE]% - {figure}% - {\includegraphics[FULLPAGE]{frose}}% - [A FULLPAGE float with the default caption setting]% - {A default caption of a ``FULLPAGE'' object with the default setting, which - is a ``left'' caption which means that it always appears before the object. - This can be an even or odd page. And some more text whch has no - real meaning because it fills only the space for a long caption.}% - {fig:FULLPAGE1} -\end{lstlisting} - - -\Float[default] -\hvFloat*[FULLPAGE]% - {figure}% - {\includegraphics[FULLPAGE]{frose}}% - [A FULLPAGE float with the default caption setting]% - {A default caption of a ``FULLPAGE'' object with the default setting, which - is a ``left'' caption which means that it always appears before the object. - This can be an even or odd page. And some more text whch has no - real meaning because it fills only the space for a long caption.}% - {fig:FULLPAGE1} - -\blinddocument - -\Blindtext - -\blindtext - - -\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf index a69f803c69..e86b9e6674 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf index 0fbf2c5155..56253d38e2 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf index 7e394e5d57..daca3967b6 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf index 91e2ad65cc..8c43e8c1f0 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf index 4dab820f09..954f63954d 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf index 439a827f28..037f72ae10 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf index 195114fb0a..2fecbfbe05 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/runAll.sh b/macros/latex/contrib/hvfloat/doc/examples/runAll.sh index 3b6bc2008f..0cecd6a0c2 100755 --- a/macros/latex/contrib/hvfloat/doc/examples/runAll.sh +++ b/macros/latex/contrib/hvfloat/doc/examples/runAll.sh @@ -3,18 +3,18 @@ for datei in *.tex do RUNS=1 echo "LuaLaTeX-Lauf Nr. $RUNS von $datei =======================================" - lualatex $datei + lualatex --interaction=nonstopmode $datei >/dev/null MAIN=$(basename -a -s .tex $datei) TEST=`grep -c "Label(s) may have changed." $MAIN.log` while [ $TEST -gt 0 ]; do let RUNS=RUNS+1 echo "LuaLaTeX-Lauf Nr. $RUNS von $datei =======================================" - lualatex $datei + lualatex --interaction=nonstopmode $datei >/dev/null TEST=`grep -c "Label(s) may have changed." $MAIN.log ` if [ $RUNS -gt 4 ] then TEST=0 fi done - rm $MAIN.aux $MAIN.log $MAIN.out $MAIN.toc + rm -fr $MAIN.aux $MAIN.log $MAIN.out $MAIN.toc done diff --git a/macros/latex/contrib/hvfloat/doc/examples/runEXA.sh b/macros/latex/contrib/hvfloat/doc/examples/runEXA.sh index ea7f8b1f78..de0ad052ec 100755 --- a/macros/latex/contrib/hvfloat/doc/examples/runEXA.sh +++ b/macros/latex/contrib/hvfloat/doc/examples/runEXA.sh @@ -3,14 +3,14 @@ for datei in $1????.tex do RUNS=1 echo "LuaLaTeX-Lauf Nr. $RUNS von $datei =======================================" - lualatex $datei + lualatex --interaction=nonstopmode $datei MAIN=$(basename -a -s .tex $datei) TEST=`grep -c "Label(s) may have changed." $MAIN.log` while [ $TEST -gt 0 ]; do let RUNS=RUNS+1 echo "LuaLaTeX-Lauf Nr. $RUNS von $datei =======================================" - lualatex $datei + lualatex --interaction=nonstopmode $datei TEST=`grep -c "Label(s) may have changed." $MAIN.log ` if [ $RUNS -gt 4 ] then TEST=0 diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf index 807cb410c7..d2391f0870 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf index a8f2fcef06..a23af6e14d 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf index caa9d820ab..83d13d7824 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf index c5e4dbfdf7..b5e7ae13b8 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf index 374b2a0338..026910949f 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf index 45a7f59c13..68d689fca0 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf index f7e3d07b42..d67a0f806a 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf index 9ae77741d0..6456d85628 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf index 4753c61bde..6ee1ea42d1 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf index e51326fc94..a12ef0d594 100644 Binary files a/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf and b/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.pdf b/macros/latex/contrib/hvfloat/doc/hvfloat.pdf index 1bf89fbc6f..6ddf3c1f56 100644 Binary files a/macros/latex/contrib/hvfloat/doc/hvfloat.pdf and b/macros/latex/contrib/hvfloat/doc/hvfloat.pdf differ diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.tex b/macros/latex/contrib/hvfloat/doc/hvfloat.tex index 59805c7554..90bea8a9eb 100644 --- a/macros/latex/contrib/hvfloat/doc/hvfloat.tex +++ b/macros/latex/contrib/hvfloat/doc/hvfloat.tex @@ -1,4 +1,4 @@ -%% $Id: hvfloat.tex 112 2021-06-14 08:01:42Z herbert $ +%% $Id: hvfloat.tex 114 2021-06-15 13:20:03Z herbert $ \listfiles \errorcontextlines=100 \documentclass[twoside,paper=a4,]{scrartcl} @@ -166,8 +166,9 @@ \begin{document} -\title{Package \texttt{hvfloat}\\Rotating and scaling of objects and captions\\ver \hvFloatFileVersion} -\author{Herbert Voß\thanks{\protect\url{hvoss@tug.org}\newline Thanks to Frank Mittelbach, Rolf Niepraschk}} +\title{Package \texttt{hvfloat}\\ +Controlling captions, fullpage and doublepage floats\\ver \hvFloatFileVersion} +\author{Herbert Voß\thanks{\protect\url{hvoss@tug.org}\newline Thanks to Karl Berry, Frank Mittelbach, Rolf Niepraschk}} \date{\today} \maketitle diff --git a/macros/latex/contrib/hvfloat/doc/images/missing.txt b/macros/latex/contrib/hvfloat/doc/images/missing.txt deleted file mode 100644 index c10e55ce9c..0000000000 --- a/macros/latex/contrib/hvfloat/doc/images/missing.txt +++ /dev/null @@ -1,4 +0,0 @@ -Not all images of the documentation are listed here, because -some are not for public use. You can use any other image if you -want to run the documentation by yourselve. - diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat-fps.sty b/macros/latex/contrib/hvfloat/latex/hvfloat-fps.sty index 99b7cbfbab..0090e80f5f 100644 --- a/macros/latex/contrib/hvfloat/latex/hvfloat-fps.sty +++ b/macros/latex/contrib/hvfloat/latex/hvfloat-fps.sty @@ -1,7 +1,6 @@ -%% $Id: hvfloat-fps.sty 35 2020-10-31 07:41:00Z herbert $ +%% $Id: hvfloat-fps.sty 120 2021-06-20 13:31:02Z herbert $ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{hvfloat-fps}[2017/09/16 setting float objects] %% %% IMPORTANT NOTICE: %% @@ -16,9 +15,10 @@ %% DESCRIPTION: %% `hvfloat-fps' offers global placement of floats %% -\def\fileversion{0.02} -\def\filedate{2017/09/20} -\message{`hvfloat-fps' v\fileversion, \filedate\space (Herbert Voss)} +\def\fileversion{0.03} +\def\filedate{2020/06/20} +\ProvidesPackage{hvfloat-fps}[\filedate\space v\fileversion\space global float position setting (hv)] +%\message{`hvfloat-fps' v\fileversion, \filedate\space (Herbert Voss)} % \RequirePackage{xkeyval} % diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat.sty b/macros/latex/contrib/hvfloat/latex/hvfloat.sty index 681e5032d7..2159575d1c 100644 --- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty +++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty @@ -1,4 +1,4 @@ -%% $Id: hvfloat.sty 114 2021-06-15 13:20:03Z herbert $ +%% $Id: hvfloat.sty 119 2021-06-20 13:28:09Z herbert $ %% %% %% IMPORTANT NOTICE: @@ -15,10 +15,10 @@ %% `hvfloat' offers rotating of captions and objects for floats %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{2.29} -\def\filedate{2021/06/15} -\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)} -\ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects] +\def\fileversion{2.30} +\def\filedate{2021/06/20} +%\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)} +\ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)] \let\hvFloatFileVersion\fileversion % \newif\ifhv@fbox \hv@fboxfalse @@ -33,12 +33,6 @@ \ProcessOptions -\providecommand\@tugclass{\@empty} -\ifx\@tugclass\@empty -\else - \hv@tugboattrue % special page handling - \typeout{>>> we are using a TUGboat class}% -\fi \PassOptionsToPackage{hypcap}{caption} \RequirePackage{caption} @@ -65,6 +59,8 @@ \RequirePackage{stfloats}% for bottom floats in a twocolumn mode \fi % + + \providecommand*\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength} \newlength\hvObjectWidth @@ -179,7 +175,6 @@ \define@boolkey{hvSet}[hv@]{sameHeight}[true]{\@nameuse{hv@sameHeight#1}}% Write the caption only as text \define@boolkey{hvSet}[hv@]{Debug}[true]{}% give more infos in the terminal -\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi} \newif\ifhv@fullpage \newif\ifhv@FULLPAGE @@ -258,6 +253,15 @@ \let\hvFloatSetDefaults\setDefaults +\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi} + +\providecommand\@tugclass{\@empty} +\ifx\@tugclass\@empty +\else + \hv@tugboattrue % special page handling + \hv@typeout{>>> we are using a TUGboat class}% +\fi + \newcommand\reset@special@float{% \hv@set{subFloat=false,%fullpage=false, multiFloat=false,%FULLPAGE=false @@ -425,10 +429,6 @@ \newif\if@hvsubstar \setDefaults -\def\hvFloat{\@ifnextchar*% Main macro - {\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}% - {\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}% -} %\newcommand*{\hvFloat}[5][]+{% % [#1}: keyvalues @@ -438,6 +438,12 @@ % #5: caption % #6: label % + +\def\hvFloat{\@ifnextchar*% Main macro + {\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}% + {\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}% +} + \def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}} \def\do@hvFloat[#1]{% \begingroup @@ -446,19 +452,13 @@ % \setlength\hvWideWidth{\dimexpr\linewidth+\marginparwidth}% \hv@maxImageWidth=\textwidth \reset@special@float - \setcounter{hv@pfigure}{\value{figure}}% - \setcounter{hv@ptable}{\value{table}}% + \global\setcounter{hv@pfigure}{\value{figure}}% + \global\setcounter{hv@ptable}{\value{table}}% \setcounter{hv@tempCNTfigA}{\value{figure}}% \setcounter{hv@tempCNTfigB}{\value{figure}}% \setcounter{hv@tempCNTtabA}{\value{table}}% \setcounter{hv@tempCNTtabB}{\value{table}}% - \renewcommand\thehv@pfigure{\thefigure}% - \renewcommand\thehv@ptable{\thetable}% - \renewcommand\thehv@tempCNTfigA{\thefigure}% - \renewcommand\thehv@tempCNTfigB{\thefigure}% - \renewcommand\thehv@tempCNTtabA{\thetable}% - \renewcommand\thehv@tempCNTtabB{\thetable}% - \gdef\hv@save@setting{#1}% + \gdef\hv@save@setting{#1}% for later use after \endgroup inside figure/table env \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi \ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi \ifx\hv@subcaption@format\@empty\else @@ -516,32 +516,28 @@ \ExplSyntaxOff - \newcount\hv@cnta \newcount\hv@cntb \def\hvFloat@ii[#1]#2#3{% #1: key/value, #2: floattype, #3: object \hv@maxImageWidth=\textwidth - \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi +% \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi \gdef\hv@floatType{#2}% \ifx\relax#2\relax \setkeys{hvSet}{nonFloat,onlyText}% + \xdef\hv@save@setting{\hv@save@setting,nonFloat,onlyText}% for later use after \endgroup inside figure/table env \fi - \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}% +% \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}% \gdef\hv@floatObject{#3}% \@ifnextchar[{\do@@hvFloat}{\do@@hvFloat[]}% } - \def\do@@hvFloat[#1]#2#3{% #1: listof caption, #2. long caption #3: label \gdef\hv@shortCap{#1}% \gdef\hv@longCap{#2}% \gdef\hv@label{#3}% \ifhv@capbeside\def\@@temp{1}\else\def\@@temp{0}\fi \ifhv@sameHeight\global\hv@global@sameHeighttrue\else\global\hv@global@sameHeightfalse\fi - \xdef\hv@global@@capVPos{\hv@@capVPos}% - \xdef\hvSet@global@capVPos{\hvSet@capVPos}% - \xdef\hvSet@global@capAngle{\hvSet@capAngle}% \global\setlength\hvSet@bindCorrection{\hvSet@bindCorr}% for doublepage objects \global\setlength\hv@floatCapSep{\hvSet@floatCapSep}% % @@ -641,7 +637,7 @@ \fi \fi \saveCaptionSkip% we put this space ourselve - \ifnum\hvSet@global@capAngle=0 % need rotation? + \ifnum\hvSet@capAngle=0 % need rotation? \savebox\hvCaptionBox{% NO rotation \minipage[b]{\hvCapWidth}%% minipage, to get hyphenation \ifhv@nonFloat @@ -675,7 +671,7 @@ }% \else \savebox\hvCaptionBox{% Rotation - \rotatebox{\hvSet@global@capAngle}{% + \rotatebox{\hvSet@capAngle}{% \minipage[b]{\hvCapWidth}%% minipage, to get hyphenation % \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi \ifhv@nonFloat @@ -779,12 +775,12 @@ %%%% \savebox{\@tempboxa}{% ***** @tempbox start \expandafter\ifcase\the\hv@@capPos% 0 is LEFT START \ifcase - \ifx\hvSet@global@capVPos\hv@Center + \ifx\hvSet@capVPos\hv@Center \put@CaptionBox \hspace{\hv@floatCapSep}% capfloatsep \put@ObjectBox \else - \ifx\hvSet@global@capVPos\hv@Top% caption and object at top aligned + \ifx\hvSet@capVPos\hv@Top% caption and object at top aligned \put@CaptionBox[1]% \hspace{\hv@floatCapSep}% capfloatsep \put@ObjectBox[1]% @@ -810,12 +806,12 @@ \fi \end{minipage}% \or%2 is right - \ifx\hvSet@global@capVPos\hv@Center + \ifx\hvSet@capVPos\hv@Center \put@ObjectBox \hspace{\hv@floatCapSep}% \put@CaptionBox \else - \ifx\hvSet@global@capVPos\hv@Top + \ifx\hvSet@capVPos\hv@Top \put@ObjectBox[1]% \hspace{\hv@floatCapSep}% capfloatsep \put@CaptionBox[1]% @@ -904,22 +900,22 @@ \let\clist@count@N\clist_count:N \ExplSyntaxOff -\def\do@@@@hvFloat{% special float page: caption <-> fullpage image - \ifx\hvSet@capPos\hv@After \hv@@capPos=1 +\def\do@@@@hvFloat{% special float page: caption <-> fullpage images + \ifx\hvSet@capPos\hv@After \global\hv@@capPos=1 \else - \ifx\hvSet@capPos\hv@Even \hv@@capPos=2 + \ifx\hvSet@capPos\hv@Even \global\hv@@capPos=2 \else - \ifx\hvSet@capPos\hv@Odd \hv@@capPos=3 + \ifx\hvSet@capPos\hv@Odd \global\hv@@capPos=3 \else - \ifx\hvSet@capPos\hv@Inner \hv@@capPos=4 + \ifx\hvSet@capPos\hv@Inner \global\hv@@capPos=4 \else - \ifx\hvSet@capPos\hv@Outer \hv@@capPos=5 + \ifx\hvSet@capPos\hv@Outer \global\hv@@capPos=5 \else - \ifx\hvSet@capPos\hv@Right \hv@@capPos=6% only for twocolumn mode + \ifx\hvSet@capPos\hv@Right \global\hv@@capPos=6% only for twocolumn mode \else - \ifx\hvSet@capPos\hv@Left \hv@@capPos=7% only for twocolumn mode + \ifx\hvSet@capPos\hv@Left \global\hv@@capPos=7% only for twocolumn mode \else - \hv@@capPos=0 + \global\hv@@capPos=0 \fi \fi \fi @@ -1058,6 +1054,11 @@ \global\setlength\hv@tempWidthA{\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection}% \xdef\hv@caption@format@temp{\hv@caption@format}% it gets lost otherwise for next afterpage \global\hv@switchTypefalse +% \endgroup% started at main macro \hvFloat + \setcounter{hv@tempCNTfigA}{\value{figure}}% + \setcounter{hv@tempCNTfigB}{\value{figure}}% + \setcounter{hv@tempCNTtabA}{\value{table}}% + \setcounter{hv@tempCNTtabB}{\value{table}}% \savebox\hvCaptionBox{% NO rotation \minipage{\textwidth}%% minipage, to get hyphenation \let\@captype\hv@floatType @@ -1137,7 +1138,11 @@ % \def\do@hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object \begin{\hv@floatType*}[!t] - \hv@typeout{Floatpositionsparameter: !t}% + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% + \hv@typeout{Floatpositionsparameter: !t}% \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}% \ifx\hv@label\@empty @@ -1157,10 +1162,11 @@ \end{\hv@floatType*}% } \def\do@hvFloat@doublePageCaptionRightObjectRight#1{% right part of the object - \begin{\hv@floatType*}[!t] - \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% - \hspace*{-\hv@tempWidthA}% - \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}% + \begin{\hv@floatType*}[!t] + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% + \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% + \hspace*{-\hv@tempWidthA}% + \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}% \global\setlength\hv@tempWidthB{\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax}% \hv@typeout{Height of right box: \the\ht\hv@rightBox}% \hv@typeout{Depth of right box : \the\dp\hv@rightBox}% @@ -1169,22 +1175,26 @@ \else \usebox\hv@rightBox \fi + \c@hv@tempCNTfigB=\numexpr\c@figure-1\relax + \c@hv@tempCNTtabB=\numexpr\c@table-1\relax \ifx\hv@label\@empty\else \ifx\hv@floatType\hv@figure - \global\refstepcounter{hv@tempCNTfigB}% + \refstepcounter{hv@tempCNTfigB}% \else - \global\refstepcounter{hv@tempCNTtabB}% before caption + \refstepcounter{hv@tempCNTtabB}% before caption \fi \label{\hv@label-2}% \fi \ifx\hv@caption@format@temp\@empty\else \expandafter\captionsetup\expandafter{\hv@caption@format@temp}% \fi + \c@figure=\numexpr\c@hv@tempCNTfigB-1\relax + \c@table=\numexpr\c@hv@tempCNTtabB-1\relax \ifnum#1>\z@ % caption on the right - \hv@typeout{doublePage: capAngle=\hvSet@global@capAngle}% - \ifnum\hvSet@global@capAngle > \z@ + \hv@typeout{doublePage: capAngle=\hvSet@capAngle}% + \ifnum\hvSet@capAngle > \z@ \hspace{\hv@floatCapSep}% - \rlap{\rotatebox{\hvSet@global@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{% + \rlap{\rotatebox{\hvSet@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{% \abovecaptionskip=0pt% local inside parbox \belowcaptionskip=0pt% local inside parbox \ifx\relax\hv@shortCap\relax @@ -1197,7 +1207,7 @@ \else \global\setlength\hv@tempWidthB{\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax}% \hspace{\hv@floatCapSep}% - \rlap{\parbox[b][\dimexpr\ht\hv@rightBox+\dp\hv@rightBox][\hv@global@@capVPos]{\hv@tempWidthB}{% + \rlap{\parbox[b][\dimexpr\ht\hv@rightBox+\dp\hv@rightBox][\hv@@capVPos]{\hv@tempWidthB}{% \abovecaptionskip=0pt% local inside parbox \belowcaptionskip=0pt% local inside parbox \ifx\hv@shortCap\@empty @@ -1233,7 +1243,8 @@ \expandafter\global\expandafter\savebox\expandafter\hvObjectBox\expandafter{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \expandafter\global\expandafter\savebox\expandafter\hv@boxLeftPage\expandafter{\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}}% \expandafter\global\expandafter\savebox\expandafter\hv@boxRightPage\expandafter{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height}{\usebox\hvObjectBox}}% - \checkoddpage +% \endgroup% started at main macro \hvFloat + \checkoddpage \ifoddpage \if@twocolumn \if@firstcolumn @@ -1261,6 +1272,7 @@ \def\do@hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ---------------------------------- % #1-> 0/1 caption under/right \afterpage{% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \noindent \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}% @@ -1269,6 +1281,7 @@ \noindent \hspace*{\dimexpr-\hv@tempWidthA}% \clipbox*{\the\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}% + \begingroup \ifnum#1>0 \medskip \ifdim\dp\hvObjectBox > \z@ @@ -1301,6 +1314,7 @@ \ifx\hv@label\@empty\else\label{\hv@label}\fi }% \fi + \endgroup \newpage\if@twocolumn\null\newpage\fi }% } @@ -1309,11 +1323,12 @@ % \def\do@hvFloat@doubleFULLPAGE#1{% image on left and right page with caption before/below/right/after % #1-> 0/1 caption under/right - \ifx\hvSet@capPos\hv@After \hv@@capPos=1 + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% + \ifx\hvSet@capPos\hv@After \global\hv@@capPos=1 \else - \ifx\hvSet@capPos\hv@Before \hv@@capPos=0 + \ifx\hvSet@capPos\hv@Before \global\hv@@capPos=0 \else - \hv@@capPos=2 % other caption type + \global\hv@@capPos=2 % other caption type \fi\fi \checkoddpage \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% @@ -1421,6 +1436,7 @@ \def\set@Normal@Bottom@Caption{\@ifnextchar*\set@Normal@Bottom@CaptionStar\set@Normal@Bottom@Caption@} \def\set@Normal@Bottom@Caption@{% \begin{\hv@floatType}[!b] + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@separatorLine\drawSepLine\fi % \expandafter\captionsetup\expandafter{\hv@caption@format}% \ifx\hv@shortCap\@empty @@ -1433,6 +1449,7 @@ } \def\set@Normal@Bottom@CaptionStar*{% \begin{\hv@floatType*}[!b] + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@separatorLine\drawSepLine\fi % \expandafter\captionsetup\expandafter{\hv@caption@format}% \ifx\hv@shortCap\@empty @@ -1444,12 +1461,7 @@ \end{\hv@floatType*}% } - \def\do@hvFloat@doubleFULLPAGE@CaptionBefore{% -% \setcounter{hv@tempCNTfigA}{\value{figure}}% -% \setcounter{hv@tempCNTfigB}{\value{figure}}% -% \setcounter{hv@tempCNTtabA}{\value{table}}% -% \setcounter{hv@tempCNTtabB}{\value{table}}% \afterpage{% \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip @@ -1639,6 +1651,7 @@ \def\setBottomCaption{% \begin{\hv@floatType}[!b]% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@separatorLine\drawSepLine\fi \par \usebox\hvCaptionBox @@ -1651,6 +1664,7 @@ \else \begin{\hv@floatType}[p]% \fi + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@FULLPAGE \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-0.5\baselineskip% \checkoddpage @@ -1664,7 +1678,7 @@ \hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}% \fi \AtBeginShipoutNext{\thispagestyle{empty}}% - \usebox\hvObjectBox% + \usebox\hvObjectBox \else \usebox\hvObjectBox \fi @@ -1679,6 +1693,7 @@ \def\getMultiCaptionAndLabel{% \global\sbox\hvCaptionBox{\minipage[b]{\linewidth}% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% % \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi \setlength\belowcaptionskip{5pt}% \setlength\abovecaptionskip{0pt}% @@ -1710,6 +1725,7 @@ \else \minipage{\columnwidth}% \fi + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% % \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi \ifx\hvSet@objectPos\hv@Right\raggedleft\else \ifx\hvSet@objectPos\hv@Left\raggedleft\else @@ -1736,9 +1752,9 @@ \repeat \endminipage}% } - \def\getMultiSubCaptionAndLabel{% \global\sbox\hvCaptionBox{\minipage{\linewidth}% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% % \ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi \setlength\belowcaptionskip{5pt}% \setlength\abovecaptionskip{0pt}% @@ -1756,6 +1772,7 @@ \def\getMultiSubObjectAndLabel{% \global\sbox\hvObjectBox{% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@vFill \minipage[b][\textheight][s]{\columnwidth}% \else @@ -1774,6 +1791,11 @@ \advance\hv@cntb by \@ne \hv@cnta=2 \edef\@captype{\clist_item:Nn\l_clist_Type{1}}% the same for all subfloats + \ifx\@tempa\@empty + \else +% \refstepcounter{\@captype}% +% \expandafter\label\expandafter{\@tempa}% + \fi \loop \def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}% \ifhv@objectFrame\frame{\@temp}\else\@temp\fi @@ -1798,8 +1820,9 @@ \edef\@tempa{\clist_item:Nn\l_clist_Label{1}}% the main label at the end \ifx\@tempa\@empty \else - \addtocounter{\@captype}{-1}% to get the same -ref as "label"-cap - \refstepcounter{\@captype}% +% \addtocounter{\@captype}{-1}% to get the same -ref as "label"-cap + \edef\@temp{hv@p\@captype}% + \refstepcounter{\@temp}% \expandafter\label\expandafter{\@tempa}% \fi \endminipage}% @@ -1808,6 +1831,7 @@ \def\getSingleCaptionAndLabel{% \global\sbox\hvCaptionBox{\minipage{\linewidth}% + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \setlength\belowcaptionskip{5pt}% \setlength\abovecaptionskip{0pt}% \edef\@captype{\hv@floatType}% @@ -1822,9 +1846,13 @@ \def\set@caption@object#1{% first caption, then object #1=\hv@floatType \ifhv@multiFloat + \setcounter{hv@pfigure}{\value{figure}}% + \setcounter{hv@ptable}{\value{table}}% \getMultiCaptionAndLabel \else \ifhv@subFloat + \setcounter{hv@pfigure}{\value{figure}}% + \setcounter{hv@ptable}{\value{table}}% \getMultiSubCaptionAndLabel \else \getSingleCaptionAndLabel diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf index 646ec7e301..55b39da0c4 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix-french.pdf and b/macros/latex/contrib/nicematrix/nicematrix-french.pdf differ diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index c80c13f352..5339ea7ac8 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -531,11 +531,10 @@ cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur par défaut est \item 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| ; +\item les clés |t| et |b| réglent la ligne de base qui sera donnée au bloc quand +celui-ci est constitué de plusieurs lignes (séparées par la commande |\\|) ; \item \colorbox{yellow!50}{\bfseries Nouveau 5.15}\enskip la clé |hvlines| trace -tous les filets horizontaux et verticaux dans le bloc ; -\item \colorbox{yellow!50}{\bfseries Nouveau 5.14}\enskip les clés |t| et |b| -réglent la ligne de base qui sera donnée au bloc quand celui-ci est constitué de -plusieurs lignes (séparées par la commande |\\|). +tous les filets horizontaux et verticaux dans le bloc. \end{itemize} @@ -1050,12 +1049,11 @@ A & A & A & A & A & A \\ \bigskip -\colorbox{yellow!50}{\textbf{Nouveau 5.14}}\enskip Quand la clé |corners| est -utilisée, \pkg{nicematrix} calcule les coins vides et ces coins sont alors pris -en compte par les outils de tracés de filets (les filets ne seront pas tracés -dans ces coins vides). \emph{Remarque} : Dans les versions précédentes de -\pkg{nicematrix}, il n'y avait qu'une clé |hvlines-except-corners| (maintenant -considérée comme obsolète). +Quand la clé |corners| est utilisée, \pkg{nicematrix} calcule les coins vides et +ces coins sont alors pris en compte par les outils de tracés de filets (les +filets ne seront pas tracés dans ces coins vides). \emph{Remarque} : Dans les +versions précédentes de \pkg{nicematrix}, il n'y avait qu'une clé +|hvlines-except-corners| (maintenant considérée comme obsolète). \bigskip \begin{BVerbatim}[boxwidth=11cm,baseline=c] @@ -3538,28 +3536,23 @@ Dans l'exemple suivant, nous avons surligné tous les nœuds de la matrice (on explique plus loin la technique utilisée : cf. p. \pageref{highlight}). \[\begin{pNiceMatrix} +\CodeBefore [create-cell-nodes] + \begin{tikzpicture}% + [every node/.style = { inner sep = 0 pt , fill = red!15 }] + \node [fit = (1-1)] {} ; + \node [fit = (1-3)] {} ; + \node [fit = (2-2)] {} ; + \node [fit = (3-1)] {} ; + \node [fit = (3-3)] {} ; + \node [fit = (1-2)] {} ; + \node [fit = (2-1)] {} ; + \node [fit = (2-3)] {} ; + \node [fit = (3-2)] {} ; + \end{tikzpicture} +\Body a & a + b & a + b + c \\ a & a & a + b \\ a & a & a -\CodeAfter -\begin{tikzpicture}[ - every node/.style = - { - blend mode = multiply, - inner sep = 0 pt , - fill = red!15 - } - ] -\node [fit = (1-1)] {} ; -\node [fit = (1-3)] {} ; -\node [fit = (2-2)] {} ; -\node [fit = (3-1)] {} ; -\node [fit = (3-3)] {} ; -\node [fit = (1-2)] {} ; -\node [fit = (2-1)] {} ; -\node [fit = (2-3)] {} ; -\node [fit = (3-2)] {} ; -\end{tikzpicture} \end{pNiceMatrix}\] @@ -3583,25 +3576,24 @@ nom des nœuds normaux. Dans l'exemple suivant, on a surligné tous les «nœuds moyens». Nous considérons que cet exemple se suffit à lui-même comme définition de ces nœuds. \[\begin{pNiceMatrix}[create-medium-nodes] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} + [every node/.style = {fill = red!15, inner sep = 0 pt}, + name suffix = -medium] + \node [fit = (1-1)] {} ; + \node [fit = (1-2)] {} ; + \node [fit = (1-3)] {} ; + \node [fit = (2-1)] {} ; + \node [fit = (2-2)] {} ; + \node [fit = (2-3)] {} ; + \node [fit = (3-1)] {} ; + \node [fit = (3-2)] {} ; + \node [fit = (3-3)] {} ; +\end{tikzpicture} +\Body a & a + b & a + b + c \\ a & a & a + b \\ a & a & a -\CodeAfter -\begin{tikzpicture} - [every node/.style = {fill = red!15, - blend mode = multiply, - inner sep = 0 pt}, - name suffix = -medium] -\node [fit = (1-1)] {} ; -\node [fit = (1-2)] {} ; -\node [fit = (1-3)] {} ; -\node [fit = (2-1)] {} ; -\node [fit = (2-2)] {} ; -\node [fit = (2-3)] {} ; -\node [fit = (3-1)] {} ; -\node [fit = (3-2)] {} ; -\node [fit = (3-3)] {} ; -\end{tikzpicture} \end{pNiceMatrix}\] @@ -3614,24 +3606,24 @@ de ces nœuds.\footnote{Il n'y a pas de «nœuds larges» créés dans les rang p.~\pageref{exterior}).} \[\begin{pNiceMatrix}[create-large-nodes] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} + [every node/.style = { inner sep = 0 pt} , + name suffix = -large] + \node [fit = (1-1),fill = red!15] {} ; + \node [fit = (1-3),fill = red!15] {} ; + \node [fit = (2-2),fill = red!15] {} ; + \node [fit = (3-1),fill = red!15] {} ; + \node [fit = (3-3),fill = red!15] {} ; + \node [fit = (1-2),fill = blue!15] {} ; + \node [fit = (2-1),fill = blue!15] {} ; + \node [fit = (2-3),fill = blue!15] {} ; + \node [fit = (3-2),fill = blue!15] {} ; + \end{tikzpicture} +\Body a & a + b & a + b + c \\ a & a & a + b \\ a & a & a -\CodeAfter -\begin{tikzpicture} - [every node/.style = {blend mode = multiply, - inner sep = 0 pt}, - name suffix = -large] -\node [fit = (1-1),fill = red!15] {} ; -\node [fit = (1-3),fill = red!15] {} ; -\node [fit = (2-2),fill = red!15] {} ; -\node [fit = (3-1),fill = red!15] {} ; -\node [fit = (3-3),fill = red!15] {} ; -\node [fit = (1-2),fill = blue!15] {} ; -\node [fit = (2-1),fill = blue!15] {} ; -\node [fit = (2-3),fill = blue!15] {} ; -\node [fit = (3-2),fill = blue!15] {} ; -\end{tikzpicture} \end{pNiceMatrix}\] @@ -3647,24 +3639,24 @@ utilisé les options |left-margin| et |right-margin|.\footnote{Les options elle est égale à |\arraycolsep| (valeur initiale : 5~pt). Il existe aussi une option |margin| pour fixer à la fois |left-margin| et |right-margin|.} \[\begin{pNiceMatrix}[create-large-nodes,left-margin,right-margin] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} + [every node/.style = {inner sep = 0 pt}, + name suffix = -large] + \node [fit = (1-1),fill = red!15] {} ; + \node [fit = (1-3),fill = red!15] {} ; + \node [fit = (2-2),fill = red!15] {} ; + \node [fit = (3-1),fill = red!15] {} ; + \node [fit = (3-3),fill = red!15] {} ; + \node [fit = (1-2),fill = blue!15] {} ; + \node [fit = (2-1),fill = blue!15] {} ; + \node [fit = (2-3),fill = blue!15] {} ; + \node [fit = (3-2),fill = blue!15] {} ; + \end{tikzpicture} +\Body a & a + b & a + b + c \\ a & a & a + b \\ a & a & a -\CodeAfter -\begin{tikzpicture} - [every node/.style = {blend mode = multiply, - inner sep = 0 pt}, - name suffix = -large] -\node [fit = (1-1),fill = red!15] {} ; -\node [fit = (1-3),fill = red!15] {} ; -\node [fit = (2-2),fill = red!15] {} ; -\node [fit = (3-1),fill = red!15] {} ; -\node [fit = (3-3),fill = red!15] {} ; -\node [fit = (1-2),fill = blue!15] {} ; -\node [fit = (2-1),fill = blue!15] {} ; -\node [fit = (2-3),fill = blue!15] {} ; -\node [fit = (3-2),fill = blue!15] {} ; -\end{tikzpicture} \end{pNiceMatrix}\] \medskip @@ -3674,24 +3666,24 @@ incorporées dans les «nœuds larges». Dans l'exemple suivant, nous avons util |extra-left-margin| et |extra-right-margin| avec la valeur $3$~pt. \[\begin{pNiceMatrix}% [create-large-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} + [every node/.style = {inner sep = 0 pt}, + name suffix = -large] + \node [fit = (1-1),fill = red!15] {} ; + \node [fit = (1-3),fill = red!15] {} ; + \node [fit = (2-2),fill = red!15] {} ; + \node [fit = (3-1),fill = red!15] {} ; + \node [fit = (3-3),fill = red!15] {} ; + \node [fit = (1-2),fill = blue!15] {} ; + \node [fit = (2-1),fill = blue!15] {} ; + \node [fit = (2-3),fill = blue!15] {} ; + \node [fit = (3-2),fill = blue!15] {} ; +\end{tikzpicture} +\Body a & a + b & a + b + c \\ a & a & a + b \\ a & a & a -\CodeAfter -\begin{tikzpicture} - [every node/.style = {blend mode = multiply, - inner sep = 0 pt}, - name suffix = -large] -\node [fit = (1-1),fill = red!15] {} ; -\node [fit = (1-3),fill = red!15] {} ; -\node [fit = (2-2),fill = red!15] {} ; -\node [fit = (3-1),fill = red!15] {} ; -\node [fit = (3-3),fill = red!15] {} ; -\node [fit = (1-2),fill = blue!15] {} ; -\node [fit = (2-1),fill = blue!15] {} ; -\node [fit = (2-3),fill = blue!15] {} ; -\node [fit = (3-2),fill = blue!15] {} ; -\end{tikzpicture} \end{pNiceMatrix}\] @@ -3748,28 +3740,38 @@ Voici maintenant tous les «nœuds larges» de ce tableau (sans utilisation de \begin{scope} \large \begin{NiceTabular}[c]{w{l}{2cm}ll}[hvlines,create-large-nodes] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} + [every node/.style = {inner sep = 0 pt}, + name suffix = -large] + \node [fit = (1-1),fill = red!15] {} ; + \node [fit = (1-3),fill = red!15] {} ; + \node [fit = (2-2),fill = red!15] {} ; + \node [fit = (3-1),fill = red!15] {} ; + \node [fit = (3-3),fill = red!15] {} ; + \node [fit = (1-2),fill = blue!15] {} ; + \node [fit = (2-1),fill = blue!15] {} ; + \node [fit = (2-3),fill = blue!15] {} ; + \node [fit = (3-2),fill = blue!15] {} ; + \end{tikzpicture} +\Body fraise & amande & abricot \\ prune & pêche & poire \\[1ex] noix & noisette & brugnon -\CodeAfter -\begin{tikzpicture} - [every node/.style = {blend mode = multiply, - inner sep = 0 pt}, - name suffix = -large] -\node [fit = (1-1),fill = red!15] {} ; -\node [fit = (1-3),fill = red!15] {} ; -\node [fit = (2-2),fill = red!15] {} ; -\node [fit = (3-1),fill = red!15] {} ; -\node [fit = (3-3),fill = red!15] {} ; -\node [fit = (1-2),fill = blue!15] {} ; -\node [fit = (2-1),fill = blue!15] {} ; -\node [fit = (2-3),fill = blue!15] {} ; -\node [fit = (3-2),fill = blue!15] {} ; -\end{tikzpicture} \end{NiceTabular} \end{scope} +\vspace{1cm} +Les nœuds que l'on vient de décrire ne sont pas accessibles par défaut dans le +|\CodeBefore| (décrit p.~\pageref{code-before}). \par\nobreak + +\colorbox{yellow!50}{\textbf{Nouveau 5.16}}\enskip On peut rendre ces nœuds +accessibles dans le |\CodeBefore| en utilisant la clé |create-cell-nodes| du +mot-clé |\CodeBefore| (dans ce cas-là, les nœuds sont créés une première fois +avant la construction du tableau en utilisant des informations écrites dans le +fichier |aux| puis recréés lors de la composition du tableau proprement dit). + \subsection{Les nœuds indiquant la position des filets} @@ -3779,11 +3781,8 @@ L'extension \pkg{nicematrix} crée un nœud PGF-Tikz nommé simplement $i$ (pré du préfixe habituel) à l'intersection du filet horizontal de numéro $i$ et du filet vertical de numéro~$i$ (ou plutôt la position potentielle de ces filets car ils ne sont peut-être pas tracés). Le dernier nœud a aussi un alias nommé -simplement |last|. - -\smallskip -\colorbox{yellow!50}{\textbf{Nouveau 5.14}}\enskip Il existe aussi un nœud nommé -$i$|.5| à mi-chemin entre le nœud $i$ et le nœud $i+1$. +simplement |last|. Il existe aussi un nœud nommé $i$|.5| à mi-chemin entre le +nœud $i$ et le nœud $i+1$. Ces nœuds sont accessibles dans le |\CodeAfter| mais aussi dans le |\CodeBefore|. @@ -4759,17 +4758,12 @@ suivantes dans le préambule du document : \medskip Nous créons un nœud Tikz rectangulaire qui englobe les nœuds de la deuxième -rangée en utilisant les outils de la bibliothèque Tikz \pkg{fit}. Ce nœud est -rempli après la construction de la matrice. Pour que l'on puisse voir le texte -\emph{sous} le nœud, nous devons utiliser la transparence avec le |blend mode| -égal à |multiply|. \textbf{Attention} : Certains lecteurs de \textsc{pdf} -n'affichent pas la transparence.\footnote{Dans Overleaf, the lecteur de - \textsc{PDF} «intégré» n'affiche pas la transparence. On peut sélectionner le - lecteur «natif» dans ce cas-là.} +rangée en utilisant les outils de la bibliothèque Tikz \pkg{fit}. Ces nœuds ne +sont pas créés par défaut dans le |\CodeBefore| (par souci d'efficacité). Il +faut utiliser la clé |create-cell-nodes| du |\CodeBefore| pour demander leur création. \tikzset{highlight/.style={rectangle, fill=red!15, - blend mode = multiply, rounded corners = 0.5 mm, inner sep=1pt, fit=#1}} @@ -4778,119 +4772,59 @@ n'affichent pas la transparence.\footnote{Dans Overleaf, the lecteur de \begin{Verbatim} \tikzset{highlight/.style={rectangle, fill=red!15, - ~emphase#blend mode = multiply@, rounded corners = 0.5 mm, inner sep=1pt, fit=~#1}} $\begin{bNiceMatrix} +~emphase#\CodeBefore [create-cell-nodes] @ +~emphase# \tikz \node [highlight = (2-1) (2-3)] {} ; @ +~emphase# \Body @ 0 & \Cdots & 0 \\ 1 & \Cdots & 1 \\ 0 & \Cdots & 0 \\ -~emphase#\CodeAfter \tikz \node [highlight = (2-1) (2-3)] {} ;@ \end{bNiceMatrix}$ \end{Verbatim} \[\begin{bNiceMatrix} +\CodeBefore [create-cell-nodes] + \tikz \node [highlight = (2-1) (2-3)] {} ; +\Body 0 & \Cdots & 0 \\ 1 & \Cdots & 1 \\ 0 & \Cdots & 0 \\ -\CodeAfter \tikz \node [highlight = (2-1) (2-3)] {} ; \end{bNiceMatrix}\] -\vspace{1cm} On rappelle que dans le cas d'un ensemble de cases fusionnées (avec -la commande |\Block|), un nœud Tikz est créé pour l'ensemble des cases avec pour -nom $i$|-|$j$|-block| où $i$ et $j$ sont les numéros de ligne et de colonne de -la case en haut à gauche (où a été utilisée la commande |\Block|). Si on a -demandé la création des nœuds |medium|, alors un nœud de ce type est aussi créé -pour ce bloc avec un nom suffixé par |-medium|. - -\medskip -\begin{BVerbatim}[baseline=c,boxwidth=11.6cm] -$\begin{pNiceMatrix}[margin,create-medium-nodes] - \Block{3-3}<\Large>{A} & & & 0 \\ - & \hspace*{1cm} & & \Vdots \\ - & & & 0 \\ - 0 & \Cdots& 0 & 0 -\CodeAfter - \tikz \node [~emphase#highlight = (1-1-block-medium)@] {} ; -\end{pNiceMatrix}$ -\end{BVerbatim} -$\begin{pNiceMatrix}[margin,create-medium-nodes] -\Block{3-3}<\Large>{A} & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ -& & & 0 \\ -0 & \Cdots& 0 & 0 -\CodeAfter -\tikz \node [highlight = (1-1-block-medium)] {} ; -\end{pNiceMatrix}$ - - \vspace{1cm} -On considère maintenant la matrice suivante que l'on a appelée |exemple|. +On considère maintenant la matrice suivante. Si on veut surligner chaque rangée +de la matrice, on peut utiliser la technique précédente trois fois. -\medskip \begin{Verbatim} -$\begin{pNiceArray}{ccc}[~emphase#name=exemple@,last-col,create-medium-nodes] -a & a + b & a + b + c & L_1 \\ -a & a & a + b & L_2 \\ -a & a & a & L_3 -\end{pNiceArray}$ -\end{Verbatim} - \[\begin{pNiceArray}{ccc}[last-col] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} +~emphase# \node [highlight = (1-1) (1-3)] {} ;@ +~emphase# \node [highlight = (2-1) (2-3)] {} ;@ +~emphase# \node [highlight = (3-1) (3-3)] {} ;@ + \end{tikzpicture} +\Body a & a + b & a + b + c & L_1 \\ a & a & a + b & L_2 \\ a & a & a & L_3 \end{pNiceArray}\] - -\bigskip -Si on veut surligner chaque rangée de la matrice, on peut utiliser la technique précédente trois fois. - -\begin{Verbatim} -\tikzset{mes-options/.style={remember picture, - overlay, - name prefix = exemple-, - highlight/.style = {fill = red!15, - blend mode = multiply, - inner sep = 0pt, - fit = ~#1}}} \end{Verbatim} - -\tikzset{mes-options/.style={remember picture, - overlay, - name prefix = exemple-, - highlight/.style = {fill = red!15, - blend mode = multiply, - inner sep = 0pt, - fit = #1}}} - - -\begin{Verbatim} -\begin{tikzpicture}[mes-options] -\node [highlight = (1-1) (1-3)] {} ; -\node [highlight = (2-1) (2-3)] {} ; -\node [highlight = (3-1) (3-3)] {} ; -\end{tikzpicture} -\end{Verbatim} - -\medskip -On obtient la matrice suivante. - -\[\begin{pNiceArray}{ccc}[ - last-col, - code-after = {\begin{tikzpicture}[highlight/.style = {fill = red!15, - blend mode = multiply, - inner sep = 0pt, - fit = #1}] - \node [highlight = (1-1) (1-3)] {} ; - \node [highlight = (2-1) (2-3)] {} ; - \node [highlight = (3-1) (3-3)] {} ; - \end{tikzpicture}}] +\[\begin{pNiceArray}{ccc}[last-col] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} + \node [highlight = (1-1) (1-3)] {} ; + \node [highlight = (2-1) (2-3)] {} ; + \node [highlight = (3-1) (3-3)] {} ; + \end{tikzpicture} +\Body a & a + b & a + b + c & L_1 \\ a & a & a + b & L_2 \\ a & a & a & L_3 @@ -4901,46 +4835,44 @@ Le résultat peut paraître décevant. On peut l'améliorer en utilisant les «n moyens» au lieu des «nœuds normaux». \begin{Verbatim} -\begin{tikzpicture}[mes-options, ~emphase#name suffix = -medium@] -\node [highlight = (1-1) (1-3)] {} ; -\node [highlight = (2-1) (2-3)] {} ; -\node [highlight = (3-1) (3-3)] {} ; -\end{tikzpicture} +\[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} ~emphase#[name suffix = -medium]@ + \node [highlight = (1-1) (1-3)] {} ; + \node [highlight = (2-1) (2-3)] {} ; + \node [highlight = (3-1) (3-3)] {} ; + \end{tikzpicture} +\Body +a & a + b & a + b + c & L_1 \\ +a & a & a + b & L_2 \\ +a & a & a & L_3 +\end{pNiceArray}\] \end{Verbatim} -\medskip -On obtient la matrice suivante. \[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +\CodeBefore [create-cell-nodes] + \begin{tikzpicture} [name suffix = -medium] + \node [highlight = (1-1) (1-3)] {} ; + \node [highlight = (2-1) (2-3)] {} ; + \node [highlight = (3-1) (3-3)] {} ; + \end{tikzpicture} +\Body a & a + b & a + b + c & L_1 \\ a & a & a + b & L_2 \\ -a & a & a & L_3 \\ -\CodeAfter -\begin{tikzpicture}[highlight/.style = {fill = red!15, - blend mode = multiply, - inner sep = 0pt, - fit = #1}, - name suffix = -medium] -\node [highlight = (1-1) (1-3)] {} ; -\node [highlight = (2-1) (2-3)] {} ; -\node [highlight = (3-1) (3-3)] {} ; -\end{tikzpicture} +a & a & a & L_3 \end{pNiceArray}\] -\subsection{Utilisation de \textbackslash SubMatrix dans le code-before} +\subsection{Utilisation de \textbackslash SubMatrix dans le \textbackslash CodeBefore} Dans l'exemple suivant, on illustre le produit mathématique de deux matrices. L'ensemble de la figure est un environnement |{NiceArray}| et les trois paires -de parenthèses ont été rajoutées avec |\SubMatrix| dans le |code-before|. +de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. + -Ceux qui sont intéressés par le code correspondant le trouveront dans le fichier -source de ce document. -% -% -% \tikzset{highlight/.style={rectangle, fill=red!15, rounded corners = 0.5 mm, @@ -4975,6 +4907,43 @@ source de ce document. \end{NiceArray}\] +\vspace{1cm} +\begin{Verbatim} +\tikzset{highlight/.style={rectangle, + fill=red!15, + rounded corners = 0.5 mm, + inner sep=1pt, + fit=~#1}} +\end{Verbatim} + +\begin{Verbatim}[formatcom = \small\color{gray}] +\[\begin{NiceArray}{*{6}{c}~LetterAt{\hspace{6mm}}*{5}{c}}[nullify-dots] +\CodeBefore [create-cell-nodes] + \SubMatrix({2-7}{6-11}) + \SubMatrix({7-2}{11-6}) + \SubMatrix({7-7}{11-11}) + \begin{tikzpicture} + \node [highlight = (9-2) (9-6)] { } ; + \node [highlight = (2-9) (6-9)] { } ; + \end{tikzpicture} +\Body + & & & & & & & & \color{blue}\scriptstyle C_j \\ + & & & & & & b_{11} & \Cdots & b_{1j} & \Cdots & b_{1n} \\ + & & & & & & \Vdots & & \Vdots & & \Vdots \\ + & & & & & & & & b_{kj} \\ + & & & & & & & & \Vdots \\ + & & & & & & b_{n1} & \Cdots & b_{nj} & \Cdots & b_{nn} \\[3mm] + & a_{11} & \Cdots & & & a_{1n} \\ + & \Vdots & & & & \Vdots & & & \Vdots \\ +\color{blue}\scriptstyle L_i + & a_{i1} & \Cdots & a_{ik} & \Cdots & a_{in} & \Cdots & & c_{ij} \\ + & \Vdots & & & & \Vdots \\ + & a_{n1} & \Cdots & & & a_{nn} \\ +\CodeAfter +\tikz \draw [gray,shorten > = 1mm, shorten < = 1mm] (9-4.north) to [bend left] (4-9.west) ; +\end{NiceArray}\] +\end{Verbatim} + \section*{Autre documentation} diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 32206348c0..43fb1accbd 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{5.15b} -\def\myfiledate{2021/06/05} +\def\myfileversion{5.16} +\def\myfiledate{2021/06/20} % % %<*batchfile> @@ -386,7 +386,9 @@ version 2005/12/01 or later. % \end{minipage} % % \medskip -% However, it's also possible to use the tools of \pkg{booktabs}: |\toprule|, +% However, it's also possible to use the tools of +% \pkg{booktabs}\footnote{The extension \pkg{booktabs} is \emph{not} loaded +% by \pkg{nicematrix}.}: |\toprule|, % |\bottomrule|, |\midrule|, etc.\par\nobreak % % \smallskip @@ -577,11 +579,10 @@ version 2005/12/01 or later. % \item 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|; +% \item the keys |t| and |b| fix the base line that will be given to the block +% when it has a multi-line content (the lines are separated by |\\|); % \item \colorbox{yellow!50}{\bfseries New 5.15}\enskip the keys |hvlines| draws -% all the vertical and horizontal rules in the block; -% \item \colorbox{yellow!50}{\bfseries New 5.14}\enskip the keys |t| and |b| fix -% the base line that will be given to the block when it has a multi-line content -% (the lines are separated by |\\|). +% all the vertical and horizontal rules in the block. % \end{itemize} % % \interitem @@ -1067,11 +1068,11 @@ version 2005/12/01 or later. % \end{NiceTabular} % % \bigskip -% \colorbox{yellow!50}{\textbf{New 5.14}}\enskip When the key |corners| is used, -% \pkg{nicematrix} computes the (empty) corners and these corners will be taken -% into account by the tools for drawing the rules (the rules won't be drawn in -% the corners). \emph{Remark}: In the previous versions of \pkg{nicematrix}, -% there was only a key |hvlines-except-corners| (now considered as obsolete). +% When the key |corners| is used, \pkg{nicematrix} computes the (empty) corners +% and these corners will be taken into account by the tools for drawing the +% rules (the rules won't be drawn in the corners). \emph{Remark}: In the +% previous versions of \pkg{nicematrix}, there was only a key +% |hvlines-except-corners| (now considered as obsolete). % % \bigskip % \begin{BVerbatim}[boxwidth=11cm,baseline=c] @@ -3252,7 +3253,7 @@ version 2005/12/01 or later. % exists) has also the number~$0$.}. Of course, the user must not change the % value of these counters which are used internally by \pkg{nicematrix}. % -% In the |code-before| (cf. p. \pageref{code-before}) and in the |\CodeAfter| +% In the |\CodeBefore| (cf. p. \pageref{code-before}) and in the |\CodeAfter| % (cf. p. \pageref{code-after}), |iRow| represents the total number of rows % (excepted the potential exterior rows) and |jCol| represents the total number % of columns (excepted the potential exterior columns). @@ -3489,26 +3490,26 @@ version 2005/12/01 or later. % In the following example, we have underlined all the nodes of the matrix (we % explain below the technic used : cf. p. \pageref{highlight}). % -% \[\begin{pNiceMatrix}[ -% code-after = {\begin{tikzpicture} -% [every node/.style = {blend mode = multiply, -% fill = red!15, -% inner sep = 0 pt }] -% \node [fit = (1-1)] {} ; -% \node [fit = (1-3)] {} ; -% \node [fit = (2-2)] {} ; -% \node [fit = (3-1)] {} ; -% \node [fit = (3-3)] {} ; -% \node [fit = (1-2)] {} ; -% \node [fit = (2-1)] {} ; -% \node [fit = (2-3)] {} ; -% \node [fit = (3-2)] {} ; -% \end{tikzpicture}}] +% +% \[\begin{pNiceMatrix} +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture}% +% [every node/.style = { inner sep = 0 pt , fill = red!15 }] +% \node [fit = (1-1)] {} ; +% \node [fit = (1-3)] {} ; +% \node [fit = (2-2)] {} ; +% \node [fit = (3-1)] {} ; +% \node [fit = (3-3)] {} ; +% \node [fit = (1-2)] {} ; +% \node [fit = (2-1)] {} ; +% \node [fit = (2-3)] {} ; +% \node [fit = (3-2)] {} ; +% \end{tikzpicture} +% \Body % a & a + b & a + b + c \\ % a & a & a + b \\ % a & a & a % \end{pNiceMatrix}\] -% % % % \subsection{The ``medium nodes'' and the ``large nodes''} @@ -3529,23 +3530,22 @@ version 2005/12/01 or later. % ``|-medium|'' to the names of the ``normal nodes''. In the following example, % we have underlined the ``medium nodes''. We consider that this example is % self-explanatory. -% \[\begin{pNiceMatrix}[ -% create-medium-nodes, -% code-after = {\begin{tikzpicture} -% [every node/.style = {fill = red!15, -% blend mode = multiply, -% inner sep = 0pt}, -% name suffix = -medium] -% \node [fit = (1-1)] {} ; -% \node [fit = (1-2)] {} ; -% \node [fit = (1-3)] {} ; -% \node [fit = (2-1)] {} ; -% \node [fit = (2-2)] {} ; -% \node [fit = (2-3)] {} ; -% \node [fit = (3-1)] {} ; -% \node [fit = (3-2)] {} ; -% \node [fit = (3-3)] {} ; -% \end{tikzpicture}}] +% \[\begin{pNiceMatrix}[create-medium-nodes] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% [every node/.style = {fill = red!15, inner sep = 0 pt}, +% name suffix = -medium] +% \node [fit = (1-1)] {} ; +% \node [fit = (1-2)] {} ; +% \node [fit = (1-3)] {} ; +% \node [fit = (2-1)] {} ; +% \node [fit = (2-2)] {} ; +% \node [fit = (2-3)] {} ; +% \node [fit = (3-1)] {} ; +% \node [fit = (3-2)] {} ; +% \node [fit = (3-3)] {} ; +% \end{tikzpicture} +% \Body % a & a + b & a + b + c \\ % a & a & a + b \\ % a & a & a @@ -3558,27 +3558,27 @@ version 2005/12/01 or later. % we have underlined the ``large nodes''. We consider that this example is % self-explanatory.\footnote{There is no ``large nodes'' created in the exterior % rows and columns (for these rows and columns, cf. p.~\pageref{exterior}).} -% -% \[\begin{pNiceMatrix}[ -% create-large-nodes, -% code-after = {\begin{tikzpicture} -% [every node/.style = {blend mode = multiply, -% inner sep = 0pt}, -% name suffix = -large] -% \node [fit = (1-1),fill = red!15] {} ; -% \node [fit = (1-3),fill = red!15] {} ; -% \node [fit = (2-2),fill = red!15] {} ; -% \node [fit = (3-1),fill = red!15] {} ; -% \node [fit = (3-3),fill = red!15] {} ; -% \node [fit = (1-2),fill = blue!15] {} ; -% \node [fit = (2-1),fill = blue!15] {} ; -% \node [fit = (2-3),fill = blue!15] {} ; -% \node [fit = (3-2),fill = blue!15] {} ; -% \end{tikzpicture}}] +% \[\begin{pNiceMatrix}[create-large-nodes] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% [every node/.style = { inner sep = 0 pt} , +% name suffix = -large] +% \node [fit = (1-1),fill = red!15] {} ; +% \node [fit = (1-3),fill = red!15] {} ; +% \node [fit = (2-2),fill = red!15] {} ; +% \node [fit = (3-1),fill = red!15] {} ; +% \node [fit = (3-3),fill = red!15] {} ; +% \node [fit = (1-2),fill = blue!15] {} ; +% \node [fit = (2-1),fill = blue!15] {} ; +% \node [fit = (2-3),fill = blue!15] {} ; +% \node [fit = (3-2),fill = blue!15] {} ; +% \end{tikzpicture} +% \Body % a & a + b & a + b + c \\ % a & a & a + b \\ % a & a & a % \end{pNiceMatrix}\] +% % % % \medskip @@ -3591,26 +3591,27 @@ version 2005/12/01 or later. % value is given, the default value is used, which is |\arraycolsep| (by % default: 5~pt). There is also an option |margin| to fix both |left-margin| and % |right-margin| to the same value.} -% \[\begin{pNiceMatrix}[ -% create-large-nodes,left-margin,right-margin, -% code-after = {\begin{tikzpicture} -% [every node/.style = {blend mode = multiply, -% inner sep = 0pt}, -% name suffix = -large] -% \node [fit = (1-1),fill = red!15] {} ; -% \node [fit = (1-3),fill = red!15] {} ; -% \node [fit = (2-2),fill = red!15] {} ; -% \node [fit = (3-1),fill = red!15] {} ; -% \node [fit = (3-3),fill = red!15] {} ; -% \node [fit = (1-2),fill = blue!15] {} ; -% \node [fit = (2-1),fill = blue!15] {} ; -% \node [fit = (2-3),fill = blue!15] {} ; -% \node [fit = (3-2),fill = blue!15] {} ; -% \end{tikzpicture}}] +% \[\begin{pNiceMatrix}[create-large-nodes,left-margin,right-margin] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% [every node/.style = {inner sep = 0 pt}, +% name suffix = -large] +% \node [fit = (1-1),fill = red!15] {} ; +% \node [fit = (1-3),fill = red!15] {} ; +% \node [fit = (2-2),fill = red!15] {} ; +% \node [fit = (3-1),fill = red!15] {} ; +% \node [fit = (3-3),fill = red!15] {} ; +% \node [fit = (1-2),fill = blue!15] {} ; +% \node [fit = (2-1),fill = blue!15] {} ; +% \node [fit = (2-3),fill = blue!15] {} ; +% \node [fit = (3-2),fill = blue!15] {} ; +% \end{tikzpicture} +% \Body % a & a + b & a + b + c \\ % a & a & a + b \\ % a & a & a % \end{pNiceMatrix}\] +% % % \medskip % It's also possible to add more space on both side of the array with the @@ -3618,22 +3619,22 @@ version 2005/12/01 or later. % incorporated in the ``large nodes''. It's possible to fix both values with the % option |extra-margin| and, in the following example, we use |extra-margin| % with the value $3$~pt. -% \[\begin{pNiceMatrix}[ -% create-large-nodes,margin,extra-margin=3pt, -% code-after = {\begin{tikzpicture} -% [every node/.style = {blend mode = multiply, -% inner sep = 0 pt}, -% name suffix = -large] -% \node [fit = (1-1),fill = red!15] {} ; -% \node [fit = (1-3),fill = red!15] {} ; -% \node [fit = (2-2),fill = red!15] {} ; -% \node [fit = (3-1),fill = red!15] {} ; -% \node [fit = (3-3),fill = red!15] {} ; -% \node [fit = (1-2),fill = blue!15] {} ; -% \node [fit = (2-1),fill = blue!15] {} ; -% \node [fit = (2-3),fill = blue!15] {} ; -% \node [fit = (3-2),fill = blue!15] {} ; -% \end{tikzpicture}}] +% \[\begin{pNiceMatrix}[create-large-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% [every node/.style = {inner sep = 0 pt}, +% name suffix = -large] +% \node [fit = (1-1),fill = red!15] {} ; +% \node [fit = (1-3),fill = red!15] {} ; +% \node [fit = (2-2),fill = red!15] {} ; +% \node [fit = (3-1),fill = red!15] {} ; +% \node [fit = (3-3),fill = red!15] {} ; +% \node [fit = (1-2),fill = blue!15] {} ; +% \node [fit = (2-1),fill = blue!15] {} ; +% \node [fit = (2-3),fill = blue!15] {} ; +% \node [fit = (3-2),fill = blue!15] {} ; +% \end{tikzpicture} +% \Body % a & a + b & a + b + c \\ % a & a & a + b \\ % a & a & a @@ -3693,22 +3694,22 @@ version 2005/12/01 or later. % \hspace{1.5cm} % \begin{scope} % \large -% \begin{NiceTabular}[c]{wl{2cm}ll}[hvlines, -% create-large-nodes, -% code-after = {\begin{tikzpicture} -% [every node/.style = {blend mode = multiply, -% inner sep = 0 pt}, -% name suffix = -large] -% \node [fit = (1-1),fill = red!15] {} ; -% \node [fit = (1-3),fill = red!15] {} ; -% \node [fit = (2-2),fill = red!15] {} ; -% \node [fit = (3-1),fill = red!15] {} ; -% \node [fit = (3-3),fill = red!15] {} ; -% \node [fit = (1-2),fill = blue!15] {} ; -% \node [fit = (2-1),fill = blue!15] {} ; -% \node [fit = (2-3),fill = blue!15] {} ; -% \node [fit = (3-2),fill = blue!15] {} ; -% \end{tikzpicture}}] +% \begin{NiceTabular}[c]{w{l}{2cm}ll}[hvlines,create-large-nodes] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% [every node/.style = {inner sep = 0 pt}, +% name suffix = -large] +% \node [fit = (1-1),fill = red!15] {} ; +% \node [fit = (1-3),fill = red!15] {} ; +% \node [fit = (2-2),fill = red!15] {} ; +% \node [fit = (3-1),fill = red!15] {} ; +% \node [fit = (3-3),fill = red!15] {} ; +% \node [fit = (1-2),fill = blue!15] {} ; +% \node [fit = (2-1),fill = blue!15] {} ; +% \node [fit = (2-3),fill = blue!15] {} ; +% \node [fit = (3-2),fill = blue!15] {} ; +% \end{tikzpicture} +% \Body % fraise & amande & abricot \\ % prune & pêche & poire \\[1ex] % noix & noisette & brugnon @@ -3716,7 +3717,15 @@ version 2005/12/01 or later. % \end{scope} % % +% \vspace{1cm} +% The nodes we have described are not available by default in the |\CodeBefore| +% (described p.~\pageref{code-before}).\par\nobreak % +% \colorbox{yellow!50}{\textbf{New 5.16}}\enskip It's possible to have these +% nodes available in the |\CodeBefore| by using the key |create-cell-nodes| of +% the keyword |\CodeBefore| (in that case, the nodes are created first before +% the construction of the array by using informations written on the |aux| file +% and created a second time during the contruction of the array itself). % % \subsection{The nodes which indicate the position of the rules} % @@ -3725,10 +3734,8 @@ version 2005/12/01 or later. % the classical prefix) at the intersection of the horizontal rule of number~$i$ % and the vertical rule of number~$i$ (more specifically the potential position % of those rules because maybe there are not actually drawn). The last node has -% also an alias called |last|. -% -% \colorbox{yellow!50}{\textbf{New 5.14}}\enskip There is also a node called -% $i$|.5| midway between the node $i$ and the node $i+1$. +% also an alias called |last|. There is also a node called $i$|.5| midway +% between the node $i$ and the node $i+1$. % % These nodes are available in the |\CodeBefore| and the |\CodeAfter|. % @@ -4690,9 +4697,14 @@ version 2005/12/01 or later. % \usetikzlibrary{fit} % \end{verbatim} % +% \medskip +% We create a rectangular Tikz node which encompasses the nodes of the second +% row by using the tools of the Tikz library \pkg{fit}. Those nodes are not +% available by default in the |\CodeBefore| (for efficiency). We have to require +% their creation with the key |create-cell-nodes| of the keyword |\CodeBefore|. +% % \tikzset{highlight/.style={rectangle, % fill=red!15, -% blend mode = multiply, % rounded corners = 0.5 mm, % inner sep=1pt, % fit = #1}} @@ -4701,120 +4713,58 @@ version 2005/12/01 or later. % \begin{Verbatim} % \tikzset{highlight/.style={rectangle, % fill=red!15, -% ~emphase#blend mode = multiply@, % rounded corners = 0.5 mm, % inner sep=1pt, -% fit = ~#1}} +% fit=~#1}} % -% % $\begin{bNiceMatrix} +% ~emphase#\CodeBefore [create-cell-nodes] @ +% ~emphase# \tikz \node [highlight = (2-1) (2-3)] {} ; @ +% ~emphase# \Body @ % 0 & \Cdots & 0 \\ % 1 & \Cdots & 1 \\ % 0 & \Cdots & 0 \\ -% ~emphase#\CodeAfter \tikz \node [highlight = (2-1) (2-3)] {} ;@ % \end{bNiceMatrix}$ % \end{Verbatim} % \[\begin{bNiceMatrix} +% \CodeBefore [create-cell-nodes] +% \tikz \node [highlight = (2-1) (2-3)] {} ; +% \Body % 0 & \Cdots & 0 \\ % 1 & \Cdots & 1 \\ % 0 & \Cdots & 0 \\ -% \CodeAfter \tikz \node [highlight = (2-1) (2-3)] {} ; % \end{bNiceMatrix}\] % -% -% -% \vspace{1cm} -% We recall that, for a rectangle of merged cells (with the command |\Block|), a -% Tikz node is created for the set of merged cells with the name -% $i$|-|$j$-|block| where $i$ and $j$ are the number of the row and the number -% of the column of the upper left cell (where the command |\Block| has been -% issued). If the user has required the creation of the |medium| nodes, a node -% of this type is also created with a name suffixed by |-medium|. -% -% \medskip -% \begin{BVerbatim}[baseline=c,boxwidth=11.6cm] -% $\begin{pNiceMatrix}[margin,create-medium-nodes] -% \Block{3-3}<\Large>{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ -% & & & 0 \\ -% 0 & \Cdots& 0 & 0 -% \CodeAfter -% \tikz \node [~emphase#highlight = (1-1-block-medium)@] {} ; -% \end{pNiceMatrix}$ -% \end{BVerbatim} -% $\begin{pNiceMatrix}[margin,create-medium-nodes] -% \Block{3-3}<\Large>{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ -% & & & 0 \\ -% 0 & \Cdots& 0 & 0 -% \CodeAfter -% \tikz \node [highlight = (1-1-block-medium)] {} ; -% \end{pNiceMatrix}$ -% % % \vspace{1cm} -% Consider now the following matrix which we have named |example|. +% We consider now the following matrix. If we want to highlight each row of +% this matrix, we can use the previous technique three times. % -% \medskip % \begin{Verbatim} -% $\begin{pNiceArray}{ccc}[~emphase#name=example@,last-col,create-medium-nodes] -% a & a + b & a + b + c & L_1 \\ -% a & a & a + b & L_2 \\ -% a & a & a & L_3 -% \end{pNiceArray}$ -% \end{Verbatim} -% % \[\begin{pNiceArray}{ccc}[last-col] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% ~emphase# \node [highlight = (1-1) (1-3)] {} ;@ +% ~emphase# \node [highlight = (2-1) (2-3)] {} ;@ +% ~emphase# \node [highlight = (3-1) (3-3)] {} ;@ +% \end{tikzpicture} +% \Body % a & a + b & a + b + c & L_1 \\ % a & a & a + b & L_2 \\ % a & a & a & L_3 % \end{pNiceArray}\] -% -% \bigskip -% If we want to highlight each row of this matrix, we can use the previous -% technique three times. -% -% \begin{Verbatim} -% \tikzset{mes-options/.style={remember picture, -% overlay, -% name prefix = exemple-, -% highlight/.style = {fill = red!15, -% blend mode = multiply, -% inner sep = 0pt, -% fit = ~#1}}} -% \end{Verbatim} -% -% -% \tikzset{mes-options/.style={remember picture, -% overlay, -% name prefix = exemple-, -% highlight/.style = {fill = red!15, -% blend mode = multiply, -% inner sep = 0pt, -% fit = #1}}} -% -% \begin{Verbatim} -% \begin{tikzpicture}[mes-options] -% \node [highlight = (1-1) (1-3)] {} ; -% \node [highlight = (2-1) (2-3)] {} ; -% \node [highlight = (3-1) (3-3)] {} ; -% \end{tikzpicture} % \end{Verbatim} % % -% \medskip -% We obtain the following matrix. -% -% \[\begin{pNiceArray}{ccc}[ -% last-col, -% code-after = {\begin{tikzpicture}[every node/.style = {fill = red!15, -% blend mode = multiply, -% inner sep = 0pt}] -% \node [fit = (1-1) (1-3)] {} ; -% \node [fit = (2-1) (2-3)] {} ; -% \node [fit = (3-1) (3-3)] {} ; -% \end{tikzpicture}}] -% a & a + b & a + b + c & L_1\\ +% \[\begin{pNiceArray}{ccc}[last-col] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} +% \node [highlight = (1-1) (1-3)] {} ; +% \node [highlight = (2-1) (2-3)] {} ; +% \node [highlight = (3-1) (3-3)] {} ; +% \end{tikzpicture} +% \Body +% a & a + b & a + b + c & L_1 \\ % a & a & a + b & L_2 \\ % a & a & a & L_3 % \end{pNiceArray}\] @@ -4824,28 +4774,29 @@ version 2005/12/01 or later. % nodes'' instead of the ``normal nodes''. % % \begin{Verbatim} -% \begin{tikzpicture}[mes-options, ~emphase#name suffix = -medium@] -% \node [highlight = (1-1) (1-3)] {} ; -% \node [highlight = (2-1) (2-3)] {} ; -% \node [highlight = (3-1) (3-3)] {} ; -% \end{tikzpicture} +% \[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} ~emphase#[name suffix = -medium]@ +% \node [highlight = (1-1) (1-3)] {} ; +% \node [highlight = (2-1) (2-3)] {} ; +% \node [highlight = (3-1) (3-3)] {} ; +% \end{tikzpicture} +% \Body +% a & a + b & a + b + c & L_1 \\ +% a & a & a + b & L_2 \\ +% a & a & a & L_3 +% \end{pNiceArray}\] % \end{Verbatim} % -% \medskip -% We obtain the following matrix. -% -% \[\begin{pNiceArray}{ccc}[ -% last-col, -% create-medium-nodes, -% code-after = {\begin{tikzpicture}[highlight/.style = {fill = red!15, -% blend mode = multiply, -% inner sep = 0pt, -% fit = #1}, -% name suffix = -medium] -% \node [highlight = (1-1) (1-3)] {} ; -% \node [highlight = (2-1) (2-3)] {} ; -% \node [highlight = (3-1) (3-3)] {} ; -% \end{tikzpicture}}] +% +%\[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +% \CodeBefore [create-cell-nodes] +% \begin{tikzpicture} [name suffix = -medium] +% \node [highlight = (1-1) (1-3)] {} ; +% \node [highlight = (2-1) (2-3)] {} ; +% \node [highlight = (3-1) (3-3)] {} ; +% \end{tikzpicture} +% \Body % a & a + b & a + b + c & L_1 \\ % a & a & a + b & L_2 \\ % a & a & a & L_3 @@ -4858,10 +4809,8 @@ version 2005/12/01 or later. % matrices. % % The whole figure is an environment |{NiceArray}| and the three pairs of -% parenthesis have been added with |\SubMatrix| in the |code-before|. +% parenthesis have been added with |\SubMatrix| in the |\CodeBefore|. % -% You will find the LaTeX code of that figure in the source file of this -% document. % \tikzset{highlight/.style={rectangle, % fill=red!15, % rounded corners = 0.5 mm, @@ -4893,6 +4842,44 @@ version 2005/12/01 or later. % \tikz \draw [gray,shorten > = 1mm, shorten < = 1mm] (9-4.north) to [bend left] (4-9.west) ; % \end{NiceArray}\] % +% +% \vspace{1cm} +% \begin{Verbatim} +% \tikzset{highlight/.style={rectangle, +% fill=red!15, +% rounded corners = 0.5 mm, +% inner sep=1pt, +% fit=~#1}} +% \end{Verbatim} +% +% \begin{Verbatim}[formatcom = \small\color{gray}] +% \[\begin{NiceArray}{*{6}{c}~LetterAt{\hspace{6mm}}*{5}{c}}[nullify-dots] +% \CodeBefore [create-cell-nodes] +% \SubMatrix({2-7}{6-11}) +% \SubMatrix({7-2}{11-6}) +% \SubMatrix({7-7}{11-11}) +% \begin{tikzpicture} +% \node [highlight = (9-2) (9-6)] { } ; +% \node [highlight = (2-9) (6-9)] { } ; +% \end{tikzpicture} +% \Body +% & & & & & & & & \color{blue}\scriptstyle C_j \\ +% & & & & & & b_{11} & \Cdots & b_{1j} & \Cdots & b_{1n} \\ +% & & & & & & \Vdots & & \Vdots & & \Vdots \\ +% & & & & & & & & b_{kj} \\ +% & & & & & & & & \Vdots \\ +% & & & & & & b_{n1} & \Cdots & b_{nj} & \Cdots & b_{nn} \\[3mm] +% & a_{11} & \Cdots & & & a_{1n} \\ +% & \Vdots & & & & \Vdots & & & \Vdots \\ +% \color{blue}\scriptstyle L_i +% & a_{i1} & \Cdots & a_{ik} & \Cdots & a_{in} & \Cdots & & c_{ij} \\ +% & \Vdots & & & & \Vdots \\ +% & a_{n1} & \Cdots & & & a_{nn} \\ +% \CodeAfter +% \tikz \draw [gray,shorten > = 1mm, shorten < = 1mm] (9-4.north) to [bend left] (4-9.west) ; +% \end{NiceArray}\] +% \end{Verbatim} +% % %\section{Implementation} % @@ -5048,10 +5035,38 @@ version 2005/12/01 or later. \cs_if_exist:NT \rvtx@ifformat@geq { \bool_set_true:N \c_@@_revtex_bool } % \end{macrocode} % -% +% \bigskip % \begin{macrocode} \cs_generate_variant:Nn \tl_if_single_token_p:n { V } % \end{macrocode} +% +% \bigskip +% The following regex will be used to modify the preamble of the array when the +% key |colortbl-like| is used. +% \begin{macrocode} +\regex_const:Nn \c_@@_columncolor_regex { \c { columncolor } } +% \end{macrocode} +% +% \bigskip +% If the final user uses \pkg{nicematrix}, PGF/Tikz will write instruction +% |\pgfsyspdfmark| in the |aux| file. If he changes its mind and no longer loads +% \pkg{nicematrix}, an error may occur at the next compilation because of +% remanent instructions |\pgfsyspdfmark| in the |aux| file. With the following +% code, we try to avoid that situation. +% \begin{macrocode} +\cs_new_protected:Npn \@@_provide_pgfsyspdfmark: + { + \iow_now:Nn \@mainaux + { + \ExplSyntaxOn + \cs_if_free:NT \pgfsyspdfmark + { \cs_set_eq:NN \pgfsyspdfmark \@gobblethree } + \ExplSyntaxOff + } + \cs_gset_eq:NN \@@_provide_pgfsyspdfmark: \prg_do_nothing: + } +% \end{macrocode} +% % % \bigskip % We define a command |\iddots| similar to |\ddots| ($\ddots$) but with dots @@ -5342,53 +5357,33 @@ version 2005/12/01 or later. % |\c_@@_table_print_tl| when the version of \pkg{siunitx} is prior to 3.0. The % command |\@@_adapt_S_column| is used in the environment |{NiceArrayWithDelims}|. % \begin{macrocode} -\cs_set_protected:Npn \@@_adapt_S_column: +\AtBeginDocument { - \bool_if:NT \c_@@_siunitx_loaded_bool - { - \group_begin: - \@temptokena = { } - \cs_set_eq:NN \NC@find \prg_do_nothing: - \NC@rewrite@S { } - \tl_gset:NV \g_tmpa_tl \@temptokena - \group_end: - \tl_new:N \c_@@_table_collect_begin_tl - \tl_set:Nx \l_tmpa_tl { \tl_item:Nn \g_tmpa_tl 2 } - \tl_gset:Nx \c_@@_table_collect_begin_tl { \tl_item:Nn \l_tmpa_tl 1 } - \tl_new:N \c_@@_table_print_tl - \tl_gset:Nx \c_@@_table_print_tl { \tl_item:Nn \g_tmpa_tl { -1 } } - \cs_gset_eq:NN \@@_adapt_S_column: \prg_do_nothing: + \cs_set_eq:NN \@@_adapt_S_column: \prg_do_nothing: + \bool_lazy_and:nnT + { \c_@@_siunitx_loaded_bool } + { ! \cs_if_exist_p:N \siunitx_cell_begin:w } + { + \cs_set_protected:Npn \@@_adapt_S_column: + { + \group_begin: + \@temptokena = { } + \cs_set_eq:NN \NC@find \prg_do_nothing: + \NC@rewrite@S { } + \tl_gset:NV \g_tmpa_tl \@temptokena + \group_end: + \tl_new:N \c_@@_table_collect_begin_tl + \tl_set:Nx \l_tmpa_tl { \tl_item:Nn \g_tmpa_tl 2 } + \tl_gset:Nx \c_@@_table_collect_begin_tl { \tl_item:Nn \l_tmpa_tl 1 } + \tl_new:N \c_@@_table_print_tl + \tl_gset:Nx \c_@@_table_print_tl { \tl_item:Nn \g_tmpa_tl { -1 } } + \cs_gset_eq:NN \@@_adapt_S_column: \prg_do_nothing: + } } } % \end{macrocode} % % -% \bigskip -% The following regex will be used to modify the preamble of the array when the -% key |colortbl-like| is used. -% \begin{macrocode} -\regex_const:Nn \c_@@_columncolor_regex { \c { columncolor } } -% \end{macrocode} -% -% \bigskip -% If the final user uses \pkg{nicematrix}, PGF/Tikz will write instruction -% |\pgfsyspdfmark| in the |aux| file. If he changes its mind and no longer loads -% \pkg{nicematrix}, an error may occur at the next compilation because of -% remanent instructions |\pgfsyspdfmark| in the |aux| file. With the following -% code, we try to avoid that situation. -% \begin{macrocode} -\cs_new_protected:Npn \@@_provide_pgfsyspdfmark: - { - \iow_now:Nn \@mainaux - { - \ExplSyntaxOn - \cs_if_free:NT \pgfsyspdfmark - { \cs_set_eq:NN \pgfsyspdfmark \@gobblethree } - \ExplSyntaxOff - } - \cs_gset_eq:NN \@@_provide_pgfsyspdfmark: \prg_do_nothing: - } -% \end{macrocode} % % \bigskip % \subsection*{Parameters} @@ -5550,6 +5545,15 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip +% We will write in |\g_@@_aux_tl| all the instructions that we have to write on +% the |aux| file for the current environment. The contain of that token list +% will be written on the |aux| file at the end of the environment (in an +% instruction |\tl_gset:cn { c_@@_ \int_use:N \g_@@_env_int _ tl }|). +% \begin{macrocode} +\tl_new:N \g_@@_aux_tl +% \end{macrocode} +% +% \bigskip % \begin{macrocode} \cs_new_protected:Npn \@@_test_if_math_mode: { @@ -5795,6 +5799,17 @@ version 2005/12/01 or later. % \end{macrocode} % % \medskip +% The sequence |\g_@@_multicolumn_cells_seq| will contain the list of the cells +% of the array where a command |\multicolumn{|$n$|}{...}{...}| with $n>1$ is +% issued. In |\g_@@_multicolumn_sizes_seq|, the ``sizes'' (that is to say the +% values of $n$) correspondant will be stored. These lists will be used for the +% creation of the ``medium nodes'' (if they are created). +% \begin{macrocode} +\seq_new:N \g_@@_multicolumn_cells_seq +\seq_new:N \g_@@_multicolumn_sizes_seq +% \end{macrocode} +% +% \medskip % The following counters will be used when searching the extremities of a dotted % line (we need these counters because of the potential ``open'' lines in the % |\SubMatrix|---the |\SubMatrix| in the |code-before|). @@ -5854,7 +5869,7 @@ version 2005/12/01 or later. % \medskip % The parameters of position of the label of a block. For the horizontal % position, the possible values are |c|, |r| and |l|. For the vertical position, -% the possible values are |c|, |t| and |b|. Of course, it would be intesting to +% the possible values are |c|, |t| and |b|. Of course, it would be interesting to % program a key |T| and a key |B|. % \begin{macrocode} \tl_new:N \l_@@_hpos_of_block_tl @@ -7075,6 +7090,8 @@ version 2005/12/01 or later. \endpgfpicture } % \end{macrocode} +% Remark: If the key |recreate-cell-nodes| of the |\CodeBefore| is used, then we +% will add some lines to that command. % % % \interitem @@ -7244,7 +7261,7 @@ version 2005/12/01 or later. % \medskip % As its name says, the following command is a patch for the command % |\@@_node_for_cell:|. This patch will be appended on the left of -% |\@@_noce_for_the_cell:| when the construction of the cell nodes (of the forme +% |\@@_node_for_the_cell:| when the construction of the cell nodes (of the form % |(i-j)|) in the |\CodeBefore| is required. % \begin{macrocode} \cs_new_protected:Npn \@@_patch_node_for_cell:n #1 @@ -7278,6 +7295,8 @@ version 2005/12/01 or later. } % \end{macrocode} % +% \bigskip +% We have no explanation for the different behaviour between the TeX engines... % \begin{macrocode} \bool_lazy_or:nnTF \sys_if_engine_xetex_p: \sys_if_output_dvi_p: { @@ -7546,12 +7565,6 @@ version 2005/12/01 or later. \bool_if:NT \c_@@_booktabs_loaded_bool { \tl_put_left:Nn \@BTnormal \@@_create_row_node: } \box_clear_new:N \l_@@_cell_box - \cs_if_exist:NT \theiRow - { \int_set_eq:NN \l_@@_old_iRow_int \c@iRow } - \int_gzero_new:N \c@iRow - \cs_if_exist:NT \thejCol - { \int_set_eq:NN \l_@@_old_jCol_int \c@jCol } - \int_gzero_new:N \c@jCol \normalbaselines % \end{macrocode} % If the option |small| is used, we have to do some tuning. In particular, we @@ -7567,6 +7580,17 @@ version 2005/12/01 or later. } % \end{macrocode} % +% \bigskip +% \begin{macrocode} + \bool_if:NT \g_@@_recreate_cell_nodes_bool + { + \tl_put_right:Nn \@@_begin_of_row: + { + \pgfsys@markposition + { \@@_env: - row - \int_use:N \c@iRow - base } + } + } +% \end{macrocode} % % \bigskip % The environment |{array}| uses internally the command |\ialign|. We change the @@ -7662,8 +7686,8 @@ version 2005/12/01 or later. % values of $n$) correspondant will be stored. These lists will be used for the % creation of the ``medium nodes'' (if they are created). % \begin{macrocode} - \seq_gclear_new:N \g_@@_multicolumn_cells_seq - \seq_gclear_new:N \g_@@_multicolumn_sizes_seq + \seq_gclear:N \g_@@_multicolumn_cells_seq + \seq_gclear:N \g_@@_multicolumn_sizes_seq % \end{macrocode} % % @@ -7724,18 +7748,45 @@ version 2005/12/01 or later. % % % \bigskip +% The command |\@@_pre_array:| will be executed after analyse of the keys of the +% environment. % \begin{macrocode} \cs_new_protected:Npn \@@_pre_array: { - \seq_gclear:N \g_@@_submatrix_seq - \bool_if:NT \l_@@_code_before_bool \@@_exec_code_before: % \end{macrocode} % -% A value of $-1$ for the counter |\l_@@_last_row_int| means that the user has -% used the option |last-row| without value, that is to say without specifying -% the number of that last row. In this case, we try to read that value from the -% |aux| file (if it has been written on a previous run). +% \begin{macrocode} + \cs_if_exist:NT \theiRow { \int_set_eq:NN \l_@@_old_iRow_int \c@iRow } + \int_gzero_new:N \c@iRow + \cs_if_exist:NT \thejCol { \int_set_eq:NN \l_@@_old_jCol_int \c@jCol } + \int_gzero_new:N \c@jCol +% \end{macrocode} +% +% \bigskip +% We recall that |\l_@@_last_row_int| and |\l_@@_last_column_int| are \emph{not} +% the numbers of the last row and last column of the array. There are only the +% values of the keys |last-row| and |last-column| (maybe the user has provided +% erroneous values). The meaning of that counters does not change during the +% environment of \pkg{nicematrix}. There is only a slight adjustment: if the +% user have used one of those keys without value, we provide now the right value +% as read on the |aux| file (of course, it's possible only after the first compilation). +% \begin{macrocode} + \int_compare:nNnT \l_@@_last_row_int = { -1 } + { + \bool_set_true:N \l_@@_last_row_without_value_bool + \bool_if:NT \g_@@_aux_found_bool + { \int_set:Nn \l_@@_last_row_int { \seq_item:Nn \c_@@_size_seq 3 } } + } + \int_compare:nNnT \l_@@_last_col_int = { -1 } + { + \bool_if:NT \g_@@_aux_found_bool + { \int_set:Nn \l_@@_last_col_int { \seq_item:Nn \c_@@_size_seq 6 } } + } +% \end{macrocode} % +% \bigskip +% If there is a exterior row, we patch a command used in |\@@_Cell:| in order to +% keep track of some dimensions needed to the construction of that ``last row''. % \begin{macrocode} \int_compare:nNnT \l_@@_last_row_int > { -2 } { @@ -7747,58 +7798,36 @@ version 2005/12/01 or later. { \dim_max:nn \g_@@_dp_last_row_dim { \box_dp:N \l_@@_cell_box } } } } - \int_compare:nNnT \l_@@_last_row_int = { -1 } - { - \bool_set_true:N \l_@@_last_row_without_value_bool % \end{macrocode} -% A value based on the name is more reliable than a value based on the number of -% the environment. +% +% \bigskip % \begin{macrocode} - \str_if_empty:NTF \l_@@_name_str - { - \cs_if_exist:cT { @@_last_row_ \int_use:N \g_@@_env_int } - { - \int_set:Nn \l_@@_last_row_int - { \use:c { @@_last_row_ \int_use:N \g_@@_env_int } } - } - } - { - \cs_if_exist:cT { @@_last_row_ \l_@@_name_str } - { - \int_set:Nn \l_@@_last_row_int - { \use:c { @@_last_row_ \l_@@_name_str } } - } - } - } + \seq_gclear:N \g_@@_submatrix_seq % \end{macrocode} -% -% A value of $-1$ for the counter |\l_@@_last_col_int| means that the user has -% used the option |last-col| without value, that is to say without specifying -% the number of that last column. In this case, we try to read that value from -% the |aux| file (if it has been written on a previous run). +% +% \bigskip +% Now the |\CodeBefore|. +% \begin{macrocode} + \bool_if:NT \l_@@_code_before_bool \@@_exec_code_before: +% \end{macrocode} +% +% \bigskip +% The value of |\g_@@_pos_of_blocks_seq| has been written on the |aux| file and +% loaded before the (potential) execution of the |\CodeBefore|. Now, we clear +% that variable because it will be reconstructed during the creation of the +% array. % \begin{macrocode} - \int_compare:nNnT \l_@@_last_col_int = { -1 } - { - \str_if_empty:NTF \l_@@_name_str - { - \cs_if_exist:cT { @@_last_col_ \int_use:N \g_@@_env_int } - { - \int_set:Nn \l_@@_last_col_int - { \use:c { @@_last_col_ \int_use:N \g_@@_env_int } } - } - } - { - \cs_if_exist:cT { @@_last_col_ \l_@@_name_str } - { - \int_set:Nn \l_@@_last_col_int - { \use:c { @@_last_col_ \l_@@_name_str } } - } - } - } + \seq_gclear:N \g_@@_pos_of_blocks_seq % \end{macrocode} +% Idem for other sequences written on the |aux| file. +% \begin{macrocode} + \seq_gclear_new:N \g_@@_multicolumn_cells_seq + \seq_gclear_new:N \g_@@_multicolumn_sizes_seq +% \end{macrocode} +% % % \interitem -% The code in |\@@_pre_array_ii:| is used only by |{NiceArrayWithDelims}|. +% The code in |\@@_pre_array_ii:| is used only here. % \begin{macrocode} \@@_pre_array_ii: % \end{macrocode} @@ -7896,24 +7925,17 @@ version 2005/12/01 or later. % \end{macrocode} % First, we give values to the LaTeX counters |iRow| and |jCol|. We remind that, % in the |code-before| (and in the |\CodeAfter|) they represent the numbers of -% rows and columns of the array (without the potential last row and last column). +% rows and columns of the array (without the potential last row and last +% column). The value of |\g_@@_row_total_int| is the number of the last row +% (with potentially a last exterior row) and |\g_@@_col_total_int| is the number +% of the last column (with potentially a last exterior column). % \begin{macrocode} - \int_zero_new:N \c@iRow - \int_set:Nn \c@iRow - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 2 } - \int_zero_new:N \c@jCol - \int_set:Nn \c@jCol - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 4 } -% \end{macrocode} -% We have to adjust the values of |\c@iRow| and |\c@jCol| to take into account -% the potential last row and last column. A value of $-2$ for -% |\l_@@_last_row_int| means that there is no last row. Idem for the columns. -% \begin{macrocode} - \int_compare:nNnF \l_@@_last_row_int = { -2 } - { \int_decr:N \c@iRow } - \int_compare:nNnF \l_@@_last_col_int = { -2 } - { \int_decr:N \c@jCol } + \int_set:Nn \c@iRow { \seq_item:Nn \c_@@_size_seq 2 } + \int_set:Nn \c@jCol { \seq_item:Nn \c_@@_size_seq 5 } + \int_set_eq:NN \g_@@_row_total_int { \seq_item:Nn \c_@@_size_seq 3 } + \int_set_eq:NN \g_@@_col_total_int { \seq_item:Nn \c_@@_size_seq 6 } % \end{macrocode} +% % % Now, we will create all the |col| nodes and |row| nodes with the informations % written in the |aux| file. You use the technique described in the page~1229 of @@ -7926,9 +7948,7 @@ version 2005/12/01 or later. % \end{macrocode} % First, the recreation of the |row| nodes. % \begin{macrocode} - \int_step_inline:nnn - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 1 } - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 2 + 1 } + \int_step_inline:nnn \l_@@_first_row_int { \g_@@_row_total_int + 1 } { \pgfsys@getposition { \@@_env: - row - ##1 } \@@_node_position: \pgfcoordinate { \@@_env: - row - ##1 } @@ -7937,9 +7957,7 @@ version 2005/12/01 or later. % \end{macrocode} % Now, the recreation of the |col| nodes. % \begin{macrocode} - \int_step_inline:nnn - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 3 } - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 4 + 1 } + \int_step_inline:nnn \l_@@_first_col_int { \g_@@_col_total_int + 1 } { \pgfsys@getposition { \@@_env: - col - ##1 } \@@_node_position: \pgfcoordinate { \@@_env: - col - ##1 } @@ -7952,8 +7970,9 @@ version 2005/12/01 or later. \@@_create_diag_nodes: % \end{macrocode} % -% \medskip -% Now, the creation of the cell nodes |(i-j)|. +% \medskip +% Now, the creation of the cell nodes |(i-j)|, and, maybe also the ``medium +% nodes'' and the ``large nodes''. % \begin{macrocode} \bool_if:NT \g_@@_recreate_cell_nodes_bool \@@_recreate_cell_nodes: \endpgfpicture @@ -7977,18 +7996,6 @@ version 2005/12/01 or later. \cs_set_eq:NN \columncolor \@@_columncolor \cs_set_eq:NN \chessboardcolors \@@_chessboardcolors \cs_set_eq:NN \SubMatrix \@@_SubMatrix_in_code_before -% \end{macrocode} -% The list of the cells which are in the (empty) corners is stored in the |aux| -% file because we have to know it before the execution of the |\CodeBefore| (the -% commands which color the cells, rows and columns won't color the cells which -% are in the corners). -% \begin{macrocode} - \seq_if_exist:cT - { c_@@_corners_cells_ \int_use:N \g_@@_env_int _ seq } - { - \seq_set_eq:Nc \l_@@_corners_cells_seq - { c_@@_corners_cells_ \int_use:N \g_@@_env_int _ seq } - } } % \end{macrocode} % @@ -8058,7 +8065,7 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_CodeBefore:w #1 \q_stop { - \seq_if_exist:cT { @@_size_ \int_use:N \g_@@_env_int _ seq } + \bool_if:NT \g_@@_aux_found_bool { \@@_pre_code_before: #1 @@ -8074,17 +8081,16 @@ version 2005/12/01 or later. % nodes and |diag| nodes are available in that |\CodeBefore|. With the key % |create-cell-nodes|, the cell nodes, that is to say the nodes of the form % |(i-j)| (but not the extra nodes) are also available because those nodes also -% are recreated and that recreation is done by the following command. +% are recreated and that recreation is done by the following command. % \begin{macrocode} \cs_new_protected:Npn \@@_recreate_cell_nodes: { - \int_step_inline:nnn - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 1 } - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 2 } + \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int { - \int_step_inline:nnn - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 3 } - { \seq_item:cn { @@_size_ \int_use:N \g_@@_env_int _ seq } 4 } + \pgfsys@getposition { \@@_env: - ##1 - base } \@@_node_position: + \pgfcoordinate { \@@_env: - row - ##1 - base } + { \pgfpointdiff \@@_picture_position: \@@_node_position: } + \int_step_inline:nnn \l_@@_first_col_int \g_@@_col_total_int { \cs_if_exist:cT { pgf @ sys @ pdf @ mark @ pos @ \@@_env: - ##1 - ####1 - NW } @@ -8102,6 +8108,7 @@ version 2005/12/01 or later. } } } + \@@_create_extra_nodes: } % \end{macrocode} % @@ -8116,6 +8123,7 @@ version 2005/12/01 or later. \@@_provide_pgfsyspdfmark: \bool_if:NT \c_@@_footnote_bool \savenotes % \end{macrocode} +% % The aim of the following |\bgroup| (the corresponding |\egroup| is, of course, % at the end of the environment) is to be able to put an exposant to a matrix in % a mathematical formula. @@ -8198,14 +8206,31 @@ version 2005/12/01 or later. % \begin{macrocode} \seq_gclear:N \g_@@_pos_of_stroken_blocks_seq \seq_gclear:N \g_@@_pos_of_xdots_seq + \tl_gclear_new:N \g_@@_code_before_tl +% \end{macrocode} +% +% \bigskip +% We load all the informations written in the |aux| file during previous +% compilations corresponding to the current environment. +% \begin{macrocode} + \bool_gset_false:N \g_@@_aux_found_bool + \tl_if_exist:cT { c_@@ _ \int_use:N \g_@@_env_int _ tl } + { + \bool_gset_true:N \g_@@_aux_found_bool + \use:c { c_@@ _ \int_use:N \g_@@_env_int _ tl } + } +% \end{macrocode} +% Now, we prepare the token list for the instructions that we will have to write +% on the |aux| file at the end of the environment. +% \begin{macrocode} + \tl_gclear:N \g_@@_aux_tl % \end{macrocode} % % \begin{macrocode} - \tl_if_exist:cT { g_@@_code_before_ \int_use:N \g_@@_env_int _ tl } + \tl_if_empty:NF \g_@@_code_before_tl { \bool_set_true:N \l_@@_code_before_bool - \exp_args:NNv \tl_put_right:Nn \l_@@_code_before_tl - { g_@@_code_before_ \int_use:N \g_@@_env_int _ tl } + \tl_put_right:NV \l_@@_code_before_tl \g_@@_code_before_tl } % \end{macrocode} % @@ -8431,6 +8456,23 @@ version 2005/12/01 or later. % a mathematical formula. % \begin{macrocode} \egroup +% \end{macrocode} +% +% \bigskip +% We want to write on the |aux| file all the informations corresponding to the +% current environment. +% \begin{macrocode} + \iow_now:Nn \@mainaux { \ExplSyntaxOn } + \iow_now:Nx \@mainaux + { + \tl_gset:cn { c_@@_ \int_use:N \g_@@_env_int _ tl } + \iow_newline: { \iow_newline: \exp_not:V \g_@@_aux_tl } + } + \iow_now:Nn \@mainaux { \ExplSyntaxOff } +% \end{macrocode} +% +% \bigskip +% \begin{macrocode} \bool_if:NT \c_@@_footnote_bool \endsavenotes } % \end{macrocode} @@ -8490,7 +8532,7 @@ version 2005/12/01 or later. \@tempswatrue % \end{macrocode} % The following line actually does the expansion (it's has been copied from -% |array.sty|). +% |array.sty|). The expanded version is still in |\@temptokena|. % \begin{macrocode} \@whilesw \if@tempswa \fi { \@tempswafalse \the \NC@list } % \end{macrocode} @@ -8505,7 +8547,7 @@ version 2005/12/01 or later. % |\@@_patch_preamble:n|. In the same time, we will count the columns with the % counter |\c@jCol|. % \begin{macrocode} - \int_gzero_new:N \c@jCol + \int_gzero:N \c@jCol \tl_gclear:N \g_@@_preamble_tl \tl_if_eq:NnTF \l_@@_vlines_clist { all } { @@ -9892,102 +9934,58 @@ version 2005/12/01 or later. % % If we are in an environment without preamble (like |{NiceMatrix}| or % |{pNiceMatrix}|) and if the option |last-col| has been used without value -% we fix the real value of |\l_@@_last_col_int|. +% we also fix the real value of |\l_@@_last_col_int|. % \begin{macrocode} \bool_if:NT \l_@@_last_col_without_value_bool - { - \dim_set_eq:NN \l_@@_last_col_int \g_@@_col_total_int - \iow_shipout:Nn \@mainaux \ExplSyntaxOn - \iow_shipout:Nx \@mainaux - { - \cs_gset:cpn { @@_last_col_ \int_use:N \g_@@_env_int } - { \int_use:N \g_@@_col_total_int } - } - \str_if_empty:NF \l_@@_name_str - { - \iow_shipout:Nx \@mainaux - { - \cs_gset:cpn { @@_last_col_ \l_@@_name_str } - { \int_use:N \g_@@_col_total_int } - } - } - \iow_shipout:Nn \@mainaux \ExplSyntaxOff - } + { \int_set_eq:NN \l_@@_last_col_int \g_@@_col_total_int } % \end{macrocode} % -% It's also time to give to |\l_@@_last_row_int| its real value. But, if the -% user had used the option |last-row| without value, we write in the |aux| file -% the number of that last row for the next run. +% \medskip +% It's also time to give to |\l_@@_last_row_int| its real value. % \begin{macrocode} \bool_if:NT \l_@@_last_row_without_value_bool - { - \dim_set_eq:NN \l_@@_last_row_int \g_@@_row_total_int -% \end{macrocode} -% If the option |light-syntax| is used, we have nothing to write since, in this -% case, the number of rows is directly determined. -% \begin{macrocode} - \bool_if:NF \l_@@_light_syntax_bool - { - \iow_shipout:Nn \@mainaux \ExplSyntaxOn - \iow_shipout:Nx \@mainaux - { - \cs_gset:cpn { @@_last_row_ \int_use:N \g_@@_env_int } - { \int_use:N \g_@@_row_total_int } - } + { \int_set_eq:NN \l_@@_last_row_int \g_@@_row_total_int } % \end{macrocode} -% If the environment has a name, we also write a value based on the name -% because it's more reliable than a value based on the number of the -% environment. +% +% \medskip % \begin{macrocode} - \str_if_empty:NF \l_@@_name_str - { - \iow_shipout:Nx \@mainaux - { - \cs_gset:cpn { @@_last_row_ \l_@@_name_str } - { \int_use:N \g_@@_row_total_int } - } - } - \iow_shipout:Nn \@mainaux \ExplSyntaxOff + \tl_gput_right:Nx \g_@@_aux_tl + { + \seq_gset_from_clist:Nn \exp_not:N \c_@@_size_seq + { + \int_use:N \l_@@_first_row_int , + \int_use:N \c@iRow , + \int_use:N \g_@@_row_total_int , + \int_use:N \l_@@_first_col_int , + \int_use:N \c@jCol , + \int_use:N \g_@@_col_total_int } + \iow_newline: } % \end{macrocode} -% -% If the key |code-before| is used, we have to write on the |aux| file the actual -% size of the array and other informations. -% \begin{macrocode} - \bool_if:NT \l_@@_code_before_bool - { - \iow_now:Nn \@mainaux \ExplSyntaxOn - \iow_now:Nx \@mainaux - { \seq_clear_new:c { @@_size _ \int_use:N \g_@@_env_int _ seq } } - \iow_now:Nx \@mainaux - { - \seq_gset_from_clist:cn { @@_size _ \int_use:N \g_@@_env_int _ seq } - { - \int_use:N \l_@@_first_row_int , - \int_use:N \g_@@_row_total_int , - \int_use:N \l_@@_first_col_int , -% \end{macrocode} -% If the user has used a key |last-row| in an environment with preamble (like -% |{pNiceArray}|) and that that last row has not been found, we have to -% increment the value because it will be decreased when used in the |code-before|. -% \begin{macrocode} - \bool_lazy_and:nnTF - { \int_compare_p:nNn \l_@@_last_col_int > { -2 } } - { \bool_not_p:n \g_@@_last_col_found_bool } - \@@_succ:n - \int_use:N - \g_@@_col_total_int - } -% \end{macrocode} % We write also the potential content of |\g_@@_pos_of_blocks_seq| (it will be % useful if the command |\rowcolors| is used with the key |respect-blocks|). % \begin{macrocode} - \seq_gset_from_clist:cn - { c_@@_pos_of_blocks_ \int_use:N \g_@@_env_int _ seq } + \seq_if_empty:NF \g_@@_pos_of_blocks_seq + { + \tl_gput_right:Nx \g_@@_aux_tl + { + \seq_gset_from_clist:Nn \exp_not:N \g_@@_pos_of_blocks_seq { \seq_use:Nnnn \g_@@_pos_of_blocks_seq , , , } + \iow_newline: + } + } + \seq_if_empty:NF \g_@@_multicolumn_cells_seq + { + \tl_gput_right:Nx \g_@@_aux_tl + { + \seq_gset_from_clist:Nn \exp_not:N \g_@@_multicolumn_cells_seq + { \seq_use:Nnnn \g_@@_multicolumn_cells_seq , , , } + \iow_newline: + \seq_gset_from_clist:Nn \exp_not:N \g_@@_multicolumn_sizes_seq + { \seq_use:Nnnn \g_@@_multicolumn_sizes_seq , , , } + \iow_newline: } - \iow_now:Nn \@mainaux \ExplSyntaxOff } % \end{macrocode} % @@ -10166,14 +10164,12 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_set_protected:Npn \rectanglecolor { } \cs_set_protected:Npn \columncolor { } - \iow_now:Nn \@mainaux \ExplSyntaxOn - \iow_now:Nx \@mainaux + \tl_gput_right:Nx \g_@@_aux_tl { - \tl_gset:cn - { g_@@_code_before_ \int_use:N \g_@@_env_int _ tl } + \tl_gset:Nn \exp_not:N \g_@@_code_before_tl { \exp_not:V \g_nicematrix_code_before_tl } + \iow_newline: } - \iow_now:Nn \@mainaux \ExplSyntaxOff \bool_set_true:N \l_@@_code_before_bool } % \end{macrocode} @@ -12400,19 +12396,14 @@ version 2005/12/01 or later. % color or of the second color. % \begin{macrocode} \bool_set_true:N \l_tmpa_bool - \bool_lazy_and:nnT - \l_@@_respect_blocks_bool - { - \cs_if_exist_p:c - { c_@@_pos_of_blocks_ \int_use:N \g_@@_env_int _ seq } } + \bool_if:NT \l_@@_respect_blocks_bool { % \end{macrocode} % We don't want to take into account a block which is completely in the ``first % column'' of (number $0$) or in the ``last column'' and that's why we filter % the sequence of the blocks (in a the sequence |\l_tmpa_seq|). % \begin{macrocode} - \seq_set_eq:Nc \l_tmpb_seq - { c_@@_pos_of_blocks_ \int_use:N \g_@@_env_int _ seq } + \seq_set_eq:NN \l_tmpb_seq \g_@@_pos_of_blocks_seq \seq_set_filter:NNn \l_tmpa_seq \l_tmpb_seq { \@@_not_in_exterior_p:nnnn ##1 } } @@ -12443,12 +12434,7 @@ version 2005/12/01 or later. % If the key |respect-blocks| is in force, we have to adjust that value (of % course). % \begin{macrocode} - \bool_lazy_and:nnT - \l_@@_respect_blocks_bool - { - \cs_if_exist_p:c - { c_@@_pos_of_blocks_ \int_use:N \g_@@_env_int _ seq } - } + \bool_if:NT \l_@@_respect_blocks_bool { \seq_set_filter:NNn \l_tmpb_seq \l_tmpa_seq { \@@_intersect_our_row_p:nnnn ####1 } @@ -13299,14 +13285,12 @@ version 2005/12/01 or later. % commands which color the |rows|, |columns| and |cells| must not color the % cells in the corners. % \begin{macrocode} - \iow_now:Nn \@mainaux \ExplSyntaxOn - \iow_now:Nx \@mainaux + \tl_gput_right:Nx \g_@@_aux_tl { - \seq_gset_from_clist:cn - { c_@@_corners_cells_ \int_use:N \g_@@_env_int _ seq } + \seq_set_from_clist:Nn \exp_not:N \l_@@_corners_cells_seq { \seq_use:Nnnn \l_@@_corners_cells_seq , , , } + \iow_newline: } - \iow_now:Nn \@mainaux \ExplSyntaxOff } } % \end{macrocode} @@ -17481,6 +17465,12 @@ version 2005/12/01 or later. % The version 5.15b is compatible with the version 3.0+ of \pkg{siunitx} % (previous versions were not). % +% % \subsection*{Changes between versions 5.15 and 5.16} +% +% It's now possible to use the cells corresponding to the contents of the nodes +% (of the form |i-j|) in the |\CodeBefore| when the key |create-cell-nodes| of +% that |\CodeBefore| is used. The medium and the large nodes are also available +% if the corresponding keys are used. % % \PrintIndex % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index b096ea1e0f..40b867d72e 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ -- cgit v1.2.3