From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85177 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: Argument of \startInvoice has an extra }. Date: Sat, 09 Nov 2013 23:54:05 +0100 Message-ID: <8761s16vaq.fsf@micropit.couberia.selfip.net> References: <878uwxut3q.fsf@micropit.couberia.selfip.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1384037649 29073 80.91.229.3 (9 Nov 2013 22:54:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Nov 2013 22:54:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Nov 09 23:54:15 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VfHPw-0004Av-OB for gctc-ntg-context-518@m.gmane.org; Sat, 09 Nov 2013 23:54:12 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0A7171020F; Sat, 9 Nov 2013 23:54:11 +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 pFk3h56SLoJh; Sat, 9 Nov 2013 23:54:09 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7202E101F6; Sat, 9 Nov 2013 23:54:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4E7BF101F6 for ; Sat, 9 Nov 2013 23:54:08 +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 dl7mSMAk1RqN for ; Sat, 9 Nov 2013 23:54:07 +0100 (CET) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 88C06101DE for ; Sat, 9 Nov 2013 23:54:07 +0100 (CET) Original-Received: from smtp.smtpout.orange.fr (smtp10.smtpout.orange.fr [80.12.242.132]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rA9MwO17022887 for ; Sat, 9 Nov 2013 23:58:24 +0100 Original-Received: from micropit.couberia.selfip.net ([86.214.46.130]) by mwinf5d33 with ME id nau51m00k2oXcZS03au570; Sat, 09 Nov 2013 23:54:06 +0100 Original-Received: by micropit.couberia.selfip.net (Postfix, from userid 1000) id 84573A606F7; Sat, 9 Nov 2013 23:54:05 +0100 (CET) Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: (Aditya Mahajan's message of "Sat, 9 Nov 2013 17:33:48 -0500 (EST)") User-Agent: Gnus/5.130008 (=?utf-8?Q?=E7=9C=9F?= Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.132; country=FR; latitude=48.8600; longitude=2.3500; http://maps.google.com/maps?q=48.8600,2.3500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04KLyWoND - 7e74456e21f8 - 20131109 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85177 Archived-At: On Sat, Nov 09 2013, Aditya Mahajan wrote: > One possibility is to restrict optional arguments to one line: > > \def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice} > \def\dobeginInvoice[#1]{\egroup\grabbufferdata[myLetter][beginInvoice][endInvoice]} Thanks. How did you find the reason for the error (and the solution)? Is there also a solution with support for multiple lines? Unfortunately this does not work: --8<---------------cut here---------------start------------->8--- \def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\egroup\getparameters[PRM][#1]% \grabbufferdata[myLetter][beginInvoice][endInvoice]} \def\endInvoice{\getbuffer[myLetter]} \def\startInvoice#1\stopInvoice{#1} \starttext \beginInvoice[bla=blub, blub=bla] \startInvoice test \PRMblub \stopInvoice \endInvoice \beginInvoice \startInvoice test \stopInvoice \endInvoice \stoptext --8<---------------cut here---------------end--------------->8--- TIA, -- Peter ___________________________________________________________________________________ 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 ___________________________________________________________________________________