Talk:Word wrap

From Wikipedia, the free encyclopedia

Contents

[edit] Greedy Algorithm Pseudocode

That naive algorithm is indeed naive, it doesn't work properly: Assume the line width to be 6 and that you have two words three letters long. It seems to ignore the space between them and will output 7 letters on one line even though it can break the word. This may have been true once, but it is no longer; however, there remains a bug: if we are considering a word of length L and there are L characters left on the line, we will add the word plus a space, overflowing the line by one character. 128.95.41.178 21:36, 6 February 2007 (UTC)

[edit] Insert line breaks where?

While it's nice to calculate the optimal cost, that's not what we're really interested in. It isn't clear how one can use this algorithm to determine where to insert line breaks. Can I get a hint? — indil 01:02, 15 September 2006 (UTC)

[edit] Where is the "optimal" algorithm used?

I initially implemented the "optimal" algorithm for wrapping a small amount of text in a bitmap image. The article seemed to suggest that the greedy algorithm yielded word wrapping inferior to the recursive algorithm, so I decided to use the recursive one. Unfortunately, the article failed to mention that the word wrapping you get with most word processors uses the greedy algorithm. I added a line to mention this fact and hopefully save everyone else working with this stuff some time.

My question is: Where is the recursive algorithm used?

indil 09:23, 22 September 2006 (UTC)‡

[edit] Common usage

This page should mention the commonly-used number of columns for wrapping in documents, email, etc. —Preceding unsigned comment added by 72.213.54.227 (talk) 12:52, 6 January 2008 (UTC)

[edit] Linear-time implementation of Knuth-Plass

Today, an anonymous editor without explanation blanked the link to my linear-time implementation of Knuth-Plass, and (when I reverted the change as possible vandalism, as anonymous unexplained blanking is usually considered to be) admin Davidgothberg repeated the blanking, on the basis of my conflict of interest, still with no content-based explanation of why removing that link is an improvement. As WP:COI states, "Editing in an area in which you have professional or academic expertise is not, in itself, a conflict of interest. ... When in doubt, defer to the community's opinion." So here I am, deferring to the community's opinion. I don't feel strongly either way about whether the link should stay or go. What I do feel strongly about is that the decision should be made on the basis of what's best for the article and not who made what edit when. So can I see some content-oriented discussion, please, about whether to include it? I will abstain from further input on this issue, myself. —David Eppstein (talk) 17:09, 30 April 2008 (UTC)