Text processing apparatus

Abstract: There is disclosed a text processing apparatus allowing easy line-end process, namely division of a line-end word and hyphening. If a word at the end of a line exceeds the area of display or printing, the word is automatically transferred to a next line, but a part of the word that can be returned to the end of the original line is identified, and the operator is rendered possible to insert a hyphen after that part. Upon insertion of the hyphen, the above-mentioned part is returned to the end of the original line, and the remaining part of the word is displayed on the next line. In this manner the hyphening of line-­ end word is made easy on the display, and the print can be obtained in the form as displayed.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to a text processing apparatus, and more particularly to a text processing apparatus with improved control on the arrangement of information at the boundary of visible text area. Related Background Art There have already been made various inventions on the line-end control of word processor, electronic typewriter or the like. For example the Japanese Patent Publication No. 58-50374 discloses a technology of terminating a line if a space or a hyphen is inserted in a specified "hot" zone at the end of a line. Also the Japanese Laid-open Patent Application No. 53-39834 discloses a technology, if characters are entered beyond the right-hand margin, of finding a space or a hyphen closest to the right-hand margin in a specified zone at the end of a line and terminating a line at the space or hyphen, or, if the specified zone does not contain space nor hyphen, of soliciting the operator to insert a hyphen. Also the technologies related to the present invention are disclosed in the U.S. Patents 2,217,150, 3,466,604 and 4,138,719, but these resemble the above-mentioned technologies or combinations thereof. The above-mentioned technologies are principally applied at the printing operation, but are not suitable to word processor or electronic typewriter employing the recent concept of providing a display exactly same as print, or "What you see is what you get", achieved by recent progress in the display and editing technologies. On the other hand, in the conventional technology in which the display does not exactly correspond to the print, the line-end processing has to be done at the printing, so that the operator is required to conduct the hyphen insertion at the printing operation. There is disclosed in the IBM Technical Disclosure Bulletin Vol. 12, No. 4, September 1969, an editing display device which incorporates a hyphen control logic. In the arrangement disclosed the machine operator is appraised of words which may be hyphenated prior to producing a final output copy. US Patent No. 4,092,729 discloses hyphenation apparatus which is combined with word verification apparatus to automatically provide hyphenation points for input words from a keyboard or other input device. The spelling of each word input to the system is verified by the digital reference matrix section of the apparatus by calculating a vector magnitude and angle for the word which is compared to the contents of a storage dictionary of words. Each cell of storage in the storage dictionary, in addition to containing a unique angle representation of the input word, contains a byte of data representing the valid hyphenation points for the input word. When an input word is verified to be correctly spelled, the hyphenation byte is read out of dictionary and used by the hyphenation section to reassemble the word in hyphenated form. The hyphenated word is then displayed to the operator for appropriate action. SUMMARY OF THE INVENTION According to the present invention a text processing apparatus having input means for entering information; memory means for storing said information entered from said input means; display means for displaying the information stored in said memory means; printing means for printing the information stored in said memory means; and judging means for judging, when the information read from said memory means overflows an area of visualization by said display means or said printing means, whether to visualize said information in the next line or to insert a hyphen within said information; is characterized by: notice means for giving a notice to the operator when said judging means determines to insert the hyphen; and inverse word wrap-around means for moving a part of word having a hyphen inserted therein to the end of a preceding line in response to said judging means. How the invention may be carried out will now be described by way of example only and with reference to the accompanying drawings in which: BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a text processing apparatus employed in the present invention; Fig. 2A is a view showing the content of a text buffer; Fig. 2B is a view showing the content of the text buffer shown in Fig. 2A when a hyphen is inserted therein; Fig. 3 is a view showing character codes to be stored in the text buffer; Fig. 4A is a view showing display or print prior to hyphen scanning; Fig. 4B is a view showing display or print after hyphen scanning; Fig. 5 is a flow chart showing the control sequence of the present invention; Fig. 6 is a flow chart showing the control sequence of hyphen scanning; Fig. 7 is a flow chart showing the control sequence of hyphen insertion; and Fig. 8 is a view showing soft hyphening process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Now the present invention will be clarified in detail by the embodiment thereof shown in the attached drawings. Fig. 1 shows a text processing apparatus of the present invention, composed of a keyboard KBD, a controller CNT, a display unit OSP, and a printer unit PRT. The keyboard KBD is provided with numeral keys "1" - "0", alphabet keys "A" - "Z", a space key "SP" for making a pace between words, a hyphen key "-", and a soft hyphen key "...". The use of the soft hyphen key will be explained later. In addition, there are at least provided a hyphen search key "HS", a print key "PT", and a back space key "BS". Also there are provided a return key and a tabulator key. Consequently the keyboard KBD can be a keyboard suitable for the text processing apparatus, namely a typewriter keyboard, or an ASCII keyboard common in personal computers. The input key means for soft hyphening, instruction means for hyphen search and instruction means for printing are composed of respective keys in the present embodiment, but they may be replaced by combinations of a control key and numeral/alphabet keys in case of the ASCII keyboard. The controller CNT functions principally under the control of a microprocessor MPU, so that there are at least required a key signal input port KIP, a display output port DOP, a printer output port POP, and memories ROM and RAM. As will be understood from the drawing, a key signal entered from the keyboard KBD is supplied, at each key actuation, to the input port KIP of the controller CNT. The controller CNT, constantly watching the input port KIP, fetches the key signal and immediately executes a corresponding processing, which is principally a text processing, such as identifying the content of the entered key signal (character information or control information), and stores it in a text area TEX of the memory RAM if it is character information. The memory RAM is also used for storing the status of the apparatus. The memory ROM stores programs shown in the flow charts to be explained later, and a dictionary for hyphening. The information stored in the text area is released through the output ports DOP, POP, and is subjected to display and editing in passing the microprocessor MPU. For example arrangement control is executed according to format information such as N lines per page and M characters per line. The result of such processing is supplied through the display output port DOP to the display unit DSP to show, to the operator, what text has been entered or whether the entered text is correct. The display unit DSP is provided with a memory RAM of an image frame. When the operator has entered all the desired text through the keyboard KBD, and if the content thereof is confirmed perfect, the operator depresses the print key PT, whereupon the controller CNT identifies the print instruction and causes the edited text through the printer output port POP to the printer unit PRT. In this manner the operator obtains the text on paper. Now the function of the embodiment explained above will be explained further, with reference to appended flow charts. In the following there will be given a detailed explanation principally on the hyphen scanning operation of the present invention. As explained before, the controller CNT is principally composed of the microprocessor MPU, which is alone incapable of controlling function but always requires memories ROM and RAM in addition to the input/output port. In general, the ROM stores a control program which can be considered a sequence of instructions to the microprocessor. On the other hand, the RAM is capable of writing and reading, and is used, in the present embodiment, for storing a cursor counter, a visualizing format, flags and a text. Thus the alphabet characters, numerals, space etc. entered from the keyboard KBD are stored in succession in the memory RAM in the form of character codes, for example ASCII codes. As an example, when words A - L are entered from the keyboard KBD, they are stored, as shown in Fig. 2A, in a text buffer TEX defined in advance in the memory RAM. Each of the words A - L is composed of plural characters, and the words are mutually separated by spaces. If the word A is "This", it is composed of ASCII character codes of 4 bytes, followed by a space code (20H). Then, if the word 8 is "is", it is also represented by ASCII codes of 2 bytes. In this manner there is stored a sequence of ASCII codes as shown in Fig. 3. Then, Fig. 4 shows the status of display on the display unit DSP as the result of processing, wherein LM indicates the left margin position, and RM indicates the right margin position, corresponding respectively to the left-hand and right-hand limits of the text format. In the first line, the words A to D are accommodated between the margins without difficulty. However the word E which overflows the right margin, is made visible in the second line when the first character of the word E is entered. This is called word wrap-around function. Then the words F to G can be accommodated between the margins without difficulty, but the word H overflows the right margin RM at a position close to the last character of the word H. Thus, when the right margin is exceeded at the input of the word H, the entire word H is subjected to the word wrap-around to the next third line. Thereafter the words I to L are entered, with the word wrap-around of the word K. As will be understood from the foregoing, the text processing apparatus of the present invention has the word wrap-around function, for not exceeding both margins, at the input stage. However, as will be apparent from Fig. 4A, the obtained document is not fine-looking, because the ends of the lines are not aligned. The technology of the present invention, or the hyphen-scanning function, is required for resolving this drawback. In the following there will be explained, at first, the entire control sequence, and then the hyphen scanning and the insertion of hyphen or soft hyphen, while referring to a flow chart showing the actual control sequence. Fig.5 is a flow chart of the entire control sequence. When the power supply to the hardware shown in Fig.1 is started, there is conducted initialization of the entire apparatus (step 5.1). Then the sequence proceeds to an equipment control main routine (step 5.2). The step 5.2 is a mere passing point in the control and does not execute any particular process. A next step 5.3 senses whether a key signal is present at the key input port KIP of the controller CNT shown in Fig.1, and the sequence branches according to the result of the sensing. Thus the steps 5.2 and 5.3 are repeated during the absence of the key signal, and the sequence proceeds to a step 5.4 only when the key signal is entered. The step 5.4 discriminates whether the key HS has been actuated, and, if so, a hyphen scanning process HYSC is executed, or, if not, the sequence proceeds to a control sequence starting from a step 5.5. Thereafter steps 5.5, 5.6, 5.7, 5.8 and 5.9 respectively check the hyphen or soft hyphen key, the space key, the back space key, the alphanumeric keys and the print key, and, depending on the cases, there are executed respective processes, namely a hyphen scanning process HYSC to be explained later; a process HYPN for inserting a hyphen or a soft hyphen into a row of characters; a process SPC for inserting a space into a row of characters; a back space process BSP for moving the cursor by a step to left; an alphanumeric input process AN; and a process PRN for printing the data of the text buffer. After the execution of any of these processes, the sequence returns to the step 5.2. The hyphen scanning process HYSC is shown in Fig.6. In the following there is introduced a new concept, which is a special margin SM provided at a distance of several characters to the left of the right margin RM, defining the start point of the hot zone. Each line is to be ended between the special margin SM and the right margin RM. This principle is similar to that of the aforementioned hot zone, but the technology of the present invention is novel in the utilization of the special margin SM or the hot zone. More specifically, the hyphenation is conducted by the editing process on the editing image frame. At first a step 6.1 reads the row of characters from the text buffer and displays the row of characters between the left margin LM and the right margin RM (called reformatting). More specifically, if the cursor is positioned on the display at the left-end position in Fig.4A, the words are arranged in succession, starting from the word A, from the left margin LM. The word E is subjected to word wrap-around as it overflows the right margin RM. After the reformatting of a line in this manner, a step 6.2 discriminates whether the word wrap-around is executed. Since the word wrap-around is conducted for the word E in this case, the sequence proceeds to a step 6.3. The step 6.3 discriminates whether this line overflows the aforementioned special margin SM. As the line ends with the word D, of which end is positioned between the special margin SM and the right margin RM, the control sequence returns to the step 6.1. At this point the cursor is positioned at the second line. Thus the words F, G and H are arranged succeeding to the wrapped around word E, but the word H is subjected to the word wrap-around because it overflows the right margin. In response the control sequence proceeds from the step 6.2 to 6.3. The discrimination in this step becomes negative, indicating that the end of the second line is not positioned between the special margin SM and the right margin RM. Thus the control sequence proceeds to a step 6.4 for calculating the limit point of inverse wrapping to the preceding line by inserting a hyphen into the word H. If the word H overflows the right margin by three characters, the limit position of hyphenation is at the third character from the last of the word H. A succeeding step 6.5 places the cursor accordingly on the display, thus soliciting the operator to insert the hyphen. It is to be noted that the cursor is positioned, in the above-explained example, at the fourth character from the last, since, if it is located at the limit position, the hyphen inserted after the cursor position overflows the right margin RM. Namely, the hyphen should be inserted to the left side of the character positioned by the cursor. The cursor thus positioned can be moved to a desired position, for example by moving to left with the back space key BS, as in the step 5.7 in Fig.5. When the cursor is placed at the desired position as explained above and the operator instructs the insertion of hyphen or soft hyphen, there is executed a process HYPN starting from a step 5.5 in Fig.5 and shown in Fig.7. A step 7.1 inserts a character code for hyphen or soft hyphen into the text buffer, whereby the content thereof assumes a state shown in Fig.2B. Then a step 7.2 reformats the line based on the content of the text buffer, whereby the former part, including the hyphen, of the word H is returned to the preceding line, and the status of the line is displayed on the display unit DSP. Thus the operator can confirm the effect of hyphen insertion. Then, upon actuation of the key HS by the operator, the hyphen scanning process is again executed. Thus reformatting is conducted starting from a character immediately following the hyphen in the word H (from the start of H2 in Fig.4B) to obtain a status shown in Fig.4B on the display DSP. Then, upon actuation of the key PT by the operator, there is executed a process PRN printing the text line by line, with reformatting from the start of the text buffer with the same algorithm as in the above-mentioned reformatting on the display. Consequently the display exactly corresponds to the print, which assumes the state shown in Fig.4B. The above-mentioned soft hyphen can be considered as a character for temporarily dividing a word in representing a text on the display or on paper. As an example, for a word "hyphen", the appropriate insertion of soft hyphen is done as "hy...phen". A word containing such soft hyphen is meaningful only when it is divided into the right-hand end of a line and the left-hand end of a next line. In case a word is deleted from the first-mentioned line, the soft-hyphenated word is entirely returned to the line, and, in such case, a representation "hy...phen" is unnatural. Therefore it is reproduced as "hyphen" without the soft hyphen, as shown in Fig.8. However the soft hyphen information is retained in the text buffer TEX, and is disregarded at the display or printing, according to MSB = 1 or 0. The soft hyphen information retained in the text buffer can be utilized in case the word has to be divided at the end of a line. Also as will be apparent from Fig.7, the input of the soft hyphen can be made in the same manner as that of the hyphen, with character codes capable of distinguishing the soft hyphen from the hyphen. For example, of the hyphen is represented by a code 2D H , it is convenient, for the purpose of control, to represent the soft hyphen by AD H by turning on the most significant bit. [Other embodiments] In the foregoing explanation, the hyphen insertion is conducted by the operator, but there may be employed automatic hyphenation based on the spelling verifier technology recently developed. Also the text buffer, which is provided in the RAM in the foregoing embodiment, may be provided in a floppy disk or a hard disk. As explained in the foregoing, the present invention gives the notice for hyphenation to the operator at the stage of editing, so that the judgement of operator is not needed at the stage of printing, contrary to the conventional text processing apparatus. Besides the hyphen or soft hyphen inserted by the operator is not temporary but is memorized in the text, so that the printing can be done without additional care if the hyphenation is once done in the editing. Furthermore, the present invention is applicable to a text processing apparatus with reformatting function, in simple manner by a modification or an addition of software, if a key operation for starting the hyphen scanning (aforementioned combined use of a control key) is made available.

Claims: A text processing apparatus having input means (KBD) for entering information; memory means (TEX, RAM) for storing said information entered from said input means; display means (DSP) for displaying the information stored in said memory means; printing means (PRT) for printing the information stored in said memory means; and judging means (6.3) for judging, when the information read from said memory means overflows an area of visualization by said display means or said printing means, whether to visualize said information in the next line or to insert a hyphen within said information; characterized by : notice means for giving a notice to the operator when said judging means determines to insert the hyphen; and inverse word wrap-around means (6.4) for moving a part of word having a hyphen inserted therein to the end of a preceding line in response to said judging means. A text processing apparatus according to Claim 1, wherein said input means comprises a keyboard (KBD) for entering character information and hyphen information. A text processing apparatus according to Claim 1, wherein said display means (DSP) comprises control means for displaying a cursor for defining the position for entering character information into said text processing apparatus. A text processing apparatus according to Claim 1, wherein said judging means (6.3) comprises control means for discriminating whether said character information moved to the next line is located to the left of a 10 boundary (SM) positioned to the left of the right-hand end (RM) of said area. A text processing apparatus according to Claim 3, further comprising means for moving the cursor for 15 entering the hyphen according to the judgement of said judging means.

Inventors: UEDA HIROYUKI, UEDA, HIROYUKI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1988
Main classification: G06F15
IPC codes: B41J29, G06F17, G06F3, B41J19