summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nicematrix/nicematrix-code.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/nicematrix/nicematrix-code.dtx')
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-code.dtx1064
1 files changed, 694 insertions, 370 deletions
diff --git a/macros/latex/contrib/nicematrix/nicematrix-code.dtx b/macros/latex/contrib/nicematrix/nicematrix-code.dtx
index 340d2e0f5e..05251bd9cd 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-code.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix-code.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% This file should be compiled with $xelatex$.
+% This file should be compiled with $lualatex$.
%
% Copyright (C) 2018-2024 by F. Pantigny
% ------------------------------------------
@@ -17,8 +17,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{6.27b}
-\def\myfiledate{2024/04/23}
+\def\myfileversion{6.28b}
+\def\myfiledate{2024/06/29}
%
%
%<*batchfile>
@@ -102,25 +102,11 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% By default, the package \pkg{nicematrix} doesn't patch any existing code.
+% The development of the extension \pkg{nicematrix} is done on the following GitHub
+% depot:
%
-% \smallskip
-% However, when the option |renew-dots| is used, the commands |\cdots|,
-% |\ldots|, |\dots|, |\vdots|, |\ddots| and |\iddots| are redefined in the
-% environments provided by \pkg{nicematrix}. In the same way, if the option
-% |renew-matrix| is used, the environment |{matrix}| of \pkg{amsmath} is
-% redefined.
-%
-% \smallskip
-% On the other hand, the environment |{array}| is never redefined.
+% \verb|https://github.com/fpantigny/nicematrix|
%
-% \smallskip
-% Of course, the package \pkg{nicematrix} uses the features of the package
-% \pkg{array}. It tries to be independent of its implementation. Unfortunately,
-% it was not possible to be strictly independent. For example, the package
-% \pkg{nicematrix} relies upon the fact that the package |{array}| uses
-% |\ialign| to begin the |\halign|.
-%
%
% \bigskip
% \section{Declaration of the package and packages loaded}
@@ -169,7 +155,11 @@ version 2005/12/01 or later.
% In the version 2.6a of \pkg{array}, important modifications have been done for
% the Tagging Project.
% \begin{macrocode}
-\bool_const:Nn \c_@@_tagging_array_bool { \cs_if_exist_p:N \ar@ialign }
+\bool_const:Nn \c_@@_tagging_array_bool
+ { \IfPackageAtLeastTF { array } { 2024/05/01 } \c_true_bool \c_false_bool }
+\bool_const:Nn \c_@@_testphase_table_bool
+ { \IfPackageLoadedTF { latex-lab-testphase-table } \c_true_bool \c_false_bool
+ }
% \end{macrocode}
%
%
@@ -299,19 +289,27 @@ version 2005/12/01 or later.
%
% \bigskip
% \begin{macrocode}
-\cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+\bool_if:NTF \c_@@_tagging_array_bool
{
- \peek_meaning:NF \unskip { \@@_error:n { Internal~error } }
- #1
+ \cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \textonly@unskip { \@@_error:n { Internal~error } }
+ #1
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \unskip { \@@_error:n { Internal~error } }
+ #1
+ }
}
% \end{macrocode}
%
% \bigskip
% Here, the box |\l_tmpa_box| will be used as sandbox to take our security test.
-% This code has been modified in version 6.18 (see question 682891 on TeX
-% StackExchange).
% \begin{macrocode}
-\hook_gput_code:nnn { begindocument / after } { . }
+\hook_gput_code:nnn { begindocument / end } { . }
{
\IfPackageLoadedTF { mdwtab }
{ \@@_fatal:n { mdwtab~loaded } }
@@ -397,6 +395,7 @@ version 2005/12/01 or later.
\tl_const:Nn \c_@@_dot_tl { . }
\tl_const:Nn \c_@@_default_tl { default }
\tl_const:Nn \c_@@_star_tl { * }
+\str_const:Nn \c_@@_star_str { * }
\str_const:Nn \c_@@_r_str { r }
\str_const:Nn \c_@@_c_str { c }
\str_const:Nn \c_@@_l_str { l }
@@ -415,8 +414,8 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\cs_generate_variant:Nn \seq_set_split:Nnn { N V n }
-\cs_generate_variant:Nn \str_lowercase:n { V }
+\cs_generate_variant:Nn \seq_set_split:Nnn { N o n }
+\cs_generate_variant:Nn \str_lowercase:n { o }
% \end{macrocode}
%
% \medskip
@@ -565,8 +564,8 @@ version 2005/12/01 or later.
% the rules even if \pkg{colortbl} is not loaded.
% \begin{macrocode}
\cs_set_protected:Npn \CT@arc@ { }
- \cs_set:Npn \arrayrulecolor #1 # { \CT@arc { #1 } }
- \cs_set:Npn \CT@arc #1 #2
+ \cs_set_nopar:Npn \arrayrulecolor #1 # { \CT@arc { #1 } }
+ \cs_set_nopar:Npn \CT@arc #1 #2
{
\dim_compare:nNnT \baselineskip = \c_zero_dim \noalign
{ \cs_gset_nopar:Npn \CT@arc@ { \color #1 { #2 } } }
@@ -574,13 +573,13 @@ version 2005/12/01 or later.
% \end{macrocode}
% Idem for |\CT@drs@|.
% \begin{macrocode}
- \cs_set:Npn \doublerulesepcolor #1 # { \CT@drs { #1 } }
- \cs_set:Npn \CT@drs #1 #2
+ \cs_set_nopar:Npn \doublerulesepcolor #1 # { \CT@drs { #1 } }
+ \cs_set_nopar:Npn \CT@drs #1 #2
{
\dim_compare:nNnT \baselineskip = \c_zero_dim \noalign
{ \cs_gset:Npn \CT@drsc@ { \color #1 { #2 } } }
}
- \cs_set:Npn \hline
+ \cs_set_nopar:Npn \hline
{
\noalign { \ifnum 0 = `} \fi
\cs_set_eq:NN \hskip \vskip
@@ -599,8 +598,8 @@ version 2005/12/01 or later.
% be linked to |\cline| in the beginning of |{NiceArrayWithDelims}|. The
% following commands must \emph{not} be protected.
% \begin{macrocode}
-\cs_set:Npn \@@_standard_cline #1 { \@@_standard_cline:w #1 \q_stop }
-\cs_set:Npn \@@_standard_cline:w #1-#2 \q_stop
+\cs_set_nopar:Npn \@@_standard_cline #1 { \@@_standard_cline:w #1 \q_stop }
+\cs_set_nopar:Npn \@@_standard_cline:w #1-#2 \q_stop
{
\int_if_zero:nT \l_@@_first_col_int { \omit & }
\int_compare:nNnT { #1 } > \c_one_int
@@ -694,8 +693,8 @@ version 2005/12/01 or later.
\tl_if_blank:nF { #1 }
{
\tl_if_head_eq_meaning:nNTF { #1 } [
- { \cs_set:Npn \CT@arc@ { \color #1 } }
- { \cs_set:Npn \CT@arc@ { \color { #1 } } }
+ { \cs_set_nopar:Npn \CT@arc@ { \color #1 } }
+ { \cs_set_nopar:Npn \CT@arc@ { \color { #1 } } }
}
}
\cs_generate_variant:Nn \@@_set_CT@arc@:n { o }
@@ -706,8 +705,8 @@ version 2005/12/01 or later.
\cs_new_protected:Npn \@@_set_CT@drsc@:n #1
{
\tl_if_head_eq_meaning:nNTF { #1 } [
- { \cs_set:Npn \CT@drsc@ { \color #1 } }
- { \cs_set:Npn \CT@drsc@ { \color { #1 } } }
+ { \cs_set_nopar:Npn \CT@drsc@ { \color #1 } }
+ { \cs_set_nopar:Npn \CT@drsc@ { \color { #1 } } }
}
\cs_generate_variant:Nn \@@_set_CT@drsc@:n { o }
% \end{macrocode}
@@ -732,10 +731,6 @@ version 2005/12/01 or later.
\cs_generate_variant:Nn \@@_color:n { o }
% \end{macrocode}
%
-% \bigskip
-% \begin{macrocode}
-\cs_set_eq:NN \@@_old_pgfpointanchor \pgfpointanchor
-% \end{macrocode}
%
% \bigskip
% \begin{macrocode}
@@ -970,6 +965,7 @@ version 2005/12/01 or later.
\bool_new:N \g_@@_rotate_bool
% \end{macrocode}
%
+%
% \bigskip
% The following boolean will be raise then the command |\rotate| is used with
% the key |c|.
@@ -1110,12 +1106,12 @@ version 2005/12/01 or later.
% The following command will be able to reconstruct the full name of the current
% command or environment (despite its name which contains \textsl{env}). This
% command must \emph{not} be protected since it will be used in error messages
-% and we have to use |\str_if_eq:VnTF| and not |\tl_if_eq:NnTF| because we need
+% and we have to use |\str_if_eq:onTF| and not |\tl_if_eq:NnTF| because we need
% to be fully expandable).
% \begin{macrocode}
\cs_new:Npn \@@_full_name_env:
{
- \str_if_eq:VnTF \g_@@_com_or_env_str { command }
+ \str_if_eq:onTF \g_@@_com_or_env_str { command }
{ command \space \c_backslash_str \g_@@_name_env_str }
{ environment \space \{ \g_@@_name_env_str \} }
}
@@ -1163,6 +1159,14 @@ version 2005/12/01 or later.
\bool_new:N \l_@@_in_code_after_bool
% \end{macrocode}
%
+%
+% \bigskip
+% The following parameter will be raised when a block content a |&| in its
+% content (=label).
+% \begin{macrocode}
+\bool_new:N \l_@@_ampersand_bool
+% \end{macrocode}
+%
% \bigskip
% The counters |\l_@@_old_iRow_int| and |\l_@@_old_jCol_int| will be used to
% save the values of the potential LaTeX counters |iRow| and |jCol|. These LaTeX
@@ -1275,11 +1279,21 @@ version 2005/12/01 or later.
% The L3 programming layer provides scratch dimensions |\l_tmpa_dim| and
% |\l_tmpb_dim|. We creates two more in the same spirit.
% \begin{macrocode}
-\dim_zero_new:N \l_@@_tmpc_dim
-\dim_zero_new:N \l_@@_tmpd_dim
+\dim_new:N \l_@@_tmpc_dim
+\dim_new:N \l_@@_tmpd_dim
% \end{macrocode}
%
% \bigskip
+% \begin{macrocode}
+\dim_new:N \g_@@_dp_row_zero_dim
+\dim_new:N \g_@@_ht_row_zero_dim
+\dim_new:N \g_@@_ht_row_one_dim
+\dim_new:N \g_@@_dp_ante_last_row_dim
+\dim_new:N \g_@@_ht_last_row_dim
+\dim_new:N \g_@@_dp_last_row_dim
+% \end{macrocode}
+%
+% \bigskip
% Some cells will be declared as ``empty'' (for example a cell with an
% instruction |\Cdots|).
% \begin{macrocode}
@@ -1475,6 +1489,7 @@ version 2005/12/01 or later.
\str_new:N \l_@@_hpos_block_str
\str_set:Nn \l_@@_hpos_block_str { c }
\bool_new:N \l_@@_hpos_of_block_cap_bool
+\bool_new:N \l_@@_p_block_bool
% \end{macrocode}
%
% \medskip
@@ -1485,10 +1500,11 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% For the vertical position, the possible values are |c|, |t| and |b|.
+% For the vertical position, the possible values are |c|, |t|, |b|, |T| and |B|
+% (but |\l_@@_vpos_block_str| will remain empty if the user doesn't use a key
+% for the vertical position).
% \begin{macrocode}
\str_new:N \l_@@_vpos_block_str
-\str_set:Nn \l_@@_vpos_block_str { c }
% \end{macrocode}
%
%
@@ -1761,6 +1777,14 @@ version 2005/12/01 or later.
\newcounter { tabularnote }
% \end{macrocode}
%
+% We want to avoid error messages for duplicate labels when the package
+% \pkg{hyperref} is used. That's why we will count all the tabular notes of the
+% whole document with |\g_@@_tabularnote_int|.
+% \begin{macrocode}
+\int_new:N \g_@@_tabularnote_int
+\cs_set:Npn \theHtabularnote { \int_use:N \g_@@_tabularnote_int }
+% \end{macrocode}
+%
% \begin{macrocode}
\seq_new:N \g_@@_notes_seq
\seq_new:N \g_@@_notes_in_caption_seq
@@ -1986,7 +2010,12 @@ version 2005/12/01 or later.
% \begin{macrocode}
\int_gdecr:N \c@tabularnote
\int_set_eq:NN \l_tmpa_int \c@tabularnote
- \refstepcounter { tabularnote }
+% \end{macrocode}
+% The following line is only to avoid error messages for multipy defined labels
+% when the package \pkg{hyperref} is used.
+% \begin{macrocode}
+ \int_gincr:N \g_@@_tabularnote_int
+ \refstepcounter { tabularnote }
\int_compare:nNnT \l_tmpa_int = \c@tabularnote
{ \int_gincr:N \c@tabularnote }
\seq_clear:N \l_@@_notes_labels_seq
@@ -2261,6 +2290,12 @@ version 2005/12/01 or later.
\tl_new:N \l_@@_baseline_tl
\tl_set:Nn \l_@@_baseline_tl { c }
% \end{macrocode}
+%
+% \bigskip
+% The following parameter corresponds to the key |ampersand-in-blocks|
+% \begin{macrocode}
+\bool_new:N \l_@@_amp_in_blocks_bool
+% \end{macrocode}
%
% \bigskip
% The flag |\l_@@_exterior_arraycolsep_bool| corresponds to the option
@@ -2492,6 +2527,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Global }
{
+ ampersand-in-blocks .bool_set:N = \l_@@_amp_in_blocks_bool ,
+ ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
no-cell-nodes .code:n =
\cs_set_protected:Npn \@@_node_for_cell:
{ \box_use_drop:N \l_@@_cell_box } ,
@@ -3475,10 +3513,10 @@ version 2005/12/01 or later.
% \end{macrocode}
% |\l_@@_baseline_tl| may have the value |t|, |c| or |b|. However, if the value
% is |b|, we compose the |\array| (of \pkg{array}) with the option |t| and the
-% right translation will be done further. Remark that |\str_if_eq:VnTF| is
+% right translation will be done further. Remark that |\str_if_eq:onTF| is
% fully expandable and we need something fully expandable here.
% \begin{macrocode}
- [ \str_if_eq:VnTF \l_@@_baseline_tl c c t ]
+ [ \str_if_eq:onTF \l_@@_baseline_tl c c t ]
}
% \end{macrocode}
%
@@ -3554,7 +3592,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_everycr_i:
{
- \bool_if:NT \c_@@_tagging_array_bool
+ \bool_if:NT \c_@@_testphase_table_bool
{
\tbl_if_row_was_started:T { \UseTaggingSocket { tbl / row / end } }
\tbl_update_cell_data_for_next_row:
@@ -3587,10 +3625,7 @@ version 2005/12/01 or later.
{
\int_compare:nNnF \c@iRow = \l_@@_last_row_int
% \end{macrocode}
-% The command |\CT@arc@| is a command of \pkg{colortbl} which sets the color of
-% the rules in the array. The package \pkg{nicematrix} uses it even if
-% \pkg{colortbl} is not loaded. We use a TeX group in order to limit the scope
-% of |\CT@arc@|.
+%
% \begin{macrocode}
{ \hrule height \arrayrulewidth width \c_zero_dim }
}
@@ -3636,21 +3671,21 @@ version 2005/12/01 or later.
% \bigskip
% \begin{macrocode}
\cs_new_protected:Npn \@@_redefine_everycr: { \everycr { \@@_everycr: } }
-\hook_gput_code:nnn { begindocument } { . }
- {
- \IfPackageLoadedTF { colortbl }
- {
- \cs_set_protected:Npn \@@_redefine_everycr:
- {
- \CT@everycr
- {
- \noalign { \cs_gset_eq:NN \CT@row@color \prg_do_nothing: }
- \@@_everycr:
- }
- }
- }
- { }
- }
+ \hook_gput_code:nnn { begindocument } { . }
+ {
+ \IfPackageLoadedTF { colortbl }
+ {
+ \cs_set_protected:Npn \@@_redefine_everycr:
+ {
+ \CT@everycr
+ {
+ \noalign { \cs_gset_eq:NN \CT@row@color \prg_do_nothing: }
+ \@@_everycr:
+ }
+ }
+ }
+ { }
+ }
% \end{macrocode}
%
% If \pkg{booktabs} is loaded, we have to patch the macro |\@BTnormal| which is
@@ -3688,16 +3723,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_some_initialization:
{
- \dim_gzero_new:N \g_@@_dp_row_zero_dim
\dim_gset:Nn \g_@@_dp_row_zero_dim { \box_dp:N \@arstrutbox }
- \dim_gzero_new:N \g_@@_ht_row_zero_dim
\dim_gset:Nn \g_@@_ht_row_zero_dim { \box_ht:N \@arstrutbox }
- \dim_gzero_new:N \g_@@_ht_row_one_dim
- \dim_gset:Nn \g_@@_ht_row_one_dim { \box_ht:N \@arstrutbox }
- \dim_gzero_new:N \g_@@_dp_ante_last_row_dim
- \dim_gzero_new:N \g_@@_ht_last_row_dim
+ \dim_gset_eq:NN \g_@@_ht_row_one_dim \g_@@_ht_row_zero_dim
+ \dim_gzero:N \g_@@_dp_ante_last_row_dim
\dim_gset:Nn \g_@@_ht_last_row_dim { \box_ht:N \@arstrutbox }
- \dim_gzero_new:N \g_@@_dp_last_row_dim
\dim_gset:Nn \g_@@_dp_last_row_dim { \box_dp:N \@arstrutbox }
}
% \end{macrocode}
@@ -3735,7 +3765,7 @@ version 2005/12/01 or later.
\cs_set_nopar:Npn \arraystretch { 0.47 }
\dim_set:Nn \arraycolsep { 1.45 pt }
% \end{macrocode}
-% By default, |\@@_small_scripstyle:| is null.
+% By default, |\@@_tuning_key_small:| is no-op.
% \begin{macrocode}
\cs_set_eq:NN \@@_tuning_key_small: \scriptstyle
}
@@ -3763,9 +3793,9 @@ version 2005/12/01 or later.
{
\cs_set_nopar:Npn \ar@ialign
{
- \tbl_init_cell_data_for_table:
+ \bool_if:NT \c_@@_testphase_table_bool \tbl_init_cell_data_for_table:
\@@_redefine_everycr:
- \tabskip = \c_zero_skip
+ \dim_zero:N \tabskip
\@@_some_initialization:
% \end{macrocode}
%
@@ -3786,7 +3816,7 @@ version 2005/12/01 or later.
\cs_set_nopar:Npn \ialign
{
\@@_redefine_everycr:
- \tabskip = \c_zero_skip
+ \dim_zero:N \tabskip
\@@_some_initialization:
\cs_set_eq:NN \ialign \@@_old_ialign:
\halign
@@ -4061,7 +4091,9 @@ version 2005/12/01 or later.
% |\hbox_set_end:| corresponding to this |\hbox_set:Nw| will be in the second
% part of the environment (and the closing |\c_math_toggle_token| also).
% \begin{macrocode}
- \hbox_set:Nw \l_@@_the_array_box
+ \hbox_set:Nw \l_@@_the_array_box
+ \bool_if:NT \c_@@_testphase_table_bool
+ { \UseTaggingSocket { tbl / hmode / begin } }
% \end{macrocode}
%
% \begin{macrocode}
@@ -4101,7 +4133,7 @@ version 2005/12/01 or later.
% \section{The \textbackslash CodeBefore}
%
% The following command will be executed if the |\CodeBefore| has to be actually
-% executed (that commmand will be used only once and is present only for legibility).
+% executed (that commmand will be used only once and is present alone only for legibility).
% \begin{macrocode}
\cs_new_protected:Npn \@@_pre_code_before:
{
@@ -4426,6 +4458,7 @@ version 2005/12/01 or later.
\tl_gset:Nn \g_@@_left_delim_tl { #1 }
\tl_gset:Nn \g_@@_right_delim_tl { #2 }
\tl_gset:Nn \g_@@_user_preamble_tl { #4 }
+ \tl_if_empty:NT \g_@@_user_preamble_tl { \@@_fatal:n { empty~preamble } }
% \end{macrocode}
%
%
@@ -4545,7 +4578,7 @@ version 2005/12/01 or later.
% command |\@@_CodeBefore_Body:w|. After that job, the command |\@@_CodeBefore_Body:w|
% will go on with |\@@_pre_array:|.
% \begin{macrocode}
- \IfBooleanTF { #6 } \@@_CodeBefore_Body:w \@@_pre_array:
+ \bool_if:nTF { #6 } \@@_CodeBefore_Body:w \@@_pre_array:
}
% \end{macrocode}
%
@@ -4558,6 +4591,18 @@ version 2005/12/01 or later.
\c_math_toggle_token
\skip_horizontal:N \l_@@_right_margin_dim
\skip_horizontal:N \l_@@_extra_right_margin_dim
+
+ % % awful workaround
+ \int_compare:nNnT \g_@@_col_total_int = \c_one_int
+ {
+ \dim_compare:nNnT \l_@@_columns_width_dim > \c_zero_dim
+ {
+ \skip_horizontal:N - \l_@@_columns_width_dim
+ \bool_if:NTF \l_@@_tabular_bool
+ { \skip_horizontal:n { - 2 \tabcolsep } }
+ { \skip_horizontal:n { - 2 \arraycolsep } }
+ }
+ }
\hbox_set_end:
% \end{macrocode}
% End of the construction of the array (in the box |\l_@@_the_array_box|).
@@ -4798,7 +4843,7 @@ version 2005/12/01 or later.
%
% \bigskip
% The final user provides a preamble, but we must convert that preamble into a
-% preamble that will be given to |{array}| (of the package \pkg{array}).
+% preamble which will be given to |{array}| (of the package \pkg{array}).
%
% \bigskip
% The preamble given by the final user is stored in |\g_@@_user_preamble_tl|.
@@ -4872,6 +4917,12 @@ version 2005/12/01 or later.
{
\IfPackageLoadedTF { colortbl }
{
+% \end{macrocode}
+% When \pkg{colortbl} is used, we have to catch the tokens |\columncolor| in the
+% preamble because, otherwise, \pkg{colortbl} will catch them and the colored
+% panels won't be drawn by \pkg{nicematrix} but by \pkg{colortbl} (with an
+% output which is not perfect).
+% \begin{macrocode}
\regex_const:Nn \c_@@_columncolor_regex { \c { columncolor } }
\cs_new_protected:Npn \@@_replace_columncolor:
{
@@ -5186,7 +5237,7 @@ version 2005/12/01 or later.
%
%
% \medskip
-% For |p|, |b| and |m|.
+% For |p| but also |b| and |m|.
% \begin{macrocode}
\cs_new:Npn \@@_p #1
{
@@ -5262,7 +5313,7 @@ version 2005/12/01 or later.
{ \tl_clear:N \exp_not:N \l_@@_hpos_cell_tl }
{
\cs_set_nopar:Npn \exp_not:N \l_@@_hpos_cell_tl
- { \str_lowercase:V \l_@@_hpos_col_str }
+ { \str_lowercase:o \l_@@_hpos_col_str }
}
\str_case:on \l_@@_hpos_col_str
{
@@ -5288,7 +5339,7 @@ version 2005/12/01 or later.
% \end{macrocode}
% We use |\str_lowercase:n| to convert |R| to |r|, etc.
% \begin{macrocode}
- { \str_lowercase:V \l_@@_hpos_col_str }
+ { \str_lowercase:o \l_@@_hpos_col_str }
}
}
% \end{macrocode}
@@ -5341,6 +5392,8 @@ version 2005/12/01 or later.
% mono-column blocks.
% \begin{macrocode}
\dim_set:Nn \l_@@_col_width_dim { #2 }
+ \bool_if:NT \c_@@_testphase_table_bool
+ { \tag_struct_begin:n { tag = Div } }
\@@_cell_begin:w
% \end{macrocode}
% We use the form |\minipage|--|\endminipage| (|\varwidth|--|\endvarwidth|) for
@@ -5355,6 +5408,7 @@ version 2005/12/01 or later.
\vrule height \box_ht:N \@arstrutbox width \c_zero_dim
\everypar { }
}
+ \bool_if:NT \c_@@_testphase_table_bool \tagpdfparaOn
% \end{macrocode}
% Now, the potential code for the horizontal position of the content of the cell
% (|\centering|, |\raggedright|, |\RaggedRight|, etc.).
@@ -5381,28 +5435,19 @@ version 2005/12/01 or later.
% \begin{macrocode}
#4
\@@_cell_end:
+ \bool_if:NT \c_@@_testphase_table_bool \tag_struct_end:
}
}
}
% \end{macrocode}
%
% \bigskip
-%
% \begin{macrocode}
\str_new:N \c_@@_ignorespaces_str
\str_set:Nx \c_@@_ignorespaces_str { \ignorespaces }
\str_remove_all:Nn \c_@@_ignorespaces_str { ~ }
-% \end{macrocode}
-%
-% \bigskip
-% In order to test whether a cell is empty, we test whether it begins by
-% |\ignorespaces\unskip|. However, in some circunstancies, for example when
-% |\collectcell| of \pkg{collcell} is used, the cell does not begin with
-% |\ignorespaces|. In that case, we consider as not empty...
-%
-% First, we test if the next token is |\ignorespaces| and it's not very easy...
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_test_if_empty: { \peek_after:Nw \@@_test_if_empty_i: }
+\cs_new_protected:Npn \@@_test_if_empty:
+ { \peek_after:Nw \@@_test_if_empty_i: }
\cs_new_protected:Npn \@@_test_if_empty_i:
{
\str_set:Nx \l_tmpa_str { \token_to_meaning:N \l_peek_token }
@@ -5410,17 +5455,40 @@ version 2005/12/01 or later.
{ \@@_test_if_empty:w }
}
\cs_new_protected:Npn \@@_test_if_empty:w \ignorespaces
- {
- \peek_meaning:NT \unskip
- {
- \tl_gput_right:Nn \g_@@_cell_after_hook_tl
- {
- \box_set_wd:Nn \l_@@_cell_box \c_zero_dim
- \skip_horizontal:N \l_@@_col_width_dim
- }
+ { \peek_after:Nw \@@_test_if_empty_ii: }
+% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_nullify_cell:
+ {
+ \tl_gput_right:Nn \g_@@_cell_after_hook_tl
+ {
+ \box_set_wd:Nn \l_@@_cell_box \c_zero_dim
+ \skip_horizontal:N \l_@@_col_width_dim
}
}
% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\bool_if:NTF \c_@@_tagging_array_bool
+ {
+ \cs_new_protected:Npn \@@_test_if_empty_ii:
+ { \peek_meaning:NT \textonly@unskip \@@_nullify_cell: }
+ }
+% \end{macrocode}
+% In the old version of \pkg{array}, we test whether it begins by
+% |\ignorespaces\unskip|. However, in some circunstancies, for example when
+% |\collectcell| of \pkg{collcell} is used, the cell does not begin with
+% |\ignorespaces|. In that case, we consider as not empty...
+% First, we test if the next token is |\ignorespaces| and it's not very easy...
+% \begin{macrocode}
+ {
+ \cs_new_protected:Npn \@@_test_if_empty_ii:
+ { \peek_meaning:NT \unskip \@@_nullify_cell: }
+ }
+% \end{macrocode}
%
%
% \begin{macrocode}
@@ -6032,7 +6100,9 @@ version 2005/12/01 or later.
\multispan { #1 }
\cs_set_eq:NN \@@_update_max_cell_width: \prg_do_nothing:
\begingroup
- \cs_set:Npn \@addamp
+ \bool_if:NT \c_@@_testphase_table_bool
+ { \tbl_update_multicolumn_cell_data:n { #1 } }
+ \cs_set_nopar:Npn \@addamp
{ \legacy_if:nTF { @firstamp } { \@firstampfalse } { \@preamerr 5 } }
% \end{macrocode}
%
@@ -6051,6 +6121,8 @@ version 2005/12/01 or later.
\exp_args:No \@mkpream \g_@@_preamble_tl
\@addtopreamble \@empty
\endgroup
+ \bool_if:NT \c_@@_testphase_table_bool
+ { \UseTaggingSocket { tbl / colspan } { #1 } }
% \end{macrocode}
%
% \medskip
@@ -6084,7 +6156,7 @@ version 2005/12/01 or later.
% \medskip
% The following lines were in the original definition of |\multicolumn|.
% \begin{macrocode}
- \cs_set:Npn \@sharp { #3 }
+ \cs_set_nopar:Npn \@sharp { #3 }
\@arstrut
\@preamble
\null
@@ -6736,7 +6808,7 @@ version 2005/12/01 or later.
}
}
{
- \@@_create_col_nodes:
+ \@@_create_col_nodes:
\endarray
}
% \end{macrocode}
@@ -6784,7 +6856,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
{
\@@_create_col_nodes:
- \endarray
+ \endarray
}
% \end{macrocode}
%
@@ -6804,7 +6876,7 @@ version 2005/12/01 or later.
\tl_set_rescan:Nno \l_@@_end_of_row_tl { } \l_@@_end_of_row_tl
\bool_if:NTF \l_@@_light_syntax_expanded_bool
\seq_set_split:Nee
- \seq_set_split:NVn
+ \seq_set_split:Non
\l_@@_rows_seq \l_@@_end_of_row_tl { #1 }
% \end{macrocode}
% We delete the last row if it is empty.
@@ -6913,7 +6985,7 @@ version 2005/12/01 or later.
% The command |\@@_create_col_nodes:| will construct a special last row.
% That last row is a false row used to create the |col| nodes and to fix the
% width of the columns (when the array is constructed with an option which
-% specifies the width of the columns).
+% specifies the width of the columns such as |columns-width|).
% \begin{macrocode}
\cs_new:Npn \@@_create_col_nodes:
{
@@ -7080,7 +7152,7 @@ version 2005/12/01 or later.
{ \skip_gset:Nn \g_tmpa_skip { 0 pt~plus 1 fill } }
\skip_horizontal:N \g_tmpa_skip
\int_gincr:N \g_tmpa_int
- \bool_lazy_any:nF % modified 2023/12/13
+ \bool_lazy_any:nF
{
\g_@@_delims_bool
\l_@@_tabular_bool
@@ -7160,7 +7232,7 @@ version 2005/12/01 or later.
\endpgfpicture
}
}
- \cr
+ % \cr
}
% \end{macrocode}
%
@@ -7492,7 +7564,11 @@ version 2005/12/01 or later.
\@@_settings_for_tabular:
\NiceArray { #2 }
}
- { \endNiceArray }
+ {
+ \endNiceArray
+ \bool_if:NT \c_@@_testphase_table_bool
+ { \UseTaggingSocket { tbl / hmode / end } }
+ }
% \end{macrocode}
%
% \begin{macrocode}
@@ -7982,7 +8058,7 @@ version 2005/12/01 or later.
%
% \bigskip
% We define a new \textsc{pgf} shape for the diag nodes because we want to
-% provide a anchor called |.5| for those nodes.
+% provide an anchor called |.5| for those nodes.
% \begin{macrocode}
\pgfdeclareshape { @@_diag_node }
{
@@ -7993,6 +8069,14 @@ version 2005/12/01 or later.
}
\anchor { 5 } { \five }
\anchor { center } { \pgfpointorigin }
+ \anchor { 1 } { \five \pgf@x = 0.2 \pgf@x \pgf@y = 0.2 \pgf@y }
+ \anchor { 2 } { \five \pgf@x = 0.4 \pgf@x \pgf@y = 0.4 \pgf@y }
+ \anchor { 3 } { \five \pgf@x = 0.6 \pgf@x \pgf@y = 0.6 \pgf@y }
+ \anchor { 4 } { \five \pgf@x = 0.8 \pgf@x \pgf@y = 0.8 \pgf@y }
+ \anchor { 6 } { \five \pgf@x = 1.2 \pgf@x \pgf@y = 1.2 \pgf@y }
+ \anchor { 7 } { \five \pgf@x = 1.4 \pgf@x \pgf@y = 1.4 \pgf@y }
+ \anchor { 8 } { \five \pgf@x = 1.6 \pgf@x \pgf@y = 1.6 \pgf@y }
+ \anchor { 9 } { \five \pgf@x = 1.8 \pgf@x \pgf@y = 1.8 \pgf@y }
}
% \end{macrocode}
%
@@ -12916,6 +13000,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block / FirstPass }
{
+ j .code:n = \str_set:Nn \l_@@_hpos_block_str j
+ \bool_set_true:N \l_@@_p_block_bool ,
+ j .value_forbidden:n = true ,
l .code:n = \str_set:Nn \l_@@_hpos_block_str l ,
l .value_forbidden:n = true ,
r .code:n = \str_set:Nn \l_@@_hpos_block_str r ,
@@ -12936,6 +13023,11 @@ version 2005/12/01 or later.
b .value_forbidden:n = true ,
B .code:n = \str_set:Nn \l_@@_vpos_block_str B ,
B .value_forbidden:n = true ,
+ m .code:n = \str_set:Nn \l_@@_vpos_block_str c ,
+ m .value_forbidden:n = true ,
+ v-center .meta:n = m ,
+ p .code:n = \bool_set_true:N \l_@@_p_block_bool ,
+ p .value_forbidden:n = true ,
color .code:n =
\@@_color:n { #1 }
\tl_set_rescan:Nnn
@@ -13021,12 +13113,12 @@ version 2005/12/01 or later.
% \begin{macrocode}
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #1 } }
- { \str_if_eq_p:nn { #1 } { * } }
+ { \str_if_eq_p:Vn \c_@@_star_str { #1 } }
{ \int_set:Nn \l_tmpa_int { 100 } }
{ \int_set:Nn \l_tmpa_int { #1 } }
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #2 } }
- { \str_if_eq_p:nn { #2 } { * } }
+ { \str_if_eq_p:Vn \c_@@_star_str { #2 } }
{ \int_set:Nn \l_tmpb_int { 100 } }
{ \int_set:Nn \l_tmpb_int { #2 } }
% \end{macrocode}
@@ -13066,18 +13158,18 @@ version 2005/12/01 or later.
%
%
% \medskip
-% If the block is mono-column or mono-row, we have a special treatment. That's
-% why we have two macros: |\@@_Block_iv:nnnnn| and |\@@_Block_v:nnnnn| (the five
+% We have different treatments when the key |p| is used and when the block is
+% mono-column or mono-row, etc. That's why we have several macros:
+% |\@@_Block_iv:nnnnn|, |\@@_Block_v:nnnnn|, |\@@_Block_vi:nnnn|, etc. (the five
% arguments of those macros are provided by curryfication).
% \begin{macrocode}
- \bool_if:nTF
+ \bool_set_false:N \l_tmpa_bool
+ \bool_if:NT \l_@@_amp_in_blocks_bool
+ { \tl_if_in:nnT { #5 } { & } { \bool_set_true:N \l_tmpa_bool } }
+ \bool_case:nF
{
- (
- \int_compare_p:nNn \l_tmpa_int = \c_one_int
- ||
- \int_compare_p:nNn \l_tmpb_int = \c_one_int
- )
- && ! \tl_if_empty_p:n { #5 }
+ \l_tmpa_bool { \exp_args:Nee \@@_Block_vii:nnnnn }
+ \l_@@_p_block_bool { \exp_args:Nee \@@_Block_vi:nnnnn }
% \end{macrocode}
% For the blocks mono-column, we will compose right now in a box in order to
% compute its width and take that width into account for the width of the
@@ -13087,10 +13179,14 @@ version 2005/12/01 or later.
% column, it's imperative. Otherwise, the process for the determination of the
% widths of the columns will be wrong.
% \begin{macrocode}
- && ! \l_@@_X_bool
- }
- { \exp_args:Nee \@@_Block_iv:nnnnn }
- { \exp_args:Nee \@@_Block_v:nnnnn }
+ \l_@@_X_bool { \exp_args:Nee \@@_Block_v:nnnnn }
+ { \tl_if_empty_p:n { #5 } } { \exp_args:Nee \@@_Block_v:nnnnn }
+ { \int_compare_p:nNn \l_tmpa_int = \c_one_int }
+ { \exp_args:Nee \@@_Block_iv:nnnnn }
+ { \int_compare_p:nNn \l_tmpb_int = \c_one_int }
+ { \exp_args:Nee \@@_Block_iv:nnnnn }
+ }
+ { \exp_args:Nee \@@_Block_v:nnnnn }
{ \l_tmpa_int } { \l_tmpb_int } { #3 } { #4 } { #5 }
}
% \end{macrocode}
@@ -13098,12 +13194,13 @@ version 2005/12/01 or later.
%
% \bigskip
% The following macro is for the case of a |\Block| which is mono-row or
-% mono-column (or both). In that case, the content of the block is composed
-% right now in a box (because we have to take into account the dimensions of
-% that box for the width of the current column or the height and the depth of the
-% current row). However, that box will be put in the array \emph{after the
-% construction of the array} (by using \textsc{pgf}) with |\@@_draw_blocks:| and
-% above all |\@@_Block_v:nnnnnn| which will do the main job.
+% mono-column (or both) and don't use the key~|p|. In that case, the content of
+% the block is composed right now in a box (because we have to take into account
+% the dimensions of that box for the width of the current column or the height
+% and the depth of the current row). However, that box will be put in the array
+% \emph{after the construction of the array} (by using \textsc{pgf}) with
+% |\@@_draw_blocks:| and above all |\@@_Block_v:nnnnnn| which will do the main
+% job.
%
% |#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 \textsl{key=values} pairs, |#4| are
@@ -13202,14 +13299,14 @@ version 2005/12/01 or later.
{ ! \g_@@_rotate_bool }
}
% \end{macrocode}
-% When the block is mono-column in a column with a fixed width (eg |p{3cm}|), we
+% When the block is mono-column in a column with a fixed width (e.g. |p{3cm}|), we
% use a |{minipage}|.
% \begin{macrocode}
{
\use:e
{
\exp_not:N \begin { minipage }%
- [ \str_lowercase:V \l_@@_vpos_block_str ]
+ [ \str_lowercase:o \l_@@_vpos_block_str ]
{ \l_@@_col_width_dim }
\str_case:on \l_@@_hpos_block_str
{ c \centering r \raggedleft l \raggedright }
@@ -13224,7 +13321,7 @@ version 2005/12/01 or later.
\use:e
{
\exp_not:N \begin { tabular }%
- [ \str_lowercase:V \l_@@_vpos_block_str ]
+ [ \str_lowercase:o \l_@@_vpos_block_str ]
{ @ { } \l_@@_hpos_block_str @ { } }
}
#5
@@ -13240,7 +13337,7 @@ version 2005/12/01 or later.
\use:e
{
\exp_not:N \begin { array }%
- [ \str_lowercase:V \l_@@_vpos_block_str ]
+ [ \str_lowercase:o \l_@@_vpos_block_str ]
{ @ { } \l_@@_hpos_block_str @ { } }
}
#5
@@ -13254,7 +13351,7 @@ version 2005/12/01 or later.
% \bigskip
% If there were |\rotate| (which raises |\g_@@_rotate_bool|) in the content of
% the |\Block|, we do a rotation of the box (and we also adjust the
-% baseline the rotated box).
+% baseline of the rotated box).
% \begin{macrocode}
\bool_if:NT \g_@@_rotate_bool \@@_rotate_box_of_block:
% \end{macrocode}
@@ -13275,37 +13372,36 @@ version 2005/12/01 or later.
}
}
% \end{macrocode}
-% If we are in a mono-row block and if that block has no vertical option for the
-% position\footnote{If the block has a key of a vertical position, that means
-% that it has to be put in a vertical space determined by the \emph{others}
-% cells of the row. Therefore there is no point creating space here. Moreover,
-% that would lead to problems when a multi-row block with a position key such as
-% |b| or |B|.}, we take into account the height and the depth of that block for the
-% height and the depth of the row.
+% If we are in a mono-row block we take into account the height and the depth of
+% that block for the height and the depth of the row, excepted when the block
+% uses explicitely an option of vertical position.
% \begin{macrocode}
- \str_if_eq:VnT \l_@@_vpos_block_str { c }
+ \bool_lazy_and:nnT
+ { \int_compare_p:nNn { #1 } = \c_one_int }
+% \end{macrocode}
+% If the user has not used a key for the vertical position of the block, then
+% |\l_@@_vpos_block_str| remains empty.
+% \begin{macrocode}
+ { \str_if_empty_p:N \l_@@_vpos_block_str }
{
- \int_compare:nNnT { #1 } = \c_one_int
+ \dim_gset:Nn \g_@@_blocks_ht_dim
{
- \dim_gset:Nn \g_@@_blocks_ht_dim
+ \dim_max:nn
+ \g_@@_blocks_ht_dim
{
- \dim_max:nn
- \g_@@_blocks_ht_dim
- {
- \box_ht:c
- { g_@@_ block _ box _ \int_use:N \g_@@_block_box_int _ box }
- }
- }
- \dim_gset:Nn \g_@@_blocks_dp_dim
+ \box_ht:c
+ { g_@@_ block _ box _ \int_use:N \g_@@_block_box_int _ box }
+ }
+ }
+ \dim_gset:Nn \g_@@_blocks_dp_dim
+ {
+ \dim_max:nn
+ \g_@@_blocks_dp_dim
{
- \dim_max:nn
- \g_@@_blocks_dp_dim
- {
- \box_dp:c
- { g_@@_ block _ box _ \int_use:N \g_@@_block_box_int _ box }
- }
- }
- }
+ \box_dp:c
+ { g_@@_ block _ box _ \int_use:N \g_@@_block_box_int _ box }
+ }
+ }
}
\seq_gput_right:Nx \g_@@_blocks_seq
{
@@ -13329,7 +13425,6 @@ version 2005/12/01 or later.
{ m }
{ \int_compare:nNnT \c@iRow = \l_@@_last_row_int T }
}
-
}
{
\box_use_drop:c
@@ -13340,6 +13435,8 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%
+%
% \bigskip
% \begin{macrocode}
\cs_new:Npn \@@_adjust_hpos_rotate:
@@ -13398,10 +13495,10 @@ version 2005/12/01 or later.
%
% \bigskip
% The following macro is for the standard case, where the block is not mono-row
-% and not mono-column. In that case, the content of the block is \emph{not}
-% composed right now in a box. The composition in a box will be done further,
-% just after the construction of the array (cf. |\@@_draw_blocks:| and
-% above all |\@@_Block_v:nnnnnn|).
+% and not mono-column and does not use the key |p|). In that case, the content of
+% the block is \emph{not} composed right now in a box. The composition in a box
+% will be done further, just after the construction of the array (cf.
+% |\@@_draw_blocks:| and above all |\@@_Block_v:nnnnnn|).
%
% |#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 \textsl{key=values} pairs, |#4| are
@@ -13434,18 +13531,20 @@ 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}
- \use:e
- {
- \exp_not:N \begin { tabular } [ \l_@@_vpos_block_str ]
- { @ { } \l_@@_hpos_block_str @ { } }
- }
- #5
- \end { tabular }
+ \bool_if:NT \c_@@_testphase_table_bool
+ { \tag_stop:n { table } }
+ \use:e
+ {
+ \exp_not:N \begin { tabular } [ \l_@@_vpos_block_str ]
+ { @ { } \l_@@_hpos_block_str @ { } }
+ }
+ #5
+ \end { tabular }
}
\group_end:
}
% \end{macrocode}
-% When we are \emph{not} in an environments |{NiceTabular}| (or similar).
+% When we are \emph{not} in an environment |{NiceTabular}| (or similar).
% \begin{macrocode}
{
\group_begin:
@@ -13473,6 +13572,40 @@ version 2005/12/01 or later.
}
}
% \end{macrocode}
+%
+% \bigskip
+% The following macro is for the case of a |\Block| which uses the key~|p|.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_Block_vi:nnnnn #1 #2 #3 #4 #5
+ {
+ \seq_gput_right:Nx \g_@@_blocks_seq
+ {
+ \l_tmpa_tl
+ { \exp_not:n { #3 } }
+ {
+ \group_begin:
+ \exp_not:n { #4 #5 }
+ \group_end:
+ }
+ }
+ }
+% \end{macrocode}
+%
+%
+% \bigskip
+% The following macro is for the case of a |\Block| which uses the key~|p|.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_Block_vii:nnnnn #1 #2 #3 #4 #5
+ {
+ \seq_gput_right:Nx \g_@@_blocks_seq
+ {
+ \l_tmpa_tl
+ { \exp_not:n { #3 } }
+ { \exp_not:n { #4 #5 } }
+ }
+ }
+% \end{macrocode}
+%
%
% \bigskip
% We recall that the options of the command |\Block| are analyzed twice: first
@@ -13483,6 +13616,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block / SecondPass }
{
+ ampersand-in-blocks .bool_set:N = \l_@@_amp_in_blocks_bool ,
+ ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
tikz .code:n =
\IfPackageLoadedTF { tikz }
{ \seq_put_right:Nn \l_@@_tikz_seq { { #1 } } }
@@ -13523,6 +13659,8 @@ version 2005/12/01 or later.
% Some keys have not a property |.value_required:n| (or similar) because they
% are in |FirstPass|.
% \begin{macrocode}
+ j .code:n = \str_set:Nn \l_@@_hpos_block_str j
+ \bool_set_true:N \l_@@_p_block_bool ,
l .code:n = \str_set:Nn \l_@@_hpos_block_str l ,
r .code:n = \str_set:Nn \l_@@_hpos_block_str r ,
c .code:n = \str_set:Nn \l_@@_hpos_block_str c ,
@@ -13536,9 +13674,11 @@ version 2005/12/01 or later.
T .code:n = \str_set:Nn \l_@@_vpos_block_str T ,
b .code:n = \str_set:Nn \l_@@_vpos_block_str b ,
B .code:n = \str_set:Nn \l_@@_vpos_block_str B ,
- m .code:n = \str_set:Nn \l_@@_vpos_block_str { c } ,
+ m .code:n = \str_set:Nn \l_@@_vpos_block_str c ,
m .value_forbidden:n = true ,
v-center .meta:n = m ,
+ p .code:n = \bool_set_true:N \l_@@_p_block_bool ,
+ p .value_forbidden:n = true ,
name .tl_set:N = \l_@@_block_name_str ,
name .value_required:n = true ,
name .initial:n = ,
@@ -13610,10 +13750,22 @@ version 2005/12/01 or later.
{
\int_compare:nNnTF \l_@@_last_row_int > \g_@@_row_total_int
{ \msg_error:nnnn { nicematrix } { Block~too~large~1 } { #1 } { #2 } }
- { \@@_Block_v:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } }
+ {
+ \@@_Block_v:nnVVnn
+ { #1 }
+ { #2 }
+ \l_@@_last_row_int
+ \l_@@_last_col_int
+ { #5 }
+ { #6 }
+ }
}
}
% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_Block_v:nnnnnn { n n V V n n }
+% \end{macrocode}
%
%
% \medskip
@@ -13636,8 +13788,17 @@ version 2005/12/01 or later.
\keys_set:nn { NiceMatrix / Block / SecondPass } { #5 }
% \end{macrocode}
%
+%
+% If the content of the block contains |&|, we will have a special treatement
+% (since the cell must be divided in several sub-cells).
+% \begin{macrocode}
+ \tl_if_in:nnT { #6 } { & } { \bool_set_true:N \l_@@_ampersand_bool }
+% \end{macrocode}
+%
% \begin{macrocode}
- \bool_if:NT \l_@@_vlines_block_bool
+ \bool_lazy_and:nnT
+ \l_@@_vlines_block_bool
+ { ! \l_@@_ampersand_bool }
{
\tl_gput_right:Nx \g_nicematrix_code_after_tl
{
@@ -13768,11 +13929,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% \medskip
-% \begin{macrocode}
- \hbox_set:Nn \l_@@_cell_box { \set@color #6 }
- \bool_if:NT \g_@@_rotate_bool \@@_rotate_cell_box:
-% \end{macrocode}
%
% \bigskip
% Let's consider the following |{NiceTabular}|. Because of the instruction
@@ -13825,38 +13981,40 @@ version 2005/12/01 or later.
% The construction of the node corresponding to the merged cells.
% \begin{macrocode}
\pgfpicture
- \pgfrememberpicturepositiononpagetrue
- \pgf@relevantforpicturesizefalse
- \@@_qpoint:n { row - #1 }
- \dim_set_eq:NN \l_tmpa_dim \pgf@y
- \@@_qpoint:n { col - #2 }
- \dim_set_eq:NN \l_tmpb_dim \pgf@x
- \@@_qpoint:n { row - \int_eval:n { \l_@@_last_row_int + 1 } }
- \dim_set_eq:NN \l_@@_tmpc_dim \pgf@y
- \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } }
- \dim_set_eq:NN \l_@@_tmpd_dim \pgf@x
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \@@_qpoint:n { row - #1 }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@y
+ \@@_qpoint:n { col - #2 }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@x
+ \@@_qpoint:n { row - \int_eval:n { \l_@@_last_row_int + 1 } }
+ \dim_set_eq:NN \l_@@_tmpc_dim \pgf@y
+ \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } }
+ \dim_set_eq:NN \l_@@_tmpd_dim \pgf@x
% \end{macrocode}
%
+%
+%
% We construct the node for the block with the name |(#1-#2-block)|.
%
% The function |\@@_pgf_rect_node:nnnnn| takes in as arguments the name of the node
% and the four coordinates of two opposite corner points of the rectangle.
% \begin{macrocode}
- \@@_pgf_rect_node:nnnnn
- { \@@_env: - #1 - #2 - block }
- \l_tmpb_dim \l_tmpa_dim \l_@@_tmpd_dim \l_@@_tmpc_dim
- \str_if_empty:NF \l_@@_block_name_str
- {
- \pgfnodealias
- { \@@_env: - \l_@@_block_name_str }
- { \@@_env: - #1 - #2 - block }
- \str_if_empty:NF \l_@@_name_str
- {
- \pgfnodealias
- { \l_@@_name_str - \l_@@_block_name_str }
- { \@@_env: - #1 - #2 - block }
- }
- }
+ \@@_pgf_rect_node:nnnnn
+ { \@@_env: - #1 - #2 - block }
+ \l_tmpb_dim \l_tmpa_dim \l_@@_tmpd_dim \l_@@_tmpc_dim
+ \str_if_empty:NF \l_@@_block_name_str
+ {
+ \pgfnodealias
+ { \@@_env: - \l_@@_block_name_str }
+ { \@@_env: - #1 - #2 - block }
+ \str_if_empty:NF \l_@@_name_str
+ {
+ \pgfnodealias
+ { \l_@@_name_str - \l_@@_block_name_str }
+ { \@@_env: - #1 - #2 - block }
+ }
+ }
% \end{macrocode}
%
% \medskip
@@ -13867,64 +14025,64 @@ version 2005/12/01 or later.
% normal node is used to put the label.
%
% \begin{macrocode}
- \bool_if:NF \l_@@_hpos_of_block_cap_bool
- {
- \dim_set_eq:NN \l_tmpb_dim \c_max_dim
+ \bool_if:NF \l_@@_hpos_of_block_cap_bool
+ {
+ \dim_set_eq:NN \l_tmpb_dim \c_max_dim
% \end{macrocode}
% The short node is constructed by taking into account the \emph{contents} of
% the columns involved in at least one cell of the block. That's why we have to
% do a loop over the rows of the array.
% \begin{macrocode}
- \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int
- {
+ \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int
+ {
% \end{macrocode}
% We recall that, when a cell is empty, no (normal) node is created in that
% cell. That's why we test the existence of the node before using it.
% \begin{macrocode}
- \cs_if_exist:cT
- { pgf @ sh @ ns @ \@@_env: - ##1 - #2 }
- {
- \seq_if_in:NnF \g_@@_multicolumn_cells_seq { ##1 - #2 }
- {
- \pgfpointanchor { \@@_env: - ##1 - #2 } { west }
- \dim_set:Nn \l_tmpb_dim { \dim_min:nn \l_tmpb_dim \pgf@x }
- }
- }
- }
+ \cs_if_exist:cT
+ { pgf @ sh @ ns @ \@@_env: - ##1 - #2 }
+ {
+ \seq_if_in:NnF \g_@@_multicolumn_cells_seq { ##1 - #2 }
+ {
+ \pgfpointanchor { \@@_env: - ##1 - #2 } { west }
+ \dim_set:Nn \l_tmpb_dim { \dim_min:nn \l_tmpb_dim \pgf@x }
+ }
+ }
+ }
% \end{macrocode}
% If all the cells of the column were empty, |\l_tmpb_dim| has still the same
% value |\c_max_dim|. In that case, you use for |\l_tmpb_dim| the value of the
% position of the vertical rule.
% \begin{macrocode}
- \dim_compare:nNnT \l_tmpb_dim = \c_max_dim
- {
- \@@_qpoint:n { col - #2 }
- \dim_set_eq:NN \l_tmpb_dim \pgf@x
- }
- \dim_set:Nn \l_@@_tmpd_dim { - \c_max_dim }
- \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int
- {
- \cs_if_exist:cT
- { pgf @ sh @ ns @ \@@_env: - ##1 - \int_use:N \l_@@_last_col_int }
- {
- \seq_if_in:NnF \g_@@_multicolumn_cells_seq { ##1 - #2 }
- {
- \pgfpointanchor
- { \@@_env: - ##1 - \int_use:N \l_@@_last_col_int }
- { east }
- \dim_set:Nn \l_@@_tmpd_dim { \dim_max:nn \l_@@_tmpd_dim \pgf@x }
- }
- }
- }
- \dim_compare:nNnT \l_@@_tmpd_dim = { - \c_max_dim }
- {
- \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } }
- \dim_set_eq:NN \l_@@_tmpd_dim \pgf@x
- }
- \@@_pgf_rect_node:nnnnn
- { \@@_env: - #1 - #2 - block - short }
- \l_tmpb_dim \l_tmpa_dim \l_@@_tmpd_dim \l_@@_tmpc_dim
- }
+ \dim_compare:nNnT \l_tmpb_dim = \c_max_dim
+ {
+ \@@_qpoint:n { col - #2 }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@x
+ }
+ \dim_set:Nn \l_@@_tmpd_dim { - \c_max_dim }
+ \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int
+ {
+ \cs_if_exist:cT
+ { pgf @ sh @ ns @ \@@_env: - ##1 - \int_use:N \l_@@_last_col_int }
+ {
+ \seq_if_in:NnF \g_@@_multicolumn_cells_seq { ##1 - #2 }
+ {
+ \pgfpointanchor
+ { \@@_env: - ##1 - \int_use:N \l_@@_last_col_int }
+ { east }
+ \dim_set:Nn \l_@@_tmpd_dim { \dim_max:nn \l_@@_tmpd_dim \pgf@x }
+ }
+ }
+ }
+ \dim_compare:nNnT \l_@@_tmpd_dim = { - \c_max_dim }
+ {
+ \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } }
+ \dim_set_eq:NN \l_@@_tmpd_dim \pgf@x
+ }
+ \@@_pgf_rect_node:nnnnn
+ { \@@_env: - #1 - #2 - block - short }
+ \l_tmpb_dim \l_tmpa_dim \l_@@_tmpd_dim \l_@@_tmpc_dim
+ }
% \end{macrocode}
%
% \medskip
@@ -13946,145 +14104,288 @@ version 2005/12/01 or later.
{ south~east }
}
}
+ \endpgfpicture
% \end{macrocode}
%
+% \bigskip
+% \begin{macrocode}
+ \bool_if:NTF \l_@@_ampersand_bool
+ {
+ \seq_set_split:Nnn \l_tmpa_seq { & } { #6 }
+ \int_zero_new:N \l_@@_split_int
+ \int_set:Nn \l_@@_split_int { \seq_count:N \l_tmpa_seq }
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \@@_qpoint:n { row - #1 }
+ \dim_set_eq:NN \l_@@_tmpc_dim \pgf@y
+ \@@_qpoint:n { row - \int_eval:n { #3 + 1 } }
+ \dim_set_eq:NN \l_@@_tmpd_dim \pgf@y
+ \@@_qpoint:n { col - #2 }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@x
+ \@@_qpoint:n { col - \int_eval:n { #4 + 1 } }
+ \dim_set:Nn \l_tmpb_dim
+ { ( \pgf@x - \l_tmpa_dim ) / \int_use:N \l_@@_split_int }
+ \bool_lazy_or:nnT
+ \l_@@_vlines_block_bool
+ { \tl_if_eq_p:NN \l_@@_vlines_clist \c_@@_all_tl }
+ {
+ \int_step_inline:nn { \l_@@_split_int - 1 }
+ {
+ \pgfpathmoveto
+ {
+ \pgfpoint
+ { \l_tmpa_dim + ##1 \l_tmpb_dim }
+ \l_@@_tmpc_dim
+ }
+ \pgfpathlineto
+ {
+ \pgfpoint
+ { \l_tmpa_dim + ##1 \l_tmpb_dim }
+ \l_@@_tmpd_dim
+ }
+ \CT@arc@
+ \pgfsetlinewidth { 1.1 \arrayrulewidth }
+ \pgfsetrectcap
+ \pgfusepathqstroke
+ }
+ }
+ \@@_qpoint:n { row - #1 - base }
+ \dim_set_eq:NN \l_@@_tmpc_dim \pgf@y
+ \int_step_inline:nn \l_@@_split_int
+ {
+ \group_begin:
+ \dim_set:Nn \col@sep
+ { \bool_if:NTF \l_@@_tabular_bool \tabcolsep \arraycolsep }
+ \pgftransformshift
+ {
+ \pgfpoint
+ {
+ \str_case:on \l_@@_hpos_block_str
+ {
+ l { \l_tmpa_dim + ##1 \l_tmpb_dim - \l_tmpb_dim + \col@sep}
+ c { \l_tmpa_dim + ##1 \l_tmpb_dim - 0.5 \l_tmpb_dim }
+ r { \l_tmpa_dim + ##1 \l_tmpb_dim - \col@sep }
+ }
+ }
+ { \l_@@_tmpc_dim }
+ }
+ \pgfset
+ {
+ inner~xsep = \c_zero_dim ,
+ inner~ysep = \c_zero_dim
+ }
+ \pgfnode
+ { rectangle }
+ {
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { base }
+ l { base~west }
+ r { base~east }
+ }
+ }
+ { \seq_item:Nn \l_tmpa_seq { ##1 } } { } { }
+ \group_end:
+ }
+ \endpgfpicture
+ }
+ {
+ \bool_if:NTF \l_@@_p_block_bool
+ {
+% \end{macrocode}
+% When the final user has used the key~|p|, we have to compute the width.
+% \begin{macrocode}
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \bool_if:NTF \l_@@_hpos_of_block_cap_bool
+ {
+ \@@_qpoint:n { col - #2 }
+ \dim_gset_eq:NN \g_tmpa_dim \pgf@x
+ \@@_qpoint:n { col - \int_eval:n { \l_@@_last_col_int + 1 } }
+ }
+ {
+ \pgfpointanchor { \@@_env: - #1 - #2 - block - short } { west }
+ \dim_gset_eq:NN \g_tmpa_dim \pgf@x
+ \pgfpointanchor { \@@_env: - #1 - #2 - block - short } { east }
+ }
+ \dim_gset:Nn \g_tmpb_dim { \pgf@x - \g_tmpa_dim }
+ \endpgfpicture
+ \hbox_set:Nn \l_@@_cell_box
+ {
+ \begin { minipage } [ \str_lowercase:o \l_@@_vpos_block_str ]
+ { \g_tmpb_dim }
+ \str_case:on \l_@@_hpos_block_str
+ { c \centering r \raggedleft l \raggedright j { } }
+ #6
+ \end { minipage }
+ }
+ }
+ { \hbox_set:Nn \l_@@_cell_box { \set@color #6 } }
+ \bool_if:NT \g_@@_rotate_bool \@@_rotate_cell_box:
+% \end{macrocode}
%
-% \medskip
-% Now, we will put the label of the block.
+% \bigskip
+% Now, we will put the label of the block. We recall that |\l_@@_vpos_block_str|
+% is empty when the user has not used a key for the vertical position of the block.
% \begin{macrocode}
- \bool_lazy_any:nTF
- {
- { \str_if_eq_p:on \l_@@_vpos_block_str { c } }
- { \str_if_eq_p:on \l_@@_vpos_block_str { T } }
- { \str_if_eq_p:on \l_@@_vpos_block_str { B } }
- }
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \bool_lazy_any:nTF
+ {
+ { \str_if_empty_p:N \l_@@_vpos_block_str } % added 2024/06/29
+ { \str_if_eq_p:on \l_@@_vpos_block_str { c } }
+ { \str_if_eq_p:on \l_@@_vpos_block_str { T } }
+ { \str_if_eq_p:on \l_@@_vpos_block_str { B } }
+ }
% \end{macrocode}
% \medskip
% \begin{macrocode}
- {
+ {
% \end{macrocode}
% If we are in the first column, we must put the block as if it was with the key~|r|.
% \begin{macrocode}
- \int_if_zero:nT { #2 } { \str_set_eq:NN \l_@@_hpos_block_str \c_@@_r_str }
+ \int_if_zero:nT { #2 } { \str_set_eq:NN \l_@@_hpos_block_str \c_@@_r_str }
% \end{macrocode}
% If we are in the last column, we must put the block as if it was with the key~|l|.
% \begin{macrocode}
- \bool_if:nT \g_@@_last_col_found_bool
- {
- \int_compare:nNnT { #2 } = \g_@@_col_total_int
- { \str_set_eq:NN \l_@@_hpos_block_str \c_@@_l_str }
- }
+ \bool_if:nT \g_@@_last_col_found_bool
+ {
+ \int_compare:nNnT { #2 } = \g_@@_col_total_int
+ { \str_set_eq:NN \l_@@_hpos_block_str \c_@@_l_str }
+ }
% \end{macrocode}
% |\l_tmpa_tl| will contain the anchor of the \textsc{pgf} node which will be used.
% \begin{macrocode}
- \tl_set:Nx \l_tmpa_tl
- {
- \str_case:on \l_@@_vpos_block_str
+ \tl_set:Nx \l_tmpa_tl
{
- c {
- \str_case:on \l_@@_hpos_block_str
- {
- c { center }
- l { west }
- r { east }
- }
+ \str_case:on \l_@@_vpos_block_str
+ {
+% \end{macrocode}
+% We recall that |\l_@@_vpos_block_str| is empty when the user has not used a key
+% for the vertical position of the block.
+% \begin{macrocode}
+ { } { % added 2024-06-29
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { center }
+ l { west }
+ r { east }
+ j { center }
+ }
+ }
+ c {
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { center }
+ l { west }
+ r { east }
+ j { center }
+ }
- }
- T {
- \str_case:on \l_@@_hpos_block_str
- {
- c { north }
- l { north~west }
- r { north~east }
- }
+ }
+ T {
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { north }
+ l { north~west }
+ r { north~east }
+ j { north }
+ }
- }
- B {
- \str_case:on \l_@@_hpos_block_str
- {
- c { south}
- l { south~west }
- r { south~east }
- }
+ }
+ B {
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { south }
+ l { south~west }
+ r { south~east }
+ j { south }
+ }
- }
+ }
+ }
}
- }
% \end{macrocode}
% \begin{macrocode}
- \pgftransformshift
- {
- \pgfpointanchor
- {
- \@@_env: - #1 - #2 - block
- \bool_if:NF \l_@@_hpos_of_block_cap_bool { - short }
+ \pgftransformshift
+ {
+ \pgfpointanchor
+ {
+ \@@_env: - #1 - #2 - block
+ \bool_if:NF \l_@@_hpos_of_block_cap_bool { - short }
+ }
+ { \l_tmpa_tl }
}
+ \pgfset
+ {
+ inner~xsep = \c_zero_dim ,
+ inner~ysep = \c_zero_dim
+ }
+ \pgfnode
+ { rectangle }
{ \l_tmpa_tl }
- }
- \pgfset
- {
- inner~xsep = \c_zero_dim ,
- inner~ysep = \c_zero_dim
- }
- \pgfnode
- { rectangle }
- { \l_tmpa_tl }
- { \box_use_drop:N \l_@@_cell_box } { } { }
- }
+ { \box_use_drop:N \l_@@_cell_box } { } { }
+ }
% \end{macrocode}
% End of the case when |\l_@@_vpos_block_str| is equal to |c|, |T| or |B|.
% Now, the other cases.
% \begin{macrocode}
- {
+ {
% \end{macrocode}
%
% \begin{macrocode}
- \pgfextracty \l_tmpa_dim
- {
- \@@_qpoint:n
+ \pgfextracty \l_tmpa_dim
{
- row - \str_if_eq:onTF \l_@@_vpos_block_str { b } { #3 } { #1 }
- - base
+ \@@_qpoint:n
+ {
+ row - \str_if_eq:onTF \l_@@_vpos_block_str { b } { #3 } { #1 }
+ - base
+ }
}
- }
- \dim_sub:Nn \l_tmpa_dim { 0.5 \arrayrulewidth }
+ \dim_sub:Nn \l_tmpa_dim { 0.5 \arrayrulewidth }
% \end{macrocode}
% We retrieve (in |\pgf@x|) the $x$-value of the center of the block.
% \begin{macrocode}
- \pgfpointanchor
- {
- \@@_env: - #1 - #2 - block
- \bool_if:NF \l_@@_hpos_of_block_cap_bool { - short }
- }
- {
- \str_case:on \l_@@_hpos_block_str
+ \pgfpointanchor
+ {
+ \@@_env: - #1 - #2 - block
+ \bool_if:NF \l_@@_hpos_of_block_cap_bool { - short }
+ }
{
- c { center }
- l { west }
- r { east }
- }
- }
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { center }
+ l { west }
+ r { east }
+ j { center }
+ }
+ }
% \end{macrocode}
% We put the label of the block which has been composed in |\l_@@_cell_box|.
% \begin{macrocode}
- \pgftransformshift { \pgfpoint \pgf@x \l_tmpa_dim }
- \pgfset { inner~sep = \c_zero_dim }
- \pgfnode
- { rectangle }
- {
- \str_case:on \l_@@_hpos_block_str
+ \pgftransformshift { \pgfpoint \pgf@x \l_tmpa_dim }
+ \pgfset { inner~sep = \c_zero_dim }
+ \pgfnode
+ { rectangle }
{
- c { base }
- l { base~west }
- r { base~east }
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { base }
+ l { base~west }
+ r { base~east }
+ j { base }
+ }
}
- }
- { \box_use_drop:N \l_@@_cell_box } { } { }
- }
+ { \box_use_drop:N \l_@@_cell_box } { } { }
+ }
% \end{macrocode}
%
% \begin{macrocode}
- \endpgfpicture
+ \endpgfpicture
+ }
\group_end:
}
% \end{macrocode}
@@ -15425,6 +15726,7 @@ version 2005/12/01 or later.
{
\nullfont
\c_math_toggle_token
+ \colorlet { current-color } { . }
\@@_color:o \l_@@_delimiters_color_tl
\left .
\vcenter
@@ -15436,7 +15738,7 @@ version 2005/12/01 or later.
}
\right #1
\tl_if_empty:nF { #3 } { _ { \smash { #3 } } }
- ^ { \smash { #4 } }
+ ^ { \color { current-color } \smash { #4 } }
\c_math_toggle_token
}
{ #2 }
@@ -15474,9 +15776,12 @@ version 2005/12/01 or later.
{
left-shorten .bool_set:N = \l_@@_brace_left_shorten_bool ,
left-shorten .default:n = true ,
+ left-shorten .value_forbidden:n = true ,
right-shorten .bool_set:N = \l_@@_brace_right_shorten_bool ,
- shorten .meta:n = { left-shorten , right-shorten } ,
right-shorten .default:n = true ,
+ right-shorten .value_forbidden:n = true ,
+ shorten .meta:n = { left-shorten , right-shorten } ,
+ shorten .value_forbidden:n = true ,
yshift .dim_set:N = \l_@@_brace_yshift_dim ,
yshift .value_required:n = true ,
yshift .initial:n = \c_zero_dim ,
@@ -15764,9 +16069,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\NewDocumentCommand \@@_ShowCellNames_CodeBefore { }
{
- \dim_zero_new:N \g_@@_tmpc_dim
- \dim_zero_new:N \g_@@_tmpd_dim
- \dim_zero_new:N \g_@@_tmpe_dim
+ \dim_gzero_new:N \g_@@_tmpc_dim
+ \dim_gzero_new:N \g_@@_tmpd_dim
+ \dim_gzero_new:N \g_@@_tmpe_dim
\int_step_inline:nn \c@iRow
{
\begin { pgfpicture }
@@ -15850,9 +16155,9 @@ version 2005/12/01 or later.
\pgfusepathqfill
\endpgfpicture
}
- \dim_zero_new:N \g_@@_tmpc_dim
- \dim_zero_new:N \g_@@_tmpd_dim
- \dim_zero_new:N \g_@@_tmpe_dim
+ \dim_gzero_new:N \g_@@_tmpc_dim
+ \dim_gzero_new:N \g_@@_tmpd_dim
+ \dim_gzero_new:N \g_@@_tmpe_dim
\int_step_inline:nn \c@iRow
{
\bool_if:NTF \l_@@_in_code_after_bool
@@ -16207,7 +16512,7 @@ version 2005/12/01 or later.
~you~try~to~use~more~columns~than~allowed~by~your~
\@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~
\int_use:N \g_@@_static_num_of_col_int\
- ~(plus~the~potential~exterior~ones).
+ ~(plus~the~potential~exterior~ones).~
This~error~is~fatal.
}
% \end{macrocode}
@@ -16224,6 +16529,15 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+% \begin{macrocode}
+\@@_msg_new:nn { empty~preamble }
+ {
+ Empty~preamble.\\
+ The~preamble~of~your~\@@_full_name_env:\ is~empty.\\
+ This~error~is~fatal.
+ }
+% \end{macrocode}
+%
%
% \begin{macrocode}
\@@_msg_new:nn { in~first~col }
@@ -16471,7 +16785,7 @@ version 2005/12/01 or later.
Incompatible~keys.\\
You~can't~use~the~keys~'hlines',~'vlines'~or~'hvlines'~for~a~
'\token_to_str:N \Block'~when~the~key~'color'~or~'draw'~is~used.\\
- Maybe~it~will~possible~in~future~version.\\
+ However,~you~can~put~several~commands~\token_to_str:N \Block.\\
Your~key~will~be~discarded.
}
% \end{macrocode}
@@ -16512,7 +16826,7 @@ version 2005/12/01 or later.
\@@_msg_new:nn { ragged2e~not~loaded }
{
You~have~to~load~'ragged2e'~in~order~to~use~the~key~'\l_keys_key_str'~in~
- your~column~'\l_@@_vpos_col_str'~(or~'X').~The~key~'\str_lowercase:V
+ your~column~'\l_@@_vpos_col_str'~(or~'X').~The~key~'\str_lowercase:o
\l_keys_key_str'~will~be~used~instead.
}
% \end{macrocode}
@@ -16971,9 +17285,10 @@ version 2005/12/01 or later.
\c_@@_available_keys_str
}
{
- The~available~keys~are~(in~alphabetic~order):~b,~B,~borders,~c,~draw,~fill,~
- hlines,~hvlines,~l,~line-width,~name,~opacity,~rounded-corners,~r,~
- respect-arraystretch,~t,~T,~tikz,~transparent~and~vlines.
+ The~available~keys~are~(in~alphabetic~order):~&-in-blocks,~ampersand-in-blocks,~
+ b,~B,~borders,~c,~draw,~fill,~hlines,~hvlines,~l,~line-width,~name,~
+ opacity,~rounded-corners,~r,~respect-arraystretch,~t,~T,~tikz,~transparent~
+ and~vlines.
}
% \end{macrocode}
%
@@ -17107,7 +17422,9 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
allow-duplicate-names,~
+ ampersand-in-blocks,~
caption-above,~
cell-space-bottom-limit,~
cell-space-limits,~
@@ -17121,6 +17438,7 @@ version 2005/12/01 or later.
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
+ custom-line,~
delimiters~(several~subkeys),~
end-of-row,~
first-col,~
@@ -17164,6 +17482,8 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -17228,6 +17548,8 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -17291,6 +17613,8 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~