summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/mlib-lmp.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/mlib-lmp.lmt')
-rw-r--r--tex/context/base/mkxl/mlib-lmp.lmt17
1 files changed, 11 insertions, 6 deletions
diff --git a/tex/context/base/mkxl/mlib-lmp.lmt b/tex/context/base/mkxl/mlib-lmp.lmt
index a6d17dd2c..db23fcede 100644
--- a/tex/context/base/mkxl/mlib-lmp.lmt
+++ b/tex/context/base/mkxl/mlib-lmp.lmt
@@ -216,14 +216,19 @@ do
end
end)
- --
+ -- older:
- local mpprint = mp.print
- local mpquoted = mp.quoted
- local getmacro = tokens.getters.macro
+ registerscript("texvar", function()
+ if not expandtex(unknown_value,"mpcategoryparameter",true,scanstring()) then
+ injectnumeric(0)
+ end
+ end)
- registerscript("texvar", function() mpprint (getmacro(metapost.namespace .. scanstring())) end)
- registerscript("texstr", function() mpquoted(getmacro(metapost.namespace .. scanstring())) end)
+ registerscript("texstr", function()
+ if not expandtex(string_value,"mpcategoryparameter",true,scanstring()) then
+ injectstring("")
+ end
+ end)
end