Finally, I found that the given answers satisfy all my needs as of now. Thank you very much!
Sebastian Käppler <
address@hidden> schrieb am Sa., 13. Okt. 2018, 09:26:
Add-text is even better. Still curious if it's possible to get the "context" inside the function. Isn't that what the location parameter is for?
Am Fr., 12. Okt. 2018 um 08:10 Uhr schrieb Jan-Peter Voigt <address@hidden>:
>
> Hello Sebastian,
>
> what do you mean with "return"? Do want to add the score immediatly or
> do you want to return an object containing both?
> You used the parser-location arguments in your scheme-function, so I
> guess you are using stable (2.18). I created an example for 2.18
> (incomplete) and one for 2.19.82. For three possible functions.
>
> HTH
> Jan-Peter
Hi,
for immediate addings, why not the simpler:
example =
#(define-void-function (mrkp scr) (markup? ly:score?)
(add-text mrkp)
(add-score scr))
\example
\markup \bold "Test"
\score { c'4 }
\example
\markup \italic "Test"
\score { cis'4 }
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user