I think the reason is that the mark engravers belong to the staff grouping
context, which isn't removed along with the child staves. Structuring the
code like this avoids the duplicate marks:

\version "2.24.0"

\layout {
  \context {
    \Score
    \remove Bar_number_engraver
    \remove Staff_collecting_engraver
    \remove Mark_tracking_translator
    \remove Mark_engraver
    \remove Text_mark_engraver
  }
  \context {
    \ChoirStaff

  }
  \context {
    \Staff
    \RemoveEmptyStaves
    \consists Bar_number_engraver
    \consists Staff_collecting_engraver
    \consists Mark_tracking_translator
    \consists Mark_engraver
    \consists Text_mark_engraver
  }
}
marks = {
  s1
  s
  \break
  \mark\default
  s
  \textMark "here"
  s
  \break
  \mark\default
  s
  \textMark "there"
  s
}
A =  { 1 1 s1 s1 1 1 }
B =  { 1 1 1 1 1 1 }
<<
  \new ChoirStaff <<
    \new Staff << \marks \A >>
  >>
  \new ChoirStaff <<
    \new Staff << \marks \B >>
  >>
>>

Maybe I'm missing a way to do this while keeping the mark engravers in the
ChoirStaff context.

Saul

On Thu, Feb 9, 2023 at 1:29 AM Simon Albrecht <simon.albre...@mail.de>
wrote:

> Hi Saul,
> On 08/02/2023 22:03, Saul Tobin wrote:
>
> Is there a reason to have the marks in a child context rather than just a
> simultaneous music variable?
>
>
> You mean the Devnull? Just convenience. It works well with the way I
> assemble different ChoirStaffs for different output formats and adding
> marks to just one or multiple of them as needed.
>
> Now this morning I had an empty extra staff appear on top and I don’t know
> why, but it shouldn’t come from the Devnull.
>
> Best, Simon
>

Reply via email to