HE'S now celebrated around the world for his books but there was a time when Ian Rankin was a "local thug" in a teenage gang in Cardenden.

But the award-winning author, who grew up in the village and is best known for his Inspector Rebus crime thrillers, said it was all a front to hide his real interests and when it came to fights with the rival Young Lochgelly Mental, he'd be at home writing about it instead.

Ian, who turned 60 this year, was in conversation with Giles Paley-Phillips and Jim Daly on the Blank podcast and talked about everything from stealing school jotters and electric shocks to comic books and gold plated pinball machines.

He said: "Where I grew up was very much like a tribe, a coal mining village. Most of my uncles were coal miners.

"My dad wasn't, he was the youngest of five boys and the only one who didn't go down the mine. He worked in a grocers shop instead.

"It was all council housing, everyone knew everyone else, I had an uncle and aunt over the back fence, various cousins spread around the place, it was like a clan.

"It was an odd upbringing if you felt different. So the fact I was writing, reading, scribbling poems and song lyrics from a young age, I basically hid that from friends and family alike.

"I didn't want anyone to know I was the weird one so I did a very good impersonation of a local thug.

"This was the time of skinheads, suedeheads, Doc Martens and gangs.

"So I hung around the street corners of the village, scowling at passing cars."

He continued: "If a battle was ever going to take place, it would be between us and the next village over, which was Lochgelly.

"They had a much better gang than ours with a much better name, they were the YLM, the Young Lochgelly Mental.

"If we were going to have a pitched battle with them I would scurry back to my bedroom and write about it.

"I wouldn't participate, I would imagine what it would have been like to be there, so I was a coward at heart!"

The love of reading was helped by comics and he recalled: "Comics used to be affordable literacy for kids.

"They were a few pennies and for a few pennies you'd be reading a story that would keep you occupied for a while and you could then swap them with your friends.

"We didn't have many books in the house, neither of my parents was a reader but I was allowed to indulge my hunger for comics and I would get seven or eight a week.

"There was no bookshop in the village but there was a newsagents that sold comics and it was the Dandy and the Beano, the Victor and the Hotspur, all those DC Thomson comics that were being churned out in Dundee, then later it was 2000 AD.

"I'm still a huge fan of comic books. I think it's a gateway drug to novels and a gateway drug to storytelling per se.

"But if you look now the range of comics available is much slimmer than it used to be, they've gone up wildly in price so they're not nearly as affordable and there's not as many of them out there."

Ian moved from primary to junior high and then Beath High School and said: "When I started writing in my early teens, about 1973-74, it was in stolen school jotters, the lined jotters you got for doing your schoolwork in.

"I would nick them from the English class and write stories.

"As soon as I could I got a typewriter, a little portable typewriter I got from my sister's mail order catalogue and was supposed to pay her back 50p a week or something.

"Whether I did or not I can't remember.

"I moved from that to an electric typewriter and worked my way up to a very basic Amstrad word processor with a daisy wheel printer that was so noisy I had to put a cardboard box over it when I was printing so the neighbours didn't complain. It was like a train!

"From there I've got to laptops and stuff. My handwriting now is appalling. I can only write in capital letters or no-one can understand it."

Ian said the process has completely changed too and recalled: "In the old days, when my first book (The Flood) was published, I would have to go to the uni library and pay to photocopy it, sheet by sheet, then put them all in a big padded bag and queue up at the post office and send it off to the publisher. You felt 'I've done the work'.

"Now you press a few keys and a full length novel flies through the ether and I think 'Really? Is that it?'"

Ian had planned to study accountancy and economics but had an "epiphany" after getting a C in his Higher economics, and realising he didn't like the subject anyway.

He went on to study English and literature at Edinburgh University, to the "huge disappointment" of his parents, and told them his plan was to come back to Fife to be a teacher.

After university he famously had a variety of jobs, including a grape-picker, a swineherd, a journalist for a hi-fi magazine and a taxman.

He married Miranda in 1986 and they lived in Tottenham Hale in London for four years, which he "hated". He said: "It's a tough place to live if you haven't got any money."

She then persuaded him to move to the French countryside, where they lived for six years before coming back to stay in Edinburgh.

Ian said: "She's the risk taker.

"Every adventure I've had is because Miranda made me do it! I'd be quite happy in a prison cell if I had books and could listen to music.

"I spoke no French whatsoever, we'd left two jobs I was now the breadwinner in this ramshackle farmhouse.

"We tried rewiring it but not very successfully. It meant that every time you opened the fridge you got an electric shock.

"You had to open it with oven gloves, that's the level of competency you're dealing with. I nearly died many times in that house."

He continued: "In France I wrote two books a year as I was now a full-time writer.

"Our two children were born in France and I started having panic attacks as the books weren't doing great at all and the publisher was on the verge of dropping me.

"I became mid-list, ticking along but not exciting enough.

"Then Black and Blue came along. I wrote it in France, a big meaty book and I won the gold dagger for the best crime novel of the year."

He continued: "I'm kind of glad it's been a slow process so that when success came I embraced it and didn't go mad. If the firt novel had been a big hit it would be champagne filled baths and gold played pin ball machines, but I'd written my first book at 26 and by the time I was financially secure I was 40.

"Thank God it did as this is the only thing I've ever wanted to do. I find it therapeutic, I find it cathartic and I find it good fun.

"It's basically me being a kid again, playing with my imaginary friends."

A treasure trove of work by Ian Rankin, which he donated to the National Library of Scotland in Edinburgh last year, is soon to go on display in the reading rooms.

The archive is “a pretty complete author’s life, late-20th century-style” and stretches from 1972 to 2018.

The body of work includes correspondence with literary figures such as Ruth Rendell, as well as publishing companies, production companies and charities.