From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77848 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: math formula linebreak Date: Thu, 09 Aug 2012 23:07:42 +0200 Message-ID: <5024269E.70209@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344546506 22679 80.91.229.3 (9 Aug 2012 21:08:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2012 21:08:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 09 23:08:27 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 1SzZxx-0005JW-Uv for gctc-ntg-context-518@m.gmane.org; Thu, 09 Aug 2012 23:08:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D027210248; Thu, 9 Aug 2012 23:08:24 +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 PQBQTbbwUhCh; Thu, 9 Aug 2012 23:08:23 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EEBC2101FB; Thu, 9 Aug 2012 23:08:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DFA3C101FB for ; Thu, 9 Aug 2012 23:08:21 +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 yz4rXQEMgKKt for ; Thu, 9 Aug 2012 23:08:20 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 3C7D9101F9 for ; Thu, 9 Aug 2012 23:08:20 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q79L8JBB007040 for ; Thu, 9 Aug 2012 23:08:19 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 2265-1713362 for multiple; Thu, 09 Aug 2012 23:08:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=03; city=Hattem; latitude=52.4724; longitude=6.0696; http://maps.google.com/maps?q=52.4724,6.0696&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RHIJ8jcC - 33c3618784eb - 20120809 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:77848 Archived-At: On 9-8-2012 20:53, Aditya Mahajan wrote: > On Thu, 9 Aug 2012, Sietse Brouwer wrote: > >> Steffen Wolfrum wrote: >>>> them to break automatically ... is there a handy solution? >> >> Aditya Mahajan wrote: >>> Short answer: No easy solution exists. >> >> Is this because allowing automatic line breaks in math mode is itself >> hard to implement, or is the basic mechanism possible but preventing >> stupid/ugly breakpoints is hard? Because I can imagine a 70 percent >> solution being a big help already. > > Partly both. > > The question is not so much the difficulty in choosing break-points > (which is easy: before all \mathbin atoms, after \mathpunct if needed, > etc). The hard part is how to align the split up portions, and choosing > different alignments changes the line widths, and therefore affect > future line-breaks. > > The old manual of breqn (the one by Michel Jones) had some discussion on > the different alignment of display math. They are also explained nicely > in the book on typesetting math by AMS (I forget the author's name). > > In principle, one can follow the same approach as Knuth did for > line-breaking text (define penalties and then solve a dynamic program to > find the layout that gives the lowest score). The breqn package does > implement such an algorithm that works well in most cases. I wish that > the breqn algorithm were described somethere; then one could play around > implementing it in luatex. Trying to read breqn code to understand the > algorithm is very difficult. When I'm done ceaning up the pending tex and lua code, I'll look into these issues. It's probably not that hard to come up with a solution in lua (one of the pet projects on my list). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________