StartTextSpan

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.indicators" { graph [label="abjad.indicators"]; node [color=1]; "abjad.indicators.StartTextSpan.StartTextSpan" [URL="../api/abjad/indicators/StartTextSpan.html#abjad.indicators.StartTextSpan.StartTextSpan", color=black, fontcolor=white, label="Start\nText\nSpan", target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/indicators/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjad/indicators/../system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadValueObject.AbjadValueObject" -> "abjad.indicators.StartTextSpan.StartTextSpan"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.indicators.StartTextSpan.StartTextSpan(*, command='\startTextSpan', concat_hspace_left=0.5, concat_hspace_right=None, direction=None, left_broken_text=None, left_text=None, right_padding=None, right_text=None, style=None, tweaks=None)

LilyPond \startTextSpan command.

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     right_text=abjad.Markup('tasto').upright(),
...     style='solid_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 
>>> abjad.StartTextSpan()
StartTextSpan(command='\\startTextSpan', concat_hspace_left=0.5)

Attributes Summary

command Gets comand.
concat_hspace_left Gets left hspace.
concat_hspace_right Gets right hspace.
direction Gets direction.
enchained Is true.
left_broken_text Gets left broken text.
left_text Gets left text.
right_padding Gets right padding.
right_text Gets right text.
spanner_start Is true.
style Gets style.
tweaks Gets tweaks

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(argument)

Is true when all initialization values of Abjad value object equal the initialization values of argument.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

command

Gets comand.

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     right_text=abjad.Markup('tasto').upright(),
...     style='dashed_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).color = 'blue'
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> start_text_span = abjad.StartTextSpan(
...     command=r'\startTextSpanOne',
...     left_text=abjad.Markup('A').upright(),
...     right_text=abjad.Markup('B').upright(),
...     style='dashed_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).color = 'red'
>>> abjad.tweak(start_text_span).staff_padding = 6
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan(command=r'\stopTextSpanOne')
>>> abjad.attach(stop_text_span, staff[-1])
>>> markup = abjad.Markup('SPACER', direction=abjad.Up)
>>> abjad.tweak(markup).transparent = True
>>> abjad.attach(markup, staff[0])
>>> abjad.show(staff) 

(Spacer text included to prevent docs from clipping output.)

Return type:str
concat_hspace_left

Gets left hspace.

Only included in LilyPond output when left text is set.

Return type:Union[int, float]
concat_hspace_right

Gets right hspace.

Only included in LilyPond output when right text is set.

Return type:Union[int, float, None]
direction

Gets direction.

Return type:Optional[String]
enchained

Is true.

Return type:bool
left_broken_text

Gets left broken text.

Return type:Union[bool, Markup, None]
left_text

Gets left text.

LilyPond literals are allowed in place of markup:

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> left_string = r'\markup \concat { \upright pont. \hspace #0.5 }'
>>> right_string = r'\markup \upright tasto'
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.LilyPondLiteral(left_string),
...     right_text=abjad.LilyPondLiteral(right_string),
...     style='solid_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 

Use with custom markup functions.

Return type:Union[LilyPondLiteral, Markup, None]
right_padding

Gets right padding.

Return type:Union[int, float, None]
right_text

Gets right text.

Return type:Union[LilyPondLiteral, Markup, None]
spanner_start

Is true.

>>> abjad.StartTextSpan().spanner_start
True
Return type:bool
style

Gets style.

>>> staff = abjad.Staff("c'4 d' e' fs'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     right_text=abjad.Markup('tasto').upright(),
...     style='dashed_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     style='dashed_line_with_hook',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     right_text=abjad.Markup('tasto').upright(),
...     style='invisible_line',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     right_text=abjad.Markup('tasto').upright(),
...     style='solid_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 
>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     style='solid_line_with_hook',
...     )
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 

Constrained to 'dashed_line_with_arrow', 'dashed_line_with_hook', 'invisible_line', 'solid_line_with_arrow', 'solid_line_with_hook', none.

Return type:Optional[str]
tweaks

Gets tweaks

>>> staff = abjad.Staff("c'4 d' e' f'")
>>> start_text_span = abjad.StartTextSpan(
...     left_text=abjad.Markup('pont.').upright(),
...     right_text=abjad.Markup('tasto').upright(),
...     style='dashed_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).color = 'blue'
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.attach(start_text_span, staff[0])
>>> stop_text_span = abjad.StopTextSpan()
>>> abjad.attach(stop_text_span, staff[-1])
>>> abjad.show(staff) 

REGRESSION. Tweaks survive copy:

>>> import copy
>>> start_text_span = abjad.StartTextSpan(
...     style='dashed_line_with_arrow',
...     )
>>> abjad.tweak(start_text_span).color = 'blue'
>>> abjad.tweak(start_text_span).staff_padding = 2.5
>>> abjad.f(start_text_span)
abjad.StartTextSpan(
    command='\\startTextSpan',
    concat_hspace_left=0.5,
    style='dashed_line_with_arrow',
    tweaks=LilyPondTweakManager(('color', 'blue'), ('staff_padding', 2.5)),
    )
>>> start_text_span_2 = copy.copy(start_text_span)
>>> abjad.f(start_text_span_2)
abjad.StartTextSpan(
    command='\\startTextSpan',
    concat_hspace_left=0.5,
    style='dashed_line_with_arrow',
    tweaks=LilyPondTweakManager(('color', 'blue'), ('staff_padding', 2.5)),
    )
Return type:Optional[LilyPondTweakManager]