lilypond-user
[Top][All Lists]
Advanced

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

Re: Concatenating markup fragments in a function


From: Aaron Hill
Subject: Re: Concatenating markup fragments in a function
Date: Tue, 17 Sep 2019 06:31:47 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-09-17 6:24 am, Andrew Bernard wrote:
What would be the most elegant way to add a space between the
elements, and enclose the lot in '[' and ']'?

Would this work for you?

%%%%
#(define-markup-command (note-names-multiple layout props args)
  (markup-list?)
  "Provide multiple note names for clarity."
  (define (paired lst) (if (null? lst) '()
      (cons (cons (first lst) (second lst))
            (paired (cddr lst)))))
  (interpret-markup layout props
    #{ \markup \concat { \vcenter [
          \override #'(word-space . 1)
          \line { $@(map (lambda (x) #{
          \markup \note-names $(car x) $(cdr x)
        #}) (paired args)) } \vcenter ] } #} ))
%%%%


-- Aaron Hill



reply via email to

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