Automated Paragraph Layout

Information

  • Patent Application
  • 20070186155
  • Publication Number
    20070186155
  • Date Filed
    March 21, 2007
    17 years ago
  • Date Published
    August 09, 2007
    17 years ago
Abstract
Methods and apparatus for calculating paragraph layout. A method begins with a first node in a paragraph and calculates an optimal line break scheme for paragraph layout that ended in the node. For every subsequent node in the paragraph, the method calculates an optimal line break scheme for paragraph layout that ends respectively in every subsequent node. Each optimal line break scheme is calculated by minimizing the total of a penalty value of a current line and all preceding penalties of all preceding lines. The preceding penalties of all preceding lines are defined by a previously calculated optimal line break scheme.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a diagram illustrating a series of constant-length lines for paragraph layout.



FIG. 2 is a diagram illustrating incorporation of text within the lines shown in FIG. 1 according to a possible paragraph layout.



FIGS. 3 and 4 are exemplary diagrams illustrating two scenarios having a series of varied-length lines disposed for paragraph layout.



FIGS. 5-7 are flow diagrams illustrating exemplary implementations of automated paragraph layout.



FIG. 8 is a series of illustrative diagrams showing potential output following each step of an exemplary process for automated paragraph layout.



FIG. 9 is a flow diagram illustrating a process that accounts for one or more potentially varying node widths.



FIGS. 10-12 are exemplary diagrams illustrating three different paragraph cells that contain lines that are broken into more than one tile.



FIG. 13 is a flow diagram illustrating a process of analyzing a paragraph that has at least one multi-tile line.



FIG. 14 is a flow diagram illustrating a process for analyzing a multi-tile line.


Claims
  • 1. A system comprising: a user input device, a display, a memory device, and a processor programmed to: beginning with a first node in the reading order of a paragraph, calculate an optimal line break scheme for a paragraph layout that ends with the node; andfor every subsequent node in the reading order of the paragraph, calculate an optimal line break scheme for a paragraph layout that ends with that subsequent node, wherein each optimal line break scheme is calculated by minimizing the total of a penalty value of a current line and all preceding penalties of all preceding lines, the preceding penalties of all preceding lines being defined by a previously calculated optimal line break scheme; andselect a layout for the paragraph in accordance with the optimal line break scheme of a last node in the paragraph.
  • 2. The system of claim 1, where the processor is further programmed to: maintain an index of possible start nodes of the current line, andfor at least one node in the paragraph, adjust the index prior to calculating an optimal line break scheme for a paragraph layout that ends with that one node.
  • 3. The system of claim 2, where the index is maintained in a queue.
  • 4. The system of claim 2, where the processor is further programmed to: for every subsequent node in the paragraph, adjust the index prior to calculating an optimal line break scheme for a paragraph layout that ends with that subsequent node.
  • 5. The system of claim 2, where the processor is further programmed to: for at least one node in the paragraph, calculate a width of a current line prior to calculating an optimal line break scheme for a paragraph layout that ends with that one node and after adjusting the index.
  • 6. The system of claim 4, where the processor is further programmed to: for every subsequent node in the paragraph, calculate a width of the current line prior to calculating an optimal line break scheme for a paragraph layout that ends with that subsequent node and after adjusting the index.
  • 7. The system of claim 5, where the processor is further programmed to: for at least one node in the paragraph, re-calculate an optimal line break scheme for paragraph layout that ended in that one node, when the width of the current line is less than a width of a line immediately preceding it.
  • 8. The system of claim 5, where the processor is further programmed to: for at least one node in the paragraph, re-calculate an optimal line break scheme for paragraph layout that ended in that one node, when the width of the current line is a defined amount less than a width of a line immediately preceding it.
  • 9. The system of claim 1, where the processor is further programmed to: format the paragraph in accordance with the optimal line break scheme of the last node in the paragraph.
Provisional Applications (1)
Number Date Country
60252863 Nov 2000 US
Continuations (1)
Number Date Country
Parent 10181882 Jul 2002 US
Child 11689432 US