I have a situation I don't know how to deal with in LilyPond. I have bass clef and treble clef notes on the same staff. I guess one way to do it is to create a markup and a small bass clef sign and put it next to the treble clef (and incorrect) gf which looks like a tied bf from the bass clef in the first measure. I could make a temporary ossia-type staff to hold the bf pedal tone.
Any other thoughts?