Placing rehearsal marks other than above the top staff

Currently, placing rehearsal marks somewhere else than above the top staff is not possible by default. This is due to a malfunction in the Staff_collecting_engraver, see Issue 2199. This solution (courtesy of Shevek, see the lilypond-user archive) defines a custom MarkLine context which will display all metronome and rehearsal marks and may be inserted anywhere between staff and other lines.

Remark from LSR-editor: Issue 2199 is solved in 2.21. In this regard this snippet is deprecated, for now we let it in as an example how to define a custom context like MarkLine.