Terry Pratchett's Unseen Academicals, like the previous volumes of his Discworld series, is highly literary (spot the allusions to Keats or Browning or Shakespeare), but its generosity with jokes is not what a "literary novel" provides. There are great literary precedents for waggishness: Laurence Sterne's Tristram Shandy is a joke-driven novel – but then it is often accused of facetiousness or, as FR Leavis called it, "trifling". And Pratchett loves to trifle. When, in the opening sequence, a strange creature appears seemingly composed of "bits of beasts unknown to science or nightmare or even kebab", the authentic Pratchett tone is struck. A joke is an intervention that the author cannot resist. So Pratchett likes to throw in comments on the absurdity of what has just been said. "Glenda was taken aback and affronted at the same time, which was a bit of a squeeze . . ." In footnotes, Pratchett shakes his head at his own characters. When Mustrum Ridcully, archchancellor of the university, observes that "It's a long time since lunch," Pratchett the annotator is sceptical. "This may not be true. Wizards tend to think it's a long time to the next meal, right until they are consuming it."

This is a joke about academics, for the story is set in Discworld's Unseen University. This academy for wizards is sometimes like an Oxbridge college (one running gag is that the professors are devoted to the richness of their collegiate cheeseboard) and sometimes like a new university specialising in modish subjects (the Senior Uncommon Room includes a professor of indefinite studies and a lecturer in recent runes). The denizens of the Unseen University are wizards (though "It's a bit harsh to call anybody a denizen"), but their characteristics are entirely human: they are devoted to smoking and drinking, and think of their stomachs before even the dusty traditions of their hallowed institutions. Or rather (as Pratchett-the-narrator might say), their most important traditions are gustatory. The leading representatives of the lower orders are themselves employed to prepare food for these ever-hungry academics. Glenda is head of the night kitchen and devoted to the production of pies for her lofty but stomach-centred employers. Juliet is her assistant, destined for a sparklier life as a fashion model. (Her only reading is a magazine called Bu-Bubbles.)

Academic readers are likely to enjoy the fact that the university librarian has been turned into an orang-utan by a magical accident in The Light Fantastic. His inability to use human language seems not to interfere with his duties; his prehensile limbs are a big advantage on the university sports field. For the central joke is that the academics are forced by an obscure condition in a bequest to the university to take up the brutal and brutish sport of "foot-the-ball". But it is more amusing than this, for what we see at the beginning of the book is a mindless, rule-less sport played in the street by large masses of people. With the help of Nutt, who becomes their adviser and trainer, the academics will turn this warlike scrimmaging into a game with shape, speed, and an unintelligible offside law.

Early Pratchett novels were more thoroughly parodies of fantasy literature, with the essential solemnity of Tolkien and his progeny satisfyingly brought to earth. (Not for nothing is one Discworld novel called Thud.) The joke was to insert into tales of magic and mythical beings characters with unremarkable faculties and a colloquial turn of phrase. In The Colour of Magic, the first Discworld volume, the wizard Rincewind's first words, when he is confronted on a dark hilltop above the burning city of Ankh-Morpork by Bravd the Hublander and his swordsman Weasel, are "Bugger off".

Now, 37 Discworld novels in, it is clearly our world that is paralleled. The Times may officially be the Ankh-Morpork Times, but it is the newspaper that we all know, with its lame attempts at populism, its brilliant crosswords, and its self-consciously measured tones. "Glenda never normally read the leader column because there was only a certain number of times she was prepared to see the word 'however' used in a 120-word article." It is for our amusement that Pratchett has challenged himself to make his characters occasionally mention, as if naturally, the matter of their "favourite spoon". It is a homage to the Private Eye column "Me and My Spoon", itself a mockery of celebrity tediousness. But perhaps some readers will hardly notice.

The book is larded with allusions and literary jokes. The brilliant Nutt, an autodidact who is Jeeves-like in his intellectual superiority to his social betters, is constantly defeated in his attempts to have his bookish references recognised by any other character. Explaining why pink is a suitably provocative colour for a football strip, he asks the football-mad Trev Likely: "I don't know if you have ever read Oftleberger's Die Wesentlichen Ungewissheiten Zugehörig der Offenkundigen Männlichkeit?" (The Essential Uncertainties Belonging to Overt Manliness, we translate). He continues impotently to recommend books with similarly stern academic German titles throughout the novel. If we are library lovers, like Pratchett, there are jokes just for us.

John Mullan is professor of English at University College London. Join him and Terry Pratchett for a discussion on 14 December at 7pm, Hall One, Kings Place, 90 York Way, London N1. Tickets cost £9.50 online or £11.50 from the box office (Tel: 020 7520 1490 or kingsplace.co.uk).