diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-07-13 20:14:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-07-13 20:14:00 +0200 |
commit | d6b1bbb30b5d03582599faf4132630d46275bb97 (patch) | |
tree | 8ef0cfe83b7369857f3f5e3e88b6bb5edf023170 /tex/context/base/strc-pag.lua | |
parent | 850a7b29bba45111582a15b674f40f68fbd7ab5e (diff) | |
download | context-d6b1bbb30b5d03582599faf4132630d46275bb97.tar.gz |
beta 2011.07.13 20:14
Diffstat (limited to 'tex/context/base/strc-pag.lua')
-rw-r--r-- | tex/context/base/strc-pag.lua | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/tex/context/base/strc-pag.lua b/tex/context/base/strc-pag.lua index bce8a2c3a..9382fc2b5 100644 --- a/tex/context/base/strc-pag.lua +++ b/tex/context/base/strc-pag.lua @@ -8,26 +8,29 @@ if not modules then modules = { } end modules ['strc-pag'] = { local texcount, format = tex.count, string.format -local ctxcatcodes = tex.ctxcatcodes local allocate, mark = utilities.storage.allocate, utilities.storage.mark -local trace_pages = false trackers.register("structures.pages", function(v) trace_pages = v end) +local trace_pages = false trackers.register("structures.pages", function(v) trace_pages = v end) -local report_pages = logs.reporter("structure","pages") +local report_pages = logs.reporter("structure","pages") -local structures = structures +local structures = structures -local helpers = structures.helpers -local sections = structures.sections -local pages = structures.pages -local processors = structures.processors -local sets = structures.sets -local counters = structures.counters +local helpers = structures.helpers +local sections = structures.sections +local pages = structures.pages +local processors = structures.processors +local sets = structures.sets +local counters = structures.counters -local counterdata = counters.data +local counterdata = counters.data -local variables = interfaces.variables -local context = context +local variables = interfaces.variables +local context = context + +local applyprocessor = processors.apply +local startapplyprocessor = processors.startapply +local stopapplyprocessor = processors.stopapply -- storage @@ -91,17 +94,19 @@ function pages.number(realdata,pagespec) local starter = (pagespec and pagespec.starter ~= "" and pagespec.starter ) or (numberspec and numberspec.starter ~= "" and numberspec.starter ) or "" local stopper = (pagespec and pagespec.stopper ~= "" and pagespec.stopper ) or (numberspec and numberspec.stopper ~= "" and numberspec.stopper ) or "" if starter ~= "" then - processors.sprint(ctxcatcodes,starter) + applyprocessor(starter) end if conversion ~= "" then context.convertnumber(conversion,userpage) else if conversionset == "" then conversionset = "default" end local theconversion = sets.get("structure:conversions",block,conversionset,1,"numbers") -- to be checked: 1 - processors.sprint(ctxcatcodes,theconversion,convertnumber,userpage) + local data = startapplyprocessor(theconversion) + context.convertnumber(data or "number",userpage) + stopapplyprocessor() end if stopper ~= "" then - processors.sprint(ctxcatcodes,stopper) + applyprocessors(stopper) end end @@ -271,7 +276,7 @@ function counters.analyze(name,counterspecification) return cd, sectiondata, "okay" end -function counters.prefixedconverted(name,prefixspec,numberspec) +function sections.prefixedconverted(name,prefixspec,numberspec) local cd, prefixdata, result = counters.analyze(name,prefixspec) if cd then if prefixdata then |