\newcommand{\card}[1]{ if #1 is empty: Empty argument. else: The argument is #1. end if }
I could find information on checking if a macro is empty, but it didn't work for an argument. Is there a solution for this? Many thanks.
Tim
\newcommand{\card}[1]{ if #1 is empty: Empty argument. else: The argument is #1. end if }
\ifx&% % #1 is empty \else % #1 is nonempty \fi
\usepackage{ifthen} \newcommand{\card}[1]{ \ifthenelse{\equal{#1}{}}{Empty.}{Nonempty.} }
\isempty{#1}
\equal{#1}{}}
\newcommand{\card}[1]{ \ifthenelse{\isempty{#1}}{Empty.}{Nonempty.} }
Users browsing this forum: No registered users and 34 guests