Is there a way to find out, whether the currently typeset material will go to top of a page?
I am trying to write a macro which, when invoked, typesets a horizontal divider to separate the subsequent content from the preceding one. However, if the subsequent content goes to top of the next page, the horizontal divider should be suppressed. How could I do that?
I am aware
\thepage are not the way to go (the page-breaking algorithm often decides where to put the break when the material is already typeset and my macro has been invoked).