 A shift in context was the obvious starting point in many of these works and , where sufficiently original , contributed to the author ’ s own literary fortunes . This was the case with Edward Jerningham ’ s The Nunnery : an elegy in imitation of the Elegy in a Churchyard , published in 1762 . <unk> by its success , Jerningham followed it up in successive years with other poems on the theme of nuns , in which the connection with Gray ’ s work , though less close , was maintained in theme , form and emotional tone : “ The Magdalens : an elegy ” ( 1763 ) ; “ The Nun : an elegy ” ( 1764 ) ; and “ An Elegy Written Among the Ruins of an Abbey ” ( 1765 ) , which is derivative of the earlier poems on ruins by Moore and Cunningham . At the opposite extreme , Gray ’ s poem provided a format for a surprising number that purport to be personal descriptions of life in gaol , starting with “ An elegy in imitation of Gray , written in the King 's Bench Prison by a minor “ ( London 1790 ) , which is close in title to William Thomas Moncrieff ’ s later " Prison Thoughts : An elegy , written in the King 's Bench Prison " , dating from 1816 and printed in 1821 . In 1809 , <unk> wrote “ An evening 's contemplation in a French prison , being a humble imitation of Gray 's Elegy ” while he was a prisoner at Arras during the Napoleonic wars ( London 1809 ) . It was followed next year by the bitter “ Elegy in Newgate ” , published in The Satirist in the character of the recently imprisoned William Cobbett . 
