The National Library of Scotland (NLS; Scottish Gaelic: Leabharlann Nàiseanta na h-Alba; Scots: Naitional Leebrar o Scotland) is one of the country's National Collections. It is one of the largest libraries in the United Kingdom. As well as a public programme of exhibitions, events, workshops, and tours, the National Library of Scotland has reading rooms where visitors can access the collections. It is the legal deposit library of Scotland and is a member of Research Libraries UK (RLUK) and the Consortium of European Research Libraries (CERL).
 There are over 24 million items held at the Library in various formats including books, annotated manuscripts and first-drafts, postcards, photographs, and newspapers. The library is also home to Scotland's Moving Image Archive, a collection of over 46,000 videos and films. Notable items amongst the collection include copies of the Gutenberg Bible, Charles Darwin's letter with which he submitted the manuscript of On the Origin of Species, the First Folio of Shakespeare, the Glenriddell Manuscripts, and the last letter written by Mary Queen of Scots. It has the largest collection of Scottish Gaelic material of any library in the world.
 The Library's main public building is in Edinburgh city centre on George IV Bridge, between the Old Town and the university quarter. This building is Category A listed. Exhibitions are frequently held here, with past examples including 'Northern Lights: The Scottish Enlightenment' (21 June 2019 – 18 April 2020), a display which explored Scotland's contribution to the progress of Enlightenment, and 'The International Style of Muriel Spark' (8 December 2017 – 13 May 2018), a celebration of her life and literary achievements.
 As the library is a not a lending library, this building is one of several venues where the public are able to visit and consult primary materials in the reading rooms. There are two reading rooms in the George IV building, and a third Multimedia Room for consulting non-written materials:
 There is also a more modern building, constructed in the 1980s, in a residential area on the south side of the town centre, on Causewayside. This was built to accommodate some of the specialist collections, such as maps and science collections, and to provide extra large-scale storage. There is one reading room located here also; the Maps Reading Room, purposed for visitors to consult maps, atlases, gazetteers, and cartographic reference books.
 The newest addition to the Library is the 2016 Kelvin Hall public centre in Glasgow, purposed to provide access to the library's digital and moving collections, namely the Moving Image Archive. Like at the library's main building, exhibits are held here too, though on a smaller scale.
 Originally, Scotland's national deposit library was the Advocates Library belonging to the Faculty of Advocates. It was opened in 1689 and gained national library status in the Copyright Act 1710, giving it the legal right to a copy of every book published in Great Britain. In the following centuries, the Library added books and manuscripts to the collections by purchase as well as legal deposit, creating a privately funded national library in all but name.
 
By the 1920s, the upkeep of collection was too much for the Advocates Library and, with the aid of a £100,000 endowment from Alexander Grant, managing director of McVitie & Price, the Library's contents were presented to the nation. The National Library of Scotland was formally constituted by Act of Parliament in 1925. Grant's support was recognised with a baronetcy, and in June 1924 he became Sir Alexander Grant of Forres. In 1928 he donated a further £100,000 – making his combined donations the equivalent of around £6 million today[when?] – for a new library building to be constructed on George IV Bridge, replacing the Victorian-period Sheriff Court, which moved to the Royal Mile. Government funding was secured which matched Grant's donation. Work on the new building was started in 1938, interrupted by World War II, and completed in 1956. The architect was Reginald Fairlie; the architectural sculptor was Hew Lorimer. The coat of arms above the entrance was sculpted by Scott Sutherland and the roundels above the muses on the front facade by Elizabeth Dempster.
 By the 1970s, room for the growing collections was running out, and other premises were required. The Causewayside Building opened in the south-side of Edinburgh in two phases, in 1989 and in 1995, at a total cost of almost £50 million, providing additional working space and storage facilities.
 Since 1999, the Library has been funded by the Scottish Parliament. It remains one of six legal deposit libraries in the United Kingdom and Ireland, and is overseen by a board of trustees.
 The Library also holds many ancient family manuscripts including those of the Clan Sinclair, which date back to 1488.
 On 26 February 2009, areas of the building were flooded after a water main burst on the 12th floor. Firefighters were called and the leaking water was stopped within ten minutes. A number of items were lightly damaged.
 The last letter written by Mary Queen of Scots made a rare public appearance to mark the opening of a new Library visitor centre in September 2009.
 The Library joined the 10:10 project in 2010 in a bid to reduce their carbon footprint. One year later they announced that they had reduced their carbon emissions according to 10:10's criteria by 18%.
 On 16 May 2012 the National Library of Scotland Act 2012 was passed by the Scottish Parliament, and received royal assent on 21 June 2012.
 In April 2013 the Library recruited a Wikipedian in residence, becoming the first institution in the Scotland to create such a post. In 2016, the Library recruited a Gaelic Wikipedian in residence.
 In September 2016 the Library opened a new centre at the refurbished Kelvin Hall, Glasgow, in partnership with Glasgow Life and the University of Glasgow, providing access to the Library's digital and moving image collections.
 The National Library of Scotland has many different collections in varying sizes, though some of the larger ones (with in-depth pages of their own) are listed here:
 The John Murray Archive is one of the larger collections at the National Library of Scotland, consisting of over one million items. It contains various documents, letters, manuscripts, and business papers all related to the House of John Murray, a British publisher known for publishing the likes of Jane Austen, Herman Melville, Charles Darwin, and Lord Byron. Also included within the collection is the Archive of Smith, Elder and Company, as well as the Charles Elliot papers. The Library continues to receive additions to the archive on an ad hoc basis.
 There are over 4,200 bound volumes (40,000 individual reports) within the India Papers collection. The archive consists of reports, photographs, government correspondence, and various other miscellaneous material related to the British Raj. The collection is rare and is the largest of its kind in the UK behind the India Office Records at the British Library. It contains items related to medicine, travel, the arts, human rights, and military history, as well as many others. One of the bigger sections, the Medical History of British India, has been digitised and is available to the public online. One of the highlights from the collection is the Indian Hemp Drugs Commission report.
 The Minto Papers are over 2,000 documents relating to the Elliot family, a British family of aristocrats founded in the 17th century. This collection is a valuable source of study for British politics, Scottish history, and the affairs of 19th-century Canada, Italy, and British India.
 The Patrick Leigh Fermor Archive is a collection of different items related to Patrick 'Paddy' Leigh Fermor, a British travel writer, adventurer, and veteran. The Archive was purchased by the Library in 2012 from Fermor's estate, using funds from the John R. Murray charitable trust. There are over 10,000 items in the collection including photographs, sketches, films, war reports, books, manuscripts, and postcards.
 The Moving Image Archive is a collection of over 46,000 moving images (films, television shows, and short video clips). The Library acquired the collection as the Scottish Screen Archive in 2007, though it was renamed in 2015. Over 2,600 items from the collection have been put online and are freely available to the public for viewing in the venue at Kelvin Hall.
 The National Library of Scotland holds over two million cartographic items, making it the largest collection of maps in Scotland and one of the largest in the world. There are several separate collections of maps within the library's holdings, namely the Bartholomew Archive and the Graham Brown Collection (see below). At the library there are maps relating to many different kinds of landscapes, such as estates, counties, railways, maps which show the trenches of World War I, and alpine areas.
 The collections include:
 The Bartholomew Archive is a notable map collection that was gifted to the Library in 1995 by the Bartholomew family in memory of Scottish cartographer John Bartholomew (1890–1962). The archive provides information about the Edinburgh-based firm of map engravers, printers, and publishers, John Bartholomew and Son Ltd. It is one of the most extensive cartographic archives available for research in a public institution.
 The Library holds roughly 375 military maps and plans that were prepared by the Board of Ordnance in the 18th century for government troops during the Jacobite period. Within the collection are maps of routes, fortifications, and Highland towns. The items in the collections were donated to the library in the 1930s by a government department descended from the Board.
 The Stevenson Collection is a collection of 19th and 20th century manuscript and printed maps, drawings, and building plans from the Stevenson family, a Scottish engineering family specialising in building lighthouses, harbours, and other civil engineering works. The collection mostly covers their work in the United Kingdom, although there are some works concerning Japan and New Zealand, and several other countries.
 The National Library of Scotland holds materials related to (primarily) Scottish theatre, though many of the individual notable items are found across different collections. It has a wide range of theatre materials, including scripts and manuscripts, business papers, sets, theatre programmes, and photographs.
 Many of the theatre-related items from the 20th and 21st century are held by the Library. These include plays and unpublished manuscripts; music hall and pantomime material; posters, playbills and programmes; reviews and news cuttings; theatre company archives; and material from the Edinburgh Fringe Festival. The general public are able (and encouraged) to view these items at the Special Collections Reading Room in the library's main building, a space where people can consult rare books, manuscripts, and music. Theatre of the 20th century is also well represented on film and can be viewed by the public at the library's Moving Image Archive.
 The Cheviot, the Stag, and the Black, Black Oil is a Scottish play by playwright John McGrath. The play tells the history of economic change and exploitation in the Scottish Highlands, from the Highland Clearances all the way through to the contemporary oil boom at the time of its initial production. The stage set for the play, designed and painted by Scottish artist John Byrne, was made in 1973 and is in the form of a giant-sized pop-up book. The Library acquired the set in 2009, although it is currently on loan to V&A Dundee and is on display at the museum until 2043 as part of a 25-year loan agreement with the NLS.
 Measuring over 4 metres in length when opened and over 2 metres tall, the Cheviot set is the largest book at the National Library of Scotland. It consists of 5 different scenes painted by Byrne, including: a Highland landscape, a croft house, a poppy-covered war memorial, and a Native American Tipi. The physical set is made from cardboard, however it has been digitised in 3D by the NLS, meaning it can be viewed online via the Cheviot 3D section on the NLS website while it is on loan.
 The library holds various items of early modern and restoration English drama, mainly within the Bute Collection. Notable items that can be found here include early editions of William Shakespeare's plays, namely A Midsummer Night's Dream, The Taming of the Shrew, Hamlet, and Othello. The Bute Collection hosts other Elizabethan, Jacobean and Caroline dramatists as well, namely George Chapman, Thomas Dekker (including an intact copy of the Converted Curtezan of 1604), John Lyly, Philip Massinger, Thomas Middleton, and John Webster.
 Although Scotland's first public theatre did not open until 1736, plays were performed at alternative venues like schools, courts, and local festivals. The collections at the National Library of Scotland include early editions several Scottish plays, printed before 1736, that would have been performed like this.
 Also held at the NLS are a small number of early editions of The Gentle Shepherd (1725) by Scottish poet Allan Ramsay which was turned into a ballad opera and became a favourite of the Scottish stage.
 There is a large collection of Edinburgh Theatre Royal playbills at the library, advertising performances and events from 1807 to 1851. The library also holds a few texts of stage adaptations of the novels of Sir Walter Scott. As well as this, the NLS has books from the lawyer and author Sir Theodore Martin, which mainly relate to his wife, actress Helena Faucit.
 The Weir Collection is one of the biggest resources at the National Library of Scotland for 19th century materials related to the theatre. The collection is an Archive of over 500 19th-century playbills, posters, programmes, photographs and newspaper cuttings, presented to the library in 1970 by Kathleen Weir, who inherited them from her father, James J. Weir. One of the earliest playbills in the collection advertises a performance of Rob Roy on 11 March 1829 with Charles Mackay playing Bailie Nicol Jarvie. Particularly attractive are the examples of the pictorial posters of the later part of the 19th century, featuring scenes from plays or portraits of the leading actors and actresses.
 The NLS has obtained three substantial collections which make it an important hub for the study of mountains, mountaineering, and the polar regions. Climbing is the central focus of the library's mountaineering collections, though materials related to ecology, hillwalking, mountains in art and literature, and geology also make up a large part of them. The Alps and the Himalayas receive the most coverage throughout the collections, and the discovery and exploration of the Arctic and Antarctica are heavily featured also.
 The Graham Brown collection was acquired by the library in 1961 via the bequest of physiologist Professor Thomas Graham Brown. There are over 20,000 items within the collection, including written works related to the history of Alpine climbing, books on Arctic exploration, mountaineering journals, over 250 press cuttings, postcards, manuscripts, and photographs. Much of the material within the collection is personal; there are Brown's climbing diary notebooks, papers related to his time as an editor of the Alpine Journal, correspondence, and his book The First Ascent of Mont Blanc (1957). The Graham Brown Collection also contains a large number of 19th and 20th century maps, many of them Swiss, French, and Italian – the earliest of these is a 1783 map of the Kingdom of Sardinia. Additions to the collection continue on an ad hoc basis. 
 The Graham Brown Research Fellowship was initiated in 2018 and supports a three-month period of research for fellows to explore any aspect of mountaineering, including literature, history, and environment. The first National Library of Scotland Graham Brown Research Fellow was Alex Boyd FRSA, an artist, photographer, and curator. He focussed on the cultural and literary significance of mountains in Scotland.
 The Lloyd Archive consists primarily of books and journals on the Alps and was bequeathed by former Vice-President of the Alpine Club, Robert Wylie Lloyd. Lloyd was interested in entomology and collecting art. There are roughly 2000 items in the collection and many of them in English, although there are 300 in French, over 100 in German, 20 in Italian, and some works in Latin. Books in the collection that were published before the middle of the 1700s are concerned with the history and topography of Switzerland, whilst the works from later in the century are more related to the natural history, geography and geology of the country. Also included within the Lloyd collection are guidebooks on Switzerland and illustrated journals of Alpine tours.
 The Wordie collection consists of works on Arctic and Antarctic exploration and was formed by Sir James Mann Wordie, a British explorer and scholar. The library obtained the collection in 1959, containing nearly 5000 items including books, journals, pamphlets, maps, and correspondence. The collection includes not only technical reports of scientific expeditions, and the results of polar research, but also popular accounts of travel and exploration, whale-fishing and folklore. The oldest item in the collection is the second edition of Purchas his Pilgrimage (1614).
 The National Library of Scotland has an extensive collection of official material as a result of the 1710 Copyright Act and also because of the library's status the library of the Faculty of Advocates. The official publications at the library consist largely of documents relating to Westminster Parliament and other UK government bodies, like the Scottish Parliament, though the NLS does also receive materials from overseas, including the United States and the Commonwealth. The India Papers are a prime example of a substantial collection of official publications.
 The Library holds various documents and publications relating to Scottish Parliament including the proceedings from the first surviving Act of Parliament in 1235. All Acts of Parliament are deposited at the Library as a result of the 1925 National Library of Scotland Act, and the public may consult the material in the reading rooms at the library's main building. Also held at the library are various business publications of Scottish Parliament, available in print to consult physically at the library are those dated up to September 2015. Publications dated after September 2015 can be viewed digitally.
 The Library holds a comprehensive collection of the publications of the UK Parliament from the 19th century to the present day. The Library holds copies of the House of Lords Journal, which dates from 1509 to the present day and is the Library's oldest currently published periodical. The journal records the proceedings of the House of Lords. The Library, in partnership with ProQuest and the House of Lords digitised 3,000 volumes of material related to the House of Lords.
 From 1950 to 1994, the Library received, under an exchange arrangement with the Library of Congress, a collection of US federal government information. Over that period the Library received approximately 10% of the United States monthly output of official publications. The collection has not yet been completed, and much if it is uncatalogued.[citation needed]