[texhax] Macro Problem
t152 at vmars.tuwien.ac.at
Mon May 5 18:35:01 CEST 2003
That's the solution I have been searching for.
Thanx a lot to all for your help.
On Mon, 5 May 2003, Philip G. Ratcliffe wrote:
> > and have tracked down my problem to the following line:
> > This line works as expected (output nothing or "false", depending
> > on parameter #4):
> > \ifx#4\empty \else false \fi
> > This line doesn't work since it produces "false" always (independent
> > of parameter #4):
> > \ifx#4\empty true \else false \fi
> You should use
> \ifx\mytemp\empty true \else false \fi
> The problem is that if #4 is really empty, then the \ifx command finds
> \empty as the first object and then looks for another to compare, which in
> your second example will be the t of true. Since "t" is not equal to
> \empty, you get false every time, unless perhaps (I think) #4 happens to be
> precisely \empty.
> Suggestion: look in latex.ltx or inside some standard package to see how
> such constructions are used and copy them.
> Cheers, Phil Ratcliffe
More information about the texhax