1. A system, comprising: a processor; and a computer-readable storage device coupled to the processor, the computer-readable storage device storing instructions that, when executed by the processor, perform operations including: identifying each text line, in a plurality of consecutive text lines, that ends in a hyphen; determining the proximity of at least two non-consecutive lines that end in hyphens; and calculating a hyphenation penalty value based on the determined proximity of the at least two non-consecutive lines that end in hyphens.
2. The system of claim 1 , wherein the operations further comprise selecting an optimal layout for the plurality of consecutive text lines based on the calculated hyphenation penalty value.