diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua index 885e2de0ba3..57fff5a21e7 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua @@ -16,7 +16,7 @@ if not modules then modules = { } end modules ['strc-doc'] = { -- in lists however zero's are ignored, so there numbersegments=2:4 gives result local next, type, tonumber, select = next, type, tonumber, select -local format, gsub, find, gmatch, match = string.format, string.gsub, string.find, string.gmatch, string.match +local find, match = string.find, string.match local concat, fastcopy, insert, remove = table.concat, table.fastcopy, table.insert, table.remove local max, min = math.max, math.min local allocate, mark, accesstable = utilities.storage.allocate, utilities.storage.mark, utilities.tables.accesstable @@ -37,7 +37,6 @@ local v_auto = variables.auto local v_strict = variables.strict local v_all = variables.all local v_positive = variables.positive -local v_by = variables.by local trace_sectioning = false trackers.register("structures.sectioning", function(v) trace_sectioning = v end) local trace_detail = false trackers.register("structures.detail", function(v) trace_detail = v end) @@ -64,8 +63,6 @@ local strippedprocessor = processors.stripped local convertnumber = converters.convert -local a_internal = attributes.private('internal') - local ctx_convertnumber = context.convertnumber local ctx_sprint = context.sprint local ctx_finalizeauto = context.finalizeautostructurelevel @@ -327,7 +324,7 @@ function sections.setentry(given) local mappedlevel = levelmap[givenname] local newdepth = tonumber(mappedlevel or (olddepth > 0 and olddepth) or 1) -- hm, levelmap only works for section-* local resetset = directives and directives.resetset or "" - -- local resetter = sets.getall("structure:resets",data.block,resetset) + -- local resetter = sets.getall("structure:resets",data.block,resetset) -- a trick to permit userdata to overload title, ownnumber and reference -- normally these are passed as argument but nowadays we provide several -- interfaces (we need this because we want to be compatible) @@ -414,16 +411,17 @@ function sections.setentry(given) v[2](k) end end - local n = { } - for i=1,newdepth do - n[i] = numbers[i] - end - numberdata.numbers = n +-- local n = { } +-- for i=1,newdepth do +-- n[i] = numbers[i] +-- end +-- numberdata.numbers = n + numberdata.numbers = { unpack(numbers,1,newdepth) } if not numberdata.block then numberdata.block = getcurrentblock() -- also in references end if #ownnumbers > 0 then - numberdata.ownnumbers = fastcopy(ownnumbers) + numberdata.ownnumbers = fastcopy(ownnumbers) -- { unpack(ownnumbers) } end if trace_detail then report_structure("name %a, numbers % a, own numbers % a",givenname,numberdata.numbers,numberdata.ownnumbers) |