Hello again,

maybe my answer is a bit off your topic, because I think you are looking for a C function. But still, markups are lists in scheme, so you might use libguile to access this function in C:

--snip--
#(define (markup->string mup conc)
        (let ((result ""))
             ;;(display "(")
             (map (lambda (x)
                          (begin
                            ;;(display "> ")(display conc)(display "\n")
                            (if (eq? x concat-markup)(set! conc #t))
                            (if (list? x)
                                (set! result
                                  (if (or conc (string=? result ""))
(string-append result (markup->string x conc)) (string-append result " " (markup->string x conc)))))
                            (if (string? x)
                                (set! result
                                  (if (or conc (string=? result ""))
                                      (string-append result x)
                                      (string-append result " " x))))
                            result))
                  mup)
             ;;(display ")")
             result)
)
#(define-markup-command (plain-text layout props arg)(markup?)
(interpret-markup layout props (markup (markup->string arg #f))))

ttt = \markup { \italic "Title of " \bold \concat {"the" " " "piece"} }

\header {
  title = \ttt
  subtitle = \markup { \normal-text { \italic { \plain-text \ttt } } }
}
\relative c' {
  c
}
--snip--

Regards,
Jan-Peter


_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to