I want to define a macro, call it \func
, so that \func
will output\phi
, and \func[i]
will output \phi(i)
.
what is the easiest way to achieve this?
I know there are other questions that address this issue - I guess one of them is exactly my question and I just don't get it :)
\func
and\func[i]
(note[...]
instead of{...}
).[]
to delimit the optional argument (always the first) of a command. All other arguments use curly braces.