Using tags to produce mensural and modern music from the same source

Using tags, it is possible to produce both mensural and modern notation from the same music. In this snippet, a function \menrest is introduced, allowing mensural rests to be pitched as in the original, but with modern rests in the standard staff position.

Tags can also be used where other differences are needed: for example using whole measure rests (R1, R\breve, etc.) in modern music, but normal rests (r1, r\breve, etc.) in the mensural version. Converting mensural music to its modern equivalent is usually referred to as transcription.

The call c4.\Be c8 c\Am is the same as c4.[ c8 c]. However, it suppresses warnings if it starts on a note that can't hold a beam but needs it anyway due to the use of Completion_heads_engraver.

[The slightly shortened line length of the mensural staff avoids cropping of the custos glyph while LilyPond generates clipped images.]