This module provides a straightforward implementation of the algorithm used by TeX to format paragraphs. For a full description, see the reference. The module provides the ObjectList class, which is a list of Box , Glue , and Penalty instances. The elements making up a paragraph of text should be assembled into a single ObjectList .
Boxes represent characters of type, and their only attribute is width.
Penalties are used to encourage or discourage breaking a line at a given point. Boxes have a fixed width that doesn't change. Glue has a preferred width, but it can stretch up to an additional distance, and can shrink by a certain amount. Line breaks can be placed at any point where glue immediately follows a box. Return how long this glue should be, for the given adjustment ratio r.