ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* first steps with \dosingleempty
@ 2008-09-11  6:31 Goebel, Juergen
  2008-09-11  7:21 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Goebel, Juergen @ 2008-09-11  6:31 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 854 bytes --]

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





[-- Attachment #1.2: Type: text/html, Size: 2688 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-09-11 10:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-11  6:31 first steps with \dosingleempty Goebel, Juergen
2008-09-11  7:21 ` Hans Hagen
2008-09-11  7:56   ` Goebel, Juergen
2008-09-11  8:04     ` Patrick Gundlach
2008-09-11 10:28       ` Goebel, Juergen
2008-09-11 10:37         ` Wolfgang Schuster
2008-09-11  8:12     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).