Abstract:
An information processing apparatus includes a keyboard for inputting character information and attribute information of the character information, a memory for storing the character information, and the attribute information entered by the keyboard, a search device for searching for attribute information set for a designated character string in a text, and a controller for substituting for the attribute information searched by the search device, new attribute information entered by the keyboard.

Description:
This application is a continuation of application Ser. No. 08/048,942 filed Apr. 20, 1993 now abandoned, which is a continuation of application Ser. No. 07/841,775 filed Mar. 2, 1992, now abandoned, which is a continuation of application Ser. No. 07/270,049 filed Nov. 14, 1988, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a word processor which can issue a command for performing heading, underscore or proportioning operations on input character data. 
     2. Related Background Art 
     In a prior art word processor, it is possible to substitute a specified character string in a text or a character string corresponding to a specified area with another character string. However, it is not possible to substitute a command for a heading, an underscore or a proportioning operation relating to the character string or substitute the character string by a command. 
     The prior art substitution process includes the following problem. 
     For example, when an enhanced character string having enlarged characters is to be changed to a heading character string, or when all single-line underscores in a text are to be changed to double-line underscores, a process of first resetting the current command and then setting a desired command must be repeated as many times as the number of character strings. This is very troublesome and time consuming. When one command is used many times in a text and small circles must be added to all of specified character strings, a process of adding the small circle must be repeated for each character string. This is also a very troublesome work. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide an information processing apparatus comprising input means for inputting character information and attribute information of the character information, storage means for storing the character information and the attribute information supplied from the input means, and control means for collectively substituting a plurality of attribute information set to certain character string in a text by other attribute information. 
     It is another object of the present invention to provide an information processing apparatus comprising input means for character information, attribute information of the character information and substitution information, storage means for storing the character information and the attribute information supplied from the input means, and control means responsive to the substitution information for searching a plurality of attribute information set to certain character string in a text stored in the storage means and substituting them by other attribute information. 
     Other objects of the present invention will be apparent from the description of the embodiment when taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a block diagram of a system in accordance with one embodiment of the present invention; 
     FIG. 2 shows text edit information in the embodiment; 
     FIGS. 3, 7, 8, 10, 11, 12 and 13 show texts displayed on a screen; 
     FIGS. 4 and 9 show the status on a memory in the embodiment; 
     FIGS. 5 and 6 show screen displays in the embodiment; and 
     FIG. 14 composed of FIGS. 14(A) and 14(B) shows a flow chart of a process in the embodiment. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 shows a configuration of a system of one embodiment of the present invention. 
     Numeral 1 denotes a CPU, numeral 2 denotes a memory which stores a control program which follows a flow chart of FIGS. 14(A) and 14(B) and various edit information during the editing of a text, numeral 3 denotes a magnetic disk for storing text data, numeral 4 denotes a keyboard (KB) for entering data and command when the text is edited, numeral 5 denotes a display for displaying various work areas (windows), and numeral 6 denotes a pointing device (PD) such as a mouse by which an operator moves a cursor on the display screen. 
     FIG. 2 shows various information stored in the memory 2 during the editing of the text. An editing header information area contains information necessary for the editing such as positions on the memory 2 of character data and graphic data in the text under editing and the position of input cursor. 
     A format information area contains information relating to format such as sheet information and printing plane information of the text. A character data area contains character data and command data in the text. The format information area and the character data area are stored in the magnetic disk 3 as a text file. The character data uses the JIS C6226 code and of 2 bytes/character size. The command data may or may not include character data therein, or may comprise only one 2-byte code. The command data which is the subject of substitution is limited to the command data including the character data therein. Accordingly, only that command is described below. In the character string relating to the command, there is a 2-byte code indicating the beginning at the start position of the command, followed by character codes of the character string, and there is a 2-byte code indicating the end at the end position. 
     When a text shown in FIG. 3 is stored in the memory 2 and displayed, the character data area on the memory 2 contains the codes shown in FIG. 4, in which bracketed codes are command codes and others are character codes. The character string &#34;Data Reservation and Management&#34; in the text of FIG. 3 has been enlarged by a heading command and an underscore has been drawn by an underscore command. In FIG. 4, C1 is a 2-byte code indicating the beginning of the heading, and C2, C3 and C4 represent the beginning of the underscore and the type and width of the underscore. The characters &#34;Data Reservation and Management&#34; in the JIS C6226 code starts from C5, followed by a code C6 indicating the end of the underscore command and a code C7 indicating the end of the heading. Character codes starting from the character string &#34;The text prepared is&#34; to which no command relates is stored starting from C8 following to the code indicating the end of the heading. 
     As shown, two or more commands can be overlapped by sandwiching the character string including the command by the beginning and end of command. 
     A process of command substitution is explained below. 
     When the start of the command substitution process is instructed by an operator, a window 5a (command window) shown in FIG. 5 which includes all command names, a window 5b having a column (search command column) to which a command to be substituted is input and a column (substitution command column) to which a substituting command is to be input, and a menu as shown in FIG. 6 having three indications, substitution, search and collective substitution for the operator, are displayed on the screen. 
      Command to-command Substitution! 
     A command to be substituted and a substituting command are selected and entered to a search command column and a substitution command column from the command window by moving a cursor by the pointing device (PD) 6 or the keyboard (KB) 4. The &#34;search&#34; menu of FIG. 6 is selected. The command entered in the search command column is searched from the text and it is pointed by the cursor and inversely displayed. Then, the &#34;substitution&#34; menu of FIG. 6 is selected, and the command entered in the search command column in the inverse display area of the text is substituted by the command entered in the window 5b having the substitution command. An example is explained below. 
     In the text shown in FIG. 3, &#34;underscore&#34; is entered in the search command column and a surrounding line command having a predetermined type of line and type of plane information (explanation of a designation method thereof is omitted here) is entered in the substitution command column from the command window 5b (FIG. 5). Then, the &#34;search&#34; menu is selected. As shown in FIG. 7, the underscored area &#34;Data Reservation and Management&#34; is inversely displayed. Then the &#34;substitution&#34; menu is selected and the underscore is substituted by the surrounding line as shown in FIG. 8. 
     From the memory, the start/end command for the underscore is searched from the character data by the instruction of the &#34;search&#34; menu and it is deleted by the instruction of the &#34;substitution&#34; menu and the surrounding line start command, and type of line and type of plane information and the end command are inserted in place of it. These steps are shown in FIG. 9. 
     Where all command in the text or all command in certain area are to be substituted by a certain command, for example, where all underscore commands in the text of FIG. 3 are to be substituted by the surrounding line command, the following process is conducted. 
     The commands are entered in the search command column and the substitution command column in the same manner as that described above, and the area to be substituted is selected by moving the cursor by the pointing device (PD) 6 or the keyboard (KB) 4 and it is inversely displayed as shown in FIG. 10. Then, the &#34;collective substitution&#34; menu of FIG. 6 is selected. Thus, as shown in FIG. 11, the underscores under &#34;Data Reservation and Management&#34; and &#34;Storage&#34; are substituted by the surrounding lines. On the memory 2, the start/end of underscore are searched from the character data and deletion/insertion are repeatedly made as shown in FIG. 9. 
      Command substitution character-to-command Substitution! 
     Two characters to be used as the command substitution characters are entered in the search command column from the keyboard 4, and the substituting command is entered in the substitution command column as is done in the command-to-command substitution. Thereafter, the search menu is selected and then the substitution menu is selected, as is done in the command-to-command substitution. 
     In an example shown in FIG. 12, &#34;|&#34; and &#34;$&#34; are used as the command substitution characters. When an overline is to be drawn to &#34;Data Reservation and Management&#34;, the two characters &#34;|&#34; and &#34;$&#34; are entered in the search command column, and the overline command is entered in the substitution command column. The search menu and the substitution menu are selected in sequence. As shown in FIG. 13, &#34;|&#34; and &#34;$&#34; are deleted and the overline is drawn over the &#34;Data Reservation and Management&#34; area. The collective substitution may be effected in the same manner as in the command-to-command substitution. 
     On the memory 2, a character string between &#34;|&#34; and &#34;$&#34; is first searched. Then, &#34;|&#34; is deleted and the start of overline command code, type of line code and width of line code are inserted instead, and &#34;$&#34; is deleted and the end of overline command code is inserted instead. In the collective substitution, the above process is repeated. 
      Command-to-command substitution character Substitution! 
     This is the exact reverse process to that of the command substitution character-to-command substitution. 
     The command to be substituted is entered in the search command column and the two command substitution characters are entered in the substitution command column. The search menu and the substitution menu are selected in sequence. The command to be substituted in the inversely displayed area is deleted, and instead the first character of the command substitution characters entered in the substitution command column is inserted at the start position of the command, and the second character is inserted at the end position. The collective substitution may be effected as is done in other substitution. 
     A normal substitution process by the CPU 1 is shown in a flow chart of FIG. 14. In a step S1, the CPU 1 enters in the search command column the substituting command or the command substitution character from the command window of FIG. 5 by the pointing device (PD) 6 or keyboard (KB) 4. The related character string is stored in the buffer 2a. In a step S2, the command to be substituted or the command substitution character is entered in the substitution command column. The related character string is also stored in the buffer 2a. In a step S3, the search menu of FIG. 7 is selected by PD 6 or KB 4. In a step S4, if a command has been entered in the search command column, the process proceeds to a step S5, and if it is a command substitution character, the process proceeds to a step S6. In the step S5, a start code and an end code of the command entered in the search command column are searched from the character data area on the memory 2. In the case of command-to-command substitution, the start code and the end code of underscore are searched. In the step S6, a portion of the character codes between the first and second character codes entered in the search command column is searched from the character data area on the memory 2. In the case of command substitution character-to-command substitution, the portion between &#34;|&#34; and &#34;$&#34; is searched from the character data area. In a step S7, the character string searched from the memory 2 is inversely displayed on the display screen. In a step S8, the substitution menu of FIG. 7 is selected by PD 6 or KB 4. In a step S9, if a command has been entered in the search command column, the process proceeds to a step S10, and if it is a command substitution character, the process proceeds to a step S11. In the step S10, the start of command code and the end of command code searched in the step S5 are deleted from the character code area on the memory 2. In the step S11, the command substitution character searched in the step S6 is deleted. 
     In a step S12, if the command has been entered in the substitution command column in the step S2, the process proceeds to a step S13, and if the command substitution character has been entered, the process proceeds to a step S14. In the step S13, the start of command code entered in the substitution command column is inserted at the position of the start of command code deleted in the step S10 or at the position of the first character of the command substitution characters deleted in the step S11. Similarly, the end of command code is inserted at the position of the end of command code deleted in the step S10 or at the position of the second character deleted in the step S11. In the case of command-to-command substitution, the start and end of surrounding line command codes are inserted. 
     In the step S14, the command substitution characters are inserted at the deleted positions as are done in the step S13. In the case of command substitution character-to-command substitution, the start and end of overline command codes are inserted at the positions where the codes &#34;|&#34; and &#34;$&#34; have been deleted, respectively. 
     In this manner, the normal command substitution is effected. 
     Alternatively, by entering a command in the search command column and entering nothing in the substitution command column, the command may be deleted. By entering nothing in the substitution command column, the process terminates in the step S1 of FIG. 14. As a result, the command is deleted. 
     If the above process is effected in the collective substitution, all specified commands in the text or in certain area may be deleted. 
     Very efficient text editing is provided by the present command substitution method.