Author surrogate

As a literary technique, an author surrogate is a fictional character based on the author. The author surrogate may be disguised, with a different name, or the author surrogate may be quite close to the author, with the same name. Some authors use author surrogates to express philosophical or political views in the narrative. Authors may also insert themselves under their own name into their works for humorous or surrealistic effect.
Usage.
Fiction.
Frequently, the author surrogate is the same as the main character and/or the protagonist, and is also often the narrator. As an example, the author surrogate may be the one who delivers political diatribe, expressing the author's beliefs, or expound on the strengths and weaknesses of other characters, thereby communicating directly the author's opinion on the characters in question. 
Philosophers and writers may use author-surrogates to express their personal positions, especially if these are unpopular or run counter to established views. 
British writer David Hume used the author-surrogate 'Philo' in the "Dialogues Concerning Natural Religion". Philonous was the author-surrogate of the Irish philosopher George Berkeley in his work "Three Dialogues between Hylas and Philonous". Novelist Michael Crichton used his character Ian Malcolm to express views on catastrophic system failure in his novel "Jurassic Park". Perhaps the best-known philosophical author-surrogate is Socrates in the writings of Plato. 
A surrogate's life may be very similar to that of the author. Like his creator, Peter Marlowe—a character in James Clavell's novels—wrote about his experience as a prisoner of war with the Japanese during World War II, became a Hollywood writer, and visited Hong Kong to research a book on its trading companies. 
Most stories have an author surrogate, insofar as the author is usually capable of pointing to one character (major or minor) whom he or she identifies with to a much greater degree than any other character. This can take the form of a realistic depiction of the author (Benjamin in "Animal Farm"), or a negative (Woody Allen in many of his films) or positive depiction of the author. 
Steve Gerber depicted himself saving the universe in his final issue of "Man-Thing" for Marvel Comics, and Chris Claremont did the same, while Gerber's act was passive and Claremont's had him merge briefly with the title character. In both cases, the authors had other characters that were more traditional author surrogates, Richard Rory and Jonh Daltry. 
In "Animal Man", Grant Morrison appears as the author who controls the title character's actions. For example, he tells Buddy Baker that the next writer could have him eating meat (which in fact did happen, in a bizarre set of circumstances), and Buddy says, "But I don't eat meat," to which Morrison retorts, "No, I don't eat meat."
Colombian author and Nobel laureate Gabriel García Márquez appears near the end of his own book, "One Hundred Years of Solitude" as a minor character in the novel.
Fan fiction.
Fan fiction critics have evolved the term Mary Sue to refer to an idealized author surrogate. The term 'Mary Sue' is thought to evoke the cliché of an author who uses writing as a vehicle for the indulgence of self-idealization, to create a character that is so competent or perfect that it lacks verisimilitude. For male author surrogates, similar names such as 'Marty Stu' or 'Gary Stu' are occasionally used.
Other uses.
The expression has also been used in a different sense, meaning the "principal author" of a multi-author document.