The dom.markup module

Helper module to manually construct markup elements.

Usage example:

>>> import quickly.dom.markup as m
>>> mkup = m.markup(m.bold("text", "text2"))
>>> mkup.write()
'\markup \bold { text text2 }'
>>> mkup.dump()
<lily.Markup '\markup' (1 child)>
 ╰╴<lily.MarkupCommand 'bold' (1 child)>
    ╰╴<lily.MarkupList (2 children)>
       ├╴<lily.MarkupWord 'text'>
       ╰╴<lily.MarkupWord 'text2'>
abs_fontsize(arg, *text)

The \abs-fontsize markup command.

arrow_head(arg1, arg2, *text)

The \arrow-head markup command.

auto_footnote(arg, *text)

The \auto-footnote markup command.

backslashed_digit(*text)

The \backslashed-digit markup command.

beam(arg1, arg2, *text)

The \beam markup command.

bold(*text)

The \bold markup command.

box(*text)

The \box markup command.

bracket(*text)

The \bracket markup command.

caps(*text)

The \caps markup command.

center_align(*text)

The \center-align markup command.

center_column(*text)

The \center-column markup command.

char(n)[source]

The \char markup command.

circle(*text)

The \circle markup command.

column(*text)

The \column markup command.

column_lines(*text)

The \column-lines markup command.

combine(arg, *text)

The \combine markup command.

compound_meter(*text)

The \compound-meter markup command.

concat(*text)

The \concat markup command.

customTabClef(arg, *text)

The \customTabClef markup command.

dir_column(*text)

The \dir-column markup command.

discant(*text)

The \discant markup command.

doubleflat()

The \doubleflat markup command.

doublesharp()

The \doublesharp markup command.

draw_circle(arg1, arg2, *text)

The \draw-circle markup command.

draw_dashed_line(*text)

The \draw-dashed-line markup command.

draw_dotted_line(*text)

The \draw-dotted-line markup command.

draw_hline()

The \draw-hline markup command.

draw_line(*text)

The \draw-line markup command.

draw_squiggle_line(sqlength, x, y, eqend)[source]

The \draw-squiggle-line markup command.

dynamic(*text)

The \dynamic markup command.

ellipse(*text)

The \ellipse markup command.

epsfile(axis, size, filename)[source]

The \epsfile markup command.

eyeglasses()

The \eyeglasses markup command.

fermata()

The \fermata markup command.

fill_line(*text)

The \fill-line markup command.

fill_with_pattern(space, direction, pattern, left, right)[source]

The \fill-with-pattern markup command.

filled_box(x1, y1, x2, y2, blot)[source]

The \filled-box markup command.

finger(*text)

The \finger markup command.

first_visible(*text)

The \first-visible markup command.

flat()

The \flat markup command.

fontCaps(*text)

The \fontCaps markup command.

fontsize(arg, *text)

The \fontsize markup command.

footnote(arg, *text)

The \footnote markup command.

fraction(arg, *text)

The \fraction markup command.

freeBass(*text)

The \freeBass markup command.

fret_diagram(s)[source]

The \fret-diagram markup command.

fret_diagram_terse(s)[source]

The \fret-diagram-terse markup command.

fret_diagram_verbose(element)[source]

The \fret-diagram-verbose markup command.

fromproperty(name)[source]

The \fromproperty markup command.

general_align(arg1, arg2, *text)

The \general-align markup command.

halign(arg, *text)

The \halign markup command.

harp_pedal(s)[source]

The \harp-pedal markup command.

hbracket(*text)

The \hbracket markup command.

hcenter_in(arg, *text)

The \hcenter-in markup command.

hspace(*text)

The \hspace markup command.

huge(*text)

The \huge markup command.

if_(arg, *text)

The \if markup command.

is_markup(text)[source]

Return True if the text can be written as LilyPond markup without quotes.

italic(*text)

The \italic markup command.

justify(*text)

The \justify markup command.

justify_field(name)[source]

The \justify-field markup command.

justify_line(*text)

The \justify-line markup command.

justify_string(s)[source]

The \justify-string markup command.

large(*text)

The \large markup command.

larger(*text)

The \larger markup command.

left_align(*text)

The \left-align markup command.

left_brace(*text)

The \left-brace markup command.

left_column(*text)

The \left-column markup command.

line(*text)

The \line markup command.

lookup(s)[source]

The \lookup markup command.

lower(arg, *text)

The \lower markup command.

magnify(arg, *text)

The \magnify markup command.

map_markup_commands(arg, *text)

The \map-markup-commands markup command.

markalphabet(*text)

The \markalphabet markup command.

markletter(*text)

The \markletter markup command.

markup(*args)[source]

Return markup; automatically wraps arguments in brackets.

markuplist(*args)[source]

Return markuplist; automatically wraps arguments in brackets.

medium(*text)

The \medium markup command.

musicglyph(name)[source]

The \musicglyph markup command.

natural()

The \natural markup command.

normal_size_sub(*text)

The \normal-size-sub markup command.

normal_size_super(*text)

The \normal-size-super markup command.

normal_text(*text)

The \normal-text markup command.

normalsize(*text)

The \normalsize markup command.

note(duration, direction)[source]

The \note markup command.

The duration can be a markup object containing a word that is a duration, e.g. 4.. (for LilyPond >= 2.22) or a Scheme string like #"4.." (for LilyPond < 2.22).

The direction is a floating point value; the sign is the stem direction, the value the stem length.

note_by_number(log, dotcount, direction)[source]

The \note-by-number markup command.

null()

The \null markup command.

number(*text)

The \number markup command.

on_the_fly(arg, *text)

The \on-the-fly markup command.

oval(*text)

The \oval markup command.

overlay(*text)

The \overlay markup command.

override(prop, value, *args)[source]

The \override markup command.

The prop should be a string, the value a Scheme value (Python bool, int or float are handled automatically).

override_lines(prop, value, *args)[source]

The \override-lines command.

The prop should be a string, the value a Scheme value (Python bool, int or float are handled automatically).

overtie(*text)

The \overtie markup command.

pad_around(arg, *text)

The \pad-around markup command.

pad_markup(arg, *text)

The \pad-markup markup command.

pad_to_box(x1, y1, x2, y2, *args)[source]

The \pad-to-box markup command.

pad_x(arg, *text)

The \pad-x markup command.

The \page-link markup command.

page_ref(label, gauge, *mkup)[source]

The \page-ref markup command.

parenthesize(*text)

The \parenthesize markup command.

path(arg, *text)

The \path markup command.

pattern(arg1, arg2, arg3, *text)

The \pattern markup command.

postscript(s)[source]

The \postscript markup command.

property_recursive(*text)

The \property-recursive markup command.

put_adjacent(arg1, arg2, arg3, *text)

The \put-adjacent markup command.

raise_(arg, *text)

The \raise markup command.

replace(arg, *text)

The \replace markup command.

rest(duration)[source]

The \rest markup command.

The duration can be a markup object containing a word that is a duration, e.g. 4.. (for LilyPond >= 2.22) or a Scheme string like #"4.." (for LilyPond < 2.22).

rest_by_number(arg, *text)

The \rest-by-number markup command.

right_align(*text)

The \right-align markup command.

right_brace(*text)

The \right-brace markup command.

right_column(*text)

The \right-column markup command.

roman(*text)

The \roman markup command.

rotate(arg, *text)

The \rotate markup command.

rounded_box(*text)

The \rounded-box markup command.

sans(*text)

The \sans markup command.

scale(arg, *text)

The \scale markup command.

score(*elements)[source]

The \score markup command.

You may give Header, Layout and general Music nodes.

score_lines(*elements)[source]

The \score-lines markup command.

You may give Header, Layout and general Music nodes.

semiflat()

The \semiflat markup command.

semisharp()

The \semisharp markup command.

sesquiflat()

The \sesquiflat markup command.

sesquisharp()

The \sesquisharp markup command.

sharp()

The \sharp markup command.

simple(*text)

The \simple markup command.

slashed_digit(*text)

The \slashed-digit markup command.

small(*text)

The \small markup command.

smallCaps(*text)

The \smallCaps markup command.

smaller(*text)

The \smaller markup command.

stdBase(*text)

The \stdBase markup command.

stdBaseIV(*text)

The \stdBaseIV markup command.

stdBaseV(*text)

The \stdBaseV markup command.

stdBaseVI(*text)

The \stdBaseVI markup command.

stencil(*text)

The \stencil markup command.

strut()

The \strut markup command.

sub(*text)

The \sub markup command.

super(*text)

The \super markup command.

table(arg, *text)

The \table markup command.

table_of_contents()

The \table-of-contents markup command.

teeny(*text)

The \teeny markup command.

text(*text)

The \text markup command.

tie(*text)

The \tie markup command.

tied_lyric(text)[source]

The \tied-lyric markup command.

tiny(*text)

The \tiny markup command.

translate(x, y, *args)[source]

The \translate markup command.

translate_scaled(x, y, *args)[source]

The \translate-scaled markup command.

transparent(*text)

The \transparent markup command.

triangle(*text)

The \triangle markup command.

typewriter(*text)

The \typewriter markup command.

underline(*text)

The \underline markup command.

undertie(*text)

The \undertie markup command.

unless(arg, *text)

The \unless markup command.

upright(*text)

The \upright markup command.

vcenter(*text)

The \vcenter markup command.

verbatim_file(filename)[source]

The \verbatim-file markup command.

vspace(*text)

The \vspace markup command.

whiteout(*text)

The \whiteout markup command.

with_color(arg, *text)

The \with-color markup command.

with_dimensions(x1, y1, x2, y2, *args)[source]

The \with-dimensions markup command.

with_dimensions_from(arg, *text)

The \with-dimensions-from markup command.

The \with-link markup command.

with_outline(arg, *text)

The \with-outline markup command.

with_url(url, *args)[source]

The \with-url markup command.

woodwind_diagram(instrument, scheme_commands)[source]

The \woodwind-diagram markup command.

wordwrap(*text)

The \wordwrap markup command.

wordwrap_field(name)[source]

The \wordwrap-field markup command.

wordwrap_string(s)[source]

The \wordwrap-string markup command.