Hi Stephan,
At 13:54 on 18 May 2025, Stephan Schöll wrote:
> Hi all
> 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).
> TIA
> Stephan
> %%% MWE
> \version "2.25.4"
> tuneWithMarks = \relative c' {
> c4 4 4 4
> \once \override Score.CodaMark.extra-offset = #'(-2 . 0) % moves the mark
> but
> does not avoid collision/omission
> \codaMark 1
> \once \override Score.SectionLabel.extra-offset = #'(2 . 0) % ... does not
> help either
> \sectionLabel "Chorus"
> 4 4 4 4
> }
> \score {
> \tuneWithMarks
> \layout {}
> }
A couple of notes on your question. Firstly, 'extra-offset' will always ignore
collisions - it is really meant as a "last-resort" method to move a grob.
Consider using 'X-offset' in this situation, particularly as you are only
adjusting the X position anyway.
The reason the section label is omitted is stated in the log output:
warning: conflict with event: `coda-mark-event'
warning: discarding event: `section-label-event'
It's not possible to have a coda-mark and a section-label at the same time
point. Maybe simplest to just combine both into one section label? Does the
following give you what you want?
\once \override Score.SectionLabel.X-offset = #0
\sectionLabel \markup { \coda "Chorus" }
--
Mark Knoop