diff options
Diffstat (limited to 'tex/context/base/mkxl/mlib-lmt.lmt')
-rw-r--r-- | tex/context/base/mkxl/mlib-lmt.lmt | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/tex/context/base/mkxl/mlib-lmt.lmt b/tex/context/base/mkxl/mlib-lmt.lmt index f0b59248a..355674582 100644 --- a/tex/context/base/mkxl/mlib-lmt.lmt +++ b/tex/context/base/mkxl/mlib-lmt.lmt @@ -10,15 +10,16 @@ if not modules then modules = { } end modules ['mlib-lmt'] = { local type = type -local aux = mp.aux -local mpdirect = aux.direct -local mppath = mp.path +local aux = mp.aux +local mpdirect = aux.direct +local mppath = mp.path -local scan = mp.scan -local scannumeric = scan.numeric -local scanpath = scan.path +local scan = mp.scan +local scannumeric = scan.numeric +local scanpath = scan.path -local getparameter = metapost.getparameter +local getparameter = metapost.getparameter +local registerscript = metapost.registerscript function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental local code = "return function(x) return " .. code .. " end" @@ -126,27 +127,21 @@ function mp.lmt_svg_include() end end - -function mp.lmt_do_remaptext() +registerscript("remaptext", function() local parameters = metapost.scanparameters() if parameters and parameters.label then metapost.remaptext(parameters) end -end +end) do local dropins = fonts.dropins - local registerglyphs = dropins.registerglyphs local registerglyph = dropins.registerglyph + local registerglyphs = dropins.registerglyphs - function mp.lmt_register_glyph() - registerglyph(metapost.getparameterset("mpsglyph")) - end - - function mp.lmt_register_glyphs() - registerglyphs(metapost.getparameterset("mpsglyphs")) - end + registerscript("registerglyph", function() registerglyph (metapost.getparameterset("mpsglyph")) end) + registerscript("registerglyphs",function() registerglyphs(metapost.getparameterset("mpsglyphs")) end) end |