From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25280 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: math align Date: Mon, 16 Jan 2006 21:41:24 +0100 Message-ID: <43CC04F4.3090203@wxs.nl> References: <43CACEB2.7030708@wxs.nl> <43CB6121.6080100@elvenkind.com> <32913C44-E504-4DA9-AC9A-63C40A0C8E77@cox.net> <43CBE301.90206@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137444215 5692 80.91.229.2 (16 Jan 2006 20:43:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2006 20:43:35 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 16 21:43:29 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 1EybBX-0003oE-Uk for gctc-ntg-context-518@m.gmane.org; Mon, 16 Jan 2006 21:42:40 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 60FAF12877; Mon, 16 Jan 2006 21:42:39 +0100 (CET) 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 04310-10-2; Mon, 16 Jan 2006 21:42:36 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 709F612813; Mon, 16 Jan 2006 21:42:36 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 77FE312813 for ; Mon, 16 Jan 2006 21:42:34 +0100 (CET) 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 04310-10 for ; Mon, 16 Jan 2006 21:42:33 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id 6EB961280D for ; Mon, 16 Jan 2006 21:41:25 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 966 for ; Mon, 16 Jan 2006 15:52:21 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: 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: , 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:25280 Archived-At: David Arnold wrote: > Hans, Willi, et al, > > I was thinking there are pros and cons to each solution, Hans' and > Willi's. So I tried: > > Here are some simple examples of adding fractions already having > common denominators. > > %output=pdf > > \input math-ext > > \starttext > > \placeformula[-] > \startformula > \startalign[m=2,distance=5em] > \frac5{21}-\frac3{21}&=\frac{5-3}{21} & > \frac{2}{x+2}-\frac{x-3}{x+2}&=\frac{2-(x-3)}{x+2}\\ > &=\frac2{21} & &=\frac{2-x+3}{x+2}\\ > &&&=\frac{5-x}{x+2} > \stopalign > \stopformula > > \startbuffer[1] > \framed[frame=on,width=fit] > {\startformula > \eqalign{ > \frac{5}{21}-\frac{3}{21} > &=\frac{5-3}{21}\cr > &=\frac{2}{21}} > \stopformula} > \stopbuffer > > \startbuffer[2] > \framed[frame=on,width=fit] > {\startformula > \eqalign{ > \frac2{x+2}-\frac{x-3}{x+2} > &=\frac{2-(x-3)}{x+2}\cr > &=\frac{2-x+3}{x+2}\cr > &=\frac{5-x}{x+2}} > \stopformula} > \stopbuffer > > \startbuffer > \startcombination[2*1] > {\externalfigure[1][width=0.45\textwidth,type=buffer]}{} > {\externalfigure[2][width=0.45\textwidth,type=buffer]}{} > \stopcombination > \stopbuffer > > \placefigure > [][-] > {none} > {\getbuffer} > > \stoptext > > As you can see, Hans' solution works perfectly, but note the very > ugly source code for that section. Willi's source is cleaner, much > easier to read (especially at a later date when I will have to > revisit for revisions), but it doesn't work (the output is scaled of > course). > > Any suggestions as to how I can fix Willi's approach so it doesn't > scale? wikiable: \definecombination[twoformulas][location=top,align=middle] \startalignment[middle] \dontleavehmode \startcombination[twoformulas][2*1] {\getbuffer[1]} {} {\getbuffer[2]} {} \stopcombination \stopalignment \def\StartTwo{\startalignment[middle] \dontleavehmode \startcombination[twoformulas][2*1]} \def\StopTwo {\stopcombination \stopalignment}] \StartTwo {\getbuffer[1]} {} {\getbuffer[2]} {} \StopTwo \StartTwo {\getbuffer[1]} {correct} {\getbuffer[2]} {wrong} \StopTwo