> I think you likely want to move the Mark_engraver to a kind of
> MarkLine context instead.

Well, the problem is that such a context needs the
`Axis_group_engraver`, which tries to align stuff horizontally on a
line.  I don't want that.  Rehearsal and tempo marks should be aligned
on the selected staff as if they were part of it, see attached
example.  But maybe you and your wizardry find a solution for that :-)


    Werner
\version "2.23.10"

music = { a'1 ~ | a' | a' | a' }
text = \lyricmode {
  foo __

}
top = { \tempo "Allegro" s1 | s | \mark\default s | s }


\score {
  <<
    \new Staff = "staff" <<
      \top
      \new NullVoice = "aligner" \music
      \music
    >>
    \new Lyrics \with {
      alignAboveContext = "staff"
    }
      \lyricsto "aligner" \text
  >>
}

\score {
  <<
    \new MarkLine \top

    \new Staff = "staff" <<
      \music
      \new NullVoice = "aligner" \music
    >>
    \new Lyrics \with {
      alignAboveContext = "staff"
    }
      \lyricsto "aligner" \text
  >>
  \layout {
    \context {
      \Score
      \remove Mark_engraver
      \remove Staff_collecting_engraver
      \accepts MarkLine
    }
    \context {
      \name MarkLine
      \type Engraver_group
      \consists Axis_group_engraver
      \consists Mark_engraver
      \override VerticalAxisGroup.staff-affinity = #DOWN
      \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #0.5
      \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = #0.5
    }
  }
}

Reply via email to