From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16265 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Re: Some proposed improvements for t-amsl.tex. Date: Thu, 26 Aug 2004 00:35:48 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <651328405.20040826003548@iol.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1093473396 19299 80.91.224.253 (25 Aug 2004 22:36:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Aug 2004 22:36:36 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 26 00:36:23 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 1C06NS-0008IT-00 for ; Thu, 26 Aug 2004 00:36:22 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5D30E12784; Thu, 26 Aug 2004 00:36:20 +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 25148-01; Thu, 26 Aug 2004 00:36:17 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9EE4F12775; Thu, 26 Aug 2004 00:36:17 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3B83312775 for ; Thu, 26 Aug 2004 00:36:15 +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 25051-02 for ; Thu, 26 Aug 2004 00:36:14 +0200 (CEST) Original-Received: from smtp0.libero.it (unknown [193.70.192.33]) by ronja.ntg.nl (Postfix) with ESMTP id 81E841276F for ; Thu, 26 Aug 2004 00:36:14 +0200 (CEST) Original-Received: from localhost (172.16.1.80) by smtp0.libero.it (7.0.027-DD01) id 40D2BD6000DF2F57 for ntg-context@ntg.nl; Thu, 26 Aug 2004 00:36:14 +0200 Original-Received: from ppp-209-130.29-151.libero.it (151.29.130.209) by smtp20.libero.it (7.0.027-DD01) id 40E3F8E20235E556 for ntg-context@ntg.nl; Thu, 26 Aug 2004 00:36:14 +0200 X-Priority: 3 (Normal) Original-To: ConTeXt Resent-From: Giuseppe Bilotta X-Virus-Scanned: by amavisd-new at libero.it Resent-Message-Id: <20040825223614.81E841276F@ronja.ntg.nl> Resent-Date: Thu, 26 Aug 2004 00:36:14 +0200 (CEST) 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:16265 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16265 Hello Moses (uh ... I hope that's the name and Brooks is the surname ... :)), thank you very much for your email; it's very detailed and useful, which is why I've only replied this late (well, also because vacation-style RL popped in, but I digress :)) I'll address a couple of points replying under the relevant text. Monday, August 2, 2004 Brooks Moses wrote: > This inconvenience happens to show up in t-amsl.tex's "align" and "gather" > implementations, which is one place where I really need that compatibility > function. However, it turns out that there's a simple way to rewrite the > implementation so to avoid needing \grabuntil. > Mostly, this works on the fact that the definition of Plain TeX's \eqalign > function can be split apart into a before and after part, as follows: > \def\starteqalign{\null\,\vcenter\bgroup > \openup\jot {\mathsurround=0pt}% > \ialign\bgroup > > \strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil > \crcr} > \def\stopeqalign{\crcr\egroup\egroup\,} > (This, aside from the \bgroup's and \egroup's, is copied directly from > Appendix B of The TeXbook.) Thus, we could expand the instances of > \eqalign in the \startalign and \startgather definitions, shuffle things > around appropriately, and obtain the following: > \def\startalign{\startformula > \let\\\cr > \starteqalign} > \def\stopalign{\crcr\stopeqalign\stopformula} > \def\startgather{\startformula > \def\\{\cr&}% > \starteqalign&} > \def\stopgather{\crcr\stopeqalign\stopformula} > This exactly duplicates the existing functionality in the t-amsl.tex > package. Stop #1. I *enormously* love this idea. Have you been running test cases with this code instead of the one in t-amsl? If so, then I'll put it in the official t-amsl instantly. > However, that functionality could be improved to be a better > match to what's provided in amsmath.tex; in particular, align should accept > multiple columns of equations, and gather should center its lines. Thus, I > propose that the following redefinitions be included in t-amsl: > \def\startalign{\startformula > \let\\\cr > \null\vcenter\bgroup > \openup\jot {\mathsurround=0pt}% > \everycr={}\tabskip=4pt plus1fil \halign to \displaywidth\bgroup > \strut\hfil$\displaystyle{##}$% > \tabskip=0pt &$\displaystyle{{}##}$\hfil% > \tabskip=4pt plus1fil &&\hfil$\displaystyle{##}$% > \tabskip=0pt &$\displaystyle{{}##}$\hfil% > \tabskip=4pt plus1fil \crcr} > \def\stopalign{\crcr\crcr\egroup\egroup\stopformula} > \def\startgather{\startformula > \let\\\cr > \null\,\vcenter\bgroup > \openup\jot {\mathsurround=0pt}% > \ialign\bgroup > \strut\hfil$\displaystyle{##}$\hfil > \crcr} > \def\stopgather{\crcr\crcr\egroup\egroup\,\stopformula} I like it. The only thing I would fix is that instead of the fixed 0pt and 4pt I would set up some \dimens (\intersomethingspacing or so). What do you think? And again, if you have actually been using this code instead of the one in t-amsl, I'll be happy to add it. > Also, a similar method can be used to replicate the split environment > (which, unlike the above, should go inside an explicit \startformula and > \stopformula pair). I propose the following definition be added as well: > \def\startsplit{% > \let\\\cr > \null\,\vcenter\bgroup > \openup\jot {\mathsurround=0pt}% > \ialign\bgroup > > \strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil > \crcr} > \def\stopsplit{\crcr\egroup\egroup\,} > This still doesn't address the fact that the lines in the align and gather > environments are not given individual equation numbers as they should be, > but I think that is a project for another day. Yeah, equation numbering in ConTeXt is something which I left "for another day" myself (I need it for the nath package as well). > P.S. A question: is it intentional that the array environment in t-amsl > produces notably different spacing than LaTeX's array environment? No, it's simply due to the fact that I haven't even bother to check if it were or not, because I didn't care either way :) The parameters are there. We'd only have to check how to use it within the ConTeXt spacing framework. -- Giuseppe "Oblomov" Bilotta