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.tex101
1 files changed, 61 insertions, 40 deletions
diff --git a/macros/latex/contrib/nicematrix/nicematrix.tex b/macros/latex/contrib/nicematrix/nicematrix.tex
index f09d282e10..dc565d2160 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix.tex
@@ -17,9 +17,8 @@
\usepackage{tocloft}
\setlength{\cftsubsecnumwidth}{3em} % for the numbers of subsections of the TOC
-% On utilise \MakeShortVerb de shortvrb et pas \DefineShortVerb de fancyvrb
-% car on ne veut pas que le contenu des petits éléments en verbatim soit colorié
-% en gris
+% We use \MakeShortVerb of shortvrb and not \DefineShortVerb of fancyvrb
+% because we don't want small elements in verbatim to be colored in gray
\usepackage{shortvrb}
\MakeShortVerb{\|}
@@ -3151,6 +3150,26 @@ $\begin{bNiceMatrix}
0 & & 1
\end{bNiceMatrix}$
+
+\bigskip
+\colorbox{yellow!50}{\textbf{New 6.20}}\enskip
+With the key |xdots/horizontal-labels|, the labels stay horizontal\par\nobreak
+%
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+$\begin{bNiceMatrix}[xdots/horizontal-labels]
+1 & \hspace*{1cm} & 0 \\[8mm]
+ & ~emphase#\Ddots^{n \text{ times}}@ & \\
+0 & & 1
+\end{bNiceMatrix}$
+\end{BVerbatim}
+$\begin{bNiceMatrix}[xdots/horizontal-labels]
+1 & \hspace*{1cm} & 0 \\[8mm]
+ & \Ddots^{n \text{ times}} & \\
+0 & & 1
+\end{bNiceMatrix}$
+
+
\subsection{Customisation of the dotted lines}
\label{customisation}
@@ -3161,12 +3180,14 @@ $\begin{bNiceMatrix}
\index{shorten (key for the dotted rules)}
\index{shorten-end (key for the dotted rules)}
\index{shorten-start (key for the dotted rules)}
+\index{horizontal-labels (key for the dotted rules)}
The dotted lines drawn by |\Ldots|, |\Cdots|, |\Vdots|, |\Ddots|, |\Iddots|,
|\Hdotsfor| and |\Vdotsfor| (and by the command |\line| in the |\CodeAfter|
which is described p.~\pageref{line-in-code-after}) may be customized by the following
options (specified between square brackets after the command):
\begin{itemize}
+\item |horizontal-labels|;
\item |color|;
\item |radius|;
\item |shorten-start|, |shorten-end| and |shorten|;
@@ -3179,6 +3200,7 @@ These options may also be fixed with |\NiceMatrixOptions|, as options of
must be prefixed by |xdots| (\textsl{xdots} to remind that it works for
|\Cdots|, |\Ldots|, |\Vdots|, etc.), and, thus have for names:
\begin{itemize}
+\item |xdots/horizontal-labels|;
\item |xdots/color|;
\item |xdots/radius|;
\item |xdots/shorten-start|, |xdots/shorten-end| and |xdots/shorten|;
@@ -3188,38 +3210,33 @@ must be prefixed by |xdots| (\textsl{xdots} to remind that it works for
For the clarity of the explanations, we will use those names.
-\bigskip
-\textbf{The option xdots/color}\par\nobreak
-
-\smallskip
-The option |xdots/color| fixes the color or the dotted line. However, one should
-remark that the dotted lines drawn in the exterior rows and columns have a
-special treatment: cf. p.~\pageref{exterior}.
\bigskip
-\textbf{The option xdots/radius}\par\nobreak
-
-The option |radius| fixes the radius of the dots. The initial value is 0.53~pt.
+With the key \Definition{xdots/horizontal-labels}, the labels (introduced by |_|
+and |^|) stay horizontal.
\bigskip
-\textbf{The option xdots/shorten}\par\nobreak
+The option \Definition{xdots/color} fixes the color or the dotted line. However,
+one should remark that the dotted lines drawn in the exterior rows and columns
+have a special treatment: cf. p.~\pageref{exterior}.
-\smallskip
-The keys |xdots/shorten-start| and |xdots/shorten-end| fix the margin at the
-extremities of the line. The key |xdots/shorten| fixes both parameters.
-The initial value is 0.3~em (it is recommanded to use a unit of length
-dependent of the current font).
+\bigskip
+The option \Definition{radius} fixes the radius of the dots. The initial value
+is 0.53~pt.
\bigskip
-\textbf{The option xdots/inter}\par\nobreak
+The keys \Definition{xdots/shorten-start} and \Definition{xdots/shorten-end} fix
+the margin at the extremities of the line. The key |xdots/shorten| fixes both
+parameters. The initial value is 0.3~em (it is recommanded to use a unit of
+length dependent of the current font).
-\smallskip
-The option |xdots/inter| fixes the length between the dots. The initial value
-is 0.45~em (it is recommanded to use a unit of length dependent of the current
-font).
+\bigskip
+The option \Definition{xdots/inter} fixes the length between the dots. The
+initial value is 0.45~em (it is recommanded to use a unit of length dependent of
+the current font).
\bigskip
-\textbf{The option xdots/line-style}\par\nobreak
+\textbf{The option \Definition{xdots/line-style}}\par\nobreak
\smallskip
It should be pointed that, by default, the lines drawn by Tikz with the
@@ -3851,18 +3868,18 @@ In fact, the commands |\OverBrace| and |\UnderBrace| take in an optional
argument (in first position and between square brackets) for a list of
\textsl{key=value} pairs. The available keys are:
\begin{itemize}
-\item |left-shorten| and |right-shorten| which do not take in value; when the
-key |left-shorten| is used, the abscissa of the left extremity of the brace is
-computed with the contents of the cells of the involved sub-array, otherwise,
-the position of the potential vertical rule is used (idem for
-|right-shorten|).
+\item \Definition{left-shorten} and \Definition{right-shorten} which do not take
+in value; when the key |left-shorten| is used, the abscissa of the left
+extremity of the brace is computed with the contents of the cells of the
+involved sub-array, otherwise, the position of the potential vertical rule is
+used (idem for |right-shorten|).
-\item |shorten|, which is the conjunction of the keys |left-shorten| and
-|right-shorten|;
+\item \Definition{shorten}, which is the conjunction of the keys |left-shorten|
+and |right-shorten|;
-\item |yshift|, which shifts vertically the brace (and its label);
+\item \Definition{yshift}, which shifts vertically the brace (and its label);
-\item |color|, which sets the color of the brace (and its label).
+\item \Definition{color}, which sets the color of the brace (and its label).
\end{itemize}
\bigskip
@@ -4077,7 +4094,7 @@ with the following code (the package \pkg{caption} has been loaded in this docum
\begin{NiceTabular}{@{}llc@{}
[
caption = A tabular whose caption has been specified by the key
- \texttt{caption}~emphase#\tabularnote[$\star$]{It's possible to put a tabular note in the caption}! ,
+ \texttt{caption}~emphase#\tabularnote[$\star$]{It's possible to put a tabular note in the caption.}! ,
label = t:tabularnote ,
tabularnote = Some text before the notes. ,
notes/bottomrule
@@ -5381,7 +5398,7 @@ been created with |\SubMatrix\{{2-2}{3-3}\}|).
\index{node@\textbf{Nodes of PGF/Tikz}|)}
-\section{API for the developpers}
+\section{API for the developers}
The package \pkg{nicematrix} provides two variables which are internal but
public\footnote{According to the LaTeX3 conventions,
@@ -5399,7 +5416,7 @@ These variables contain the code of what we have called the ``|code-before|''
(usually specified at the beginning of the environment with the syntax using
the keywords |\CodeBefore| and |\Body|) and the ``|code-after|'' (usually
specified at the end of the environment after the keyword |\CodeAfter|). The
-developper can use them to add code from a cell of the array (the affectation
+developer can use them to add code from a cell of the array (the affectation
must be global, allowing to exit the cell, which is a TeX group).
\medskip
@@ -6074,7 +6091,7 @@ $\begin{pNiceArray}{*6c|c}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
The option |line-style| controls the style of the lines drawn by |\Ldots|,
|\Cdots|, etc. Thus, it's possible with these commands to draw lines which are
-not longer dotted.
+not longer dotted (TikZ should be loaded).
\index{line-style (key for the dotted rules)|textit}
@@ -6132,7 +6149,7 @@ 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]
+$\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 \\
@@ -6146,7 +6163,7 @@ $\begin{pNiceMatrix}[first-row,first-col]
\begin{scope}
\NiceMatrixOptions
{nullify-dots,code-for-first-col = \color{blue},code-for-first-row=\color{blue}}
-\[\begin{pNiceMatrix}[first-row,first-col]
+\[\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 \\
@@ -6860,6 +6877,10 @@ 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.19 and 6.20}
+
+New key |xdots/horizontal-labels|.
+
\subsection*{Changes between version 6.18 and 6.19}
The command |\tabularnote| now supports an optional argument (between square