On Feb 24, 1:34 pm, kipibenkipod <
lavi.k...@gmail.com> wrote:
> Hi,
> I'm trying to use this simple code:
> \caption{\ifthenelse{\equal{1}{1}}{1}{2}}
>
> and I get:
> ! Undefined control sequence.
> <argument> \equal
undefined control sequence? have you loaded the ifthen package?
anyway, \caption is a fragile command, so i doubt it likes what
you're trying to do. however, if you use the optional argument as
well, perhaps your problem will disappear. (how complicated is your
real example?)
this works for me:
\documentclass{article}
\usepackage{ifthen}
\begin{document}
\begin{figure}
\caption[toc entry]{\ifthenelse{\equal{1}{1}}{1}{2}}
\end{figure}
\end{document}
cheers,
jon.