Packages   calc   xifthen   xspace

The xifthen Package

Documentation xifthen
Categories macros
Description

Provides if-then-else control structures in macros, with some extra bells and whistles compared to ifthen.

Options
\usepackage{xifthen}
Examples
\ifthenelse{\isempty{#1}}
    {Do something when the first argument is empty}
    {Do something else when it isn't empty}