summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-lua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/mlib-lua.lua')
-rw-r--r--tex/context/base/mkiv/mlib-lua.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua
index 5d30d38eb..d348981e7 100644
--- a/tex/context/base/mkiv/mlib-lua.lua
+++ b/tex/context/base/mkiv/mlib-lua.lua
@@ -356,9 +356,10 @@ end
-- texts:
-local factor = 65536*(7227/7200)
-local textexts = nil
-local mptriplet = mp.triplet
+local factor = 65536*(7227/7200)
+local textexts = nil
+local mptriplet = mp.triplet
+local nbdimensions = nodes.boxes.dimensions
function mp.tt_initialize(tt)
textexts = tt
@@ -387,6 +388,12 @@ function mp.tt_dimensions(n)
end
end
+function mp.tb_dimensions(category,name)
+ local w, h, d = nbdimensions(category,name)
+ mptriplet(w/factor,h/factor,d/factor)
+end
+
+
function mp.report(a,b)
if b then
report_message("%s : %s",a,b)