Goebel, Juergen wrote:
Hi,
Regarding the following example I've got two questions.
(1) Why don't I ever see the argument #2 in the output? (2) What do I have to do to suppress the unwanted space after the end of the output of this macro (as can be seen in the result before the following comma)?
Regards,
Juergen
\def\Geb{\dosingleempty\doMyGeb} \def\doMyGeb[#1]#2#3{, x % \iffirstargument% Aha \else \ifsecondargument% #2 \else% ... %C% \fi \fi \ifthirdargument% #3% \else% ...% \fi}
\starttext
\Geb{Ulm}{11. 9. 2008} % should deliver x Ulm 11. 9. 2008 \Geb[Ulm]{Ulm}{11. 9. 2008} % should deliver x Aha Ulm 11. 9. 2008 \Geb{}{11. 9. 2008} % should deliver x ... 11. 9. 2008 \Geb{Ulm}{} % should deliver x Ulm ... \Geb{}{} % should deliver x ...
\stoptext
\unexpanded\def\Geb{\dosingleempty\doMyGeb} \def\doMyGeb[#1]#2#3% {, x \iffirstargument Aha \fi \doifsomethingelse{#2}{#2}{...}\space \doifsomethingelse{#3}{#3}{...}% \par} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------