On Mon, Feb 23, 2015 at 10:28:37AM +0100, Thomas Morley wrote:
> 
> Try the following, comments inline:
> 
> \score {
>   <<
>     \new XChords \chordmode { c1 }
>     \new Staff   \chordmode { c1 }
>   >>
>   \layout {
>     \context {
>       %% copies settings from ChordNames
>       %% No need to create a new context from scratch
>       \ChordNames
>       \name XChords
>       \alias ChordNames
>       \override ChordName.font-size = #12
>     }
>     %% let Score accept XChords, likely need to let it be accepted by other
>     %% context as well. I.e. do the same for Pianostaff, GrandStaff, 
> ChoirStaff,
>     %% maybe more, have a look in engraver-init.ly to see which contexts
>     %% accept the default ChordNames
>     \context {
>             \Score
>             \accepts XChords
>     }
>   } % layout
> }
> 
> HTH,
>   Harm

Thank you.  But if I have to do all the \Score \accepts stuff,
then I guess I don't understand what '\alias ChordNames' does in
your example.  I'd like to find a simple way of declaring that
"my custom context X is just like built-in context Y, except that
it modifies these settings."  The appeal of that goes downhill
quickly if there are loose ends that have to be tied back into
Lilypond internals.

Is there a way I can define a context based on ChordNames and
have it automatically inherit all of the properties of a
ChordNames context, except the ones that I specifically change in
my custom definition?  In other words, a way to eliminate the
need for the second \context {} block in your example?

Jim

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

Reply via email to