summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-13 21:41:34 +0000
committerKarl Berry <karl@freefriends.org>2019-10-13 21:41:34 +0000
commite0ce141fcde2bce358ce1f883ceff960742cae4a (patch)
tree3b39189aa3ac9061f85fabecfcd414fa5709f3ed /Master/texmf-dist/tex
parented8702df3768e21a3ef87a2eec9ca8341aad9b7a (diff)
nicematrix (13oct19)
git-svn-id: svn://tug.org/texlive/trunk@52370 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty62
1 files changed, 41 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
index 9647cf9f4b5..8365b0e24c7 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{3.4}
-\def\myfiledate{2019/10/05}
+\def\myfileversion{3.5}
+\def\myfiledate{2019/10/13}
\RequirePackage{tikz}
\usetikzlibrary{fit}
\RequirePackage{expl3}[2019/02/15]
@@ -37,8 +37,8 @@
\RequirePackage { amsmath }
\RequirePackage { xparse } [ 2018-10-17 ]
\cs_new_protected:Npn \__nm_error:n { \msg_error:nn { nicematrix } }
-\cs_new_protected:Npn \__nm_error:nn { \msg_error:nn { nicematrix } }
-\cs_new_protected:Npn \__nm_error:nnn { \msg_error:nnn { nicematrix } }
+\cs_new_protected:Npn \__nm_error:nn { \msg_error:nnn { nicematrix } }
+\cs_new_protected:Npn \__nm_error:nnn { \msg_error:nnnn { nicematrix } }
\cs_new_protected:Npn \__nm_fatal:n { \msg_fatal:nn { nicematrix } }
\cs_new_protected:Npn \__nm_fatal:nn { \msg_fatal:nn { nicematrix } }
\cs_new_protected:Npn \__nm_msg_new:nn { \msg_new:nnn { nicematrix } }
@@ -473,7 +473,6 @@
}
\cs_new_protected:Npn \__nm_pre_array:
{
- \tl_clear:N \g__nm_code_after_tl
\bool_if:NT \l__nm_small_bool
{
\cs_set:Npn \arraystretch { 0.47 }
@@ -761,7 +760,7 @@
\str_if_eq:VnTF \l__nm_pos_env_str { t }
{
\box_move_up:nn
- { \l_tmpa_dim - \g__nm_ht_row_zero_dim + \g__nm_ht_row_one_dim }
+ { \l_tmpa_dim - \g__nm_ht_row_zero_dim + \g__nm_ht_row_one_dim }
}
}
{
@@ -1726,18 +1725,26 @@
\dim_zero_new:N \g__nm_y_final_dim
\bool_set_false:N \l__nm_initial_open_bool
\bool_set_false:N \l__nm_final_open_bool
- \begin { tikzpicture }
- \path~(#1)~--~(#2)~node[at~start]~(i)~{}~node[at~end]~(f)~{} ;
- \tikz@parse@node \pgfutil@firstofone ( i )
- \dim_gset:Nn \g__nm_x_initial_dim \pgf@x
- \dim_gset:Nn \g__nm_y_initial_dim \pgf@y
- \tikz@parse@node \pgfutil@firstofone ( f )
- \dim_gset:Nn \g__nm_x_final_dim \pgf@x
- \dim_gset:Nn \g__nm_y_final_dim \pgf@y
- \end { tikzpicture }
- \__nm_draw_tikz_line:
+ \bool_if:nTF
+ {
+ \cs_if_exist_p:c { pgf@sh@ns@nm - \int_use:N \g__nm_env_int - #1 }
+ &&
+ \cs_if_exist_p:c { pgf@sh@ns@nm - \int_use:N \g__nm_env_int - #2 }
+ }
+ {
+ \begin { tikzpicture }
+ \path~(#1)~--~(#2)~node[at~start]~(i)~{}~node[at~end]~(f)~{} ;
+ \tikz@parse@node \pgfutil@firstofone ( i )
+ \dim_gset:Nn \g__nm_x_initial_dim \pgf@x
+ \dim_gset:Nn \g__nm_y_initial_dim \pgf@y
+ \tikz@parse@node \pgfutil@firstofone ( f )
+ \dim_gset:Nn \g__nm_x_final_dim \pgf@x
+ \dim_gset:Nn \g__nm_y_final_dim \pgf@y
+ \end { tikzpicture }
+ \__nm_draw_tikz_line:
+ }
+ { \__nm_error:nnn { unknown~cell~for~line~in~code-after } { #1 } { #2 } }
}
-\cs_generate_variant:Nn \dim_set:Nn { N v }
\bool_if:NTF \c__nm_draft_bool
{ \cs_set_eq:NN \__nm_dotfill: \prg_do_nothing: }
{
@@ -1755,7 +1762,6 @@
\c_math_toggle_token
}
\hfill
- \skip_horizontal:n \c_zero_dim
}
}
\cs_new:Npn \__nm_hdottedline:
@@ -1764,10 +1770,19 @@
{
\bool_gset_true:N \g__nm_extra_nodes_bool
\cs_if_exist:cTF { __nm_width_ \int_use:N \g__nm_env_int }
- { \dim_set:Nv \l_tmpa_dim { __nm_width_ \int_use:N \g__nm_env_int } }
+ { \dim_set_eq:Nc \l_tmpa_dim { __nm_width_ \int_use:N \g__nm_env_int } }
{ \dim_set:Nn \l_tmpa_dim { 5 mm } }
\hbox_overlap_right:n
{
+ \bool_if:nT
+ {
+ \l__nm_NiceArray_bool
+ &&
+ ! \l__nm_exterior_arraycolsep_bool
+ &&
+ \int_compare_p:nNn \l__nm_first_col_int > \c_zero_int
+ }
+ { \skip_horizontal:n { - \arraycolsep } }
\hbox_to_wd:nn
{
\l_tmpa_dim + 2 \arraycolsep
@@ -2171,6 +2186,12 @@
transparent .value_forbidden:n = true,
}
\ProcessKeysOptions { NiceMatrix / Package }
+\__nm_msg_new:nn { unknown~cell~for~line~in~code-after }
+ {
+ Your~command~\token_to_str:N\line\{#1\}\{#2\}~in~the~'code-after'~
+ can't~be~executed~because~a~Tikz~node~doesn't~exist.\\
+ If~you~go~on~this~command~will~be~ignored.
+ }
\__nm_msg_new:nn { last-col~non~empty~for~NiceArray }
{
In~the~environment~\{\g__nm_type_env_str\},~you~must~use~the~option~
@@ -2209,8 +2230,7 @@
{ The~compilation~is~in~draft~mode:~the~dotted~lines~won't~be~drawn. }
\__nm_msg_new:nn { Yet~in~env }
{
- Environments~\{NiceArray\}~(or~\{NiceMatrix\},~etc.)~can't~be~
- nested.\\
+ Environments~\{NiceArray\}~(or~\{NiceMatrix\},~etc.)~can't~be~nested.\\
This~error~is~fatal.
}
\__nm_msg_new:nn { Outside~math~mode }