From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15690 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \mathpunctuationtrue and latest beta Date: Wed, 14 Jul 2004 15:38:58 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <40F53772.6050302@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1089812558 13561 80.91.224.253 (14 Jul 2004 13:42:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Jul 2004 13:42:38 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 14 15:42:28 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bkk1k-0002ZM-00 for ; Wed, 14 Jul 2004 15:42:28 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EE0781277A; Wed, 14 Jul 2004 15:42:27 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19220-02; Wed, 14 Jul 2004 15:42:27 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 436D612775; Wed, 14 Jul 2004 15:39:04 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3F48812775 for ; Wed, 14 Jul 2004 15:39:01 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17812-06 for ; Wed, 14 Jul 2004 15:39:00 +0200 (CEST) Original-Received: from mailrelay02.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id BE7DF1276B for ; Wed, 14 Jul 2004 15:39:00 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i6EDcv3I020635 for ; Wed, 14 Jul 2004 15:38:57 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 748FD1A95B; Wed, 14 Jul 2004 15:38:59 +0200 (CEST) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 6943C18518 for ; Wed, 14 Jul 2004 13:38:58 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: X-Virus-Scanned: clamd / ClamAV version 0.73, clamav-milter version 0.73a on mailrelay02.solcon.nl X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:15690 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15690 Peter M=FCnster wrote: >Hello, >for some reasons I need something like this: > >\mathpunctuationtrue >\def\MyMacro#1{\stoptable\par#1} >\starttext >\starttable[|c|] >\NC1\NC\AR >\MyMacro{Peter, Olivier} % problem with comma >\stoptext > >But with the latest beta version, this works no more. Could you help ple= ase? >Greetings, Peter > =20 > actually this is a combined problem: (1) in table there is a math switch (the following patch removes that one= ) and (2) you feed #1 to the macro while still in table mode and therefore in=20 the math mode (outer box) and so the , is active etc etc, a solution for=20 that is (for the unpatched table macro) to do a two step macro \unprotect \def\!ttBeginTableA[#1]{% \if #1u% % "unboxed" table \ifmmode \def\!ttEndTable{% % user had better be in display math mode \relax}% % and have only one table at the outer leve= l \else % user had better be in vertical mode \bgroup \def\!ttEndTable{% \egroup}% \fi \else %\hbox\bgroup $ %\def\!ttEndTable{% % \egroup % for the \vtop, \vbox, or \vcenter, yet to come % $% for math mode % \egroup}% for the \hbox %\if #1t% % \vtop %\else % \if #1b% % \vbox % \else % \vcenter % math mode was essential for this % \fi %\fi % \hbox\bgroup \def\!ttEndTable{\egroup\egroup}% \if#1t% \vtop \else\if#1b% \vbox \else \def\!ttEndTable{\egroup$\egroup}% %$\vcenter \scratchtoks\everymath\everymath\emptytoks$\everymath\scratchtoks\v= center \fi\fi % \bgroup % for the \vtop, \vbox, or \vcenter \fi \advance\!taRecursionLevel 1 % RecursionLevel governs initialization \let\!ttRightGlue=3D\relax % This may be changed by \JustCenter, etc \everycr=3D{} \ifnum \!taRecursionLevel=3D1 \!ttInitializeTable \fi} \protect \mathpunctuationtrue \def\MyMacro{\stoptable\doMyMacro} \def\doMyMacro#1{\par#1} test, test \starttext {\starttable[|c|] \NC1,,10\NC\AR \MyMacro{Peter, Olivier} } \stoptext =20 ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------