[Tugindia] clarification on edef
Baskaran.K
tugindia@tug.org
Fri, 10 Jan 2003 11:54:02 +0530
Dear sir,
I found out solution by the following way
\newcount\aacount
\def\kk{}
\def\aa#1{\advance\aacount 1\ifnum\aacount=0\edef\kk{ \kk #1}
\else\edef\kk{ \kk, #1}\fi}
\aa{aa}
\aa{bb}
\aa{cc}
\aa{dd}
\kk
if you find any other good method, Kindly help me.
Regards
baskaran nk
-----Original Message-----
From: Baskaran.K
Sent: Friday, January 10, 2003 9:47 AM
To: 'tugindia@tug.org'
Subject: [Tugindia] clarification on edef
Dear sirs,
I need some clarification. Kindly help me.
For example:
\def\kk{lllll}
\def\aa#1{\edef\kk{\kk#1,}}
\aa{aa}
\aa{bb}
\aa{cc}
\aa{dd}
\kk===>output is ``llll,aa,bb,cc,dd,''
I wish to remove the last comma; the out put must be ``llll,aa,bb,cc,dd''
The input of \aa repeated several times (not fixed times). We could not
modify the input ``\aa''. How to remove the
last puncutation , or add new punctuation in last position.
Regards
Baskaran NK
_______________________________________________
Home: http://www.tug.org.in/
unsubscribe: http://tug.org/mailman/listinfo/tugindia