0

I used \newcommand* foo {} to define a command so the user could set it later via \renewcommand* foo {content}. How do I create a conditional statement (if then else) that tests if foo is empty ("{}") or contains anything?

Stefan K.
  • 463
  • 1
    I suggest you have a look at the [tag:etoolbox] package. – Nils L May 24 '13 at 11:48
  • 1
    See http://tex.stackexchange.com/questions/53068/how-to-check-if-a-macro-value-is-empty-or-will-not-create-text-with-plain-tex-co (it is a more general question, but they also answered your question in the process) – T. Verron May 24 '13 at 11:48
  • \ifx\foo\empty ... \else ... \fi should do the trick. – John Wickerson May 24 '13 at 13:00

0 Answers0