On 18/05/2025 12:54, Stephan Schöll wrot
How can I avoid the collision warning and the omission of one of the marks in a way that both the \codaMark and the \sectionLabel are printed side by side (ideally the codaMark above the barline and the sectionLabel with a minimal offset to the right).

So I believe the problem is that the Mark_tracking_translator is unable to manage two marks at the same time. One solution is to duplicate the Mark_tracking_translator by moving it to a Voice context and put the two marks in two voices, together with an X-offset so they don't overlap. This solution comes with the disadvantage that all marks must be added to the Voice that appears at the top of the system: there may be other problems I have not envisaged when engraving scores more complex than this MWE.

\version "2.24.0"

\layout {
  \context { \Score \remove Mark_engraver \remove Mark_tracking_translator }   \context { \Voice \consists Mark_engraver \consists Mark_tracking_translator }   \context { \NullVoice \consists Mark_engraver \consists Mark_tracking_translator }
}

tuneWithMarks = \relative c' {
  c4 4 4 4
  <<
    \codaMark 1
    \new NullVoice { \once \override SectionLabel.X-offset = #2 \sectionLabel "Chorus" }
  >> \oneVoice
  4 4 4 4
}

\score {
  \tuneWithMarks
}

--
Timothy Lanfear, Bristol, UK.

Reply via email to