Relating to a recent thread, I've long searched for a way to reformat the same material three times, on each pass using information gleaned from earlier passes. Only the final pass would produce output. Examples of this could be balancing multi-column output, or avoiding ragged bottoms.
Diverting will not do as some undoable formatting is performed on them, for example vertical spacing is set in concrete. A further idea was to write the material to a termporary file, but I could not see a way to do this. Any tried this or have ideas? Denis