Monday, 19 August 2013

Constructing an "intelligent" command

Constructing an "intelligent" command

I'm trying to create a command with an optional argument using
\newcommand{\Af}[1]{{\mathbf{A}_{(#1)}}
where the argument is a number.
However, I'd like that if no argument is given the bracket were dropped.
Question
How could I define a command which decides whether or not write the brackets?

No comments:

Post a Comment