Skip to content

Commit

Permalink
\rulewidth -> \lTblrRuleWidthDim (#102, #527)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjr committed Dec 29, 2024
1 parent f23e58d commit b46828c
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions tabularray.sty
Original file line number Diff line number Diff line change
Expand Up @@ -1308,16 +1308,17 @@
%% \NewDashStyle commands
\dim_zero_new:N \rulewidth
\dim_set:Nn \rulewidth {0.4pt}
\dim_new:N \lTblrRuleWidthDim
\dim_set:Nn \lTblrRuleWidthDim {0.4pt}
\cs_set_eq:NN \rulewidth \lTblrRuleWidthDim
\prop_new:N \g__tblr_defined_hdash_styles_prop
\prop_new:N \g__tblr_defined_vdash_styles_prop
\prop_gset_from_keyval:Nn \g__tblr_defined_hdash_styles_prop
{ solid = \hrule height \rulewidth }
{ solid = \hrule height \lTblrRuleWidthDim }
\prop_gset_from_keyval:Nn \g__tblr_defined_vdash_styles_prop
{ solid = \vrule width \rulewidth }
{ solid = \vrule width \lTblrRuleWidthDim }
\NewDocumentCommand \NewDashStyle { m m }
{
Expand All @@ -1343,15 +1344,23 @@
\tl_put_right:Ne \l__tblr_h_tl { { \dim_use:N \l_tmpa_dim } }
\tl_put_right:Nn \l__tblr_h_tl
{
{ \hss \vbox:n { \hbox_to_wd:nn {#2} {} \hrule height \rulewidth } \hss }
{
\hss
\vbox:n { \hbox_to_wd:nn {#2} {} \hrule height \lTblrRuleWidthDim }
\hss
}
}
\prop_gput:NnV \g__tblr_defined_hdash_styles_prop {#1} \l__tblr_h_tl
%\prop_log:N \g__tblr_defined_hdash_styles_prop
\tl_set:Nn \l__tblr_v_tl { \vbox_to_ht:nn }
\tl_put_right:Ne \l__tblr_v_tl { { \dim_use:N \l_tmpa_dim } }
\tl_put_right:Nn \l__tblr_v_tl
{
{ \vss \hbox:n { \vbox_to_ht:nn {#2} {} \vrule width \rulewidth } \vss }
{
\vss
\hbox:n { \vbox_to_ht:nn {#2} {} \vrule width \lTblrRuleWidthDim }
\vss
}
}
\prop_gput:NnV \g__tblr_defined_vdash_styles_prop {#1} \l__tblr_v_tl
%\prop_log:N \g__tblr_defined_vdash_styles_prop
Expand Down Expand Up @@ -3683,7 +3692,8 @@
\group_begin:
\tl_set:Ne \l__tblr_w_tl
{ \__tblr_spec_item:ne { vline } { [#1][#2](#3) / wd } }
\tl_if_empty:NF \l__tblr_w_tl { \dim_set:Nn \rulewidth { \l__tblr_w_tl } }
\tl_if_empty:NF \l__tblr_w_tl
{ \dim_set:Nn \lTblrRuleWidthDim { \l__tblr_w_tl } }
\tl_set:Ne \l__tblr_d_tl
{ \__tblr_spec_item:ne { vline } { [#1][#2](#3) / @dash } }
\tl_set:Ne \l__tblr_b_tl { \tl_tail:N \l__tblr_d_tl }
Expand Down Expand Up @@ -3750,7 +3760,8 @@
\group_begin:
\tl_set:Ne \l__tblr_w_tl
{ \__tblr_spec_item:ne { hline } { [#1][#2](#3) / wd } }
\tl_if_empty:NF \l__tblr_w_tl { \dim_set:Nn \rulewidth { \l__tblr_w_tl } }
\tl_if_empty:NF \l__tblr_w_tl
{ \dim_set:Nn \lTblrRuleWidthDim { \l__tblr_w_tl } }
\tl_set:Ne \l__tblr_d_tl
{ \__tblr_spec_item:ne { hline } { [#1][#2](#3) / @dash } }
\tl_set:Ne \l__tblr_a_tl { \tl_head:N \l__tblr_d_tl }
Expand Down

0 comments on commit b46828c

Please sign in to comment.