From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65611 Path: news.gmane.org!not-for-mail From: Florian Wobbe Newsgroups: gmane.comp.tex.context Subject: prevent gobbling of spaces when omitting optional argument Date: Fri, 28 Jan 2011 23:24:19 +0100 Message-ID: <9314E651-67F6-4CAE-B141-E7793F659082@awi.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296253494 1031 80.91.229.12 (28 Jan 2011 22:24:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Jan 2011 22:24:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 28 23:24:49 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PiwkJ-00051B-TD for gctc-ntg-context-518@m.gmane.org; Fri, 28 Jan 2011 23:24:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3EA4BCA9E3; Fri, 28 Jan 2011 23:24:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CcsVoh-L12Lo; Fri, 28 Jan 2011 23:24:43 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D895FCA988; Fri, 28 Jan 2011 23:24:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AD8FECA983 for ; Fri, 28 Jan 2011 23:24:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xhnggGYPqdTO for ; Fri, 28 Jan 2011 23:24:29 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id AB783CA9C7 for ; Fri, 28 Jan 2011 23:24:29 +0100 (CET) Original-Received: from mails3.awi.de (mails3.AWI.DE [134.1.2.14]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0SMOSc3023148 for ; Fri, 28 Jan 2011 23:24:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by mails3.awi.de (Postfix) with ESMTP id 04428E47B3 for ; Fri, 28 Jan 2011 23:24:28 +0100 (MET) X-Virus-Scanned: amavisd-new at awi.de Original-Received: from localhost ([127.0.0.1]) by localhost (mails3.awi.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id MbIFgGZKNw-F for ; Fri, 28 Jan 2011 23:24:20 +0100 (MET) Original-Received: from msg.awi.de (msg.AWI.DE [134.1.3.16]) by mails3.awi.de (Postfix) with ESMTP id B1CE5E47AB for ; Fri, 28 Jan 2011 23:24:20 +0100 (MET) Original-Received: from [192.168.22.100] ([unknown] [91.61.61.11]) by msg.awi.de (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built Oct 15 2009)) with ESMTPSA id <0LFR00GFA7KKYUF0@msg.awi.de> for ntg-context@ntg.nl; Fri, 28 Jan 2011 23:24:20 +0100 (MET) X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0023 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=134.1.2.14; country=DE; region=03; city=Bremerhaven; latitude=53.5500; longitude=8.5833; http://maps.google.com/maps?q=53.5500,8.5833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08E1aosxE - 921630c77275 - 20110128 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:65611 Archived-At: Hi, please consider the following minimal example: \def\before{\dodoubleempty\dobefore}% \def\dobefore[#1][#2]{before} \starttext \before[] after (should be: \before[]\ after without explicit \type{\ })\par \before[]after\par \before[][] after\par % this works \before[][]after\par \stoptext How can I prevent gobbling the following space, when the second optional argument is not given (i.e. first line). The macro itself should not insert space if the command is followed by any other character (2nd and 4th line). Thanks, Florian ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________