Edit:Edit. Added a MWE for the pre_output_filter attempt I described
-- helper.lua function create_node_reference(name) whatsit_id = node.id("whatsit") user_define_id = node.subtype("user_defined") local new_node = node.new(whatsit_id, user_define_id) new_node.type = 115 -- internal code for a string value new_node.value = name node.write(new_node) end function print_whatsit_nodes_page(head, groupcode, size, packtype, maxdepth) -- traverse_id will only iterate over nodes with the specified id, in this case "whatsit" -- There seems to be no whatsit nodes though in this list for n in node.traverse_id(node.id("whatsit"), head) do print(n) end end callback.register("pre_output_filter", print_whatsit_nodes_page)
-- helper.lua function create_node_reference(name) whatsit_id = node.id("whatsit") user_define_id = node.subtype("user_defined") local new_node = node.new(whatsit_id, user_define_id) new_node.type = 115 -- internal code for a string value new_node.value = name node.write(new_node) end function print_whatsit_nodes_page(head, groupcode, size, packtype, maxdepth) -- traverse_id will only iterate over nodes with the specified id, in this case "whatsit" -- There seems to be no whatsit nodes though in this list for n in node.traverse_id(node.id("whatsit"), head) do print(n) end end callback.register("pre_output_filter", print_whatsit_nodes_page)