The legal showdown between best-selling Western author Louis L'Amour and a fledgling New York publisher ended yesterday with both sides wounded. And it produced one of the most bizarre outcomes in publishing history: Under the terms of a federal court ruling, two paperback collections of L'Amour's stories will hit the racks this fall--but the author is forbidden to know what's in them.

The controversy began several weeks ago at the American Booksellers Association convention in Dallas, where a 6-month-old house called Carroll & Graf was touting two potentially lucrative volumes of L'Amour stories "never before collected in book form." The problem was that L'Amour had never heard of the publisher, nor been informed of the project. His attorneys approached publisher Kent Carroll, who insisted that the copyrights on the dozen works had expired. He then offered to give L'Amour royalties and pay him to write an introduction. But Carroll would not reveal the identity of the stories, which he called "in effect a trade secret," fearing that another house would issue its own collections.

On June 22, L'Amour's attorneys filed suit in U.S. District Court for the Southern Circuit of New York, asking that Carroll & Graf be restrained from publishing the books on grounds of possible copyright violation and "false and misleading advertising" arising from the use of L'Amour's name. Carroll countered that the stories--detective and Western pieces written for pulp magazines in the '40s and '50s--were in the public domain. The house publishes many such titles, and "we did our homework" on the L'Amour material, Carroll said before the decision. "It was a confluence of necessity and a little imagination."

The Copyright Act was amended in 1978 to extend the term of protection to the author's life plus 50 years. But because the contested stories were published before then, they are subject to the 28-year limit provided in the 1909 Act.

Judge Charles Stewart issued a temporary restraining order last week, during which time counsel for both sides determined that the stories were not protected by copyright. After L'Amour's attorneys withdrew that claim, Stewart ruled yesterday that Carroll & Graf was free to begin printing the works and could continue to withhold their identity from the author and the public.

But he ordered Carroll & Graf to alter the design and typeface of its planned covers because they too closely resembled previous authorized editions produced by Bantam Books, L'Amour's publisher; to change the planned new titles--"Rawhide Range" and "Homicide Street"--because they were not the author's own and thus implied his consent in retitling the works; and to print a disclaimer on each cover acknowledging that L'Amour had not authorized the collections. Stewart then instructed both parties to submit a mutually acceptable solution to those problems which he would sign as an order. An agreement is expected by Monday.

After the decision, L'Amour fired off an angry statement from California, complaining that "a publisher I never heard of can bring out two unauthorized books with my name on them and isn't even required to tell me the contents of those books"--which "as far as I'm concerned . . . don't exist. I hope my fans will wait for the authorized versions . . . that my real publisher, Bantam, will bring out." A Bantam spokesman said yesterday that the collections will be produced "as soon as possible."

"It doesn't surprise me," Carroll said. "They have a perfect right to do it, too. I'd be churlish indeed if I were to complain about that."