WORD PROCESSOR

Abstract: In a word processor, provided are means for setting format of a text, format control means for controlling newly set format to be effective from the beginning of a character data group to which the position where the format setting operation is carried out belongs, and reforming means for reforming at least the character data group based upon newly set format.

Description: This invention relates to a word processor and more particularly to a format setting means thereof for changing format during text editing (In this specification, "text editing" includes text creation). In conventional word processors, the change of the format during editing a text or so on the word processor has been accomplished in a manner that, after moving the cursor to the position at which the change should start (change start position), the format setting mode is entered to change the format, then the mode is escaped so that the character data following the cursor position is reformed according to the newly set format. With the above prior word processors, for changing the format during editing operation, it has been necessary to first move the cursor to the change start position, then entering the format setting mode. Also, when the format set mode is escaped after setting the new format, reforming operation takes place according to the new format however, the cursor remains positioned at the beginning of the reformed character data group so that the cursor has to be moved to the edit restart position, resulting in an unsmooth restart of text editing operation. IBM Technical Disclosure Bulletin Volume 26, No 4, September 1983, pages 1779 and 1780, on which the prior art portion of claim 1 is based, discloses a word processor which suffers a similar disadvantage in that reformatting needs to be carried out at the cursor address at the start of a segment of text. It is an object of the invention, as defined in claim 1, to provide an improved word processor in which the cursor need not be moved to the position at which the change of the format should start, and instead, the format change can take place from the beginning of character data group when the format change operation is carried out at any desired position existing within the group. With the word processor as above constructed, when the format is set at an arbitrary position within the text, means operate to apply the newly set format from the beginning of the character data group in which the above arbitrary position exists, and at least the whole character data from the beginning of the group is then automatically reformed according to the newly set format. As described later, once the need for the new format has passed, the operator needs simply to press a cancel key to restore the original format to that and succeeding character groups or segments of text. Figure 1 is a perspective external view of the word processor embodying the invention; Figure 2 is a plan view of the keyboard section of the word processor shown in Figure 1; Figure 3 is a block diagram of the electric circuit installed within the word processor shown in Fig. 1; Figs. 4 (1) through (3) are flow charts showing the process for format change; Fig. 5 is an illustrative view of the CRT screen display before reforming; and Fig. 6 is a view similar to Fig. 5 showing the CRT screen display after reforming. A preferred embodiment of the invention is now described with reference to the accompanying drawings. Fig. 1 is a perspective external view of the word processor 1 which comprises a keyboard 2 to be operated when setting various modes and inputting character data, a display section 3 provided with a CRT for display of the characters and symbols input through the keyboard 2 and stored in a memory device installed in the word processor 1, and printer section 4 for printing out the characters and the like stored in the memory device. Fig. 2 is a plan view showing the detail of the keyboard 2 with a layout of various function keys and character keys. The keys 2A, 2B, 2C, 2D, 2E, 2F, 2G, 2H, 2I, 2J, 2K, 2L and 2M shown here will be described later in detail. Fig. 3 shows a block diagram of the electrical circuit of the word processor 1. As shown in Fig. 3, the function keys on the keyboard 2 are connected to the function key input section 11 and the character keys to the key input section 12. The function key input section 11 and the key input section 12 serve as interface between the function and character keys and a host computer 13. Connected to the host computer 13 via bus line BUS1 are a read only memory (ROM) 14 and a random access memory (RAM) 15. The general control program for the word processor 1 in stored in the ROM 14, while the RAM 15 contains therein the function data and character data given by operating the keyboard 2. The host computer 13 is connected to a CRT control computer 17 to control the display (CRT) 3 through the interface circuit 16. Connected to the CRT control computer 17 via bus line BUB2 are a ROM 18 and RAM 19 and also a CRT controller 20. The ROM 18 stores therein the control program for controlling the CRT 3. The RAM 19 temporarily stores a variety of data for controlling the CRT 3 and is provided with a cursor current position memory 100 to keep the current position of the cursor in memory and a format area memory 102 which keeps the range of the format area in memory. The CRT controller 20 is connected at its output to a character attribute random-access-memory (CARAM) 21 which keeps in memory such attribute data as charactere, underline and boldface. There is further provided a signal composition circuit 23 with which, in response to the output command from the CRT controller 20, the data read from the CARAM 21 and the data read from the character generator read-only-memory (CGROM) 22 are composed to output the display data onto the display 3. In the word processor 1 equipped with the electric circuit blocks as described above, the processing takes place as shown in the flow chart of Figs. 4 (1) through (3). The operation of the preferred embodiment is now described with reference to the flow chart of Fig. 4 (1) through (3) and the Illustrative views of the CRT screen on the display section 3 shown in Figs, 5 and 6, wherein Fig. 5 shows the CRT screen before changing the line form setting as described below and Fig. 6 shows that after changing the line form setting. In the word processor 1, the host computer 13 performs key scanning during text editing, as indicated in the Step S1 (hereinafter referred to simply as S1...S44). It examines in S2 whether the page key (format change key) 2A on the keyboard 2 has been depressed down and if it determines the page key 2A is not down, processing takes place for other keys in S3. If, on the other hand, the page key 2A is found to be down, the text cursor 3A on the CRT screen of display section 3 is brought to standstill in S4 as shown in Fig. 5. Next in S5, the text cursor address in the RAM 19 is saved, while further moving in S6 the current line format information such as left margin LM, right margin RM, scale cursor 3B, hot zone H2, scale line 3C, and format setting code 3E. Control of the line form setting mode is now started in S7. The host computer 13 performs key scanning in S8 to check if the following keys have been depressed. When detecting a key depressed, a corresponding processing for the key depressed is accomplished, then returning to S8. When the right or left cursor move key 2G or 2H are detected to be down in S9, the scale cursor 3B shown in Fig. 5 is moved to the position shown in Fig. 6 in S10 and the column indicator (COL) not shown is changed accordingly. When the left margin (LM) set key 2B is found to be down as indicated in S11, the left margin LM is set in S12 to move the left margin LM to the position of the scale cursor 3B, with the left margin LM mark displayed on the display section 3 and the column indicator not shown changed to 1. When the right margin (RM) set key 2C is depressed as in S14, the right margin RM is set in S14 on the display section 3 as indicated in Fig. 6 to move the right margin RM to the position of the scale cursor 3B, with the right margin RM mark displayed on the display section 3. When the tab set key 2D is found to be down is S15, the tab is set as indicated in S16 to display the tab mark not shown at the position of the scale cursor 3B. When the decimal tab set key 2E is found to be down in S17, the decimal tab is set as indicated in S18 to display the decimal tab mark not shown at the position of the scale cursor 3B. When the hot zone (HZ) set key 2F is found to be down in S19, the hot zone is set as indicated in S20 to display the hot zone mark HZ at the position of the scale cursor 3B. When the line space key 2I is found to be down in S21, the line spacing is changed as indicated in S22 to change the indication of the LED (light emitting diode) of the keyboard 2. Detecting the pitch key 2J to be down in S23 causes changes in pitch, LED indication and scale line 3C on the display section 3. When the tab clear key 2K is found to be down in S25, S26 is processed to determine whether the tab is placed at the position of the scale cursor 3B where the tab clear key 2K has been depressed, and if the scale cursor position is found to coincide with the tab position, the tab is cleared to delete the tab mark or the decimal tab mark. The S8 resumes if the scale cursor position does not coincide the tab position, if the tab all clear key 2L is found to be down in S28, all the tabs and decimal tabs currently set are cleared as indicated in S29, also deleting the tab mark and decimal tab mark. When the escape (ESC) key 2 is found to be down in S30, the set values in the line form setting mode are canceled as indicated in S31 to call back the line format information saved in S6. S32 releases the text cursor 3A from its locked state and S33 terminates the line form setting mode to return to S1. When the aforementioned page key 2A is found in S34 to have been depressed again after depressing in S2 as mentioned above, the set values in the current line form setting mode are registered as valid as indicated in S35. S36 then processes to search the line feed code prior to the text cursor address, a line feed mark 3D in Fig. 5, on the RAM 19 and S37 examines whether the line feed code has been discovered. If S37 determines the line feed code (the line feed mark 3D) is not discovered, S38 examines if the search has reached the top of text. If the top of text is not reached according to S38m, the search goes on as indicated in S39 and returns to S37. When, on the contrary, the top of text is reached according to S38, the text top address is saved as a reform start address in S40. On the other hand, when the line feed code is found in S37, the beginning of the line next to the line where the line feed code exists is saved as a reform start address in S41. Then, the number of addresses AX between the reform starting address and the text cursor address is saved in S42. S43 then processes to reach the line form set code posterior to the text cursor address, a line form set mark 3F in Fig. 5, on the RAM 19 and S44 examines whether the line form set code has been discovered. If S44 determines the line form set code is not discovered, S45 examines if the search has reached to the end of text. If the end of text is not reached according to S45, the search goes on as indicated in S46 and returns to S44. when, on the contrary, the end of text is reached according to S45, the text end address is saved as a reform end address in S46. On the other hand, when the line format set code is formed in S44, the end of the line prior to the line where when the line form set code exists is saved as the reform end address in S48. S49 then processes to reform entire data between the reform start address and the reform end address, with displaying the line form set mark 3E, as shown in Fig. 6 prior prior to the beginning of reformed data. Thereafter, the text cursor 3A is moved from its locked position to the screen display position in S50 corresponding to the member of addresses AX saved in the above S42 from the beginning of the reformed data. The line form setting mode in thus terminated in S51, returning to S1. According to the above constructed word processor, therefore, the cursor need not be moved to the position at which the change of the format should start, and instead, the format setting operation can take place at any desired position of character data group to which the position whore format change operation is carried out exists. This provides an easy operation and smooth re-start of text editing.

Claims: 1. A word processor comprising a keyboard for inputting character codes and function code, a display device for displaying the input character codes on a screen, and a processing device for preparing a document based upon the input codes and displaying it on said display device, the processing device including designating means for causing a position at which one of the character codes is to be input to be shown on the screen and means for setting a required text format of a defined character data group, characterised in that search means are provided for locating the beginning of the character group in which the position shown by the designating means is present when that character group is to be reformatted, format control means are provided for controlling the format setting operation to be effective from the beginning of said character data group, and reforming means are provided for reformatting at least all said character data group containing said shown position in accordance with the required format as set by the means for setting a required text format. 2. A word processor according to claim 1, wherein the character data group is defined between two line feed codes. 3. A word processor according to claim 1 or 2, wherein said keyboard is provided with a format change key for instructing a format change of the character data group to which the current address of a text cursor comprising the shown portion belongs. 4. A word processor according to claim 3, wherein said processing device further comprises means for saving a number of addresses between reform start address at the beginning of the character data group and text cursor address with said key depressed while bringing said text cursor to a standstill, and means for moving said text cursor to the screen position corresponding to said saved number of addresses from the beginning of the reformed data. 5. A word processor according to claim 3 or 4, wherein said keyboard is further provided with a cancel key for cancelling the instruction for changing the format, and said processing device further comprises means for saving a current format data with said format change key depressed and means for restoring said saved format data when said cancel key is depressed. 6. A word processor according to any preceding claim, wherein said processing device further comprises means for displaying a special code mark at the beginning of said character data group searched by said searching means. 7. A word processor according to any preceding claim, wherein the keyboard comprises at least a plurality of character keys for inputting character data when composing a text, a mode select key for selecting format setting mode, a plurality of keys for inputting data to define a format when the format selecting mode is selected by said mode select key, and a release key for releasing the format setting mode selected by said mode select key. 8. A word processor according to claim 7, wherein memory means are provided for storing the character data and the format data input by said input means; the format control means is operative for controlling the format of the text composed by the input characters so as to change the format in accordance with the format data; and display control means are provided for controlling said display device so as to display the text on a display area, while displaying a predetermined indicator on an area of the display device other than said display area, said indicator indicating the positions corresponding to the portions of the text at which the characters are linked with the format data.

Inventors: KAWAKAMI, YASUSHI, MAKIHARA, KAYOKO, OBATA, FUKUE
Applicants: BROTHER KOGYO KABUSHIKI KAISHA
Application year: 1987
Main classification: G06F15
IPC codes: G06F3, G06F17, B41J21