From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/43871 Path: news.gmane.org!not-for-mail From: "Goebel, Juergen" Newsgroups: gmane.comp.tex.context Subject: first steps with \dosingleempty Date: Thu, 11 Sep 2008 08:31:11 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2075053980==" X-Trace: ger.gmane.org 1221114758 32561 80.91.229.12 (11 Sep 2008 06:32:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2008 06:32:38 +0000 (UTC) To: Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 11 08:33:33 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KdfkB-0001qJ-4x for gctc-ntg-context-518@m.gmane.org; Thu, 11 Sep 2008 08:33:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7F6871FE86; Thu, 11 Sep 2008 08:32:28 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16239-03-4; Thu, 11 Sep 2008 08:31:56 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7F1031FE45; Thu, 11 Sep 2008 08:31:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B49051FE45 for ; Thu, 11 Sep 2008 08:31:51 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18440-01-4 for ; Thu, 11 Sep 2008 08:31:12 +0200 (CEST) Original-Received: from mailde1.eads.com (mailde1.eads.com [80.156.44.82]) by ronja.ntg.nl (Postfix) with ESMTP id 235DA1FDC6 for ; Thu, 11 Sep 2008 08:31:11 +0200 (CEST) Original-Received: from de-gate2.mailhub.intra.corp ([53.154.243.34]) by mailde1.eads.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Sep 2008 08:31:53 +0200 Original-Received: from deimsg51.de.net.world ([149.207.23.51]) by de-gate2.mailhub.intra.corp with Microsoft SMTPSVC(5.0.2195.6713); Thu, 11 Sep 2008 08:35:08 +0200 Original-Received: from deimsg12.de.net.world ([149.207.23.219]) by deimsg51.de.net.world with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Sep 2008 08:31:12 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: first steps with \dosingleempty Thread-Index: AckT1/s3ewydzIEYSK2FAYijoEtTdg== X-OriginalArrivalTime: 11 Sep 2008 06:31:12.0088 (UTC) FILETIME=[FBD7A580:01C913D7] X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:43871 Archived-At: This is a multi-part message in MIME format. --===============2075053980== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C913D7.FB565A34" This is a multi-part message in MIME format. ------_=_NextPart_001_01C913D7.FB565A34 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 ------_=_NextPart_001_01C913D7.FB565A34 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable first steps with \dosingleempty

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




------_=_NextPart_001_01C913D7.FB565A34-- --===============2075053980== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============2075053980==--