[texhax] Defining a command which runs differently based ion input argument

Mike B. mb78aa at yahoo.com
Tue Dec 28 10:28:00 CET 2010


Hi all,

How can I define a command which runs differently based on if an input argument was provided or not?. For example:

\mycommand
would introduce a vsapce of 1cm

whereas 
\mycommand{xyz}
would print xyz

So it's conceptually something likel:
if input argument is missing then
   run this code
else 
   run this code
endif

Season's greetings,
Mike.






More information about the texhax mailing list