This is a line of text. Abjad code follows:

v = Voice("c'8 d'8 e'8 f'8 g'8 a'8 b'8 c''8") v[0].override.note_head.color = 'red' print v f(v)

Another line of text. More Abjad code follows. Notice that in the second block of Abjad code we can reference objects and variables created in previous blocks:

beamtools.BeamSpanner(v) show(v) write_ly(v, 'example1')

Here is paragraph 3, and more Abjad code.

for leaf in v: print leaf spannertools.TrillSpanner(v[2:]) show(v) write_ly(v, 'example2')

And a final paragraph. Here all the code is hidden:

[hide = True] spannertools.PianoPedalSpanner(v[:]) write_ly(v, "example4")

Now just write_expr_to_ly(v), hidden.

write_ly(v, "example5")