There are a few works of fiction that actually star another work, often eponymously titled the same as that inner work. I don’t mean something like Lovecraft’s stories, in which the Necronomicon appears more as a prop or sidebar to the main story, nor The Maltese Falcon, in which the Black Bird (a work of art, of course) is pretty much a MacGuffin, but those where the entire plot is based on the existence and properties of the inner work.
I’ve only got three:
The King In Yellow (1895) by Robert W. Chambers is a collection of stories about a play that will drive you mad or otherwise curse you if you read it to the end.
The Singing Detective (1986) by Dennis Potter is a BBC miniseries about … Well, the protagonist wrote a pulp novel of the same title and has been working on a screenplay, and we get parts of the story through scenes from those, as well as his childhood memories, dreams and hallucinations. (Great stuff! Get this now!)
The Princess Bride by William Goldman is a “good parts version” of “S. Morgenstern’s Classic Tale of True Love and High Adventure,” according to the Amazon review. Goldman frames that in a story of his father reading it to him and abridging it on the fly. (I’ve seen the movie long ago, but not read the book, which Zyada says is much darker in tone.
Can anyone suggest other works like these?