Insert pagebreak if not enough space
$ luarocks install --server=https://luarocks.org/dev needspace
Provides commands to disable pagebreaking within a given vertical space. If there is not enough space between the command and the bottom of the page, a new page will be started.
root
texmf