When the Instrument_name_engraver is added to a ChoirStaff, GrandStaff
or StaffGroup, and that composite-staff contains child Lyrics contexts,
those Lyric contexts inherit the instrumentName (and
shortInstrumentName) from the parent context; so, for example, if a
ChoirStaff contains two Lyrics children, the instrumentName will print
three times (once for the ChoirStaff and once each for the Lyrics). The
following example illustrates this. To avoid this, the
Instrument_name_engraver must be explicitly removed from the Lyrics context.
%%% BEGIN LILYPOND CODE %%%
\version "2.10.9"
trbText = \lyricmode { Foo }
tenText = \lyricmode { Bar }
basText = \lyricmode { Baz }
\score {
<<
\new ChoirStaff
<<
\new Staff = trbVoxStaff { \context Voice = trbVoice { <c''
e'>1 } }
\new Lyrics = trbLyrics { s2. }
\new Staff = tenVoxStaff { \context Voice = tenVoice { \clef
"G_8" g1 } }
\new Lyrics = tenLyrics { s2. }
\new Staff = basVoxStaff { \context Voice = basVoice { \clef
bass c1 } }
>>
\context Lyrics = trbLyrics \lyricsto trbVoice \trbText
\context Lyrics = tenLyrics \lyricsto tenVoice \tenText
\lyricsto basVoice \new Lyrics \basText
>>
\layout
{
\context {
\ChoirStaff
\consists Instrument_name_engraver
instrumentName = "Coro"
}
% Uncomment the following line to fix the problem
%\context { \Lyrics \remove Instrument_name_engraver }
}
}
%%% END LILYPOND CODE %%%
_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond