diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-08-17 14:26:12 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-08-17 14:26:12 +0200 |
commit | 91b59bb4f8b33701c69e095841fe4cf57971ac20 (patch) | |
tree | fb02a1226f504fce16923a396ae41bf9b2b6cc04 /tex/context/base/mkiv/mlib-lmt.lua | |
parent | 59e7679528d75e5d523acddf69dabdce42d53734 (diff) | |
download | context-91b59bb4f8b33701c69e095841fe4cf57971ac20.tar.gz |
2019-08-17 11:54:00
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 |