Fitting a Table to a Page Using Non-linear Optimisation
2017-06-06T01:08:37Z (GMT) by
It is sometimes difficult to fit a large table comprising several rows and columns onto a page. The usual tactic is to manually adjust column widths, abbreviate some text and/or change some cells' font sizes until the table fits onto a page. We show that it is possible to express the problem of adjusting column widths so as to minimize the height of a table as an optimization problem with non-linear constraints. Five test problems were routinely solved using a free software package. We stress that the solutions are approximate because the model imperfectly simulates how many lines of a cell of a table will be required to contain a segment of text, but they appear to provide good approximations in difficult cases. The scant literature is summarized; the formulation and solution techniques outlined; examples are described; and differences between theoretical and actual answers explained. It would be possible to incorporate the calculations in word processing and typesetting packages such as Word and TeX.