Aaron Hill <[email protected]> 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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user