summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/mlib-ctx.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/mlib-ctx.lmt')
-rw-r--r--tex/context/base/mkxl/mlib-ctx.lmt28
1 files changed, 9 insertions, 19 deletions
diff --git a/tex/context/base/mkxl/mlib-ctx.lmt b/tex/context/base/mkxl/mlib-ctx.lmt
index 13dba92cd..64225e308 100644
--- a/tex/context/base/mkxl/mlib-ctx.lmt
+++ b/tex/context/base/mkxl/mlib-ctx.lmt
@@ -118,15 +118,15 @@ implement {
arguments = "string",
actions = function(name)
local value = metapost.variables[name]
- if value ~= nil then
- local tvalue = type(value)
- if tvalue == "table" then
- context(concat(value," "))
- elseif tvalue == "number" or tvalue == "boolean" then
- context(tostring(value))
- elseif tvalue == "string" then
- context(value)
- end
+ local tvalue = type(value)
+ if tvalue == "nil" then
+ context("0")
+ elseif tvalue == "table" then
+ context(concat(value," "))
+ elseif tvalue == "number" or tvalue == "boolean" then
+ context(tostring(value))
+ elseif tvalue == "string" then
+ context(value)
end
end
}
@@ -362,16 +362,6 @@ function mptex.reset()
end
implement {
- name = "mppushvariables",
- actions = metapost.pushvariables,
-}
-
-implement {
- name = "mppopvariables",
- actions = metapost.popvariables,
-}
-
-implement {
name = "mptexset",
arguments = "string",
actions = mptex.set