Slightly better would be to get rid of the bars-per-line define so
it's self-contained:
#(define (line-break-every-nth-engraver bars-per-line)
(lambda (context)
(make-engraver
(acknowledgers ((paper-column-interface engraver grob source-engraver)
(let ((current-bar (ly:context-property context 'currentBarNumber)))
(if (= (remainder current-bar bars-per-line) 1)
(if (eq? #t (ly:grob-property grob 'non-musical))
(set! (ly:grob-property grob 'line-break-permission) 'force)
(set! (ly:grob-property grob 'line-break-permission)
'())))))))))
...
\layout {
\context {
\Score
%% the following line necessary if you want to put more
%% measures to a line than Lily wants to allow
\override NonMusicalPaperColumn #'line-break-permission = ##f
\consists #(line-break-every-nth-engraver 4)
}
}
-----Jay
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user