[comp.text.tex] Problem with ifthen.sty

piet@cs.ruu.nl (Piet van Oostrum) (03/18/91)

Someone here tried to use ifthen.sty to check for empty macro arguments
(admittedly this could be done much easier with the proposed \ifempty
macros from some other messages on the list)

However, ifthen has problems with fragile commands in the booleans,
especially accents like \c:

\renewcommand[1]{\test}
{\ifthenelse{\equal{#1}{}}{#1\\}{}}

\test{Ban\c{c}ilhon}

gives very weird errormessage (at least weird for a non-guru).

The problem can be easily solved with the following patch to ifthen.sty:

4c4
<  \vbox{\let\protect\noexpand
---
>  \vbox{\def\protect{\noexpand\noexpand\noexpand}
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806   Uucp:   uunet!mcsun!ruuinf!piet
Telefax:   +31 30 513791   Internet:  piet@cs.ruu.nl   (*`Pete')