(written from a Production point of view)
The following are Star Trek parodies and references in literature and comics.
3001: The Final Odyssey Edit
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, having asked 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).
The 4400 Edit
In The 4400 tie-in novel Wet Work by frequent Star Trek authors Dayton Ward and Kevin Dilmore, a character notes he is a fan of pulp-science fiction magazines like Incredible Tales of Scientific Wonder.
Angels & Demons Edit
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. Additionally, several of the characters in the series are fans of Star Trek and make comparative references, such as Dracon beams being comparable to phasers and the Andalite law of "Seerow's Kindness" as being a version of the Prime Directive.
The Beach Edit
An early chapter is called "It's life Jim, but not as we know it" (from the well-known parody song "Star Trekkin'"). It involves the narrator playing pretend that his train sleeping bunk is a spaceship while waiting for sleep, though no further specific references are made in the chapter.
Bloom County Edit
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.
Later in the book, Randy Waterhouse worriedly compares having explained the strategy of his dotcom bubble company to a person he perceived to be a hick to a Federation scientist beaming down to a primitive planet and thoughtlessly teaching the locals how to build a phaser cannon. It's also remarked that while Waterhouse hates Star Trek and also people who don't hate it, he has seen every episode.
DC Comics Edit
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.
Dilbert is a popular newspaper comic featuring an engineer called Dilbert and satirizing corporate and office culture. There is also an animated series, which also features a number of Star Trek references. (documented here)
The comic for August 19, 1993 has a mind-reading Dogbert discovering that all the company employees care for are romance, ski trips and Star Trek. 
The comic for December 13, 1993 has a customer asking if a product will be capable of detecting tachyon field emissions. Dilbert notes that he's confusing the company with Star Trek again, but when a salesperson promises to include it in the next update, Dilbert thinks "Beam me up, Spock, there's no life on this planet". 
The comic for July 25, 1994 has Dilbert remarking that it seems unnatural for him to have an actual girlfriend, because when the captain on Star Trek falls in love, the women always dies in an unlikely accident. 
The comic for March 3, 1996 has Dilbert interviewing a potential new employee. When she looks right through his attempt to portray company culture in a positive light, he panics, his inner thoughts being "My shields are down... a hull breach is imminent". Later Wally also independently identifies Dilbert's state as a hull breach. 
The comic for October 9, 1996 has Dilbert saying "Resistance if futile. You will be assimilated." 
The comic for January 15, 1997 sees Bill Gates' house coming to Dilbert's house yelling "prepare for assimilation" after he accidentally agrees to be Bill Gates' towel boy by not reading a software license. 
The comic for November 15, 1997 has Dogbert recalling a story in which Dilbert yelled "I'm an engineer, not a diamond cutter, dang it!". 
The comic for July 7, 2003 has Carol sarcastically responding to the request that she print out the company website and put it into a binder for easy reference that she will also translate it in Klingon to make it even easier. 
The comic for May 3, 2005 has a character asking Dilbert which of the Star Trek seasons he liked best. 
The comic for November 19, 2009 has Dilbert describing a consultant with pointed ears as a "Spock-eared sociopath". 
The comic for January 13, 2011 again mentions Dilbert and his college Alice being on the same pon farr cycle. 
The Dresden Files Edit
Donald Duck Edit
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.
Double Dexter by Jeff LindsayEdit
Flow My Tears, the Policeman Said Edit
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) Edit
The Girl who played with FireEdit
Lisbeth Salander is called mister Spock.
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 Edit
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 Edit
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)Edit
Zoey, one of the main characters, admits to being a Star Trek fan, and had a Borg Invasion 4D hoodie.
I Love You, Beth CooperEdit
Jump Leads Edit
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 Book of Bunny SuicidesEdit
This book is a collection of cartoons about suicidal rabbits, includes one cartoon in which a bunny places itself on a transporter next to what appears to be Kirk and Spock, but positions itself half inside and half outside the beam so that when the transporter energizes, only half of it is transported.
The Jungle: A Novel of the Oregon Files by Clive CusslerEdit
MacD says that the Oregon's op center is reminiscent of the Enterprise and that Juan's chair in the middle of it (which Juan referred to as the "Kirk Chair") 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 Killing StarEdit
In The Killing Star by Charles R. Pellegrino, the invaders use Star Trek as an example of why humans are dangerous (due to the show being human-centered).
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 Edit
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
Keith R.A. DeCandido authored one.
The Con Job by Matt ForbeckEdit
Hardison observes that concocting a sequel to Gavin Lee's book is as a much of a tease as the idea of new episodes of Mad Magazine (#115, Decem. At the end, he tells Parker that the place where the Star Trek: The Original Series cast had put their hands in the concrete of Grauman's Chinese Theater in Hollywood is sacred ground.
Mad Magazine Edit
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.
Marvel Comics Edit
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) Edit
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.
In Issue #9, Princess Luna's shapeshifting t-shirt gains an Starfleet emblem during the race event with Big Macintosh.
In Issue #10, there are some ponies that resemble James T. Kirk and Spock, a gray pony that resembles Bilar tells them, "Joy to you friends! Come for the festival are ya?"; this is a reference to the episode "The Return of the Archons".
In Issue #11, in the basement were Shining Armor plays a game similar to Dungeons & Dragons with his friends, there is a poster that has a Constitution-class refit, possible the USS Enterprise and the title is "Star Trot II", an obviously reference to Star Trek II: The Wrath of Khan.
In Issue # 16, Rainbow Dash's imagination drops them straight onto the pony version of Star Trek: The Original Series. Naturally, she's Kirk, Twilight Sparkle is Spock, and Rarity is Uhura. There's also a pony version of Yeoman Rand in the background of one shot.
In Issue # 25, when Rainbow Dash asks Twilight Sparkle why Spike isn't carrying Rarity's bags, she tells her that he is currently at a Pony Trek convention.
In the Micro-Series #10, there are several references in the next order: Princess Luna's pet opossum is named Tiberius, a possible reference to James T. Kirk, during the conference, an Earth pony has a cutie mark with the Starfleet emblem, and at the fair page, there is an airship with the number "1701", referencing the registry number of the USS Enterprise.
In Friends Forever Issue #2, among the various scenarios that Discord puts the CMC through includes a full-on take of Star Trek: The Next Generation.
It has the Cutie Mark Crusaders (Scootaloo, Apple Bloom, and Sweetie Belle) dressed up as Riker, La Forge, and Picard respectively and seen on the bridge of the USS Enterprise. Rarity's cat, Opal, is dressed up as a TNG-era Romulan. When she attacks, Scootaloo shouts that they should "Split the ship in half". Discord is seen at the end of that portion, dressed in Q's judge outfit from "Encounter at Farpoint", musing where he had seen this before.
Night of the Living Trekkies Edit
A comedy-horror novel about a zombie outbreak at a Trek convention. The YouTube trailer for it says it is set at the "Botany Bay Hotel & Convention Center" and features a reporter named "Natasha Yar".
Omicron Ceti III Edit
The Onion Edit
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.
Pale Kings and Princes by Robert B. ParkerEdit
Penny Arcade Edit
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".
The Universal Union, Space Fleet, Captain Lucius Abernathy, Q'eeng, Anatoly Kerensky, Chief Medical Officer Hanson, and Chief Engineer West are all parallels of the United Federation of Planets, Starfleet, James T. Kirk, Spock, Pavel Chekov, Leonard McCoy and Montgomery Scott. When explaining why their lives are so dangerous, Jenkins puts up a picture of the Enterprise and says that they're living in a poorly-written TOS knockoff. Upon time-traveling back to 2012 Los Angeles, Brian Abnett says to Duvall that somebody has to be the redshirt.
During a book signing at the Burbank Public Library, the author and Wil acted out a sketch in which Wil is a labor lawyer with the firm of Koenig, Nichols, and Montalban suing the Universal Union over all the redshirt deaths, including how a deliberately unidentified captain was allowing a child to fly the ship.
Serge A. Storms novels of Tim DorseyEdit
Torpedo Juice Edit
The Big Bamboo Edit
When Elves AttackEdit
Sev Trek Edit
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.
The Short-Timers by Gustav HasfordEdit
Snow Crash by Neal StephensonEdit
It is said one can't beam into the Metaverse like James T. Kirk, and later Hiro notes that most hackers have pictures of the starship Enterprise on their walls. Also, L. Bob Rife purchased the aircraft carrier Enterprise from the United States Navy and made it his own personal yacht.
Sonic the Hedgehog comic book series Edit
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. A later issue introduced the "Battle Cruiser", a massive flying ship used by the Echidna group the Dark Legion. It's designs mimic those of the Klingon Bird-of-Prey, D'deridex-class and Galaxy-class ships.
It should be noted that both instances were created by Ken Penders, who worked on Star Trek comics in the past.
The pre-refit USS Enterprise also made a cameo appearance in the 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).
Star Wolf Edit
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 NowhereEdit
Blood and FireEdit
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."
Storm is a Dutch-British pulp science fiction comic book most popular in the Netherlands. The album "The Robots of Far Sied" has Storm saying "beam me up Scotty" as he prepares to be digitized.
Star Wreck: The Generation Gap Edit
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)
The Technopriests Edit
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 Edit
A Day For DamnationEdit
The World God Only Knows Edit
During Chapter 216 of the Manga "The World God Only Knows", Keima wears a uniform resembling one of starfleet when trying to convince Urara he's an alien.
The web comic xkcd is well-known for its references to geek culture, so it should come at no surprise that it has referenced Star Trek on a number of occasions.
"Quantum Teleportation"  has a researcher lamenting that that the press always connects quantum teleportation research to the transporter from Star Trek, and then always write the same disappointed story when they find out it is not the same thing.
"Numbers"  charts the number of Google results for certain phrases with certain numbers inserted (for example; I'm <x> and have never had a boyfriend"). Amongst the sentences charted is, "There are <x> lights", referencing the famous scene from "Chain of Command, Part II".
"Interstellar Memes"  charts how far certain memes would have traveled given "speed-of-light delay". According to the comic, "Live long and prosper" might have made it to HD 211415 by now, while "Resistance is futile" would have reached Vega.
"Questions" [htts://www.xkcd.com/1256/] shows questions found using Google autocomplete. One of them is "Why are there two Spocks?", seemingly referencing the alternate reality.
"Data" has a character proclaim that after Kirk and Picard, the most popular Star Trek character are Data to annoy a grammar pedant.
"Santa"  has a character using the phrase "the needs of the many..."
Y The Last Man Edit
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 is no wonder that the Federation of Planets choose it as its HQ location. Agent 355 doesn't understand his comment, and thinks that it is 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.