+(defvar *done-one-off-output* nil
+ "A list of tokens for things which should appear at most once in output.")
+
+(export 'one-off-output)
+(defun one-off-output (token sequencer item-name function)
+ "Arrange to output a thing at most once.
+
+ If there has been no previous call to `one-off-output' with the given
+ TOKEN during this output run, then arrange to call FUNCTION when the item
+ called ITEM-NAME is traversed. Otherwise do nothing."
+ (unless (member token *done-one-off-output*)
+ (push token *done-one-off-output*)
+ (add-sequencer-item-function sequencer item-name function)))
+