Skip to main content
link added
Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)?

The algorithm should aim to output lines of an equal length (which is given as an argument), inserting a variable number of spaces between each pair of adjacent words on the same line to produce a pleasing result.

The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981(Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts. It should be usable with fixed-width fonts by treating them like variable-width fonts, but is there a simpler algorithm tailor-made for monospace fonts?

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)?

The algorithm should aim to output lines of an equal length (which is given as an argument), inserting a variable number of spaces between each pair of adjacent words on the same line to produce a pleasing result.

The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts. It should be usable with fixed-width fonts by treating them like variable-width fonts, but is there a simpler algorithm tailor-made for monospace fonts?

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)?

The algorithm should aim to output lines of an equal length (which is given as an argument), inserting a variable number of spaces between each pair of adjacent words on the same line to produce a pleasing result.

The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts. It should be usable with fixed-width fonts by treating them like variable-width fonts, but is there a simpler algorithm tailor-made for monospace fonts?

Add detail
Source Link
Lassi
  • 125
  • 2

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)? 

The algorithm should aim to output lines of an equal length (which is given as an argument), inserting a variable number of spaces between each pair of adjacent words on the same line to produce a pleasing result.

The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts. It should be usable with fixed-width fonts by treating them like variable-width fonts, but would somethingis there a simpler be good enoughalgorithm tailor-made for monospace textfonts?

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)? The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts, but would something simpler be good enough for monospace text?

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)? 

The algorithm should aim to output lines of an equal length (which is given as an argument), inserting a variable number of spaces between each pair of adjacent words on the same line to produce a pleasing result.

The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts. It should be usable with fixed-width fonts by treating them like variable-width fonts, but is there a simpler algorithm tailor-made for monospace fonts?

Source Link
Lassi
  • 125
  • 2

Algorithm for line breaking in monospace text

Is there a de facto standard algorithm for finding good places to put line breaks in a paragraph of text rendered in a monospace font (e.g. to a text console)? The TeX algorithm (Breaking Paragraphs into Lines, Knuth & Plass 1981) is the go-to algorithm for fancy typesetting with variable-width fonts, but would something simpler be good enough for monospace text?