Typesetting a canon

A canon usually is a single-part melody which has the ability to form a polyphonic music when sung with several voices. To print such a melody, you might want to use the following trick, that allows the barlines to be synchronized between the voices, without making the score look like a multi-stave polyphonic score.