I am engraving a bit for piano, where there is a chord spanning cross staff (played with the left hand). One of the pitches of the chord also appears on the right hand, and that messes up my engraving, where the stems no longer align :
There are two cross-staff stems, the left one (red) is the one I'm unhappy with, and the right one (violet) is an example of what it should look like. The image is the result of the following lilybin; the code is :
\version "2.18.0"
rightHand = \relative c'' {
\clef "treble"
<< { g4 f4 f2} \\ \crossStaff {s4 <c f>2 <c f>4} >>
}
leftHand = \relative c {
\clef "bass"
\stemDown {r4 a'2 a4}
}
\score {
\new PianoStaff
<<
\new Staff = "upper" \rightHand
\new Staff = "lower" \leftHand
>>
\layout {
\context {
\PianoStaff
\consists #Span_stem_engraver
}
}
}
Ideally, I want something that looks like :
That is, the chord must be displayed as such and appear after the right hand f4 pitch.