Quark comes from Finnegans Wake by James Joyce.
For some time, Gell-Mann was undecided on an actual spelling for the term he intended to coin, until he found the word quark in James Joyce’s book Finnegans Wake:
Three quarks for Muster Mark!
Sure he has not got much of a bark
And sure any he has it’s all beside the mark.
—James Joyce, Finnegans Wake
Gell-Mann went into further detail regarding the name of the quark in his book, The Quark and the Jaguar:“In 1963, when I assigned the name “quark” to the fundamental constituents of the nucleon, I had the sound first, without the spelling, which could have been “kwork”. Then, in one of my occasional perusals of Finnegans Wake, by James Joyce, I came across the word “quark” in the phrase “Three quarks for Muster Mark”. Since “quark” (meaning, for one thing, the cry of the gull) was clearly intended to rhyme with “Mark”, as well as “bark” and other such words, I had to find an excuse to pronounce it as “kwork”. But the book represents the dream of a publican named Humphrey Chimpden Earwicker. Words in the text are typically drawn from several sources at once, like the “portmanteau” words in “Through the Looking-Glass”. From time to time, phrases occur in the book that are partially determined by calls for drinks at the bar. I argued, therefore, that perhaps one of the multiple sources of the cry “Three quarks for Muster Mark” might be “Three quarts for Mister Mark”, in which case the pronunciation “kwork” would not be totally unjustified. In any case, the number three fitted perfectly the way quarks occur in nature.http://en.wikipedia.org/wiki/Quarkegan’s Wake