lilypond-user
[Top][All Lists]
Advanced

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

Re: \repeat for markups?


From: David Kastrup
Subject: Re: \repeat for markups?
Date: Sun, 09 Dec 2018 11:35:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Aaron Hill <address@hidden> writes:

> On 2018-12-08 7:34 pm, Kieren MacMillan wrote:
>> Hi all,
>>
>> Is there a function to repeat markups? Like
>>
>>     \repeat unfold 10 \markup { "foo" }
>
> Just threw this together, although I admit not looking in the LSR for
> prior work:
>
> %%%%
> \version "2.19.82"
>
> #(define-markup-command
>   (replicate layout props count args) (number? markup?)
>     (interpret-markup layout props
>       #{ \markup { #@(map (lambda (_) args) (iota count)) } #}))
>
> \markup \replicate #4 \box "Hello, World!"
> %%%%

One would likely prefer
#(define-markup-list-command
  (replicate layout props count arg) (number? markup?)
    (interpret-markup-list layout props (make-list count arg)))

since you can then choose how to format the resulting list.

-- 
David Kastrup



reply via email to

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