summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-num.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/strc-num.lua')
-rw-r--r--tex/context/base/strc-num.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/tex/context/base/strc-num.lua b/tex/context/base/strc-num.lua
index 67e9b1734..e1fc60030 100644
--- a/tex/context/base/strc-num.lua
+++ b/tex/context/base/strc-num.lua
@@ -404,7 +404,7 @@ function counters.restart(name,n,newstart,noreset)
if newstart then
local d = allocate(name,n)
d.start = newstart
- if not noreset then
+ if not noreset then -- why / when needed ?
reset(name,n) -- hm
end
end
@@ -589,8 +589,13 @@ function commands.doifnotcounter (name) commands.doifnot (counterdata[name]) end
function commands.incrementedcounter(...) context(counters.add(...)) end
+-- the noreset is somewhat messy ... always false messes up e.g. itemize but true the pagenumbers
+--
+-- if this fails i'll clean up this still somewhat experimental mechanism (but i need use cases)
+
function commands.checkcountersetup(name,level,start,state)
- counters.restart(name,1,start,true) -- no reset
+ local noreset = true -- level > 0 -- was true
+ counters.restart(name,1,start,noreset) -- was true
counters.setstate(name,state)
counters.setlevel(name,level)
sections.setchecker(name,level,counters.reset)