I've tried to find a solution but obviously the right search phrases escape me ...
I need to insert something into the document which will be suppressed if it would be followed by a page break.
For some context: I'm inserting a list of images and need a graphical separator. But that separator should not be printed at page breaks. The result should be something like:
-----------
| Image 1 |
-----------
=
-----------
| Image 2 |
-----------
---pagebreak---
-----------
| Image 3 |
-----------
=
-----------
| Image 4 |
-----------
(with = being the visual separator, could be a \hrule for example).
If it makes a difference: This is done using Lua, so I can write something with tex.print() that will be suppressed by TeX, or if I can detect that state while in Lua (well, AFAICS this is less likely) I could decide what to "print" into the document.
