Metafiction, also known as romantic irony in the context of Romantic works of literature, uses self-reference to draw attention to itself as a work of art, while exposing the "truth" of a story. "Metafiction" is the literary term describing fictional writing that self-consciously and systematically draws attention to its status as an artifact in posing questions about the relationship between fiction and reality, usually using irony and self-reflection. It can be compared to presentational theatre, which does not let the audience forget it is viewing a play; metafiction does not let the reader forget he or she is reading a fictional work.
It can be used in multiple ways within one work. For example, novelist Tim O'Brien, a Vietnam War veteran, writes in his short story collection The Things They Carried about a character named "Tim O'Brien" and his war experiences in Vietnam. Tim O'Brien, as the narrator, comments on the fictionality of some of the war stories, commenting on the "truth" behind the story, though all of it is characterized as fiction. In the story chapter How to Tell a True War Story, O'Brien comments on the difficulty of capturing the truth while telling a war story. In Stephen King's The Dark Tower series, King himself appears as a pivotal character set with the task of writing The Dark Tower books so that the main characters can continue their quest. Other Stephen King books, and characters from them, are mentioned in the narrative. In an afterword to the series finale (The Dark Tower VII: The Dark Tower), King details why he chose to include himself in his novel. And in James Patterson's Alex Cross series, Along Came a Spider is both the book written by Patterson and a book written by Cross about the events depicted in the book.
One of the most sophisticated treatments of the concept of the novel in a novel occurs in Muriel Spark's debut novel, The Comforters. Spark imbues Caroline, her central character, with voices in her head which constitutes the narration Spark has just set down on the page. In the story Caroline is writing a critical work on the form of the novel when she begins to hear a tapping typewriter (accompanied by voices) through the wall of her house. The voices dictate a novel to her, in which she believes herself to be a character. The reader is thereby continually drawn to the narrative structure, which in turn is the story, i.e. a story about storytelling which itself disrupts the conventions of storytelling. At no point does Spark as author enter the narrative however, remaining omniscient throughout and adhering to the conventions of third-person narration.
According to Patricia Waugh "all fiction is . . . implicitly metafictional," since all works of literature are concerned with language and literature itself. Some elements of metafiction are similar to devices used in metafilm techniques.
Seinfeld uses this extensively in episodes revolving around the production of a show titled Jerry.
Screenwriter Charlie Kaufman often uses this narrative technique. In the film Adaptation., his character Charlie Kaufman (Nicolas Cage) tortuously attempts to write a screenplay adapted from the book The Orchid Thief, only to come to understand that such an adaptation is impossible. Many plot devices used throughout the film are uttered by Kaufman as he develops a screenplay, and the screenplay eventually results in Adaptation itself. In Kaufman's film Synecdoche, New York, stage director Caden Cotard (Philip Seymour Hoffman) endeavors to create a vast theatrical project about the world around him, with actors playing himself and everyone in his life. Thus the film Synecdoche, New York, a portrayal of the narrative of Caden's life, tells the story of a portrayal of the narrative of Caden's life.
Some episodes of the Star Trek series use the holodeck (or its Ferengi equivalent, a "holosuite") to tell a "story-within-a-story". The Deep Space Nine episode "Far Beyond the Stars" tells a similar story without such a high-tech plot device, as basically a work of metafiction, using the DS9 regular characters to tell a mid-20th century story, set in a science fiction publishing house in New York City. Similarly, the regular cast of Northern Exposure play other characters in two episodes set during the early days of the village of Cicely, the series' setting.
Characters in a film or a television series who mention and/or refer to the actors or actresses that portray themselves; e.g. Beatrice "Betty" Pengson from I Love Betty La Fea; Bea Alonzo, who played the role of the protagonist, also played herself as an Ecomoda model; coincidentally in the show, Betty wants to meet Bea Alonzo in person, an act of self-reference. In Ocean's Twelve, Tess, played by Julia Roberts, disguises herself to look like Julia Roberts. The other characters ironically recognize that she is in disguise. In Last Action Hero, the title character of the inner movie Jack Slater IV comes to the 'real' world and tells his portrayer, Arnold Schwarzenegger, "You've brought me nothing but pain." In His Girl Friday, the character Bruce Baldwin, played by Ralph Bellamy, is described as "[looking] like that actor, Ralph Bellamy." Additionally, Cary Grant's character, Walter Burns, responds to a comment with "the last man that said that to me was Archie Leach just a week before he cut his throat." Archibald "Archie" Leach is Cary Grant's given name.
The acclaimed TV sitcom Arrested Development is widely recognised as a seminal work of televised metafiction; not only is it framed like a reality television show, but it is also highly self-reflexive and intertextual. Some examples of the shows metafictional techniques are the ways that it alludes to its own struggle for ratings, to its competition with Sex and the City, and to the reduction of the second season from 22 to 18 episodes.
Rubber (2010) includes an audience with binoculars who watch the movie as a live performance. The sheriff character knows he is in a movie, and there is a monologue in the beginning about the way that many of the things that happen in films happen for "no reason", and this monologue states that the film will be a tribute to this "no reason". There is a subplot about the sheriff working with the audience's host to poison and kill them, and when he thinks the audience is dead he tries to convince the other characters in the movie that nothing is real and they can stop now.