Hi,
function counters.check(level) for name, cd in next, counterdata do - if cd.level == level then + if cd.level == level or level > 0 and cd.level == -3 then if trace_counters then report_counters("resetting, name: %s, level: %s",name,level) end reset(name) end end end
The question for the counter.check function is if it should also reset the counter for each new sectionblock (replace my change above with “if cd.level == level then”) or only at the start of a new section (that’s how my change behaves now).
let's make two branches and wait till we get complaints .. function counters.check(level) for name, cd in next, counterdata do if level > 0 and cd.level == -3 then -- could become an option if trace_counters then report_counters("resetting, name: %s, level: %s (head)",name,level) end reset(name) elseif cd.level == level then if trace_counters then report_counters("resetting, name: %s, level: %s (normal)",name,level) end reset(name) end end end -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------