Why is the ifthen package obsolete?

The main reason why people may consider ifthen obsolete (last version is of 2001/05/26 with about one page of user manual plus four pages of code documentation) is that it is superseded by e.g. etoolbox, which uses the advanced possibilities of eTeX. Using these allows faster processing. You still can use ifthen for your existing and new documents if you like and I don't think there is a risk in doing so. However for new code, especially new packages which use a lot of boolean expression using the more modern alternatives is recommended.


From my experience in various forums and newsgroups, ifthen often seems to do more harm than good, especially when used by newbies. The main \ifthenelse command is fragile, so something like

\section{\ifthenelse{\equal{a}{a}}{b}{c}}

doesn't work. The comparison is not expandable, so that the command "possibly has only limited usefulness for macro code writers" (quoted from the ifthen manual). Plus I find the syntax quite cumbersome compared to e.g.

\ifstrequal{a}{a}{b}{c}

This is not a diss of the ifthen package; its weaknesses are known and unavoidable because it had to be compatible to an older macro package and was written long before e-TeX was implemented. I just conclude that for many problems there exist solutions with fewer problems. If you want to use the ifthen package, then that is fine, but you should know about its limitations.


I think that a certain degree of caution is required here in the way we classify packages. While some people may consider ifthen obsolete, it is certainly not marked officially as obsolete.

Compare ifthen's CTAN page with subfigure's.

This is not to say that there are not often better options, but the existence of better alternatives does not, just in itself, render a package obsolete.

Compare the case of packages for handling sub-figures. subfigure is definitely obsolete, but this leaves several other options, including both subfig and subcaption. In very many cases, the latter is preferable to the former - certainly it is more powerful, it works well with the powerful caption package etc. But that does not render subfig obsolete.

Something being obsolete means, to me, that there is good reason for me to update existing code (e.g. packages or classes for which I'm responsible) even if there are no obvious problems with it. If my code includes the use of things like \sf in a LaTeX document, or loads subfigure, I really should do something about that if it is at all practical to do so.

But there is not the same kind of reason for me to update code which loads subfig or ifthen and so it would be misleading to describe these packages as 'obsolete'. They are not. Not yet, anyway.