diff options
author | Marius <mariausol@gmail.com> | 2013-05-20 03:20:28 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-05-20 03:20:28 +0300 |
commit | 5fc5cfb5014ddcc2942e13a559f4082fb66aa6e7 (patch) | |
tree | 53f81e99fac8c80ddd2fb70e233a7e5d5735722f /tex/context/base/strc-itm.lua | |
parent | 13ec4b540e0d46c97fd7b089e0b7413da81e0a9f (diff) | |
download | context-5fc5cfb5014ddcc2942e13a559f4082fb66aa6e7.tar.gz |
beta 2013.05.20 02:00
Diffstat (limited to 'tex/context/base/strc-itm.lua')
-rw-r--r-- | tex/context/base/strc-itm.lua | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/tex/context/base/strc-itm.lua b/tex/context/base/strc-itm.lua index 75e77767f..8a745f356 100644 --- a/tex/context/base/strc-itm.lua +++ b/tex/context/base/strc-itm.lua @@ -1,38 +1,38 @@ -if not modules then modules = { } end modules ['strc-itm'] = {
- version = 1.001,
- comment = "companion to strc-itm.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local structures = structures
-local itemgroups = structures.itemgroups
-local jobpasses = job.passes
-
-local setfield = jobpasses.save
-local getfield = jobpasses.getfield
-
-function itemgroups.register(name,nofitems,maxwidth)
- setfield("itemgroup", { nofitems, maxwidth })
-end
-
-function itemgroups.nofitems(name,index)
- return getfield("itemgroup", index, 1, 0)
-end
-
-function itemgroups.maxwidth(name,index)
- return getfield("itemgroup", index, 2, 0)
-end
-
--- interface (might become counter/dimension)
-
-commands.registeritemgroup = itemgroups.register
-
-function commands.nofitems(name,index)
- context(getfield("itemgroup", index, 1, 0))
-end
-
-function commands.maxitemwidth(name,index)
- context(getfield("itemgroup", index, 2, 0))
-end
+if not modules then modules = { } end modules ['strc-itm'] = { + version = 1.001, + comment = "companion to strc-itm.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local structures = structures +local itemgroups = structures.itemgroups +local jobpasses = job.passes + +local setfield = jobpasses.save +local getfield = jobpasses.getfield + +function itemgroups.register(name,nofitems,maxwidth) + setfield("itemgroup", { nofitems, maxwidth }) +end + +function itemgroups.nofitems(name,index) + return getfield("itemgroup", index, 1, 0) +end + +function itemgroups.maxwidth(name,index) + return getfield("itemgroup", index, 2, 0) +end + +-- interface (might become counter/dimension) + +commands.registeritemgroup = itemgroups.register + +function commands.nofitems(name,index) + context(getfield("itemgroup", index, 1, 0)) +end + +function commands.maxitemwidth(name,index) + context(getfield("itemgroup", index, 2, 0)) +end |