From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35374 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Bug in dowithpargument and paragraph ending in a macro Date: Wed, 11 Jul 2007 07:55:48 +0200 Message-ID: <115224fb0707102255y6ecf34a9j3cdf2f07a4614876@mail.gmail.com> References: <115224fb0707092352l22e04075u1671097e0dcfa7ac@mail.gmail.com> <20070710131820.6xrc1atzkckkc8cc@web.mail.umich.edu> 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: sea.gmane.org 1184133373 30018 80.91.229.12 (11 Jul 2007 05:56:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2007 05:56:13 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 11 07:56:11 2007 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 1I8VBH-0003QO-Hv for gctc-ntg-context-518@m.gmane.org; Wed, 11 Jul 2007 07:56:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8C0C120272; Wed, 11 Jul 2007 07:56:06 +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 13541-02; Wed, 11 Jul 2007 07:55:56 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3BA162021C; Wed, 11 Jul 2007 07:55:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C48D42021C for ; Wed, 11 Jul 2007 07:55:53 +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 09970-08 for ; Wed, 11 Jul 2007 07:55:49 +0200 (CEST) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by ronja.ntg.nl (Postfix) with ESMTP id 6A05E2020C for ; Wed, 11 Jul 2007 07:55:49 +0200 (CEST) Original-Received: by wx-out-0506.google.com with SMTP id i27so1697882wxd for ; Tue, 10 Jul 2007 22:55:48 -0700 (PDT) Original-Received: by 10.90.101.19 with SMTP id y19mr3710031agb.1184133348741; Tue, 10 Jul 2007 22:55:48 -0700 (PDT) Original-Received: by 10.90.101.7 with HTTP; Tue, 10 Jul 2007 22:55:48 -0700 (PDT) In-Reply-To: <20070710131820.6xrc1atzkckkc8cc@web.mail.umich.edu> Content-Disposition: inline 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:35374 Archived-At: 2007/7/10, Aditya Mahajan : > Hi Wolfgang, > > Quoting Wolfgang Schuster : > > > > Hi Aditya, > > > > the macro eats the endline char. > > That would mean that tex will parse > ============= > \section why \unknown > > test > > ============= > > as > > =============== > \section why \unknown test > > ================ > > but it does not. What I dislike is the fact that TeX gives an error message. > > Aditya Hi Aditya, the problem lies in the definition of \dowithpargument. The current defintion is: \def\dowithpargument#1% {\def\nextpar##1 \par{#1{##1}}% \def\nextarg##1{#1{##1}}% \doifnextcharelse\bgroup\nextarg{\doifnextcharelse\par{#1{}}\nextpar}} The problem is the space after ##1 in the \nexpar defintion, it should be: \def\dowithpargument#1% {\def\nextpar##1\par{#1{##1}}% \def\nextarg##1{#1{##1}}% \doifnextcharelse\bgroup\nextarg{\doifnextcharelse\par{#1{}}\nextpar}} and everything works fine. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________