TEXT PROCESSING SYSTEM

Abstract: A Data processing system with a comprehensive pagination facility is described which combines an automatic pagination function with an interactive paginate function. With this technique the operator is allowed to insert both Page End and Required Page End controls, although the automatic pagination function makes page ending decisions during both the creation and revision of text. The operator can then interactively paginate the document while being allowed to view each page ending decision and optionally accept the page break location or reposition the suggested page break location to a different line on the page.

Description: This invention relates to data processing systems in general and more particularly to a technique dynamically adjusting page boundaries during the creation or revision of a text job while accommodating an interactive page length adjustment process. One of the inherent problems in computer systems, from the end user's standpoint, is the trade-off between ease of use (usability) and function (power). Product positioning for programmed computer systems is often illustrated as a two dimensional graph showing usability versus power. The challenge to the developer of computer systems, and in particular, the software, is to maximize both usability and power. In word processing programs, this problem is illustrated in the variety of methods used to divide a text document into pages. Some word processing programs have attempted to optimize usability, while allowing the user little control or flexibility in determining the location of page breaks. Other word processing programs have attempted to give the user complete control over the location of page breaks, but as a result of this operator control, require extra work on the part of the operator for even the simplest of situations. As will be described in detail below, the technique of this invention provides the user with an easy to use function that does not sacrifice the complete control that the user may require. The IBM DisplayWrite 1 word processing program is based on an IBM datastream known as the Revisable Form Text Document Control Architecture (RFTDCA). This datastream defines two control characters: Page End and Required Page End. A Page End control ends a page (causes a page break). A Required Page End control has no effect on page breaks. It must be followed by a Page End. It is used to indicate to a "Paginate" function where a page should be ended. A Paginate function is defined as a function that adjusts page breaks. The number of lines placed on each page is based on the size of the text typing area for the page (the page length less the top and bottom margin area). DisplayWrite 1 provides the user with the following functions: 1. The ability to insert a Page End control (thus ending the current page and causing subsequent text to begin on a new page). 2. The ability to insert a Required Page End control. 3. An Interactive Paginate function, which automatically makes page ending decisions based on the line count for each page or the occurrence of a Required Page End control, and allows the user to view each page ending decision and optionally accept the page break location or reposition the page break location higher or lower on the page. The Interactive Paginate function repositions Page End controls to the accepted page break locations. The user can avoid widow lines (a situation in which the first line of a new paragraph appears as the last line on a page) and orphan lines (a situation in which the last line of a paragraph is the first line of a page) by repositioning the page break up or down one or more lines before accepting the page break location. The Interactive Paginate function always keeps blank lines at the end of a paragraph on the same page as the paragraph (a blank line is never placed as the first line on a page). These functions allow the user complete control over the page breaks in a document, but have several limitations that affect the usability of the program. First, as the user creates a new document, if he wishes to view the page breaks as he is typing, he must manually insert Page End codes at the appropriate locations. A user may type an entire document without entering any page breaks, but in this case the user must subsequently perform the Interactive Paginate function. The program does not have the capability to automatically make page ending decisions. Second, to effectively force a short page, the user must insert a Required Page End control and a Page End control, since the Required Page End control does not cause a page break by itself. Additionally, when the document is revised, the user must either manually move each Page End control to readjust page breaks, or perform the Interactive Paginate function again. Page breaks are not automatically adjusted by the program. The IBM Writing Assistant word processing program is not based on the RFTDCA datastream. It implements a New Page control that has the semantics of a Page End. Writing Assistant provides the user with the ability to insert a New Page control (thus ending the current page and causing subsequent text to begin on a new page). Additionally Writing Assistant provides an Automatic Paginate function, which automatically makes page ending decisions based on the line count for each page or the occurrence of a New Page control, and causes subsequent text to be placed on the next page. No adjustment is made for blank lines appearing at the top of a page, or widow or orphan lines appearing at the bottom of a page. These functions automatically handle the pagination for the user, and thus for a user with no more functional requirements, are very easy to use. However, they give the user very little control over the page breaks in a document, and have several functional limitations. First, to prevent widow lines from appearing at the bottom of a page, or to avoid splitting a table or logically related set of lines over two pages, the user must place a New Page control in the document. Since there is no Paginate function that will reposition a New Page control, if the document is subsequently revised, the user must manually remove such controls that are no longer appropriate. Second, to control the placement of blank lines at the top of a page, the user must delete any blank lines following the paragraph on the preceding page. If the document is subsequently revised, the user must manually go back and insert the blank lines between the paragraphs. US Patent 4,498,150 describes a method for automatically paginating a data stream in a word processing system. A vertical tracking register is incremented by a value representing the displacement of the vertical print position when a line end code is encountered. The page overflow latch is then interrogated to determine whether a page overflow condition has occurred. If a page overflow condition has occurred, the next character in the data stream following a line end code is interrogated to determine whether the character is a graphic character. If the character is a graphic character, a page end code is copied into the output buffer ahead of the graphic character, the page overflow latch is reset and the tracking register is initialized. The tracking register value is then interrogated to determine whether it exceeds the last typing line. If the last typing line value has been exceeded, the page overflow latch is set. The page overflow latch is subsequently interrogated to determine whether a page overflow condition exists. If not, the input character is copied from the input buffer to the output buffer. It would, therefore, very significantly increase the usability and power of a word processing system to provide both an automatic pagination function, operative during document creation and revision, and an interactive page length adjustment function which allows the automatic replacement of user inserted page end controls. Accordingly, this invention achieves a synergism of these two approaches, keeping the high ease of use associated with the Automatic Paginate function, and the power and control of the Interactive Paginate function. With this new technique the user is provided with the following functions: 1. The ability to insert a Page End control (thus ending the current page and causing subsequent text to begin on a new page). 2. The ability to insert a Required Page End control. The semantics of the Required Page End control are redefined as follows: the control ends a page (causes a page break) just as a Page End control, and is never moved or deleted by a Paginate function. 3. An Automatic Paginate function, which automatically makes page ending decisions based on the line count for each page or the occurrence of a Page End control or Required Page End control, and causes subsequent text to be placed on the next page. The Automatic Paginate function always keeps blank lines at the end of a paragraph on the same page as the paragraph (a blank line is never placed as the first line on a page). 4. An Interactive Paginate function, which automatically makes page ending decisions based on the line count for each page or the occurrence of a Required Page End control, and allows the user to view each page ending decision and optionally accept the page break location or reposition the page break location higher on the page. The Interactive Paginate function deletes Page End controls, and only leaves Page End controls in the document if the accepted page break location is not the default (the location used by the Automatic Paginate function). The new method provides both superior ease of use characteristics and power to a word processing program by: (1) automatically handling blank lines at the end of a page in the Automatic Paginate function, (2) treating a Required Page End control as causing a page break, and (3) having the Interactive Paginate function remove Page End controls that are not necessary (because they fall at the point where the Automatic Paginate function will cause a page break without them). According to the invention there is provided a data processing system including a text processing control system including means for automatically ending a page responsive to a preset line count during creation of said page; characterised by further including means for ending said page shorter than said automatic ending upon operator entry of a page end control code during said creation of said page; means for effecting an automatic page length adjustment operation subsequent to said creation of said page; and means for deleting said page end control code during said automatic page length adjustment operation when said page end control code is positioned on said page prior to said preset line count. In order that the invention may be fully understood, a preferred embodiment thereof will now be described with reference to the accompanying drawings in which: Fig. 1 is a block diagram of a data processing system which includes a stored program for performing word processing functions including the functions of this invention. Fig. 2 is a flow diagram of the operations included in the automatic pagination function of this invention. Fig. 3 is a flow diagram of the operations included in the interactive paginate function of this invention. Beginning with reference to the block diagram of Fig 1, a typical personal computer architecture is shown, such as the configuration used in the IBM Personal Computer. The focal point of this architecture comprises a microprocessor 1 which may, for example, be an Intel 8088 or similar microprocessor. The microprocessor 1 is connected to a bus 2 which comprises a set of data lines, a set of address lines and a set of control lines. A plurality of I/O devices or memory or storage devices 3-8 are connected to the bus 2 through separate adapters 9-14, respectively. For example, the display 4 may be the IBM Personal Computer Colour Display and the adapter 10 may, accordingly, be the IBM Colour/Graphics Adapter. The other devices 3 and 5-8 and adapters 9 and 11-14 are either included as part of an IBM Personal Computer or are available as plug-in options from the IBM Corporation. For example, the random access memory 6 and the read-only memory 8 and their corresponding adapters 12-14 are included as standard equipment in the IBM Personal Computer, although additional random access memory to supplement memory 6 may be added via a plug-in memory expansion option. Within the read-only memory 8 are stored a plurality of instructions, known as the basic input/output operating system, or BIOS, for execution by the microprocessor 1. The BIOS controls the fundamental operations of the computer. An operating system such as the IBM Personal Computer Series Disk Operating System by Microsoft Corporation, or DOS, most commonly used with the IBM Personal Computer family, is loaded into the memory 6 and runs in conjunction with the BIOS stored in the ROM 8. It will be understood by those skilled in the art that the personal computer system could be configured so that parts or all of the BIOS are stored in the memory 6 rather than in the ROM 8 so as to allow modifications to the basic system operations by changes made to the BIOS program, which would then be readily loadable into the random access memory 6. An application program such as the IBM DisplayWrite 1 word processing program may also be loaded into the memory 6 to provide instructions to the microprocessor 1 to enable a comprehensive set of word processing tasks, including the creation and revision of text documents, along with the automatic paginate and interactive paginate functions of this invention, to be performed by the personal computer system shown in FIG. 1. An application program loaded into the memory 6 is said to run in conjunction with the disk operating system previously loaded into the memory 6. Refer now to Fig. 2 for a description of the flow diagram of the operations included in the automatic pagination function of this invention. The operation begins by a test at block 20 to determine if a current character in the text being tested is the type of control code which can be used to end a line. If not, this automatic pagination process is exited at this point, since a page must end at a line boundary. If the character being tested at block 20 is the type of control which may be used to end a line, the operation proceeds to block 22 wherein a test is made to determine if the line number plus the line spacing is greater than the last body text line, which is a preset page format value based on the page length less the bottom margin area. If not, the process is exited since this test indicates that the next line of text will fit on the current page. If, at block 22 the line number plus line spacing exceeds the last body text line then the operation proceeds to block 23 to determine if the line ender is detected while in a header or footer mode. If so, the process exits, since there cannot be multiple pages in a header or footer. If not, the operation proceeds to block 24 wherein a test is made to determine if a paragraph adjust routine is in progress. If so, the process exits to allow the paragraph adjust routine to complete the adjustment of the paragraph even if the paragraph will end up being split between two pages. This will prevent the situation which could otherwise exist of having the line lengths adjusted for a paragraph until the end of the page is reached and then displaying the remainder of the paragraph without properly adjusted line lengths on the following page. Assuming at block 24 that the system is not in the paragraph adjust mode, the operation then proceeds to block 25 wherein the character following the control tested above is examined. This character being examined at block 25 is the first character of the succeeding line of text. If this character is the type of control code that can be used to end a line or a page, the process is exited at this point to avoid placing blank lines at the top of a page. If however, this character is not a line ender or page ender, at block 27 the current character is subsequently treated as a page ender to cause a page break at this point and the process is exited. The character following the current character treated as a page ender at block 27 becomes the beginning character on the following page. The following programming design language listing is another form of the description of the above described automatic pagination process. This listing parallels the operation described above relative to Fig. 2. Fig. 3 is a flow diagram of the operations included in the interactive paginate function of this invention. At block 30 a next character in the document is obtained. At block 31 a test is made to determine if this next character is a Page End control code. If the character is a Page End control code, this control code is deleted at block 32 and the operation proceeds to block 39 to determine if the end of the document has been reached. If not, the operation loops back to block 30 for a next character to be tested. It will be understood that the Page End control code is deleted at this point, because the automatic pagination function described above is utilized to determine page breaks which are utilized by the interactive paginate function to automatically suggest page ending points. At block 31, assuming that the character being tested is not a Page End control code, the operation proceeds to block 33 wherein a test is made to determine if the character is a Required Page End control code. If not, at block 35 a test is made to determine if the character is to be placed at the beginning of a new page, as described relative to the final phase of the automatic pagination function, described above. If the character is not one to be positioned at the top of a new page, the operation again proceeds to block 39, whereby the operation is directed back to block 30, assuming the end of the document has not been reached. If, at block 35 the currently tested character is to be positioned at the top of a new page, the operation proceeds to block 36 and the user is prompted to accept the page break location. At this point the operator has two choices. The prompted and suggested page break location can be accepted, or the cursor can be moved up to end the page with less lines than currently make up the page being displayed to the operator. If the operator chooses to end the page at the originally prompted location, then the operation proceeds from block 37 to block 39. If the operator moves the cursor, the operation proceeds through block 38 wherein a Page End control code is inserted in the text datastream at the new cursor location. Accordingly, it will be understood that in those cases in which the operator chooses to accept the prompted page break location, no Page End control code is inserted in the text datastream. If such a Page End control code was stripped out of the text datastream at block 32, it is not reinserted at block 38 unless the reinsertion is in response to the operator's moving the cursor up from the prompted cursor location to a higher position on the page. At block 33, if the current character being considered is a Required Page End control code, then at block 34 the following character is considered. The user is then prompted to accept this page break location, in which case no additional page end control code will be inserted into the text datastream. However, if, as described above, the operator moves the cursor to a higher position on the page, then a Page End control code is inserted at block 38. The following programming design language is another form of the above description of the interactive paginate function of this invention. This listing parallels the operation described above relative to Fig. 3. In summary, a comprehensive pagination facility has been described which combines the high ease of use associated with an automatic pagination function and the power and control of an interactive paginate function. With this technique the operator is allowed to insert both Page End and Required Page End controls, although an automatic pagination function makes page ending decisions during both the creation and revision of text. The operator can then interactively paginate the document while being allowed to view each page ending decision and optionally accept the page break location or reposition the page break location higher on the page.

Claims: A data processing system including a text processing control system including means (Fig. 2) for automatically ending a page responsive to a preset line count during creation of said page; characterised by further including means for ending said page shorter than said automatic ending upon operator entry of a page end control code during said creation of said page; means (Fig. 3) for effecting an automatic page length adjustment operation subsequent to said creation of said page; and means (32) for deleting said page end control code during said automatic page length adjustment operation when said page end control code is positioned on said page prior to said preset line count. A data processing system as claimed in claim 1 further comprises: means (33) for ending said page shorter than said automatic ending upon operator entry of a required page end control code. A data processing system as claimed in any of claims 1 or 2 wherein said means for effecting an automatic page length adjustment further comprises: means (36) for displaying a suggested page ending location responsive to said preset line count. A data processing system as claimed in any of claims 1, 2 or 3 wherein said means for effecting an automatic page length adjustment further comprises: means (26) for including blank lines between paragraphs on the same page as the paragraph which precedes the blank lines; means (37) for ending said text pages without a page end control code when said displayed, suggested page ending location is accepted as a page ending location by an operator and means (38) for ending said text pages with a page end control code when said operator chooses a different page ending location from said displayed, suggested page ending location.

Inventors: HORN, GARY RANDALL, MIKELAIT, ROBERT CHARLES
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1987
Main classification: G06F15
IPC codes: G06F17