summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-06-04 19:57:16 +0000
committerKarl Berry <karl@freefriends.org>2023-06-04 19:57:16 +0000
commit2653f3bfe50001129f41a8f74caa84d305ee5c55 (patch)
treebdaf5fd8fdd54ecd81ee4ee3a287727ae45f1721 /Master/texmf-dist/tex/latex
parente2cbc9dd61a4b72e2f110cac5613a4d8efe1802d (diff)
nicematrix (4jun23)
git-svn-id: svn://tug.org/texlive/trunk@67280 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty74
1 files changed, 53 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty
index d3e036baeb9..a04f78a423b 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{6.19a}
-\def\myfiledate{2023/05/25}
+\def\myfileversion{6.20}
+\def\myfiledate{2023/06/04}
\RequirePackage{pgfcore}
\usepgfmodule{shapes}
\RequirePackage{l3keys2e}
@@ -689,6 +689,7 @@
\bool_new:N \l__nicematrix_standard_cline_bool
\dim_new:N \l__nicematrix_cell_space_top_limit_dim
\dim_new:N \l__nicematrix_cell_space_bottom_limit_dim
+\bool_new:N \l__nicematrix_xdots_h_labels_bool
\dim_new:N \l__nicematrix_xdots_inter_dim
\hook_gput_code:nnn { begindocument } { . }
{ \dim_set:Nn \l__nicematrix_xdots_inter_dim { 0.45 em } }
@@ -734,6 +735,8 @@
\bool_new:N \l__nicematrix_delimiters_max_width_bool
\keys_define:nn { NiceMatrix / xdots }
{
+ horizontal-labels .bool_set:N = \l__nicematrix_xdots_h_labels_bool ,
+ horizontal-labels .default:n = true ,
line-style .code:n =
{
\bool_lazy_or:nnTF
@@ -4383,8 +4386,8 @@
\pgfrememberpicturepositiononpagetrue
\pgf@relevantforpicturesizefalse
\bool_lazy_or:nnTF
- { \tl_if_eq_p:NN \l__nicematrix_xdots_line_style_tl \c__nicematrix_standard_tl }
- \l__nicematrix_dotted_bool
+ { \tl_if_eq_p:NN \l__nicematrix_xdots_line_style_tl \c__nicematrix_standard_tl }
+ \l__nicematrix_dotted_bool
\__nicematrix_draw_standard_dotted_line:
\__nicematrix_draw_unstandard_dotted_line:
}
@@ -4402,8 +4405,28 @@
\l__nicematrix_xdots_down_tl
}
\cs_generate_variant:Nn \__nicematrix_draw_unstandard_dotted_line:n { o }
+\hook_gput_code:nnn { begindocument } { . }
+ {
+ \IfPackageLoadedTF { tikz }
+ {
+ \tikzset
+ {
+ __nicematrix_node_above / .style = { sloped , above } ,
+ __nicematrix_node_below / .style = { sloped , below }
+ }
+ }
+ { }
+ }
\cs_new_protected:Npn \__nicematrix_draw_unstandard_dotted_line:nnn #1 #2 #3
{
+ \bool_if:NT \l__nicematrix_xdots_h_labels_bool
+ {
+ \tikzset
+ {
+ __nicematrix_node_above / .style = { auto = left } ,
+ __nicematrix_node_below / .style = { auto = right }
+ }
+ }
\draw
[
#1 ,
@@ -4411,8 +4434,8 @@
shorten~< = \l__nicematrix_xdots_shorten_start_dim ,
]
( \l__nicematrix_x_initial_dim , \l__nicematrix_y_initial_dim )
- -- node [ sloped , above ] { $ \scriptstyle #2 $ }
- node [ sloped , below ] { $ \scriptstyle #3 $ }
+ -- node [ __nicematrix_node_above ] { $ \scriptstyle #2 $ }
+ node [ __nicematrix_node_below ] { $ \scriptstyle #3 $ }
( \l__nicematrix_x_final_dim , \l__nicematrix_y_final_dim ) ;
\end { scope }
}
@@ -4430,24 +4453,26 @@
{ \pgfpoint \l__nicematrix_x_initial_dim \l__nicematrix_y_initial_dim }
{ \pgfpoint \l__nicematrix_x_final_dim \l__nicematrix_y_final_dim }
}
- \pgftransformrotate
+ \fp_set:Nn \l_tmpa_fp
{
- \fp_eval:n
- {
- atand
- (
- \l__nicematrix_y_final_dim - \l__nicematrix_y_initial_dim ,
- \l__nicematrix_x_final_dim - \l__nicematrix_x_initial_dim
- )
- }
+ atand
+ (
+ \l__nicematrix_y_final_dim - \l__nicematrix_y_initial_dim ,
+ \l__nicematrix_x_final_dim - \l__nicematrix_x_initial_dim
+ )
}
+ \pgftransformrotate { \fp_use:N \l_tmpa_fp }
+ \bool_if:NF \l__nicematrix_xdots_h_labels_bool { \fp_zero:N \l_tmpa_fp }
\pgfnode
{ rectangle }
{ south }
{
- \c_math_toggle_token
- \scriptstyle \l__nicematrix_xdots_up_tl
- \c_math_toggle_token
+ \rotatebox { \fp_eval:n { - \l_tmpa_fp } }
+ {
+ \c_math_toggle_token
+ \scriptstyle \l__nicematrix_xdots_up_tl
+ \c_math_toggle_token
+ }
}
{ }
{ \pgfusepath { } }
@@ -4455,9 +4480,12 @@
{ rectangle }
{ north }
{
- \c_math_toggle_token
- \scriptstyle \l__nicematrix_xdots_down_tl
- \c_math_toggle_token
+ \rotatebox { \fp_eval:n { - \l_tmpa_fp } }
+ {
+ \c_math_toggle_token
+ \scriptstyle \l__nicematrix_xdots_down_tl
+ \c_math_toggle_token
+ }
}
{ }
{ \pgfusepath { } }
@@ -7735,6 +7763,9 @@
{
\group_begin:
\__nicematrix_compute_i_j:nn { #2 } { #3 }
+ % added 6.19b
+ \int_compare:nNnT \l__nicematrix_first_i_tl = \l__nicematrix_last_i_tl
+ { \cs_set:Npn \arraystretch { 1 } }
\bool_lazy_or:nnTF
{ \int_compare_p:nNn \l__nicematrix_last_i_tl > \g__nicematrix_row_total_int }
{ \int_compare_p:nNn \l__nicematrix_last_j_tl > \g__nicematrix_col_total_int }
@@ -8630,6 +8661,7 @@
{
The~available~keys~are~(in~alphabetic~order):~
'color',~
+ 'horizontal-labels',~
'inter',~
'line-style',~
'radius',~