summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-05 21:12:03 +0000
committerKarl Berry <karl@freefriends.org>2021-06-05 21:12:03 +0000
commit699e8be56281642c1b62552f1bf11121eaff7319 (patch)
treefb6fd6d1a614b90aefbc57b3880308a25fb4bb74 /Master/texmf-dist/tex
parentda687531f8017d1cd8443a56f772ab792784ef4a (diff)
nicematrix (5jun21)
git-svn-id: svn://tug.org/texlive/trunk@59479 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty99
1 files changed, 66 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
index f8439a04692..51469a73836 100644
--- a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
+++ b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
@@ -18,8 +18,8 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-\def\myfileversion{5.15a}
-\def\myfiledate{2021/05/06}
+\def\myfileversion{5.15b}
+\def\myfiledate{2021/06/05}
\RequirePackage{pgfcore}
\usepgfmodule{shapes}
\RequirePackage{l3keys2e}
@@ -190,6 +190,50 @@
{ \bool_set_true:N \c__nicematrix_siunitx_loaded_bool }
{ }
}
+\AtBeginDocument
+ {
+ \bool_if:nTF { ! \c__nicematrix_siunitx_loaded_bool }
+ { \cs_set_eq:NN \__nicematrix_renew_NC@rewrite@S: \prg_do_nothing: }
+ {
+ \cs_if_exist:NTF \siunitx_cell_begin:w
+ {
+ \cs_new_protected:Npn \__nicematrix_renew_NC@rewrite@S:
+ {
+ \renewcommand*{\NC@rewrite@S}[1][]
+ {
+ \@temptokena \exp_after:wN
+ {
+ \tex_the:D \@temptokena
+ > {
+ \__nicematrix_Cell:
+ \keys_set:nn { siunitx } { ##1 }
+ \siunitx_cell_begin:w
+ }
+ \__nicematrix_true_c:
+ < { \siunitx_cell_end: \__nicematrix_end_Cell: }
+ }
+ \NC@find
+ }
+ }
+ }
+ {
+ \cs_new_protected:Npn \__nicematrix_renew_NC@rewrite@S:
+ {
+ \renewcommand*{\NC@rewrite@S}[1][]
+ {
+ \@temptokena \exp_after:wN
+ {
+ \tex_the:D \@temptokena
+ > { \__nicematrix_Cell: \c__nicematrix_table_collect_begin_tl S {##1} }
+ \__nicematrix_true_c:
+ < { \c__nicematrix_table_print_tl \__nicematrix_end_Cell: }
+ }
+ \NC@find
+ }
+ }
+ }
+ }
+ }
\cs_set_protected:Npn \__nicematrix_adapt_S_column:
{
\bool_if:NT \c__nicematrix_siunitx_loaded_bool
@@ -208,27 +252,6 @@
\cs_gset_eq:NN \__nicematrix_adapt_S_column: \prg_do_nothing:
}
}
-\AtBeginDocument
- {
- \bool_if:nTF { ! \c__nicematrix_siunitx_loaded_bool }
- { \cs_set_eq:NN \__nicematrix_renew_NC@rewrite@S: \prg_do_nothing: }
- {
- \cs_new_protected:Npn \__nicematrix_renew_NC@rewrite@S:
- {
- \renewcommand*{\NC@rewrite@S}[1][]
- {
- \@temptokena \exp_after:wN
- {
- \tex_the:D \@temptokena
- > { \__nicematrix_Cell: \c__nicematrix_table_collect_begin_tl S {##1} }
- \__nicematrix_true_c:
- < { \c__nicematrix_table_print_tl \__nicematrix_end_Cell: }
- }
- \NC@find
- }
- }
- }
- }
\regex_const:Nn \c__nicematrix_columncolor_regex { \c { columncolor } }
\cs_new_protected:Npn \__nicematrix_provide_pgfsyspdfmark:
{
@@ -2603,8 +2626,10 @@
\tl_gclear:N \g__nicematrix_internal_code_after_tl
\cs_set_eq:NN \CodeAfter \prg_do_nothing:
\seq_gclear:N \g__nicematrix_submatrix_names_seq
+ % \bool_if:NT \l__nicematrix_NiceTabular_bool \c_math_toggle_token
\exp_last_unbraced:NV \__nicematrix_CodeAfter_keys: \g_nicematrix_code_after_tl
\scan_stop:
+ % \bool_if:NT \l__nicematrix_NiceTabular_bool \c_math_toggle_token
\tl_gclear:N \g_nicematrix_code_after_tl
\group_end:
\tl_if_empty:NF \g_nicematrix_code_before_tl
@@ -5898,19 +5923,27 @@
}
\NewDocumentCommand \__nicematrix_SubMatrix_in_code_before { m m m m ! O { } }
{
- \__nicematrix_cut_on_hyphen:w #3 \q_stop
- \tl_clear_new:N \l_tmpc_tl
- \tl_clear_new:N \l_tmpd_tl
- \tl_set_eq:NN \l_tmpc_tl \l_tmpa_tl
- \tl_set_eq:NN \l_tmpd_tl \l_tmpb_tl
- \__nicematrix_cut_on_hyphen:w #2 \q_stop
- \seq_gput_right:Nx \g__nicematrix_submatrix_seq
- { { \l_tmpa_tl } { \l_tmpb_tl } { \l_tmpc_tl } { \l_tmpd_tl } }
- \tl_gput_right:Nn \g__nicematrix_internal_code_after_tl
- { \SubMatrix { #1 } { #2 } { #3 } { #4 } [ #5 ] }
+ \peek_remove_spaces:n
+ {
+ \__nicematrix_cut_on_hyphen:w #3 \q_stop
+ \tl_clear_new:N \l_tmpc_tl
+ \tl_clear_new:N \l_tmpd_tl
+ \tl_set_eq:NN \l_tmpc_tl \l_tmpa_tl
+ \tl_set_eq:NN \l_tmpd_tl \l_tmpb_tl
+ \__nicematrix_cut_on_hyphen:w #2 \q_stop
+ \seq_gput_right:Nx \g__nicematrix_submatrix_seq
+ { { \l_tmpa_tl } { \l_tmpb_tl } { \l_tmpc_tl } { \l_tmpd_tl } }
+ \tl_gput_right:Nn \g__nicematrix_internal_code_after_tl
+ { \SubMatrix { #1 } { #2 } { #3 } { #4 } [ #5 ] }
+ }
}
\NewDocumentCommand \__nicematrix_SubMatrix { m m m m O { } }
{
+ \peek_remove_spaces:n
+ { \__nicematrix_sub_matrix:nnnnn { #1 } { #2 } { #3 } { #4 } { #5 } }
+ }
+\cs_new_protected:Npn \__nicematrix_sub_matrix:nnnnn #1 #2 #3 #4 #5
+ {
\group_begin:
\tl_clear_new:N \l__nicematrix_first_i_tl
\tl_clear_new:N \l__nicematrix_first_j_tl