On 07/04/2025 03:07, James Harkins wrote:
OK, now a real question (after -- I think -- RTFMing this time).

I was looking for a way to have a text mark, e.g. '15-20" electronics' -- 
appear only once at the top of a score system, while also appearing in each of the 
parts (in the way that a rehearsal marking may be specified in every staff, but 
printed only once at the top).

https://lilypond.org/doc/v2.25/Documentation/notation/text-marks advises 
against using \mark for this -- but \textMark renders the text once for every 
time it's defined, *not* only once per staff system.

For a minimal example, take the "Printing marks on every staff" example and 
remove the layout block:

\score {
   <<
     \new Staff { \mark \default c''1 \textMark "molto" c'' }
     \new Staff { \mark \default c'1 \textMark "molto" c' }
   >>
}

How about adding the Text_mark_engraver only to the top staff of the system? It would only work if the top staff is present throughout the whole piece, i.e. you cannot use \Remove EmptyStaves. Information on the Staff_collecting_engraver is sparse, so I am unsure if anything should be done with it.

\version "2.24.0"

\score {
  <<
    \new Staff \with { \consists Text_mark_engraver } { \mark \default c''1 \textMark "molto" c'' }
    \new Staff { \mark \default c'1 \textMark "molto" c' }
  >>
}

\layout {
    \context {
      \Score
      \remove Text_mark_engraver
%     \remove Staff_collecting_engraver
    }
    \context {
      \Staff
%     \consists Staff_collecting_engraver
    }
}

--
Timothy Lanfear, Bristol, UK.

Reply via email to