Celebrated newspaper editors and renowned television news figures had a public opportunity to go at each other here yesterday at the American Newspaper Publishers Association annual convention.

There was limited praise--and sharp needles--for television news from A.M. Rosenthal, executive editor of The New York Times, Eugene C. Patterson, president of the St. Petersburg Times, and Peter M. Macdonald, chairman of Harris Enterprises Inc., a Kansas newspaper chain.

From broadcasters Dan Rather, the "CBS Evening News" anchor and managing editor, correspondent Barbara Walters of ABC News and commentator John Chancellor of NBC News there were polite jabs at newspapers, although it was Walters' sharp attacks on unnamed newspaper writers about television that made for some of the most lively remarks.

Newspaper executives, who packed the room for the session titled "TV and Newspapers Tell Each Other: How I'd Run Your Shop Differently," heard her tell them:

"I deplore the television columnists at several newspapers who are so vicious in their personal attacks that they represent the worst of the most pernicious gossip columns," Walters said. "The kinds of personality attacks designed primarily to make a personality out of the columnist are not only cruel and painful but in my opinion poor journalism."

Walters also laid into what she described as "artificial competition between newspapers and television." Newspaper editors, she charged, often ignore newsworthy stories broken first on television. "It's as if it didn't happen because it was on television," she said.

Rather, whose intense, probing manner was missing from the panel discussion, also attacked newspaper coverage of television.

"So often what the newspapers write about is the celebrity aspect of broadcast journalism," Rather said. "I think people want to read the news. They're not all that interested in the people bringing you the news. I think we're written about too much."

From Rosenthal came praise for television news "as the best thing that ever happened to the newspaper business." The top Times editor said that television is "one vast free promotional machine for us." While saying television news was getting "better all the time," he said local news coverage "can be summed up in two words: 'God awful.' "

Patterson had broader criticism.

"What happens after the evening news is an act of war against our intelligence," he said, adding that if he ran a network, after national news he would put on a half hour of analysis by Robin MacNeil and Jim Lehrer of the PBS MacNeil-Lehrer Report.

Chancellor suggested that newspapers ought to be doing more of what television can't do well, such as providing freewheeling opinions from local newspaper columnists.

He also said newspapers should learn from television's use of graphics and cited as an example Gannett's USA Today, which he said recently ran 25 charts in one edition. "If the Reagan administration ever sells the Census Bureau, Gannett's in trouble," he said.