How to print two rehearsal marks above and below the same barline (method 2) [obsolete in 2.23]

This method prints two 'rehearsal marks' - one above the stave and one below, by creating two voices, adding the Rehearsal Mark engraver to each voice - without this no rehearsal mark is printed - and then placing each rehearsal mark UP and DOWN in each voice respectively.

This method (as opposed to method 1) is more complex, but allows for more flexibility, should it be needed to tweak each rehearsal mark independently of the other.

This snippet is obsolete starting from LilyPond version 2.23.14, which introduces the \textMark and \textEndMark commands. There is no restriction similar to rehearsal marks: there can be several text marks at the same moment.