I have a Chopin piece that I'm engraving and I've run into a problem with some of the close harmonies he writes. He has a chord with both a d-sharp and a d-natural in it. The edition I'm using uses two voices and doesn't merge the two d's (see attached picture). I've tried this in LilyPond but I can't prevent the merging of the two notes (see second attached picture, measure one.) Is there a way to stop LilyPond from merging two notes?
I've asked this question before and one of the suggestions was to use an enharmonic note, in this case e-flat for the d-sharp (see attached, measures two through four). To the pianists reading this: which measure is the least confusing? I've also attached the code I used to create the four measures.