texlive[71616] Master/texmf-dist: nicematrix (24jun24)
commits+karl at tug.org
commits+karl at tug.org
Mon Jun 24 21:08:03 CEST 2024
Revision: 71616
https://tug.org/svn/texlive?view=revision&revision=71616
Author: karl
Date: 2024-06-24 21:08:03 +0200 (Mon, 24 Jun 2024)
Log Message:
-----------
nicematrix (24jun24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex 2024-06-24 19:07:54 UTC (rev 71615)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix-french.tex 2024-06-24 19:08:03 UTC (rev 71616)
@@ -1082,6 +1082,7 @@
\subsection{\textbackslash\textbackslash\ et \& dans les blocs}
\index{ampersand-in-blocks}
+\index{\&-in-blocks}
\colorbox{yellow!50}{\bfseries Nouveau 6.28}\par\nobreak
@@ -1096,14 +1097,14 @@
\item Pour |\\|, il n'y a pas d'autres restrictions. On peut utiliser
|\\| dans un bloc pour composer du texte sur plusieurs lignes.
-\item Pour pouvoir utiliser |&|, la clé |ampersand-in-blocks| doit avoir été
-activée. Le bloc est alors divisé en sous-blocs comme illustré ci-desous.
-Attention toutefois : quand |ampersand-in-blocks| est utilisée, l'argument
-(principal) de la commande |\Block| est découpé syntaxiquement au niveau des
-esperluettes |&|, celles entre accolades sont masquées mais pas celles dans un
-environnement.\footnote{On ne peut donc écrire :
- |\Block[ampersand-in-blocks]{}{\begin{array}{cc}1&2\end{array}}|. Bien sûr, on
- peut le faire sans la clé |ampersand-in-blocks|.}
+\item Pour pouvoir utiliser |&|, la clé |ampersand-in-blocks| (alias:
+|&-in-blocks|) doit avoir été activée. Le bloc est alors divisé en sous-blocs
+comme illustré ci-dessous. Attention toutefois : quand |ampersand-in-blocks| est
+utilisée, l'argument (principal) de la commande |\Block| est découpé
+syntaxiquement au niveau des esperluettes |&|, celles entre accolades sont
+masquées mais pas celles dans un environnement.\footnote{On ne peut donc écrire
+ : |\Block[ampersand-in-blocks]{}{\begin{array}{cc}1&2\end{array}}|. Bien sûr,
+ on peut le faire sans la clé |ampersand-in-blocks|.}
\end{itemize}
\bigskip
@@ -1153,6 +1154,7 @@
5 & un & deux & trois & quatre & cinq \\
\end{NiceTabular}
+\medskip
Dans ce codage, il s'agit de blocs de taille |1-5| qui sont coupés en trois et
quatre sous-blocs.
@@ -2616,7 +2618,7 @@
\item \DefinitionCommande{rowcolor} à utiliser dans une case et qui colorie le
reste de la rangée;\footnote{Si vous souhaitez une commande pour colorier les
$n$~rangées suivantes, considérez la commande |\RowStyle| et sa clé
- |rowcolor|, p.~\pageref{RowStyle}}
+ |rowcolor|, p.~\pageref{RowStyle}.}
\item \DefinitionCommande{columncolor} à utiliser dans le préambule du tableau
de la même manière que la commande éponyme de \pkg{colortbl} (néanmoins,
contrairement à la commande |\columncolor| de \pkg{colortbl}, celle de
@@ -4635,12 +4637,10 @@
séparés par une virgule (comme avec l'option |multiple| de \pkg{footmisc} pour
les notes de pied de page).
-\item Si une commande |\tabularnote{...}| se trouve exactement à la fin d'une case
-(sans aucun espace après), l'appel de note est composé en débordement vers la
-droite (cela peut permettre de mieux conserver l'alignement des contenus d'une
-colonne). Depuis la version 6.20a, ce comportement n'a lieu que si le mode
-l'alignement de la case est |c| ou |r| (alignement horizontal centré ou en
-butée à droite).
+\item Si une commande |\tabularnote{...}| se trouve exactement à la fin d'une
+case (sans aucun espace après) et que le mode d'alignement de la colonne est |c|
+ou~|r|, l'appel de note est composé en débordement vers la droite (cela peut
+permettre de mieux conserver l'alignement des contenus d'une colonne).
\item Si la clé |notes/para| est utilisée, les notes sont composées à la fin du
tableau en un seul paragraphe.
@@ -4702,7 +4702,7 @@
Nightingale\emph{\tabularnote{Souvent considérée comme la première infirmière.}%
\tabularnote{Surnommée «la Dame à la Lampe».}}
& Florence\emph{\tabularnote{Cette note est commune à deux appels de notes.}} & 90 \\
-Schœlcher & Victor & 89\emph{\tabularnote{L’appel de note déborde à droite.}} \\
+Schœlcher & Victor & 89\emph{\tabularnote{L’appel de note déborde à droite.}}\\
Touchet & Marie\emph{\tabularnote{Cette note est commune à deux appels de notes.}} & 89 \\
Wallis & John & 87 \\
\bottomrule
@@ -5475,16 +5475,16 @@
\smallskip
\index{name!clé pour un environnement}
-Il est néanmoins recommandé de passer plutôt par la clé |name|\footnote{Depuis
- la version 6.20a, la valeur passée à cette clé est \emph{développée}, au sens
- de TeX.}. Celle-ci permet de donner un nom à l'environnement. Une fois
-l'environnement nommé, les nœuds sont accessibles à travers les noms
-«\textsl{nom}-$i$-$j$» où \textsl{nom} est le nom donné au tableau et $i$ et $j$
-les numéros de rangée et de colonne de la case considérée. On peut les utiliser
-avec \textsc{pgf} mais l'utilisateur final préférera sans doute utiliser TikZ
-(qui est une sur-couche de \textsc{pgf}). Il faut néanmoins se souvenir que
-\pkg{nicematrix} ne charge pas TikZ par défaut. Dans les exemples qui suivent,
-on suppose que TikZ a été chargé par l'utilisateur.
+Il est néanmoins recommandé de passer plutôt par la clé |name|\footnote{La
+ valeur passée à la clé |name| est \emph{développée}, au sens de TeX.}.
+Celle-ci permet de donner un nom à l'environnement. Une fois l'environnement
+nommé, les nœuds sont accessibles à travers les noms «\textsl{nom}-$i$-$j$» où
+\textsl{nom} est le nom donné au tableau et $i$ et $j$ les numéros de rangée et
+de colonne de la case considérée. On peut les utiliser avec \textsc{pgf} mais
+l'utilisateur final préférera sans doute utiliser TikZ (qui est une sur-couche
+de \textsc{pgf}). Il faut néanmoins se souvenir que \pkg{nicematrix} ne charge
+pas TikZ par défaut. Dans les exemples qui suivent, on suppose que TikZ a été
+chargé par l'utilisateur.
\medskip
\begin{Code}[width=11cm]
@@ -7620,6 +7620,3 @@
% End:
-
-
-
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex 2024-06-24 19:07:54 UTC (rev 71615)
+++ trunk/Master/texmf-dist/doc/latex/nicematrix/nicematrix.tex 2024-06-24 19:08:03 UTC (rev 71616)
@@ -1042,6 +1042,7 @@
\subsection{\textbackslash\textbackslash\ and \& in the blocks}
\index{ampersand-in-blocks}
+\index{\&-in-blocks}
\colorbox{yellow!50}{\bfseries New 6.28}\par\nobreak
@@ -1054,12 +1055,12 @@
\item For |\\|, there is no other restriction. It's possible to use |\\| in a
block to format a text on several rows.
-\item In order to use |&|, the key |ampersand-in-blocks| must been activated. Then,
-the block is divided in sub-blocks as illustrated below. Be careful: with
-|ampersand-in-blocks| is in force, the (main) argument of the command |\Block|
-is syntactically divided into sub-blocks by splitting on the ampersands~|&|, the
-ampersands between curly braced are protected but not those in an
-environment.\footnote{It's not possible to write
+\item In order to use |&|, the key |ampersand-in-blocks| (alias: |&-in-blocks|)
+must been activated. Then, the block is divided in sub-blocks as illustrated
+below. Be careful: with |ampersand-in-blocks| is in force, the (main) argument
+of the command |\Block| is syntactically divided into sub-blocks by splitting on
+the ampersands~|&|, the ampersands between curly braced are protected but not
+those in an environment.\footnote{It's not possible to write
|\Block[ampersand-in-blocks]{}{\begin{array}{cc}1&2\end{array}}|. Of course,
it's possible without the key |ampersand-in-blocks|.}
\end{itemize}
@@ -4499,12 +4500,10 @@
together, separated by commas (this is similar to the option |multiple| of
\pkg{footmisc} for the footnotes).
-\item If a command |\tabularnote{...}| is exactly at the end of a cell (with
-no space at all after), the label of the note is composed in an overlapping
-position (towards the right). This structure may provide a better alignment of
-the cells of a given column. However, since the version 6.20a, that behaviour is
-in force only when the horizontal alignment mode of the corresponding column is
-|c| or |r|.
+\item If a command |\tabularnote{...}| is exactly at the end of a cell (with no
+space at all after) and if the alignment mode of the column is |c| or |r|, the
+label of the note is composed in an overlapping position (towards the right).
+This structure may provide a better alignment of the cells of a given column.
\item If the key |notes/para| is used, the notes are composed at the end of
the array in a single paragraph (as with the key |para| of \pkg{threeparttable}).
@@ -5326,8 +5325,8 @@
\smallskip
\index{name!key for an environment}
-However, it's advisable to use instead the key |name|\footnote{Since the version
- 6.20a, the value of that key is \emph{expanded} (in the TeX sens).}. This key
+However, it's advisable to use instead the key |name|\footnote{The value of the
+key |name| is \emph{expanded} (in the TeX sens).}. This key
gives a name to the current environment. When the environment has a name, the
nodes are accessible with the name ``\textsl{name}-$i$-$j$'' where \textsl{name}
is the name given to the array and $i$ and $j$ the numbers of row and column.
@@ -7776,306 +7775,7 @@
The variable |\g_nicematrix_code_after_tl| is now public.
-\subsection*{Changes between versions 4.4 and 5.0}
-Use of the standard column types |l|, |c| and |r| instead of |L|, |C| and |R|.
-
-It's now possible to use the command |\diagbox| in a |\Block|.
-
-Command |\tabularnote|
-
-\subsection*{Changes between versions 4.3 and 4.4}
-
-New key |hvlines-except-corners| (now deprecated).
-
-\subsection*{Changes between versions 4.2 and 4.3}
-
-The horizontal centering of the content of a |\Block| is correct even when an
-instruction such as |!{\qquad}| is used in the preamble of the array.
-
-It's now possible to use the command |\Block| in the ``last row''.
-
-\subsection*{Changes between versions 4.1 and 4.2}
-
-It's now possible to write |\begin{pNiceMatrix}a&b\\c&d\end{pNiceMatrix}^2|
-with the expected result.
-
-\subsection*{Changes between versions 4.0 and 4.1}
-
-New keys |cell-space-top-limit| and |cell-space-bottom-limit|
-
-New command |\diagbox|
-
-The key |hvline| don't draw rules in the blocks (commands |\Block|) and in the
-virtual blocks corresponding to the dotted lines.
-
-\subsection*{Changes between versions 3.15 and 4.0}
-
-New environment |{NiceTabular}|
-
-Commands to color cells, rows and columns with a perfect result in the \textsc{pdf}.
-
-\subsection*{Changes between versions 3.14 and 3.15}
-
-It's possible to put labels on the dotted lines drawn by |\Ldots|, |\Cdots|,
-|\Vdots|, |\Ddots|, |\Iddots|, |\Hdotsfor| and the command |\line| in the
-|code-after| with the tokens |_| and |^|.
-
-The option |baseline| is now available in all the environments of
-\pkg{nicematrix}. Before, it was available only in |{NiceArray}|.
-
-New keyword |\CodeAfter| (in the environments of \pkg{nicematrix}).
-
-\subsection*{Changes between versions 3.13 and 3.14}
-
-Correction of a bug (question 60761504 on |stackoverflow|).
-
-Better error messages when the user uses |&| or |\\| when |light-syntax| is in
-force.
-
-\subsection*{Changes between versions 3.12 and 3.13}
-
-The behaviour of the command |\rotate| is improved when used in the ``last
-row''.
-
-The option |dotted-lines-margin| has been renamed in |xdots/shorten| and the
-options |xdots/color| and |xdots/line-style| have been added for a complete
-customisation of the dotted lines.
-
-In the environments without preamble (|{NiceMatrix}|, |{pNiceMatrix}|, etc.),
-it's possible to use the options |l| (=|L|) or |r| (=|R|) to specify the type
-of the columns.
-
-The code of \pkg{nicematrix} no longer uses TikZ but only \textsc{pgf}. By
-default, TikZ is \emph{not} loaded by \pkg{nicematrix}.
-
-\subsection*{Changes between versions 3.11 and 3.12}
-
-Command |\rotate| in the cells of the array.
-
-Options |vlines|, |hlines| and |hvlines|.
-
-Option |baseline| pour |{NiceArray}| (not for the other environments).
-
-The name of the TikZ nodes created by the command |\Block| has changed: when
-the command has been issued in the cell $i$|-|$j$, the name is
-$i$|-|$j$|-block| and, if the creation of the ``medium nodes'' is required, a
-node $i$|-|$j$|-block-medium| is created.
-
-If the user tries to use more columns than allowed by its environment, an error
-is raised by nicematrix (instead of a low-level error).
-
-The package must be loaded with the option |obsolete-environments| if we want
-to use the deprecated environments.
-
-\subsection*{Changes between versions 3.10 and 3.11}
-
-Correction of a bug linked to |first-row| and |last-row|.
-
-\subsection*{Changes between version 3.9 and 3.10}
-
-New option |light-syntax| (and |end-of-row|).
-
-New option |dotted-lines-margin| for fine tuning of the dotted lines.
-
-\subsection*{Changes between version 3.8 and 3.9}
-
-New commands |\NiceMatrixLastEnv| and |\OnlyMainNiceMatrix|.
-
-New options |create-medium-nodes| and |create-large-nodes|.
-
-\subsection*{Changes between version 3.7 and 3.8}
-
-New programmation for the command |\Block| when the block has only one row.
-With this programmation, the vertical rules drawn by the specifier
-``\verb+|+'' at the end of the block is actually drawn. In previous versions,
-they were not because the block of one row was constructed with
-|\multicolumn|.
-
-An error is raised when an obsolete environment is used.
-
-\subsection*{Changes between version 3.6 and 3.7}
-
-The four ``corners'' of the matrix are correctly protected against the four
-codes: |code-for-first-col|, |code-for-last-col|, |code-for-first-row| and
-|code-for-last-row|.
-
-New command |\pAutoNiceMatrix| and its variants (suggestion of Christophe
-Bal).
-
-\subsection*{Changes between version 3.5 and 3.6}
-
-LaTeX counters |iRow| and |jCol| available in the cells of the array.
-
-Addition of |\normalbaselines| before the construction of the array: in
-environments like |{align}| of \pkg{amsmath} the value of |\baselineskip| is
-changed and if the options |first-row| and |last-row| were used in an
-environment of \pkg{nicematrix}, the position of the delimiters was wrong.
-
-A warning is written in the |.log| file if an obsolete environment is used.
-
-There is no longer artificial errors |Duplicate~name| in the environments of
-\pkg{amsmath}.
-
-\subsection*{Changes between version 3.4 and 3.5}
-
-Correction on a bug on the two previous versions where the |code-after| was
-not executed.
-
-\subsection*{Changes between version 3.3 and 3.4}
-
-Following a discussion on TeX StackExchange\footnote{cf.
-|tex.stackexchange.com/questions/510841/nicematrix-and-tikz-external-optimize|},
-optimization of TikZ externalization is disabled in the environments of
-\pkg{nicematrix} when the class \cls{standalone} or the package
-\pkg{standalone} is used.
-
-\subsection*{Changes between version 3.2 and 3.3}
-
-The options |first-row|, |last-row|, |first-col| and |last-col| are now
-available in the environments |{NiceMatrix}|, |{pNiceMatrix}|,
-|{bNiceMatrix}|, etc.
-
-The option |columns-width=auto| doesn't need any more a second compilation.
-
-\subsection*{Changes between version 3.1 and 3.2 (and 3.2a)}
-
-Option |small|.
-
-\subsection*{Changes between version 3.0 and 3.1}
-
-Command |\Block| to draw block matrices.
-
-Error message when the user gives an incorrect value for |last-row|.
-
-The vertical rules in the matrices (drawn by ``\verb+|+'') are now compatible with
-the color fixed by \pkg{colortbl}.
-
-Correction of a bug: it was not possible to use the colon ``|:|'' in the
-preamble of an array when |pdflatex| was used with \pkg{french-babel} (because
-\pkg{french-babel} activates the colon in the beginning of the document).
-
-\subsection*{Changes between version 2.3 and 3.0}
-
-Modification of |\Hdotsfor|. Now |\Hdotsfor| erases the |\vlines| (of ``\verb+|+'')
-as |\hdotsfor| does.
-
-Composition of exterior rows and columns on the four sides of the matrix (and
-not only on two sides) with the options |first-row|, |last-row|, |first-col|
-and |last-col|.
-
-\subsection*{Changes between version 2.2.1 and 2.3}
-
-Compatibility with the column type |S| of \pkg{siunitx}.
-
-Option |hlines|.
-
-\subsection*{Changes between version 2.2 and 2.2.1}
-
-Improvment of the vertical dotted lines drawn by the specifier ``:'' in the
-preamble.
-
-Modification of the position of the dotted lines drawn by |\hdottedline|.
-
-\subsection*{Changes between version 2.1.5 and 2.2}
-
-Possibility to draw horizontal dotted lines to separate rows with the command
-|\hdottedline| (similar to the classical command |\hline| and the command
-|\hdashline| of \pkg{arydshln}).
-
-Possibility to draw vertical dotted lines to separate columns with the
-specifier ``|:|'' in the preamble (similar to the classical specifier
-``\verb+|+'' and the specifier ``|:|'' of \pkg{arydshln}).
-
-\subsection*{Changes between version 2.1.4 and 2.1.5}
-
-Compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}.
-
-Option |allow-duplicate-names|.
-
-\subsection*{Changes between version 2.1.3 and 2.1.4}
-
-Replacement of some options |O { }| in commands and environments defined with
-\pkg{xparse} by |! O { }| (because a recent version of \pkg{xparse} introduced
-the specifier |!| and modified the default behaviour of the last optional
-arguments).
-
-See |www.texdev.net/2018/04/21/xparse-optional-arguments-at-the-end|
-
-\subsection*{Changes between version 2.1.2 and 2.1.3}
-
-When searching the end of a dotted line from a command like |\Cdots| issued in
-the ``main matrix'' (not in the exterior column), the cells in the exterior
-column are considered as outside the matrix. That means that it's possible to
-do the following matrix with only a |\Cdots| command (and a single |\Vdots|).
-\[\begin{pNiceArray}{Wc{5mm}cWc{5mm}}[first-row,last-col]
-& C_j & \\
-\mbox{\Large $0$} & \Vdots & \mbox{\Large $0$} \\
-\strut & a & \Cdots & L_i \\
-\mbox{\Large $0$} & & \mbox{\Large $0$} \\
-\end{pNiceArray}\]
-
-\subsection*{Changes between version 2.1 and 2.1.1}
-
-Small corrections: for example, the option |code-for-first-row| is now
-available in the command |\NiceMatrixOptions|.
-
-Following a discussion on
-TeX StackExchange\footnote{cf.
-|tex.stackexchange.com/questions/450841/tikz-externalize-and-nicematrix-package|},
-TikZ externalization is now deactivated in the environments of the
-package \pkg{nicematrix}.\footnote{Before this version, there was an error
-when using \pkg{nicematrix} with TikZ externalization. In any case, it's not
-possible to externalize the TikZ elements constructed by \pkg{nicematrix}
-because they use the options |overlay| and |remember picture|.}
-
-\subsection*{Changes between version 2.0 and 2.1}
-
-New implementation of the environment |{pNiceArrayRC}|. With this new
-implementation, there is no restriction on the width of the columns.
-
-The package \pkg{nicematrix} no longer loads \pkg{mathtools} but only
-\pkg{amsmath}.
-
-Creation of ``medium nodes'' and ``large nodes''.
-
-\subsection*{Changes between version 1.4 and 2.0}
-
-The versions 1.0 to 1.4 of \pkg{nicematrix} were focused on the continuous
-dotted lines whereas the version 2.0 of \pkg{nicematrix} provides different
-features to improve the typesetting of mathematical matrices.
-
-\subsection*{Changes between version 1.3 and 1.4}
-
-The column types |w| and |W| can now be used in the environments
-|{NiceArray}|, |{pNiceArrayC}| and its variants with the same meaning as in
-the package \pkg{array}.
-
-New option |columns-width| to fix the same width for all the columns of the
-array.
-
-\subsection*{Changes between version 1.2 and 1.3}
-
-New environment |{pNiceArrayC}| and its variants.
-
-Correction of a bug in the definition of |{BNiceMatrix}|, |{vNiceMatrix}| and
-|{VNiceMatrix}| (in fact, it was a typo).
-
-Options are now available locally in |{pNiceMatrix}| and its variants.
-
-The names of the options are changed. The old names were names in ``camel
-style''.
-
-\subsection*{Changes between versions 1.1 and 1.2}
-
-New environment |{NiceArray}| with column types |L|, |C| and |R|.
-
-\subsection*{Changes between versions 1.0 and 1.1}
-
-The dotted lines are no longer drawn with TikZ nodes but with TikZ circles
-(for efficiency).
-
-
\cleardoublepage
\phantomsection
Modified: trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx 2024-06-24 19:07:54 UTC (rev 71615)
+++ trunk/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx 2024-06-24 19:08:03 UTC (rev 71616)
@@ -17,8 +17,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{6.28}
-\def\myfiledate{2024/05/29}
+\def\myfileversion{6.28a}
+\def\myfiledate{2024/06/24}
%
%
%<*batchfile>
@@ -155,7 +155,8 @@
% In the version 2.6a of \pkg{array}, important modifications have been done for
% the Tagging Project.
% \begin{macrocode}
-\bool_const:Nn \c_@@_tagging_array_bool { \cs_if_exist_p:N \ar at ialign }
+\bool_const:Nn \c_@@_tagging_array_bool
+ { \IfPackageAtLeastTF { array } { 2024/05/01 } \c_true_bool \c_false_bool }
\bool_const:Nn \c_@@_testphase_table_bool
{ \IfPackageLoadedTF { latex-lab-testphase-table } \c_true_bool \c_false_bool }
% \end{macrocode}
@@ -287,19 +288,27 @@
%
% \bigskip
% \begin{macrocode}
-\cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+\bool_if:NTF \c_@@_tagging_array_bool
{
- \peek_meaning:NF \unskip { \@@_error:n { Internal~error } }
- #1
+ \cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \textonly at unskip { \@@_error:n { Internal~error } }
+ #1
+ }
}
+ {
+ \cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \unskip { \@@_error:n { Internal~error } }
+ #1
+ }
+ }
% \end{macrocode}
%
% \bigskip
% Here, the box |\l_tmpa_box| will be used as sandbox to take our security test.
-% This code has been modified in version 6.18 (see question 682891 on TeX
-% StackExchange).
% \begin{macrocode}
-\hook_gput_code:nnn { begindocument / after } { . }
+\hook_gput_code:nnn { begindocument / end } { . }
{
\IfPackageLoadedTF { mdwtab }
{ \@@_fatal:n { mdwtab~loaded } }
@@ -385,6 +394,7 @@
\tl_const:Nn \c_@@_dot_tl { . }
\tl_const:Nn \c_@@_default_tl { default }
\tl_const:Nn \c_@@_star_tl { * }
+\str_const:Nn \c_@@_star_str { * }
\str_const:Nn \c_@@_r_str { r }
\str_const:Nn \c_@@_c_str { c }
\str_const:Nn \c_@@_l_str { l }
@@ -2504,6 +2514,7 @@
{
ampersand-in-blocks .bool_set:N = \l_@@_amp_in_blocks_bool ,
ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
no-cell-nodes .code:n =
\cs_set_protected:Npn \@@_node_for_cell:
{ \box_use_drop:N \l_@@_cell_box } ,
@@ -5416,22 +5427,12 @@
% \end{macrocode}
%
% \bigskip
-%
% \begin{macrocode}
\str_new:N \c_@@_ignorespaces_str
\str_set:Nx \c_@@_ignorespaces_str { \ignorespaces }
\str_remove_all:Nn \c_@@_ignorespaces_str { ~ }
-% \end{macrocode}
-%
-% \bigskip
-% In order to test whether a cell is empty, we test whether it begins by
-% |\ignorespaces\unskip|. However, in some circunstancies, for example when
-% |\collectcell| of \pkg{collcell} is used, the cell does not begin with
-% |\ignorespaces|. In that case, we consider as not empty...
-%
-% First, we test if the next token is |\ignorespaces| and it's not very easy...
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_test_if_empty: { \peek_after:Nw \@@_test_if_empty_i: }
+\cs_new_protected:Npn \@@_test_if_empty:
+ { \peek_after:Nw \@@_test_if_empty_i: }
\cs_new_protected:Npn \@@_test_if_empty_i:
{
\str_set:Nx \l_tmpa_str { \token_to_meaning:N \l_peek_token }
@@ -5439,17 +5440,40 @@
{ \@@_test_if_empty:w }
}
\cs_new_protected:Npn \@@_test_if_empty:w \ignorespaces
- {
- \peek_meaning:NT \unskip
- {
- \tl_gput_right:Nn \g_@@_cell_after_hook_tl
- {
- \box_set_wd:Nn \l_@@_cell_box \c_zero_dim
- \skip_horizontal:N \l_@@_col_width_dim
- }
+ { \peek_after:Nw \@@_test_if_empty_ii: }
+% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_nullify_cell:
+ {
+ \tl_gput_right:Nn \g_@@_cell_after_hook_tl
+ {
+ \box_set_wd:Nn \l_@@_cell_box \c_zero_dim
+ \skip_horizontal:N \l_@@_col_width_dim
}
}
% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\bool_if:NTF \c_@@_tagging_array_bool
+ {
+ \cs_new_protected:Npn \@@_test_if_empty_ii:
+ { \peek_meaning:NT \textonly at unskip \@@_nullify_cell: }
+ }
+% \end{macrocode}
+% In the old version of \pkg{array}, we test whether it begins by
+% |\ignorespaces\unskip|. However, in some circunstancies, for example when
+% |\collectcell| of \pkg{collcell} is used, the cell does not begin with
+% |\ignorespaces|. In that case, we consider as not empty...
+% First, we test if the next token is |\ignorespaces| and it's not very easy...
+% \begin{macrocode}
+ {
+ \cs_new_protected:Npn \@@_test_if_empty_ii:
+ { \peek_meaning:NT \unskip \@@_nullify_cell: }
+ }
+% \end{macrocode}
%
%
% \begin{macrocode}
@@ -6769,7 +6793,7 @@
}
}
{
- \@@_create_col_nodes:
+ \@@_create_col_nodes:
\endarray
}
% \end{macrocode}
@@ -6817,7 +6841,7 @@
% \begin{macrocode}
{
\@@_create_col_nodes:
- \endarray
+ \endarray
}
% \end{macrocode}
%
@@ -7193,7 +7217,7 @@
\endpgfpicture
}
}
- % \cr
+ % \cr
}
% \end{macrocode}
%
@@ -13071,12 +13095,12 @@
% \begin{macrocode}
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #1 } }
- { \str_if_eq_p:nn { #1 } { * } }
+ { \str_if_eq_p:Vn \c_@@_star_str { #1 } }
{ \int_set:Nn \l_tmpa_int { 100 } }
{ \int_set:Nn \l_tmpa_int { #1 } }
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #2 } }
- { \str_if_eq_p:nn { #2 } { * } }
+ { \str_if_eq_p:Vn \c_@@_star_str { #2 } }
{ \int_set:Nn \l_tmpb_int { 100 } }
{ \int_set:Nn \l_tmpb_int { #2 } }
% \end{macrocode}
@@ -13576,6 +13600,9 @@
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block / SecondPass }
{
+ ampersand-in-blocks .bool_set:N = \l_@@_amp_in_blocks_bool ,
+ ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
tikz .code:n =
\IfPackageLoadedTF { tikz }
{ \seq_put_right:Nn \l_@@_tikz_seq { { #1 } } }
@@ -13707,10 +13734,22 @@
{
\int_compare:nNnTF \l_@@_last_row_int > \g_@@_row_total_int
{ \msg_error:nnnn { nicematrix } { Block~too~large~1 } { #1 } { #2 } }
- { \@@_Block_v:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } }
+ {
+ \@@_Block_v:nnVVnn
+ { #1 }
+ { #2 }
+ \l_@@_last_row_int
+ \l_@@_last_col_int
+ { #5 }
+ { #6 }
+ }
}
}
% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_Block_v:nnnnnn { n n V V n n }
+% \end{macrocode}
%
%
% \medskip
@@ -16438,7 +16477,7 @@
~you~try~to~use~more~columns~than~allowed~by~your~
\@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~
\int_use:N \g_@@_static_num_of_col_int\
- ~(plus~the~potential~exterior~ones).
+ ~(plus~the~potential~exterior~ones).~
This~error~is~fatal.
}
% \end{macrocode}
@@ -17211,9 +17250,10 @@
\c_@@_available_keys_str
}
{
- The~available~keys~are~(in~alphabetic~order):~b,~B,~borders,~c,~draw,~fill,~
- hlines,~hvlines,~l,~line-width,~name,~opacity,~rounded-corners,~r,~
- respect-arraystretch,~t,~T,~tikz,~transparent~and~vlines.
+ The~available~keys~are~(in~alphabetic~order):~&-in-blocks,~ampersand-in-blocks,~
+ b,~B,~borders,~c,~draw,~fill,~hlines,~hvlines,~l,~line-width,~name,~
+ opacity,~rounded-corners,~r,~respect-arraystretch,~t,~T,~tikz,~transparent~
+ and~vlines.
}
% \end{macrocode}
%
@@ -17348,6 +17388,7 @@
{
The~available~keys~are~(in~alphabetic~order):~
allow-duplicate-names,~
+ ampersand-in-blocks,~
caption-above,~
cell-space-bottom-limit,~
cell-space-limits,~
@@ -17405,6 +17446,7 @@
}
{
The~available~keys~are~(in~alphabetic~order):~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -17469,6 +17511,7 @@
}
{
The~available~keys~are~(in~alphabetic~order):~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -17532,6 +17575,7 @@
}
{
The~available~keys~are~(in~alphabetic~order):~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
Modified: trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty 2024-06-24 19:07:54 UTC (rev 71615)
+++ trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty 2024-06-24 19:08:03 UTC (rev 71616)
@@ -18,8 +18,8 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-\def\myfileversion{6.28}
-\def\myfiledate{2024/05/29}
+\def\myfileversion{6.28a}
+\def\myfiledate{2024/06/24}
\RequirePackage{pgfcore}
\usepgfmodule{shapes}
\RequirePackage{l3keys2e}
@@ -30,7 +30,8 @@
{Enhanced arrays with the help of PGF/TikZ}
\RequirePackage { amsmath }
\RequirePackage { array }
-\bool_const:Nn \c__nicematrix_tagging_array_bool { \cs_if_exist_p:N \ar at ialign }
+\bool_const:Nn \c__nicematrix_tagging_array_bool
+ { \IfPackageAtLeastTF { array } { 2024/05/01 } \c_true_bool \c_false_bool }
\bool_const:Nn \c__nicematrix_testphase_table_bool
{ \IfPackageLoadedTF { latex-lab-testphase-table } \c_true_bool \c_false_bool }
\cs_new_protected:Npn \__nicematrix_error:n { \msg_error:nn { nicematrix } }
@@ -97,13 +98,23 @@
{ \__nicematrix_error:n { Internal~error } }
#1
}
-\cs_new_protected:Npn \__nicematrix_security_test_i:w \ignorespaces #1
+\bool_if:NTF \c__nicematrix_tagging_array_bool
{
- \peek_meaning:NF \unskip { \__nicematrix_error:n { Internal~error } }
- #1
+ \cs_new_protected:Npn \__nicematrix_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \textonly at unskip { \__nicematrix_error:n { Internal~error } }
+ #1
+ }
}
-\hook_gput_code:nnn { begindocument / after } { . }
{
+ \cs_new_protected:Npn \__nicematrix_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \unskip { \__nicematrix_error:n { Internal~error } }
+ #1
+ }
+ }
+\hook_gput_code:nnn { begindocument / end } { . }
+ {
\IfPackageLoadedTF { mdwtab }
{ \__nicematrix_fatal:n { mdwtab~loaded } }
{
@@ -146,6 +157,7 @@
\tl_const:Nn \c__nicematrix_dot_tl { . }
\tl_const:Nn \c__nicematrix_default_tl { default }
\tl_const:Nn \c__nicematrix_star_tl { * }
+\str_const:Nn \c__nicematrix_star_str { * }
\str_const:Nn \c__nicematrix_r_str { r }
\str_const:Nn \c__nicematrix_c_str { c }
\str_const:Nn \c__nicematrix_l_str { l }
@@ -852,6 +864,7 @@
{
ampersand-in-blocks .bool_set:N = \l__nicematrix_amp_in_blocks_bool ,
ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
no-cell-nodes .code:n =
\cs_set_protected:Npn \__nicematrix_node_for_cell:
{ \box_use_drop:N \l__nicematrix_cell_box } ,
@@ -2478,7 +2491,8 @@
\str_new:N \c__nicematrix_ignorespaces_str
\str_set:Nx \c__nicematrix_ignorespaces_str { \ignorespaces }
\str_remove_all:Nn \c__nicematrix_ignorespaces_str { ~ }
-\cs_new_protected:Npn \__nicematrix_test_if_empty: { \peek_after:Nw \__nicematrix_test_if_empty_i: }
+\cs_new_protected:Npn \__nicematrix_test_if_empty:
+ { \peek_after:Nw \__nicematrix_test_if_empty_i: }
\cs_new_protected:Npn \__nicematrix_test_if_empty_i:
{
\str_set:Nx \l_tmpa_str { \token_to_meaning:N \l_peek_token }
@@ -2486,16 +2500,24 @@
{ \__nicematrix_test_if_empty:w }
}
\cs_new_protected:Npn \__nicematrix_test_if_empty:w \ignorespaces
+ { \peek_after:Nw \__nicematrix_test_if_empty_ii: }
+\cs_new_protected:Npn \__nicematrix_nullify_cell:
{
- \peek_meaning:NT \unskip
+ \tl_gput_right:Nn \g__nicematrix_cell_after_hook_tl
{
- \tl_gput_right:Nn \g__nicematrix_cell_after_hook_tl
- {
- \box_set_wd:Nn \l__nicematrix_cell_box \c_zero_dim
- \skip_horizontal:N \l__nicematrix_col_width_dim
- }
+ \box_set_wd:Nn \l__nicematrix_cell_box \c_zero_dim
+ \skip_horizontal:N \l__nicematrix_col_width_dim
}
}
+\bool_if:NTF \c__nicematrix_tagging_array_bool
+ {
+ \cs_new_protected:Npn \__nicematrix_test_if_empty_ii:
+ { \peek_meaning:NT \textonly at unskip \__nicematrix_nullify_cell: }
+ }
+ {
+ \cs_new_protected:Npn \__nicematrix_test_if_empty_ii:
+ { \peek_meaning:NT \unskip \__nicematrix_nullify_cell: }
+ }
\cs_new_protected:Npn \__nicematrix_test_if_empty_for_S:
{
\peek_meaning:NT \__siunitx_table_skip:n
@@ -7119,12 +7141,12 @@
{
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #1 } }
- { \str_if_eq_p:nn { #1 } { * } }
+ { \str_if_eq_p:Vn \c__nicematrix_star_str { #1 } }
{ \int_set:Nn \l_tmpa_int { 100 } }
{ \int_set:Nn \l_tmpa_int { #1 } }
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #2 } }
- { \str_if_eq_p:nn { #2 } { * } }
+ { \str_if_eq_p:Vn \c__nicematrix_star_str { #2 } }
{ \int_set:Nn \l_tmpb_int { 100 } }
{ \int_set:Nn \l_tmpb_int { #2 } }
\int_compare:nNnTF \l_tmpb_int = \c_one_int
@@ -7423,6 +7445,9 @@
}
\keys_define:nn { NiceMatrix / Block / SecondPass }
{
+ ampersand-in-blocks .bool_set:N = \l__nicematrix_amp_in_blocks_bool ,
+ ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
tikz .code:n =
\IfPackageLoadedTF { tikz }
{ \seq_put_right:Nn \l__nicematrix_tikz_seq { { #1 } } }
@@ -7525,9 +7550,18 @@
{
\int_compare:nNnTF \l__nicematrix_last_row_int > \g__nicematrix_row_total_int
{ \msg_error:nnnn { nicematrix } { Block~too~large~1 } { #1 } { #2 } }
- { \__nicematrix_Block_v:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } }
+ {
+ \__nicematrix_Block_v:nnVVnn
+ { #1 }
+ { #2 }
+ \l__nicematrix_last_row_int
+ \l__nicematrix_last_col_int
+ { #5 }
+ { #6 }
+ }
}
}
+\cs_generate_variant:Nn \__nicematrix_Block_v:nnnnnn { n n V V n n }
\cs_new_protected:Npn \__nicematrix_Block_v:nnnnnn #1 #2 #3 #4 #5 #6
{
\group_begin:
@@ -9416,7 +9450,7 @@
~you~try~to~use~more~columns~than~allowed~by~your~
\__nicematrix_full_name_env:.\__nicematrix_message_hdotsfor:\ The~maximal~number~of~columns~is~
\int_use:N \g__nicematrix_static_num_of_col_int\
- ~(plus~the~potential~exterior~ones).
+ ~(plus~the~potential~exterior~ones).~
This~error~is~fatal.
}
\__nicematrix_msg_new:nn { columns~not~used }
@@ -9964,9 +9998,10 @@
\c__nicematrix_available_keys_str
}
{
- The~available~keys~are~(in~alphabetic~order):~b,~B,~borders,~c,~draw,~fill,~
- hlines,~hvlines,~l,~line-width,~name,~opacity,~rounded-corners,~r,~
- respect-arraystretch,~t,~T,~tikz,~transparent~and~vlines.
+ The~available~keys~are~(in~alphabetic~order):~&-in-blocks,~ampersand-in-blocks,~
+ b,~B,~borders,~c,~draw,~fill,~hlines,~hvlines,~l,~line-width,~name,~
+ opacity,~rounded-corners,~r,~respect-arraystretch,~t,~T,~tikz,~transparent~
+ and~vlines.
}
\__nicematrix_msg_new:nnn { Unknown~key~for~Brace }
{
@@ -10079,6 +10114,7 @@
{
The~available~keys~are~(in~alphabetic~order):~
allow-duplicate-names,~
+ ampersand-in-blocks,~
caption-above,~
cell-space-bottom-limit,~
cell-space-limits,~
@@ -10131,6 +10167,7 @@
}
{
The~available~keys~are~(in~alphabetic~order):~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -10188,6 +10225,7 @@
}
{
The~available~keys~are~(in~alphabetic~order):~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -10248,6 +10286,7 @@
}
{
The~available~keys~are~(in~alphabetic~order):~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
More information about the tex-live-commits
mailing list.