3

How can I pass a blank to this command

\newcommand{\iam}[1][happy]{I am #1.}

so that I get this result

I am .

Note: My actual command operates in the math mode, so the space between "am" and "." is of no concern.

bongbang
  • 385

1 Answers1

2

To pass an empty optional argument, thus overriding the non-blank default, just use []:

\iam[]
cfr
  • 198,882