[texhax] Composing two commands one inside another

Rodolfo Medina romeomedina at libero.it
Wed Aug 11 23:17:58 CEST 2004

>> Please anyone who can help?
>> (Sorry for my ignorance!)
>I'm sure you're not ignorant, but your explanation is distincly unclear!

I'll try to be more precise.
I use plain TeX, with eplain macros for cross references.
Suppose I say

\definexref{label}{mouse, cat, }{}

and, some lines below,


. This expands to:

mouse, cat,

. Now, if I define

\edef\a#1{Hallo, #1!}

and then I say


, I get

Hallo, mouse, cat, !

Right. But if I define instead

\edef\b#1, #2, {Hallo, #1, #2, !}

and then I say


I get an error message:

! Paragraph ended before \b was complete.

I'd need to know a correct way to "put \refn into \b"
so to obtain the same expansion I get putting \refn into \a with
The idea is that \b should collect the expansion of \refn{label}
and go ahead with its own expansion:
the value assumed by the one-argument function \refn
should be argument for the two-argument function \b. I also tried with:

and then I said


but still got an error message:

! Argument of \b has an extra }.

Any help will be highly appreciated.

More information about the texhax mailing list