Max Beerbohm devoted an essay in his And Even Now (coll 1921) to "Books Within Books", those fascinating volumes that exist only as titles and perhaps brief extracts within stories. Fantasy contains many – in Peter Greenaway's movie Prospero's Books (1991) they even become a more central "character" than Prospero himself.
James Branch Cabell presents, in Beyond Life (1919), a whole Library of such books (e.g., The Complete Works of David Copperfield), of real authors' unwritten projects (e.g., Milton's verse King Arthur) and of actual books not as published but as their writers intended them. Neil Gaiman's Dream library in Sandman #22 (1990) pays skewed homage to Cabell's notion with such imagined volumes as The Man who Was October by G K Chesterton. Nelson S Bond's "The Bookshop" (1941) presents the bibliophile's dream: a magic Shop full of fictional books. Nonexistent works of real authors are a frequent fictional McGuffin: Umberto Eco's The Name of the Rose (1980; trans 1983) uses the lost second book of Aristotle's Poetics in this way, and rediscovered Shakespeare manuscripts often feature in crime fiction – as do lost gospels, especially ones written by Judas (confusingly, The Judas Testament  by Daniel Easterman concerns the discovery of a manuscript written by Christ); or even the entire Bible, the intolerable "true" version of which is unearthed in Edward Whittemore's Sinai Tapestry (1979). In O 31!o! Peregrino ["The 31st Pilgrim"] (1993), Rubens Teixeira Scavone (1925-2007) supplies an "undiscovered" tale from Chaucer's Canterbury Tales.
Books naturally play a considerable role in fantasy as grimoires, but they sometimes function as magical devices in their own right. Books which exert a subtly malign influence over their readers are fairly common, the most famous being the verse playscript which gives Robert W Chambers's The King in Yellow (coll 1895) its title; it reappears in more elaborate form in "More Light" (1970) by James Blish, whose Black Easter (1968) discusses "real" grimoires and also features the adept Theron Ware's grim volume of diabolic Pacts. (Blish had earlier produced a neatly recomplicated version of the oft-told story of the book of biographies which absorbs its reader in "The Book of Your Life" , and Jonathan Carroll later employed a wholesale variant of the same theme in The Land of Laughs .) Other examples include Tod Robbins's "For Art's Sake" (1920; exp as The Master of Murder 1933), Margaret Irwin's "The Book" (1935) and Stephen Vincent Benét's "The Minister's Books" (1942). Chambers's stories helped to inspire H P Lovecraft to create the Necronomicon, which in turn inspired the members of his circle to create a series of similarly sinister tomes, various Cthulhu Mythos "titles" including the Book of Eibon, Unaussprechlichen Kulten by "von Junzt", Cultes des Goules by "the Comte d'Erlette", De Vermis Mysteriis by "Ludvig Prinn", the Pnakotic Manuscripts ... A late invention in this line plays a leading role in Fritz Leiber's Our Lady of Darkness (1977). A Vampire book is featured in Michael Harrison's "Where Thy Heart Is" (1926). Multi-volume sets lend themselves to Plot-Coupon accumulation, as in Kenneth Bulmer's Kandar (1969), where the fictional Thaumalogicon, Ochre Scroll and Umbre Testament each hold one-third of a vital spell. An endearingly polyphonic library of magical books plays a significant role in several of Terry Pratchett's Discworld novels: his Necrotelecomnicon or Liber Paginarum Fulvarum gestures to both H P Lovecraft and to the Yellow Pages. Benign books which enhance their reader's lives are much rarer; the one in Henry Kuttner's "Compliments of the Author" (1942) flatters only to deceive; and the volumes featured in Michael Kandel's In Between Dragons (1990) also have their problematic aspects.
In fantasy, opening a book may lead to unusual experiences. George MacDonald's Phantastes (1858) has books that project one's viewpoint into the story; The Book of Gramarye in Susan Cooper's The Dark is Rising (1973) similarly offers engulfing multimedia tuition; the book within Michael Ende's The Neverending Story (1979) is additionally a Portal into the land of Fantastica which it describes. In John Grant's "Banedon's Telling" (in The Tellings * coll 1993) the protagonist reads a book that narrates the adventures he is currently, somewhere else, undergoing. Similarly, the real book and the imagined eponymous book within the real book interact upon protagonists in Charles de Lint's The Little Country (1991); in Darrell Schweitzer's The Mask of the Sorcerer (1995), the fictional memoirs of Tannivar the Parricide shape the protagonist's life; in William Browning Spencer's Résumé With Monsters (1995) the protagonist has written a Lovecraftian book called The Despicable Quest, and in his Zod Wallop (1995) the eponymous children's story designates the nature of various characters' experiences, shaping the outcome of the book for good or for ill, depending upon which draft of the original tale is dominant. The eponymous volume of Jorge Luis Borges's "The Book of Sand" has infinitely many pages, so the chance of finding a given passage twice is infinitesimal. In The Addams Family (1991) books can behave like their titles, so that, say, opening a copy of Gone With the Wind (1936) brings a gale into the room.
Not all books are books. The calling-charm to ensnare an intelligent child in Diana Wynne Jones's The Magicians of Caprona (1980) manifests as a hypnotically readable book; a mysteriously missing corpse in Piers Anthony's Xanth sequence proves to have been topologically metamorphosed (> Metamorphoses) into book shape as The Skeleton in the Closet; one nameless pseudo-book in Gene Wolfe's The Book of the New Sun (1980-1983) holds an angelic image of such power that its observer literally sweats blood (> Face of Glory).
Books of record, often immutable, are frequently encountered: the book of Judgement, of Fate, of Destiny (e.g., in Gaiman's Sandman), or of the Norns (> Fates) – subject to a Quibble in Cabell's The Music from Behind the Moon (1926) where, although no one "may alter any word", the hero rewrites history by inserting a decimal point. Lloyd Alexander's Book of Three foretells the future, which by the end of his Prydain series has become history: the series itself. Death's biographies in Pratchett's Discworld continuously write themselves to record every person's own story.
Closely related are holy books and books of Prophecy, regarded by believers as containing absolute truths which may be cryptically phrased (like the prophecies of Nostradamus). One such, to be studied only after ritual purification, hints at the way to William Morris's eponymous The Well at the World's End (1896); more profane is the infallible The Nice and Accurate Prophecies of Agnes Nutter, Witch in Good Omens (1990) by Neil Gaiman and Terry Pratchett.
Fictional-historical sourcebooks are endemic: thus Cabell grounds Jurgen (1919) in the invented medieval epic cycle La Haulte Histoire de Jurgen. J R R Tolkien's The Lord of the Rings (1954-1955) purports to be based on The Red Book of Westmarch, a personal record by its characters Bilbo and Frodo Baggins. William Goldman's The Princess Bride (1973) purports to abridge a book called The Princess Bride by S Morgenstern, a similarly shortened form of which was ostensibly read aloud to Goldman as a child. Such books may recount the basic Story that the narrative (and its protagonists) are in the process of uncovering; a fictional book is in this sense a natural device in many fantasy tales, where the act of Recognition of that which has been lost (and is now found) is so central: The Book of True and Cruel is periodically examined by protagonists of Tom de Haven's Chronicles of the King's Tramp sequence (1990-1992), and tells them the meaning of the events that are unfolding around them.
Works of fictional authors may significantly reflect or interact with their surrounding narratives. The character Sister Theodora, writing the book which is Italo Calvino's The Non-Existent Knight (1959; trans 1962), finally reveals herself to be the Amazon knight Bradamante (> Edmund Spenser) from the story she tells. In Flann O'Brien's The Third Policeman (1967) the eccentric natural philosopher De Selby – who never appears – dominates much of the text via footnotes, quotations and his role as the narrator's Maggot; Vladimir Nabokov used a similar device in Pale Fire (1962). Other examples are: the shockingly deceptive diary in Christopher Priest's The Affirmation (1981); The Book of the Wonders of Urth and Sky in Gene Wolfe's The Book of the New Sun (1980-1983), providing inset stories which highlight the remoteness of this Far Future by showing the absorption of such fictions as Rudyard Kipling's Mowgli into anonymous, syncretic myths; and Fellowes Kraft's historical fantasy about Giordano Bruno (1548-1600), which complexly nests within or contains John Crowley's Aegypt (1987)
Books, at least in writers' minds, are all too natural a subject for books. [DRL/BS/JC]