%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}





% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/home/gub/NewGub/gub/target/linux-x86/src/lilypond-git.sv.gnu.org--lilypond.git-stable-2.22/input/regression/context-find-grandchild-ambiguous.ly"
\sourcefileline 0
\version "2.19.80"

\header {
  texidoc = "@code{\\context} finds a grandchild by type and ID when
there are multiple matching contexts.
@verbatim
           StaffGroup A (from here, find Staff D)
          /            \
    StaffGroup B  StaffGroup C
        /                \
    Staff D            Staff D
@end verbatim
RESULT and either B or C should appear in the left margin."
}

\new StaffGroup = "A" <<
  \new StaffGroup = "B" \with { instrumentName = "B" } <<
    \context Staff = "D" { b'1 }
  >>
  \new StaffGroup = "C" \with { instrumentName = "C" } <<
    \context Staff = "D" { d'1 }
  >>
  \context Staff = "D" <<
    %% This name is expected to replace either B or C.  It would
    %% probably be helpful for LilyPond to warn that there is more
    %% than one matching context in the scope of the search.
    \set StaffGroup.instrumentName = "RESULT"
    s1
  >>
>>



% ****************************************************************
% end ly snippet
% ****************************************************************
