JP2000250904A - Device and method for document creation and recording medium where program for document creation is recorded - Google Patents

Device and method for document creation and recording medium where program for document creation is recorded

Info

Publication number
JP2000250904A
JP2000250904A JP11050058A JP5005899A JP2000250904A JP 2000250904 A JP2000250904 A JP 2000250904A JP 11050058 A JP11050058 A JP 11050058A JP 5005899 A JP5005899 A JP 5005899A JP 2000250904 A JP2000250904 A JP 2000250904A
Authority
JP
Japan
Prior art keywords
page
character string
document
document data
lines
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11050058A
Other languages
Japanese (ja)
Inventor
Mitsuhiko Ono
光彦 小野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP11050058A priority Critical patent/JP2000250904A/en
Publication of JP2000250904A publication Critical patent/JP2000250904A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To eliminate the need for document format modifying operation or the like after substitution even when the number of lines of document data increases by providing a means or the like for putting all document data in a page after the document data that one page contains before substitution have a character string replaced. SOLUTION: A document format modifying means 6 recognizes how many lines exceed one page after substitution. Then the line spacing of the page before the substitution in document format information stored in a document format storage buffer 4 is read in by a document format information read means 7 and divided into ten. Namely, the line spacing between two lines is divided into 1st to 10th divided lines. The document format modifying means 6 shortens each line spacing width in the page by one division line on the basis of the start line of the page after the substitution as a reference point and confirms the number of lines which are put in the page after the substitution as a result of the shortening of the line spacing.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ワードプロセッサ
等の文書作成装置に関し、特に、文書データ中の特定の
文字列を別の文字列で置換する機能を有する文書作成装
置に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a document creation device such as a word processor, and more particularly to a document creation device having a function of replacing a specific character string in document data with another character string.

【0002】[0002]

【従来の技術】従来の文書作成装置においては、文書デ
ータ中の文字列の置換を行った結果、置換する文字列
(置換後の文字列)が置換される文字列(置換前の文字
列)よりも長いために文書データの行数が増える場合に
は、行挿入を行い文字列を置換していた。
2. Description of the Related Art In a conventional document creation apparatus, a character string to be replaced (character string after replacement) is replaced with a character string (character string before replacement) as a result of replacing a character string in document data. When the number of lines of the document data increases because the length is longer than the length, a character string is replaced by inserting a line.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、このよ
うに文字列の置換を行う際に行挿入を行う従来の技術に
おいては、文書を印刷した場合に、文字列置換前には1
ページ内に収まっていた文書も文字列置換後には複数ペ
ージに印刷されてしまいかねないという問題点があっ
た。このような事態を回避するために、文字列置換後の
文書について、文字列置換前の印刷ページ数に合わせる
ための文書様式変更作業や、文書の目次等の修正といっ
た余計な作業が発生するという問題点があった。
However, in the conventional technique of inserting a line when replacing a character string as described above, when a document is printed, one line is inserted before the character string is replaced.
There was a problem that a document that was contained within a page could be printed on multiple pages after character string replacement. In order to avoid such a situation, extra work such as changing the document format to match the number of printed pages before replacing the character string and modifying the table of contents of the document occurs after replacing the character string. There was a problem.

【0004】本発明の目的は、文書データ中の文字列を
置換した結果、置換する文字列が置換される文字列より
長いために文書データの行数が増える場合でも、置換後
の文書様式変更作業等を不要とする文書作成装置、文書
作成方法および文書作成用プログラムを記録した記録媒
体を提供することにある。
An object of the present invention is to change a document format after replacement even if the number of lines in the document data increases because the replacement character string is longer than the replacement character string as a result of replacing the character string in the document data. An object of the present invention is to provide a document creation device, a document creation method, and a recording medium that records a document creation program that does not require any operation.

【0005】[0005]

【課題を解決するための手段】本発明の第1の文書作成
装置は、文書データ中の任意の文字列を置換したことに
より置換された文字列を含んでいたページ内の文書デー
タが当該ページ内に収まらなくなったかどうかを判定す
る第1の手段と、前記第1の手段によりページ内に文書
データが収まらなくなったと判定された場合に、当該ペ
ージ内の行間幅を詰めて、文字列の置換前に当該ページ
内に納まっていた文書データに対して文字列の置換を行
った後の全ての文書データが、当該ページ内に収まるよ
うにする第2の手段とを備えている。
According to a first aspect of the present invention, there is provided a document creating apparatus which replaces an arbitrary character string in the document data with the document data in the page containing the replaced character string. Means for determining whether the document data does not fit within the page, and when the first means determines that the document data no longer fits on the page, the line spacing in the page is reduced to replace the character string. There is provided a second means for ensuring that all the document data obtained by performing the character string replacement on the document data previously stored in the page fits in the page.

【0006】本発明の第2の文書作成装置は、上記第1
の文書作成装置の前記第2の手段が、当該ページ内の行
間幅を一定数の分割行に分割し、文字列の置換前に当該
ページ内に納まっていた文書データに対して文字列の置
換を行った後の全ての文書データ当該ページ内に収まる
ようになるまで、前記分割行を1つずつ取り除くことに
より、行間幅を詰めていくことを特徴とする。
[0006] The second document creation device of the present invention comprises the first document creation device.
The second means of the document creation device of the above, divides the line spacing in the page into a fixed number of divided lines, and replaces the character string with the document data stored in the page before the character string is replaced. Is performed, by removing the divided lines one by one until all the document data after the document data can be accommodated in the page, thereby reducing the line spacing.

【0007】本発明の第3の文書作成装置は、上記第2
の文書作成装置の前記第2の手段が、前記分割行を取り
除く際に、行間に一定数の分割行を残すようにすること
を特徴とする。
[0007] The third document creation apparatus of the present invention comprises the second document creation apparatus.
Wherein the second means of the document creation apparatus according to the first aspect of the present invention leaves a fixed number of divided lines between the lines when removing the divided lines.

【0008】本発明の第1の文書作成方法は、文書デー
タ中の任意の文字列を置換したことにより置換された文
字列を含んでいたページ内の文書データが当該ページ内
に収まらなくなったかどうかを判定する第1のステップ
と、前記第1のステップでページ内に文書データが収ま
らなくなったと判定された場合に、当該ページ内の行間
幅を詰めて、文字列の置換前に当該ページ内に納まって
いた文書データに対して文字列の置換を行った後の全て
の文書データが、当該ページ内に収まるようにする第2
のステップとを含んでいる。
[0008] A first document creation method according to the present invention is to determine whether or not document data in a page containing a replaced character string by replacing an arbitrary character string in the document data does not fit in the page. And if it is determined in the first step that the document data no longer fits within the page, the line spacing in the page is reduced and the The second method is to ensure that all the document data after performing the character string replacement on the contained document data fits in the page.
Steps.

【0009】本発明の第2の文書作成方法は、上記第1
の文書作成方法の前記第2のステップにおいて、当該ペ
ージ内の行間幅を一定数の分割行に分割し、文字列の置
換前に当該ページ内に納まっていた文書データに対して
文字列の置換を行った後の全ての文書データ当該ページ
内に収まるようになるまで、前記分割行を1つずつ取り
除くことにより、行間幅を詰めていくことを特徴とす
る。
The second document creation method according to the present invention is characterized in that
In the second step of the document creation method, the line spacing in the page is divided into a certain number of divided lines, and the character string is replaced with the document data stored in the page before the character string is replaced. Is performed, by removing the divided lines one by one until all the document data after the document data can be accommodated in the page, thereby reducing the line spacing.

【0010】本発明の第3の文書作成方法は、上記第2
の文書作成方法の前記第2のステップにおいて、前記分
割行を取り除く際に、行間に一定数の分割行を残すよう
にすることを特徴とする。
A third document creation method according to the present invention is characterized in that
In the second step of the document creation method described above, when the divided lines are removed, a fixed number of divided lines are left between the lines.

【0011】本発明の第1の記録媒体は、文書データ中
の任意の文字列を置換したことにより置換された文字列
を含んでいたページ内の文書データが当該ページ内に収
まらなくなったかどうかを判定する第1の処理と、前記
第1の処理でページ内に文書データが収まらなくなった
と判定された場合に、当該ページ内の行間幅を詰めて、
文字列の置換前に当該ページ内に納まっていた文書デー
タに対して文字列の置換を行った後の全ての文書データ
が、当該ページ内に収まるようにする第2の処理と、を
コンピュータに実行させるプログラムを記録している。
A first recording medium according to the present invention determines whether or not document data in a page including a replaced character string by replacing an arbitrary character string in the document data does not fit in the page. A first process for determining, and when it is determined that the document data does not fit in the page in the first process, the line spacing in the page is reduced,
And performing, on the computer, a second process for ensuring that all the document data obtained by performing the character string replacement on the document data stored in the page before the character string replacement fits in the page. The program to be executed is recorded.

【0012】本発明の第2の記録媒体は、上記第1の記
録媒体に記録された前記プログラムが、前記第2の処理
において、当該ページ内の行間幅を一定数の分割行に分
割し、文字列の置換前に当該ページ内に納まっていた文
書データに対して文字列の置換を行った後の全ての文書
データ当該ページ内に収まるようになるまで、前記分割
行を1つずつ取り除くことにより、行間幅を詰めていく
処理を実行させることを特徴とする。
In a second recording medium according to the present invention, the program recorded on the first recording medium divides a line spacing in the page into a fixed number of divided lines in the second processing, Removing the divided lines one by one until all the document data after the character string is replaced with the document data contained in the page before the character string is replaced is contained in the page; Thus, a process of narrowing the space between lines is executed.

【0013】本発明の第3の記録媒体は、上記第2の記
録媒体に記録された前記プログラムが、前記第2の処理
において、前記分割行を取り除く際に、行間に一定数の
分割行を残すようにする処理を実行させることを特徴と
する。
In a third recording medium according to the present invention, when the program recorded on the second recording medium removes the divided lines in the second processing, a predetermined number of divided lines are inserted between the lines. It is characterized in that a process for leaving the image is executed.

【0014】本発明の記録媒体群は、上記第1乃至第3
の記録媒体のいずれかに記録された前記プログラムを複
数の部分に分割して該複数の部分をそれぞれ複数の記録
媒体に記録してなる。
The recording medium group of the present invention includes the first to third recording media.
The program recorded on any one of the recording media is divided into a plurality of portions, and the plurality of portions are respectively recorded on a plurality of recording media.

【0015】[0015]

【発明の実施の形態】次に、本発明の第1の実施の形態
について、図面を参照して詳細に説明する。
Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

【0016】図1を参照すると、本発明の第1の実施の
形態は、文字列置換を行う対象の文書を読み込む文書入
力手段1と、読み込まれた文書を記憶する入力用バッフ
ァ2と、入力用バッファ2に記憶されている文書のペー
ジ数、各ページの開始行、終了行、行間幅、改ページ情
報、1行あたりの文字数、ページ内の段落情報等の様式
情報を読み込む文書様式読取手段3と、読み込まれたこ
れらの様式情報を記憶する文書様式情報格納バッファ4
と、置換する文字列、置換される文字列を入力し、これ
らの文字列の文字数比較、文字列置換を行う文字列置換
手段5と、文書様式情報格納バッファ4に格納されてい
る各様式情報を読み込む文書様式情報読取手段7と、読
み込まれた各様式情報に基づき文書様式の変更を行う文
書様式変更手段6と、変更作業の際に利用される作業用
バッファ8と、文書様式変更手段6で変更された文書を
出力する文書出力手段9とからなる。
Referring to FIG. 1, according to a first embodiment of the present invention, a document input means 1 for reading a document to be subjected to character string replacement, an input buffer 2 for storing the read document, and an input buffer Format reading means for reading format information such as the number of pages of a document stored in the buffer 2, the start line, end line of each page, line width, page break information, the number of characters per line, and paragraph information in a page. 3 and a document format information storage buffer 4 for storing the read format information.
, A character string to be replaced, a character string to be replaced, a character string replacing means 5 for comparing the number of characters of these character strings, and performing character string replacement, and each format information stored in the document format information storage buffer 4. , A document format changing unit 6 for changing the document format based on each of the read format information, a work buffer 8 used for the change work, and a document format changing unit 6 And a document output means 9 for outputting the document changed in step (1).

【0017】次に、図1〜図10を参照して、本発明の
第1の実施の形態の動作について説明する。
Next, the operation of the first embodiment of the present invention will be described with reference to FIGS.

【0018】図2を参照すると、まず、文書入力手段1
が、文字列置換を行う対象の文書(文書様式情報を含
む)を入力用バッファ2に読み込む(ステップA1)。
文書様式情報読取手段3は、入力用バッファ2から、文
書のページ数、各ページの開始行、終了行、行数、行間
幅、改ページ情報、1行あたりの文字数、ページ内の段
落情報等の文書様式情報を読み込み、文書様式格納バッ
ファ4に格納する(ステップA2)。
Referring to FIG. 2, first, the document input means 1
Reads the document (including document format information) to be subjected to character string replacement into the input buffer 2 (step A1).
The document format information reading means 3 reads, from the input buffer 2, the number of pages of the document, the start line, the end line, the number of lines, the line width, the line width, the page break information, the number of characters per line, the paragraph information in the page, etc. Is read and stored in the document format storage buffer 4 (step A2).

【0019】次に、文字列置換手段5は、置換する文字
列を入力する(ステップA3)。この置換する文字列の
文字数をAとする。また、文字列置換手段5は、置換さ
れる文字列を入力する(ステップA4)。この置換され
る文字列の文字数をBとする。そして、文字列置換手段
5は、置換される文字列が入力用バッファ2内に読み込
まれている文書内のどのページに存在しているかを確認
し、置換される文字列が存在するページの行数を確認す
る。さらに、文字列置換手段5は、文字数Aと文字数B
が等しいかどうかを判定する(ステップA6)。文字数
Aと文字数Bが等しければ、文字列を置換し(ステップ
A7)、文書出力手段9により文書を出力する。
Next, the character string replacing means 5 inputs a character string to be replaced (step A3). Let A be the number of characters in the character string to be replaced. Further, the character string replacing means 5 inputs a character string to be replaced (step A4). Let B be the number of characters in this replaced character string. Then, the character string replacement means 5 checks which page in the document read in the input buffer 2 contains the character string to be replaced, and checks the line of the page where the character string to be replaced exists. Check the number. Further, the character string replacing means 5 includes a character number A and a character number B.
Are determined to be equal (step A6). If the number of characters A is equal to the number of characters B, the character string is replaced (step A7), and the document output means 9 outputs a document.

【0020】文字数Aと文字数Bが等しくない場合は、
文字数Aと文字数Bのどちらが大きいかを判定する(ス
テップA8)。
When the number of characters A and the number of characters B are not equal,
It is determined whether the number of characters A or B is larger (step A8).

【0021】ステップA8において文字数Aが文字数B
より小さいと判定された場合は、以下、図3のフローチ
ャートに従って動作する。
In step A8, the number of characters A is changed to the number of characters B
If it is determined that it is smaller than the above, the operation is performed in accordance with the flowchart of FIG.

【0022】まず、文字列置換手段5は、置換される文
字列を置換する文字列で置換する(ステップA9)。し
かし、置換する文字列の文字数Aが置換される文字列の
文字数Bよりも小さいので、置換後の文書において、置
換した文字列の右には文字数Aと文字数Bの差分の長さ
の不要な文字列が生じる。そこで、文字列置換手段5
は、これを削除して後続の文書を左側に詰める(ステッ
プA10)。また、ここで削除した文字列と同じ文字数
分の文字列を次の行の左側先頭から切り出しその上の行
の右側に挿入する(ステップA11)。その後、段落の
最終行かどうかを判定し(ステップA12)、最終行で
なければステップA11に戻る。これを段落の最後まで
繰り返す。
First, the character string replacing means 5 replaces the character string to be replaced with a character string to be replaced (step A9). However, since the number of characters A of the character string to be replaced is smaller than the number of characters B of the character string to be replaced, in the replaced document, the length of the difference between the number of characters A and the number of characters B is unnecessary to the right of the replaced character string. A string results. Therefore, the character string replacing means 5
Deletes this and shifts subsequent documents to the left (step A10). Further, a character string having the same number of characters as the character string deleted here is cut out from the left head of the next line and inserted into the right of the line above (step A11). Thereafter, it is determined whether or not it is the last line of the paragraph (step A12), and if not, the process returns to step A11. Repeat this until the end of the paragraph.

【0023】このときの文字列置換の処理について、図
4に示す。図4は、「aa」という文字列を「b」とい
う文字列で置換する場合の例である。なお、図におい
て、「S」は段落の開始位置、「E」は段落の終了位
置、数字は文字の移動を模式的に表すものである。
FIG. 4 shows the character string replacement process at this time. FIG. 4 shows an example in which the character string “aa” is replaced with the character string “b”. In the figure, "S" indicates the start position of the paragraph, "E" indicates the end position of the paragraph, and the numbers schematically indicate the movement of characters.

【0024】次に、文字列置換手段5は、最後まで終了
した時点で段落内の行数が減少したかどうか判定する
(ステップA13)。この判定の結果、行数が減少して
いなければ(ステップA13でNO)、文書出力手段9
により文書を出力する。行数が減少していたら(ステッ
プA13でYES)、図8のフローチャートに従った動
作を行う。
Next, the character string replacing means 5 determines whether or not the number of lines in the paragraph has decreased at the time when the processing is completed to the end (step A13). If the result of this determination is that the number of lines has not decreased (NO in step A13), the document output means 9
To output the document. If the number of rows has decreased (YES in step A13), the operation according to the flowchart in FIG. 8 is performed.

【0025】一方、図2のステップA8において文字数
Aが文字数Bより大きいと判定された場合は、以下、図
5のフローチャートに従って動作する。
On the other hand, if it is determined in step A8 of FIG. 2 that the number of characters A is larger than the number of characters B, the operation is performed according to the flowchart of FIG.

【0026】まず、文字列置換手段5は、置換される文
字列の後方に文字数Aと文字数Bとの差分の長さのスペ
ースを挿入する(ステップA14)。次に、この挿入し
たスペースと同じ長さの文字列をスペースを挿入した行
の右側よりカットして作業用バッファ8に格納し(ステ
ップA15)、文字列を置換する(ステップA16)。
また、作業用バッファ8に格納されている文字列と同じ
長さの文字列を次の行の右側からカットして作業用バッ
ファ8に格納する(ステップA17)。さらに、ステッ
プA14で作業用バッファ8に格納された文字列を置換
の行われた次の行の先頭に挿入する(ステップA1
8)。ここで、段落最終行かどうかを判定し(ステップ
A19)、最終行でなければステップA17に戻る。こ
れを段落最終行まで繰り返す。
First, the character string replacing means 5 inserts a space having a difference length between the number of characters A and the number of characters B after the character string to be replaced (step A14). Next, a character string having the same length as the inserted space is cut from the right side of the line where the space is inserted, and stored in the work buffer 8 (step A15), and the character string is replaced (step A16).
Further, a character string having the same length as the character string stored in the work buffer 8 is cut from the right side of the next line and stored in the work buffer 8 (step A17). Further, the character string stored in the work buffer 8 in step A14 is inserted at the head of the next line after the replacement (step A1).
8). Here, it is determined whether it is the last line of the paragraph (step A19), and if it is not the last line, the process returns to step A17. This is repeated until the last line of the paragraph.

【0027】このときの文字列置換の処理について、図
6及び図7に示す。図6は、「aa」という文字列を
「bbb」という文字列で置換する場合の例であり、図
7は、「aa」という文字列を「bbbb」という文字
列で置換する場合の例である。なお、図において、
「S」は段落の開始位置、「E」は段落の終了位置、数
字は文字の移動を模式的に表すものである。
FIGS. 6 and 7 show the character string replacement processing at this time. FIG. 6 shows an example in which the character string "aa" is replaced with a character string "bbb", and FIG. 7 shows an example in which the character string "aa" is replaced with a character string "bbbb". is there. In the figure,
"S" indicates the start position of the paragraph, "E" indicates the end position of the paragraph, and the numbers schematically indicate the movement of characters.

【0028】次に、文字列置換手段5は、最後まで終了
した時点で段落内の行数が増加したかどうかを判定する
(ステップA20)。増加していなければ(ステップA
20でNO)、文書出力手段9を用いて文書を出力す
る。増加していたら(ステップA20でYES)、図9
のフローチャートに従った動作を行う。
Next, the character string replacing means 5 determines whether or not the number of lines in the paragraph has increased at the time when the processing is completed to the end (step A20). If it has not increased (Step A
(NO at 20), and outputs the document using the document output means 9. If it has increased (YES in step A20), the process shown in FIG.
The operation according to the flowchart of FIG.

【0029】次に、行数が減少した場合の処理につい
て、図8を参照して説明する。
Next, processing when the number of rows is reduced will be described with reference to FIG.

【0030】まず、文書様式変更手段6は、置換が行わ
れたページ内でどれだけ行数が減少したかを確認する
(ステップA21)。減少行数をMとする。行数が減少
したページの最終行の次にM行の空白行を挿入する(ス
テップA22)。
First, the document format changing means 6 confirms how much the number of lines has been reduced in the replaced page (step A21). Let M be the reduced number of rows. A blank line of M lines is inserted next to the last line of the page whose number of lines has been reduced (step A22).

【0031】次に、行数が増加した場合の処理につい
て、図9を参照して説明する。
Next, the processing when the number of rows increases will be described with reference to FIG.

【0032】まず、文書様式変更手段6は、置換が行わ
れたページ内にどれだけの行が収まらなくなったかを確
認する(ステップA23)。このページ内に収まらなく
なった行数(増加行数)をLとする。置換が行われたペ
ージにおける置換が行われる前の行数を確認する(ステ
ップA24)。置換が行われる前の行数をLAとする。
文書様式格納バッファ4に格納されている文書様式情報
にある置換される前のページの行間幅を文書様式情報読
取手段7で読み込み、10分割する(ステップA2
5)。すなわち、図10(A)に示すように、「あいう
えお」という行と「かきくけこ」という行との行間は、
第1の分割行から第10の分割行に分割される。文書様
式変更手段6は、置換が行われたページの先頭行を基準
点としてページ内のそれぞれの行間幅を1分割行だけ詰
めていく(ステップA26)。この処理により、上記例
における行間幅は図10(B)に示すようになる。次
に、文書様式変更手段6は、行間を詰めたことで、置換
が行われたページに収まるようになった行数を確認する
(ステップA27)。このときページ内に収まる行数を
LBとする。また、行間幅を何個詰めたかを判定するカ
ウンターを、1だけ加算しておく(ステップA28)。
ここで、カウンターは初期値が1で最大値は9である。
最大値が9なのは行間幅が全くない文書は非常に見難い
ので、最低限1分割行だけは行間をあけておくためであ
る。カウンターが9以下かを判定し(ステップA2
9)、9以下であれば(L+LA)とLBとが等しいか
どうか判定する(ステップA31)。L+LAとLBが
等しければ置換後の文書が置換前と同じページに納まっ
たことを意味するので、文書出力手段9を用いて文書を
出力する。等しくなければ置換後の文書が置換前の同じ
ページに納まっていないことを意味するので、ステップ
A26に戻り、もう1分割行だけ行間を詰め、再度LB
を取得し、カウンターに1を加えてステップA29およ
びステップ31の判定を行う。この場合、上記例におけ
る行間幅は図10(C)に示すようになる。もし、ステ
ップA29でカウンターが9よりも大きくなった場合
は、このページ内には入りきらない旨のエラーメッセー
ジを表示する(ステップA30)。
First, the document format changing means 6 checks how many lines cannot be accommodated in the replaced page (step A23). Let L be the number of lines that no longer fit within this page (increased number of lines). The number of lines in the replaced page before replacement is checked (step A24). The number of rows before the replacement is performed is LA.
The line spacing of the page before replacement in the document format information stored in the document format storage buffer 4 is read by the document format information reading means 7 and divided by 10 (step A2).
5). That is, as shown in FIG. 10 (A), the space between the line “Aioeo” and the line “Kakikukeko” is
The first divided row is divided into the tenth divided row. The document format changing unit 6 narrows the line spacing in the page by one division line with the top line of the replaced page as a reference point (step A26). By this processing, the line spacing in the above example becomes as shown in FIG. Next, the document format changing unit 6 confirms the number of lines that can be accommodated in the replaced page by reducing the line spacing (step A27). At this time, the number of lines that can fit within the page is LB. In addition, a counter for determining how many line spacings are reduced is incremented by 1 (step A28).
Here, the counter has an initial value of 1 and a maximum value of 9.
The reason why the maximum value is 9 is that it is very difficult to see a document having no line spacing at all, so that at least one divided line is left with a space between lines. It is determined whether the counter is 9 or less (step A2).
9) If it is 9 or less, it is determined whether (L + LA) is equal to LB (step A31). If L + LA and LB are equal, it means that the document after replacement fits on the same page as before replacement, and the document is output using the document output means 9. If they are not equal, it means that the document after replacement is not included in the same page before replacement, so the process returns to step A26, the line spacing is reduced by another division line, and LB
Is obtained, 1 is added to the counter, and the determinations in step A29 and step 31 are performed. In this case, the line spacing in the above example is as shown in FIG. If the counter becomes larger than 9 in step A29, an error message indicating that the page cannot be entered is displayed (step A30).

【0033】以上により、本発明の第1の実施の形態の
動作が終了する。
With the above, the operation of the first embodiment of the present invention ends.

【0034】なお、上記実施の形態においては、行間幅
を10の分割行に分割するようにしたが、これは必ずし
も10に限定されるものではなく、いくつの分割行に分
割するようにしてもよい。また、行間幅を詰める際に、
上記実施の形態では、最低限1分割行だけは行間をあけ
ておくようにしたが、最低限あけておく行間も1分割行
だけとは限らず、いくつの分割行でもよい。
In the above-described embodiment, the line width is divided into ten divided lines. However, the line width is not necessarily limited to ten, and may be divided into any number of divided lines. Good. Also, when reducing the line spacing,
In the above-described embodiment, at least one divided line is separated from each other, but the minimum line spacing is not limited to one divided line, and may be any number of divided lines.

【0035】次に、本発明の第2の実施の形態について
説明する。
Next, a second embodiment of the present invention will be described.

【0036】図11を参照すると、本発明の第2の実施
の形態は、文字列置換を行う対象の文書を読み込む文書
入力手段11と、読み込まれた文書を記憶する入力用バ
ッファ12と、入力用バッファ12に記憶されている文
書のページ数、各ページの開始行、終了行、行間幅、改
ページ情報、1行あたりの文字数、ページ内の段落情報
等の様式情報を読み込む文書様式読取手段13と、読み
込まれたこれらの様式情報を記憶する文書様式情報格納
バッファ14と、置換する文字列、置換される文字列を
入力し、これらの文字列の文字数比較、文字列置換を行
う文字列置換手段15と、文書様式情報格納バッファ1
4に格納されている各様式情報を読み込む文書様式情報
読取手段17と、読み込まれた各様式情報に基づき文書
様式の変更を行う文書様式変更手段16と、変更作業の
際に利用される作業用バッファ18と、文書様式変更手
段16で変更された文書を出力する文書出力手段19
と、文書作成用のプログラムを記録した記録媒体20と
からなる。ここで、記録媒体20は、磁気ディスク、半
導体メモリその他の記録媒体であってよく、また、文書
作成用プログラムは複数の記録媒体からなる記録媒体群
に分割して記録されていてもよい。
Referring to FIG. 11, according to a second embodiment of the present invention, a document input unit 11 for reading a document to be subjected to character string replacement, an input buffer 12 for storing the read document, Format reading means for reading format information such as the number of pages of a document stored in the buffer 12, the start line and end line of each page, line width, page break information, the number of characters per line, and paragraph information in a page. 13, a document format information storage buffer 14 for storing these read format information, a character string to be replaced, a character string to be replaced, and a character string for comparing the number of characters of these character strings and performing character string replacement Replacement means 15 and document format information storage buffer 1
A document format information reading unit 17 for reading each format information stored in the storage unit 4; a document format changing unit 16 for changing the document format based on the read format information; Buffer 18 and document output means 19 for outputting the document changed by document format changing means 16
And a recording medium 20 on which a program for document creation is recorded. Here, the recording medium 20 may be a magnetic disk, a semiconductor memory, or another recording medium, and the document creation program may be divided and recorded in a recording medium group including a plurality of recording media.

【0037】記録媒体20に記録された文書作成用プロ
グラムは上記各手段を含むコンピュータにロードされ、
各手段は、そのロードされたプログラムによる制御の
下、第1の実施の形態と同様の動作を行う。
The document creation program recorded on the recording medium 20 is loaded into a computer including the above-described units,
Each unit performs the same operation as that of the first embodiment under the control of the loaded program.

【0038】従来は、文書内の文字列を置換する場合に
おいて、置換する文字列が置換される文字列より長く置
換処理によって行数が増えるようなときには、全てのペ
ージについて文書様式情報を見直し、必要に応じて修正
を行う必要があった。また、目次等を作成添付してある
文書であれば、目次ページ内のページ番号も修正する必
要があった。本発明の第1および第2の実施の形態によ
れば、上記の作業が不要となるため、文書校正時の作業
が軽減される。
Conventionally, when replacing a character string in a document, if the number of lines is increased by the replacement process when the character string to be replaced is longer than the character string to be replaced, the document format information is reviewed for all pages. Corrections had to be made as needed. In addition, if the document has a table of contents and the like, the page number in the table of contents must be corrected. According to the first and second embodiments of the present invention, since the above-mentioned operation is not required, the operation at the time of document proofreading is reduced.

【0039】[0039]

【発明の効果】本発明には、文書内の文字列を置換する
場合において、置換する文字列が置換される文字列より
長く置換処理によって行数が増えるようなときでも、置
換処理後の文書様式変更作業等が不要となるという効果
がある。
As described above, according to the present invention, even when a character string in a document is to be replaced, even if the number of lines is increased by the replacement processing, the replacement character string is longer than the replacement character string. There is an effect that style change work and the like become unnecessary.

【図面の簡単な説明】[Brief description of the drawings]

【図1】図1は、本発明の第1の実施の形態の構成を示
すブロック図である。
FIG. 1 is a block diagram showing a configuration of a first exemplary embodiment of the present invention.

【図2】図2は、本発明の第1の実施の形態の動作を示
すフローチャートである。
FIG. 2 is a flowchart showing an operation of the first exemplary embodiment of the present invention.

【図3】図3は、本発明の第1の実施の形態の動作を示
すフローチャートである。
FIG. 3 is a flowchart illustrating an operation of the first exemplary embodiment of the present invention.

【図4】図4は、本発明の第1の実施の形態の動作を具
体的に説明するための図である。
FIG. 4 is a diagram for specifically explaining an operation of the first exemplary embodiment of the present invention.

【図5】図5は、本発明の第1の実施の形態の動作を示
すフローチャートである。
FIG. 5 is a flowchart showing an operation of the first exemplary embodiment of the present invention.

【図6】図6は、本発明の第1の実施の形態の動作を具
体的に説明するための図である。
FIG. 6 is a diagram for specifically explaining an operation of the first exemplary embodiment of the present invention.

【図7】図7は、本発明の第1の実施の形態の動作を具
体的に説明するための図である。
FIG. 7 is a diagram for specifically explaining an operation of the first exemplary embodiment of the present invention.

【図8】図8は、本発明の第1の実施の形態の動作を示
すフローチャートである。
FIG. 8 is a flowchart showing the operation of the first exemplary embodiment of the present invention.

【図9】図9は、本発明の第1の実施の形態の動作を示
すフローチャートである。
FIG. 9 is a flowchart showing an operation of the first exemplary embodiment of the present invention.

【図10】図10は、本発明の第1の実施の形態の動作
を具体的に説明するための図である。
FIG. 10 is a diagram for specifically explaining an operation of the first exemplary embodiment of the present invention.

【図11】図11は、本発明の第2の実施の形態の構成
を示すブロック図である。
FIG. 11 is a block diagram showing a configuration of a second exemplary embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1,11 文書入力手段 2,12 入力用バッファ 3,13 文書様式読取手段 4,14 文書様式情報格納バッファ 5,15 文字列置換手段 6,16 文書様式変更手段 7,17 文書様式情報読取手段 8,18 作業用バッファ 9,19 文書出力手段 20 記録媒体 1,11 Document input means 2,12 Input buffer 3,13 Document format reading means 4,14 Document format information storage buffer 5,15 Character string replacement means 6,16 Document format changing means 7,17 Document format information reading means 8 , 18 Work buffer 9, 19 Document output means 20 Recording medium

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 文書データ中の任意の文字列を置換した
ことにより置換された文字列を含んでいたページ内の文
書データが当該ページ内に収まらなくなったかどうかを
判定する第1の手段と、 前記第1の手段によりページ内に文書データが収まらな
くなったと判定された場合に、当該ページ内の行間幅を
詰めて、文字列の置換前に当該ページ内に納まっていた
文書データに対して文字列の置換を行った後の全ての文
書データが、当該ページ内に収まるようにする第2の手
段とを備えたことを特徴とする文書作成装置。
A first means for judging whether or not document data in a page containing a replaced character string by replacing an arbitrary character string in the document data is no longer contained in the page; If it is determined by the first means that the document data no longer fits in the page, the line spacing in the page is reduced, and the character data is added to the document data contained in the page before the replacement of the character string. A second means for ensuring that all document data after column replacement fits within the page.
【請求項2】 前記第2の手段は、当該ページ内の行間
幅を一定数の分割行に分割し、文字列の置換前に当該ペ
ージ内に納まっていた文書データに対して文字列の置換
を行った後の全ての文書データ当該ページ内に収まるよ
うになるまで、前記分割行を1つずつ取り除くことによ
り、行間幅を詰めていくことを特徴とする請求項1記載
の文書作成装置。
2. The method according to claim 1, wherein the second means divides a line spacing in the page into a fixed number of divided lines, and replaces the character string with the document data stored in the page before the character string is replaced. 2. The document creating apparatus according to claim 1, wherein the line width is reduced by removing the divided lines one by one until all the document data after performing the above operation is included in the page.
【請求項3】 前記第2の手段は、前記分割行を取り除
く際に、行間に一定数の分割行を残すようにすることを
特徴とする請求項2記載の文書作成装置。
3. The document creation apparatus according to claim 2, wherein the second unit leaves a fixed number of divided lines between the lines when removing the divided lines.
【請求項4】 文書データ中の任意の文字列を置換した
ことにより置換された文字列を含んでいたページ内の文
書データが当該ページ内に収まらなくなったかどうかを
判定する第1のステップと、 前記第1のステップでページ内に文書データが収まらな
くなったと判定された場合に、当該ページ内の行間幅を
詰めて、文字列の置換前に当該ページ内に納まっていた
文書データに対して文字列の置換を行った後の全ての文
書データが、当該ページ内に収まるようにする第2のス
テップとを含むことを特徴とする文書作成方法。
4. A first step of determining whether or not document data in a page that includes a replaced character string by replacing an arbitrary character string in the document data does not fit in the page. If it is determined in the first step that the document data no longer fits in the page, the line spacing in the page is reduced, and the text data contained in the page before the replacement of the character string is replaced with a character. A second step of ensuring that all the document data after the column replacement fits within the page.
【請求項5】 前記第2のステップにおいて、当該ペー
ジ内の行間幅を一定数の分割行に分割し、文字列の置換
前に当該ページ内に納まっていた文書データに対して文
字列の置換を行った後の全ての文書データ当該ページ内
に収まるようになるまで、前記分割行を1つずつ取り除
くことにより、行間幅を詰めていくことを特徴とする請
求項4記載の文書作成方法。
5. In the second step, the line width in the page is divided into a fixed number of divided lines, and the character string is replaced with the document data contained in the page before the character string is replaced. 5. The document creation method according to claim 4, wherein the line width is narrowed by removing the divided lines one by one until all the document data after performing the processing is contained in the page.
【請求項6】 前記第2のステップにおいて、前記分割
行を取り除く際に、行間に一定数の分割行を残すように
することを特徴とする請求項5記載の文書作成方法。
6. The document creation method according to claim 5, wherein in the second step, when the divided lines are removed, a fixed number of divided lines are left between the lines.
【請求項7】 文書データ中の任意の文字列を置換した
ことにより置換された文字列を含んでいたページ内の文
書データが当該ページ内に収まらなくなったかどうかを
判定する第1の処理と、 前記第1の処理でページ内に文書データが収まらなくな
ったと判定された場合に、当該ページ内の行間幅を詰め
て、文字列の置換前に当該ページ内に納まっていた文書
データに対して文字列の置換を行った後の全ての文書デ
ータが、当該ページ内に収まるようにする第2の処理
と、 をコンピュータに実行させるプログラムを記録したこと
を特徴とする記録媒体。
7. A first process for determining whether or not document data in a page including a replaced character string by replacing an arbitrary character string in the document data does not fit in the page. If it is determined in the first processing that the document data no longer fits in the page, the line spacing in the page is reduced, and the text data contained in the page before the replacement of the character string is replaced with a character. A recording medium characterized by recording a program for causing a computer to execute a second process for causing all the document data after column replacement to fit within the page, and a computer.
【請求項8】 前記プログラムは、前記第2の処理にお
いて、当該ページ内の行間幅を一定数の分割行に分割
し、文字列の置換前に当該ページ内に納まっていた文書
データに対して文字列の置換を行った後の全ての文書デ
ータ当該ページ内に収まるようになるまで、前記分割行
を1つずつ取り除くことにより、行間幅を詰めていく処
理を実行させることを特徴とする請求項7記載の記録媒
体。
8. The program according to claim 2, wherein, in the second processing, the line width in the page is divided into a fixed number of divided lines, and the document data stored in the page before the replacement of the character string is processed. A process for narrowing the line width by removing the divided lines one by one until all the document data after the character string replacement fits in the page is executed. Item 8. The recording medium according to Item 7.
【請求項9】 前記プログラムは、前記第2の処理にお
いて、前記分割行を取り除く際に、行間に一定数の分割
行を残すようにする処理を実行させることを特徴とする
請求項8記載の記録媒体。
9. The program according to claim 8, wherein, in the second processing, when the divided rows are removed, a process for leaving a fixed number of divided rows between rows is executed. recoding media.
【請求項10】 請求項7乃至9のいずれかに記載の前
記プログラムを複数の部分に分割して該複数の部分をそ
れぞれ複数の記録媒体に記録してなる記録媒体群。
10. A recording medium group obtained by dividing the program according to claim 7 into a plurality of parts and recording the plurality of parts on a plurality of recording media.
JP11050058A 1999-02-26 1999-02-26 Device and method for document creation and recording medium where program for document creation is recorded Pending JP2000250904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11050058A JP2000250904A (en) 1999-02-26 1999-02-26 Device and method for document creation and recording medium where program for document creation is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11050058A JP2000250904A (en) 1999-02-26 1999-02-26 Device and method for document creation and recording medium where program for document creation is recorded

Publications (1)

Publication Number Publication Date
JP2000250904A true JP2000250904A (en) 2000-09-14

Family

ID=12848412

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11050058A Pending JP2000250904A (en) 1999-02-26 1999-02-26 Device and method for document creation and recording medium where program for document creation is recorded

Country Status (1)

Country Link
JP (1) JP2000250904A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034624A (en) * 2011-09-29 2013-04-10 北京大学 Method and system for accurately positioning page object
JP2019192120A (en) * 2018-04-27 2019-10-31 富士ゼロックス株式会社 Display editing apparatus, server apparatus, display editing system and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034624A (en) * 2011-09-29 2013-04-10 北京大学 Method and system for accurately positioning page object
JP2019192120A (en) * 2018-04-27 2019-10-31 富士ゼロックス株式会社 Display editing apparatus, server apparatus, display editing system and program
JP7180111B2 (en) 2018-04-27 2022-11-30 富士フイルムビジネスイノベーション株式会社 Display editing device and program

Similar Documents

Publication Publication Date Title
JPH04271443A (en) Method and device for data base constitution
JP4983100B2 (en) Data difference elimination program and data difference elimination apparatus
JP5171211B2 (en) Data format converter
JPS5938629B2 (en) line spacing controller
JP2000250904A (en) Device and method for document creation and recording medium where program for document creation is recorded
JP4183774B2 (en) Layout processing method and apparatus using inter-element reference
JPH11191101A (en) Composing method for sentence including agate
CN109857302B (en) Electronic book information repairing method, electronic equipment and computer storage medium
JP3567299B2 (en) Graph generation output device
JP3451289B2 (en) Table output device
JPH02255978A (en) Conversion system for document data
JPH08129549A (en) Document processor
JP2003006559A (en) Print parameter slip output system
JPS61134843A (en) Program structure processing system
JPS62171068A (en) Document preparing device
JPH1139403A (en) Data input device, data input method and record medium recording data input control program
JPS5862743A (en) Recording system including software change
JP2006031214A (en) Data processor, data processing method, and program
JPH11203186A (en) Journal acquisition method
JPH03245244A (en) Correction information writing device for electronic publication medium
JPH04112059A (en) Image recorder
JP2006031088A (en) System, method, and program for file conversion
JPH0520322A (en) Document processor
JPH05185685A (en) Outputting method for character
JPH08286842A (en) Input output management method for disk array and its device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20011016