Just 1,000 copies of the poem have been printed
A bawdy poem by Robert Burns is to be reprinted to raise money for charity and mark the year of Homecoming.
The Fornicator's Court, which was probably written in 1786, was found in Sir Walter Scott's private library at Abbotsford in the Scottish Borders.
The facsimile version, produced by the Faculty of Advocates, will have a limited print run of 1,000 copies.
Money raised will go to the Abbotsford Library Project Trust, which was set up to help conserve the library.
The poem can also be viewed online as part of the BBC's Robert Burns website, which was launched to celebrate the 250th anniversary of the bard's birth.
It appears there under the title Libel Summons, and can also be heard being read by actor Robbie Coltrane.
Sir Walter was a member of the Faculty of Advocates which owns his library of more than 9,000 volumes.
The online cataloguing of the collection is now well under way and, already, a number of priceless antiquarian volumes, including medieval manuscripts, have been rediscovered.
The Faculty decided that the year of Homecoming, with its theme celebrating Scotland's national bard, was the time to produce a facsimile edition of the Abbotsford version of The Fornicator's Court.
The facsimile edition - true to the Abbotsford original - also includes a manuscript copy in Burns' own hand of 'O saw ye my Maggie' , another risqué composition, which Sir Walter had 'tipped into' his copy of The Fornicator's Court.
The Fornicator's Court is a humorously satirical account of the 18th Century Presbyterian Kirk's approach to sexual shenanigans.
As an adulterer, Burns was no stranger to the quasi-legal and sometimes hypocritical processes of the Kirk and the Kirk Session.
Robert Burns' poem 'O saw ye my Maggie' written in his own hand
The Faculty's cloth-bound facsimile contains an introduction by Burns scholars and experts Gerard Carruthers and Pauline Anne Gray, of Glasgow University's Centre for Robert Burns Studies.
Carruthers and Gray said in the late 18th and early 19th Century any publication of The Fornicator's Court would have been privately printed and at the request of only a few subscribers.
"Verses and publications such as this were obviously being shared and enjoyed by gentlemen in the drawing room, at clubs or discreetly circulated among friends," they said.
As a young man in Edinburgh, Scott famously met Burns and maintained a lifelong admiration for him.
Carruthers and Gray added: "This facsimile version of the Fornicators Court, including the tipped in 'O saw ye my Maggie', is one of the rarities of the library at Abbotsford.
"It is testament also to Scott's fascination with the man he called his 'favourite author'.
"It is an item that links those two of Scotland's writers who do more than any others to broadcast to the modern world the idea of Scotland, and highlights their conjunction also as creative artists interested in the more intimate spaces of human culture."