\version "2.18.0"

\include "stabat_mater.instr_ily"
\include "stabat_mater_06b.ily"
\include "clefd.ily"
\include "stabat_mater_small.ily"
PS = {
  s2.*53 \break |
}
\include "stabat_mater.staff_ily"

\score {
  \header { piece = \hdrag }
  <<
    \scorePre
    \scoreLcl
%{
    \new GrandStaff <<
      \staffOba
      \staffObb
    >>
%}
    \new GrandStaff
    \with {
      \override StaffGrouper.staff-staff-spacing.basic-distance = #0
      \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #8
    }
    <<
      \staffVia
      \staffVib
      \staffVa
    >>
% }
    \new ChoirStaff
    \with {
      \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #8
    }
    <<
%      \staffCan
%      \lyricsto voiceCan \lyrCan
      \staffAlt
      \lyricsto voiceAlt \lyrAlt
      \staffTen
      \lyricsto voiceTen \lyrTen
%      \staffBas
%      \lyricsto voiceBas \lyrBas
    >>
%    \new GrandStaff <<
      \staffVc
%      \staffFag
%      \staffBC
%    >>
  >>
  \layout {
    \context {
      \Score
      %\override SpacingSpanner.base-shortest-duration = #(ly:make-moment 2/1)
    }
    \context {
      \Staff
      \RemoveEmptyStaves
      %\override VerticalAxisGroup.remove-first = ##t % this does not work with Ambitus_engraver
      \consists "Ambitus_engraver"
    }
    \context {
      \Voice
      %\consists "Ambitus_engraver"
    }
  }
}

