From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16084 Path: main.gmane.org!not-for-mail From: Christopher Creutzig Newsgroups: gmane.comp.tex.context Subject: nath problems and patches Date: Fri, 13 Aug 2004 16:15:20 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <411CCCF8.80907@mupad.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1092406636 13711 80.91.224.253 (13 Aug 2004 14:17:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Aug 2004 14:17:16 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 13 16:17:08 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 1Bvcrj-0002XP-00 for ; Fri, 13 Aug 2004 16:17:07 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ACB09127A9; Fri, 13 Aug 2004 16:17:07 +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 27763-06; Fri, 13 Aug 2004 16:17:07 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 283A8127B1; Fri, 13 Aug 2004 16:15:25 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 524F2127B1 for ; Fri, 13 Aug 2004 16:15:23 +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 27763-05-2 for ; Fri, 13 Aug 2004 16:15:22 +0200 (CEST) Original-Received: from mailgate.uni-paderborn.de (unknown [131.234.22.32]) by ronja.ntg.nl (Postfix) with ESMTP id 78669127A9 for ; Fri, 13 Aug 2004 16:15:22 +0200 (CEST) Original-Received: from mlt131.math.uni-paderborn.de ([131.234.103.131]) by mailgate.uni-paderborn.de with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1Bvcpz-0001Pb-PN for ntg-context@ntg.nl; Fri, 13 Aug 2004 16:15:19 +0200 User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: de, en-gb, en, en-us Original-To: ConTeXt Mailingliste X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-UNI-PB_FAK-EIM-MailScanner-Information: Please see http://imap.uni-paderborn.de for details X-UNI-PB_FAK-EIM-MailScanner: Found to be clean X-UNI-PB_FAK-EIM-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=0, required 4) X-MailScanner-From: ccr@mupad.de 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:16084 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16084 Giuseppe, you may or may not know about these problems already, so I decided to simply send them all. I'm using t-nath.tex 2003.12.08, updated five minutes ago from www.tug.org, ConTeXt 2004.6.26, and pdfeTeX 3.14159-1.10b-2.1 (Web2C 7.4.5). nath seems to have trouble with $$...$$-formulas. This file won't compile: \usemodule[nath] \starttext \placeformula $$a$$ \stoptext Error message: Runaway argument? \@@dollar {\to \asciiB \ExpandBothAfter \doifincsnameelse \asciiA \asciiB \ETC. ! File ended while scanning use of \convertargument. Replacing $$...$$ by \startformula...\stopformula fixes this, but the following file won't compile either: \usemodule[nath] \starttext \placeformula \startformula \sum_{i=0}^m a_i\stopformula \stoptext The culprit, it seems, is that \inlinemath uses \xdef, but \mathop@@@ puts unexpandable code into the argument of ^ and _. The following hackery seems to work: \def\mathop@@@{% \ifsp@ ^{\hbox{\edef\noexpand\!!stringa% {\noexpand\noexpand\noexpand\imath@{\the\sp@toks}}% \def\noexpand\\{,\ }\noexpand\!!stringa}} \fi \ifsb@ _{\hbox{\edef\noexpand\!!stringa% {\noexpand\noexpand\noexpand\imath@{\the\sb@toks}}% \def\noexpand\\{,\ }\noexpand\!!stringa}} \fi} Though I must confess I don't understand why the complexity with introducing \!!stringa is needed. The following version works for me: \def\mathop@@@{% \pushmacro\\ \def\\{\noexpand\text{, }}% \ifsp@ ^{\the\sp@toks}% \fi \ifsb@ _{\the\sb@toks}% \fi \popmacro\\} Parentheses in display formulas don't work: \usemodule[nath] \starttext \startformula (x) \stopformula \stoptext I don't know if at some time ConTeXt placed \the\everymath inside \everydisplay, but with the current ConTeXt, you need to \appendtoks to both. I regard the output as broken, but at least it will compile. Another bug: t-nath.tex defines \savecatcode and \restorecatcode, but these names have already been used in verb-ini.tex. I have locally replaced these with \nath!savecatcode and \nath!restorecatcode, seems to work. A math problem not related to nath: \starttext \setupformulae[align=left] \startformula \eqalignno{a&=b\cr c&=d} \stopformula \stoptext doesn't work for me. Anyone else? Regards, Christopher Creutzig PS: I won't be able to read mails in the next four weeks.