label

topleveltools.label(client=None)

Makes label agent or label expression.

>>> import abjad

Labels logical ties with start offsets:

>>> staff = abjad.Staff(r"\times 2/3 { c'4 d'4 e'4 ~ } e'4 ef'4")
>>> abjad.label(staff).with_start_offsets(direction=Up)
>>> abjad.override(staff).text_script.staff_padding = 4
>>> abjad.override(staff).tuplet_bracket.staff_padding = 0
>>> show(staff) 

See the LabelAgent API entry for many more examples.

Initializes positionally:

>>> expression = abjad.label()
>>> expression(staff)
LabelAgent(client=<Staff{3}>)

Initializes from keyword:

>>> expression = abjad.label()
>>> expression(client=staff)
LabelAgent(client=<Staff{3}>)

Makes label expression:

>>> expression = abjad.label()
>>> expression = expression.with_start_offsets()
>>> staff = abjad.Staff(r"\times 2/3 { c'4 d'4 e'4 ~ } e'4 ef'4")
>>> expression(staff)
>>> abjad.override(staff).text_script.staff_padding = 4
>>> abjad.override(staff).tuplet_bracket.staff_padding = 0
>>> show(staff) 

See the LabelAgent API entry for many more examples.

Returns label agent when client is not none.

Returns label expression when client is none.