diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-03-24 21:42:40 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-03-24 21:42:40 +0100 |
commit | 6a2738578157926c6ebd64048ddabb7d923b2be5 (patch) | |
tree | 908336b6d20b32c00548f2ee75ef8ae947979fb9 /tex/context/base/mkxl/mlib-lmp.lmt | |
parent | 188632f4b0f71c5170a20f1b151bde68f603bfd9 (diff) | |
download | context-6a2738578157926c6ebd64048ddabb7d923b2be5.tar.gz |
2022-03-24 21:17:00
Diffstat (limited to 'tex/context/base/mkxl/mlib-lmp.lmt')
-rw-r--r-- | tex/context/base/mkxl/mlib-lmp.lmt | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/tex/context/base/mkxl/mlib-lmp.lmt b/tex/context/base/mkxl/mlib-lmp.lmt index 01c72e4ba..3518f94bd 100644 --- a/tex/context/base/mkxl/mlib-lmp.lmt +++ b/tex/context/base/mkxl/mlib-lmp.lmt @@ -213,16 +213,34 @@ do local hashes = table.setmetatableindex("table") + -- There is no need to 'new' a hash in which case one can use any reasonable + -- tag. The registry aproach is mkiv compatible. + + local registery = { } + + -- registerdirect("lmt_hash_new", function() + -- -- local name = scanstring() + -- local name = scanwhatever() + -- hashes[name] = { } + -- end) + registerdirect("lmt_hash_new", function() - -- local name = scanstring() - local name = scanwhatever() - hashes[name] = { } + for i=1,#registry + 1 do + if not registry[i] then + registry[i] = { } + injectwhatever(i) + end + end end) registerdirect("lmt_hash_dispose", function() -- local name = scanstring() local name = scanwhatever() hashes[name] = nil + -- when new'd + if registry[name] then + registry[name] = false + end end) registerdirect("lmt_hash_in", function() @@ -349,6 +367,8 @@ do local jobpositions = job.positions local getwhd = jobpositions.whd local getxy = jobpositions.xy + local getx = jobpositions.x + local gety = jobpositions.y local getposition = jobpositions.position local getpage = jobpositions.page local getparagraph = jobpositions.paragraph |