From 859ed31b143659de2ed45291cb5b121c41cecede Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Tue, 31 Mar 2015 00:15:04 +0200 Subject: 2015-03-30 23:36:00 --- tex/context/base/strc-itm.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'tex/context/base/strc-itm.lua') 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" } +} -- cgit v1.2.3