Abstract:
A document processing system for formatting document information in accordance with a format includes a disk apparatus which independently has a document file, an address table file, and a format information file. The document file stores the document information corresponding to predetermined regions. The address table file stores an address table corresponding to the document information. The format information file stores the format information corresponding to the document information. A control circuit, in response to a page designation, controls the three files to correct format information and address information for document information preceding the designated page.

Description:
This application is a continuation of application Ser. No. 07/344,518 filed Apr. 24, 1989, now abandoned, which is a continuation of application Ser. No. 07/935,382 filed Nov. 26, 1986, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a document processing system for automatically formatting a document according to a format and, more particularly, to a document processing system having start format information in each predetermined region, or to a document processing system capable of smoothly outputting documents with different sheet sizes. 
     2. Related Background Art 
     In conventional document processing systems such as word processors, a large amount of document data are processed in a batch manner, and it is impossible to interactively input/edit the document data on a given page. 
     The reason for this is as follows. When a document is changed by an input/edit operation during formatting of a large amount of the data according to a given format, position data for pagination must be corrected to reset a pagination position so that a given page is displayed immediately. However, since conventional document processing systems do not have all the data in main memories, it takes a long time to read the data out from a disk or the like or to change the data, and it is practically impossible to reset the data whenever it is changed. In addition, when a change in format information such as a line length may be present in a middle of a document, the data must be retrieved from the beginning of the document to check whether such a change is present because a given page cannot be displayed only pagination if such a format change is present. 
     In addition, when sizes of sheets to be output relating to the format information are different, e.g., A4 for page 1, A3 for page 2, and B4 for page 3, it is difficult to change arrangement of characters on each page. Therefore, the operator must reset the sheet every time each page is output, and it is impossible to automatically output each page with its optimal sheet size as a format. 
     SUMMARY OF THE INVENTION 
     The present invention has been made in consideration of the above situation, and has as its object to provide a document processing system having start format information and document data independently in each predetermined region and a page address table for managing the addresses of these regions, thereby allowing free switching of the format information and at the same time interactive inputting/editing of the document data even when the document contains a large amount of the data, and also allowing confirmation of a layout. 
     The present invention has been made in consideration of the above situation, and has as its object to provide an image processing system having start format information and document data independently in each page, and a page address table for managing the addresses of these pages, thereby allowing free switching of the format information on each page and at the same time, especially in printing, automatic printing and outputting of a page if a sheet of a size preset for the page is set. 
     It is an object of the present invention to provide a document processing system comprising: 
     first memory means for storing a large amount of document information, 
     second memory means for storing format information such as page information of the document information stored in the first memory means, 
     third memory means for storing address information of the document information and the format information stored in the first and second memory means, 
     document editing means for editing the document information stored in the first memory means, 
     page designating means for designating a given page defined by the format information stored in the second memory means, 
     means for reading out the document information defined by the page designating means stored in the first memory means, and 
     control means for managing, when the document information is edited by the document editing means, the first, second and third memory means to correct the format information and the address information stored in the first, second and third memory means for the document information preceding the page designated by the page designating means. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a document processing system according to an embodiment of the present invention; 
     FIG. 2 is a block diagram showing the arrangement of FIG. 1 in units of function; 
     FIG. 3 is a view for explaining a process of making a format information file 92 and an address table file; 
     FIG. 4 is a flowchart showing the processing sequence of FIG. 3; 
     FIG. 5 is a flowchart for updating sentence data for a certain page; 
     FIG. 6 is a flowchart showing the processing sequence of the embodiment; and 
     FIG. 7 composed of FIGS. 7A, 7B and 7C is a flowchart showing the processing sequence of the embodiment. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     An embodiment of the present invention will now be described in detail with reference to the accompanying drawings. Note that a document (sentence) processed in the present invention is not limited to that consisting of character information, but may consist of image information or mixture of both. Also, the present invention may be constituted by a single unit or achieved in a system consisting a plurality of units. 
     In addition, although not shown, the present invention has an input operation section for inputting various instructions such as an editing or a printing instruction to be described later. 
     Further, type-setting in the present invention means electronic positioning of the document information on the basis of format information. FIG. 1 is a block diagram of a document processing system according to an embodiment of the present invention. In FIG. 1, the system includes a raster scan display CRT display section 1, a video RAM (VRAM) 2 for storing pattern develop information of one screen, a display controller 3 for performing pattern develop control for the VRAM 2 and pattern read out control for the CRT display section 1, a micro processor (MPU) 4 for forming main control of the system according to the embodiment, a main memory 5 including a ROM incorporating a control program (a flowchart to be described later) and a RAM for data processing, an external magnetic disk apparatus 6 having a document file or the like therein, a pointing device (PD) 7 for performing point designation input of a display screen, a keyboard 8, a printer 15, and an I/O bus 9 for connecting these blocks and the MPU 4. 
     FIG. 2 is a block diagram showing an arrangement of FIG. 1 in units of function. In FIG. 2, document data from a data supply source 10 is accessed to a disk 6 through a control means 11, and transferred to a file making means 12 for making an address table file, a format information file, and a sentence data file through a type-setting means 13, or to an output means 14 for printing out as printed material or displaying on the CRT through a character generator (CG) 31. 
     When the document data transferred to the output means 14 is to be displayed on the CRT, the document data is pattern converted by the character generator (CG) 31 and developed in the VRAM 2. 
     The document data from the data supplying source 10 is edited by an editing means 16 through the control means 11. 
     A format information file will now be described below. The format information includes sheet size, character size, image region, type style, line pitch, character pitch, page numbering, and the like. When type-setting is executed, such format information may have been changed in a preceding sentence. Therefore, when type-setting is executed for a given page without referring to preceding pages, the format information is required together with a start position of the page. In addition, if a sentence continues from the previous page to a given page, indent processing is not required. However, if a paragraph ends at the end of the previous page, the indent processing is required. Therefore, this information is also required as the format information. Thus, as the automatic type-setting function becomes intricate, the format information increases. 
     FIG. 3 is a view for explaining in detail the address table file, the format information file, and the sentence data file in the disk apparatus 6 of FIG. 2, and FIG. 4 is a flowchart showing sequences for making them. One document has the address table, the format information, and the sentence data files. The processes for making them will now be described with reference to FIGS. 3 and 4. Note that a character information file and an image information file may be provided in the sentence data file. 
     First, with respect to the sentence data for which input is finished, the format information of a 1st page (91-1) is made on the basis of a format definition (90) in step S1. Page number &#34;1&#34; is set in step S2. The format information of the 1st page (91-1) is written in a format information file (92-1) in step S3. The address of format information of a 1st page (94-1) is written in an address table file (93-1) in step S4. An address of the sentence data of a 1st page (95-1) is written in an address table file (93-2) in step 5. Thus, 3 files for the 1st page are made. Type-setting is executed for the 1st page and the sentence data is paginated into the length of a page in step S6. Whether the sentence data is ended is determined in step S7, and if NO, the format information of 2nd page (92-2) is made on the basis of the information held by the type-setting means at the end of processing the 1st page. A page number is counted up to &#34;2&#34; and this number is set in step S8. This format information is written in the format information of the 2nd page (92-2) in step S9. An address of the format information of the 2nd page (94-2) is written in an address table (93-3) in step S10. An address of the sentence data of the 2nd page (95-2) is written in an address table (93-4) in step S11. Thus, 3 files for the 2nd page are completed. 
     The above-mentioned operations are repeated to the end of the document data. At the end of the document data, an address table file 93, a format information file 92, and a sentence data file 96 are completed. 
     FIG. 5 is a flowchart for updating the sentence data of a certain page. A page designation instruction for designating a certain page in a large amount of the document data or an instruction for completing document input is awaited in step R1. Whether document input is completed is determined in step R2. If YES in step R2, address tables and the format information of all pages are correctly set in step R3 by the same processing as that in FIG. 4, and the flow is ended. If NO in step R2, i.e., page designation is instructed, address tables and the format information up to the input page in step R4 are determined. As described above, the address table and the format information are correctly set in the document file immediately after the address table file and the format information file are made. However, they may not be correct if the document data is updated as will be described later. If they are not correct, this determination is performed by a flag to be described later. Then, address table files and the format information up to the designated page are correctly set in step R5. This can be achieved in the same manner as that in making files described above. Thereafter, type-setting is executed to decide each character position by the format or the like in step R6. A condition of typesetting of the page is displayed in step R7. The sentence data of the page is updated in step R8. 
     When the sentence data is updated, an address table and the format information of the next page are set from the information at the end of type-setting of the page in step R9. At this time., the information of the following pages is not reset, and a flag (or a code) for indicating &#34;incorrect&#34; is set in step R10. This is because it takes a long time to execute retype-setting to the end of a large amount of the document every time the document data is changed, so that input/edit or layout of interactive sentence data cannot be confirmed. 
     Note that in steps R3 and R5 of FIG. 5, if necessary format information is present, the number of pages for which retype-setting is to be executed can be reduced since when retype-setting is executed for a certain page, it can be determined whether the following pages are affected. Therefore, response characteristics can be further improved when the sentence data is updated. The above operation may also be performed utilizing wait time. 
     In step R5 of FIG. 5, address table files and format information files up to the designated page are corrected. However, the format information and the document data of the edited or changed pages may be stored in an intermediate file (not shown). An address table determines whether the intermediate file or the above-mentioned file stores the format information and document data of the changed pages. The address table file and the format information file may be corrected on the bases of the information from the intermediate file to create the file shown in FIG. 3 in step R5. 
     FIG. 6 is a flowchart showing, when the address table file 93, the format information file 92, and the sentence data file 96 described above are made, a sequence for printing some or all of the documents in the reverse order of a normal printing sequence. 
     First, printing of some of the documents will be described below. Whether all of the documents are to be printed is determined in step T1. In this case, since some of the documents are to be printed, an instruction for page numbers to be printed is awaited in step T2. In this step, data of page numbers is read out from the data supplying source 10. The format information address and the sentence data address of the pages of the address table file 93 are obtained in step T3. Type-setting is executed by the type-setting means in step T4. The character pattern is developed with this data by the output means 14 and the CG 31 in step T5. Data is transferred to the printing means 15 and output in step T6. Thus, printing is completed. 
     Then, the latter, i.e., printing of all the documents in the normal order will be described below. Whether all the documents are to be printed is determined in step T1. In this case, since all the documents are to be printed, the printing order is determined in step T7. In this case, since printing is executed in the normal order, &#34;1&#34; is set as a page number in step T8. The format information address and the sentence data address of the 1st page of the address table file 93 are obtained in step T9. Type-setting is executed in step T10. This data is transferred to steps T11 and T12 and is output. Then, the page number is counted up in step T13. Whether the above page number is larger than a maximum page is determined in step T14. If NO in step T14, the sequence returns to step T9 and the above operation is repeated, If YES in step T14, printing is completed. 
     Then, printing of all the documents in the reverse order will be described below. Whether all the documents are to be printed is determined in step T1. In this case, since all the documents are to be printed, the printing order is determined in step T7. In this case, since printing is executed in the reverse order, maximum number n is set as the page number. The format information address and the sentence data address of the nth page of the address table file 93 are obtained in step T16. Type-setting is executed in step T17. This data is transferred to steps T18 and T19 and is output. Then, the page number is counted down in step T20. Whether the page number is smaller than 1 is determined in step T21. If NO in step T21, the sequence returns to step T16, and the above operation is repeated. If YES in step T21, printing is completed. 
     Although the above embodiment is described with reference to a document processing system, the present invention may be applied to a document processing system (disclosed in Japanese Patent Application No. 59-243916) or a part thereof including a work station, digital computer, or the like. 
     As has been described above, according to the present invention, display or input/edit of a given page of a large amount of documents can be easily executed at high speed, the document data can be interactively input/edit, and layout can be confirmed. In addition, printing of a given page or printing in the reverse order can be easily executed at high speed. Further, the format information can be freely changed in a middle of the sentence. 
     As is apparent from the above description, a document processing system having high operability can be provided. 
     FIG. 7 is a flowchart showing, when the address table file 93, the format information file 92, and the sentence data file 96 are made, the same sequence as described above except that output size is variable for each page and some or all of the documents are printed in the reverse order of the normal one. Note that a printer in this case is, e.g., a laser beam printer capable of selectively switching sheets of a plurality of output sizes and printing on sheets of selected sizes. 
     First, printing of some of the documents will be described below. Whether all the documents are to be printed is determined in step T1. In this case, since some of the documents are to be printed, instruction for a page to be printed is awaited in step T2. In this step, data of the page to be printed is read out from the data supplying source 10. The format information address of the sentence data address of the page of the address table file 93 is obtained in step T3. Type-setting is executed by the type-setting means 13 in step T4. The character pattern is developed with this data by the output means 14 and the CG 31 in step T5 and transferred to the printing means 15. A sheet size of the page is determined from the format information, and whether a sheet cassette of the sheet size is set is determined in step T6. The document is output in step T9 on the sheet set in step T7 if the cassette corresponding to the sheet size is set, or on the sheet already set in step T8 if the cassette corresponding to the sheet size is not set. Thus, the sequence is completed in step T9. 
     Then, the latter, i.e., printing of all the documents in the normal order will be described. Whether all the documents are to be printed is determined in step T1. In this case, since all the documents are to be printed, the printing order is determined in step T10. In this case, since printing is executed in the normal order, &#34;1&#34; is set as the page number in step T11. The format information address and the sentence data address of the 1st page of the address table file 93 are obtained in step T12. Type-setting is executed in step T13. This data is developed in step T14 and transferred to the printing means 15. A sheet size of the page is determined from the format information, and whether the sheet cassette of the size is set is determined in step T15. The document is output in step T18 on the sheet set in step T16 if the cassette of the sheet size corresponding to the page is set, or on the sheet already set in step T17 if the cassette of the sheet size corresponding to the page is not set. Then, the page number is counted up in step T19. Whether the page number is larger than the maximum page is determined in step T20. If NO in step T20, the sequence returns to step T12 and the above operation is repeated. If YES in step T20, the printing is completed. 
     Then, printing of all the documents in the reverse order will be described below. Whether all the documents are to be printed is determined in step T1. In this case, since all the documents are to be printed, the printing order is determined in step T10. In this case, since printing is executed in the reverse order, maximum number n is set as the page number in step T21. The format information address and the sentence data address of the nth page of the address table file 93 are obtained in step T22. Type-setting is executed in step T23. This data is developed in step T24 and transferred to the printing means 15. A sheet size of the page is determined from the format information, and whether a sheet cassette of the sheet size is set is determined in step T25. Data is output in step T28 on the sheet set in step T26 if the cassette of the sheet size corresponding to the page is set, or on the sheet preset in step T27 if the cassette of the sheet size corresponding to the page is not set. Then, the page number is counted down in step T29. Whether the page number is smaller than 1 is determined in step T30. If NO in step T30, the sequence returns to step T22, and the above operation is repeated. If YES in step T30, printing is completed. 
     In this embodiment, a description has been made with reference to the case in which the format information has sheet size information. However, the present invention is not limited to the above embodiment but includes the case in which the sheet size is changed in a middle of the document by a command even when the format information is not included. 
     As has been described above, according to the present invention, there is provided an image processing system in which display, input/edit, or printing can be performed at high speed, a page can be smoothly output on a sheet corresponding to a sheet size of the page without a special instruction.