Menu Jacques <[email protected]> writes:
> Hello folks,
>
> I’d like to use the instrument name specified in the header as the actual
> instrument name:
>
> %%%%%%%%%%
> \version "2.19.39"
>
> \header {
> instrument = "Premier"
> }
>
> % The score definition
> \score {
> {
> \new Staff <<
> \set Staff.instrumentName = \markup{\fill-line{\fromproperty
> #'header:instrument}}
>
> \context Staff <<
> \context Voice = "PremierVoiceOne"
> {
> a b c d
> }
> >>
> >>
> }
>
> \layout {}
> }
> %%%%%%%%%%
>
>
> But I get an error message on the next syntactical element, here \context
> Staff, see below.
Well, your problem is that header:instrument}} is a valid Scheme
identifier, and \fromproperty apparently just ignores identifiers it
finds undefined. So your \context appears right after
\markup{\fill-line{ where LilyPond has no idea what to do with it.
If you insert spaces a bit more liberally, you will be less likely to
forget them where they are absolutely essential, like after symbols
parsed by the Scheme interpreter.
--
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user