When Ernest Shackleton delivers his crew safely home after over 600 days of brutal, bare survival in 1916, his bravery and leadership passed into legend. But how did Shackleton sustain himself mentally throughout the ill-fated polar expedition that almost killed him and his entire crew? Perhaps he took inspiration from the books he brought along with him on the Endurance. Historians have never known exactly which books gave him sustenance on his journey—until now.

A newly digitized image in the collection of the Royal Geographical Society has revealed a list of many of the books in Shackleton’s library, the BBC’s Paul Kerley reports. The photograph of his cabin was taken in March 1915 by Frank Hurley, whose photos of the Endurance were recently restored and digitized. In the past, the print of the photos was so blurry that only the title of the Encyclopaedia Britannica could be read.

Now that the image has been digitized, historians have been able to gather a much more detailed view of Shackleton’s personal library, which he freely lent to members of the Endurance. The Royal Geographical Society’s Scott Edwards tells Smithsonian.com in an email that though the majority of the books would have been lost with the ship, the explorer encouraged his men to take some of them with them to keep them entertained and mentally active after they abandoned ship.

“It’s incredibly exciting that we now know the books Shackleton kept in his cabin, where he would have spent months while the Endurance was trapped in the ice of the Weddell Sea before it finally sank,” says Edwards. The image also reveals a framed photograph of Rudyard Kipling’s poem “If,” which Shackleton took with him when the ship sank.

So what was on Shackleton’s bookshelf? It turns out the explorer had varied tastes. Not only did he bring a number of reference books—from dictionaries to grammar guides—but he brought popular fiction and classic novels and poems, too. Particularly poignant are the library’s collection of books about exploration such as Journal of HMS Enterprise, which details a failed rescue mission in search of the lost Franklin expedition in the Arctic in the 1840s.

Be sure to click through to the BBC article for a complete list of the library’s contents. Perhaps passages like these—all of which can be found in books from Shackleton’s library—kept him going throughout those grueling, freezing and hopeless months:

"The mystery of human existence lies not in just staying alive, but in finding something to live for." - Fyodor Dostoyevsky, The Brothers Karamazov

"If winter comes, can spring be far behind?" - Percy Bysshe Shelley, “Ode to the West Wind”

"Yes...it's over…but it has just begun, too. Can I keep this up? Can I keep this up? My voice sounds natural. I'm not trembling. How can I be like this? It's because I'm desperate. Yes..it's desperation that makes me able to be like this. ... I'm fighting for more than life." - Amélie Rives, Worlds-End

"We all knew that we were going to have a rough time of it, but the splendid relations which had always existed between us so strongly united us that…we were not easily discouraged." - Roald Amundsen, The North West Passage

Editor's Note, February 26, 2016: This post has been updated.