contexttools.get_context_mark_attached_to_component

abjad.tools.contexttools.get_context_mark_attached_to_component.get_context_mark_attached_to_component(component, klasses=(<class 'abjad.tools.contexttools.ContextMark.ContextMark.ContextMark'>, ))[source]

New in version 2.3.

Get context mark attached to component:

abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> contexttools.ClefMark('treble')(staff)
ClefMark('treble')(Staff{4})
abjad> f(staff)
\new Staff {
    \clef "treble"
    c'8
    d'8
    e'8
    f'8
}
abjad> contexttools.get_context_mark_attached_to_component(staff)
ClefMark('treble')(Staff{4})

Return context mark.

Raise missing mark error when no context mark attaches to component.

This Page