I'm trying to understand the basics of Knuth's line breaking algorithm. At the beginning of Chapter 12: Glue of his TeXbook, there is a figure like the one below.
My question is: where did those Stretchs and Shrinks come from?

|
I'm trying to understand the basics of Knuth's line breaking algorithm. At the beginning of Chapter 12: Glue of his TeXbook, there is a figure like the one below. My question is: where did those Stretchs and Shrinks come from?
|
||||
| show 3 more comments |
|
The example in the TeXbook has just arbitrary values; assuming units of points, it may can be emulated by the input
If you say If you say When you do a real paragraph, the glue is inserted by the spaces in the input. The amount of glue is font dependent: for example, with cmr10, each space will insert glue equivalent to saying
(but there is the space factor to consider, that might change this amount in some places). The line breaking algorithm decides where each line starts and ends and what's done to each line is exactly analogous to the example before: the goal width is generally the The values for cmr10 can be found in Appendix F, page 433. For a general font one can see the amount of glue inserted by a normal space by saying
as in this context |
|||||||||
|
\hskip 9pt plus 3pt minus 1pt, assuming points as the unit of measure. – egreg May 27 '11 at 13:33\hskipcommand ? – bellochio May 27 '11 at 13:59