% songfilename auch im Markup verfügbar machen #(define-markup-list-command (setsongfilename layout props songfilename markuplist) (string? markup-list?) (interpret-markup-list layout (prepend-alist-chain 'songfilename songfilename props) markuplist)) #(define-markup-command (customEps layout props ysize filename)(number? string?) #:properties ((songfilename "")) (interpret-markup layout props (let* ((defaulttitlemarkup (ly:output-def-lookup layout 'defaultTitleMarkup)) ;; Determine the song directory to resolve the EPS relative to. ;; In TEXT the name arrives via the markup props (\setsongfilename), ;; but inside MUSIC (e.g. \mark) the props do not carry it, so we ;; fall back to the value stored in the score's \layout block. (layout-songfilename (ly:output-def-lookup layout 'songfilename #f)) (songdir (cond ((not (string-null? songfilename)) songfilename) ((and (string? layout-songfilename) (not (string-null? layout-songfilename))) layout-songfilename) (else #f))) (filepath (if songdir (ly:format "~a/~a/~a" songPath songdir filename) filename))) (if (file-exists? filepath) (make-epsfile-markup Y ysize filepath) (if defaulttitlemarkup defaulttitlemarkup (ly:format "file does not exist ~a" filepath)) ))))