From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26602 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: intertext for aligned equations Date: Wed, 29 Mar 2006 01:42:33 -0500 (EST) Message-ID: References: <4427AA2E.1070203@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1143614577 1578 80.91.229.2 (29 Mar 2006 06:42:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Mar 2006 06:42:57 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 29 08:42:55 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1FOUOJ-000602-Ak for gctc-ntg-context-518@m.gmane.org; Wed, 29 Mar 2006 08:42:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C34281279B; Wed, 29 Mar 2006 08:42:49 +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 02971-05; Wed, 29 Mar 2006 08:42:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A81B412778; Wed, 29 Mar 2006 08:42:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D899A12778 for ; Wed, 29 Mar 2006 08:42:41 +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 03201-03 for ; Wed, 29 Mar 2006 08:42:40 +0200 (CEST) Original-Received: from playinggod.mr.itd.umich.edu (playinggod.mr.itd.umich.edu [141.211.14.79]) by ronja.ntg.nl (Postfix) with SMTP id ECC7512775 for ; Wed, 29 Mar 2006 08:42:39 +0200 (CEST) Original-Received: from aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) by playinggod.mr.itd.umich.edu (smtp) with ESMTP id k2T6gXmm016774 for ; Wed, 29 Mar 2006 01:42:38 -0500 Original-To: mailing list for ConTeXt users In-Reply-To: <4427AA2E.1070203@elvenkind.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:26602 Archived-At: <--- On Mar 27, Taco Hoekwater wrote ---> > > > Hi, > > Aditya Mahajan wrote: > >> This seems to be working fine. However, \intertext defined in >> amsmath.sty seems to be doing a lot more (I just can't figure out >> what it is doing?) Can someone suggest how to make the above command >> more robust on the lines of \intertext? > > It inserts a post/pre-display skip&penalty pair around the intertext, > then creates a \vbox for use a paragraph. The result is (almost) as if > it the text was part of the 'normal' text flow between two displays. > > I cannot tell you if this would work exactly the same as expected in > ConTeXt (needs further testing), but a context-like solution would > look like this: > > \def\startintertext#1\stopintertext{% > \noalign{\dointertext{#1}}\NR} > > \unexpanded\def\dointertext#1% > {\penalty\postdisplaypenalty > \afterdisplayspace % the matching \before... is not needed > \vbox{\forgetall \noindent #1\par}% > \penalty\postdisplaypenalty } > This does not look good. Consider, \def\startintertext#1\stopintertext{% \noalign{\dointertext{#1}}\NR} \unexpanded\def\dointertext#1% {\penalty\postdisplaypenalty \afterdisplayspace % the matching \before... is not needed \vbox{\forgetall \noindent #1\par}% \penalty\postdisplaypenalty } \startformula \startalign \NC A_1 \NC= \left| \int_0^1 (x^2 - 3x)\, dx \right| + \left| \int_1^2 (x^2 -5x + 6)\, dx \right| \NR \startintertext Take limits of both integrals \stopintertext \NC \NC = \left| \frac{x^3}{3} - \frac{3}{2} x^2 \right|_0^1 + \left| \frac {x ^3}{3} - 7 \frac{5}{2} x^2 + 6x \right|_1^2 \NR \NC \NC = \left| - \frac{7}{6} \right| + \left|\frac{14}{3} - \frac{23}{6}\right| = \frac{7}{6} + \frac{5}{6} = 2 \NR \stopalign \stopformula There is too much space after the intertext and the next line. Can you provide some magic to reduce this space. Thanks, Aditya -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008