The library at Abbotsford is entirely the creation of Scott: it begins with the chapbooks he collected as a child and continues through the small volumes of poetry he annotated as a schoolboy.

Then there are the books gifted to him by his grandfather, mother and aunt. The lecture notes he took as a young law student are here, as well as the poems he composed for his first love Williamina Belsches.

And here are the manuscript versions of the ballads he collected whilst compiling The Minstrelsy of the Scottish Border. He amassed vast numbers of books and tracts on the Covenanters and the Jacobites, together with the countless volumes of history, geography, chivalry, folklore and witchcraft he used as source material for his own Waverley novels.

The shelves in his study are filled not only with practical reference works such as dictionaries and encyclopaedias, but also with the contemporary instruction manuals on planting and tree-cultivation that he used to help him develop the land around his home.

The library at Abbotsford also tells of Scott’s unprecedented international popularity and fame. Books were sent to him from all over the world: the Brothers Grimm sent him their first book of fairy tales from Germany; Washington Irving, who had visited Scott at Abbotsford, sent books from America; Lachlan Macquarie, the Governor of New South Wales, sent him the tale of a bushranger, the first book ever to be published in Tasmania.

In keeping with the seemingly boundless interests of a man who was involved in every aspect of the world in which he lived – from law to politics, from antiquarianism to the latest scientific discoveries unveiled at the Royal Society of Edinburgh – the scope of the Abbotsford library is almost without limit.

In compiling the first catalogue of Scott’s books since 1838, many treasures have been uncovered: a ‘lost’ illuminated manuscript of the Legenda Aurea, composed between 1450 and 1475 by the Augustinian friar Osbern Bokenham, recounting many previously unknown legends of English and Welsh saints; seven incunables (i.e. books printed before 1500); Teuerdank, an allegorical poem allegedly written by the Holy Roman Emperor Maximilian I, published in Germany in 1519 and illustrated with more than a hundred exquisite woodcuts.

Abbotsford also holds exceptional collections of works on witchcraft and demonology, including Rosicrucian manuscripts filled with alchemical symbols and intended for clandestine circulation amongst believers. There are also early reports of werewolves and poltergeists and eyewitness accounts of the Salem witch trials.

Many printed works in the library are unique – no other copies are known to have survived – yet amongst the rare and obscure items there is also much humour to be found: from the 16th- century scatological satires of Sir John Harrington, inventor of the flushing toilet, to 19th- century joke books. There are nearly five thousand chapbooks – short, cheaply-produced tracts sold door-to-door by travelling chapmen to an increasing literate general public. These were the comics of their time, and consist of popular ballads, risqué poems, lurid tales and the last words of repentant criminals facing the gallows.

O, what a tangled web we weave when first we practise to deceive! Sir Walter Scott share this tweet

Scott also collected compilations of newspaper clippings and cartoons satirising topical events, such as the trial of the infamous grave-robbers Burke and Hare and the unhappy and scandalous marriage of George IV and Queen Caroline