I need some help understanding if statements.
How do I make the following pseudocode in LaTeX.
\newcommand{\@leader}{}
\newcommand{\leader}[1]{\renewcommand\@leader{#1}}
\newcommand{\donow}{
\if \@leader == {} %aka blank, null, empty
this is the false %do false
\else
\@leader %do leader
\fi
}
Such that when a user adds the following to their document
\leader{
\begin{itemize}
\item this is an item
\item this is also an item
\end{itemize}
}
\donow
\leader{}
\donow
print the following
*This is an item
*this is also an item
this is the false
My only question about variables is, is the solution I have really the best way to do make variables?