DR Robert Donaldson, who has died at the age of 94, was profoundly conscientious in his dedication to the National Library of Scotland in Edinburgh, and to its public role and the readers it served.

It was common to see him leaving the library in the evenings, carrying not one but two briefcases with papers for scrutiny at home.

He was highly respected within the library and among the wider community of research librarians for his deep knowledge of rare book librarianship and scholarship, and for his intellectual integrity, unfailing courtesy and professional commitment.

He always asked more of himself than he ever did of others and, without ever having opened a management manual, he instinctively knew how to work collegially with others. He was an endlessly patient colleague, always quick to see another’s point of view and never overbearing in defence of his own, and with a dry sense of humour that was subtly impish.

On occasions, Robert could demonstrate a level of tenacity in investigation that could exasperate less punctilious colleagues but he was usually proved correct.

A previous librarian had commented that curators should be “merchants of accuracy” and Robert was, indeed, the exemplification of accuracy in everything he touched. His notes in a very precise, clearly legible and deliberate hand are testament to his meticulous approach. Like many of his generation, he was imbued with a deep sense of public service, oblivious to egotism and always mindful in the use of public funds.

He had joined the library in mid-1962, becoming a member of the curatorial staff of the department of printed books.

He devoted the next 27 years of his professional life to the National Library, first as assistant keeper and then as deputy keeper to JH Loudon. In 1975, he was appointed keeper of printed books and led the British antiquarian division until he retired in December 1989.

During this time, he played a crucial part in expanding the library’s national role, managing the accessioning of major rare-book collections such as the Blairs College Library and Newhailes House Library that were at risk of dispersal. He also made a major contribution to devising the standard rules governing the automated co-operative cataloguing of antiquarian books in Scottish libraries.

In 1988, shortly before retirement, he oversaw the transfer of the vast Crawford (Bibliotheca Lindesiana) Collections from John Rylands University Library, Manchester.

Outwith the library, he gave valuable service as president of Edinburgh Bibliographical Society (1977-80) and as chair of the Library Association Rare Books Group (1983-86), during which time the group published the first edition of its Directory of Rare Books and Special Collections in the United Kingdom and Republic of Ireland.

It is a tribute to the high regard in which he was held that the librarian Professor EFD Roberts, who was himself already gravely ill at home, insisted on coming to the library, as it turned out for the last time, so that he could speak at Robert’s retirement reception.

Robert Donaldson was Edinburgh born and bred, with deep family roots in the city to which he remained devoted throughout his long life. He was born in the Royal Edinburgh Maternity Hospital on December 13, 1926, the only child of William Donaldson and Euphemia Bailie McDonald Mackay.

Both his parents were engaged in the Edinburgh printing trade, a stone’s throw from where Walter Chepman and Andrew Myllar, the first Scottish printers, plied their trade in the Cowgate in the early 16th century – a link that Robert would later continue with distinction in his own professional career through his researches in the field of early Scottish printing.

His father died young, leaving his widowed mother to provide for his education but, with the aid of George Heriot’s School’s Foundation scheme for the provision of free education for boys who had lost their fathers, Robert, aged nine, began his education there in 1936.

In 1944, his final year, he distinguished himself in winning the annual medals for history and German, and he secured a scholarship to study history at the University of Edinburgh.

After graduating with honours in 1948, he was appointed to a post in Edinburgh University Library. Although employed full-time, he began postgraduate studies in the field of medieval history and was awarded his PhD in 1955.

While working in the university library, he met his future wife, Elizabeth Macpherson, who had recently joined the staff, and they were married on September 14, 1957. Their son Keith was born in 1958 and their daughter Jan in 1961.

In 1959, the young family had to make a move when Robert was appointed to the newly-created post of Sub-Librarian in charge of Special Collections in Glasgow University Library.

That same year, he was appointed editor of The Bibliotheck, a journal of Scottish bibliographical notes and queries, published in Glasgow from 1956 by the Library Association’s Scottish Group of the University, College and Research Section. He remained as editor until 1970.

In 1972, he made the move to the National Library in Edinburgh.

In his retirement, Robert continued to enjoy the family life that was his lifelong mainstay and to pursue his wide personal interests, above all his enduring passion for classical music.

A brief flirtation with Ivor Novello musicals around 1940 led directly to a passion for Richard Wagner and subsequently broader tastes. From its first year, 1947, he attended concerts at the Edinburgh Festival and many more Usher Hall concerts over the years. His collection of classical LPs eventually numbered more than 1,000.

Robert cared for his wife at home for a number of years before she entered St Raphael’s care home in 2017.

When increasing age took its toll, he spent his last year in the care of Marian House, where he passed away in January. He is survived by his wife, Liz, his son Keith and his wife Clare, his daughter Jan and her husband Michael, his two granddaughters Ailsa and Isla, and two great-grandchildren, Anice and Duncan.