Implement calculation of safe paragraph width.
Refactor lineNumbers into a common module.
Add ancestor boxes to interface.
Implement Rich pagination.
Add basic support for Rich layout.