diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-07-03 15:15:05 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-07-03 15:15:05 +0200 |
commit | 6d60c7dc7fbd0b15d205c16ac47dcb8efaefe772 (patch) | |
tree | 3e28efb0e65ac9519a9754b89f9fb76bffa7db71 /tex/context/base/publ-dat.lua | |
parent | 8e8dd7540025b45c0fcb5687bcfeb12928b74426 (diff) | |
download | context-6d60c7dc7fbd0b15d205c16ac47dcb8efaefe772.tar.gz |
2014-07-03 14:54:00
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 |