I'm working on a beamer theme in which each of the title page elements is optional; for example, I don't want defining an empty date to produce a large empty space on the title slide. I figured I could do this by wrapping the layout for each element in a conditional like so:
\ifx\insertdate\empty%
\else
...
\insertdate
\vskip{1em}
...
\fi
And this pattern works as expected... except for the author. For whatever reason, \ifx\insertauthor\empty
never seems to evaluate to true
, unlike the other title page elements:
\documentclass{beamer}
\author{}
\date{}
\begin{document}
\ifx\insertauthor\empty
empty
\else
nonempty
\fi
% outputs "nonempty"
\ifx\insertdate\empty
empty
\else
nonempty
\fi
% outputs "empty"
\end{document}
Why is this? Is there any workaround that would let me test for an empty author?