Prison cells will soon be designated as "smoking" or "non-smoking" and criminals will be given a choice of rooms when they are convicted, it emerged yesterday.
The details of the smoking ban, which is expected to be in place by next spring, were published by the Scottish Executive and showed which areas will be exempt from the ban and which places will be covered by the legislation.
Oil rigs, designated hotel bedrooms and parts of police stations will be exempt from the ban, but almost every other place used by the public will have to enforce a total ban.
All pubs, restaurants, offices, factories and sports centres will have to be smoke-free as will all hospitals - although the elderly and the terminally ill will still be able to smoke in their own rooms in residential homes and hospices.
However, one of the areas not covered by the ban will be prisons, but a Scottish Executive spokesman confirmed that ministers will change prison legislation to ban smoking in every part of Scottish prisons except individual cells.
This means that prisoners will continue to be able to smoke in their cells, but they will have to choose whether they want "smoking" or "non-smoking" rooms.
This drew a derisory response from critics of the smoking ban.
A Tory spokesman said: "The only people who are going to be given a real choice in Jack McConnell's Scotland are the ones who break the law and end up in prison."
And Paul Waterson, of the Scottish Licensed Trade Association, said: "These proposals are farcical, the plans are starting to look more and more like the back end of a pantomime horse."
The list of exempted areas published yesterday will be open to consultation, but it will take an extremely convincing argument to get ministers to change their minds.
The smoking ban will affect a whole range of different organisations in different ways.
Football supporters, for instance, will still be able to smoke in the stands, but only if their seats are in the open to the air and not covered on every side. They will not be able to smoke anywhere else in the stadiums where the space is enclosed by walls on each side, such as in foyers or in hospitality boxes.
Film-makers will also have to make changes to the way they produce movies. Smoking will be prohibited on all film sets, even if it is done by an actor as part of a role.
There were suggestions that this might dissuade film-makers from producing movies in Scotland but Ginnie Atkinson, from the Edinburgh International Film Festival, said she did not think it would prove a problem, because actors could use fake cigarettes.
The Executive spokesman conceded that police stations would remain one of the few public places to allow smoking, but insisted this had been done to help police officers during interrogations.
"This would help in quietening suspects and preventing them from turning to violence," he said.
Andy Kerr, the health minister, said: "The regulations out for consultation today set out exactly what we intend to be the effect of the bill and clarify the very few places which we think should be exempt.
"We welcome comments on these, but, I have made it perfectly clear in the past that we intend that exemptions would only be made on humanitarian grounds and in respect of people's homes.
"This legislation needs to be as comprehensive as possible in order to be effective."
Areas where smoking will be banned:
Restaurants, hotels bars and pubs. Shops and shopping centres. Libraries, museums and galleries, cinemas, concert halls, theatres, bingo halls, casinos, dance halls and discos.
Film or broadcasting studios.
Public halls, public toilets and private clubs. Offices, factories and work premises including vehicles containing more than one employee. Educational institutions, secure accommodation. Hospitals, children's hospices and health centres, crèches, day nurseries and day centres.
Churches, sports centres, airports, public transport facilities and vehicles.
The areas exempted from the ban will be:
Private homes, adult care homes and adult hospices, psychiatric hospitals and units, oilrigs, private vehicles, specific hotel bedrooms, certain police rooms, and designated prison cells.
© The Scotsman