Kieren MacMillan <kieren_macmil...@sympatico.ca> writes: > Hi Jim, > >> A technique like this might also be workable, but IMO a little >> less elegant syntactically: >> >> \set unbreakableMusic = ##t >> \repeat unfold 6 c1 >> \break >> \repeat unfold 6 c1 >> \revert unbreakableMusic >> >> This is not a huge priority, just a curiousity. > > I use these macros: > > pageBreaksForbid = { \override Score.NonMusicalPaperColumn > #'page-break-permission = ##f } > pageBreaksAllow = { \revert Score.NonMusicalPaperColumn > #'page-break-permission } > lineBreaksForbid = { \override Score.NonMusicalPaperColumn > #'line-break-permission = ##f } > lineBreaksAllow = { \revert Score.NonMusicalPaperColumn > #'line-break-permission }
The proposed interface \noBreakMusic { c1 | c1 | c1 | c1 | c1 | c1 | } could be implemented (with some 2.17) using noBreakMusic = #(define-music-function (parser location music) (ly:music?) #{ \temporary\override Score.NonMusicalPaperColumn.line-break-permission = ##f #music \revert Score.NonMusicalPaperColumn.line-break-permission #}) The use of \temporary makes sure that the value afterwards is the same as before (rather than the default, though that would be fine for most use cases). -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user