lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Implement new markup-command combine-list (issue 264960043 by address@hi


From: thomasmorley65
Subject: Implement new markup-command combine-list (issue 264960043 by address@hidden)
Date: Sun, 30 Aug 2015 11:25:01 +0000

Reviewers: ,

Message:
Please review

PATCH_NEW

Description:
Implement new markup-command combine-list

Allows for \markup \combine-list { a list }

Please review this at https://codereview.appspot.com/264960043/

Affected files (+23, -5 lines):
  M scm/define-markup-commands.scm


Index: scm/define-markup-commands.scm
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index 505ca246c7bf6e6489f47b9f4351e6ce9c2f58e3..1206ee3ace8a1029c387f187c154d91d8df5d068 100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -1740,11 +1740,7 @@ the line width, where @var{X} is the number of staff spaces.
 Print two markups on top of each other.

 Note: @code{\\combine} cannot take a list of markups enclosed in
-curly braces as an argument; the follow example will not compile:
-
address@hidden
-\\combine @{ a list @}
address@hidden example
+curly braces as an argument; for this purpose use @code{\\combine-list} instead.

 @lilypond[verbatim,quote]
 \\markup {
@@ -1759,6 +1755,28 @@ curly braces as an argument; the follow example will not compile:
          (s2 (interpret-markup layout props arg2)))
     (ly:stencil-add s1 s2)))

+(define-markup-command (combine-list layout props args)
+  (markup-list?)
+  #:category align
+  "
address@hidden merging text
+
+Takes a list of markups combining them.
+
address@hidden,quote]
+\\markup {
+  \\fontsize #5
+  \\override #'(thickness . 2)
+  \\combine-list {
+    \\draw-line #'(0 . 4)
+    \\arrow-head #Y #DOWN ##f
+    \\translate #'(0 . 4)\\arrow-head #Y #UP ##f
+  }
+}
address@hidden lilypond"
+  (apply ly:stencil-add
+    (map (lambda (e) (interpret-markup layout props e)) args)))
+
 ;;
 ;; TODO: should extract baseline-skip from each argument somehow..
 ;;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]