From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77849 Path: news.gmane.org!not-for-mail From: Steffen Wolfrum Newsgroups: gmane.comp.tex.context Subject: Re: math formula linebreak Date: Thu, 9 Aug 2012 23:14:29 +0200 Message-ID: <8CA4E048-0534-41C8-A95B-A7AC920AC287@st.estfiles.de> References: <50241BB0.6050007@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344546888 25752 80.91.229.3 (9 Aug 2012 21:14:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2012 21:14:48 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 09 23:14:46 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sza40-00074m-ND for gctc-ntg-context-518@m.gmane.org; Thu, 09 Aug 2012 23:14:40 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9FE4D10248; Thu, 9 Aug 2012 23:14:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OA4kD+t0+b2B; Thu, 9 Aug 2012 23:14:37 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7FB95101FB; Thu, 9 Aug 2012 23:14:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C560E101FB for ; Thu, 9 Aug 2012 23:14:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id f22nQamRz-To for ; Thu, 9 Aug 2012 23:14:34 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 9F600101F9 for ; Thu, 9 Aug 2012 23:14:34 +0200 (CEST) Original-Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.29.23]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q79LEWL8004667 for ; Thu, 9 Aug 2012 23:14:33 +0200 Original-Received: from [89.247.76.49] (helo=[192.168.1.4]) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Sza3s-00025C-46 for ntg-context@ntg.nl; Thu, 09 Aug 2012 23:14:32 +0200 In-Reply-To: <50241BB0.6050007@gmail.com> X-Mailer: Apple Mail (2.1084) X-Df-Sender: Njk4NTgw X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.67.29.23; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08HIJexP6 - 4966c3b72981 - 20120809 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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 Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77849 Archived-At: Am 09.08.2012 um 22:21 schrieb Prashanth: > > On 09/08/12 09:37, Steffen Wolfrum wrote: >> Hi, >> >> for nice linebreaking we can adjust math formulas by the use of NC, NR alignment. >> >> But if someone only wants long formulas to fit in a defined area, and want them to break automatically ... is there a handy solution? >> >> (Below are examples that don't work) >> >> Thanks, >> Steffen >> ------- >> >> >> \starttext >> >> >> \placeformula >> \startformula[9pt] >> I=\big\{\lambda u(x_0-\pi^H K)+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'}) >> +(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\}-\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'}) >> +(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}. >> \stopformula >> >> >> >> \defineframedtext >> [defbackground] >> [width=10cm, >> frame=on, >> location=paragraph] >> >> >> \startdefbackground >> \placeformula >> \startformula[9pt] >> I=\big\{\lambda u(x_0-\pi^H K)+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'}) >> +(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\} -\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'}) >> +(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}. >> \stopformula >> \stopdefbackground >> >> >> >> >> >> \definelayer[mylayer] >> >> >> \setlayerframed >> [mylayer] >> [x=25mm, >> y=85mm, >> height=43.5mm, >> width=10cm,align=block] >> { >> \placeformula >> \startformula[9pt] >> I=\big\{\lambda u(x_0-\pi^H K)+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'}) >> +(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\} -\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'}) >> +(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}. >> \stopformula >> } >> >> \setupbackgrounds[page][background=mylayer] >> >> >> >> >> >> >> \stoptext >> > When I needed something like that, I used \allowbreak with inlinemath. In your case, you could do: > \bTABLE[frame=on,align=right,width=10cm] > \bTR > \bTD > $I=\big\{\lambda u(x_0-\pi^H K)\allowbreak+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'})\allowbreak+(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\}\allowbreak -\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'})\allowbreak+(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}.$ > \eTD > \eTR > \eTABLE > > This will just flow it like regular text. I don't know if this is good enough for your needs. If not, you can add another way to your list of ways ;-). Hey, you skipped start/stopformula and used a $$ environment?! Why not, that's a quite clever approach (... actually, it's a quite efficient workaround for my needs). Thank you Prash, thank you very much! Steffen ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________