1. A method of document composition comprising the steps of: a. specifying problem variables by identifying at least 1 document parameter that can be changed; b. specifying value domains for each variable, by identifying valid ranges for the associated document parameter; c. specifying one or more layout constraints which further constrain the value domains of associated document parameter variables; and d. determining a layout for the document such that the values chosen for the document parameters pass all of the specified constraints, according to one of a plurality of existing constraint satisfaction algorithms.