summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-tra.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-03-20 18:51:53 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-03-20 18:51:53 +0100
commit8e0089484acf80066e7393b1245d59dda211be09 (patch)
treea444a174ea8de55816cb4a9c3def00fb4521e7d8 /tex/context/base/mkiv/node-tra.lua
parent8f5c555274eb48fcaaa3d7f340ee77710846fb7e (diff)
downloadcontext-8e0089484acf80066e7393b1245d59dda211be09.tar.gz
2017-03-20 17:38:00
Diffstat (limited to 'tex/context/base/mkiv/node-tra.lua')
-rw-r--r--tex/context/base/mkiv/node-tra.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/node-tra.lua b/tex/context/base/mkiv/node-tra.lua
index 0d3192559..8c79e0ab8 100644
--- a/tex/context/base/mkiv/node-tra.lua
+++ b/tex/context/base/mkiv/node-tra.lua
@@ -437,12 +437,12 @@ dimenfactors[""] = dimenfactors.pt
local function numbertodimen(d,unit,fmt)
if not d or d == 0 then
- if not unit or unit == "pt" then
- return "0pt"
- elseif fmt then
- return formatters[fmt](0,unit)
- else
+ if fmt then
+ return formatters[fmt](0,unit or "pt")
+ elseif unit then
return 0 .. unit
+ else
+ return "0pt"
end
elseif fmt then
if not unit then