23 Mar
2018
23 Mar
'18
9:46 a.m.
Ahoi, since i recently updated my ConTeXt beta, Lua function string.format behaves differently, i.e. type checks are stricter. I guess it’s due to switching to Lua 5.3 in LuaTeX? E.g. this: if tonumber(string.format('%d', value)) == value then ... throws bad argument #2 to 'format' (number has no integer representation) Since I just need to check if the number is integer, this works: if tonumber(value) == math.floor(value) then ... This also affects Peter Münster’s grph-downsample module; please find a fixed version attached. (Decimal pixel sizes make no sense anyway, so I just "floored" them.) Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD