]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/count-systems.ly
* scripts/lilypond-book.py (do_file): do not overwrite input file.
[lilypond.git] / input / test / count-systems.ly
index 1717ee753eb1f07a17bd8c4dd2f2855be41ca455..1d9e8c05931dee938616288ef5927bb7b18fd8d7 100644 (file)
@@ -1,15 +1,17 @@
+
+\version "2.1.26"
 \header{
     
-    texidoc="Display the number of systems, or the system number of a
-    Grob.  This can be most useful to assertain that a piece uses a
-    specified number of lines."
-    
-}
+    texidoc="@cindex Count Systems
+Display the number of systems, or the system number of a
+Grob.  This can be most useful to assertain that a piece uses a
+specified number of lines.
+}
 
 #(define (display-systemno smob)
-  (let* ((this-system (get-system smob))
-        (systems (get-broken-into
-                  (get-original this-system))))
+  (let* ((this-system (ly:grob-system smob))
+        (systems (ly:spanner-broken-into
+                  (ly:grob-original this-system))))
     (display smob)
     (display (list-index systems this-system))
     (newline)))
 
 #(define (display-system-count smob)
   (display (length
-           (get-broken-into
-            (get-original
-             (get-system smob))))))
+           (ly:spanner-broken-into
+            (ly:grob-original
+             (ly:grob-system smob))))))
 
   
   
 \score{
     \notes\relative c''{
-       \property Thread.NoteHead \override #'after-line-breaking-callback
+       \override NoteHead  #'after-line-breaking-callback
        % = #display-system-count
        = #display-systemno
        c1
@@ -33,5 +35,7 @@
     }
     \paper{ indent = 0.0\mm
            linewidth = 10.0\mm
+               raggedright = ##t
        }
 }
+