From f405b600d4910890b2230736c948de34e504ed8e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 23 Mar 2024 20:20:04 +0000 Subject: starray (23mar24) git-svn-id: svn://tug.org/texlive/trunk@70734 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/starray/README.md | 9 ++- Master/texmf-dist/doc/latex/starray/starray.pdf | Bin 284852 -> 285149 bytes Master/texmf-dist/doc/latex/starray/starray.tex | 2 +- Master/texmf-dist/tex/latex/starray/starray.sty | 81 +++++++++++------------- 4 files changed, 45 insertions(+), 47 deletions(-) diff --git a/Master/texmf-dist/doc/latex/starray/README.md b/Master/texmf-dist/doc/latex/starray/README.md index 7522d5faee2..c36549c6017 100644 --- a/Master/texmf-dist/doc/latex/starray/README.md +++ b/Master/texmf-dist/doc/latex/starray/README.md @@ -9,8 +9,8 @@ For more details, see the documentation, -------------- ## Requirements -* none besides a fairly recent LaTeX distribution as recent as 2022/06/01 -(with the new in kernel *\ProcessKeyOptions* and *\NewDocumentCommand*) +* none besides a fairly recent LaTeX distribution as recent as 2023/11/01 +(with the new in kernel *\ProcessKeyOptions* and *\NewDocumentCommand* and *\prop_new_linked:*) ## Installation The stable version is available at [CTAN](https://ctan.org/pkg/starray). @@ -72,7 +72,10 @@ The Current Maintainer of this work is Alceu Frigeri ------------- ## Changelog -* Version 1.7 (this) +* Version 1.8 (this) + - code speedup thanks to 'linked' property lists. Code now relies on a more recent l3kernel. + +* Version 1.7 - code cleanup. Still related to issues: #6, https://github.com/latex3/latex3/issues/1460 and https://github.com/latex3/latex3/issues/1466 - documented \starray_get_uniqueID (helper function, see documentation) diff --git a/Master/texmf-dist/doc/latex/starray/starray.pdf b/Master/texmf-dist/doc/latex/starray/starray.pdf index 4d8645bdabd..8302c0d0d96 100644 Binary files a/Master/texmf-dist/doc/latex/starray/starray.pdf and b/Master/texmf-dist/doc/latex/starray/starray.pdf differ diff --git a/Master/texmf-dist/doc/latex/starray/starray.tex b/Master/texmf-dist/doc/latex/starray/starray.tex index d6ef94da90a..171cd370383 100644 --- a/Master/texmf-dist/doc/latex/starray/starray.tex +++ b/Master/texmf-dist/doc/latex/starray/starray.tex @@ -15,7 +15,7 @@ %% %% The Current Maintainer of this work is Alceu Frigeri %% -%% This is version {1.7} {2024/03/17} +%% This is version {1.8} {2024/03/22} %% %% The list of files that compose this work can be found in the README.md file at %% https://ctan.org/pkg/starray diff --git a/Master/texmf-dist/tex/latex/starray/starray.sty b/Master/texmf-dist/tex/latex/starray/starray.sty index 72cd150410c..43b2f398512 100644 --- a/Master/texmf-dist/tex/latex/starray/starray.sty +++ b/Master/texmf-dist/tex/latex/starray/starray.sty @@ -12,22 +12,22 @@ %% %% The Current Maintainer of this work is Alceu Frigeri %% -%% This is version {1.7} {2024/03/17} +%% This is version {1.8} {2024/03/22} %% %% The list of files that compose this work can be found in the README.md file at %% https://ctan.org/pkg/starray %% %%%============================================================================== -\NeedsTeXFormat{LaTeX2e}[2022/06/01] - +\NeedsTeXFormat{LaTeX2e}[2023/11/01] \ProvidesExplPackage {starray} - {2024/03/17} - {1.7} + {2024/03/22} + {1.8} {A structured array/hash of properties} + %%%%%%% %%% %%% Just an attempt of having my packages info in a regular way @@ -38,8 +38,8 @@ { name .code:n = {starray} , prefix .code:n = {starray} , - date .code:n = {2024/03/17}, - version .code:n = {1.7} , + date .code:n = {2024/03/22}, + version .code:n = {1.8} , description .code:n = {A~structured~array/hash~of~properties} } \cs_if_exist:NF \PkgInfo @@ -167,6 +167,14 @@ %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% +\msg_new:nnnn {starray} {strict / Expl} + { + Expl~ version~ too~ old.~ Update~ needed! + } + { + Expl~ version~ too~ old.~ Update~ needed! + } + \msg_new:nnnn {starray} {strict / (re)define} { (ID:#1)~'#2'~already~defined! @@ -291,6 +299,7 @@ +\IfExplAtLeastTF{2024-03-14}{}{\msg_warning:nn {starray} {strict / Expl} } \cs_new_protected:Npn \__starray_msg:nnnnn #1#2#3#4#5 @@ -417,32 +426,28 @@ %%%%%%%%%%%%%%% %%%%%%%%%%%%%%% -% -% -\prg_new_conditional:Npnn \__starray_if_free:n #1 {p, T, F, TF} - { - \prop_if_exist:cTF {#1} - { \prg_return_false: } - { \prg_return_true: } - } -\prg_generate_conditional_variant:Nnn \__starray_if_free:n {e} {p, T, F, TF} +\prg_new_eq_conditional:NNn \__starray_if_exist:n \prop_if_exist:c {p, T, F, TF} + +\prg_generate_conditional_variant:Nnn \__starray_if_exist:n {e} {p, T, F, TF} \prg_new_conditional:Npnn \starray_if_exist:n #1 {p, T, F, TF} { - \__starray_if_free:nTF {\l__starray_prefix_tl #1 _def_prop} - { \prg_return_false: } + \__starray_if_exist:nTF {\l__starray_prefix_tl #1 _def_prop} { \prg_return_true: } + { \prg_return_false: } } -\prg_new_conditional:Npnn \__starray_if_valid:n #1 {p, T, F, TF} - { - \bool_lazy_and:nnTF {\prop_if_exist_p:c {#1}} {\prop_item:cn {#1} {is_starray}} - { \prg_return_true: } - { \prg_return_false: } - } +%\prg_new_conditional:Npnn \__starray_if_valid:n #1 {p, T, F, TF} +% { +% \bool_lazy_and:nnTF {\prop_if_exist_p:c {#1}} {\prop_item:cn {#1} {is_starray}} +% { \prg_return_true: } +% { \prg_return_false: } +% } + +\prg_new_eq_conditional:NNn \__starray_if_valid:n \prop_if_exist:c {p, T, F, TF} \prg_generate_conditional_variant:Nnn \__starray_if_valid:n {e} {p, T, F, TF} @@ -485,19 +490,9 @@ is_starray = \c_true_bool , } - \prop_gput:cne - { \l__starray_prefix_tl #2 _base_prop } - { cnt } - { \use:c { \l__starray_prefix_tl #2 _base_cnt_int } } - - \prop_gput:cne - { \l__starray_prefix_tl #2 _base_prop } - { iter } - { \use:c {\l__starray_prefix_tl #2 _base_iter_int} } - - \prop_new:c {\l__starray_prefix_tl #2 _base_idxhash_prop} + \prop_new_linked:c {\l__starray_prefix_tl #2 _base_idxhash_prop} - \prop_new:c {\l__starray_prefix_tl #2 _base_iterhash_prop} + \prop_new_linked:c {\l__starray_prefix_tl #2 _base_iterhash_prop} } \cs_generate_variant:Nn \__starray_base_new:nn { ee } @@ -541,13 +536,13 @@ % needs protection. \cs_new_protected:Npn \starray_new:n #1 { - \__starray_if_free:nTF {\l__starray_prefix_tl #1 _def_prop} + \__starray_if_exist:nTF {\l__starray_prefix_tl #1 _def_prop} { - \__starray_new:e {#1 } - \__starray_base_new:ee {#1}{#1} % TODO: might be incomplete !!! + \msg_warning:nnnn {starray} {strict / (re)define} {new:1} {#1} } { - \msg_warning:nnnn {starray} {strict / (re)define} {new:1} {#1} + \__starray_new:e {#1 } + \__starray_base_new:ee {#1}{#1} % TODO: might be incomplete !!! } } @@ -555,13 +550,13 @@ % needs protection. \prg_new_protected_conditional:Npnn \starray_new:n #1 {T, F, TF} { - \__starray_if_free:nTF {\l__starray_prefix_tl #1 _def_prop} + \__starray_if_exist:nTF {\l__starray_prefix_tl #1 _def_prop} + { \prg_return_false: } { \__starray_new:e {#1 } \__starray_base_new:ee {#1}{#1} % TODO: might be incomplete !!! \prg_return_true: } - { \prg_return_false: } } %%%%%%%%%%%%%%% @@ -915,7 +910,7 @@ { \int_use:c {\l__starray_prefix_tl #1 _base_cnt_int} } } - \prop_new:c + \prop_new_linked:c { \l__starray_prefix_tl #1 _ \l__starray_tmpa_tl _term_prop } \prop_get:cnN {\l__starray_prefix_tl #1 _base_prop} {def_ref} \l_tmpb_tl -- cgit v1.2.3