In the mid-1980s Irvine Welsh's life was going nowhere fast. His teenage dreams of being a footballer or a rock star were over, and he was stuck in a series of white-collar jobs which he loathed. With the last throw of the dice, he started to write. In 1993 his debut novel – which centred on the desperate day-to-day struggles of a group of Edinburgh schemies and junkies – was published. Even Irvine's publisher, Secker & Warburg, didn't hold out much hope. Only 1,000 copies were printed and the word was that Irvine might become a cult author, a 'Scottish Bukowski'. But, as the rave reviews increased, the book – memorably described as 'the voice of punk, grown up, grown wiser and grown eloquent' – rapidly achieved global success. It was followed, in 1996, by Danny Boyle's raw, high-energy film, which received worldwide critical acclaim and launched the careers of several young Scots actors such as Ewan McGregor, Ewen Bremner and Kelly Macdonald. So, how did an unknown Edinburgh writer pen the most talked-about book of a generation? Read the inside story of the Trainspotting phenomenon.