diff options
Diffstat (limited to 'tex/context/base/mkiv/pack-obj.lua')
-rw-r--r-- | tex/context/base/mkiv/pack-obj.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/pack-obj.lua b/tex/context/base/mkiv/pack-obj.lua index 479c234b4..3d2048218 100644 --- a/tex/context/base/mkiv/pack-obj.lua +++ b/tex/context/base/mkiv/pack-obj.lua @@ -13,9 +13,11 @@ reusable components.</p> local context = context local codeinjections = backends.codeinjections - local ctx_doifelse = commands.doifelse +local report = logs.reporter("objects") +local trace = false trackers.register("objects",function(v) trace = v end) + local nuts = nodes.nuts local setlink = nuts.setlink @@ -125,7 +127,8 @@ objects = { local objects = objects function objects.register(ns,id,b,referenced,offset,mode) - objects.n = objects.n + 1 + local n = objects.n + 1 + objects.n = n nodes.handlers.finalizebox(b) if mode == 0 then -- tex @@ -144,6 +147,9 @@ function objects.register(ns,id,b,referenced,offset,mode) mode, } end + if trace then + report("registering object %a (n=%i)",id,n) + end end function objects.restore(ns,id) -- why not just pass a box number here too (ok, we also set offset) @@ -167,6 +173,9 @@ function objects.restore(ns,id) -- why not just pass a box number here too (ok, setbox("objectbox",nil) settexdimen("objectoff",0) -- for good old times end + if trace then + report("restoring object %a",id) + end end function objects.dimensions(index) |