;;PrintTwoReduced Simpler version using partCombine                
(let ((id #f)(tag "Part Combine" )(m 1)) 
(set! id (d-GetIdForName tag))
(d-DirectivePut-scoreheader-postfix tag "\ninstrumentation=\"Accompanist's Score\"\n")

(while (<= m (d-GetMovementsInScore))
    (d-GoToPosition m 1 1 1)
    (d-SmallerStaff)
    (d-DirectivePut-staff-prefix tag "instrumentName = \\markup Soli")
    (d-DirectivePut-staff-override tag  (logior DENEMO_ALT_OVERRIDE  DENEMO_OVERRIDE_AFFIX  DENEMO_OVERRIDE_GRAPHIC))
    (d-DirectivePut-standalone tag)
    (d-DirectivePut-standalone-minpixels tag 10)
    (d-DirectivePut-standalone-postfix tag (string-append (d-GetPrevailingKeysigAsLilyPond) "\\omit Staff.Slur "))
    (d-DirectivePut-standalone-allow tag id)
    
    (d-GoToPosition m 2 1 1)
    (d-SmallerStaff)
    (d-SetCurrentStaffAsVoice)    
    (d-DirectivePut-standalone tag)
    (d-DirectivePut-standalone-minpixels tag 10)
    (d-DirectivePut-standalone-postfix tag (string-append (d-GetPrevailingKeysigAsLilyPond) "\\omit Staff.Slur "))
    (d-PartCombine tag)
    (set! m (1+ m)))
 (d-DeleteLayout tag)
(d-CreateLayout tag)  
(d-SelectDefaultLayout)
(d-DirectiveDelete-scoreheader tag)
(set! m 1) 
(while (<= m (d-GetMovementsInScore))
    (d-GoToPosition m 1 1 1)
    (d-DirectiveDelete-voice "PartCombine")
    (d-SmallerStaff)
    (d-DirectiveDelete-staff tag)
    (d-GoToPosition m 2 1 1) 
    ;(disp "Restoring voice as staff in movement " m "\n")
    (d-SetCurrentVoiceAsStaff)
    (d-SmallerStaff) ;;deletes the smaller staff directive as it is fixed in the ShareStaff layout
    (d-DirectiveDelete-voice "PartCombine")
    (set! m (1+ m)))
(d-GoToPosition 1 1 1 1)
(d-SelectLayoutId id)
(d-SetSaved #f))
