On 14 March 2011 19:11, Xavier Scheuer <x.sche...@gmail.com> wrote:

> I would like to define the  \score  blocks as variables or as music
> functions.  Unfortunately it seems impossible.
>
> I tried
>
>  scoreOne = \score {
>    c'1
>    \layout {}  % required!
>  }
>
>  \markup {
>    \column {
>      \scoreOne
>    }
>  }
>
> which gives "Error : syntax error, unexpected SCORE_IDENTIFIER".
>
> I tried also
>
>  scoreTwo = #(define-music-function (parser location foo)
>                                     (ly:music?)
>    #{
>      \score {
>        $foo
>        \layout {}
>      }
>    #}
>  )
>
>  \markup {
>    \column {
>      \scoreTwo d'1
>    }
>  }
>
> but it fails also : "Error : syntax error, unexpected MUSIC_FUNCTION".
>
> Any idea would be welcome!

You want a markup identifier, so all you need to do is put \markup
before \score:

 scoreOne = \markup \score {
   c'1
   \layout {}  % required!
 }

 \markup {
   \column {
     \scoreOne
   }
 }

Cheers,
Neil

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to