markuptools.combine_markup_commands

abjad.tools.markuptools.combine_markup_commands.combine_markup_commands(*commands)[source]

Combine MarkupCommand and/or string objects.

LilyPond’s ‘combine’ markup command can only take two arguments, so in order to combine more than two stencils, a cascade of ‘combine’ commands must be employed. combine_markup_commands simplifies this process.

abjad> from abjad.tools.markuptools import combine_markup_commands
abjad> from abjad.tools.schemetools import SchemePair
abjad> from abjad.tools.markuptools import MarkupCommand
abjad> markup_a = MarkupCommand('draw-circle', 4, 0.4, False)
abjad> markup_b = MarkupCommand('filled-box', SchemePair(-4, 4), SchemePair(-0.5, 0.5), 1)
abjad> markup_c = "some text"
abjad> print combine_markup_commands(markup_a, markup_b, markup_c).format
\combine \combine \draw-circle #4 #0.4 ##f \filled-box #'(-4 . 4) #'(-0.5 . 0.5) #1 #"some text"

Returns a MarkupCommand instance, or a string if that was the only argument.

This Page