User interfaces as well as documents use tabular layout mechanisms. The HTML table construct and the GridBag layout in Java are typical examples. There are, however, shortcomings of these mechanisms that become obvious with more advanced content like semi-structured data or object-oriented models. We present a generalized table construct that solves these shortcomings and generalizes tabular layouts to a foundation of 2D layout. We describe an algorithm for specifying and rendering user interfaces – and 2D documents in general – using simple but expressive mathematical properties. In particular, the new tabular layout is described by ordinal and linear constraints. The ordinal information makes it possible to describe the general structure of a table and merge multiple cells into rectangular areas. The linear constraints allow it to map particular points of the table to particular coordinates or specify the size of areas in an absolute or relative manner. The resulting layout engi...