diff options
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) |