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:
-
-@example
-\\combine @{ a list @}
-@end 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
+ "
+@cindex merging text
+
+Takes a list of markups combining them.
+
+@lilypond[verbatim,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
+ }
+}
+@end lilypond"
+ (apply ly:stencil-add
+ (map (lambda (e) (interpret-markup layout props e)) args)))
+
;;
;; TODO: should extract baseline-skip from each argument somehow..
;;
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel