DOCUMENT PROCESSING SYSTEM

Abstract: A document processing system for formatting document information in accordance with a format includes a disk apparatus which independently has a document file (96), an address table file (93), and a format information file (92). The document file stores the document information correspond­ ing to predetermined regions. The address table file stores an address table corresponding to the document information. The format information file stores the format information cor­ responding to the document information.

Description: BACKGROUND OF THE INVENTION 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. Related Background Art In conventional document processing systems such as word processors, a large amount of document data is 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 the 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 by pagination if such a format change is present. In addition, when sizes of sheets to be outputted 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 the arrangement of characters on each page. Therefore, the operator must reset the sheet every time each page is outputted, and it is impossible to automatically output each page with its optimal sheet size as a format. Examples of prior art systems are disclosed in UK patent 2, 121, 221 (GB-A-2121221) which describes prior art of the type specified in the preamble of Claim 1 and US patent 4, 197, 588. SUMMARY OF THE INVENTION According to the present invention a document processing system of the kind which includes means for automatically formatting a document comprises: first memory means for storing a large amount of document information; second memory means for storing format information of the document information stored in said first memory means; and is characterized in that it comprises: third memory means for storing address information of each predetermined region of the document information and of the format information stored in said first and second memory means; and control means for controlling said second and third memory means to correct the format information and address information stored in said second and third memory means for the document information. 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 of 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 a 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. Processes of 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 "1" 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, three 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 7, 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 "2" 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 10. An address of the document data of the 2nd page (95-2) is written in an address table (93-4) in step S11. Thus, three 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 type-setting 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 "incorrect" 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 sentence data of the changed (edited) pages may be stored in an intermediate file (not shown), and which one of the files (the intermediate file or the above-mentioned file) stores the information of the pages may be determined by means of the address table. 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, "1" 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 document 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 the 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. The 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 outputted 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, "1" 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. The 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 the middle of the document by a command even when the format information is not included.

Claims: A document processing system of the kind which includes means for automatically formatting a document, the system comprising: first memory means (5) for storing a large amount of document information (96); second memory means (6) for storing format information (92) of the document information stored in said first memory means; and characterized in that it comprises: third memory means (12) for storing address information (93) of each predetermined region of the document information and of the format information (92) stored in said first and second memory means; and control means (11, R5, R3) for controlling said second and third memory means to correct the format information (92) and address information (93) stored in said second and third memory means for the document information. A system according to claim 1, further comprising editing means (16) wherein the format information (92) has data for determining whether the document is edited by said editing means (16) in units of pages. A system according to claim 1, wherein said third memory means stores address information on the address of the ends of predetermined regions of the document information and stores address information of the address of the format information corresponding to the document information in said predetermined regions. A system according to claim 3, wherein the predetermined regions are in units of pages of the document information based on the format information. A system according to claim 4, wherein said second memory means stores information as to an output size of the document information of each page, further comprising output means for outputting in output sheets the document information in units of pages and control means for selecting sizes of the output sheets on the basis of the output size information stored in said second memory means. A system according to claim 1, wherein said second memory means stores information as to an output size of the document information of each page, further comprising output means for outputting in output sheets the document information in units of pages and output control means for selecting sizes of the output sheets on the basis of the output size information stored in said second memory means. A system according to claim 1, further comprising: type-setting means (13) for electronically type-setting the document in units of pages on the basis of basic format information (92); detection means for detecting the end of input of the document; and format creation means for creating, on the basis of type-setting data for one of the pages type-set by said type-setting means, format information (92) for the next page upon detection of the end of input of the document by said detection means; wherein said control means (11) judges whether the format information (92) has been created up to the final page of the document and controls said type-setting means and said format creation means such that type-setting and format creation (92) is performed up to the final page. A system according to claim 7, wherein the type-setting data includes indent information. A system according to claim 7, further comprising address information creation means for creating address information representing the end of each page of the document and representing the format information. A system according to claim 9, wherein said control means controls said address information creation means as well as said type-setting means and said format creation means. A system according to claim 1, further comprising: editing means (16) for editing the document information; and means for, when one page of the document information has been edited by said editing means, creating information indicating that the format information (92) for pages subsequent to that one page stored in said memory means is incorrect. A system according to claim 11, wherein said third memory means stores information indicating the end of each page of the document information. A system according to claim 1, further comprising page designating means for designating a given page defined by the format information stored in said second memory means, wherein said control means controls, in response to page designation by said page designating means, said second and third memory means to correct the format information (92) and address information (93) stored in said second and third memory means for the document information preceding the page designated by said page designating means. A process of the kind for enabling the content and format of a word processed document to be amended characterised by the steps of: (a) storing the document information in a first memory; (b) storing format information of the document information in a second memory; (c) storing address information of both the document information and the format information in a third memory; (d) identifying a part of the document where it is desired to correct the format or the content, the identification being achieved by means of the appropriate address in the third memory identifying the document information and the appropriate address information in the third memory identifying the format information associated with that part of the document and applying that address information to the second memory to identify the appropriate format information and applying that address information to the first memory to identify the appropriate document information; (e) correcting the document and/or format information. A process according to claim 14, including the steps of providing the format information with data to enable it to be determined whether the document is edited in units of pages. A process according to claim 15, including the steps of providing in said third memory means address information on the address of the ends of predetermined regions of the document information and storing address information of the address of the format information corresponding to the document information in said predetermined regions. A process according to claim 16, including the steps of providing the predetermined regions in units of pages of the document information based on the format information. A process according to claim 17, including the steps of storing in said second memory means information as to an output size of the document information of each page, outputting in output sheets the document information in units of pages, and selecting the sizes of the output sheets on the basis of the output size information stored in said second memory means. A process according to claim 14, including the steps of storing said second memory means information as to an output size of the document information of each page, further outputting in output sheets the document information in units of pages and selecting sizes of the output sheets on the basis of the output size information stored in said second memory means. A process according to claim 14, including the steps of: electronically type-setting the document in units of pages on the basis of basic format information (92); detecting the end of input of the document; and creating on the basis of type-setting data for one of the type-set pages, format information (92) for the next page upon detection of the end of input of the document; judging whether the format information (92) has been created up to the final page of the document and controlling said type-setting and said format creation such that type-setting and format creation (92) is performed up to the final page. A process according to claim 20, including the steps of providing the type-setting data with indent information. A process according to claim 20, including the steps of creating address information representing the end of each page of the document and representing the format information. A process according to claim 22, including the steps of controlling said address information creation as well as the type-setting and the format creation. A process according to claim 14, including the steps of: editing the document information; and when one page of the document information has been edited, creating information indicating that the format information (92) for pages subsequent to that one page stored in said memory means is incorrect. A process according to claim 24, including the steps of storing in said third memory means information indicating the end of each page of the document information. A process according to claim 14, including the steps of designating a given page defined by the format information stored in said second memory means, controlling in response to page designation said second and third memory means to correct the format information (92) and address information (93) stored in said second and third memory means for the document information preceding the page designated.

Inventors: HAMADA, MASAKI, KATO, TAKAHIRO, SHIBUYA, YUKARI, TAKAKURA, HIROSHI, TAKISE, KIKUO
Applicants: CANON KABUSHIKI KAISHA
Application year: 1986
Main classification: G06F15
IPC codes: G06F17