Franz Liszt wrote his Elegy no. 2 in 1877, and first published it the following year, through C.F. Kahnt Nachfolger, in Leipzig. The work was dedicated to Lina Ramann. The first version of the work, unpublished, was listed as S. 196a, and bore the title Entwurf der Ramann-Elegie. The work was revised soon after it was finished, and that version became S. 197, a.k.a. LW.A277. Arrangements for piano and cello, and piano and violin ensued, respectively called S. 131 and 131bis. They are often published together.