summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty28
1 files changed, 21 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty b/Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty
index ee7ff3ad11f..3c411d227ac 100644
--- a/Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty
+++ b/Master/texmf-dist/tex/luatex/penlightplus/penlightplus.sty
@@ -1,5 +1,5 @@
% Kale Ewasiuk (kalekje@gmail.com)
-% 2024-02-29
+% 2024-03-14
% Copyright (C) 2021-2024 Kale Ewasiuk
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -22,7 +22,7 @@
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
% OR OTHER DEALINGS IN THE SOFTWARE.
-\ProvidesPackage{penlightplus}[2024-02-29]
+\ProvidesPackage{penlightplus}[2024-03-14]
\RequirePackage{luacode}
\RequirePackage{luakeys}
@@ -141,14 +141,14 @@
end
}}
-\NewDocumentCommand{\tbladd}{m m m}{\luadirect{% add a kv pair to a table
- __tbl__ = penlight.get_tbl_name(\luastring{#1})
- penlight.tbls[__tbl__][\luastring{#2}] = \luastring{#3}
+\NewDocumentCommand{\tbladd}{m m}{\luadirect{% add a kv pair to a table
+ __tbl__, __key__ = penlight.get_tbl_index(\luastring{#1}, true)
+ penlight.tbls[__tbl__][__key__] = \luastring{#2}
}}
\NewDocumentCommand{\tbladdN}{m m m}{\luadirect{% add a kv pair to a table
- __tbl__ = penlight.get_tbl_name(\luastring{#1})
- penlight.tbls[__tbl__][\luastring{#2}] = \luastringN{#3}
+ __tbl__, __key__ = penlight.get_tbl_index(\luastring{#1}, true)
+ penlight.tbls[__tbl__][__key__] = \luastringN{#2}
}}
@@ -183,8 +183,22 @@
\NewDocumentCommand{\tblprt}{m}{\luadirect{penlight.wrth(penlight.get_tbl(\luastring{#1}),'penlightplus table: '..\luastring{#1})}}
+
+
+
% legacy code, delete this
\let\kvtblundefcheck\tblkvundefcheck
+
+\NewDocumentCommand{\tbladdo}{m m m}{\luadirect{% add a kv pair to a table
+ __tbl__ = penlight.get_tbl_name(\luastring{#1})
+ penlight.tbls[__tbl__][\luastring{#2}] = \luastring{#3}
+}}
+
+\NewDocumentCommand{\tbladdNo}{m m m}{\luadirect{% add a kv pair to a table
+ __tbl__ = penlight.get_tbl_name(\luastring{#1})
+ penlight.tbls[__tbl__][\luastring{#2}] = \luastringN{#3}
+}}
+
\let\chgtbl\tblchg
\let\newtbl\tblnew
\let\gettbl\tblget