summaryrefslogtreecommitdiff
path: root/tex/context/base/x-calcmath.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/x-calcmath.lua')
-rw-r--r--tex/context/base/x-calcmath.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/x-calcmath.lua b/tex/context/base/x-calcmath.lua
index e4d5da139..27ad56f58 100644
--- a/tex/context/base/x-calcmath.lua
+++ b/tex/context/base/x-calcmath.lua
@@ -9,11 +9,12 @@ if not modules then modules = { } end modules ['x-calcmath'] = {
local format, lower, upper, gsub, sub = string.format, string.lower, string.upper, string.gsub, string.sub
local lpegmatch = lpeg.match
-tex = tex or { }
+local texsprint = (tex and tex.sprint) or function(catcodes,str) print(str) end
-texsprint = tex.sprint or function(catcodes,str) print(str) end
+moduledata = moduledata or { }
+moduledata.calcmath = moduledata.calcmath or { }
-calcmath = { }
+local calcmath = moduledata.calcmath
local list_1 = {
"median", "min", "max", "round", "ln", "log",