summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nicematrix/nicematrix.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/nicematrix/nicematrix.tex')
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.tex75
1 files changed, 46 insertions, 29 deletions
diff --git a/macros/latex/contrib/nicematrix/nicematrix.tex b/macros/latex/contrib/nicematrix/nicematrix.tex
index dc565d2160..9987ba819b 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix.tex
@@ -3153,7 +3153,7 @@ $\begin{bNiceMatrix}
\bigskip
\colorbox{yellow!50}{\textbf{New 6.20}}\enskip
-With the key |xdots/horizontal-labels|, the labels stay horizontal\par\nobreak
+With the key |xdots/horizontal-labels|, the labels stay horizontal.\par\nobreak
%
\medskip
\begin{BVerbatim}[baseline=c,boxwidth=10cm]
@@ -4039,7 +4039,9 @@ together, separated by commas (this is similar to the option |multiple| of
\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.
+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 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}).
@@ -4835,11 +4837,12 @@ counter).
\smallskip
\index{name!key for an environment}
-However, it's advisable to use instead the key |name|. 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. It's
-possible to use these nodes with \textsc{pgf} but the final user will
+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
+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.
+It's possible to use these nodes with \textsc{pgf} but the final user will
probably prefer to use Tikz (which is a convenient layer upon \textsc{pgf}).
However, one should remind that \pkg{nicematrix} doesn't load Tikz by default.
In the following examples, we assume that Tikz has been loaded.
@@ -6147,31 +6150,36 @@ In fact, it's even possible to draw solid lines with the commands |\Cdots|,
has been loaded, which impacts the shape of the arrow tips.}
\begin{Verbatim}
-\NiceMatrixOptions
- {nullify-dots,code-for-first-col = \color{blue},code-for-first-row=\color{blue}}
-$\begin{pNiceMatrix}[first-row,first-col,xdots/horizontal-labels]
- & & \Ldots[line-style={solid,<->},shorten=0pt]^{n \text{ columns}} \\
- & 1 & 1 & 1 & \Ldots & 1 \\
- & 1 & 1 & 1 & & 1 \\
-\Vdots[line-style={solid,<->}]_{n \text{ rows}} & 1 & 1 & 1 & & 1 \\
- & 1 & 1 & 1 & & 1 \\
- & 1 & 1 & 1 & \Ldots & 1
-\end{pNiceMatrix}$
+\tikzset{H/.style = {solid,<->,shorten > = -1mm, shorten < = -1mm}}
+\tikzset{V/.style = {solid,<->}}
+\NiceMatrixOptions{xdots/horizontal-labels}
+$\begin{pNiceArray}{ccc|cc}[first-row,last-col,margin]
+\Hdotsfor[line-style=H]{3}^{3} & \Hdotsfor[line-style=H]{2}^{2} \\
+2 & 1 & 1 & 1 & 1 & \hspace*{4mm}\Vdotsfor[line-style=V]{3}^{3}\\
+1 & 1 & 1 & 1 & 1 \\
+1 & 1 & 1 & 1 & 1 \\
+\Hline
+1 & 1 & 1 & 1 & 1 & \Vdotsfor[line-style=V]{2}^{2}\\
+1 & 1 & 1 & 1 & 1 \\
+\end{pNiceArray}$
\end{Verbatim}
-\begin{scope}
-\NiceMatrixOptions
- {nullify-dots,code-for-first-col = \color{blue},code-for-first-row=\color{blue}}
-\[\begin{pNiceMatrix}[first-row,first-col,xdots/horizontal-labels]
- & & \Ldots[line-style={solid,<->},shorten=0pt]^{n \text{ columns}} \\
- & 1 & 1 & 1 & \Ldots & 1 \\
- & 1 & 1 & 1 & & 1 \\
-\Vdots[line-style={solid,<->}]_{n \text{ rows}} & 1 & 1 & 1 & & 1 \\
- & 1 & 1 & 1 & & 1 \\
- & 1 & 1 & 1 & \Ldots & 1
-\end{pNiceMatrix}\]
-\end{scope}
+\begin{center}
+\tikzset{H/.style = {solid,<->,shorten > = -1mm, shorten < = -1mm}}
+\tikzset{V/.style = {solid,<->}}
+\NiceMatrixOptions{xdots/horizontal-labels}
+$\begin{pNiceArray}{ccc|cc}[first-row,last-col,margin]
+\Hdotsfor[line-style=H]{3}^{3} & \Hdotsfor[line-style=H]{2}^{2} \\
+2 & 1 & 1 & 1 & 1 & \hspace*{4mm}\Vdotsfor[line-style=V]{3}^{3}\\
+1 & 1 & 1 & 1 & 1 \\
+1 & 1 & 1 & 1 & 1 \\
+\Hline
+1 & 1 & 1 & 1 & 1 & \Vdotsfor[line-style=V]{2}^{2}\\
+1 & 1 & 1 & 1 & 1 \\
+\end{pNiceArray}$
+\end{center}
+
\subsection{Dashed rules}
\label{dashed}
@@ -6877,6 +6885,15 @@ The successive versions of the file |nicematrix.sty| provided by TeXLive are ava
\nolinkurl{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}
}
+\subsection*{Changes between version 6.20 and 6.20a}
+
+The value of the key |name| of an environment of \pkg{nicematrix} is expanded
+(in the TeX sens).
+
+The labels of the tabular notes (created by the command |\tabularnote|) are now
+composed in an overlapping position \emph{only} when the horizontal alignment
+mode of the column is |c| or |r|.
+
\subsection*{Changes between version 6.19 and 6.20}
New key |xdots/horizontal-labels|.