How do I add multiple conditions to \ifthenelse?

At least when using package xifthen you can use \OR and \AND constructions, and others. Example:

\ifthenelse{\equal{a}{b} \AND \equal{c}{d}}
{do something when both a=b and c=d}
{do something when either unequal}

Nest two \ifthenelse conditionals to achieve the proper logic.

\documentclass{article}
\usepackage{ifthen}
\begin{document}
\def\a{T}% or {F}
\def\b{F}% or {T}
AND conditional:
\ifthenelse{\equal{\a}{T}}
 {\ifthenelse{\equal{\b}{T}}{something}{something else}}
 {something else}

OR conditional:
\ifthenelse{\equal{\a}{T}}
 {something}
 {\ifthenelse{\equal{\b}{T}}{something}{something else}}
\end{document}

Tags:

R