LilyPondFormatManager

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.system" { graph [label="abjad.system"]; node [color=1]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.LilyPondFormatManager.LilyPondFormatManager" [URL="../api/abjad/system/LilyPondFormatManager.html#abjad.system.LilyPondFormatManager.LilyPondFormatManager", color=black, fontcolor=white, label="Lily\nPond\nFormat\nManager", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.LilyPondFormatManager.LilyPondFormatManager"; } subgraph cluster_builtins { graph [label=builtins]; node [color=2]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.system.LilyPondFormatManager.LilyPondFormatManager

Manages LilyPond formatting logic.


Attributes Summary

align_tags Line-breaks string and aligns tags starting a column n.
bundle_format_contributions Gets all format contributions for component.
format_lilypond_attribute Formats LilyPond attribute according to Scheme formatting conventions.
format_lilypond_context_setting_in_with_block Formats LilyPond context setting name with value in LilyPond with-block.
format_lilypond_context_setting_inline Formats LilyPond context setting name with value in context.
format_lilypond_value Formats LilyPond argument according to Scheme formatting conventions.
indent
left_shift_tags Left shifts tags in strings and realigns to column realign.
make_lilypond_override_string Makes Lilypond override string.
make_lilypond_revert_string Makes LilyPond revert string.
make_lilypond_tweak_string Makes Lilypond tweak string.
report_spanner_format_contributions Reports spanner format contributions for every leaf in spanner.
tag Tags strings with tag.

Special methods

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Class & static methods

static align_tags(string, n)

Line-breaks string and aligns tags starting a column n.

Return type:str
static bundle_format_contributions(component)

Gets all format contributions for component.

Return type:LilyPondFormatBundle
static format_lilypond_attribute(attribute)

Formats LilyPond attribute according to Scheme formatting conventions.

Return type:str
static format_lilypond_context_setting_in_with_block(name, value)

Formats LilyPond context setting name with value in LilyPond with-block.

Return type:str
static format_lilypond_context_setting_inline(name, value, context=None)

Formats LilyPond context setting name with value in context.

Return type:str
static format_lilypond_value(argument)

Formats LilyPond argument according to Scheme formatting conventions.

Return type:str
static left_shift_tags(text, realign=None)

Left shifts tags in strings and realigns to column realign.

Return type:str
static make_lilypond_override_string(grob, attribute, value, context=None, once=False)

Makes Lilypond override string.

Return type:str
static make_lilypond_revert_string(grob, attribute, context=None)

Makes LilyPond revert string.

>>> abjad.LilyPondFormatManager.make_lilypond_revert_string(
...     'glissando',
...     'bound_details__right__arrow',
...     )
'\\revert Glissando.bound-details.right.arrow'
Return type:str
static make_lilypond_tweak_string(attribute, value, directed=True, grob=None)

Makes Lilypond tweak string.

Returns string.

Return type:str
static report_spanner_format_contributions(spanner)

Reports spanner format contributions for every leaf in spanner.

>>> staff = abjad.Staff("c8 d e f")
>>> spanner = abjad.Beam()
>>> abjad.attach(spanner, staff[:])
>>> manager = abjad.LilyPondFormatManager
>>> print(manager.report_spanner_format_contributions(spanner))
c8  abjad.LilyPondFormatBundle(
        after=abjad.SlotContributions(
            spanner_starts=['['],
            ),
        )
d8  abjad.LilyPondFormatBundle()
e8  abjad.LilyPondFormatBundle()
f8  abjad.LilyPondFormatBundle(
        after=abjad.SlotContributions(
            spanner_stops=[']'],
            ),
        )

Returns string or none.

Return type:str
static tag(strings, tag, deactivate=None)

Tags strings with tag.

Return type:List[str]