diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-18 22:52:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-18 22:52:45 +0000 |
commit | 16aa5a7c87f18a2483d0d61795899f886781b51c (patch) | |
tree | 1d72f00b2a4185425393598402fe055c61d1de58 /Master/texmf-dist/tex/context/base/typo-prc.lua | |
parent | e68dc4d5506d46bf72823234f902bc76d1f70352 (diff) |
context, from www.pragma-ade.com/context/beta/cont-tmf.zip (18apr15)
git-svn-id: svn://tug.org/texlive/trunk@36923 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/typo-prc.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/typo-prc.lua | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/context/base/typo-prc.lua b/Master/texmf-dist/tex/context/base/typo-prc.lua index 959cabbb8e5..cde66df0087 100644 --- a/Master/texmf-dist/tex/context/base/typo-prc.lua +++ b/Master/texmf-dist/tex/context/base/typo-prc.lua @@ -6,14 +6,15 @@ if not modules then modules = { } end modules ['typo-prc'] = { license = "see context related readme files" } --- moved from strc-ini.lua - -local context, commands = context, commands -local formatters = string.formatters local lpegmatch, patterns, P, C, Cs = lpeg.match, lpeg.patterns, lpeg.P, lpeg.C, lpeg.Cs -- processors: syntax: processor->data ... not ok yet +local context = context +local implement = interfaces.implement + +local formatters = string.formatters + typesetters.processors = typesetters.processors or { } local processors = typesetters.processors @@ -21,8 +22,8 @@ local trace_processors = false local report_processors = logs.reporter("processors") local registered = { } -context_applyprocessor = context.applyprocessor -context_firstofoneargument = context.firstofoneargument +local ctx_applyprocessor = context.applyprocessor +local ctx_firstofoneargument = context.firstofoneargument trackers.register("typesetters.processors", function(v) trace_processors = v end) @@ -58,7 +59,7 @@ function processors.apply(p,s) if trace_processors then report_processors("applying %s processor %a, argument: %s","known",p,s) end - context_applyprocessor(p,s) + ctx_applyprocessor(p,s) elseif s then if trace_processors then report_processors("applying %s processor %a, argument: %s","unknown",p,s) @@ -81,21 +82,21 @@ function processors.startapply(p,s) if trace_processors then report_processors("start applying %s processor %a","known",p) end - context_applyprocessor(p) + ctx_applyprocessor(p) context("{") return s elseif p then if trace_processors then report_processors("start applying %s processor %a","unknown",p) end - context_firstofoneargument() + ctx_firstofoneargument() context("{") return s else if trace_processors then report_processors("start applying %s processor","ignored") end - context_firstofoneargument() + ctx_firstofoneargument() context("{") return str end @@ -124,5 +125,5 @@ end -- interface -commands.registerstructureprocessor = processors.register -commands.resetstructureprocessor = processors.reset +implement { name = "registerstructureprocessor", actions = processors.register, arguments = "string" } +implement { name = "resetstructureprocessor", actions = processors.reset, arguments = "string" } |