I want to test whether a string, when it is finally printed, is empty. The following illustrates my problem,
\documentclass{article}
\usepackage{ifthen}
\newcommand{\isempty}[1]%
{
\ifthenelse{\equal{#1}{}}%
{EMPTY}% if #1 is empty
{FULL, it contains the string '#1'}% if #1 is not empty
}
\newcommand{\Something}{Something}
\newcommand{\Nothing}{}
\begin{document}
First the buffer is \isempty{\Something}.
Second the buffer is \isempty{\Nothing}.
{\em So far so good.} But
Third the buffer is \isempty{{\Nothing}}.
Forth the buffer is \isempty{\bf{\Nothing}}.
It says the string is Full with ''!
\end{document}
The output is
First the buffer is FULL, it contains the string ’Something’.
Second the buffer is EMPTY.
So far so good. But
Third the buffer is FULL, it contains the string ’’.
Forth the buffer is FULL, it contains the string ’’.
It says the string is Full with ”!
