1. A machine-implemented method of processing an electronic document, comprising: receiving explicit logical blocks extracted from the electronic document, each of the explicit logical blocks corresponding to a content region of the electronic document assigned a respective content style; determining layout relationships among the explicit logical blocks; based on the layout relationships, generating rules constraining layout variations among implicit logical blocks to approximate the electronic document in appearance while accommodating variable content, wherein each of the implicit logical blocks corresponds to a respective one of the explicit logical blocks and accommodates variable content having the content style assigned to the corresponding explicit logical block; and storing the rules in a machine-readable medium.