[texhax] Composing two commands one inside another

Rodolfo Medina romeomedina at libero.it
Thu Aug 12 21:42:07 CEST 2004

Many thanks to Pavel Minev Penev and Les Saper who kindly responded.
As for Pavel Minev Penev's answer:

>If you are using \edef, you shold try
>	\edef\c#1{\noexpand\b \refn{#1}}
>	\expandafter\b \refn{label}
>should work, as well.

I tried both the alternatives you suggested, 
and in both cases got the error message:
! Paragraph ended before \b was complete.

A similar problem arises if I say:


and, some lines below, 
I try to compare the result of \refn{label}, which is the number 1,
with a number, say 2, using \ifnum. There are troubles: if I say, e.g.,

\ifnum2=\refn{label2}yes\else no\fi

I get the error message

! Missing number, treated as zero.

I'd need to compare the result of \refn{label} with a number.
Is there a way to achieve this purpose?

>If you are using Plain TeX, you may find _The TeX Book_ useful.

I find the TeXbook *very* useful; but, as you see, its use is not so easy! ;)


More information about the texhax mailing list