Jacques, On Tue, Nov 17, 2015 at 6:32 AM, Jacques Menu <[email protected]> wrote:
> Message says that #(string-append… is not a markup. > > > Le 17 nov. 2015 à 13:31, Jacques Menu <[email protected]> a écrit : > > > > Hello folks, > > > > I’ve tried to integrate such a pure Scheme function: > > > > > > guile> (define (function arg) > > (if (and (integer? (car arg)) (integer? (cdr arg))) > > (iota (1+ (interval-length arg)) (car arg) 1) > > ) > > ) > > guile> (function '(3 . 7)) > > (3 4 5 6 7) > > > > > > as part of a markup, but to no avail. Here is one of my attempts: > > > > > > \version "2.19.30" > > > > #(define (function arg) > > (if (and (integer? (car arg)) (integer? (cdr arg))) > > (iota (1+ (interval-length arg)) (car arg) 1) > > ) > > ) > > > > { > > c'1 -\markup { > > \column { > > \column { > > #(string-append > > "commllen = " (list->sting (map #'number->string (function '(3 > . 7)))) > > ) > > } > > } > > } > > } > > > > > > Thanks for your help! > > > > JM > Why not: { c'1 -\markup { \column { \column { #(string-append "commllen = " (format #f "~a" (function '(3 . 7))) ) } } } } Regarding your approach: First, it's "list->string" and that deals with a list of character data, not strings. You could do something like: { c'1 -\markup { \column { \column { #(string-append "commllen = " (apply string-append (map number->string (function '(3 . 7)))) ) } } } } But I'm guessing that's not the output format you want. Hope this helps, DN
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
