diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-02-07 19:16:06 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-02-07 19:16:06 +0100 |
commit | 99dc1cd9bb77ac9fa68b0584f58f57749994fdba (patch) | |
tree | ab184c40b11270cec9c311beb0e190913471e47f /tex/context/base/mkiv/util-str.lua | |
parent | 38a9804bf0448f3c987903d2601175f1750e9fe3 (diff) | |
download | context-99dc1cd9bb77ac9fa68b0584f58f57749994fdba.tar.gz |
2019-02-07 18:55:00
Diffstat (limited to 'tex/context/base/mkiv/util-str.lua')
-rw-r--r-- | tex/context/base/mkiv/util-str.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/util-str.lua b/tex/context/base/mkiv/util-str.lua index 410a4a547..713c294eb 100644 --- a/tex/context/base/mkiv/util-str.lua +++ b/tex/context/base/mkiv/util-str.lua @@ -612,6 +612,8 @@ local environment = { formattedfloat = number.formattedfloat, stripzero = lpeg.patterns.stripzero, stripzeros = lpeg.patterns.stripzeros, + + FORMAT = string.f9, } -- -- -- @@ -730,6 +732,17 @@ local format_F = function(f) -- beware, no cast to number end end +-- if string.f9 then +-- format_F = function(f) -- beware, no cast to number +-- n = n + 1 +-- if not f or f == "" then +-- return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or FORMAT(a%s))",n,n,n,n,n) +-- else +-- return format("((a%s %% 1 == 0) and format('%%i',a%s) or FORMAT(a%s,'%%%sf'))",n,n,n,f) +-- end +-- end +-- end + local format_k = function(b,a) -- slow n = n + 1 return format("formattedfloat(a%s,%i,%i)",n,b or 0, a or 0) |