> Nice work! Here's one way to simplify it. > - Mark > > (define super-ref > (list > (cons #\A "Ø") > )) > > (define (char->special x) > (assoc-ref super-ref x)) > > (define (super-string str) > (let ((new "")) > (string-for-each > (lambda (x) (set! new (string-append new (char->special x)))) > str) > new))
Thanks. It's always good to learn new commands and I usually don't by just looking at the explanation in the Guile manual. > Have you tried using ly:wide-char->utf-8 to deal with this? > > tf = > #(define-music-function (parser location music) (ly:music?) > (let ((es (ly:music-property music 'elements))) > (ly:music-set-property! (cadr es) 'text > (ly:wide-char->utf-8 #x00a9))) music) > > It's used internally for the markup command \char. Thanks for the hint. The problem I encountered is that this function returns a string and not a char, so it doesn't solve what I had in mind, it just provides a different approach to what I already did. Thanks anyway. It's always good to get a broader overwiev of available functions. Regards, Tao -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 _______________________________________________ lilypond-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-user
