JK ROWLING has written about her experience of grinding poverty and nights when vandals, burglars and drunks would make her life a misery.
In a heartfelt introduction to a book whose proceeds will go to fighting social exclusion in Scotland's capital, the best-selling writer gives a rare insight into what her life was like on the poverty line as a single mother in Edinburgh - "the 'rags' part of what might as well be called my Cinderella story".
Before Harry Potter took off, she reveals, she had first-hand experience of what poverty brought in its wake. In Leith's South Lorne Street, where she and her daughter lived for three years, "a group of local boys amused themselves on dull nights by throwing stones at my two-year-old's bedroom window".
On one occasion she had to shove a drunk out into the corridor after he had tried to force open her front door; another time she had to cope with being broken into at night while she and her daughter were both in bed.
Rowling writes about her memories of her early years in Edinburgh in the introduction to One City, which will be launched at Edinburgh Festival Theatre on Friday next week in what is claimed to be Scotland's biggest-ever literary event.
It also contains three stories by Edinburgh's other world-famous authors - Ian Rankin, Alexander McCall Smith and Irvine Welsh - who will all be interviewed by the BBC's Kirsty Wark about their work.
Money from the event - which is sponsored by The Scotsman - and from sales of the book will go towards One City Trust, the charity set up last year with the aim of helping people in the poorest parts of Edinburgh enjoy the fruits of the city's economic and cultural boom.
The cause is close to Rowling's heart. When she arrived in Edinburgh in December 1993, a single mother with hardly any money and no job to go to, she soon became aware of the barriers, "invisible and inflexible as bullet-proof glass", between the rich and those, like her, on the fringes of society.
She had not, she reveals, ever intended to stay in the city - it was just meant to be a Christmas visit to her sister.
At the time she had far more friends south of the Border and she imagined that she would soon be back among them.
That winter, though, Edinburgh was "snow-covered, almost dauntingly beautiful and austerely unfamiliar".
And when the thaw came, it still had enough attractions: certainly her daughter loved toddling around the Museum of Scotland and Princes Street Gardens.
"I stumbled along in her wake, wondering what was going to happen to us, almost as shell-shocked at finding myself in this strange new city as I was to be a single mother, broke and jobless." Even when she moved out of the "glorified bedsit" organised for her by the social services in 28 Gardiner Terrace, Edinburgh, to live in the flat in Leith, which she furnished thanks to the help of friends, that sense of being excluded never left her.
"Violence, crime and addiction were part of everyday life in that part of Edinburgh," she writes. "Yet barely ten minutes away by bus was a different world, a world of cashmere and cream teas and the imposing facades of the institutions that make this city the fourth-largest financial centre in Europe.
"I felt in those days as though there was an abyss separating me from those carrying briefcases and Jenners bags - and, in truth, there was."
Rowling's subsequent career crossed that abyss in the most spectacular way: even before Harry Potter and the Half-Blood Prince went on sale in July, her estimated personal wealth of 500 million was twice that of the Queen.
It is easy for many to forget how recently Rowling broke out of that poverty trap.
But far from forgetting about it herself, Rowling says that fighting its insidious effects should be a top priority.
Misery, despair and mental and physical health problems multiply among the socially excluded, she says. Yet every city would benefit if all its children were able to reach their potential, if its workers were able to find jobs and all its citizens were able to avoid being isolated.
In Edinburgh - where, despite its affluent image, one in five children grows up in a household below the income-support level - One City Trust is working out how to help marginalised people be more fully involved in the city's life. This group includes the poor, the disabled, ethnic minorities or "people who feel isolated from others and from the benefits of the city".
In her early years in the city, Rowling admits, that last definition fitted her perfectly.
She has written about the impact of poverty on her life once before.
In the foreword to Magic, a book of short stories published three years ago to raise money for the National Council for One Parent Families, she described how she hated relying on charity shops for her daughters' clothes and was jealous at the way other parents could provide new toys for their children.
Once, she wrote, she was so poor that, when she was tuppence short for a tin of baked beans at the supermarket checkout, "I had to pretend that I had mislaid a 10 note for the benefit of the bored girl at the till." She would also visit Mothercare just because their baby-changing rooms offered a small supply of free nappies.
Despite all this, she reveals in One City, even before Harry Potter made her famous she had come to love Edinburgh.
She has now lived in the city longer than she has ever lived anywhere in her life.
"I am proud to live here," she concludes, "and proud that my home city is committed to becoming a more inclusive place.
"One City seeks to unify: I cannot think of a better goal, for Edinburgh, Scotland or the world."
One City to make capital one giant reading club
ONE City, which goes on sale in bookshops a week today, is a book which already has a number of firsts to its name.
Even without a moving introduction by the world's most famous writer, any book that brings together such literary galacticos as Alexander McCall Smith, Irvine Welsh and Ian Rankin would be special in its own right.
The only instruction they were given was to write a story between 6,000 and 8,000 words long and set in Edinburgh.
The results are fascinating. Irvine Welsh moves from his normal setting in the seedier side of Leith to the moneyed milieu of Murrayfield. Ian Rankin leaves crime on the shelf and sets his story at the Homeless World Cup.
Alexander McCall Smith slips away from the New Town and into the mind of an Indian doctor who is starting to find his way round the cold hearts in this cold city.
This is a book with a double purpose: to unify the city by raising money for One City Trust, a charity bringing new opportunities to Edinburgh's socially excluded, and - almost as important - to unify the city by having as many people as possible reading the book in the first place.
The launch of One City next week should start to turn Edinburgh into one big reading group. Publishers Polygon have priced it cheap enough (5.99) to be affordable for many and its readership will spread beyond those who buy it.
Next month it will be the book of choice in Edinburgh library reading groups and 400 copies will be distributed on a random basis in the city's north.
A further 500 copies will be left on buses, taxis, or in clear plastic bags on park benches. Each copy will be stickered to say that it is free and on a "journey", with the reader being asked to record online where they found it, what they thought of it and where they left it.
The journey begins when the book is launched at the Edinburgh Festival Theatre next Friday evening. Tickets cost 8 and can be ordered from Ottakar's.
Parliamo Hogwarts: how Stanley Baxter inspired voices in Harry Potter tapes
STEPHEN Fry has revealed how he turned to the Scottish comedian Stanley Baxter to help him record the Harry Potter books.
The actor and author is the voice behind scores of characters in the tapes of the hit series.
In an interview with JK Rowling, Harry Potter's creator, he revealed that the secret of tackling the books' heroines lay in the popular Scots comic.
He said: "I always loved the Scottish comedian Stanley Baxter.
"I noticed from an early age - I was about ten - that when he did a woman he would deepen his voice, unlike trying to do a falsetto. For a lot of women that works very well."
In the interview with Fry, to be broadcast next week on BBC Radio 4, Rowling revealed that she has another children's book up her sleeve.
The writer, who lives in Edinburgh, said that she has an idea for a new novel after she has written the seventh and final episode of the boy wizard's adventures.
But Rowling, whose first novel was turned down by several publishers before it hit the shelves, added that she might use a pseudonym for the next attempt.
She said: "There is another book that's sort of mouldering in a cupboard that I quite like, which is for slightly younger children. There are other things I'd like to write. But I'll need to find a good pseudonym and do it all secretly."
The author, whose books have earned her an estimated fortune of around 500 million, will soon begin writing the final instalment of the hit series.
The film adaptations have also been a box-office hit, while the latest, Harry Potter and the Goblet of Fire, was the first to be given a 12A rating for its scary content.
Rowling said: "We need to feel fear and we need to confront fear in a controlled environment, and that's a very important part of growing up. The child that has been protected from the Dementors in fiction, I would argue, is much less likely to fall prey to them later in life in reality."
JK Rowling and Stephen Fry will be in conversation on BBC Radio 4 at 9am on Saturday, 10 December.