Code: Select all
\newcommand{\card}[1]{
if #1 is empty:
Empty argument.
else:
The argument is #1.
end if
}
Tim
Code: Select all
\newcommand{\card}[1]{
if #1 is empty:
Empty argument.
else:
The argument is #1.
end if
}
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\ifx&%
% #1 is empty
\else
% #1 is nonempty
\fi
Code: Select all
\usepackage{ifthen}
\newcommand{\card}[1]{
\ifthenelse{\equal{#1}{}}{Empty.}{Nonempty.}
}
Code: Select all
\isempty{#1}
Code: Select all
\equal{#1}{}}
Code: Select all
\newcommand{\card}[1]{
\ifthenelse{\isempty{#1}}{Empty.}{Nonempty.}
}
NEW: TikZ book now 40% off at Amazon.com for a short time.