Hello Jean and Valentin, Thank you very much for your responses. The \noPageBreak is exactly what I was looking for.
Another solution is to place \pageBreak just before the section title, so a page break never occurs after the section title at the top of a page. The \bookpart solution is very convenient and more idiomatic than manual \pageBreak and \tocSection. I'm building an automated solution to generate books from YAML catalogs of pieces with optional sections (some pieces may be under a section and some pieces may be at the top level). Manual approach to secitioning in my case is simpler with just one if section then \tocSection compared to managing two different templates: with and without a \bookpart. Thank you for helpful and useful advice, Vlad On Tue, Mar 14, 2023 at 8:23 PM Valentin Petzel <valen...@petzel.at> wrote: > Hi Vlad, > > personally I’d do Sections using bookparts like this: > > \paper { > print-all-headers = ##t > bookTitleMarkup = \markup \column { > #bookTitleMarkup > \vspace #1.5 > } > } > > \bookpart { > \header { > title = "Section I" > } > \score { > \header { > title = "Piece I" > } > c > } > \score { > \header { > title = "Piece II" > } > c > } > } > > \bookpart { > \header { > title = "Section II" > } > \score { > \header { > title = "Piece III" > } > c > } > \score { > \header { > title = "Piece IV" > } > c > } > } > > This avoid a break between these titles and will make sure that each > section > starts on a new page. > > Cheers, > Valentin > > Am Dienstag, 14. März 2023, 19:42:19 CET schrieb Volodymyr Prokopyuk: > > Hi, > > > > Is there a way in Lilypond to *insert a non-breakable vertical space* to > > avoid page break between a section title and piece title? > > > > *Code with an undesired page break* > > > > \markup \column { > > \fill-line { \fontsize #5 \bold \caps Section } > > \vspace #1 % <= this vertical space should be non-breakable > > } > > \tocSection tocSec1 \markup { Section } > > \tocItem \markup { Piece } > > > > [image: image.png] > > > > > > Thank you, > > Vlad > >