(written from a Production point of view)
The following are Star Trek parodies and references in literature and comics.
3001: The Final Odyssey
In the fourth (and final) part of Arthur C. Clarke's Space Odyssey saga, Dr. Frank Poole (played by Gary Lockwood in the film version of 2001: A Space Odyssey) is revealed to be a Star Trek fan, asking autographs from Leonard Nimoy and Patrick Stewart as a teenager. When choosing 20th century television programs for him, 31st century scientists selected episodes from "all the four Star Trek series" (the novel was published in 1997, long before the debut of Star Trek: Enterprise).
Angels & Demons
In Dan Brown's predecessor to The Da Vinci Code, Robert Langdon comments that he has "sort of" heard of antimatter, to which Vitoria Vetra responds, "you watch Star Trek?" Langdon agrees and asks "isn't antimatter what powers the starship Enterprise?" Langdon later holds back from asking about "Captain Kirk using Photon torpedoes against the Klingons."
The sci-fi children's book series Animorphs features many references from Star Trek, like a character called the Ellimist, who is based off Q and the novel Flatland, an alien race called the Hawjabrans, who have freighters that look a little like the USS Enterprise-D, and the females of an alien race called the Ongachic, who look like Worf.
Some of the gang frequently played Star Trek: The Original Series, with Cutter John as James T. Kirk, Opus (and Steve Dallas briefly) as Spock, Portnoy as Montgomery Scott, and Hodge-Podge as Hikaru Sulu.
Over the years, DC comics artist have included multiple visual homages to Star Trek in their art. In the 1970s, one member of the Green Lantern Corps was recognizable as being a Vulcan.  In the 1990s, backgrounds in both "Legion of Super Heroes" and "Legionnaires" included recognizably Star Trek-inspired ships.
The Dresden Files
The Donald Duck story "Beam Me Up, Mr. Fargone" (D 97619), written by Kari Korhonen and drawn by Vicar) is a spoof of Star Trek, particularly the fandom, conventions and merchandise. The story is set in a science fiction convention. Some of the items sold at the convention include a wooden log labeled "Captain's Log" and a Vulcan ear labeled "Final Front Ear". The creator of the series lives in seclusion, and in a video shown in the convention, tells the interviewers to get a life.
Flow My Tears, the Policeman Said
The comic Foxtrot has made fun of Star Trek numerous times and the youngest member of the family, Jason, is an avid Trek fan.
General Protection Fault (GPF)
A web comic that pocks fun at the comic industry, Gutters has made a joke or two based on the Star Trek line of comics:
The Hardy Boys
Star Trek has been referenced numerous times in The Hardy Boys novel series, published by Simon & Schuster, the company behind the Star Trek novels. Most recently in The Hardy Boys Undercover Brothers #25 Double Trouble, where Joe Hardy sarcastically compares his older brother, Frank, to "Mr. Spock", and most notable in The Hardy Boys #172 Trouble in Warp Space, in which the Joe's girlfriend gets a walk-on part in a new TV series called Warp Space, an obvious reference to Star Trek: Enterprise.
The Hitchhiker's Guide to Star Trek, the Next Generation
The Hitchhiker's Guide to Star Trek, the Next Generation is an Internet cross of Star Trek and The Hitchhiker's Guide to the Galaxy. It was written by David T. Lu and Mickey McCarter. An HTML version of it was made available in 2011.
The House of Night (Marked)
Zoey, one of the main characters, admits to being a Star Trek fan, and had a Borg Invasion 4D hoodie.
I Love You, Beth Cooper
The webcomic Jump Leads has referenced Star Trek several times, from mention of a hypothetical "goatee-toutin' doppelgänger" in the first issue, "Training Day", to characters and locations named after actors involved with the production of the various shows, right up to the tenth issue, entitled "The Voyage Home", which features cover art that pays homage to the poster for the movie.
The Jungle: A Novel of the Oregon Files
MacD says that the Oregon's op center is reminiscent of the Enterprise and that Juan's chair in the middle of it is where Chris Pine sat, prompting Juan to realize he was too out-of-touch to know there'd been a new Trek movie.
The now-defunct Hungarian version of Mad Magazine featured a three-issue parody of Star Trek: The Next Generation, entitled Star Tok, in 1999. 
Least I Could Do
The web comic "Least I Could Do" makes various references to Star Trek, and all other manner of science fiction, throughout the series. These can be seen at their website or in the book collections.
- Make It Not
- Make It So
- Friendly Angel, Come to Me
- He's So... Human
- Gorn Injuries
- Picard Manouever
- Are Tribbles the same as Furries?
- Fruits or Vegetables
- Tears of a Rayne
- Make it so!
- Man the catapults!
- Imzadi Night Stand
- Make it so!!!
- This means something. This is important.
- Beeee goooood
- Give me tactical!
- I though we were sparring
Mad Magazine (#115, December 1967) had a parody of Star Trek called "Star Blecch!".  The title alteration followed two parodies of the films and spin-off series.  The October 1976 issue (#186) featured a musical parody called "Keep On Trekkin'", with Kirk, Spock and Alfred E. Neuman dancing on the cover ; thirty-five years later, in June 2011 (#509), that image would appear at the end of Dancing With The Star Wars (a Dancing with the Stars satire using Star Wars characters) advertising a similar Trek treatment the next week - but Kirk and Spock now have the faces of Chris Pine and Zachary Quinto, to which a senile-looking William Shatner, sitting in a motorized scooter onstage, takes great offense. Kirk appeared again, "green woman" in tow, in the very next issue (#510), one of many well-known "captains" (including Morgan, Sparrow, Kangaroo, Sullenberger and Ahab) to whom upcoming film subject Captain America is compared unfavorably; the character's likeness is once again that of TOS-era Shatner. The magazine will frequently insert Trek references into stories with Trek actors: for example, the beginning of the Samantha Who? parody in the May 2008 issue showed Tim Russ's character with Vulcan ears and a Starfleet combadge on his jacket (a later scene showed two Trekkies ogling the main character, played by Christina Applegate), while in a June 2003 parody of the X-Men film X2, Professor X (Patrick Stewart), asked how he could stand to be around so many "mutants", replies that, after enough Star Trek conventions, it was easy - or other science-fiction franchises: Worf, Quark, Odo and Morn could be seen in the background in various parts of a May 1995 X-Files parody, while the beginning of an April 1998 spoof of Alien Resurrection showed a group of famous sci-fi aliens concealed in pods behind the main characters: one of them is Spock, clearly looking in the direction of his mother. Mad has recognized Trek's contributions - on the cover of the November 2002 issue, celebrating the magazine's 50th Anniversary, the fifty different images used to create "5" and "0" include Alfred E. Neuman as a Vulcan (from the "Keep On Trekkin'" cover) and a Ferengi.
In the late 1970s and early 1980s, Marvel included Star Trek-inspired characters and artwork depicting members of the Shi Ar Empire, most notably "Captain K'rrk", commander of a multi-species crewed Shi Ar vessel. Their uniforms were depicted in the Trek service division (Command, Science, Operations)colors, using the original lime/olive green for Command. K'rrk, like his Trek inspiration, was promoted to admiral later in his career.
In the late 90s-early 2000s, another Shi Ar Captain was introduced as Captain P'crrd. In keeping with his namesake, he was bald.
After their introduction to the Shi Ar, the X-Men incorporated "hard light" technology into their Danger Room training environment, rendering it functionally equivalent to a holodeck.
The Megatokyo comic 1337 has a reference to redshirts.
My Little Pony: Friendship is Magic (IDW Comics)
In Issue #2, Pinkie Pie finds a pony skull in the Appleloosan Mountains and it names it "Mr. Bones", due to the skull having Leonard McCoy's hair style.
Night of the Living Trekkies
Omicron Ceti III
The satirical newspaper The Onion frequently makes references to Star Trek. One of its recurring columnists, an obnoxious sci-fi fan named Larry Groznic, sometimes mentions the franchise - in addition to occasionally mentioning meetings with Trek actors such as John de Lancie and Marc Alaimo , he boasts in the October 15, 2001 issue of writing a crossover with Back to the Future in which Doc and Marty secretly assist Kirk and Spock in Star Trek IV: The Voyage Home  (evidently forgetting the resemblance Doc bears to someone of Kirk's acquaintance), while in the April 10, 2003 issue, in harshly criticizing someone for his decision not to learn Elvish, he wonders if that person would even bother to learn a language as simple and inelegant as Klingonese . The paper has also made light of Barack Obama's well-known status as a Trek fan - three weeks after the release of Star Trek (a video on its website showed a faux newscast  in which numerous Trekkies leave the theater with harsh words for the "fun, watchable" film) the front page of the May 26, 2009 issue included a picture  of Obama giving a press conference with fake Vulcan ears, with "Obama Addresses Nation Still Wearing Spock Ears" in a caption below, while in the December 9, 2009 issue, amid the uproar following the uninvited presence of a Virginia couple's at a state dinner, an "infographic"  revealed numerous other White House security breaches, including the accessing of sensitive information by thousands of people; this was blamed on the fact that Obama's passowrd, "NCC-1701", was not a terribly difficult one to crack.
The web comic Penny Arcade make various references to Star Trek throughout the series. These can be seen at their website, or in their book collections.
In the second chapter of the manga The Electric Tale of Pikachu, a loose adaptation of the animated series, Ash mentions that his Pikachu's name is "Jean-Luc Pikachu". Pikachu is also seen to be wearing a Starfleet combadge in the panel in question.
The web comic Player vs. Player make various references to Star Trek, most notably Star Trek: The Original Series, throughout the series. These can be seen at their website, or in their book collections, of which book five is titled "Treks On".
Ensign Andrew Dahl has just been assigned to the Universal Union Capital Ship Intrepid, flagship of the Universal Union since the year 2456. It's a prestige posting, and Andrew is thrilled all the more to be assigned to the ship's Xenobiology laboratory. Life couldn't be better...until Andrew begins to pick up on the fact that (1) every Away Mission involves some kind of lethal confrontation with alien forces, (2) the ship's captain, its chief science officer, and the handsome Lieutenant Kerensky always survive these confrontations, and (3) at least one low-ranked crew member is, sadly, always killed. Not surprisingly, a great deal of energy belowdecks is expended on avoiding, at all costs, being assigned to an Away Mission. Then Andrew stumbles on information that completely transforms his and his colleagues' understanding of what the starship Intrepid really is...and offers them a crazy, high-risk chance to save their own lives.
Serge A. Storms novels of Tim Dorsey
The Big Bamboo
When Elves Attack
Sev Trek by John Cook, is a web comic parody of Star Trek (as well as many other popular sci-fi shows) from The Original Series to Enterprise. It even spawned a computer animated "episode" of Sev Trek: TNG.
Shatnerquake is a novel by noted bizarro fiction author Jeff Burk. The story involves actor William Shatner being trapped at a convention at which he is forced into mortal combat against all the characters he has ever played, including multiple versions of James T. Kirk.
Sonic the Hedgehog Comic Book Series
In the Knuckles the Echidna and Sonic the Hedgehog comic book series' produced by Archie Comics, the Echidna character Moonwatcher can be seen wearing a uniform that closely resembles the operations division TNG Starfleet uniforms. Furthermore, with the VISOR-like device over his eyes, he is quite similar in appearance to Geordi La Forge.
The pre-refit USS Enterprise also made a cameo appearance in the (non-canon) Star Wars comic A Death Star is Born. Also, in the comic book adaptation for the Star Wars novel "Dark Force Rising," a boy on the planet Jomark can be seen holding a model of the Enterprise (Kirk, Spock, and McCoy are also in the frame).
A series of sci-fi novels by David Gerrold about a hard-luck starship in the middle of an interstellar war also intended to be a TV series at one point.
The Middle of Nowhere
Blood and Fire
A reworking of a Star Trek: The Next Generation episode rejected due to overarching homosexual thematics and an AIDS metaphor.
The new captain of the Star Wolf is said to have been previously posted on "The Big E," which is also said can't be risked on the front lines due to potential loss of morale if she's destroyed. A dead crewmember found on the Norway is named "M. Okuda."
Star Wreck: The Generation Gap
This mass-market paperback was first released in 1990. It is a tongue-in-cheek parody of the Trek universe, written by Wisconsin native Leah Rewolinski, with illustrations by Harry Trumbore. Six sequels followed. The books mainly center upon spoofs of the TOS and TNG series, with books six and seven spoofing DS9 as well.
The seven released titles in the series were:
- Star Wreck: The Generation Gap (1990)
- Star Wreck II: The Attack of the Jargonites (1992)
- Star Wreck III: Time Warped: A Parody - Then, Now and Forever (1992)
- Star Wreck IV: Live Long and Profit : A Collection of Cosmic Capers (1993)
- Star Wreck V: The Undiscovered Nursing Home (1993)
- Star Wreck 6: Geek Space Nine (1994)
- Star Wreck 7: Space the Fido Frontier (1994)
- Not to be confused with the Star Wreck series of fan films which culminated in Star Wreck: In The Pirkinning.
In the first issue of this comic book, a few visual references to Star Trek are made. A computer displays a LCARS interface, and later the uniforms of the Techo-pre-school have a remarkable resemblence to original series uniforms.
The War Against The Chtorr
A Day For Damnation
The webcomic xkcd uses references to Star Trek.
Y The Last Man
In issue #27, Yorick and Agent 355 walk in the street of San Francisco. Yorick comments that the city doesn't completely suck and says that it's no wonder that the Federation of Planets choose it as its HQ location. Agent 355 doesn't understand his comment, and thinks that it's a Star Wars reference.
The September 28, 2011, edition of the Ziggy comic strip involves a transporter mishap, with a request to Scotty for assistance being heard coming from Ziggy's toilet.