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-lua.lua | |
parent | 59e7679528d75e5d523acddf69dabdce42d53734 (diff) | |
download | context-91b59bb4f8b33701c69e095841fe4cf57971ac20.tar.gz |
2019-08-17 11:54:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lua.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-lua.lua | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua index 9d271de82..70792e426 100644 --- a/tex/context/base/mkiv/mlib-lua.lua +++ b/tex/context/base/mkiv/mlib-lua.lua @@ -170,11 +170,20 @@ do local f_integer = formatters["%i"] - local f_numeric = formatters["%n"] -- maybe %N - local f_pair = formatters["(%n,%n)"] - local f_ctrl = formatters["(%n,%n) .. controls (%n,%n) and (%n,%n)"] - local f_triplet = formatters["(%n,%n,%n)"] - local f_quadruple = formatters["(%n,%n,%n,%n)"] + -- no %n as that can produce -e notation and that is not so nice for scaled butmaybe we + -- should then switch between ... i.e. make a push/pop for the formatters here ... not now. + + -- local f_numeric = formatters["%n"] -- maybe %N + -- local f_pair = formatters["(%n,%n)"] + -- local f_ctrl = formatters["(%n,%n) .. controls (%n,%n) and (%n,%n)"] + -- local f_triplet = formatters["(%n,%n,%n)"] + -- local f_quadruple = formatters["(%n,%n,%n,%n)"] + + local f_numeric = formatters["%F"] + local f_pair = formatters["(%F,%F)"] + local f_ctrl = formatters["(%F,%F) .. controls (%F,%F) and (%F,%F)"] + local f_triplet = formatters["(%F,%F,%F)"] + local f_quadruple = formatters["(%F,%F,%F,%F)"] local f_points = formatters["%p"] local f_pair_pt = formatters["(%p,%p)"] @@ -192,25 +201,6 @@ do mp.cleaned = function(s) return lpegmatch(p,s) or s end - -- local function mpprint(...) -- we can optimize for n=1 - -- for i=1,select("#",...) do - -- local value = (select(i,...)) - -- if value ~= nil then - -- n = n + 1 - -- local t = type(value) - -- if t == "number" then - -- buffer[n] = f_numeric(value) - -- elseif t == "string" then - -- buffer[n] = value - -- elseif t == "table" then - -- buffer[n] = "(" .. concat(value,",") .. ")" - -- else -- boolean or whatever - -- buffer[n] = tostring(value) - -- end - -- end - -- end - -- end - local function mpp(value) n = n + 1 local t = type(value) |