Bringing out a daily newspaper in a country in painful transition from caste society to an unknown future is a taxing and at times poignant experience.

As editor of the Cape Times, published in the legislative capital of South Africa, Anthony Heard, 48, finds himself having to reconcile a host of conflicting demands, the most pressing of which is to ensure the paper's survival in the teeth of an economic recession, a mine-field of restrictive legal measures and a political onslaught of great ferocity.

His readers -- mainly middle- class, half of them whites and the other half so-called colored (mixed- race) people, with some blacks -- are by now aware that a social shift of fundamental importance has begun in the country.

To a visitor, one of the most startling features in the paper is the daily unrest map, in the style of a weather map, which shows the location of current outbursts of violence, stonings, fire-bombings and so on and is regularly consulted by locals planning automobile journeys into the interior.

Editing a newspaper in this tension-ridden and sadly divided multi- racial community is indeed taxing. The Cape Times was established in 1876 as an organ of empire in the tradition of liberal imperialism, drawing its economic viability from the upsurge following the discovery of diamonds and, ultimately, the opening of the goldfields in the north.

The paper grew to maturity in a self-governing Cape colony that boasted a non-racial parliamentary franchise, freedom of speech and an independent judiciary. Today, after 110 years, the former British colony is a province of an Afrikaner Nationalist Republic. The Cape Times, an independent opposition newspaper since the nationalist election victory after World War II, is still edited in the liberal tradition, and Anthony Heard is the eighth holder of this post and editor for the past 14 years.

He is currently facing the threat of prosecution and imprisonment because of his decision to publish a full- page interview with Oliver Tambo, president of the African National Congress. (Heard was charged under the Internal Security Act on Friday, and if convicted faces a maximum sentence of three years in jail.) It is an offense in South Africa to publish the words of Tambo or anyone else who is a banned person in terms of South African security laws. I

n Heard's view, his primary responsibility is to ensure the survival of the Cape Times -- but survival, not as a conformist journal acquiescing in a conspiracy to suppress the news, but as the trusted newspaper which he inherited from his predecessor, telling its readers what they have a right to know.

The conflicting demands on the editor's endurance and emotional balance are intense. Seeking to report the news as fully and fairly as possible, Heard is at the same time desperately anxious about the safety of his reporters and photographers, who are in danger of harassment and arrest or, in situations of mob violence, injury or worse at the hands of the police and stone-throwing rioters alike.

Latterly, as the Botha government has prohibited all television and still photographic coverage of unrest incidents, the police in Cape Town have also taken to holding Cape Times reporters and photographers as they arrive in a disturbed area, then escorting them off the scene and effectively preventing them from observing what is going on.

Infringement of the Police Act means risking a 10-year-prison sentence. And it is the editor who goes to jail. This onerous statute makes it a crime to publish "untruths" about the police force without having taken all "reasonable steps" to verify a report -- like the one which came in from an inner-city residential area about 10 o'clock one night that police had just burst into a house, chased a visitor out into the back yard and shot him dead. Several eye-witnesses in the house corroborated the report, saying the visitor, who lived over the road, was a friend who had dropped in for a chat just minutes before.

The police, when asked by a reporter what had happened, said the matter was under investigation and declined to give any further information.

The question, as the deadline approached, was whether or not to publish. If the published acount was in any respect "untrue," would a court of law hold that the paper had taken all reasonable steps to verify it? Was it tenable to delay publication until the police might be ready to give their version of the shooting? Were the police deliberately trying to hold up publication?

On deadline, editorial executives decided to go ahead and publish, with a statement that the report was under investigation by the police.

A day or so later a police statement was forthcoming -- to the effect that they had been chasing a man suspected of taking part in a petrol bomb attack a few blocks away and they had followed him into the premises in question where a shot was fired, killing the suspect.

Police officers visited the Cape Times offices twice in one day just recently in connection with investigations of news reports which had appeared in the newspaper. When the roster of pending cases begins to accumulate, how much time is left for editing a newspaper?

Nerves are raw in a violence- racked community in which some jumpy and insecure individuals, surveying the days's news, may feel inclined to hang the messenger. There are death threats to staff members and their families and the risk cannot be wholly discounted that the odd lunatic might seek to give effect to such threats. There is a need to encourage an editorial staff which must endure abusive telephone calls from extremists and cranks on all sides.

Whatever kind of South Africa is on the way, Heard seems to believe, the Cape Times can play a useful part in easing the transition. The paper seeks to promote peaceful solutions, which is why he published the Tambo interview, offering the views of an essentially moderate black leader to a South African readership which has long been taught to regard the ANC as anathema.

It was a courageous, perhaps a historic, decision. Only time will tell what the consequences will be for Heard, personally. Yet it remains hard to imagine that the Cape Times, having come so far, will not survive the transition into a new South Africa.