Re: dynamic programming for gq formatting

2007-08-20 Fir de Conversatie Gary Johnson
On 2007-08-16, [EMAIL PROTECTED] wrote: On Wed, Aug 15, 2007 at 10:55:07AM -0700, Gary Johnson wrote: Oh! I misunderstood. Thanks for the explanation. Yes, that would be a nice alternative to the current algorithm. I recently wrote an implementation of the optimal line breaking

Re: dynamic programming for gq formatting

2007-08-20 Fir de Conversatie Andrew Myers
Gary Johnson wrote: On 2007-08-16, [EMAIL PROTECTED] wrote: On Wed, Aug 15, 2007 at 10:55:07AM -0700, Gary Johnson wrote: Oh! I misunderstood. Thanks for the explanation. Yes, that would be a nice alternative to the current algorithm. I recently wrote an implementation

RE: dynamic programming for gq formatting

2007-08-18 Fir de Conversatie Suresh Govindachar
Ismo Puustinen mentioned: I recently wrote an implementation of the optimal line breaking algorithm (in Ruby). If you are interested, the file is located here, with a small piece of test code at the end: http://lissujaismo.net/rbpar/rbpar_engine.rb You can run the test

Re: dynamic programming for gq formatting

2007-08-15 Fir de Conversatie Georg Dahn
Andrew Myers wrote: Actually, I think I would make the strong claim that what I am talking about is not just some personal preference, but a fairly universal one. All serious text formatting systems try to make line lengths equal (without introducing additional line breaks), because

Re: dynamic programming for gq formatting

2007-08-15 Fir de Conversatie Andrew Myers
On Aug 15, 2007, at 3:21 AM, Matthew Winn wrote: I get the impression that the OP doesn't want right-aligned text, but wants a better distribution of ragged-right lines. For example, consider the first two lines of this paragraph. The naïve breaking algorithm used by my mail client has left

Re: dynamic programming for gq formatting

2007-08-15 Fir de Conversatie Tony Mechelynck
Georg Dahn wrote: Andrew Myers wrote: Actually, I think I would make the strong claim that what I am talking about is not just some personal preference, but a fairly universal one. All serious text formatting systems try to make line lengths equal (without introducing additional line

Re: dynamic programming for gq formatting

2007-08-14 Fir de Conversatie Andrew Myers
On Aug 14, 2007, at 12:52 PM, Kyle Wheeler wrote: On Tuesday, August 14 at 12:04 PM, quoth Andrew Myers: The gq formatting feature in vim is very useful. Has anyone looked into making it do optimal line breaking, so text lines tend to be closer to the same length? There is a dynamic

Re: dynamic programming for gq formatting

2007-08-14 Fir de Conversatie Andrew Myers
On Aug 14, 2007, at 4:31 PM, Georg Dahn wrote: Andrew Myers wrote: Yes, but it would be nice to have it work cross-platform. As long as there's an internal text formatting feature, why not make it do a good job? It does already a good job. It depends on what you want it to do: if you'd