diff options
Diffstat (limited to 'tex/context/base/util-dim.lua')
-rw-r--r-- | tex/context/base/util-dim.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tex/context/base/util-dim.lua b/tex/context/base/util-dim.lua index 4668326df..4bae2d099 100644 --- a/tex/context/base/util-dim.lua +++ b/tex/context/base/util-dim.lua @@ -436,12 +436,12 @@ probably use a hash instead of a one-element table.</p> <p>Goodie:s</p> --ldx]]-- -function number.percent(n) -- will be cleaned up once luatex 0.30 is out - local hsize = tex.hsize - if type(hsize) == "string" then - hsize = stringtodimen(hsize) +function number.percent(n,d) -- will be cleaned up once luatex 0.30 is out + d = d or tex.hsize + if type(d) == "string" then + d = stringtodimen(d) end - return (n/100) * hsize + return (n/100) * d end number["%"] = number.percent |