17. A system comprising at least one programmable processor and a machine-readable storage device storing instructions for execution by the at least one processor, the instructions comprising instructions to: receive an optical character recognition (OCR) document, the OCR document being an electronic document generated by an OCR description of a scanned document and having text comprising a plurality of words, each word comprising one or more characters, each character having a character appearance defined by one or more font properties and each word having a word appearance defined by the font properties of its characters, the OCR document having one or more pages, and each word having a fixed position relative to one of the one or more pages; partition the OCR text into a plurality of groups of words based on the fixed positions of the words relative to their respective pages, the font properties of the words, or both; assign an element from a predefined set of markup language elements to each of two or more groups in the plurality of groups of words, the assigning being based on the fixed positions of the words relative to their respective pages, the font properties of the words, or both; derive an element style for the assigned element after the element is assigned to each of two or more groups of words, the element style comprising a character style, a layout style or both, the character style being derived from the font properties of the characters of the words in the two or more groups of words to which the element is assigned, and the layout style being derived from the text properties of the two or more groups of words to which the element is assigned; and create an electronic document comprising a style sheet defining the element style.
17. A system comprising at least one programmable processor and a machine-readable storage device storing instructions for execution by the at least one processor, the instructions comprising instructions to: receive an optical character recognition (OCR) document, the OCR document being an electronic document generated by an OCR description of a scanned document and having text comprising a plurality of words, each word comprising one or more characters, each character having a character appearance defined by one or more font properties and each word having a word appearance defined by the font properties of its characters, the OCR document having one or more pages, and each word having a fixed position relative to one of the one or more pages; partition the OCR text into a plurality of groups of words based on the fixed positions of the words relative to their respective pages, the font properties of the words, or both; assign an element from a predefined set of markup language elements to each of two or more groups in the plurality of groups of words, the assigning being based on the fixed positions of the words relative to their respective pages, the font properties of the words, or both; derive an element style for the assigned element after the element is assigned to each of two or more groups of words, the element style comprising a character style, a layout style or both, the character style being derived from the font properties of the characters of the words in the two or more groups of words to which the element is assigned, and the layout style being derived from the text properties of the two or more groups of words to which the element is assigned; and create an electronic document comprising a style sheet defining the element style. 19. The system of claim 17 , wherein the text is partitioned into groups of words according to the font properties of the words in the text and the element is assigned solely on the basis of the font properties of the words in the two or more groups of words.