From: Thomas Morley Date: Sun, 30 Aug 2015 11:10:52 +0000 (+0200) Subject: Implement new markup-command overlay X-Git-Tag: release/2.19.28-1~9^2~2 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=bd6ccd111fae54fb943d457b39485e0a588cb5af;p=lilypond.git Implement new markup-command overlay issue 4580 Allows for \markup \overlay { a list } --- diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 505ca246c7..8d15ac9e29 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{\\overlay} instead. @lilypond[verbatim,quote] \\markup { @@ -1759,6 +1755,27 @@ 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 (overlay 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) + \\overlay { + \\draw-line #'(0 . 4) + \\arrow-head #Y #DOWN ##f + \\translate #'(0 . 4)\\arrow-head #Y #UP ##f + } +} +@end lilypond" + (apply ly:stencil-add (interpret-markup-list layout props args))) + ;; ;; TODO: should extract baseline-skip from each argument somehow.. ;;