When we think of particle physics, James Joyce isn’t usually the first name that springs to mind. And Joyce wasn’t on the mind of physicist Murray Gell-Man in 1963, when he proposed a name for his concept of an elementary particle of matter that is smaller than a proton or a neutron. Since it had never been written down, there was no spelling for the term that he pronounced as “quork.”
According to his own account he was in the habit of using names like “squeak” and “squork” for peculiar objects, and “quork” (rhyming with pork) came out at the time. Some months later, he came across a line from Joyce’s 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.
The line struck him as appropriate, since the hypothetical particles came in threes, and he adopted Joyce’s spelling for his “quork.” Joyce clearly meant quark to rhyme with Mark, bark, park, and so forth, but Gell-Mann worked out a rationale for his own pronunciation based on the vowel of the word quart: he told researchers at the Oxford English Dictionary that he imagined Joyce's line "Three quarks for Muster Mark" to be a variation of a pub owner's call of "Three quarts for Mister Mark." Joyce himself apparently was thinking of a German word for a dairy product resembling cottage cheese; it is also used as a synonym for quatsch, meaning “trivial nonsense.”
Quark stuck apparently in part because it didn’t sound scientific. In fact, the six types of quarks are also named up, down, strange, charm, top, and bottom.
It’s rare that we know the actual circumstances of a word’s coinage; most stories are hidden in the mists of time. Another American scientist, Edward Kasner, asked his nine-year old nephew to come up with a fun word to mean the huge number represented by 1 followed by a hundred zeroes. The nephew, Milton Sirotta (coincidentally an exact contemporary of Murray Gell-Man) offered his made-up word: googol, which, like quork, was later respelled and came to have a life of its own.