[texhax] How do you make * macros?
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Fri Oct 22 16:44:22 CEST 2010
On Fri, Oct 22, 2010 at 09:37:24AM -0400, Michael Barr wrote:
> Assuming I have a macro \xxx that does something, how do I make
> \xxx* that does something slightly different? If think I make
> something using \@ifnextchar, but there is probably an "official"
> way of doing it that I don't see in the Companion (1994 edition).
\makeatletter
\newcommand*{\xxx}{%
\@ifstar{\xxxWithStar}{\xxxWithoutStar}%
}
\makeatother
\newcommand{\xxxWithStar}...
\newcommand{\xxxWithoutStar}...
Other possibilities:
* Package `suffix'.
* ...
Yours sincerely
Heiko Oberdiek
More information about the texhax
mailing list