Be sure to precede the definition \newcommand\foo{\@ifstar{\foos}{\foonos}} with \makeatletter and follow it with \makeatother (unless it is inside a package). Michael Barr