summaryrefslogtreecommitdiff
path: root/tex/context/base/node-ref.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/node-ref.lua')
-rw-r--r--tex/context/base/node-ref.lua24
1 files changed, 13 insertions, 11 deletions
diff --git a/tex/context/base/node-ref.lua b/tex/context/base/node-ref.lua
index e82065ee7..e0aa65c6c 100644
--- a/tex/context/base/node-ref.lua
+++ b/tex/context/base/node-ref.lua
@@ -39,7 +39,9 @@ local trace_backend = false trackers.register("nodes.backend", functi
local trace_references = false trackers.register("nodes.references", function(v) trace_references = v end)
local trace_destinations = false trackers.register("nodes.destinations", function(v) trace_destinations = v end)
-local report_backends = logs.new("backends")
+local report_reference = logs.new("backend","references")
+local report_destination = logs.new("backend","destinations")
+local report_area = logs.new("backend","areas")
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
@@ -107,14 +109,14 @@ local function inject_range(head,first,last,reference,make,stack,parent,pardir,t
if result and resolved then
if head == first then
if trace_backend then
- report_backends("head: %04i %s %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
+ report_area("head: %04i %s %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
end
result.next = first
first.prev = result
return result, last
else
if trace_backend then
- report_backends("middle: %04i %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
+ report_area("middle: %04i %s %s => w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",tosequence(first,last,true),width,height,depth,resolved)
end
local prev = first.prev
if prev then
@@ -178,7 +180,7 @@ local function inject_list(id,current,reference,make,stack,pardir,txtdir)
local result, resolved = make(width,height,depth,reference)
if result and resolved then
if trace_backend then
- report_backends("box: %04i %s %s: w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",width,height,depth,resolved)
+ report_area("box: %04i %s %s: w=%s, h=%s, d=%s, c=%s",reference,pardir or "---",txtdir or "----",width,height,depth,resolved)
end
if not first then
current.list = result
@@ -322,11 +324,11 @@ local function colorize(width,height,depth,n)
u_colors[n] = u_color
end
if width == 0 then
- report_backends("reference %s has no horizontal dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
+ report_area("reference %s has no horizontal dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
width = 65536
end
if height + depth <= 0 then
- report_backends("reference %s has no vertical dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
+ report_area("reference %s has no vertical dimensions: width=%s, height=%s, depth=%s",reference,width,height,depth)
height = 65536/2
depth = height
end
@@ -387,7 +389,7 @@ local function makereference(width,height,depth,reference)
local sr = stack[reference]
if sr then
if trace_references then
- report_backends("resolving reference attribute %s",reference)
+ report_reference("resolving attribute %s",reference)
end
local resolved, ht, dp, set, n = sr[1], sr[2], sr[3], sr[4], sr[5]
if ht then
@@ -415,10 +417,10 @@ local function makereference(width,height,depth,reference)
if cleanupreferences then stack[reference] = nil end
return result, resolved
elseif trace_references then
- report_backends("unable to resolve reference annotation %s",reference)
+ report_reference("unable to resolve annotation %s",reference)
end
elseif trace_references then
- report_backends("unable to resolve reference attribute %s",reference)
+ report_reference("unable to resolve attribute %s",reference)
end
end
@@ -454,7 +456,7 @@ local function makedestination(width,height,depth,reference)
local sr = stack[reference]
if sr then
if trace_destinations then
- report_backends("resolving destination attribute %s",reference)
+ report_destination("resolving attribute %s",reference)
end
local resolved, ht, dp, name, view = sr[1], sr[2], sr[3], sr[4], sr[5]
if ht then
@@ -500,7 +502,7 @@ local function makedestination(width,height,depth,reference)
if cleanupdestinations then stack[reference] = nil end
return result, resolved
elseif trace_destinations then
- report_backends("unable to resolve destination attribute %s",reference)
+ report_destination("unable to resolve attribute %s",reference)
end
end