summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nicematrix/nicematrix.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-09 03:02:31 +0000
committerNorbert Preining <norbert@preining.info>2021-04-09 03:02:31 +0000
commit8ccafc1be8d24ff0c4126d40847afbedab7fc7fb (patch)
tree06fbb0b4fc6fa3865d719139f6a1f04aaa03c963 /macros/latex/contrib/nicematrix/nicematrix.dtx
parent31d38d879db092b485e49e1b7c79f96c312fd1fb (diff)
CTAN sync 202104090302
Diffstat (limited to 'macros/latex/contrib/nicematrix/nicematrix.dtx')
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx598
1 files changed, 378 insertions, 220 deletions
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index 38269b145c..fb4ebed732 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{5.13}
-\def\myfiledate{2021/03/23}
+\def\myfileversion{5.14}
+\def\myfiledate{2021/04/08}
%
%
%<*batchfile>
@@ -70,6 +70,7 @@ version 2005/12/01 or later.
\usepackage{varwidth}
\def\LetterAt{@}
\parindent 0pt
+\skip \footins = 2 \bigskipamount
\EnableCrossrefs
\makeatletter
@@ -190,7 +191,8 @@ version 2005/12/01 or later.
% use these nodes to develop new features. As usual with \textsc{pgf}, the
% coordinates of these nodes are written in the |.aux| to be used on the next
% compilation and that's why \pkg{nicematrix} may need \textbf{several
-% compilations}.
+% compilations}.\footnote{If you use Overleaf, Overleaf will do automatically
+% the right number of compilations.}
%
% \bigskip
% Most features of \pkg{nicematrix} may be used without explicit use of
@@ -239,13 +241,18 @@ version 2005/12/01 or later.
% corresponding environments of \pkg{amsmath} (which is loaded by
% \pkg{nicematrix}): |{matrix}|, |{pmatrix}|, etc.
%
+% \medskip
+% \textbf{It's recommended to use primarily the classical environments and to use the
+% environments of \pkg{nicematrix} only when some feature provided by these
+% environments is used (this will save memory).}
+%
% \medskip
% All the environments of the package \pkg{nicematrix} accept, between square
% brackets, an optional list of \textsl{key=value} pairs. \textbf{There must be
% no space before the opening bracket (|[|) of this list of options.}
%
%\bigskip
-% \textbf{Important}
+% \textbf{Important}\par\nobreak
%
% Before the version 5.0, it was mandatory to use, for technical reasons, the
% letters |L|, |C| et |R| instead of |l|, |c| et |r| in the preambles of the
@@ -561,15 +568,16 @@ version 2005/12/01 or later.
% content of the block but draws also the frame of the block with that color;
% \item the key |line-width| is the width (thickness) of the frame (this key
% should be used only when the key |draw| is in force);
-% \item \colorbox{yellow!50}{\textbf{New 5.12}}\enskip the key |rounded-corners|
-% requires rounded corners (for the frame drawn by |draw| and the shape drawn by
-% |fill|) with a radius equal to the value of that key (the default value is
-% 4~pt\footnote{This value is the initial value of the \emph{rounded corners} of
-% Tikz.}).
-% \item \colorbox{yellow!50}{\textbf{New 5.13}}\enskip the key |borders| provides
-% the ability to draw only some borders of the blocks; the value of that key is
-% a (comma-separated) list of elements covered by |left|, |right|, |top| and
-% |bottom|.
+% \item the key |rounded-corners| requires rounded corners (for the frame drawn
+% by |draw| and the shape drawn by |fill|) with a radius equal to the value of
+% that key (the default value is 4~pt\footnote{This value is the initial value
+% of the \emph{rounded corners} of Tikz.});
+% \item 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 \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 |\\|).
% \end{itemize}
%
% \interitem
@@ -679,6 +687,8 @@ version 2005/12/01 or later.
% background of a unique celle, there is no point using the command |\Block|:
% it's possible to use the command |\cellcolor| (when the key |colortbl-like| is
% used).}
+%
+% \item It's possible to draw one or several borders of the cell with the key |borders|.
% \end{itemize}
%
% \bigskip
@@ -785,7 +795,8 @@ version 2005/12/01 or later.
%
% \bigskip
% However, the vertical rules are not drawn in the blocks (created by |\Block|:
-% cf.~p.~\pageref{Block}).
+% cf.~p.~\pageref{Block}) nor in the corners (created by the key |corner|:
+% cf.~p.~\pageref{corners}).
%
% \bigskip
% If you use \pkg{booktabs} (which provides |\toprule|, |\midrule|,
@@ -926,26 +937,45 @@ version 2005/12/01 or later.
% page~\pageref{OnlyMainNiceMatrix}.
%
%
-% \subsection{The command \textbackslash Hline}
+% \subsection{The tools of nicematrix for the rules}
%
-% We have said that the vertical rules specified by a symbol ``\verb+|+'' in the
-% preamble (for the environments with preamble, of course) are not drawn in the
-% blocks.\footnote{Those blocks are those created by the commands \verb|\Block|
-% and |\multicolumn| but also those implicitely determined by the continuous
-% dotted lines (created by \verb|\Cdots|, etc.).}
+% Here are the tools provided by \pkg{nicematrix} for the rules.
+% \begin{itemize}
+% \item the keys |hlines|, |vlines| and |hvlines|;
+% \item the specifier ``\verb+|+'' in the preamble (for the environments with
+% preamble);
+% \item the command |\Hline|.
+% \end{itemize}
+%
+% \medskip
+% \textbf{All these tools don't draw the rules in the blocks nor in the
+% empty corners (when the key |corners| is used).}
+% \begin{itemize}
+% \item These blocks are:
+% \begin{itemize}
+% \item the blocks created by the command |\Block|\footnote{And also the command \verb|\multicolumn| also
+% it's recommended to use instead |\Block| in the environments of
+% \pkg{nicematrix}.} presented
+% p.~\pageref{Block};
+% \item the blocks implicitely delimited by the continuous dotted lines created
+% by |\Cdots|, |Vdots|, etc. (cf.~p.~\pageref{Cdots}).
+% \end{itemize}
+% \item The corners are created by the key |corners| explained below (see p.~\pageref{corners}).
+% \end{itemize}
%
-% \smallskip
-% \colorbox{yellow!50}{\textbf{New 5.13}}\enskip In order to have horizontal
-% rules with the same behaviour, \pkg{nicematrix} provides the command |\Hline|.
+% In particular, this remark explains the difference between the standard
+% command |\hline| and the command |\Hline| provided by \pkg{nicematrix}.
%
%
-% \subsection{The keys hlines and vlines}
+% \subsubsection{The keys hlines and vlines}
%
-% The key |hlines| draws all the horizontal rules and the key |vlines| draws all
-% the vertical rules excepted in the blocks, created by |\Block| and the virtual
-% blocks determined by dotted lines: |\Cdots|, |\Vdots|, etc.. In fact, in the
-% environments with delimiters (as |{pNiceMatrix}| or |{bNiceArray}|) the
-% exterior rules are not drawn (as expected).
+% The keys |hlines| and |vlines| (which draw, of course, horizontal and vertical
+% rules) take in as value a list of numbers which are the numbers of the rules
+% to draw.
+%
+% In fact, for the environments with delimiters (such as |{pNiceMatrix}| or
+% |{bNiceArray}|), the key |vlines| don't draw the exterior rules (this is
+% certainly the expected behaviour).
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
@@ -962,21 +992,13 @@ version 2005/12/01 or later.
% \end{pNiceMatrix}$
%
%
-% \bigskip
-% \colorbox{yellow!50}{\textbf{New 5.13}}\enskip It's possible to provide to the
-% key |vlines| a (comma-separated) list of numbers, which are the numbers of the
-% vertical rules to draw. The key |hlines| has a similar behaviour.
%
-%
-% \subsection{The key hvlines}
+% \subsubsection{The key hvlines}
% \label{hvlines}
%
-% The key |hvlines| draws all the vertical and horizontal rules (excepted
-% in the blocks and the virtual blocks determined by dotted lines and excepted
-% the rules corresponding of the frame of the blocks using the key |draw| which
-% are drawn with their own characteristics).
+% The key |hvlines| (no value) is the conjonction of the keys |hlines| and |vlines|.
%
-% \medskip
+% \smallskip
% \begin{Verbatim}
% \setlength{\arrayrulewidth}{1pt}
% \begin{NiceTabular}{cccc}[~emphase#hvlines@,rules/color=blue]
@@ -998,71 +1020,104 @@ version 2005/12/01 or later.
% \end{center}
%
%
-% \subsection{The key hvlines-except-corners}
+% \subsubsection{The (empty) corners}
%
-% \label{except-corners}
+% \label{corners}
%
-% The key |hvlines-except-corners| draws all the horizontal and vertical rules,
-% excepted in the blocks (and the virtual blocks determined by dotted lines) and
-% excepted in the empty corners.
+% The four |corners| of an array will be designed by |NW|, |SW|, |NE| and |SE|
+% (\emph{north west}, \emph{south west}, \emph{north east} and \emph{south east}).
%
-% \medskip
-% \begin{Verbatim}
-% \begin{NiceTabular}{*{6}{c}}[~emphase#hvlines-except-corners@,cell-space-top-limit=3pt]
+% For each of these corners, we will call \emph{empty corner} (or simply
+% \emph{corner}) the reunion of all the empty rectangles starting from the cell
+% actually in the corner of the array.\footnote{For sake of completeness, we
+% should also say that a cell contained in a block (even an empty cell) is not
+% taken into account for the determination of the corners. That behaviour is natural.}
+%
+% However, it's possible, for a cell without content, to require \pkg{nicemarix}
+% to consider that cell as not empty with the key |\NotEmpty|.
+%
+%\bigskip
+% \begin{minipage}{9cm}
+% In the example on the right (where B is in the center of a block of size
+% $2\times2$), we have colored in blue the four (empty) corners of the array.
+% \end{minipage}\hspace{2cm}%
+% \begin{NiceTabular}{*{6}{c}}[cell-space-top-limit=3pt]
+% \CodeBefore
+% \rectanglecolor{blue!10}{1-1}{4-2}
+% \rectanglecolor{blue!10}{1-1}{1-4}
+% \rectanglecolor{blue!10}{1-6}{3-6}
+% \rectanglecolor{blue!10}{7-1}{9-1}
+% \rectanglecolor{blue!10}{7-5}{9-6}
+% \Body
% & & & & A \\
% & & A & A & A \\
% & & & A \\
% & & A & A & A & A \\
% A & A & A & A & A & A \\
% A & A & A & A & A & A \\
+% & A & A & A \\
% & \Block{2-2}{B} & & A \\
% & & & A \\
-% & A & A & A \\
% \end{NiceTabular}
-% \end{Verbatim}
-% %
-% \begin{center}
-% \begin{NiceTabular}{*{6}{c}}[hvlines-except-corners,cell-space-top-limit=3pt]
+%
+% \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).
+%
+% \bigskip
+% \begin{BVerbatim}[boxwidth=11cm,baseline=c]
+% \NiceMatrixOptions{cell-space-top-limit=3pt}
+% \begin{NiceTabular}{*{6}{c}}[~emphase#corners@,hvlines]
% & & & & A \\
% & & A & A & A \\
% & & & A \\
% & & A & A & A & A \\
% A & A & A & A & A & A \\
% A & A & A & A & A & A \\
+% & A & A & A \\
% & \Block{2-2}{B} & & A \\
% & & & A \\
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{*{6}{c}}[corners,hvlines,cell-space-top-limit=3pt]
+% & & & & A \\
+% & & A & A & A \\
+% & & & A \\
+% & & A & A & A & A \\
+% A & A & A & A & A & A \\
+% A & A & A & A & A & A \\
% & A & A & A \\
+% & \Block{2-2}{B} & & A \\
+% & & & A \\
% \end{NiceTabular}
-% \end{center}
%
-% As we can see, an ``empty corner'' is composed by the reunion of all the empty
-% rectangles starting from the cell actually in the corner of the array.
%
% \bigskip
-% It's possible to give as value to the key |\hvlines-except-corners| a list of
-% the corners to take into consideration. The corners are designed by |NW|,
-% |SW|, |NE| and |SE| (\emph{north west}, \emph{south west}, \emph{north east}
-% and \emph{south east}).
+% It's also possible to provide to the key |corners| a (comma-separated) list of
+% corners (designed by |NW|, |SW|, |NE| and |SE|).
%
-% \bigskip
+% \medskip
% \begin{BVerbatim}[boxwidth=11cm,baseline=c]
-% \begin{NiceTabular}{*{6}{c}}%
-% [~emphase#hvlines-except-corners=NE@,cell-space-top-limit=3pt]
+% \NiceMatrixOptions{cell-space-top-limit=3pt}
+% \begin{NiceTabular}{*{6}{c}}[~emphase#corners=NE@,hvlines]
% 1\\
% 1&1\\
% 1&2&1\\
% 1&3&3&1\\
% 1&4&6&4&1\\
-% 1&5&10&10&5&1
+% & & & & &1
% \end{NiceTabular}
% \end{BVerbatim}
-% \begin{NiceTabular}{*{6}{c}}[c,hvlines-except-corners=NE,cell-space-top-limit=3pt]
+% \begin{NiceTabular}{*{6}{c}}[c,corners=NE,hvlines,cell-space-top-limit=3pt]
% 1\\
% 1&1\\
% 1&2&1\\
% 1&3&3&1\\
% 1&4&6&4&1\\
-% 1&5&10&10&5&1
+% & & & & &1
% \end{NiceTabular}
%
% \bigskip
@@ -1213,10 +1268,10 @@ version 2005/12/01 or later.
% The extension \pkg{nicematrix} provides a key |code-before| for some code that
% will be executed before the drawing of the tabular.
%
-% \medskip
-% \colorbox{yellow!50}{\textbf{New 5.12}}\enskip An alternative syntax is
-% provided: it's possible to put the content of that |code-before| between the
-% keywords |\CodeBefore| and |\Body| at the beginning of the environment.
+% \medskip
+% An alternative syntax is provided: it's possible to put the content of that
+% |code-before| between the keywords |\CodeBefore| and |\Body| at the beginning
+% of the environment.
%
% \begin{Verbatim}
% \begin{pNiceArray}{~textsl#preamble@}
@@ -1379,10 +1434,10 @@ version 2005/12/01 or later.
% \begin{itemize}
% \item The key |cols| describes a set of columns. The command |\rowcolors| will
% color only the cells of these columns. The value is a comma-separated list of
-% intervals of the form $i$-$j$.
+% intervals of the form $i$-$j$ (where $i$ or $j$ may be replaced by |*|).
% \item With the key |restart|, each interval of rows (specified by the first
% mandatory argument) begins with the same color.\footnote{Otherwise, the color
-% of a given row relies only upon the parity of its number.}
+% of a given row relies only upon the parity of its absolute number.}
% \item With the key |respect-blocks| the ``rows'' alternately colored may extend over
% several rows if they have to incorporate blocks (created with the command
% |\Block|: cf.~p.~\pageref{Block}).
@@ -1489,14 +1544,12 @@ version 2005/12/01 or later.
% p.~\pageref{key-R}).
%
%
-% \item \colorbox{yellow!50}{\textbf{New 5.13}}\enskip
-% The command |\arraycolor| takes in as mandatory argument a color and color
-% the whole tabular with that color (excepted the potential exterior rows and
-% columns: cf.~p.~\pageref{exterior}). This command is useful thanks to its key
-% |except-corners| (in the third argument, which is a optional argument between
-% square brackets). The definition of these ``corners'' has been given
-% p.~\pageref{except-corners} when we have presented the key
-% |hvlines-except-corners|.
+% \item The command |\arraycolor| takes in as mandatory argument a color and
+% color the whole tabular with that color (excepted the potential exterior rows
+% and columns: cf.~p.~\pageref{exterior}). This command is useful thanks to its
+% key |except-corners| (in the third argument, which is a optional argument
+% between square brackets). The definition of these ``corners'' has been given
+% p.~\pageref{corners} when we have presented the key |corners|.
%
% \label{arraycolor}
%
@@ -2387,8 +2440,10 @@ version 2005/12/01 or later.
%
% The dotted lines determine virtual blocks which have the same behaviour
% regarding the rules (the rules specified by the specifier \verb+|+ in the
-% preamble and by the keys |hlines|, |vlines|, |hvlines| and
-% |hvlines-except-corners| are not drawn within the blocks).
+% preamble, by the command |\Hline| and by the keys |hlines|, |vlines| and
+% |hvlines| are not drawn within the blocks).\footnote{On the other side, the
+% command \verb|\line| in the \verb|\CodeAfter|
+% (cf.~p.~\pageref{line-in-code-after}) does \emph{not} create block.}
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
@@ -2412,19 +2467,19 @@ version 2005/12/01 or later.
%
% \label{code-after}
% The option |code-after| may be used to give some code that will be executed
-% after the construction of the matrix.\footnote{There is also a key
+% \emph{after} the construction of the matrix.\footnote{There is also a key
% |code-before| described p.~\pageref{code-before}.}
%
% \medskip
% For the legibility of the code, an alternative syntax is provided: it's
-% possible to give the instructions of the |\code-after| at the end of the
+% possible to give the instructions of the |code-after| at the end of the
% environment, after the keyword |\CodeAfter|. Although |\CodeAfter| is a
% keyword, it takes in an optional argument (between square brackets). The keys
% accepted form a subset of the keys of the command |\WithArrowsOptions|.
%
%
% \medskip
-% The experienced users may use, for instance, the PGF/Tikz nodes created by
+% The experienced users may, for instance, use the PGF/Tikz nodes created by
% \pkg{nicematrix} in the |\CodeAfter|. These nodes are described further
% beginning on p.~\pageref{PGF-nodes}.
%
@@ -2434,11 +2489,16 @@ version 2005/12/01 or later.
%
% \subsection{The command \textbackslash line in the \textbackslash CodeAfter}
%
+% \label{line-in-code-after}
% The command |\line| draws directly dotted lines between nodes. It takes in two
% arguments for the two cells to link, both of the form $i$-$j$ where is the
-% number of the row and $j$ is the number of the column. It may be used, for
-% example, to draw a dotted line between two adjacent
-% cells. \label{line-in-code-after}
+% number of the row and $j$ is the number of the column. The options available
+% for the customisation of the dotted lines created by |\Cdots|, |\Vdots|, etc.
+% are also available for this command (cf. p.~\pageref{customisation}).
+%
+% \bigskip
+% This command may be used, for example, to draw a dotted line between two
+% adjacent cells.
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
@@ -2462,10 +2522,29 @@ version 2005/12/01 or later.
% \end{pNiceMatrix}$
% \end{scope}
%
+% \bigskip
+% It can also be used to draw a diagonal line not parallel to the other diagonal
+% lines (by default, the dotted lines drawn by |\Ddots| are ``parallelized'':
+% cf.~p.~\pageref{parallelization}).
+%
% \medskip
-% The options available for the customisation of the dotted lines created by
-% |\Cdots|, |\Vdots|, etc. are also available for this command (cf.
-% p.~\pageref{customisation}).
+% \begin{BVerbatim}
+% \begin{bNiceMatrix}
+% 1 & \Cdots & & 1 & 2 & \Cdots & 2 \\
+% 0 & \Ddots & & \Vdots & \Vdots & \hspace*{2.5cm} & \Vdots \\
+% \Vdots & \Ddots & & & & & \\
+% 0 & \Cdots & 0 & 1 & 2 & \Cdots & 2
+% ~emphase#\CodeAfter \line[shorten=6pt]{1-5}{4-7}@
+% \end{bNiceMatrix}
+% \end{BVerbatim}
+% \[\begin{bNiceMatrix}
+% 1 & \Cdots & & 1 & 2 & \Cdots & 2 \\
+% 0 & \Ddots & & \Vdots & \Vdots & \hspace*{2.5cm} & \Vdots \\
+% \Vdots & \Ddots & & & & & \\
+% 0 & \Cdots & 0 & 1 & 2 & \Cdots & 2
+% \CodeAfter \line[shorten=6pt]{1-5}{4-7}
+% \end{bNiceMatrix}\]
+%
%
%
% \subsection{The command \textbackslash SubMatrix in the \textbackslash CodeAfter}
@@ -3277,10 +3356,11 @@ version 2005/12/01 or later.
% \textbf{Caution} : By default, no node is created in a empty cell.
%
% \smallskip
-% However, it's possible to impose the creation of a node with the command |\NotEmpty|.
-% \footnote{One should note that, with that command, the cell is considered as
-% non-empty, which has consequencies for the continuous dotted lines (cf.
-% p.~\pageref{Cdots}).}
+% However, it's possible to impose the creation of a node with the command
+% |\NotEmpty|. \footnote{One should note that, with that command, the cell is
+% considered as non-empty, which has consequencies for the continuous dotted
+% lines (cf. p.~\pageref{Cdots}) and the computation of the ``corners''
+% (cf.~p.~\pageref{corners}).}
%
% \medskip
% The nodes of a document must have distinct names. That's why the names of the
@@ -3589,24 +3669,26 @@ version 2005/12/01 or later.
% \subsection{The nodes which indicate the position of the rules}
%
% \label{nodes-i}
-% \colorbox{yellow!30}{New 5.11}\enskip The package \pkg{nicematrix}
-% creates a PGF/Tikz node merely called $i$ (with the classical prefix) at the
-% intersection of the horizontal rule of number~$i$ and the vertical rule of
-% number~$j$ (more specifically the potential position of those rules because
-% maybe there are not actually drawn). These nodes are available in the
-% |code-before| and the |\CodeAfter|.
-%
-% \colorbox{yellow!50}{\textbf{New 5.13}}\enskip The last node has also an alias called
-% |last|.
+% The package \pkg{nicematrix} creates a PGF/Tikz node merely called $i$ (with
+% 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$.
+%
+% These nodes are available in the |\CodeBefore| and the |\CodeAfter|.
+%
% \begin{center}
% \begin{NiceTabular}{ccc}[hvlines,rules/width=1pt,rules/color=gray]
-% rose & tulipe & lys \\
-% arum & iris & violette \\
-% muguet & dahlia & souci
+% & tulipe & lys \\
+% arum & & violette mauve \\
+% muguet & dahlia
% \CodeAfter
% \tiny
% \begin{tikzpicture}
-% \foreach \i in {1,2,3,4}
+% \foreach \i in {1,1.5,2,2.5,3,3.5,4}
% {
% \fill [red] (\i) circle (0.5mm) ;
% \node [red,above right] at (\i) {\i} ;
@@ -3618,7 +3700,7 @@ version 2005/12/01 or later.
% \bigskip
% If we use Tikz (we remind that \pkg{nicematrix} does not load Tikz by default,
% by only \textsc{pgf}, which is a sub-layer of Tikz), we can access, in the
-% |\CodeAfter| but also in the |code-before|, to the intersection of the
+% |\CodeAfter| but also in the |\CodeBefore|, to the intersection of the
% (potential) horizontal rule~$i$ and the (potential) vertical rule~$j$ with the
% syntax |(|$i$\verb+-|+$j$|)|.
%
@@ -3655,6 +3737,29 @@ version 2005/12/01 or later.
% 1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1
% \end{NiceMatrix}\]
%
+%
+% \bigskip
+% The nodes of the form $i$|.5| may be used, for example to cross a row of a
+% matrix (if Tikz is loaded).
+%
+% \smallskip
+% \begin{BVerbatim}[boxwidth=11cm,baseline=c]
+% $\begin{pNiceArray}{ccc|c}
+% 2 & 1 & 3 & 0 \\
+% 3 & 3 & 1 & 0 \\
+% 3 & 3 & 1 & 0
+% \CodeAfter
+% \tikz \draw [red] (~emphase#3.5@-|1) -- (~emphase#3.5@-|last) ;
+% \end{pNiceArray}$
+% \end{BVerbatim}
+% $\begin{pNiceArray}{ccc|c}
+% 2 & 1 & 3 & 0 \\
+% 3 & 3 & 1 & 0 \\
+% 3 & 3 & 1 & 0
+% \CodeAfter
+% \tikz \draw [red] (3.5-|1) -- (3.5-|last) ;
+% \end{pNiceArray}$
+%
% \subsection{The nodes corresponding to the command \textbackslash SubMatrix}
%
% \label{node-sub-matrix}
@@ -3829,6 +3934,7 @@ version 2005/12/01 or later.
%
% \subsection{Diagonal lines}
%
+% \label{parallelization}
% By default, all the diagonal lines\footnote{We speak of the lines created by
% |\Ddots| and not the lines created by a command |\line| in |code-after|.} of a
% same array are ``parallelized''. That means that the first diagonal line is
@@ -4319,9 +4425,9 @@ version 2005/12/01 or later.
% (smaller parenthesis are a bit slimer).
%
% \medskip
-% \colorbox{yellow!50}{\textbf{New 5.12}}\enskip In order the solve that
-% problem, it's possible to require the delimiters to be composed with the
-% maximal width, thanks to the boolean key |delimiters/max-width|.
+% In order the solve that problem, it's possible to require the delimiters to be
+% composed with the maximal width, thanks to the boolean key
+% |delimiters/max-width|.
%
% \begin{Verbatim}[formatcom=\small\color{gray}]
% ~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@
@@ -4689,7 +4795,7 @@ version 2005/12/01 or later.
% \end{pNiceArray}\]
%
%
-% \subsection{Utilisation of \textbackslash SubMatrix in the code-before}
+% \subsection{Utilisation of \textbackslash SubMatrix in the \textbackslash CodeBefore}
%
% In the following example, we illustrate the mathematical product of two
% matrices.
@@ -5658,7 +5764,7 @@ version 2005/12/01 or later.
%
% \medskip
% We are able to determine the number of columns specified in the preamble (for
-% the environments with explicit preamble, of course and without the potential
+% the environments with explicit preamble of course and without the potential
% exterior columns).
% \begin{macrocode}
\int_new:N \g_@@_static_num_of_col_int
@@ -5693,10 +5799,15 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% The parameter of position of the label of a block (|c|, |r| or |l|).
+% 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
+% program a key |T| and a key |B|.
% \begin{macrocode}
-\tl_new:N \l_@@_pos_of_block_tl
-\tl_set:Nn \l_@@_pos_of_block_tl { c }
+\tl_new:N \l_@@_hpos_of_block_tl
+\tl_set:Nn \l_@@_hpos_of_block_tl { c }
+\tl_new:N \l_@@_vpos_of_block_tl
+\tl_set:Nn \l_@@_vpos_of_block_tl { c }
% \end{macrocode}
%
% \medskip
@@ -6186,12 +6297,9 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% The flag |\l_@@_except_corners_bool| will be raised when the key
-% |except-corners| will be used. In that case, the corners will be computed
-% before we draw rules and the rules won't be drawn in the corners. As expected,
-% the key |hvlines-except-corners| raises the key |except-corners|.
+% The following parameter correspond to the key |corners|.
% \begin{macrocode}
-\clist_new:N \l_@@_except_corners_clist
+\clist_new:N \l_@@_corners_clist
% \end{macrocode}
%
% \begin{macrocode}
@@ -6435,15 +6543,18 @@ version 2005/12/01 or later.
\keys_define:nn { NiceMatrix / Env }
{
delimiters/max-width .bool_set:N = \l_@@_delimiters_max_width_bool ,
- except-corners .clist_set:N = \l_@@_except_corners_clist ,
- except-corners .default:n = { NW , SW , NE , SE } ,
+% \end{macrocode}
+% The key |hvlines-except-corners| is now deprecated.
+% \begin{macrocode}
hvlines-except-corners .code:n =
{
- \clist_set:Nn \l_@@_except_corners_clist { #1 }
+ \clist_set:Nn \l_@@_corners_clist { #1 }
\clist_set:Nn \l_@@_vlines_clist { all }
\clist_set:Nn \l_@@_hlines_clist { all }
} ,
hvlines-except-corners .default:n = { NW , SW , NE , SE } ,
+ corners .clist_set:N = \l_@@_corners_clist ,
+ corners .default:n = { NW , SW , NE , SE } ,
code-before .code:n =
{
\tl_if_empty:nF { #1 }
@@ -6828,7 +6939,6 @@ version 2005/12/01 or later.
% \begin{macrocode}
\int_compare:nNnT \c@jCol = 1
{ \int_compare:nNnT \l_@@_first_col_int = 1 \@@_begin_of_row: }
- \int_gset:Nn \g_@@_col_total_int { \int_max:nn \g_@@_col_total_int \c@jCol }
% \end{macrocode}
% The content of the cell is composed in the box |\l_@@_cell_box| because we want
% to compute some dimensions of the box. The |\hbox_set_end:| corresponding to
@@ -7023,6 +7133,7 @@ version 2005/12/01 or later.
\@@_node_for_the_cell:
{ \box_use_drop:N \l_@@_cell_box }
}
+ \int_gset:Nn \g_@@_col_total_int { \int_max:nn \g_@@_col_total_int \c@jCol }
\bool_gset_false:N \g_@@_empty_cell_bool
\bool_gset_false:N \g_@@_not_empty_cell_bool
}
@@ -8136,7 +8247,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% First, we have to store our preamble in the token register |\@temptokena|
-% (those ``token registers'' are not supported by \pkg{expl3}).
+% (those ``token registers'' are \emph{not} supported by \pkg{expl3}).
% \begin{macrocode}
\exp_args:NV \@temptokena \g_@@_preamble_tl
% \end{macrocode}
@@ -9862,6 +9973,22 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+% \bigskip
+% We define a new \textsc{pgf} shape for the diag nodes because we want to
+% provide a anchor called |.5| for those nodes.
+% \begin{macrocode}
+\pgfdeclareshape { @@_diag_node }
+ {
+ \savedanchor { \five }
+ {
+ \dim_gset_eq:NN \pgf@x \l_tmpa_dim
+ \dim_gset_eq:NN \pgf@y \l_tmpb_dim
+ }
+ \anchor { 5 } { \five }
+ \anchor { center } { \pgfpointorigin }
+ }
+% \end{macrocode}
+%
%
% \bigskip
% The following command creates the diagonal nodes (in fact, if the matrix is
@@ -9871,13 +9998,35 @@ version 2005/12/01 or later.
{
\pgfpicture
\pgfrememberpicturepositiononpagetrue
- \int_step_inline:nn { \int_max:nn \c@iRow \c@jCol + 1 }
+ \int_step_inline:nn { \int_max:nn \c@iRow \c@jCol }
{
- \@@_qpoint:n { row - \int_min:nn { ##1 } { \c@iRow + 1 } }
- \dim_set_eq:NN \l_tmpa_dim \pgf@y
\@@_qpoint:n { col - \int_min:nn { ##1 } { \c@jCol + 1 } }
- \pgfcoordinate { \@@_env: - ##1 } { \pgfpoint \pgf@x \l_tmpa_dim }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@x
+ \@@_qpoint:n { row - \int_min:nn { ##1 } { \c@iRow + 1 } }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \@@_qpoint:n { col - \int_min:nn { ##1 + 1 } { \c@jCol + 1 } }
+ \dim_set_eq:NN \l_tmpc_dim \pgf@x
+ \@@_qpoint:n { row - \int_min:nn { ##1 + 1 } { \c@iRow + 1 } }
+ \dim_set_eq:NN \l_tmpd_dim \pgf@y
+ \pgftransformshift { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+% \end{macrocode}
+% Now, |\l_tmpa_dim| and |\l_tmpb_dim| become the width and the height of the
+% node (of shape |@à_diag_node|) that we will construct.
+% \begin{macrocode}
+ \dim_set:Nn \l_tmpa_dim { ( \l_tmpc_dim - \l_tmpa_dim ) / 2 }
+ \dim_set:Nn \l_tmpb_dim { ( \l_tmpd_dim - \l_tmpb_dim ) / 2 }
+ \pgfnode { @@_diag_node } { center } { } { \@@_env: - ##1 } { }
}
+% \end{macrocode}
+% Now, the last node. Of course, that is only a |coordinate| because there is
+% not |.5| anchor for that node.
+% \begin{macrocode}
+ \int_set:Nn \l_tmpa_int { \int_max:nn \c@iRow \c@jCol + 1 }
+ \@@_qpoint:n { row - \int_min:nn { \l_tmpa_int } { \c@iRow + 1 } }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@y
+ \@@_qpoint:n { col - \int_min:nn { \l_tmpa_int } { \c@jCol + 1 } }
+ \pgfcoordinate
+ { \@@_env: - \int_use:N \l_tmpa_int } { \pgfpoint \pgf@x \l_tmpa_dim }
\pgfnodealias
{ \@@_env: - last }
{ \@@_env: - \int_eval:n { \int_max:nn \c@iRow \c@jCol + 1 } }
@@ -9885,35 +10034,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% \bigskip
-% As for now, the ½ nodes are not documented and they are created only in the
-% native \textsc{utf8} engines, that is to say XeLaTeX and LuaLaTeX.
-% \begin{macrocode}
-\bool_if:nT
- { \sys_if_engine_xetex_p: || \sys_if_engine_luatex_p: }
- { \tl_put_right:Nn \@@_create_diag_nodes: \@@_create_half_nodes: }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_create_half_nodes:
- {
- \int_step_inline:nn { \int_max:nn \c@iRow \c@jCol }
- {
- \pgfpicture
- \pgfrememberpicturepositiononpagetrue
- \pgfcoordinate { \@@_env: - ##1 ½ }
- {
- \pgfpointscale { 0.5 }
- {
- \pgfpointadd
- { \@@_qpoint:n { ##1 } }
- { \@@_qpoint:n { \int_eval:n { ##1 + 1 } } }
- }
- }
- \endpgfpicture
- }
- }
-% \end{macrocode}
%
% \bigskip
% \subsection*{We draw the dotted lines}
@@ -10754,21 +10874,13 @@ version 2005/12/01 or later.
{
\bool_if:NTF \l_@@_initial_open_bool
{
- % \@@_qpoint:n { row - \int_use:N \l_@@_initial_i_int }
- % \dim_set_eq:NN \l_@@_y_initial_dim \pgf@y
\@@_open_y_initial_dim:
- % \@@_qpoint:n { col - \@@_succ:n \l_@@_initial_j_int }
- % \dim_set_eq:NN \l_@@_x_initial_dim \pgf@x
\@@_open_x_initial_dim:
}
{ \@@_set_initial_coords_from_anchor:n { south~west } }
\bool_if:NTF \l_@@_final_open_bool
{
- % \@@_qpoint:n { row - \@@_succ:n \l_@@_final_i_int }
- % \dim_set_eq:NN \l_@@_y_final_dim \pgf@y
\@@_open_y_final_dim:
- % \@@_qpoint:n { col - \int_use:N \l_@@_final_j_int }
- % \dim_set_eq:NN \l_@@_x_final_dim \pgf@x
\@@_open_x_final_dim:
}
{ \@@_set_final_coords_from_anchor:n { north~east } }
@@ -11247,10 +11359,6 @@ version 2005/12/01 or later.
\exp_args:NNe
\@@_old_multicolumn
{ #1 }
-% \end{macrocode}
-% We will have to replace |\tl_lower_case:n| in the future since it seems to be
-% deprecated.
-% \begin{macrocode}
{
\exp_args:Ne \str_case:nn { \str_foldcase:n { #2 } }
{
@@ -11925,7 +12033,7 @@ version 2005/12/01 or later.
% \end{macrocode}
% First, we compute the corners.
% \begin{macrocode}
- \clist_set:Nn \l_@@_except_corners_clist { #3 }
+ \clist_set:Nn \l_@@_corners_clist { #3 }
\@@_compute_corners:
% \end{macrocode}
% Now, for each cell of the array (excepted the potential exterior rows and
@@ -12151,8 +12259,13 @@ version 2005/12/01 or later.
\tl_if_in:NnTF \l_tmpa_tl { - }
{ \@@_cut_on_hyphen:w ##1 \q_stop }
{ \@@_cut_on_hyphen:w ##1 - ##1 \q_stop }
- \tl_if_empty:NT \l_tmpa_tl { \tl_set:Nn \l_tmpa_tl { 1 } }
- \tl_if_empty:NT \l_tmpb_tl
+ \bool_lazy_or:nnT
+ { \tl_if_blank_p:V \l_tmpa_tl }
+ { \str_if_eq_p:Vn \l_tmpa_tl { * } }
+ { \tl_set:Nn \l_tmpa_tl { 1 } }
+ \bool_lazy_or:nnT
+ { \tl_if_blank_p:V \l_tmpb_tl }
+ { \str_if_eq_p:Vn \l_tmpb_tl { * } }
{ \tl_set:Nx \l_tmpb_tl { \int_use:N \c@jCol } }
\int_compare:nNnT \l_tmpb_tl > \c@jCol
{ \tl_set:Nx \l_tmpb_tl { \int_use:N \c@jCol } }
@@ -12220,7 +12333,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% When the user uses the key |colortbll-like|, the following command will
+% When the user uses the key |colortbl-like|, the following command will
% be linked to |\rowcolor| in the tabular.
% \begin{macrocode}
\NewDocumentCommand \@@_rowcolor_tabular { O { } m }
@@ -12234,15 +12347,23 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%
% \bigskip
% \begin{macrocode}
\NewDocumentCommand \@@_columncolor_preamble { O { } m }
{
- \int_compare:nNnT \c@iRow = 1
+% \end{macrocode}
+% With the following line, we test whether the cell is the first one we
+% encounter in its column (don't forget that some rows may be incomplete).
+% \begin{macrocode}
+ \int_compare:nNnT \c@jCol > \g_@@_col_total_int
{
% \end{macrocode}
% You use |gput_left| because we want the specification of colors for the
% columns drawn before the specifications of color for the rows (and the cells).
+% Be careful: maybe this is not effective since we have an analyze of the
+% instructions in the |\CodeBefore| in order to fill color by color (to avoid
+% the thin white lines).
% \begin{macrocode}
\tl_gput_left:Nx \g_nicematrix_code_before_tl
{
@@ -12360,7 +12481,7 @@ version 2005/12/01 or later.
{ \@@_test_vline_in_block:nnnn ##1 }
\seq_map_inline:Nn \g_@@_pos_of_stroken_blocks_seq
{ \@@_test_vline_in_stroken_block:nnnn ##1 }
- \clist_if_empty:NF \l_@@_except_corners_clist
+ \clist_if_empty:NF \l_@@_corners_clist
\@@_test_in_corner_v:
\bool_if:NTF \g_tmpa_bool
{
@@ -12474,7 +12595,7 @@ version 2005/12/01 or later.
% The following command draws a complete vertical rule in the column |#1| (|#2|
% is the number of consecutive rules specified by the number of \verb+|+ in the
% preamble). This command will be used if there is no block in the array (and
-% the key |except-corners| is not used).
+% the key |corners| is not used).
% \begin{macrocode}
\cs_new_protected:Npn \@@_vline_i_complete:nn #1 #2
{ \@@_vline_ii:nnnn { #1 } { #2 } 1 { \int_use:N \c@iRow } }
@@ -12483,7 +12604,7 @@ version 2005/12/01 or later.
% \bigskip
% The command |\@@_draw_hlines:| draws all the vertical rules excepted in the
% blocks, in the virtual blocks (determined by a command such as |\Cdots|) and in
-% the corners (if the key |except-corners| is used).
+% the corners (if the key |corners| is used).
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_vlines:
{
@@ -12541,7 +12662,7 @@ version 2005/12/01 or later.
{ \@@_test_hline_in_block:nnnn ##1 }
\seq_map_inline:Nn \g_@@_pos_of_stroken_blocks_seq
{ \@@_test_hline_in_stroken_block:nnnn ##1 }
- \clist_if_empty:NF \l_@@_except_corners_clist \@@_test_in_corner_h:
+ \clist_if_empty:NF \l_@@_corners_clist \@@_test_in_corner_h:
\bool_if:NTF \g_tmpa_bool
{
\tl_if_empty:NT \l_tmpc_tl
@@ -12657,7 +12778,7 @@ version 2005/12/01 or later.
% \bigskip
% The command |\@@_draw_hlines:| draws all the horizontal rules excepted in the
% blocks (even the virtual drawn determined by commands such as |\Cdots| and in
-% the corners (if the key |except-corners| is used).
+% the corners (if the key |corners| is used).
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_hlines:
{
@@ -12775,9 +12896,9 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% \subsubsection*{The key except-corners}
+% \subsubsection*{The key corners}
%
-% When the key |except-corners| is raised, the rules are not drawn in the
+% When the key |corners| is raised, the rules are not drawn in the
% corners. Of course, we have to compute the corners before we begin to draw the
% rules.
%
@@ -12789,7 +12910,7 @@ version 2005/12/01 or later.
% empty cells (and not in a block) considered in the corners of the array.
% \begin{macrocode}
\seq_clear_new:N \l_@@_empty_corner_cells_seq
- \clist_map_inline:Nn \l_@@_except_corners_clist
+ \clist_map_inline:Nn \l_@@_corners_clist
{
\str_case:nnF { ##1 }
{
@@ -13611,12 +13732,16 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block / FirstPass }
{
- l .code:n = \tl_set:Nn \l_@@_pos_of_block_tl l ,
+ l .code:n = \tl_set:Nn \l_@@_hpos_of_block_tl l ,
l .value_forbidden:n = true ,
- r .code:n = \tl_set:Nn \l_@@_pos_of_block_tl r ,
+ r .code:n = \tl_set:Nn \l_@@_hpos_of_block_tl r ,
r .value_forbidden:n = true ,
- c .code:n = \tl_set:Nn \l_@@_pos_of_block_tl c ,
+ c .code:n = \tl_set:Nn \l_@@_hpos_of_block_tl c ,
c .value_forbidden:n = true ,
+ t .code:n = \tl_set:Nn \l_@@_vpos_of_block_tl t ,
+ t .value_forbidden:n = true ,
+ b .code:n = \tl_set:Nn \l_@@_vpos_of_block_tl b ,
+ b .value_forbidden:n = true ,
color .tl_set:N = \l_@@_color_tl ,
color .value_required:n = true ,
}
@@ -13680,15 +13805,19 @@ version 2005/12/01 or later.
{ \int_set:Nn \l_tmpb_int { #2 } }
% \end{macrocode}
%
+% \medskip
+% If the block is mono-column.
% \begin{macrocode}
\int_compare:nNnTF \l_tmpb_int = 1
{
\tl_if_empty:NTF \l_@@_cell_type_tl
- { \tl_set:Nn \l_@@_pos_of_block_tl c }
- { \tl_set_eq:NN \l_@@_pos_of_block_tl \l_@@_cell_type_tl }
+ { \tl_set:Nn \l_@@_hpos_of_block_tl c }
+ { \tl_set_eq:NN \l_@@_hpos_of_block_tl \l_@@_cell_type_tl }
}
- { \tl_set:Nn \l_@@_pos_of_block_tl c }
+ { \tl_set:Nn \l_@@_hpos_of_block_tl c }
% \end{macrocode}
+% The value of |\l_@@_hpos_of_block_tl| may be modified by the keys of the
+% command |\Block| that we will analyze now.
%
% \medskip
% \begin{macrocode}
@@ -13775,18 +13904,24 @@ version 2005/12/01 or later.
% the tabular is the same as the external alignment of the tabular (that is to
% say the position of the block in its zone of merged cells).
% \begin{macrocode}
- \bool_if:NT \g_@@_rotate_bool { \tl_set:Nn \l_@@_pos_of_block_tl c }
+ \bool_if:NT \g_@@_rotate_bool { \tl_set:Nn \l_@@_hpos_of_block_tl c }
\bool_if:NTF \l_@@_NiceTabular_bool
{
- \exp_args:Nnx \begin { tabular }
- { @ { } \l_@@_pos_of_block_tl @ { } }
+ \use:x
+ {
+ \exp_not:N \begin { tabular } [ \l_@@_vpos_of_block_tl ]
+ { @ { } \l_@@_hpos_of_block_tl @ { } }
+ }
#5
\end { tabular }
}
{
\c_math_toggle_token
- \exp_args:Nnx \begin { array }
- { @ { } \l_@@_pos_of_block_tl @ { } }
+ \use:x
+ {
+ \exp_not:N \begin { array } [ \l_@@_vpos_of_block_tl ]
+ { @ { } \l_@@_hpos_of_block_tl @ { } }
+ }
#5
\end { array }
\c_math_toggle_token
@@ -13847,11 +13982,11 @@ version 2005/12/01 or later.
% \end{macrocode}
% In the list of options |#3|, maybe there is a key for the horizontal alignment
% (|l|, |r| or |c|). In that case, that key has been read and stored in
-% |\l_@@_pos_of_block_tl|. However, maybe there were no key of the horizontal
+% |\l_@@_hpos_of_block_tl|. However, maybe there were no key of the horizontal
% alignement and that's why we put a key corresponding to the value of
-% |\l_@@_pos_of_block_tl|, which is fixed by the type of current column.
+% |\l_@@_hpos_of_block_tl|, which is fixed by the type of current column.
% \begin{macrocode}
- { \exp_not:n { #3 } , \l_@@_pos_of_block_tl }
+ { \exp_not:n { #3 } , \l_@@_hpos_of_block_tl }
{
\box_use_drop:c
{ g_@@_ block _ box _ \int_use:N \g_@@_block_box_int _ box }
@@ -13890,9 +14025,12 @@ version 2005/12/01 or later.
% say the position of the block in its zone of merged cells).
% \begin{macrocode}
\bool_if:NT \g_@@_rotate_bool
- { \tl_set:Nn \l_@@_pos_of_block_tl c }
- \exp_args:Nnx \begin { tabular }
- { @ { } \l_@@_pos_of_block_tl @ { } }
+ { \tl_set:Nn \l_@@_hpos_of_block_tl c }
+ \use:x
+ {
+ \exp_not:N \begin { tabular } [ \l_@@_vpos_of_block_tl ]
+ { @ { } \l_@@_hpos_of_block_tl @ { } }
+ }
#5
\end { tabular }
\group_end:
@@ -13903,10 +14041,15 @@ version 2005/12/01 or later.
\dim_set_eq:NN \extrarowheight \c_zero_dim
#4
\bool_if:NT \g_@@_rotate_bool
- { \tl_set:Nn \l_@@_pos_of_block_tl c }
+ { \tl_set:Nn \l_@@_hpos_of_block_tl c }
\c_math_toggle_token
- \exp_args:Nnx \begin { array }
- { @ { } \l_@@_pos_of_block_tl @ { } } #5 \end { array }
+ \use:x
+ {
+ \exp_not:N \begin { array } [ \l_@@_vpos_of_block_tl ]
+ { @ { } \l_@@_hpos_of_block_tl @ { } }
+ }
+ #5
+ \end { array }
\c_math_toggle_token
\group_end:
}
@@ -13937,12 +14080,16 @@ version 2005/12/01 or later.
borders .value_required:n = true ,
line-width .dim_set:N = \l_@@_line_width_dim ,
line-width .value_required:n = true ,
- l .code:n = \tl_set:Nn \l_@@_pos_of_block_tl l ,
+ l .code:n = \tl_set:Nn \l_@@_hpos_of_block_tl l ,
l .value_forbidden:n = true ,
- r .code:n = \tl_set:Nn \l_@@_pos_of_block_tl r ,
+ r .code:n = \tl_set:Nn \l_@@_hpos_of_block_tl r ,
r .value_forbidden:n = true ,
- c .code:n = \tl_set:Nn \l_@@_pos_of_block_tl c ,
+ c .code:n = \tl_set:Nn \l_@@_hpos_of_block_tl c ,
c .value_forbidden:n = true ,
+ t .code:n = \tl_set:Nn \l_@@_vpos_of_block_tl t ,
+ t .value_forbidden:n = true ,
+ b .code:n = \tl_set:Nn \l_@@_vpos_of_block_tl b ,
+ b .value_forbidden:n = true ,
unknown .code:n = \@@_error:n { Unknown~key~for~Block }
}
% \end{macrocode}
@@ -14266,7 +14413,7 @@ version 2005/12/01 or later.
\pgfpointanchor
{ \@@_env: - #1 - #2 - block - short }
{
- \str_case:Vn \l_@@_pos_of_block_tl
+ \str_case:Vn \l_@@_hpos_of_block_tl
{
c { center }
l { west }
@@ -14281,7 +14428,7 @@ version 2005/12/01 or later.
\pgfnode
{ rectangle }
{
- \str_case:Vn \l_@@_pos_of_block_tl
+ \str_case:Vn \l_@@_hpos_of_block_tl
{
c { base }
l { base~west }
@@ -14302,18 +14449,18 @@ version 2005/12/01 or later.
% If we are in the first column, we must put the block as if it was with the key~|r|.
% \begin{macrocode}
\int_compare:nNnT { #2 } = 0
- { \tl_set:Nn \l_@@_pos_of_block_tl r }
+ { \tl_set:Nn \l_@@_hpos_of_block_tl r }
\bool_if:nT \g_@@_last_col_found_bool
{
\int_compare:nNnT { #2 } = \g_@@_col_total_int
- { \tl_set:Nn \l_@@_pos_of_block_tl l }
+ { \tl_set:Nn \l_@@_hpos_of_block_tl l }
}
\pgftransformshift
{
\pgfpointanchor
{ \@@_env: - #1 - #2 - block - short }
{
- \str_case:Vn \l_@@_pos_of_block_tl
+ \str_case:Vn \l_@@_hpos_of_block_tl
{
c { center }
l { west }
@@ -14325,7 +14472,7 @@ version 2005/12/01 or later.
\pgfnode
{ rectangle }
{
- \str_case:Vn \l_@@_pos_of_block_tl
+ \str_case:Vn \l_@@_hpos_of_block_tl
{
c { center }
l { west }
@@ -14659,7 +14806,7 @@ version 2005/12/01 or later.
% \end{macrocode}
% We put the cell with |\diagbox| in the sequence |\g_@@_pos_of_blocks_seq|
% because a cell with |\diagbox| must be considered as non empty by the key
-% |except-corners|.
+% |corners|.
% \begin{macrocode}
\seq_gput_right:Nx \g_@@_pos_of_blocks_seq
{
@@ -15857,7 +16004,7 @@ version 2005/12/01 or later.
\@@_msg_new:nn { bad~corner }
{
#1~is~an~incorrect~specification~for~a~corner~(in~the~keys~
- 'except-corners'~and~'hvlines-except-corners').~The~available~
+ 'corners'~and~'except-corners').~The~available~
values~are:~NW,~SW,~NE~and~SE.\\
If~you~go~on,~this~specification~of~corner~will~be~ignored.
}
@@ -16093,6 +16240,7 @@ version 2005/12/01 or later.
code-for-first-row,~
code-for-last-col,~
code-for-last-row,~
+ corners,~
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
@@ -16102,7 +16250,6 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
- hvlines-except-corners,~
last-col,~
last-row,~
left-margin,~
@@ -16144,6 +16291,7 @@ version 2005/12/01 or later.
code-for-last-row,~
colortbl-like,~
columns-width,~
+ corners,~
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
@@ -16154,7 +16302,6 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
- hvlines-except-corners,~
last-col,~
last-row,~
left-margin,~
@@ -16168,6 +16315,7 @@ version 2005/12/01 or later.
rules~(with~the~subkeys~'color'~and~'width'),~
small,~
t,~
+ tabularnote,~
vlines,~
xdots/color,~
xdots/shorten~and~
@@ -16202,6 +16350,7 @@ version 2005/12/01 or later.
code-for-last-row,~
colortbl-like,~
columns-width,~
+ corners,~
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
@@ -16212,7 +16361,6 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
- hvlines-except-corners,~
l,~
last-col,~
last-row,~
@@ -16256,6 +16404,7 @@ version 2005/12/01 or later.
code-for-last-row,~
colortbl-like,~
columns-width,~
+ corners,~
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
@@ -16265,7 +16414,6 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
- hvlines-except-corners,~
last-col,~
last-row,~
left-margin,~
@@ -16278,6 +16426,7 @@ version 2005/12/01 or later.
right-margin,~
rules~(with~the~subkeys~'color'~and~'width'),~
t,~
+ tabularnote,~
vlines,~
xdots/color,~
xdots/shorten~and~
@@ -16766,6 +16915,15 @@ version 2005/12/01 or later.
% The keys |vlines| and |hlines| takes in as value a (comma-separated) list of
% numbers (for the rules to draw).
%
+%
+% \subsection*{Changes between versions 5.13 and 5.14}
+%
+% Nodes of the forme |(1.5)|, |(2.5)|, |(3.5)|, etc.
+%
+% Keys |t| and |b| for the command |\Block|.
+%
+% Key |corners|.
+%
% \PrintIndex
%
% \tableofcontents