]> git.donarmstrong.com Git - lilypond.git/commitdiff
Typeset all systems when inlining a score using \markup \score.
authorNeil Puttock <n.puttock@gmail.com>
Sun, 1 Nov 2009 23:22:25 +0000 (23:22 +0000)
committerNeil Puttock <n.puttock@gmail.com>
Sun, 1 Nov 2009 23:22:25 +0000 (23:22 +0000)
Use baseline-skip to set space between systems.

input/regression/markup-score-multi-system.ly [new file with mode: 0644]
scm/define-markup-commands.scm
scm/lily.scm

diff --git a/input/regression/markup-score-multi-system.ly b/input/regression/markup-score-multi-system.ly
new file mode 100644 (file)
index 0000000..068af76
--- /dev/null
@@ -0,0 +1,22 @@
+\version "2.13.7"
+
+\header {
+  texidoc = "\\markup \\score displays all systems.  Spacing between
+  systems is set using @code{baseline-skip}.
+"
+}
+
+
+\markup {
+  \override #'(baseline-skip . 10)
+  \score {
+    \new Staff \relative c' {
+      c4 d e f \break
+      g1
+    }
+    \layout {
+      indent = 0
+      ragged-right = ##t
+    }
+  }
+}
index 1c63498c883e821b724c1b0aca276583a4799bfd..08c24bb577d152e53536c675e31ac6714bf09790 100644 (file)
@@ -531,7 +531,7 @@ grestore
 (define-builtin-markup-command (score layout props score)
   (ly:score?)
   music
-  ()
+  ((baseline-skip))
   "
 @cindex inserting music into text
 
@@ -576,11 +576,13 @@ Inline an image of music.
   }
 }
 @end lilypond"
-  (let* ((output (ly:score-embedded-format score layout)))
+  (let ((output (ly:score-embedded-format score layout)))
 
     (if (ly:music-output? output)
-       (paper-system-stencil
-        (vector-ref (ly:paper-score-paper-systems output) 0))
+       (stack-stencils Y DOWN baseline-skip
+                       (map paper-system-stencil
+                            (vector->list
+                             (ly:paper-score-paper-systems output))))
        (begin
          (ly:warning (_"no systems found in \\score markup, does it have a \\layout block?"))
          empty-stencil))))
index 5fb635b06c21aa4f626e31d54c1c03fdfd285ba9..7ed8fe72d7c3760b786d826baf224c9a686785e0 100644 (file)
@@ -425,6 +425,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
        (,ly:music-output? . "music output")
        (,ly:pitch? . "pitch")
        (,ly:translator? . "translator")
+        (,ly:score? . "score")
        (,ly:simple-closure? . "simple closure")
        (,ly:skyline-pair? . "pair of skylines")
        (,ly:stencil? . "stencil")