JPH0668076A - Method and device for allocation processing - Google Patents

Method and device for allocation processing

Info

Publication number
JPH0668076A
JPH0668076A JP4245597A JP24559792A JPH0668076A JP H0668076 A JPH0668076 A JP H0668076A JP 4245597 A JP4245597 A JP 4245597A JP 24559792 A JP24559792 A JP 24559792A JP H0668076 A JPH0668076 A JP H0668076A
Authority
JP
Japan
Prior art keywords
height
subscript
expression
formula
parentheses
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
JP4245597A
Other languages
Japanese (ja)
Inventor
Takumi Shida
卓巳 志田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP4245597A priority Critical patent/JPH0668076A/en
Publication of JPH0668076A publication Critical patent/JPH0668076A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Document Processing Apparatus (AREA)

Abstract

PURPOSE:To adjust the position of subscripts and the height of parentheses by retreiving data indicating the contents of a formula to which the subscripts are imparted and calculating the height of the formula to be an object. CONSTITUTION:The subscript 'e' is positioned by adjusting to the height of the parenthesis B1. Practically, the subscript 'e' is positioned with a line L4 for indicating the height of the parenthsis B1 as a connection line. That is, as the targeted subscript is selected by a cursor and position correction is instructed, from the structured data of the numerical formula, for instance from the data indicated by a bisecting tree, the data of the bisecting tree for which the selected subscript is the node of a top are read. A slave node is retreived for the bisecting tree, the height of the formula to be the object, that is the formula to which the subscript is imparted, for instance the formula surrounded by the parentheses B1 and B5, in this case, the height of a character 'd' is calculated, the position of the subscript 'e' is decided based on the calculated result and the allocation to the position is performed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は割り付け処理方法及び割
り付け処理装置に関し、詳しくは、数式の括弧の高さ又
は添字の位置の補正をする為の割り付け処理方法及び割
り付け処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an allocation processing method and an allocation processing apparatus, and more particularly to an allocation processing method and an allocation processing apparatus for correcting the height of parentheses or the position of a subscript of a mathematical expression.

【0002】[0002]

【従来の技術】数式では添字や括弧が二重、三重に亘っ
て付されることが多い。これらは出来るだけ正確に表現
されることが望ましい。しかし例えばキャラクター表示
を前提とする表示装置では、位置や高さの微妙な表現が
困難であるため、表示の正確さよりむしろ視認性の良さ
に重きを置き、表示位置を意識的に上下へずらし、或い
は両側括弧や複数行に亘る括弧など特定のものを、他の
括弧とは異なる形態で表示するなどしている(例えば特
開平3−30052号公報,特開平3−30056号公
報,特開平3−30057号公報等参照)。一方、ワー
クステーションやデスクトップパブリッシング装置のよ
うに、ビットマップデータで印刷データや表示データを
取り扱う装置では、位置や高さの調節は容易である。従
って添字の位置や括弧の高さは、数式のデータに従って
正確に表現される。これら装置で扱われる数式のデータ
は通常構造化されている。構造化しておけば、数式の部
分的な変更も容易であり、また一つのデータで印刷や表
示、演算などをこなすことが出来るからである。構造化
された数式のデータに基づいて、添字の位置或いは括弧
の高さが算出される場合、添字の位置或いは括弧の高さ
は、それが付される式の高さに合わせられる(例えばA
MS−TeX(AMS:アメリカ数学学会)、出願人会
社製品「グローバルビュー バージョン3.1(Global
View 3.1)」など)。
2. Description of the Related Art In numerical formulas, subscripts and parentheses are often applied in double or triple. It is desirable that these be expressed as accurately as possible. However, for example, in a display device that is premised on character display, it is difficult to subtly express the position and height, so emphasis is placed on good visibility rather than display accuracy, and the display position is intentionally shifted vertically. Alternatively, specific ones such as double-sided parentheses and parentheses extending over a plurality of lines are displayed in a form different from the other parentheses (for example, JP-A-3-30052, JP-A-3-30056, and JP-A-3-30056). -30057 gazette etc.). On the other hand, in a device such as a workstation or a desktop publishing device that handles print data and display data with bitmap data, it is easy to adjust the position and height. Therefore, the position of the subscript and the height of the parenthesis are accurately expressed according to the data of the mathematical formula. The mathematical data handled by these devices is usually structured. This is because, if structured, it is easy to partially change the mathematical formula, and printing, display, calculation, etc. can be performed with one data. When the position of the subscript or the height of the parenthesis is calculated based on the data of the structured mathematical formula, the position of the subscript or the height of the parenthesis is adjusted to the height of the formula to which it is attached (for example, A
MS-TeX (AMS: American Mathematical Society), Applicant Company Product "Global View Version 3.1 (Global
View 3.1) "etc.).

【0003】なおこれら割り付けの基準となる領域、
点、線、値等(例えばアセンダ(ascender)、ディセン
ダ(decender))は、主としてISO8613−6,I
SO9541−5に規定されているが、本明細書では、
更に図2、図3に示す領域、点、線、値等を、拡張定義
して或いは再定義して使用している。即ち図2(A)の
character extent は文字領域で、文字(記号)の広が
りを表わす情報として使用される。この領域は、文字の
高さBと文字の幅Sから作られる、矩形領域である。こ
の領域の左下隅が、ISO9541−5に基づき、文字
領域の原点CEO(character extent origin)とされ
る。またPP,EPはISO8613−6,ISO95
41−5に基づいて設定された position point 及び e
scapement point で、これが文字(記号)についての接
続点となり、この接続点の連続したものが接続線とな
る。同じく図2(B)の formulae extent は式領域
で、式の広がりを表わす情報として使用される。この領
域は、式の高さ(formulae height)と式の幅(formula
e width)から作られる、矩形領域である。この領域の
左下隅が、ISO9541−5に倣い、式領域の原点F
EO(formulae extent origin)とされる。同じく図3
に於て、CPは式の接続点で、これらは夫々の式につい
て個別に定められる。夫々の式は、この接続点CPで接
続され、これら接続点CPで作られる直線CLが接続線
となる。例えば同図(A)のように式F1、式F2につ
いて接続点CPが定められていたとすれば、この点で接
続された式は、同図(B)の式F3のようになる。また
式の接続線CLの上側、下側各部分の高さを、式上部の
高さ(upper height)、式下部の高さ(lower height)
とする。
The area that serves as a reference for these allocations,
Points, lines, values, etc. (for example, ascender and descender) are mainly ISO8613-6, I.
Although specified in SO9541-5, in the present specification,
Further, the areas, points, lines, values, etc. shown in FIGS. 2 and 3 are used by being extendedly defined or redefined. That is, in FIG.
character extent is a character area and is used as information indicating the extent of a character (symbol). This area is a rectangular area formed from the character height B and the character width S. The lower left corner of this area is set as the origin CEO (character extent origin) of the character area based on ISO9541-5. PP and EP are ISO8613-6 and ISO95
41-5 position point and e set based on 41-5
This is a scapement point, which is a connection point for characters (symbols), and a series of these connection points is a connection line. Similarly, formulae extent in FIG. 2B is a formula area and is used as information indicating the extent of the formula. This area is defined by the formula height and the formula width.
e width) is a rectangular area. The lower left corner of this area follows ISO9541-5 and is the origin F of the expression area.
EO (formulae extent origin). Similarly FIG.
Where CP is the connection point of the equations, which are defined individually for each equation. The respective expressions are connected at this connection point CP, and the straight line CL formed at these connection points CP becomes the connection line. For example, if the connection point CP is defined for the formulas F1 and F2 as shown in FIG. 7A, the formula connected at this point is like the formula F3 shown in FIG. In addition, the heights of the upper and lower parts of the connection line CL of the formula are the height of the upper part of the formula (upper height) and the height of the lower part of the formula (lower height).
And

【0004】[0004]

【発明が解決しようとする課題】しかしこの原則どおり
添字の位置或いは括弧の高さを定めると、それらが数学
組版上は好ましくない位置或いは高さとなる場合があっ
た。図4にそのような例を示す。同図(A)は添字
「e」が括弧B1から離れ過ぎている例、同図(B)は
括弧B2とB3の高さが不揃いの例である。なおこの
(B)の例は添字「d」と「e」の高さも不揃いになっ
ている。これらの位置、高さは次のようにして求められ
る。即ち、同図(A)の添字「e」の場合、その位置は
それが付されている括弧B1の中の式の高さ、ここでは
文字「d」の高さに合わされる。具体的には該文字
「d」の高さを表わすラインL1を接続線として、添字
「e」が位置付けられる。この為、添字「e」が括弧B
1から離れ過ぎることになる。また同図(B)の括弧B
3の場合、括弧B2の高さに合わせて添字「d」の位置
が定められ、これに合わせて、その外に位置する括弧B
3の高さが定められる。具体的には括弧B2の高さを表
わすラインL2を接続線として添字「d」が位置付けら
れ、その高さを表わすラインL3を基準に括弧B3の高
さが定められる。この為、括弧B2とB3は高さが不揃
いになる。更にこの図4(B)の例では、ラインL3を
接続線にして添字「e」が位置付けられる。この為、添
字「d」と添字「e」の高さも不揃いになる。
However, if the positions of the subscripts or the heights of the parentheses are determined according to this principle, the positions or the heights may be unfavorable in mathematical typesetting. FIG. 4 shows such an example. In the figure (A), the subscript "e" is too far from the bracket B1, and in the figure (B), the heights of the brackets B2 and B3 are not uniform. In this example of (B), the heights of the subscripts "d" and "e" are also uneven. These positions and heights are obtained as follows. That is, in the case of the subscript "e" in FIG. 7A, its position is matched with the height of the expression in the parenthesis B1 to which it is attached, here the height of the letter "d". Specifically, the subscript "e" is positioned with the line L1 representing the height of the character "d" as a connecting line. Therefore, the subscript "e" is in parentheses B
It will be too far from 1. In addition, bracket B in FIG.
In the case of 3, the position of the subscript "d" is determined according to the height of the bracket B2, and in accordance with this, the bracket B positioned outside the position of the suffix "d".
A height of 3 is defined. Specifically, the subscript "d" is positioned with the line L2 representing the height of the bracket B2 as a connecting line, and the height of the bracket B3 is determined based on the line L3 representing the height. Therefore, the brackets B2 and B3 have different heights. Further, in the example of FIG. 4B, the line "L3" is used as a connecting line and the subscript "e" is positioned. For this reason, the heights of the subscript “d” and the subscript “e” are also uneven.

【0005】この為従来は、いわば我慢してその儘使う
か、或いは、構造化の利点を捨て、数式のデータを通常
のグラフィックデータで表わし、これを編集することで
対応していた(ここで言うグラフィックデータとは、各
文字、各記号毎に、文字コード、文字サイズ等の文字に
関するデータと、その文字を配置する座標データを与
え、表現位置を定める形式のデータのことをいう)。し
かしこのようにしたとしても、編集作業は容易ではな
い。蓋し、数式の中の添字の位置や括弧の高さは相互に
関連しているものであり、一箇所を修正し始めるとあち
らもこちらもというように、数式全体の配置を調整し直
さなければならないからである。人の手によるレイアウ
トが煩雑なこというまでもない。従って仮にこのように
個別に修正可能としたところで、その作業は煩雑であ
る。本発明の目的は、このような従来技術の欠点を解消
し、構造化データの利点を活かした儘で、即ち構造化デ
ータで表現される数式について、この構造化データに基
づきいわば自動的に、添字の位置や括弧の高さの調節が
可能な割り付け処理方法及び割り付け処理装置を提供す
ることにある。
For this reason, in the past, this has been dealt with by, for example, putting up with it, or discarding the merits of structuring, and expressing the mathematical data as ordinary graphic data and editing it. The term "graphic data" refers to data of a character code, character size, and other character-related data for each character and coordinate data for arranging the character to determine the expression position. However, even if this is done, editing work is not easy. However, the position of subscripts and the height of parentheses in the formula are related to each other, so if you start correcting one place, you have to adjust the arrangement of the whole formula again and there. This is because it must be done. It goes without saying that the layout by human hands is complicated. Therefore, even if such individual correction is possible, the work is complicated. The object of the present invention is to eliminate the drawbacks of the conventional techniques and to take advantage of the structured data, that is, for a mathematical expression represented by the structured data, so to speak, automatically based on the structured data. An object of the present invention is to provide an allocation processing method and an allocation processing device capable of adjusting the position of a subscript and the height of parentheses.

【0006】[0006]

【課題を解決するための手段】上記目的達成のため、請
求項1の発明では、数式を表わす構造化データから、添
字の付与された式の内容を表わすデータを探索し、対象
となる式の高さを演算し、この演算結果に基づいて添字
の位置を決定し、割り付け処理を行なうという手法を用
いる。請求項2の発明では、数式を表わす構造化データ
から、括弧の内容を表わすデータを探索し、対象となる
式の高さを演算し、この演算結果に基づいて括弧の高さ
を決定し、割り付け処理を行なうという手法を用いる。
請求項3の発明では、請求項1または請求項2記載の割
り付け処理方法を用いて数式の割り付け処理を実行する
処理手段を備える。。請求項4の発明では、添字の位置
補正または括弧の大きさ補正を指示する指示手段を備え
る。
In order to achieve the above object, in the invention of claim 1, the structured data representing the mathematical formula is searched for the data representing the contents of the formula to which the subscript is added, and the target formula A method is used in which the height is calculated, the position of the subscript is determined based on the calculation result, and the allocation processing is performed. In the invention of claim 2, the structured data representing the mathematical formula is searched for data representing the contents of the parentheses, the height of the target formula is calculated, and the height of the parentheses is determined based on the calculation result. A method of performing allocation processing is used.
The invention of claim 3 includes a processing means for executing the allocation process of the mathematical expression using the allocation process method of claim 1 or claim 2. . According to the invention of claim 4, there is provided an instruction means for instructing the position correction of the subscript or the size correction of the parentheses.

【0007】[0007]

【作用】請求項1の発明により、例えば図4(A)の添
字「e」は、図5(A)のように、括弧B1の高さに合
わせて位置付けられる。具体的には括弧B1の高さを表
わすラインL4を接続線として添字「e」が位置付けら
れる。この処理は次のように行なわれる。先ず、目的の
添字をカーソルで選択し、位置補正を指示する。これに
応動して、当該数式の構造化データ、例えば二分木で表
わされるデータから、該選択された添字を頂点の節とす
る二分木のデータが読み出される。この二分木について
子の節が探索され、対象となる式、即ち当該添字が付さ
れている式、例えば図4(A)の括弧B1とB5で囲ま
れた式の高さ、ここでは文字「d」の高さが演算され
る。この演算結果に基づいて添字「e」の位置が決定さ
れ、該位置への割り付けが行なわれる。具体的には、文
字dの括弧B1からの飛出し量が求められ、この飛出し
量に相当する分が下方への移動量として求められ、該量
だけ下方へ移動された位置に添字「e」が割り付けられ
る。
According to the first aspect of the present invention, for example, the subscript "e" in FIG. 4 (A) is positioned according to the height of the bracket B1 as shown in FIG. 5 (A). Specifically, the subscript "e" is positioned with the line L4 representing the height of the bracket B1 as a connecting line. This process is performed as follows. First, the desired subscript is selected with the cursor, and position correction is instructed. In response to this, data of a binary tree having the selected subscript as a vertex node is read out from the structured data of the mathematical expression, for example, the data represented by the binary tree. A child clause is searched for in this binary tree, and the height of the target expression, that is, the expression with the subscript, for example, the expression enclosed by the parentheses B1 and B5 in FIG. The height of "d" is calculated. The position of the subscript "e" is determined based on the result of this calculation, and allocation to that position is performed. Specifically, the pop-out amount of the character d from the bracket B1 is obtained, the amount corresponding to this pop-out amount is obtained as the downward movement amount, and the subscript "e" is added to the position moved downward by that amount. Is assigned.

【0008】また請求項2の発明により、例えば図4
(B)の括弧B3の高さは、図5(B)の括弧B4のよ
うに、即ち括弧B2と同じ高さに修正される。なおこの
図5(B)の例では、添字「e」についても請求項1の
発明による位置補正が行なわれ、添字「d」と同じその
位置に割り付けられている。若しこの補正が為されない
場合、従来の技術では、添字「d」の高さを表わすライ
ンL3を接続線として位置付けられる。この括弧の高さ
の補正も請求項1の発明と同じ要領で行なわれる。即
ち、補正対象とする括弧が選択されると、数式を表わす
構造化データから当該括弧のデータを頂点の節とする二
分木が読み出される。この二分木について、子の節が探
索され、対象となる式、即ち当該括弧に囲まれた式、例
えば図4の(B)の括弧B3,B6で囲まれた式の高さ
が演算される。この演算結果に基づいて、添字「d」の
高さを除いた式の高さが演算され、その高さの括弧B
4,B7が割り付けられる。請求項3の発明では、請求
項1または請求項2記載の発明を用い、処理手段により
数式の割り付け処理が実行される。請求項4の発明で
は、指示手段、例えば画面に表示されたウィンドウとマ
ウスやカーソルキー等により、添字の位置補正または括
弧の大きさ補正が指示される。
According to the invention of claim 2, for example, FIG.
The height of the parenthesis B3 in (B) is corrected to the same height as the parenthesis B4 in FIG. 5B, that is, the same height as the parenthesis B2. In the example of FIG. 5 (B), the position correction according to the invention of claim 1 is also performed for the subscript "e", and it is assigned to the same position as the subscript "d". If this correction is not made, the conventional technique positions the line L3 representing the height of the subscript "d" as a connecting line. The correction of the height of the parentheses is also performed in the same manner as the invention of claim 1. That is, when a parenthesis to be corrected is selected, a binary tree having the parenthesis data as a vertex node is read from the structured data representing the mathematical formula. For this binary tree, child clauses are searched, and the height of the target expression, that is, the expression enclosed by the parentheses, for example, the expression enclosed by the parentheses B3 and B6 in FIG. 4B is calculated. . Based on this calculation result, the height of the expression excluding the height of the subscript "d" is calculated, and the height of the parenthesis B
4, B7 are allocated. In the invention of claim 3, the invention of claim 1 or 2 is used, and the allocation processing of the mathematical expression is executed by the processing means. In the invention of claim 4, the position correction of the subscript or the size correction of the parenthesis is instructed by the instructing means, for example, the window displayed on the screen and the mouse or the cursor key.

【0009】[0009]

【実施例】以下本発明の詳細を図示実施例に基いて説明
する。図6に、各発明を実施する為のハードウェア構成
例を示す。図に於て1はコンピュータ本体、2,3はそ
れに内蔵された中央演算装置(CPU)及びメモリであ
る。4はディスプレイ制御部で、数式その他、ディスプ
レイ8へのデータ表示の制御を行なう。5はキーボード
/マウス制御部でキーボード9及びマウス10の操作を
監視し、対応した入力データを生成する。6はディスク
制御部で、ハードディスク11に対するデータの読み書
きを行なう。7はプリンタ制御部で、プリンタ12への
印刷出力を制御する。13はシステムバスで、各ブロッ
ク間のデータ伝送に使用される。図1に、上記ハードウ
ェア上に構築された第一実施例を示す。この実施例は、
添字の位置の補正をする為のもので、請求項1の発明、
請求項1を引用する請求項3の発明、及び請求項3の発
明を引用する請求項4の発明を実施するものである。同
図に於て、21は処理装置で、数式探索処理部211、
添字の縦方向の位置算出部212及び数式割り付け処理
部213を備えている。これらは図6のハードウェアの
中央演算装置2とメモリ3上で実現され、請求項3にい
う処理手段(請求項1記載の割り付け処理方法を用いて
数式の割り付け処理を実行する処理手段)として機能す
る。
The details of the present invention will be described below with reference to the illustrated embodiments. FIG. 6 shows a hardware configuration example for implementing each invention. In the figure, 1 is a computer main body, and 2 and 3 are a central processing unit (CPU) and a memory incorporated therein. Reference numeral 4 denotes a display control unit which controls mathematical expressions and other data display on the display 8. A keyboard / mouse control unit 5 monitors operations of the keyboard 9 and the mouse 10 and generates corresponding input data. A disk control unit 6 reads and writes data from and on the hard disk 11. A printer control unit 7 controls the print output to the printer 12. A system bus 13 is used for data transmission between blocks. FIG. 1 shows a first embodiment constructed on the above hardware. This example
The invention according to claim 1 is for correcting the position of a subscript,
The invention of claim 3 which cites claim 1 and the invention of claim 4 which cites the invention of claim 3 are implemented. In the figure, reference numeral 21 is a processing device, which is a mathematical expression search processing unit 211,
A subscript vertical position calculation unit 212 and a mathematical expression allocation processing unit 213 are provided. These are realized on the central processing unit 2 and the memory 3 of the hardware of FIG. 6 and serve as the processing means according to claim 3 (processing means for executing the allocation processing of the mathematical expression using the allocation processing method according to claim 1). Function.

【0010】22は数式記憶部で、メモリ3又はハード
ディスク11上に実現され、数式を表現した構造化デー
タFDがここに記憶される。数式を表わす構造化データ
は二分木、グラフその他の形式がある。ここでは二分木
が用いられる。23は表示部で、前記ディスプレイ8及
びプリンタ12で実現される。数式探索処理部211
は、数式記憶部22に記憶されている二分木の中から、
補正対象として選択された添字を頂点とした二分木を読
出し、該添字が付与された式の内容を表わす子の節を探
索する。添字の縦方向の位置算出部212は、該探索に
基づいて対象となる式、即ち添字が付された式の高さを
演算し、この演算結果に基づいて添字の位置を決定す
る。この結果に従って、数式割り付け処理部213が当
該添字を修正後の位置へ割り付ける。
Reference numeral 22 is a formula storage unit, which is realized on the memory 3 or the hard disk 11 and stores the structured data FD representing the formula. Structured data representing mathematical formulas include binary trees, graphs and other forms. A binary tree is used here. A display unit 23 is realized by the display 8 and the printer 12. Formula search processing unit 211
Is a binary tree stored in the mathematical expression storage unit 22,
A binary tree whose vertex is the subscript selected as the correction target is read, and a child clause representing the content of the expression to which the subscript is added is searched. The subscript vertical position calculation unit 212 calculates the height of the target expression, that is, the expression with the subscript based on the search, and determines the position of the subscript based on the calculation result. According to this result, the mathematical expression allocation processing unit 213 allocates the subscript to the corrected position.

【0011】図7に添字の位置補正を指示する為のウィ
ンドウ表示の例を示す。マウス10を操作して「表示内
容」の項目の「項」のエリアA1内に不図示カーソルを
置き、マウス10のボタンをクリックする。これにより
エリアA1の枠(ボーダ)B1が、太線化され、表示内
容の項目は「項」が選択された状態にあることが表示さ
れる。次いで同カーソルを「位置補正」の項目の「括
弧」のエリアA2に置き、マウス10のボタンをクリッ
クする。これによりエリアA2の枠(ボーダ)B3が、
同様に太線化され(不図示)、添字位置補正が実行状態
にあることが表示される。なお位置補正をしない、即ち
原則通りの添字の位置の儘とするときは、エリアA2に
カーソルを置き、マウス10のボタンをクリックする。
これで太線化されていた枠B3が通常の太さに戻り、補
正は行なわれなくなる。なお図7の他の部分は本発明に
は直接関連がないが、実際に近いものを図示した方が理
解が容易と思われたので、参考として図示した。説明を
略す。
FIG. 7 shows an example of a window display for instructing the position correction of the subscript. The mouse 10 is operated to place a cursor (not shown) in the area A1 of the “item” of the item “display content” and click the button of the mouse 10. As a result, the frame (border) B1 of the area A1 is made thicker, and it is displayed that the item of the display content is in the state in which "item" is selected. Next, the cursor is placed in the area A2 in the "parentheses" of the "position correction" item, and the button of the mouse 10 is clicked. As a result, the frame (border) B3 of the area A2
Similarly, a bold line (not shown) is displayed, and it is displayed that the subscript position correction is being executed. When the position is not corrected, that is, when the position of the subscript according to the principle is set, the cursor is placed in the area A2 and the button of the mouse 10 is clicked.
As a result, the thickened frame B3 returns to the normal thickness, and the correction is not performed. It should be noted that the other parts of FIG. 7 are not directly related to the present invention, but it is easier to understand if they are close to the actual ones, so they are shown as a reference. The description is omitted.

【0012】二分木の木構造による数式を表現例を図
8,図9に示す。網掛けされた丸が木構造の根(root)
又は節(node)、通常の丸が葉(leaf)である(図8
(B))。なお木構造は通常同図(C)のように根から
下へ向かって末広がりに表現される。各枠の中に納める
ため、本明細書では同図(D)のように節や葉を水平、
垂直方向に配置した。各種類の式、即ち「式の集り」或
いは「構造をなす式」の基本構造は図8(A)のように
表現される(二分木による表現形態)。本来の表現形態
の数式と、その数式を表現する二分木の例を図9に示
す。例えば図9の「2.1括弧」に示される式「(a+
b)−c」は、その右の二分木BT1のように表現され
る。即ち、「括弧」という内容の節N1の右に「−」と
「c」の文字コードの節N11と葉Lf12、節N1の
下に、「式」という内容の節N2、その右に左括弧、右
括弧の文字コードの節N21と葉Lf22が配置されて
いる。
Expression examples of the mathematical expression based on the tree structure of the binary tree are shown in FIGS. The shaded circles are the roots of the tree structure.
Or nodes and ordinary circles are leaves (Fig. 8).
(B)). Note that the tree structure is usually expressed in a divergent manner from the root downward as shown in FIG. In order to fit in each frame, in this specification, as shown in FIG.
Arranged vertically. The basic structure of each type of expression, that is, the “expression group” or the “structural expression” is expressed as shown in FIG. 8A (expression form by binary tree). FIG. 9 shows an example of a mathematical expression in its original form and a binary tree expressing the mathematical expression. For example, the expression “(a +
b) -c "is expressed like the right binary tree BT1. That is, to the right of the section N1 having the content of "parentheses", the section N11 and the leaf Lf12 of the character code of "-" and "c", the section N2 having the content of "Expression" below the section N1, and the left parenthesis to the right of it. , A right-parenthesis character code section N21 and a leaf Lf22 are arranged.

【0013】第一実施例の処理手順を図10,図11に
示す。紙面の制限があるため、2図に分割して示す。双
方のフローは端子1〜3で接続される。なお各処理や判
断は、枠の外に付されている番号(フローチャート番
号)で指称する。補正前の状態、即ち添字の位置が原則
通りである数式の例を図12(A)に示す。括弧B1
1,B12に囲まれた式の高さを表わすラインL21
が、添字「h」の接続線とされている。ここでは、同図
(B)の割り付け状態、即ち括弧B12の上部の高さ
(upperheight)ac1のラインL22が添字「h」の
接続線とされているのを、好ましい割り付けとする。言
い換えれば、括弧B11,B12の中に、その高さより
飛出した部分(「e」の部分)を有する式F4がある場
合、該飛出し分を除いて添字「h」が割り付けられるの
を、好ましい割り付けとする。
The processing procedure of the first embodiment is shown in FIGS. Due to space limitations, it is shown divided into two figures. Both flows are connected at terminals 1-3. It should be noted that each process and judgment is referred to by a number (flowchart number) attached outside the frame. FIG. 12A shows an example of a mathematical expression in which the position before correction, that is, the position of the subscript is in principle. Bracket B1
Line L21 representing the height of the formula surrounded by 1 and B12
Is a connecting line with the subscript “h”. Here, the allocation state of FIG. 9B, that is, the line L22 of the upper height ac1 of the bracket B12 as the connection line of the subscript "h" is a preferable allocation. In other words, when the parentheses B11 and B12 include the formula F4 having a portion (the portion of "e") that pops out from the height, the subscript "h" is assigned except for the popped-out portion. Make the preferred allocation.

【0014】本実施例では、この為に必要な値、即ち添
字「h」の下方への移動量SVDが、この図10,図1
1のフローで求められる。括弧B12の場合であれば、
その上部の高さac1(ラインL22)が、ここで求め
る補正後の添字「h」の割り付け位置(接続線)である
から、先ずそのボディサイズbs1から下部の高さ(lo
wer height)dc1を減算し、この上部の高さac1が
求められる。下方への移動量SVDは、このときの括弧
B11,B12に囲まれた式の上部の高さVUH(ライ
ンL21)と、この上部の高さac1の値(L22の高
さ)の差であるから、前者から後者を減算してこれが求
められる。なお括弧B12の右下や括弧B11の左下に
も添字があった場合(図10右側図示例参照)、当該添
字は括弧B12の下部の高さdc1のラインL23に割
り付けられる(このラインL23を接続線にして添字を
割り付ける)。この場合の上方への移動量SVDは、こ
のときの括弧B11,B12に囲まれた式の下部の高さ
VLH(ラインL25)と、この下部の高さdc1の値
(L23の高さ)の差であるから、前者から後者を減算
してこれが求められる。
In the present embodiment, the value required for this purpose, that is, the downward movement amount SVD of the subscript "h" is shown in FIGS.
It is calculated by the flow of 1. In the case of bracket B12,
Since the height ac1 (line L22) of the upper portion is the allocation position (connection line) of the corrected subscript “h” obtained here, the height (lo) from the body size bs1 is first calculated.
wer height) dc1 is subtracted to obtain the height ac1 of this upper part. The downward movement amount SVD is the difference between the height VUH (line L21) at the upper portion of the formula enclosed by the brackets B11 and B12 at this time and the value of the height ac1 (height of L22) at the upper portion. This is obtained by subtracting the latter from the former. If there is a subscript in the lower right of the bracket B12 or in the lower left of the bracket B11 (see the example on the right side of FIG. 10), the subscript is assigned to the line L23 of the height dc1 below the bracket B12 (connect this line L23. Make a line and assign subscripts). The amount SVD of upward movement in this case is calculated by dividing the height VLH (line L25) of the lower part of the expression enclosed by the brackets B11 and B12 at this time and the value of the height dc1 of this lower part (height of L23). Since it is the difference, this is obtained by subtracting the latter from the former.

【0015】ここでは具体的なボディサイズ、上部の高
さ、下部の高さを基に移動量SVDを示した。図10,
図11のフローでは変数を用いこれらの値が求められ
る。即ち、図10,図11のフローに於て、変数はフロ
ーチャート番号0及びフローチャート番号13に記載の
ように定義される。そして当該添字の下方又は上方への
移動量は、変数Syu,Sylの値として、フローチャー
ト番号13で求められる。なお各変数の定義は図の記述
だけで理解可能と思料される。説明を略す。他の事項に
ついても、図や表の中の記載だけで理解可能と思料され
る場合は、説明を略す。更に、下部の高さを表わす変数
Blhは負の値で表現されるものとする。この為、フロー
チャート番号13では、括弧の上部の高さが(Bh+Bl
h)と表現される。そしてこの上部の高さ(Bh+Blh)
が、括弧に囲まれた式の上部の高さHuから減算され、
移動量Syuとされる。
Here, the movement amount SVD is shown based on the specific body size, the height of the upper portion, and the height of the lower portion. Figure 10,
In the flow of FIG. 11, these values are obtained using variables. That is, in the flow of FIGS. 10 and 11, the variables are defined as described in the flowchart number 0 and the flowchart number 13. Then, the downward or upward movement amount of the subscript is obtained in the flowchart No. 13 as the values of the variables Syu and Syl. The definition of each variable is considered to be understandable only by the description of the figure. The description is omitted. Descriptions of other matters will be omitted if it can be understood only from the illustrations and tables. Further, the variable Blh representing the height of the lower part is represented by a negative value. Therefore, in flowchart number 13, the height at the top of the brackets is (Bh + Bl
It is expressed as h). And the height of this upper part (Bh + Blh)
Is subtracted from the height Hu at the top of the expression in parentheses,
The amount of movement Syu is set.

【0016】図10,図11のフローは、上記前提に立
って組み立てられている。フローの全体像を説明する。
即ちディスプレイ8上で、不図示カーソルにより、図1
2(A)の添字「h」が選択され、図7のエリアA2に
が選択されて、添字「h」の位置補正が指示されたとす
る。これに応動して、図1の数式探索処理部211によ
り、数式記憶部22から当該添字「h」を頂点の節
(根)とする図12(C)の二分木のデータが読み出さ
れる。なお図12(C)の各節はその脇に付されている
番号で指称する。本実施例に於て位置補正の対象になる
のは、それが付されている式が括弧であり、その括弧よ
りその中の式が上や下に飛出していた場合である。本発
明では、構造化データ(ここでは二分木)の探索によ
り、その状態の有無が判断される。ここに示す図10,
図11のフローはその具体例であり、全体構成は以下の
如くされている。
The flows shown in FIGS. 10 and 11 are assembled based on the above premise. An overview of the flow will be explained.
That is, on the display 8, a cursor not shown in FIG.
It is assumed that the subscript “h” of 2 (A) is selected, the area A2 of FIG. 7 is selected, and the position correction of the subscript “h” is instructed. In response to this, the mathematical expression search processing unit 211 of FIG. 1 reads out the binary tree data of FIG. 12C in which the subscript “h” is the node (root) of the vertex from the mathematical expression storage unit 22. Note that each section in FIG. 12C is referred to by the number attached to the side thereof. In this embodiment, the target of position correction is when the expression to which it is attached is a parenthesis and the expression in the parenthesis jumps above or below the parenthesis. In the present invention, the presence or absence of the state is determined by searching the structured data (here, a binary tree). Figure 10 shown here,
The flow of FIG. 11 is a specific example thereof, and the overall configuration is as follows.

【0017】先ず節は最初に累乗の式の節の2つ下の
節、即ち当該添字が付されている式を表わす節から始め
られ(フローチャート番号1)、その右の節があればそ
の節(フローチャート番号8,11)、なければ下の節
(フローチャート番号9,12)という順序で、順に注
目する節nとされる(探索される)(フローチャート番
号0の定義参照)。注目された節については夫々以下の
処理が行なわれる。先ず式の種類が検査される(フロー
チャート番号2)。式の種類が括弧であった場合、その
ボディサイズと、FEO(CEO)及び接続点CPのy
座標値が算出され、これを基に、変数Bh及びBlhが更
新される(フローチャート番号3)。なおこの更新によ
り、最終的に変数Bh,Blhは、添字が付された式の中
に含まれる各括弧のボディサイズ、上部の高さのうちで
一番大きかったものを表わすことになる。更に、その括
弧の中の式のボディサイズ、FEO(CEO)及び接続
点CPのy座標値が算出され、これを基に、変数FHn
l,FEOynl及びCPynlが更新される(フローチャ
ート番号3→フローチャート番号4)。またそのとき注
目された式の内容が「累乗」、即ち添字が付された式で
あった場合は、その添字が付された式のボディサイズ、
FEO(CEO)及び接続点CPのy座標値が算出さ
れ、これを基に、変数FHnl,FEOynl及びCPyn
lが更新される(フローチャート番号2(累乗の式)→
フローチャート番号4)。
First, the clause starts with a clause two levels below the clause of the exponentiation formula, that is, a clause representing the equation to which the subscript is attached (Flowchart No. 1), and if there is a clause on the right, the clause. (Flowchart Nos. 8 and 11), or if there is no lower node (Flowchart Nos. 9 and 12), the node n of interest is sequentially searched (searched) (see definition of Flowchart No. 0). The following processing is performed for each focused node. First, the type of expression is checked (flowchart number 2). If the type of expression is parentheses, its body size, FEO (CEO), and y of the connection point CP
Coordinate values are calculated, and variables Bh and Blh are updated based on the calculated coordinate values (flowchart number 3). By this update, finally, the variables Bh and Blh represent the largest body size or height of each parenthesis included in the subscripted expression. Further, the body size of the expression in the parentheses, FEO (CEO), and the y coordinate value of the connection point CP are calculated, and based on this, the variable FHn
l, FEOynl and CPynl are updated (Flowchart No. 3 → Flowchart No. 4). If the content of the expression that was noted at that time was "power", that is, if the expression had a subscript, the body size of the expression with that subscript,
The y coordinate values of FEO (CEO) and the connection point CP are calculated, and based on this, the variables FHnl, FEOynl and CPyn are calculated.
l is updated (Flowchart number 2 (exponentiation formula) →
Flowchart number 4).

【0018】更新後、そのときにおける変数FHnlと
変数Bhの大小関係、及び変数(FEOynl+CPyn
l)と変数Blhの大小関係が評価される(フローチャー
ト番号5)。変数FHnlの方が変数Bhより大きい場
合、或いは変数(FEOynl+CPynl)が変数Blhよ
り小さい場合は、その中の式の高さの方が括弧のボディ
サイズより大きい、或いは式の下部の高さの方が括弧の
下部の高さより大きい、即ち図12(A)のように、位
置補正をしなければならない割り付けになっている可能
性がある。従って、その式の内容を検査する、即ち下の
節に向かって検査をしていく必要があるが、ここで注目
していた節の右に節がある場合、その節或いは葉につい
て先に上記フローチャート番号3又は4の処理が行なわ
れ、各変数の値が更新される。このように右の節が先に
探索されるのは、例えば図9の2.1の節N1「括弧」
のように、右に「−」の節N11、「c」の葉Lf12
が接続されており、これらのボディサイズ等で、変数B
lh等が更新されていなければならない場合があるからで
ある。
After updating, the magnitude relationship between the variable FHnl and the variable Bh at that time and the variable (FEOynl + CPyn)
The relationship between l) and the variable Blh is evaluated (flowchart number 5). If the variable FHnl is larger than the variable Bh, or if the variable (FEOynl + CPynl) is smaller than the variable Blh, then the height of the expression in it is larger than the body size of the parentheses or the height at the bottom of the expression. Is larger than the height of the lower part of the bracket, that is, there is a possibility that the position must be corrected as shown in FIG. Therefore, it is necessary to inspect the contents of the expression, that is, to inspect toward the lower node. However, if there is a node to the right of the node of interest here, the node or leaf must be checked above. The process of flowchart number 3 or 4 is performed, and the value of each variable is updated. In this way, the right section is searched first, for example, section N1 “parentheses” in 2.1 in FIG.
As shown in the right, the node N11 of "-", the leaf Lf12 of "c"
Are connected, and the variable B
This is because there is a case where lh etc. must be updated.

【0019】そこでここで注目されていた節(式)の二
つ下の節は一旦スタックSに積まれ(フローチャート番
号6)、その右の節の存在が検査され(フローチャート
番号7,8)、節があればその節が注目する節とされ
(フローチャート番号11)それについてフローチャー
ト番号2からの処理が繰り返される。フローチャート番
号5の答がNo(いいえ)のときは式の内容を検査する
必要がない。この場合は直接フローチャート番号7に処
理が移行される。右側に節が無いとき又は無くなったと
きは、スタックSが検査され(フローチャート番号
9)、積まれているもの、即ち下に接続されている節が
残っていた場合はそれが取り出され(それが注目する節
とされ)(フローチャート番号12)、それについてフ
ローチャート番号2からの処理が繰り返される。そして
スタックSの内容が無いとき又は無くなったときは、全
ての節についての探索が終ったときであり、そこで変数
Bh,Blhの値が初期値「0」で無くなっているかが検
査される。何れかが「0」で無いときは、フローチャー
ト番号3でこれら変数の更新がなされている。即ちこの
とき指示された添字に係る式の何処かに括弧があり、変
数(Bh+Blh)又は変数Blhとして、当該添字の好ま
しい割り付け位置が示されている。従って、そのとき対
象とされた式、即ち累乗の式の節の一つ下の節の upper
height 及び lower height の値Hu,Hlから、そのと
き保持されている変数Bh,Blhを夫々減算され、当該
添字の下方、又は上方への移動量Syu,Sylが算出され
る。なお変数nで指定された節、即ちそのとき注目した
節の式が括弧でも累乗でも無い場合は、それに対する添
字の位置は原則通りで補正を要しない。従ってこの場合
はフローチャート番号2から直接フローチャート番号7
に処理が移行され、次の節についてフローチャート番号
2からの処理が行なわれる。
Therefore, the node immediately below the node (expression) that has been noted here is once stacked on the stack S (flowchart number 6), and the existence of the node on the right is checked (flowchart numbers 7 and 8). If there is a section, that section is regarded as the section of interest (flow chart number 11), and the processing from the flow chart number 2 is repeated for it. When the answer to the flowchart No. 5 is No, it is not necessary to check the contents of the formula. In this case, the process directly moves to the flowchart No. 7. If there are no or no knots on the right, the stack S is examined (flowchart number 9), and if there is a piling, ie a knot connected below, it is taken out (it is It is regarded as a section of interest) (flowchart number 12), and the processes from the flowchart number 2 are repeated for it. When the contents of the stack S are absent or lost, it means that the search has been completed for all the clauses, and it is checked whether the values of the variables Bh and Blh have disappeared from the initial value "0". When any one is not "0", these variables are updated in the flowchart No. 3. That is, there is a parenthesis somewhere in the expression relating to the subscript designated at this time, and the preferable allocation position of the subscript is shown as the variable (Bh + Blh) or the variable Blh. Therefore, the upper expression of the clause immediately below the clause of the expression targeted at that time, that is, the exponentiation
The variables Bh and Blh held at that time are subtracted from the values Hu and Hl of the height and the lower height, respectively, and the moving amounts Syu and Syl of the subscript to the lower side or the upper side are calculated. If the clause specified by the variable n, that is, the expression of the clause of interest at that time is neither a parenthesis nor a power, the position of the subscript for it is as a general rule and no correction is required. Therefore, in this case, the flowchart No. 2 directly to the flowchart No.
The processing shifts to, and the processing from the flowchart No. 2 is performed for the next section.

【0020】図12(C)の二分木について図10,図
11のフローの処理を行なったときの具体的処理の内容
を表1に示す。一番左の欄は処理の順を示す番号、その
右の欄はその処理が行なわれるフローチャート番号、そ
の右の欄の記述がそのとき行なわれる処理の内容であ
る。これまで行なってきた説明を基にすれば、表の記述
で処理内容は理解可能と思料する。説明を省略する。こ
の表1の処理により、添字の下方への補正量Syuが求め
られ、例えば図12(A)に示される位置に割り付けら
れていた添字「h」は、この補正量Syu(この例ではS
VD)の分下方に移動された図12(B)に示されると
ころの、ラインL22を接続線とする新たな位置に割り
付けられる。
Table 1 shows the specific contents of the processing when the processing of the flow of FIGS. 10 and 11 is performed on the binary tree of FIG. 12 (C). The leftmost column is a number indicating the order of processing, the right column is the flowchart number in which the process is performed, and the description in the right column is the content of the process performed at that time. Based on the explanation given so far, it is considered that the processing contents can be understood by the description in the table. The description is omitted. By the process of Table 1, the downward correction amount Syu of the subscript is obtained. For example, the subscript “h” assigned to the position shown in FIG.
It is moved to the new position where the line L22 is used as a connecting line, which is moved downward by VD) as shown in FIG.

【0021】[0021]

【表1】 [Table 1]

【0022】図6に示したハードウェア上に構築された
第二実施例を図13に示す。この実施例は、括弧の高さ
補正をする為のもので、請求項2の発明、請求項2を引
用する請求項3の発明、及び請求項3の発明を引用する
請求項4の発明の実施するものである。この第二実施例
は処理装置31の括弧の大きさ算出部312を除き第一
実施例と同一である。同一の部分には同じ符号を付し説
明を略す。数式探索処理部211、括弧の大きさ算出部
312及び数式割り付け処理部213を備えた処理装置
31は、図6のハードウェアの中央演算装置2とメモリ
3上で実現される。この処理装置31は、請求項3にい
う処理手段(請求項2記載の割り付け処理方法を用いて
数式の割り付け処理を実行する処理手段)として機能す
る。
FIG. 13 shows a second embodiment constructed on the hardware shown in FIG. This embodiment is for correcting the height of parentheses, and is the invention of claim 2, the invention of claim 3 which cites claim 2 and the invention of claim 4 which cites the invention of claim 3. It is to be implemented. This second embodiment is the same as the first embodiment except for the bracket size calculation unit 312 of the processing device 31. The same parts are designated by the same reference numerals and the description thereof is omitted. The processing device 31 including the mathematical expression search processing unit 211, the parenthesis size calculation unit 312, and the mathematical expression allocation processing unit 213 is realized on the hardware central processing unit 2 and the memory 3 of FIG. The processing device 31 functions as a processing unit according to claim 3 (a processing unit that executes a mathematical expression allocation process using the allocation processing method according to claim 2).

【0023】数式探索処理部211は、そのとき補正の
対象として選択された括弧を頂点の節とする二分木を数
式記憶部22に記憶されている二分木の中から読出し、
該括弧が付与された式の内容を表わす子の節を探索す
る。括弧の大きさ算出部312は、該探索に基づいて括
弧が付された式(対象となる式)の高さを演算し、この
演算結果に基づいて括弧の高さを決定する。この結果に
従って、数式割り付け処理部213が当該算出された高
さの括弧の割り付け処理を実行する。括弧の高さ補正を
指示する為のウィンドウ表示の例を図14に示す。マウ
ス10を操作して不図示カーソルを「表示内容」の項目
の「項」のエリアA11内に置き、マウス10のボタン
をクリックする。これによりエリアA11の枠B11
が、太線化される。次いで同カーソルを「大きさ補正」
の項目の「添字」のエリアA12に置き、マウス10の
ボタンをクリックする。これによりエリアA12の枠B
13が太線化され(不図示)、括弧の高さ補正が実行さ
れる状態にあることが表示される。なお原則通りの括弧
の高さとする、即ち請求項2の発明による高さの補正を
しないときは、枠B13が太線化されているエリアA1
2にカーソルを置き、マウス10のボタンをクリックす
る。これで補正を行なわない状態に戻される。なお図1
4の他の部分は本発明には直接関連が無いが、第一実施
例の説明のときと同様、実際に近いものを図示した方が
理解容易と思料されたので、参考の意味で図示した。説
明を省略する。
The mathematical expression search processing unit 211 reads out a binary tree whose parenthesis is the node of the vertex selected as the correction target at that time from the binary tree stored in the mathematical expression storage unit 22,
The child clause representing the content of the expression to which the parentheses are added is searched. The parenthesis size calculation unit 312 calculates the height of the expression with parentheses (the target expression) based on the search, and determines the height of the parentheses based on the result of this operation. According to this result, the mathematical expression allocation processing unit 213 executes the bracket allocation processing of the calculated height. FIG. 14 shows an example of a window display for instructing the height correction of the brackets. The mouse 10 is operated to place a cursor (not shown) in the “item” area A11 of the “display content” item, and the mouse 10 button is clicked. Thereby, the frame B11 of the area A11
However, it is bolded. Then move the cursor to "size correction"
Place the mouse in the "subscript" area A12 of the item and click the button of the mouse 10. As a result, the frame B of the area A12
13 is thickened (not shown), and it is displayed that the height correction of the parenthesis is executed. It should be noted that the height of the parentheses is in accordance with the principle, that is, when the height correction according to the invention of claim 2 is not performed, the area A1 in which the frame B13 is thickened
Place the cursor on 2 and click the button on mouse 10. This restores the state without correction. Figure 1
The other parts of No. 4 are not directly related to the present invention, but as in the case of the description of the first embodiment, it is thought that it is easier to understand what is close to the actual one, and therefore it is illustrated for reference. . The description is omitted.

【0024】第二実施例の処理手順を図15,図16に
示す。紙面の大きさの制限があるため、2図に分割して
表示した。双方のフローは接続端子1〜4で接続されて
いる。なおフロー中の各処理や判断は、その枠の外に付
されているフローチャート番号で指称する。補正前の状
態、即ち原則通りの括弧の高さとされている数式の例を
図17(A)に示す。括弧B23,B24に囲まれた式
の高さを表わすラインL31が、添字「h」の接続線と
されている。そして括弧B21,B22の高さが、この
添字「h」の高さに合わせられている(ラインL3
2)。この為、括弧B22の高さ(ボディサイズbs
2)は、好ましいとされる高さより高くなっている。
The processing procedure of the second embodiment is shown in FIGS. Due to the limitation of the size of the paper, it is divided into two figures and displayed. Both flows are connected at connection terminals 1-4. Each process and judgment in the flow is referred to by a flowchart number attached outside the frame. FIG. 17A shows an example of a mathematical expression in which the parenthesis height is the same as before correction, that is, in principle. A line L31, which is enclosed by the brackets B23 and B24 and represents the height of the expression, is a connection line with the subscript “h”. The heights of the brackets B21 and B22 are matched with the height of the subscript "h" (line L3.
2). Therefore, the height of the bracket B22 (body size bs
2) is higher than the preferred height.

【0025】本実施例では、図17(A)の式の場合、
括弧B23,B24の高さ(ボディサイズbs3)に括
弧B21,B22の高さを合わせた状態、即ち同図
(B)の割り付け状態を、好ましい割り付けとする。言
い換えれば、括弧B23,B24の中に、括弧と添字が
あり、括弧B23,B24の高さがそれらに影響されて
いる場合には、添字の高さを無視して、括弧B23,B
24の高さを定めるようにする。図15,図16のフロ
ーは、この前提に立って組み立てられている。フローの
全体像を説明する。なお変数の定義はフローチャート番
号0記載のとおりである。変数H以外は第一実施例と同
じで、括弧の高さはこの変数Hとして求められる。先
ず、ディスプレイ8上で、不図示カーソルにより、図1
7(A)の括弧B22が選択され、図14のエリアA1
2にカーソルが置かれて、括弧B22の高さ補正が指示
されたとする。
In this embodiment, in the case of the formula of FIG.
The state in which the heights of the brackets B21 and B22 are matched with the heights of the brackets B23 and B24 (body size bs3), that is, the allocation state of FIG. In other words, if there are parentheses and subscripts in the parentheses B23 and B24 and the heights of the parentheses B23 and B24 are affected by them, the heights of the subscripts are ignored and the parentheses B23 and B24 are ignored.
Set the height of 24. The flow of FIGS. 15 and 16 is assembled on the basis of this premise. An overview of the flow will be explained. The definitions of the variables are as described in the flowchart No. 0. Except for the variable H, the height of the parentheses is obtained as this variable H as in the first embodiment. First, on the display 8, with a cursor not shown in FIG.
The parenthesis B22 of 7 (A) is selected, and the area A1 of FIG. 14 is selected.
It is assumed that the cursor is placed at 2 and the height correction of the bracket B22 is instructed.

【0026】これに応動して、図1の数式探索処理部2
11により、数式記憶部22から当該括弧B21,B2
2を頂点の節(根)とする図17(C)の二分木のデー
タが読み出される。なお図17(C)の各節又は葉は、
その脇に付されている番号で指称する。本実施例に於て
括弧の高さを補正するのは、その括弧の中に更に括弧と
添字があり、当該括弧の高さがそれらに影響されている
場合である。本発明では、構造化データ(ここでは二分
木)の探索により、その状態の有無が判断される。ここ
に示す図15,図16のフローはその具体例であり、全
体構成は以下の如くされている。最初に「括弧」の節の
2つ下の節、即ち当該括弧が付されている式を表わす節
から始められ(フローチャート番号1)、その右の節が
あればその節(フローチャート番号6,7,9)、なけ
れば下の節(フローチャート番号8,10)というよう
に、各節が順に注目する節nとされる(探索される)
(フローチャート番号0の定義参照)(基本的には第一
実施例と同じ)。注目された節については夫々以下の処
理が行なわれる。先ず式の種類が検査される(フローチ
ャート番号2)。式の種類が括弧の式、又は添字の式で
あった場合、そのときにおける変数Hが、その括弧の中
の式又はその添字が付された式の高さより小さいかが検
査される(フローチャート番号3)。
In response to this, the mathematical expression search processing unit 2 of FIG.
11, the parentheses B21, B2 from the formula storage unit 22
Data of the binary tree in FIG. 17C in which 2 is the node (root) of the vertex is read. Note that each node or leaf in FIG. 17C is
It is designated by the number attached to the side. In this embodiment, the height of the parenthesis is corrected when the parenthesis and the subscript are further included in the parenthesis and the height of the parenthesis is affected by them. In the present invention, the presence or absence of the state is determined by searching the structured data (here, a binary tree). The flows shown in FIGS. 15 and 16 are specific examples, and the overall configuration is as follows. First, the section immediately below the section of "parentheses", that is, the section representing the expression to which the parentheses are attached (Flowchart No. 1), and the section on the right thereof (Flowchart Nos. 6 and 7) , 9), or if there is no lower section (flowchart numbers 8 and 10), each section is sequentially set as a focused section n (searched).
(Refer to the definition of flowchart number 0) (Basically the same as the first embodiment). The following processing is performed for each focused node. First, the type of expression is checked (flowchart number 2). When the type of expression is a parenthesized expression or a subscripted expression, it is checked whether the variable H at that time is smaller than the height of the expression in the parenthesis or the expression with the subscripted (flowchart number). 3).

【0027】変数Hは、そのときまでに探索された節又
は葉によって表わされる式(その他の式)の高さを保持
している(フローチャート番号4)。この変数Hの値の
方が、このとき注目された括弧の中の式または添字が付
された式の高さより小さいとき(フローチャート番号3
の答「Yes」)、それらの式の高さは注目された括弧
や添字より高い。この場合注目された式は、例えば図1
7(A)の括弧B22の中の式のように、添字「h」等
があり、括弧の高さを補正しなければならない形のもの
である可能性がある。この場合、その式の内容を検査す
る、即ちその下の節に向かって検査をする必要がある
が、第1実施例と同様に、注目していた節から右に節が
続いている場合、その節或いは葉について先に処理が行
なわれる。即ち、当該式(節)を一旦スタックSに積み
(フローチャート番号5)、注目する節nをその右の節
の値nrとし(フローチャート番号6)、節があればそ
の節を注目する節として(フローチャート番号7,9)
フローチャート番号2からの処理を繰り返す。フローチ
ャート番号3の答が「No」のときは式の内容を検査す
る必要がない。この場合はフローチャート番号3から直
接フローチャート番号6に処理が移される。右側に節が
無いとき又は無くなったら、スタックSの内容の有無を
チェックし(フローチャート番号8)、内容があればそ
れを取り出して(フローチャート番号10)フローチャ
ート番号2からの処理を繰り返す。スタックSの内容が
無いとき又は無くなったら、処理を終る。なお注目され
た節の式が括弧の式でも添字の式でもない場合、それに
対する括弧の高さは原則通りで補正を要しない。従って
この場合はフローチャート番号2からフローチャート番
号4に進み、変数H(括弧の高さ)はその式の高さで更
新される。
The variable H holds the height of the expression (other expression) represented by the node or leaf searched up to that time (flowchart number 4). When the value of this variable H is smaller than the height of the expression in the parentheses or the expression with the subscript noted at this time (Flowchart No. 3
Answer "Yes"), the height of those expressions is higher than the noted parentheses or subscripts. In this case, the notable formula is, for example, as shown in FIG.
Like the expression in the parenthesis B22 of 7 (A), there is a subscript "h" or the like, and there is a possibility that the height of the parenthesis must be corrected. In this case, it is necessary to inspect the contents of the expression, that is, to inspect toward the node underneath, but as in the first embodiment, when the node following the node of interest continues to the right, The node or leaf is processed first. That is, the formula (section) is temporarily stacked on the stack S (flowchart number 5), the focused node n is set to the value nr of the node on the right (flowchart number 6), and if there is a node, the focused node is set as the focused node ( (Flowchart numbers 7 and 9)
The processing from the flowchart No. 2 is repeated. When the answer to the flowchart No. 3 is "No", it is not necessary to check the contents of the formula. In this case, the process is moved from the flowchart number 3 directly to the flowchart number 6. When there is no node on the right side or when there is no node, the presence or absence of the contents of the stack S is checked (flowchart number 8), and if there is the contents, it is taken out (flowchart number 10) and the processes from the flowchart number 2 are repeated. When the contents of the stack S are not present or have disappeared, the process ends. In addition, when the expression of the noted section is neither the expression of the parenthesis nor the expression of the subscript, the height of the parenthesis for it is the same as the principle and no correction is required. Therefore, in this case, the process proceeds from the flowchart No. 2 to the flowchart No. 4, and the variable H (height in parentheses) is updated with the height of the expression.

【0028】図17(C)の二分木について図15,図
16のフローの処理を行なったときの具体的処理の内容
を表2〜4に示す。行数が多いので三つの表に分けて記
述した。各欄の記述内容は表1と同じである。これまで
行なってきた説明を基にすれば、表の記述で処理内容は
理解可能と思料する。説明を省略する。この表2〜4の
処理により、補正された括弧の大きさHが求められ、図
17(C)のように、該新たな大きさの括弧B21C,
B22Cが括弧B23,B24の外側に割り付けられ
る。
Tables 2 to 4 show the specific contents of the processing when the processing of the flows of FIGS. 15 and 16 is performed on the binary tree of FIG. 17C. Since the number of lines is large, the description is divided into three tables. The description content of each column is the same as in Table 1. Based on the explanation given so far, it is considered that the processing contents can be understood by the description in the table. The description is omitted. By the processing of Tables 2 to 4, the corrected parenthesis size H is obtained, and as shown in FIG. 17C, the parenthesis B21C of the new parenthesis,
B22C is assigned to the outside of the brackets B23 and B24.

【0029】[0029]

【表2】 [Table 2]

【0030】[0030]

【表3】 [Table 3]

【0031】[0031]

【表4】 [Table 4]

【0032】なお上記説明では、夫々の数式に、第一実
施例で示される発明と第二実施例で示される発明を夫々
適用した。同じ数式に対し、これら発明を適用するよう
にしても良い。このようにすると、一つの式の添字の位
置、括弧の高さが共に修正され、例えば図4(B)の式
が図5(B)のようになる。また本発明の実施形態は任
意である。例えば表示や印刷出力が要求された時点でそ
の処理の対象たる構造化データを読み出して指定された
補正をし、表示や印刷出力をするというコンバータスタ
イルにするのも良い。或いは当該構造化データそのもの
に本発明によって求められた補正データを組込んでしま
い、表示や印刷のときその補正データに基づいて添字の
位置や括弧の大きさを補正する、というエディタースタ
イルにするのも良い。更に各実施例では、マウス(カー
ソル)を用いて補正するしないを指示したが、わざわざ
指定しなくても、本発明の処理が常に実行されるように
しておいても良い。
In the above description, the invention shown in the first embodiment and the invention shown in the second embodiment are applied to the respective mathematical expressions. These inventions may be applied to the same formula. By doing so, the position of the subscript and the height of the parenthesis of one expression are both corrected, and the expression of FIG. 4B becomes as shown in FIG. 5B, for example. The embodiment of the present invention is arbitrary. For example, when display or print output is requested, the structured data to be processed may be read out and the designated correction may be performed to display or print output. Alternatively, the editor style is adopted in which the correction data obtained by the present invention is incorporated into the structured data itself, and the position of the subscript and the size of the parentheses are corrected based on the correction data when displaying or printing. Is also good. Further, in each of the embodiments, the mouse (cursor) is used to instruct not to make the correction, but the process of the present invention may be executed at all times without the need to specify it.

【0033】[0033]

【発明の効果】以上説明したように、請求項1の発明で
は、数式を表わす構造化データから、添字の付与された
式の内容を表わすデータを探索し、対象となる式の高さ
を演算し、この演算結果に基づいて添字の位置を決定
し、割り付け処理が行なわれる。請求項2の発明では、
数式を表わす構造化データから、括弧の内容を表わすデ
ータを探索し、対象となる式の高さを演算し、この演算
結果に基づいて括弧の高さを決定し、割り付け処理が行
なわれる。請求項3の発明では、処理手段を用い、請求
項1または請求項2記載の割り付け処理方法を用いて数
式の割り付け処理が行なわれる。。請求項4の発明で
は、指示手段により添字の位置補正または括弧の大きさ
補正が指示される。従ってこれら発明を用いれば、構造
化データの利点、即ち同一のデータで表示と演算が可能
であるという利点を活かしつつ、いわば自動的に構造化
データで示される数式の添字の位置や括弧の高さが補正
されることになる。
As described above, according to the first aspect of the present invention, the structured data representing the mathematical formula is searched for the data representing the contents of the formula with the subscript, and the height of the target formula is calculated. Then, the position of the subscript is determined based on the result of this calculation, and the allocation process is performed. According to the invention of claim 2,
Data representing the contents of the parentheses is searched for from the structured data representing the mathematical formula, the height of the target expression is calculated, the height of the parentheses is determined based on the calculation result, and the allocation processing is performed. In the invention of claim 3, the allocation processing of the mathematical expression is performed using the processing means and the allocation processing method according to claim 1 or 2. . In the invention of claim 4, the position correction of the subscript or the size correction of the parenthesis is instructed by the instruction means. Therefore, using these inventions, while taking advantage of the advantage of structured data, that is, the advantage that the same data can be displayed and operated, so to speak, the position of subscripts and the height of parentheses of mathematical formulas automatically indicated by structured data Will be corrected.

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

【図1】 第一実施例の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of a first embodiment.

【図2】 割り付けの基準となる領域、点、値等を示す
線図。
FIG. 2 is a diagram showing areas, points, values, etc., which serve as allocation references.

【図3】 式の接続及び割り付けの基準となる点、値、
線等を示す線図。
FIG. 3 is a point, a value, which is a reference for connecting and assigning expressions,
A diagram showing lines and the like.

【図4】 原則通りの位置又は大きさで、添字又は括弧
が割り付けられている例を示す線図。
FIG. 4 is a diagram showing an example in which subscripts or parentheses are assigned at positions or sizes in accordance with the principle.

【図5】 補正された位置又は大きさで、添字又は括弧
が割り付けられている例を示す線図。
FIG. 5 is a diagram showing an example in which subscripts or parentheses are assigned at corrected positions or sizes.

【図6】 各実施例を実現するためのハードウェアの構
成例を示すブロック図。
FIG. 6 is a block diagram showing a configuration example of hardware for realizing each embodiment.

【図7】 添字の位置の補正を指示するための手段の一
例を示す線図。
FIG. 7 is a diagram showing an example of means for instructing correction of the position of a subscript.

【図8】 二分木による数式の表現の基本構造を示す線
図。
FIG. 8 is a diagram showing a basic structure of a mathematical expression represented by a binary tree.

【図9】 二分木による数式の表現の具体例を示す線
図。
FIG. 9 is a diagram showing a specific example of expression of a mathematical expression using a binary tree.

【図10】 第一実施例の処理手順を示すフローチャー
ト(その1)。
FIG. 10 is a flowchart (part 1) showing the processing procedure of the first embodiment.

【図11】 第一実施例の処理手順を示すフローチャー
ト(その2)。
FIG. 11 is a flowchart (part 2) showing the processing procedure of the first embodiment.

【図12】 或る式についての補正前の添字の割り付け
位置(A)、補正後の添字の割り付け位置(B)及びそ
の式を表わす二分木のデータを示す線図。
FIG. 12 is a diagram showing a subscript allocation position before correction (A), a postscript correction allocation position (B) for a certain expression, and binary tree data representing the expression.

【図13】 第二実施例の構成を示すブロック図。FIG. 13 is a block diagram showing the configuration of a second embodiment.

【図14】 括弧の高さの補正を指示するための手段の
一例を示す線図。
FIG. 14 is a diagram showing an example of means for instructing correction of bracket height.

【図15】 第二実施例の処理手順を示すフローチャー
ト(その1)
FIG. 15 is a flowchart (part 1) showing the processing procedure of the second embodiment.

【図16】 第二実施例の処理手順を示すフローチャー
ト(その2)
FIG. 16 is a flowchart (part 2) showing the processing procedure of the second embodiment.

【図17】 或る式についての補正前の括弧の大きさ
(A)、補正後の括弧の大きさ(B)及びその式を表わ
す二分木のデータを示す線図。
FIG. 17 is a diagram showing parenthesis size (A) before correction, parenthesis size after correction (B), and binary tree data representing the formula for a certain formula.

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

21,22 処理手段 A2,A12,10 指示手段 21,22 Processing means A2, A12,10 Instructing means

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 構造化データで表現される数式の割り付
け処理方法に於て、添字の付与された式の内容を表わす
データを探索し、対象となる式の高さを演算し、この演
算結果に基づいて添字の位置を決定し、割り付け処理を
行なうことを特徴とする割り付け処理方法。
1. A method of allocating a mathematical expression represented by structured data, searching for data representing the contents of an expression with a subscript, calculating the height of the target expression, and calculating the result. An allocation processing method, characterized in that the position of a subscript is determined based on, and allocation processing is performed.
【請求項2】 構造化データで表現される数式の割り付
け処理方法に於て、括弧の内容を表わすデータを探索
し、対象となる式の高さを演算し、この演算結果に基づ
いて括弧の高さを決定し、割り付け処理を行なうことを
特徴とする割り付け処理方法。
2. A method of allocating a mathematical expression represented by structured data, searching for data representing the contents of parentheses, calculating the height of the target expression, and calculating the height of the parentheses based on the calculation result. An allocation processing method characterized by determining height and performing allocation processing.
【請求項3】 請求項1または請求項2記載の割り付け
処理方法を用いて数式の割り付け処理を実行する処理手
段を備えたことを特徴とする割り付け処理装置。
3. An allocation processing apparatus, comprising processing means for executing allocation processing of a mathematical expression using the allocation processing method according to claim 1.
【請求項4】 添字の位置補正または括弧の大きさ補正
を指示する指示手段を備えたことを特徴とする請求項3
記載の割り付け処理装置。
4. An instruction means for instructing position correction of a subscript or size correction of a parenthesis is provided.
Allocation processing device described.
JP4245597A 1992-08-20 1992-08-20 Method and device for allocation processing Pending JPH0668076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4245597A JPH0668076A (en) 1992-08-20 1992-08-20 Method and device for allocation processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4245597A JPH0668076A (en) 1992-08-20 1992-08-20 Method and device for allocation processing

Publications (1)

Publication Number Publication Date
JPH0668076A true JPH0668076A (en) 1994-03-11

Family

ID=17136095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4245597A Pending JPH0668076A (en) 1992-08-20 1992-08-20 Method and device for allocation processing

Country Status (1)

Country Link
JP (1) JPH0668076A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007535740A (en) * 2004-03-23 2007-12-06 アンヘル・パラショス・オルエタ Managing formulas

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007535740A (en) * 2004-03-23 2007-12-06 アンヘル・パラショス・オルエタ Managing formulas

Similar Documents

Publication Publication Date Title
US4608662A (en) Method for editing document
JPH07160827A (en) Handwritten stroke editing device and method therefor
JP4442616B2 (en) Document editing apparatus, program, and storage medium
JPH0419793A (en) Screen scroll control system
JPH0668076A (en) Method and device for allocation processing
JP5028980B2 (en) Document editing apparatus and program
JP4992399B2 (en) Document editing apparatus and program
JP3899421B2 (en) Character and character string generation and display device
JP3126696B2 (en) Character generation method
JP2718782B2 (en) Figure creation device
JP2828301B2 (en) Control display processor for graphs and tables
JP2005115702A (en) Document display device, program, and method for displaying document
JPH0766386B2 (en) Simple language processing system
JP3039655B2 (en) Text processing apparatus and method
JP3412202B2 (en) String output device
JP3412203B2 (en) String output device
JPH0778062A (en) Comment display method and document processor
JPH09174798A (en) Kerning method and device therefor
JP4562600B2 (en) Document display device, document display program, and computer-readable recording medium on which document display program is recorded
JPH0778792B2 (en) Document creation device
JPH08255256A (en) Character string output device
JP3019255B2 (en) Outline font data storage medium
JPH10171795A (en) Method for plotting mathematical expression and functional graph on display screen
JPH07295972A (en) Chart data processor
JPH01108672A (en) Mathematical formula input and edit system