diff options
Diffstat (limited to 'tex/context/base/mkiv/mlib-lmt.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-lmt.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/mlib-lmt.lua b/tex/context/base/mkiv/mlib-lmt.lua index 774ddc8e5..9137861a5 100644 --- a/tex/context/base/mkiv/mlib-lmt.lua +++ b/tex/context/base/mkiv/mlib-lmt.lua @@ -6,7 +6,12 @@ if not modules then modules = { } end modules ['mlib-lmt'] = { license = "see context related readme files", } -local mppath = mp.path +local mppath = mp.path + +local scannumeric = mp.scan.numeric +local scanpath = mp.scan.path + +local getparameter = metapost.getparameter function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental local code = "return function(x) return " .. code .. " end" @@ -46,3 +51,13 @@ function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental end mppath(points,shape == "curve" and ".." or "--",false) end + +function mp.lmt_mesh_set() + local mesh = getparameter { "mesh", "paths" } + structures.references.currentset.mesh = mesh +end + +function mp.lmt_mesh_update() + local mesh = getparameter { "paths" } or getparameter { "mesh", "paths" } + mesh[scannumeric()] = scanpath(true) +end |