summaryrefslogtreecommitdiff
path: root/tex/context/base/chem-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/chem-ini.lua')
-rw-r--r--tex/context/base/chem-ini.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/tex/context/base/chem-ini.lua b/tex/context/base/chem-ini.lua
index 776647554..4bbfe4c38 100644
--- a/tex/context/base/chem-ini.lua
+++ b/tex/context/base/chem-ini.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['chem-ini'] = {
license = "see context related readme files"
}
-local format, texsprint = string.format, tex.sprint
+local format = string.format
local lpegmatch = lpeg.match
local P, R, V, Cc, Cs = lpeg.P, lpeg.R, lpeg.V, lpeg.Cc, lpeg.Cs
@@ -15,7 +15,7 @@ local trace_molecules = false trackers.register("chemistry.molecules", functio
local report_chemistry = logs.new("chemistry")
-local ctxcatcodes = tex.ctxcatcodes
+local context = context
chemicals = chemicals or { }
local chemicals = chemicals
@@ -72,8 +72,8 @@ function commands.molecule(str)
if trace_molecules then
local rep = lpegmatch(parser,str)
report_chemistry("molecule %s => %s",str,rep)
- texsprint(ctxcatcodes,rep)
+ context(rep)
else
- texsprint(ctxcatcodes,lpegmatch(parser,str))
+ context(lpegmatch(parser,str))
end
end