diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-07-03 14:52:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-07-03 14:52:00 +0200 |
commit | a220826721f9023e2a97c46bf61463651b289c64 (patch) | |
tree | 6b7ba5cecf817abb9551567f1d55f0ec44128b0d /tex/context/base/publ-dat.lua | |
parent | 010512825a39d44c579a682e6973481b82710e83 (diff) | |
download | context-a220826721f9023e2a97c46bf61463651b289c64.tar.gz |
beta 2014.07.03 14:52
Diffstat (limited to 'tex/context/base/publ-dat.lua')
-rw-r--r-- | tex/context/base/publ-dat.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua index fdb77b6d3..986ef75c2 100644 --- a/tex/context/base/publ-dat.lua +++ b/tex/context/base/publ-dat.lua @@ -639,3 +639,19 @@ end -- print(table.serialize(dataset.xmldata)) -- print(table.serialize(dataset.shortcuts)) -- print(xml.serialize(dataset.xmldata)) + +-- a helper: + +function publications.concatstate(i,n) + if i == 0 then + return 0 + elseif i == 1 then + return 1 + elseif i == 2 and n == 2 then + return 4 + elseif i == n then + return 3 + else + return 2 + end +end |