diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/x-asciimath.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/x-asciimath.lua | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/context/base/x-asciimath.lua b/Master/texmf-dist/tex/context/base/x-asciimath.lua index c2b15e3132f..50f4b0391a8 100644 --- a/Master/texmf-dist/tex/context/base/x-asciimath.lua +++ b/Master/texmf-dist/tex/context/base/x-asciimath.lua @@ -10,7 +10,13 @@ if not modules then modules = { } end modules ['x-asciimath'] = { <p>Some backgrounds are discussed in <t>x-asciimath.mkiv</t>.</p> --ldx]]-- -local trace_mapping = false if trackers then trackers.register("asciimath.mapping", function(v) trace_mapping = v end) end +local trace_mapping = false if trackers then trackers.register("modules.asciimath.mapping", function(v) trace_mapping = v end) end + +local asciimath = { } +local moduledata = moduledata or { } +moduledata.asciimath = asciimath + +local report_asciimath = logs.reporter("mathematics","asciimath") local format = string.format local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes @@ -164,22 +170,22 @@ local parser local function converted(original,totex) local ok, result if trace_mapping then - logs.report("asciimath","original : %s",original) + report_asciimath("original : %s",original) end local premapped = lpegmatch(premapper,original) if premapped then if trace_mapping then - logs.report("asciimath","prepared : %s",premapped) + report_asciimath("prepared : %s",premapped) end local parsed = lpegmatch(parser,premapped) if parsed then if trace_mapping then - logs.report("asciimath","parsed : %s",parsed) + report_asciimath("parsed : %s",parsed) end local postmapped = lpegmatch(postmapper,parsed) if postmapped then if trace_mapping then - logs.report("asciimath","finalized : %s",postmapped) + report_asciimath("finalized: %s",postmapped) end result, ok = postmapped, true else @@ -262,6 +268,5 @@ parser = Cs { "main", } -asciimath = { } -asciimath.reserved = reserved -asciimath.convert = converted +asciimath.reserved = reserved +asciimath.convert = converted |