diff options
author | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
commit | 1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch) | |
tree | 04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/strc-num.lua | |
parent | eb80ce7b34f59896a1dfee5ca422495394d6677f (diff) |
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b.
git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/strc-num.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/strc-num.lua | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua index 25e575a56f7..e1a133f4a30 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-num.lua @@ -273,7 +273,7 @@ end function counters.compact(name,level,onlynumbers) local cd = counterdata[name] if cd then - local data = cd.data + local data = cd.data local compact = { } for i=1,level or #data do local d = data[i] @@ -541,26 +541,22 @@ function counters.converted(name,spec) -- name can be number and reference to st local cd if type(name) == "number" then cd = specials.retrieve("counter",name) - if cd then - cd = cd.counter - end + cd = cd and cd.counter else cd = counterdata[name] end if cd then - local spec = spec or { } - local numbers = { } - local ownnumbers = { } - local reverse = spec.order == v_reverse - local kind = spec.type or "number" - local data = cd.data + local spec = spec or { } + local numbers, ownnumbers = { }, { } + local reverse = spec.order == v_reverse + local kind = spec.type or "number" + local data = cd.data for k=1,#data do local v = data[k] -- somewhat messy, what if subnr? only last must honour kind? local vn if v.own then - numbers[k] = v.number - ownnumbers[k] = v.own + numbers[k], ownnumbers[k] = v.number, v.own else if kind == v_first then vn = v.first @@ -581,14 +577,13 @@ function counters.converted(name,spec) -- name can be number and reference to st end end end - numbers[k] = vn or v.number - ownnumbers[k] = nil + numbers[k], ownnumbers[k] = vn or v.number, nil end end - cd.numbers = numbers + cd.numbers = numbers cd.ownnumbers = ownnumbers sections.typesetnumber(cd,'number',spec) - cd.numbers = nil + cd.numbers = nil cd.ownnumbers = nil end end |