diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-08-24 23:32:35 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-08-24 23:32:35 +0200 |
commit | fca2d946bc4d3ef525c3a2c9016e3b88d6d09812 (patch) | |
tree | d0fb4d8a17342fcf08a4b033cf61a47fd6e0aa98 /tex/context/base/mkiv/mlib-lmp.lua | |
parent | f6e7648f6126ffe087071531f03c674be32930f1 (diff) | |
download | context-fca2d946bc4d3ef525c3a2c9016e3b88d6d09812.tar.gz |
2019-08-24 22:49:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lmp.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-lmp.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tex/context/base/mkiv/mlib-lmp.lua b/tex/context/base/mkiv/mlib-lmp.lua index 292265be1..93a758681 100644 --- a/tex/context/base/mkiv/mlib-lmp.lua +++ b/tex/context/base/mkiv/mlib-lmp.lua @@ -6,23 +6,15 @@ if not modules then modules = { } end modules ['mlib-lmp'] = { license = "see context related readme files", } -local get = mp.get local aux = mp.aux -local scan = mp.scan - local mpnumeric = aux.numeric local mppair = aux.pair local mpquoted = aux.quoted -local scannumber = scan.number -local scanpath = scan.path - -local registerscript = metapost.registerscript +-- todo: use a stack? do - -- todo: use a stack? - local p = nil local n = 0 @@ -33,6 +25,10 @@ do if CONTEXTLMTXMODE > 0 then + local scan = mp.scan + local scannumber = scan.number + local scanpath = scan.path + local function mf_path_length() p = scanpath() n = p and #p or 1 @@ -68,6 +64,8 @@ do end end + local registerscript = metapost.registerscript + registerscript("pathreset", mf_path_reset) registerscript("pathlengthof", mf_path_length) registerscript("pathpointof", mf_path_point) @@ -76,6 +74,7 @@ do else + local get = mp.get local mpgetpath = get.path local function mf_path_length(name) |