Aligning text marks to notes
Appearance
By default, TextMark objects are aligned to the left edge of the staff. They can be aligned to the first note of the line instead by setting the non-musical property to false.
\version "2.24"
\paper {
indent = #0
ragged-right = ##t
}
{
\textMark "mark a"
c'1 |
\break
\override Score.TextMark.non-musical = ##f
\textMark "mark b"
c' |
}