diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-11-18 16:12:36 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-11-18 16:12:36 +0100 |
commit | 744095aa4676553437db0d71c281a74557a3222f (patch) | |
tree | bfdf5d203b5fbfa44ee7db705d3b3475361ad28f /tex/context/base/mkiv/pack-obj.lua | |
parent | e2ee706a3114129601a30908d6b8cbb57068d32c (diff) | |
download | context-744095aa4676553437db0d71c281a74557a3222f.tar.gz |
2018-11-18 14:16:00
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) |