5 texidoc="@cindex Count Systems
6 After a line break, some function may called by overriding
7 @code{after-line-breaking-callback}. This can be most useful to assertain
8 that a piece uses a specified number of lines; typically the number of
9 lines (or systems) is not engraved, but it can be printed to console when
10 generating the output. The number of lines may be associated either
11 to the number of systems or the system number of a grob.
15 %% See, e.g., input/mutopia/J.S.Bach/baerenreiter-sarabande.ly for
18 %% We want this to perfectly match the Baerenreiter spacing.
19 %% If we're not using 6 systems, there's definately a problem.
20 %% #(define (assert-system-count smob n) ...
23 #(define (display-systemno smob)
24 (let* ((this-system (ly:grob-system smob))
25 (systems (ly:spanner-broken-into
26 (ly:grob-original this-system))))
28 (display (list-index systems this-system))
32 #(define (display-system-count smob)
34 (ly:spanner-broken-into
36 (ly:grob-system smob))))))
42 \override NoteHead #'after-line-breaking-callback
43 % = #display-system-count
48 \paper{ indent = 0.0\mm