From 7b8bd496c62a5a8e18fb7a038217d4118c02b1e2 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 13 Dec 2022 03:02:44 +0000 Subject: CTAN sync 202212130302 --- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 510884 -> 510920 bytes macros/latex/contrib/nicematrix/nicematrix.dtx | 826 +++++++++++---------- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1324741 -> 1326867 bytes 3 files changed, 418 insertions(+), 408 deletions(-) (limited to 'macros/latex/contrib/nicematrix') diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf index db0eac769e..4c02bff4e4 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix-french.pdf and b/macros/latex/contrib/nicematrix/nicematrix-french.pdf differ diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index f36475a7a5..71f6ee632c 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -17,8 +17,8 @@ % % \fi % \iffalse -\def\myfileversion{6.13d} -\def\myfiledate{2022/11/20} +\def\myfileversion{6.13e} +\def\myfiledate{2022/12/12} % % %<*batchfile> @@ -6006,16 +6006,20 @@ version 2005/12/01 or later. \@ifpackageloaded { mdwtab } { \@@_fatal:n { mdwtab~loaded } } { - \bool_if:NF \c_@@_no_test_for_array_bool + \@ifpackageloaded { fontspec } + { } { - \group_begin: - \hbox_set:Nn \l_tmpa_box - { - \begin { tabular } { c > { \@@_security_test:n } c c } - text & & text - \end { tabular } - } - \group_end: + \bool_if:NF \c_@@_no_test_for_array_bool + { + \group_begin: + \hbox_set:Nn \l_tmpa_box + { + \begin { tabular } { c > { \@@_security_test:n } c c } + text & & text + \end { tabular } + } + \group_end: + } } } } @@ -7217,6 +7221,7 @@ version 2005/12/01 or later. % \bigskip % \textbf{Some utilities} % +% \medskip % \begin{macrocode} \cs_set_protected:Npn \@@_cut_on_hyphen:w #1-#2\q_stop { @@ -17321,7 +17326,11 @@ version 2005/12/01 or later. { \tl_if_blank:nTF { #2 } { \@@_Block_i 1-1 \q_stop } - { \@@_Block_i #2 \q_stop } + { + \int_compare:nNnTF { \char_value_catcode:n { 45 } } = { 13 } + \@@_Block_i_czech \@@_Block_i + #2 \q_stop + } { #1 } { #3 } { #4 } } } @@ -17334,6 +17343,17 @@ version 2005/12/01 or later. \cs_new:Npn \@@_Block_i #1-#2 \q_stop { \@@_Block_ii:nnnnn { #1 } { #2 } } % \end{macrocode} % +% With \pkg{babel} with the key |czech|, the character |-| (hyphen) is active. +% That's why we need a special version. Remark that we could not use a +% preprocessor in the command |\@@_Block:| to do the job because the command +% |\@@_Block:| is defined with the command |\NewExpandableDocumentCommand|. +% \begin{macrocode} +{ + \char_set_catcode_active:N - + \cs_new:Npn \@@_Block_i_czech #1-#2 \q_stop { \@@_Block_ii:nnnnn { #1 } { #2 } } +} +% \end{macrocode} +% % \medskip % Now, the arguments have been extracted: |#1| is $i$ (the number of rows of the % block), |#2| is $j$ (the number of columns of the block), |#3| is the list of @@ -21308,354 +21328,236 @@ version 2005/12/01 or later. % } % % -% \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). -% -% Modification of the code which is now twice faster. -% -% \subsection*{Changes between versions 1.1 and 1.2} +% \subsection*{Changes between version 6.12 and 6.13} % -% New environment |{NiceArray}| with column types |L|, |C| and |R|. +% New environment |{TabularNote}| in |{NiceTabular}| with the same semantic as +% the key |tabularnote| (for legibility). % -% \subsection*{Changes between version 1.2 and 1.3} +% The command |\Hline| nows accepts options (between square brackets). % -% New environment |{pNiceArrayC}| and its variants. +% \subsection*{Changes between version 6.11 and 6.12} % -% Correction of a bug in the definition of |{BNiceMatrix}|, |{vNiceMatrix}| and -% |{VNiceMatrix}| (in fact, it was a typo). +% New keys |caption|, |short-caption| and |label| in the environment +% |{NiceTabular}|. % -% Options are now available locally in |{pNiceMatrix}| and its variants. +% In |{NiceTabular}|, a caption specified by the key |caption| is wrapped to the +% width of the tabular. % -% The names of the options are changed. The old names were names in ``camel -% style''. +% Correction of a bug: it's now possible to use |\OverBrace| and |\UnderBrace| +% with \pkg{unicode-math} (with XeLaTeX or LuaLaTeX). % -% \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 6.10 and 6.11} % -% \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. +% New key |matrix/columns-type| to specify the type of columns of the matrices. % -% \subsection*{Changes between version 2.0 and 2.1} +% New key |ccommand| in |custom-line| and new command |\cdottedline|. % -% New implementation of the environment |{pNiceArrayRC}|. With this new -% implementation, there is no restriction on the width of the columns. +% \subsection*{Changes between version 6.9 and 6.10} % -% The package \pkg{nicematrix} no longer loads \pkg{mathtools} but only -% \pkg{amsmath}. +% New keys |xdots/shorten-start| and |xdots/shorten-end|. % -% Creation of ``medium nodes'' and ``large nodes''. +% It's possible to use |\line| in the |\CodeAfter| between two blocks (and not +% only two cells). % -% \subsection*{Changes between version 2.1 and 2.1.1} +% \subsection*{Changes between version 6.8 and 6.9} % -% Small corrections: for example, the option |code-for-first-row| is now -% available in the command |\NiceMatrixOptions|. +% New keys |xdots/radius| and |xdots/inter| for customisation of the continuous +% dotted lines. % -% 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|.} -% +% New command |\ShowCellNames| available in the |\CodeBefore| and in the |\CodeAfter|. % -% \subsection*{Changes between version 2.1.2 and 2.1.3} +% \subsection*{Changes between version 6.7 and 6.8} % -% 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}\] +% In the notes of a tabular (with the command |\tabularnote|), the duplicates +% are now detected: when several commands |\tabularnote| are used with the same +% argument, only one note is created at the end of the tabular (but all the +% labels are present, of course). % -% \subsection*{Changes between version 2.1.3 and 2.1.4} +% \subsection*{Changes between version 6.6 and 6.7} % -% 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). +% Key |color| for |\OverBrace| and |\UnderBrace| in the |\CodeAfter| % -% See |www.texdev.net/2018/04/21/xparse-optional-arguments-at-the-end| +% Key |tikz| in the key |borders| of a command |\Block| % -% \subsection*{Changes between version 2.1.4 and 2.1.5} +% \subsection*{Changes between version 6.5 and 6.6} % -% Compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}. -% -% Option |allow-duplicate-names|. +% Keys |tikz| and |width| in |custom-line|. % -% \subsection*{Changes between version 2.1.5 and 2.2} +% \subsection*{Changes between versions 6.4 and 6.5} % -% 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}). +% Key |custom-line| in |\NiceMatrixOptions|. % -% Possibility to draw vertical dotted lines to separate columns with the -% specifier ``|:|'' in the preamble (similar to the classical specifier -% ``"|"'' and the specifier ``|:|'' of \pkg{arydshln}). +% Key |respect-arraystretch|. % -% \subsection*{Changes between version 2.2 and 2.2.1} +% \subsection*{Changes between versions 6.3 and 6.4} % -% Improvment of the vertical dotted lines drawn by the specifier ``:'' in the -% preamble. +% New commands |\UnderBrace| and |\OverBrace| in the |\CodeAfter|. % -% Modification of the position of the dotted lines drawn by |\hdottedline|. +% Correction of a bug of the key |baseline| (cf. question 623258 on TeX StackExchange). % -% \subsection*{Changes between version 2.2.1 and 2.3} +% Correction of a bug with the columns |V| of \pkg{varwidth}. % -% Compatibility with the column type |S| of \pkg{siunitx}. -% -% Option |hlines|. -% +% Correction of a bug: the use of |\hdottedline| and |:| in the preamble of the +% array (of another letter specified by |letter-for-dotted-lines|) was +% incompatible with the key |xdots/line-style|. % -% \subsection*{Changes between version 2.3 and 3.0} +% \subsection*{Changes between versions 6.2 and 6.3} % -% Modification of |\Hdotsfor|. Now |\Hdotsfor| erases the |\vlines| (of ``"|"'') -% as |\hdotsfor| does. +% Keys |nb-rows|, |rowcolor| and |bold| for the command |\RowStyle| % -% 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|. +% Key |name| for the command |\Block|. % -% \subsection*{Changes between version 3.0 and 3.1} +% Support for the columns |V| of \pkg{varwidth}. % -% Command |\Block| to draw block matrices. +% \subsection*{Changes between versions 6.1 and 6.2} % -% Error message when the user gives an incorrect value for |last-row|. +% Better compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}. % -% A dotted line can no longer cross another dotted line (excepted the dotted -% lines drawn by |\cdottedline|, the symbol ``|:|'' (in the preamble of the -% array) and |\line| in |code-after|). +% Key |vlines-in-sub-matrix|. % -% The starred versions of |\Cdots|, |\Ldots|, etc. are now deprecated because, -% with the new implementation, they become pointless. These starred versions -% are no longer documented. -% -% The vertical rules in the matrices (drawn by ``"|"'') are now compatible with -% the color fixed by \pkg{colortbl}. +% \subsection*{Changes between versions 6.0 and 6.1} % -% 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). +% Better computation of the widths of the |X| columns. % +% Key |\color| for the command |\RowStyle|. % -% \subsection*{Changes between version 3.1 and 3.2 (and 3.2a)} -% -% Option |small|. -% -% \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 versions 5.19 and 6.0} % -% The previous version of \pkg{nicematrix} was incompatible with a recent -% version of \pkg{expl3} (released 2019/09/30). This version is compatible. +% Columns |X| and environment |{NiceTabularX}|. % +% Command |\rowlistcolors| available in the |\CodeBefore|. % -% \subsection*{Changes between version 3.3 and 3.4} +% In columns with fixed width, the blocks are composed as paragraphs (wrapping +% of the lines). +% +% The key |define-L-C-R| has been deleted. % -% 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 versions 5.18 and 5.19} % -% \subsection*{Changes between version 3.4 and 3.5} +% New key |tikz| for the command |\Block|. % -% Correction on a bug on the two previous versions where the |code-after| was -% not executed. +% \subsection*{Changes between versions 5.17 and 5.18} % -% \subsection*{Changes between version 3.5 and 3.6} +% New command |\RowStyle| % -% LaTeX counters |iRow| and |jCol| available in the cells of the array. +% \subsection*{Changes between versions 5.16 and 5.17} % -% 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. +% The key |define-L-C-R| (only available at load-time) now raises a (non fatal) +% error. +% +% Keys |L|, |C| and |R| for the command |\Block|. % -% A warning is written in the |.log| file if an obsolete environment is used. +% Key |hvlines-except-borders|. % -% There is no longer artificial errors |Duplicate~name| in the environments of -% \pkg{amsmath}. +% It's now possible to use a key |l|, |r| or |c| with the command +% |\pAutoNiceMatrix| (and the similar ones). % -% \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|. +% \subsection*{Changes between versions 5.15 and 5.16} % -% New command |\pAutoNiceMatrix| and its variants (suggestion of Christophe -% Bal). +% It's now possible to use the cells corresponding to the contents of the nodes +% (of the form |i-j|) in the |\CodeBefore| when the key |create-cell-nodes| of +% that |\CodeBefore| is used. The medium and the large nodes are also available +% if the corresponding keys are used. % -% \subsection*{Changes between version 3.7 and 3.8} +% \subsection*{Changes between versions 5.14 and 5.15} % -% 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|. +% Key |hvlines| for the command |\Block|. % -% An error is raised when an obsolete environment is used. -% +% The commands provided by \pkg{nicematrix} to color cells, rows and columns +% don't color the cells which are in the ``corners'' (when the key |corner| is +% used). % -% \subsection*{Changes between version 3.8 and 3.9} +% It's now possible to specify delimiters for submatrices in the preamble of an +% environment. % -% New commands |\NiceMatrixLastEnv| and |\OnlyMainNiceMatrix|. +% The version 5.15b is compatible with the version 3.0+ of \pkg{siunitx} +% (previous versions were not). % -% New options |create-medium-nodes| and |create-large-nodes|. +% \subsection*{Changes between versions 5.13 and 5.14} % -% \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 versions 3.10 and 3.11} -% -% Correction of a bug linked to |first-row| and |last-row|. -% -% \subsection*{Changes between versions 3.11 and 3.12} +% Nodes of the form |(1.5)|, |(2.5)|, |(3.5)|, etc. % -% Command |\rotate| in the cells of the array. +% Keys |t| and |b| for the command |\Block|. % -% Options |vlines|, |hlines| and |hvlines|. +% Key |corners|. % -% Option |baseline| pour |{NiceArray}| (not for the other environments). +% \subsection*{Changes between versions 5.12 and 5.13} +% +% New command |\arraycolor| in the |\CodeBefore| (with its key +% |except-corners|). % -% 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. +% New key |borders| for the command |\Block|. % -% 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). +% New command |\Hline| (for horizontal rules not drawn in the blocks). % -% The package must be loaded with the option |obsolete-environments| if we want -% to use the deprecated environments. +% The keys |vlines| and |hlines| takes in as value a (comma-separated) list of +% numbers (for the rules to draw). % -% \subsection*{Changes between versions 3.12 and 3.13} +% \subsection*{Changes between versions 5.11 and 5.12} % -% The behaviour of the command |\rotate| is improved when used in the ``last -% row''. +% Keywords |\CodeBefore| and |\Body| (alternative syntax to the key +% |code-before|). % -% 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. +% New key |delimiters/max-width|. % -% 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. +% New keys |hlines|, |vlines| and |hvlines| for the command |\SubMatrix| in the +% |\CodeAfter|. % -% The starred versions of the commands |\Cdots|, |\Ldots|, |\Vdots|, |\Ddots| -% and |\Iddots| are deprecated since the version 3.1 of \pkg{nicematrix}. Now, -% one should load \pkg{nicematrix} with the option |starred-commands| to avoid -% an error at the compilation. +% New key |rounded-corners| for the command |\Block|. % -% 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 5.10 and 5.11} % -% \subsection*{Changes between versions 3.13 and 3.14} -% -% Correction of a bug (question 60761504 on |stackoverflow|). +% It's now possible, in the |code-before| and in the |\CodeAfter|, to use the +% syntax \verb+|(i-|j)+ for the Tikz node at the intersection of the (potential) +% horizontal rule number~$i$ and the (potential) vertical rule number~$j$. % -% Better error messages when the user uses |&| or |\\| when |light-syntax| is in -% force. -% -% \subsection*{Changes between versions 3.14 and 3.15} +% \subsection*{Changes between versions 5.9 and 5.10} % -% 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 |^|. +% New command |\SubMatrix| available in the |\CodeAfter|. % -% 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}). +% It's possible to provide options (between brackets) to the keyword |\CodeAfter|. % +% \subsection*{Changes between versions 5.8 and 5.9} % -% \subsection*{Changes between versions 3.15 and 4.0} +% Correction of a bug: in the previous versions, it was not possible to use the +% key |line-style| for the continuous dotted lines when the Tikz library |babel| +% was loaded. +% +% New key |cell-space-limits|. % -% New environment |{NiceTabular}| +% \subsection*{Changes between versions 5.7 and 5.8} % -% Commands to color cells, rows and columns with a perfect result in the \textsc{pdf}. -% -% \subsection*{Changes between versions 4.0 and 4.1} -% -% New keys |cell-space-top-limit| and |cell-space-bottom-limit| +% Keys |cols| and |restart| of the command |\rowcolors| in the |code-before|. % -% New command |\diagbox| +% Modification of the behaviour of |\\| in the columns of type |p|, |m| or |b| +% (for a behaviour similar to the environments of \pkg{array}). % -% 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 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.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.3 and 4.4} -% -% New key |hvlines-except-corners| (now deprecated). +% Better error messages for the command |\Block|. % -% \subsection*{Changes between versions 4.4 and 5.0} +% \subsection*{Changes between versions 5.6 and 5.7} % -% 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|. +% New key |delimiters-color| % -% Command |\tabularnote| +% Keys |fill|, |draw| and |line-width| for the command |\Block|. % -% \subsection*{Changes between versions 5.0 and 5.1} +% \subsection*{Changes between versions 5.5 and 5.6} % -% The vertical rules specified by \verb+|+ in the preamble are not broken by -% |\hline\hline| (and other). -% -% Environment |{NiceTabular*}| +% Different behaviour for the mono-row blocks. % -% Command |\Vdotsfor| similar to |\Hdotsfor| +% New command |\NotEmpty|. % -% The variable |\g_nicematrix_code_after_tl| is now public. +% \subsection*{Changes between versions 5.4 and 5.5} % -% \subsection*{Changes between versions 5.1 and 5.2} +% The user must never put |\omit| before |\CodeAfter|. % -% The vertical rules specified by \verb+|+ or \verb+||+ in the preamble respect -% the blocks. -% -% Key |respect-blocks| for |\rowcolors| (with a \emph{s}) in the |code-before|. +% Correction of a bug: the tabular notes |\tabularnotes| were not composed when +% present in a block (except a mono-column block). % -% The variable |\g_nicematrix_code_before_tl| is now public. +% \subsection*{Changes between versions 5.3 and 5.4} % -% The key |baseline| may take in as value an expression of the form -% \textsl{line-i} to align the |\hline| in the row \textsl{i}. +% Key |tabularnote|. % -% The key |hvlines-except-corners| may take in as value a list of corners (eg: NW,SE). +% Different behaviour for the mono-column blocks. % % \subsection*{Changes between versions 5.2 and 5.3} % @@ -21665,240 +21567,348 @@ version 2005/12/01 or later. % specify which dotted line will be drawn first (the other lines will be drawn % parallel to that one if parallelization is activated). % -% \subsection*{Changes between versions 5.3 and 5.4} -% -% Key |tabularnote|. -% -% Different behaviour for the mono-column blocks. -% -% \subsection*{Changes between versions 5.4 and 5.5} -% -% The user must never put |\omit| before |\CodeAfter|. +% \subsection*{Changes between versions 5.1 and 5.2} % -% Correction of a bug: the tabular notes |\tabularnotes| were not composed when -% present in a block (except a mono-column block). +% The vertical rules specified by \verb+|+ or \verb+||+ in the preamble respect +% the blocks. +% +% Key |respect-blocks| for |\rowcolors| (with a \emph{s}) in the |code-before|. % -% \subsection*{Changes between versions 5.5 and 5.6} +% The variable |\g_nicematrix_code_before_tl| is now public. % -% Different behaviour for the mono-row blocks. +% The key |baseline| may take in as value an expression of the form +% \textsl{line-i} to align the |\hline| in the row \textsl{i}. % -% New command |\NotEmpty|. +% The key |hvlines-except-corners| may take in as value a list of corners (eg: NW,SE). % -% \subsection*{Changes between versions 5.6 and 5.7} +% \subsection*{Changes between versions 5.0 and 5.1} % -% New key |delimiters-color| +% The vertical rules specified by \verb+|+ in the preamble are not broken by +% |\hline\hline| (and other). +% +% Environment |{NiceTabular*}| % -% Keys |fill|, |draw| and |line-width| for the command |\Block|. -% -% \subsection*{Changes between versions 5.7 and 5.8} +% Command |\Vdotsfor| similar to |\Hdotsfor| % -% Keys |cols| and |restart| of the command |\rowcolors| in the |code-before|. +% The variable |\g_nicematrix_code_after_tl| is now public. % -% Modification of the behaviour of |\\| in the columns of type |p|, |m| or |b| -% (for a behaviour similar to the environments of \pkg{array}). +% \subsection*{Changes between versions 4.4 and 5.0} % -% Better error messages for the command |\Block|. +% 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|. % -% \subsection*{Changes between versions 5.8 and 5.9} +% Command |\tabularnote| % -% Correction of a bug: in the previous versions, it was not possible to use the -% key |line-style| for the continuous dotted lines when the Tikz library |babel| -% was loaded. +% \subsection*{Changes between versions 4.3 and 4.4} % -% New key |cell-space-limits|. +% New key |hvlines-except-corners| (now deprecated). % -% \subsection*{Changes between versions 5.9 and 5.10} +% \subsection*{Changes between versions 4.2 and 4.3} % -% New command |\SubMatrix| available in the |\CodeAfter|. -% -% It's possible to provide options (between brackets) to the keyword |\CodeAfter|. +% 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. % -% \subsection*{Changes between versions 5.10 and 5.11} +% It's now possible to use the command |\Block| in the ``last row''. % -% It's now possible, in the |code-before| and in the |\CodeAfter|, to use the -% syntax \verb+|(i-|j)+ for the Tikz node at the intersection of the (potential) -% horizontal rule number~$i$ and the (potential) vertical rule number~$j$. +% \subsection*{Changes between versions 4.1 and 4.2} % -% \subsection*{Changes between versions 5.11 and 5.12} -% -% Keywords |\CodeBefore| and |\Body| (alternative syntax to the key -% |code-before|). +% It's now possible to write |\begin{pNiceMatrix}a&b\\c&d\end{pNiceMatrix}^2| +% with the expected result. % -% New key |delimiters/max-width|. +% \subsection*{Changes between versions 4.0 and 4.1} +% +% New keys |cell-space-top-limit| and |cell-space-bottom-limit| % -% New keys |hlines|, |vlines| and |hvlines| for the command |\SubMatrix| in the -% |\CodeAfter|. +% New command |\diagbox| % -% New key |rounded-corners| for the command |\Block|. +% 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 5.12 and 5.13} -% -% New command |\arraycolor| in the |\CodeBefore| (with its key -% |except-corners|). +% \subsection*{Changes between versions 3.15 and 4.0} % -% New key |borders| for the command |\Block|. +% New environment |{NiceTabular}| % -% New command |\Hline| (for horizontal rules not drawn in the blocks). +% Commands to color cells, rows and columns with a perfect result in the \textsc{pdf}. % -% The keys |vlines| and |hlines| takes in as value a (comma-separated) list of -% numbers (for the rules to draw). +% \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 |^|. % -% \subsection*{Changes between versions 5.13 and 5.14} +% 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}). % -% Nodes of the form |(1.5)|, |(2.5)|, |(3.5)|, etc. +% \subsection*{Changes between versions 3.13 and 3.14} % -% Keys |t| and |b| for the command |\Block|. +% Correction of a bug (question 60761504 on |stackoverflow|). % -% Key |corners|. +% Better error messages when the user uses |&| or |\\| when |light-syntax| is in +% force. % -% \subsection*{Changes between versions 5.14 and 5.15} +% \subsection*{Changes between versions 3.12 and 3.13} % -% Key |hvlines| for the command |\Block|. +% The behaviour of the command |\rotate| is improved when used in the ``last +% row''. % -% The commands provided by \pkg{nicematrix} to color cells, rows and columns -% don't color the cells which are in the ``corners'' (when the key |corner| is -% used). +% 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. % -% It's now possible to specify delimiters for submatrices in the preamble of an -% environment. -% -% The version 5.15b is compatible with the version 3.0+ of \pkg{siunitx} -% (previous versions were not). +% 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. % -% \subsection*{Changes between versions 5.15 and 5.16} +% The starred versions of the commands |\Cdots|, |\Ldots|, |\Vdots|, |\Ddots| +% and |\Iddots| are deprecated since the version 3.1 of \pkg{nicematrix}. Now, +% one should load \pkg{nicematrix} with the option |starred-commands| to avoid +% an error at the compilation. % -% It's now possible to use the cells corresponding to the contents of the nodes -% (of the form |i-j|) in the |\CodeBefore| when the key |create-cell-nodes| of -% that |\CodeBefore| is used. The medium and the large nodes are also available -% if the corresponding keys are used. +% 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 5.16 and 5.17} +% \subsection*{Changes between versions 3.11 and 3.12} % -% The key |define-L-C-R| (only available at load-time) now raises a (non fatal) -% error. +% Command |\rotate| in the cells of the array. % -% Keys |L|, |C| and |R| for the command |\Block|. -% -% Key |hvlines-except-borders|. +% Options |vlines|, |hlines| and |hvlines|. % -% It's now possible to use a key |l|, |r| or |c| with the command -% |\pAutoNiceMatrix| (and the similar ones). +% Option |baseline| pour |{NiceArray}| (not for the other environments). % -% \subsection*{Changes between versions 5.17 and 5.18} +% 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} % -% New command |\RowStyle| +% 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} % -% \subsection*{Changes between versions 5.18 and 5.19} +% 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} % -% New key |tikz| for the command |\Block|. +% 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. % -% \subsection*{Changes between versions 5.19 and 6.0} +% 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. % -% Columns |X| and environment |{NiceTabularX}|. +% A warning is written in the |.log| file if an obsolete environment is used. % -% Command |\rowlistcolors| available in the |\CodeBefore|. +% There is no longer artificial errors |Duplicate~name| in the environments of +% \pkg{amsmath}. % -% In columns with fixed width, the blocks are composed as paragraphs (wrapping -% of the lines). -% -% The key |define-L-C-R| has been deleted. +% \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 versions 6.0 and 6.1} +% The previous version of \pkg{nicematrix} was incompatible with a recent +% version of \pkg{expl3} (released 2019/09/30). This version is compatible. % -% Better computation of the widths of the |X| columns. +% \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. % -% Key |\color| for the command |\RowStyle|. +% Error message when the user gives an incorrect value for |last-row|. % -% \subsection*{Changes between versions 6.1 and 6.2} +% A dotted line can no longer cross another dotted line (excepted the dotted +% lines drawn by |\cdottedline|, the symbol ``|:|'' (in the preamble of the +% array) and |\line| in |code-after|). +% +% The starred versions of |\Cdots|, |\Ldots|, etc. are now deprecated because, +% with the new implementation, they become pointless. These starred versions +% are no longer documented. % -% Better compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}. +% The vertical rules in the matrices (drawn by ``"|"'') are now compatible with +% the color fixed by \pkg{colortbl}. % -% Key |vlines-in-sub-matrix|. +% 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 versions 6.2 and 6.3} +% \subsection*{Changes between version 2.3 and 3.0} % -% Keys |nb-rows|, |rowcolor| and |bold| for the command |\RowStyle| +% Modification of |\Hdotsfor|. Now |\Hdotsfor| erases the |\vlines| (of ``"|"'') +% as |\hdotsfor| does. % -% Key |name| for the command |\Block|. +% 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|. % -% Support for the columns |V| of \pkg{varwidth}. +% \subsection*{Changes between version 2.2.1 and 2.3} +% +% Compatibility with the column type |S| of \pkg{siunitx}. % -% \subsection*{Changes between versions 6.3 and 6.4} +% Option |hlines|. % -% New commands |\UnderBrace| and |\OverBrace| in the |\CodeAfter|. +% \subsection*{Changes between version 2.2 and 2.2.1} % -% Correction of a bug of the key |baseline| (cf. question 623258 on TeX StackExchange). +% Improvment of the vertical dotted lines drawn by the specifier ``:'' in the +% preamble. % -% Correction of a bug with the columns |V| of \pkg{varwidth}. +% Modification of the position of the dotted lines drawn by |\hdottedline|. % -% Correction of a bug: the use of |\hdottedline| and |:| in the preamble of the -% array (of another letter specified by |letter-for-dotted-lines|) was -% incompatible with the key |xdots/line-style|. +% \subsection*{Changes between version 2.1.5 and 2.2} % -% \subsection*{Changes between versions 6.4 and 6.5} +% 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}). % -% Key |custom-line| in |\NiceMatrixOptions|. +% Possibility to draw vertical dotted lines to separate columns with the +% specifier ``|:|'' in the preamble (similar to the classical specifier +% ``"|"'' and the specifier ``|:|'' of \pkg{arydshln}). % -% Key |respect-arraystretch|. +% \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 6.5 and 6.6} +% \subsection*{Changes between version 2.1.3 and 2.1.4} % -% Keys |tikz| and |width| in |custom-line|. +% 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). % -% \subsection*{Changes between version 6.6 and 6.7} +% See |www.texdev.net/2018/04/21/xparse-optional-arguments-at-the-end| % -% Key |color| for |\OverBrace| and |\UnderBrace| in the |\CodeAfter| +% \subsection*{Changes between version 2.1.2 and 2.1.3} % -% Key |tikz| in the key |borders| of a command |\Block| +% 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 6.7 and 6.8} +% \subsection*{Changes between version 2.1 and 2.1.1} % -% In the notes of a tabular (with the command |\tabularnote|), the duplicates -% are now detected: when several commands |\tabularnote| are used with the same -% argument, only one note is created at the end of the tabular (but all the -% labels are present, of course). +% Small corrections: for example, the option |code-for-first-row| is now +% available in the command |\NiceMatrixOptions|. % -% \subsection*{Changes between version 6.8 and 6.9} +% 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|.} % -% New keys |xdots/radius| and |xdots/inter| for customisation of the continuous -% dotted lines. +% \subsection*{Changes between version 2.0 and 2.1} % -% New command |\ShowCellNames| available in the |\CodeBefore| and in the |\CodeAfter|. +% New implementation of the environment |{pNiceArrayRC}|. With this new +% implementation, there is no restriction on the width of the columns. % -% \subsection*{Changes between version 6.9 and 6.10} +% The package \pkg{nicematrix} no longer loads \pkg{mathtools} but only +% \pkg{amsmath}. % -% New keys |xdots/shorten-start| and |xdots/shorten-end|. +% Creation of ``medium nodes'' and ``large nodes''. % -% It's possible to use |\line| in the |\CodeAfter| between two blocks (and not -% only two cells). +% \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 6.10 and 6.11} +% \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. % -% New key |matrix/columns-type| to specify the type of columns of the matrices. +% \subsection*{Changes between version 1.2 and 1.3} % -% New key |ccommand| in |custom-line| and new command |\cdottedline|. +% New environment |{pNiceArrayC}| and its variants. % -% \subsection*{Changes between version 6.11 and 6.12} +% Correction of a bug in the definition of |{BNiceMatrix}|, |{vNiceMatrix}| and +% |{VNiceMatrix}| (in fact, it was a typo). % -% New keys |caption|, |short-caption| and |label| in the environment -% |{NiceTabular}|. +% 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''. % -% In |{NiceTabular}|, a caption specified by the key |caption| is wrapped to the -% width of the tabular. +% \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} % -% Correction of a bug: it's now possible to use |\OverBrace| and |\UnderBrace| -% with \pkg{unicode-math} (with XeLaTeX or LuaLaTeX). +% The dotted lines are no longer drawn with Tikz nodes but with Tikz circles +% (for efficiency). % -% \subsection*{Changes between version 6.12 and 6.13} -% -% New environment |{TabularNote}| in |{NiceTabular}| with the same semantic as -% the key |tabularnote| (for legibility). +% Modification of the code which is now twice faster. % -% The command |\Hline| nows accepts options (between square brackets). % % % \newpage diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index 42858eec70..94269ea86d 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ -- cgit v1.2.3