diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-31 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-31 00:15:04 +0200 |
commit | 859ed31b143659de2ed45291cb5b121c41cecede (patch) | |
tree | 46e26547e894355e36f6bf40d989641d793a9561 /tex/context/base/strc-itm.lua | |
parent | bda5ef0ab2fad99c51a767cfa51c569422dd4313 (diff) | |
download | context-859ed31b143659de2ed45291cb5b121c41cecede.tar.gz |
2015-03-30 23:36:00
Diffstat (limited to 'tex/context/base/strc-itm.lua')
-rw-r--r-- | tex/context/base/strc-itm.lua | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tex/context/base/strc-itm.lua b/tex/context/base/strc-itm.lua index b736ff4e3..adec591c1 100644 --- a/tex/context/base/strc-itm.lua +++ b/tex/context/base/strc-itm.lua @@ -10,6 +10,8 @@ local structures = structures local itemgroups = structures.itemgroups local jobpasses = job.passes +local implement = interfaces.implement + local setvariable = jobpasses.save local getvariable = jobpasses.getfield @@ -25,7 +27,7 @@ local counts = table.setmetatableindex("number") local trialtypesetting = context.trialtypesetting -function commands.analyzeitemgroup(name,level) +local function analyzeitemgroup(name,level) local n = counts[name] if level == 1 then n = n + 1 @@ -38,7 +40,7 @@ function commands.analyzeitemgroup(name,level) texsetdimen("local","d_strc_itemgroups_max_width",w) end -function commands.registeritemgroup(name,level,nofitems,maxwidth) +local function registeritemgroup(name,level,nofitems,maxwidth) local n = counts[name] if not trialtypesetting() then -- no trialtypsetting @@ -47,3 +49,15 @@ function commands.registeritemgroup(name,level,nofitems,maxwidth) counts[name] = n - 1 end end + +implement { + name = "analyzeitemgroup", + actions = analyzeitemgroup, + arguments = { "string", "integer" } +} + +implement { + name = "registeritemgroup", + actions = registeritemgroup, + arguments = { "string", "integer", "integer", "dimen" } +} |