summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-lua.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-25 15:40:51 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-25 15:40:51 +0200
commitb2a2304cbb0c65040d7b118ac9b857d304e333e6 (patch)
treeed5212e37a91ec78c12d9f72ca1186a59c139b40 /tex/context/base/mkiv/mlib-lua.lua
parentb2276ae7a04a9f9c35403e508670049d8c3e4b3e (diff)
downloadcontext-b2a2304cbb0c65040d7b118ac9b857d304e333e6.tar.gz
2016-06-25 14:42:00
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)