Context.context_commands

property Context.context_commands

Unordered set of LilyPond settings to be included in the context.

Usage:

Manage with add, update, other standard set commands:

>>> staff = abjad.Staff([])
>>> staff.context_commands.append(r"\RemoveEmptyStaves")
>>> string = abjad.lilypond(staff)
>>> print(string)
\new Staff
\with
{
    \RemoveEmptyStaves"
}
{
}
>>> voice = abjad.Voice([])
>>> voice.context_commands.append(r"\voiceOne")
>>> string = abjad.lilypond(voice)
>>> print(string)
\new Voice
\with
{
    \voiceOne
}
{
}
>>> staff_group = abjad.StaffGroup([])
>>> staff_group.context_commands.append(r"\RemoveEmptyStaves")
>>> string = abjad.lilypond(staff_group)
>>> print(string)
\new StaffGroup
\with
{
    \RemoveEmptyStaves
}
<<
>>
>>> score = abjad.Score([])
>>> score.context_commands.append(r"\RemoveEmptyStaves")
>>> string = abjad.lilypond(score)
>>> print(string)
\new Score
\with
{
    \RemoveEmptyStaves
}
<<
>>