JPH1125074A - Expression editing device - Google Patents

Expression editing device

Info

Publication number
JPH1125074A
JPH1125074A JP9173565A JP17356597A JPH1125074A JP H1125074 A JPH1125074 A JP H1125074A JP 9173565 A JP9173565 A JP 9173565A JP 17356597 A JP17356597 A JP 17356597A JP H1125074 A JPH1125074 A JP H1125074A
Authority
JP
Japan
Prior art keywords
parentheses
term
height
priority mode
format information
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
JP9173565A
Other languages
Japanese (ja)
Inventor
Koichi Nozaki
浩一 野▲崎▼
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9173565A priority Critical patent/JPH1125074A/en
Publication of JPH1125074A publication Critical patent/JPH1125074A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PROBLEM TO BE SOLVED: To add parentheses desired by a user to a described mathematical expression term by preparing three kinds of a composing processing for adding parentheses, and switching a mode by the user. SOLUTION: An editing means A constituted of a composition controlling part 503, relative coordinate calculating part 506, absolute coordinate calculating part 505, and syntax analyzing part 504 have three modes, that is, a parenthesis priority mode, reference position priority mode, and size priority mode at the time of adding parentheses to a fractional expression. The layout of the character string of a character string storing part 502 is decided by referring to the format information of a format information storing part 508. In the parenthesis priority, the central position of the parentheses is made coincident with the position of a fractional line, and parentheses matched with the height of the larger term among the denominator term and numerator term of the fractional expression are generated. In the reference position priority mode, the reference position of the parentheses is made coincident with the position of the fractional line, and the upper half part of the parentheses is matched with the height of the numerator term, and the lower half part of the parentheses is matched with the height of the denominator term. In the size mode, parentheses matched with the height of the whole fraction are generated.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、パーソナルコンピ
ュータ等の情報処理装置において数式、化学式(本明細
書において、これらを式という)の編集を容易に行うこ
とのできる式編集装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a formula editing apparatus capable of easily editing mathematical formulas and chemical formulas (these formulas are referred to as formulas) in an information processing device such as a personal computer.

【0002】[0002]

【従来の技術】式の編集では、上下方向の中心から上の
大きさ(以下、高さという)と中心から下の大きさ(以
下、深さという)とが異なっている項を配置していく必
要がある。例えば、
2. Description of the Related Art In editing a formula, terms whose height from the center in the vertical direction (hereinafter, referred to as height) and size from the center below (hereinafter, referred to as depth) are arranged are different. We have to go. For example,

【0003】[0003]

【数1】 (Equation 1)

【0004】のような分数式の場合、分子項は、x+y
+z+1であり、分母項は
[0004] In the case of a fractional expression such as
+ Z + 1 and the denominator term is

【0005】[0005]

【数2】 (Equation 2)

【0006】というように分子の高さと分母の高さが一
致しない。一般的に、このような分数式を記述する場
合、文字”y”、文字”=”の中心と分数線の位置を揃
えて配置する規則になっている。また、数式、化学式で
は、様々な高さの項に対してその前後に括弧を配置する
場合が多くある。例えば以下のような数式である。
Thus, the height of the numerator does not match the height of the denominator. In general, when describing such a fractional expression, it is a rule that the center of the letter "y" and the letter "=" is aligned with the position of the fraction line. In addition, in mathematical formulas and chemical formulas, parentheses are often arranged before and after terms of various heights. For example, the following mathematical expression is used.

【0007】[0007]

【数3】 (Equation 3)

【0008】この場合、括弧の大きさは、括弧内の項の
大きさに従い調整され、文字”y”、文字”=”の中心
と括弧の中心が一致するように配置する規則になってい
る。以上の2つの規則に従って連分数に対して括弧をつ
ける場合、従来の式編集装置では、次のように高さ(あ
るいは深さ)に片寄った大きさの括弧を配置するしかで
きなかった。
In this case, the size of the parentheses is adjusted according to the size of the item in the parentheses, and the rule is such that the centers of the characters "y" and "=" are aligned with the centers of the parentheses. . When parentheses are added to continued fractions according to the above two rules, the conventional formula editing apparatus can only arrange parentheses whose size is offset to the height (or depth) as follows.

【0009】[0009]

【数4】 (Equation 4)

【0010】[0010]

【発明が解決しようとする課題】このように、従来の式
編集装置は、括弧を含む式の記述能力にかけるという問
題点があった。
As described above, the conventional formula editing apparatus has a problem in that it depends on the ability to describe formulas including parentheses.

【0011】そこで本発明は、ユーザの希望通りに括弧
を含む式を表現できる式編集装置を提供することを目的
とする。
Accordingly, an object of the present invention is to provide a formula editing apparatus capable of expressing a formula including parentheses as desired by a user.

【0012】[0012]

【課題を解決するための手段】本発明の式編集装置は、
編集結果を表示する表示部と、式を構成する文字列と文
字列のレイアウトに関する書式情報を入力する文字入力
部と、入力された文字列を記憶する文字列記憶部と、入
力された書式情報を記憶する書式情報記憶部と、書式情
報記憶部の書式情報を参照して文字列記憶部の文字列の
レイアウトを決定し表示部に表示させる編集手段とを備
え、編集手段は、分数式に括弧を付けるに際し、括弧の
中心位置と分数線の位置を一致させ分数式の分母項と分
子項のうち大きな方の項の高さに合わせた括弧を生成す
る括弧優先モードと、括弧の基準位置を分数線の位置に
一致させ括弧の上半分を分子項の高さに合わせ括弧の下
半分を分母項の高さに合わせる基準位置優先モードと、
分数線の位置とは無関係に分数全体の高さに合わせた括
弧を生成するサイズ優先モードとを有する。
The formula editing apparatus of the present invention comprises:
A display unit for displaying an editing result, a character input unit for inputting character strings constituting an expression and format information relating to the layout of the character strings, a character string storage unit for storing the input character strings, and input format information A format information storage unit for storing the character string layout of the character string storage unit by referring to the format information of the format information storage unit, and displaying the layout on the display unit. When adding parentheses, a parenthesis priority mode that matches the center position of the parentheses with the position of the fraction line and generates parentheses that match the height of the larger of the denominator and numerator in the fractional expression, and the parenthesis reference position A reference position priority mode in which the upper half of the parentheses matches the height of the numerator term, and the lower half of the brackets matches the height of the denominator term,
A size priority mode for generating parentheses that match the height of the entire fraction regardless of the position of the fraction line.

【0013】この構成により、ユーザの希望通りに括弧
を含む式を表現できる式編集装置を実現できる。
With this configuration, it is possible to realize a formula editing apparatus capable of expressing a formula including parentheses as desired by the user.

【0014】[0014]

【発明の実施の形態】請求項1記載の式編集装置は、編
集結果を表示する表示部と、式を構成する文字列と文字
列のレイアウトに関する書式情報を入力する文字入力部
と、入力された文字列を記憶する文字列記憶部と、入力
された書式情報を記憶する書式情報記憶部と、書式情報
記憶部の書式情報を参照して文字列記憶部の文字列のレ
イアウトを決定し表示部に表示させる編集手段とを備
え、編集手段は、分数式に括弧を付けるに際し、括弧の
中心位置と分数線の位置を一致させ分数式の分母項と分
子項のうち大きな方の項の高さに合わせた括弧を生成す
る括弧優先モードと、括弧の基準位置を分数線の位置に
一致させ括弧の上半分を分子項の高さに合わせ括弧の下
半分を分母項の高さに合わせる基準位置優先モードと、
分数線の位置とは無関係に分数全体の高さに合わせた括
弧を生成するサイズ優先モードとを有する。
According to a first aspect of the present invention, there is provided a formula editing apparatus for displaying a result of editing, a character input unit for inputting a character string constituting an expression and format information relating to the layout of the character string. A character string storage unit for storing a character string, a format information storage unit for storing input format information, and a layout of a character string in the character string storage unit determined and displayed with reference to the format information in the format information storage unit. Editing means for displaying the part in parentheses, when the parentheses are attached to the fractional expression, the center position of the parentheses is matched with the position of the fraction line, and the height of the larger one of the denominator term and the numerator term of the fractional expression is A parenthesis priority mode that generates parentheses that match the standard, and a standard that matches the reference position of the parentheses with the position of the fraction line, and adjusts the upper half of the parentheses to the height of the numerator and the lower half of the parentheses to the height of the denominator. Position priority mode,
A size priority mode for generating parentheses that match the height of the entire fraction regardless of the position of the fraction line.

【0015】この構成により、これらのモードをユーザ
に選択させることによって高さ、深さの異なる項に対し
てバランスのよい括弧を配置することができる。
With this configuration, by allowing the user to select one of these modes, it is possible to arrange well-balanced parentheses for terms having different heights and depths.

【0016】次に本発明の実施の形態について、図面を
参照しながら説明する。図1は本発明の一実施の形態に
おける式編集装置のブロック図である。図1において、
101はCPU、102はCPU101が制御を行うた
めのプログラムや文字列、書式情報を収納するRAM
(ランダム・アクセス・メモリ)、103はキーボー
ド、104はCRT、105は作成した文書等を保存す
る補助記憶装置、106はCRT上に表示されたウィン
ドウを指示するポインティングデバイス(例えばマウ
ス)、107はプリンタである。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a formula editing apparatus according to an embodiment of the present invention. In FIG.
101 is a CPU, 102 is a RAM for storing programs, character strings, and format information for controlling the CPU 101
(Random access memory); 103, a keyboard; 104, a CRT; 105, an auxiliary storage device for storing created documents and the like; 106, a pointing device (for example, a mouse) for indicating a window displayed on the CRT; It is a printer.

【0017】次に本発明の前提として、基本的な数式の
編集方法を説明する。図2は本発明の一実施の形態にお
ける数式構文解析図である。図2(a)に示すように、
数式は「項」の並びによって形成される。項とは図2
(b)のように、「文字」、「分数」、「行列」あるい
は「括弧付」等のいずれかからなる。このなかで「文
字」は数式構成要素の最小単位であり図中では○で表し
ている。「分数」、「行列」等はさらに構成要素が展開
されるので□で表している。本発明において重要な要素
は、図2(c)の「分数」と図2(d)の「括弧付」で
ある。
Next, as a premise of the present invention, a basic formula editing method will be described. FIG. 2 is a mathematical expression parsing diagram in one embodiment of the present invention. As shown in FIG.
A mathematical expression is formed by a sequence of “terms”. What is a term?
As shown in (b), it is composed of any of "character", "fraction", "matrix", "with parenthesis" and the like. Among them, “character” is the minimum unit of a mathematical formula component and is represented by a circle in the figure. “Fraction”, “matrix”, and the like are represented by □ since constituent elements are further expanded. Important elements in the present invention are “fraction” in FIG. 2C and “with brackets” in FIG. 2D.

【0018】図2(c)に示すように、分数は、「分
子」、「分母」、「分数線」から構成される。分数線
は、数式構成の最小要素である。分子、分母は「数式」
であり、このため分子、分母内に再び分数が現れること
がある。図2(d)に示すように、括弧付は「数式」の
前に括弧文字が現れ、項の後ろにも現れる。
As shown in FIG. 2C, the fraction is composed of "numerator", "denominator" and "fraction line". The fraction line is the smallest element of the mathematical composition. The numerator and denominator are "formulas"
Therefore, a fraction may appear again in the numerator and denominator. As shown in FIG. 2D, parentheses appear in parentheses before the “expression” and also after the term.

【0019】図2で説明した数式を、編集手段A(図5
参照)によって組版する手順を、図3を用いて説明す
る。ここで、各文字には文字を並べるときの基準点デー
タがある。基準点より上の大きさを「高さ」と呼び、下
の大きさを「深さ」と呼ぶ。数式組版では、基準点のy
座標を一致させながら、文字を右方向に配置していく
(図3(a))。「文字」以外の項が現れた場合も同様
である。
The mathematical expression explained in FIG.
3) will be described with reference to FIG. Here, each character has reference point data for arranging the characters. The size above the reference point is called “height”, and the size below is called “depth”. In mathematical expression formatting, the reference point y
The characters are arranged rightward while making the coordinates coincide (FIG. 3A). The same applies when a term other than “character” appears.

【0020】例えば、文字と分数が混在した場合(図3
(b))、分数項作成時にその分数項の基準位置を生成
させておけば、通常の文字の並びと同じように配置でき
る。分数項の基準位置は、図3(c)の要領で生成す
る。ここで、分数項は、「分子」、「分母」、「分数
線」をその要素とする。分数を組む段階では、各々の要
素の大きさ、基準位置は求まっており、分数の組版はた
だ分子、分母、分数線を並べることに専念する。分数の
組版規則は、以下の通りである。
For example, when characters and fractions are mixed (FIG. 3
(B)) If the reference position of the fractional item is generated when the fractional item is created, the fractional item can be arranged in the same manner as a normal character arrangement. The reference position of the fraction term is generated as shown in FIG. Here, the fraction term has "numerator", "denominator", and "fraction line" as its elements. At the stage of forming the fraction, the size and reference position of each element are determined, and the typesetting of the fraction focuses solely on the arrangement of the numerator, denominator and fraction lines. The typesetting rules for fractions are as follows:

【0021】まず横方向について、分子、分母の中心を
合わせて並べ、分子または分母の幅の大きななほうから
分数線のはみ出し量を考慮する。縦方向の配置では、分
子、分数線、分母の高さと各々の間の間隔を考慮し並べ
ていく。そして、分子、分母、分数間の相対位置が決定
され、分数項全体の大きさ(幅・高さ・深さ)を求め
る。さらに、分数の基準座標を分数線の左端、線幅中心
位置に設定し、その位置から分子、分母、分数線の座標
を相対座標として記録する。
First, in the horizontal direction, the centers of the numerator and the denominator are aligned and the protruding amount of the fraction line is considered from the larger numerator or the denominator. In the vertical arrangement, the heights of the numerator, the fraction line, the denominator and the distance between each are taken into consideration. Then, the relative position between the numerator, denominator and fraction is determined, and the size (width / height / depth) of the whole fraction term is determined. Further, the reference coordinates of the fraction are set at the left end of the fraction line and the center position of the line width, and the coordinates of the numerator, denominator and fraction line are recorded as relative coordinates from that position.

【0022】「括弧付」では、「数式」項の高さから文
字「括弧」の高さを算出し、「括弧」の中心位置と「数
式」の中心位置を揃えて並べる(図3(d))。図4
(a)に、ここで説明する数式の例をあげる。この例で
は、「括弧付」内に
In the case of "with parentheses", the height of the character "bracket" is calculated from the height of the "expression", and the center position of "bracket" is aligned with the center position of "mathematical expression" (FIG. 3 (d)). )). FIG.
(A) shows an example of a mathematical expression described here. In this example,

【0023】[0023]

【数5】 (Equation 5)

【0024】が記述され、その大きさに従った括弧が付
けられている。数式内には文字「x、+、y」と「分
数」が記述されている。
Are described, and parentheses are attached according to the size. The characters "x, +, y" and "fraction" are described in the formula.

【0025】「分数」は連分数であり、分母項に再び分
数が記述されている。数式を組版する場合、各々項の大
きさ(幅、高さ、深さ)を知る必要がある。このため、
図4(a)の数式では、連分数の最も深い分数から組版
していくことになる。即ち、図4(b)のように、分数
"Fraction" is a continued fraction, and the fraction is described again in the denominator term. When formatting mathematical formulas, it is necessary to know the size (width, height, depth) of each term. For this reason,
In the formula of FIG. 4A, the composition is performed from the deepest fraction of the continued fraction. That is, as shown in FIG.

【0026】[0026]

【数6】 (Equation 6)

【0027】から組版を行う。この分数においては、分
子項、分母項は各々全て文字だけから構成されている。
従って分子項、分母項では図3(b)の用に組版し、分
子項では文字「x、+、y」のy方向中心位置を合わ
せ、右方向に送りながら組版する。また、この分数では
構成要素(分子項、分母項、分数線)は全て文字または
線であるので、これらの情報からこの分数の高さ、深
さ、幅を計算できる。
Then, typesetting is performed. In this fraction, the numerator term and the denominator term are all composed of characters only.
Therefore, in the numerator term and the denominator term, the typesetting is performed as shown in FIG. 3B, and in the numerator term, the characters "x, +, y" are centered in the y-direction, and the typesetting is performed while being sent rightward. Further, since all the constituent elements (numerator term, denominator term, fraction line) are characters or lines in this fraction, the height, depth and width of this fraction can be calculated from such information.

【0028】例えば分数線の左端を原点とした場合、各
々の構成要素の座標(相対座標)が決定できる。次に図
4(b)の分数を分母項にする分数の組版を図4(c)
を用いて説明する。図4(c)では、分子項は全て文字
であり、分母項は図4(b)で組版した分数である。従
って、各要素の大きさは既に解っているので、通常の分
数組版規則により分数の大きさ、各要素の座標が計算で
きる。
For example, when the origin is at the left end of the fraction line, the coordinates (relative coordinates) of each component can be determined. Next, the setting of the fraction using the fraction of FIG. 4B as the denominator term is shown in FIG.
This will be described with reference to FIG. In FIG. 4C, the numerator terms are all characters, and the denominator terms are fractions formatted in FIG. 4B. Therefore, since the size of each element is already known, the size of the fraction and the coordinates of each element can be calculated by the usual fraction typesetting rule.

【0029】同様に、図4(c)の分数を分母項に持つ
分数の組版の様子を図4(d)に示す。図4(d)まで
で、連分数の各構成要素の大きさと相対座標が算出でき
る。図4(e)では(数5)の組版の様子である。この
式の中で連分数の大きさは、図4(d)で求まってい
る。これより最初の要素「文字:x」の左端中心を原点
として各要素の幅で送りながら並べている。垂直方向に
ついては、各要素の原点(文字要素については中心)を
一致させている。この組版を行うことで、数式の幅、高
さ、深さを求めることができる。そして、最後に「括弧
付」の組版を行う(図4(f))。
Similarly, FIG. 4 (d) shows a typesetting of a fraction having the fraction of FIG. 4 (c) as a denominator term. Up to FIG. 4D, the size and relative coordinates of each component of the continued fraction can be calculated. FIG. 4E shows the typesetting of (Equation 5). The magnitude of the continued fraction in this equation is determined in FIG. From this, the first elements "character: x" are arranged while being sent at the width of each element with the center of the left end as the origin. In the vertical direction, the origin of each element (the center for a character element) is matched. By performing this typesetting, the width, height, and depth of the mathematical expression can be obtained. Finally, the composition with "brackets" is performed (FIG. 4 (f)).

【0030】「括弧付」の構成要素の一つである数式項
は、図4(e)で求まっている。また括弧の横幅は文字
サイズである。従って、ここで算出しなければならない
ものは、括弧の縦方向倍数である。縦方向倍数を求める
ために、数式項の高さと深さを比較し、どちらか大きな
値を選択し、その値に近くなるような倍数を計算する。
その後括弧、数式、括弧の順に並べ、各要素の相対座標
と括弧付全体の幅、高さ、深さを求める。最後に、「括
弧付」の基準位置の絶対座標が決まると、その値を基に
して各要素の絶対座標を決定していく。
A mathematical term which is one of the components of "with brackets" is obtained in FIG. 4 (e). The width of the parentheses is the character size. Therefore, what has to be calculated here is the vertical multiple of the parentheses. To find the vertical multiple, compare the height and depth of the formula term, select the larger value, and calculate the multiple that is closer to that value.
After that, parentheses, formulas, and parentheses are arranged in this order, and the relative coordinates of each element and the width, height, and depth of the entire brackets are obtained. Finally, when the absolute coordinates of the reference position in parentheses are determined, the absolute coordinates of each element are determined based on the values.

【0031】さてこのような手法で行ってきた括弧付の
組版を改善し、上述した3つのモードによって括弧を配
置する要領について説明する。図5は本発明の一実施の
形態における式編集装置の機能ブロック図である。図5
において、501は式を構成する文字列、文字列のレイ
アウトに関する書式情報などを入力する文字入力部であ
り、図1のキーボード103及びマウス106に対応す
る。
Now, a description will be given of how to improve the composition with brackets performed by such a method and arrange the parentheses in the three modes described above. FIG. 5 is a functional block diagram of the formula editing apparatus according to the embodiment of the present invention. FIG.
In FIG. 1, reference numeral 501 denotes a character input unit for inputting a character string constituting an expression, format information on the layout of the character string, and the like, and corresponds to the keyboard 103 and the mouse 106 in FIG.

【0032】また、502は、入力された文字列を記憶
する文字列記憶部、508は、入力された書式情報を記
憶する書式情報記憶部であり、RAM102又は補助記
憶装置105に対応する。Aは、組版制御部503、相
対座標算出部506、絶対座標算出部505、構文解析
部504を有する編集手段であり、編集手段Aは、分数
式に括弧を付けるに際し、括弧優先モード、基準位置優
先モード、サイズ優先モードの3つのモードを持ち、文
字列記憶部502の文字列について書式情報記憶部50
8の書式情報を参照してそのレイアウトを決定するもの
であり、図1におけるCPU101が、RAM102の
プログラムを実行することにより実現される。507
は、編集結果を表示する表示部であり、図1のCRT1
04又はプリンタ107に対応する。
Reference numeral 502 denotes a character string storage unit that stores an input character string, and reference numeral 508 denotes a format information storage unit that stores input format information, and corresponds to the RAM 102 or the auxiliary storage device 105. A is an editing unit having a typesetting control unit 503, a relative coordinate calculation unit 506, an absolute coordinate calculation unit 505, and a syntax analysis unit 504. The editing unit A uses a parenthesis priority mode, a reference position, It has three modes, a priority mode and a size priority mode.
The layout is determined with reference to the format information 8 and is realized by the CPU 101 in FIG. 507
Is a display unit for displaying the editing result.
04 or the printer 107.

【0033】ここで、ユーザより文字の入力が行われる
と、その文字情報は文字入力部501を通して文字列記
憶部502に蓄えられる。文字列記憶部502に蓄えら
れた文字列は、編集手段Aにおける組版制御部503よ
り組版要求が発生したとき取り出され、構文解析部50
4に渡される。
Here, when a character is input by the user, the character information is stored in the character string storage unit 502 through the character input unit 501. The character string stored in the character string storage unit 502 is taken out when a typesetting request is issued from the typesetting control unit 503 in the editing unit A, and the syntax analysis unit 50.
Passed to 4.

【0034】構文解析部504では、数式の各項の親子
関係を把握しやすいように木構造のデータ構造(図6)
へ展開する。図6では、図4で説明した数式のデータ構
造を抽象的に表している。構文解析部504によって木
構造形式に展開された数式は、相対座標算出部506で
各要素の大きさとその親からの相対座標が計算される。
このとき例えば分数線の太さ等の書式情報が書式情報記
憶部508から参照される。
The syntax analysis unit 504 has a tree-structured data structure (FIG. 6) so that the parent-child relationship of each term of the formula can be easily grasped.
Expand to FIG. 6 abstractly shows the data structure of the mathematical expression described in FIG. In the mathematical expression developed by the syntax analysis unit 504 into a tree structure format, the relative coordinate calculation unit 506 calculates the size of each element and the relative coordinates from its parent.
At this time, format information such as the thickness of the fraction line is referred to from the format information storage unit 508.

【0035】本発明では、この書式情報の中に「括弧
付」の揃え規則の項目を用意し、相対座標算出部506
が括弧文字の倍数・相対座標を計算する際に参照し、連
分数のような深さだけが深い数式においてもユーザが希
望する括弧を生成しようというものである。木構造のデ
ータ要素全てについて相対座標が求められると、組版制
御部503は、絶対座標算出部505を呼び出す。相対
座標算出部506は、数式全体の配置する座標と各要素
の持つ相対座標の値から、各々の要素の絶対座標を求め
ていく。全要素の絶対座標が求まると、組版制御部50
3は、表示部507を呼出し、絶対座標の位置に文字、
線等を描画する。
In the present invention, an item of the alignment rule of “with parentheses” is prepared in the format information, and the relative coordinate calculation unit 506 is provided.
Is referred to when calculating a multiple / relative coordinate of a parenthesis character, and generates a parenthesis desired by the user even in a mathematical expression having only a deep depth such as a continued fraction. When the relative coordinates are obtained for all the tree-structured data elements, the typesetting control unit 503 calls the absolute coordinate calculation unit 505. The relative coordinate calculation unit 506 calculates the absolute coordinates of each element from the coordinates of the entire mathematical expression and the value of the relative coordinates of each element. When the absolute coordinates of all elements are obtained, the typesetting control unit 50
3 calls the display unit 507, and displays a character,
Draw lines and so on.

【0036】次に具体的な例として、図4(a)の数式
を、括弧優先モード、サイズ優先モード、基準位置優先
モードで組版した様子を、図7に示している。701は
図4(e)の状態と一致する。701までの組版ステッ
プは前述しているので省略する。この後、ユーザが設定
した書式情報を参照し、括弧優先モードであれば702
の組版を、サイズ優先モードであれば703の組版を、
基準位置優先モードであれば704の組版を行ってい
く。括弧優先モードの場合、数式項の大きさに適する括
弧の倍数は、数式項の高さ、または深さの大きい値を基
準に計算する。702では「深さ>高さ」であるので、
括弧文字の深さが”40”になるように倍数計算する。
つまり括弧の高さ方向倍数は4倍、深さ方向倍数も4倍
となる。
Next, as a specific example, FIG. 7 shows a state in which the formula of FIG. 4A is typeset in parentheses priority mode, size priority mode, and reference position priority mode. Reference numeral 701 corresponds to the state shown in FIG. The typesetting steps up to 701 have been described above and will not be described. Thereafter, the user refers to the format information set by the user, and if the mode is the parentheses priority mode 702
Typesetting, if the size priority mode, 703 typesetting,
If the mode is the reference position priority mode, 704 typesetting is performed. In the parentheses priority mode, the multiple of the parentheses suitable for the size of the formula term is calculated based on the value of the formula term having a large height or depth. In 702, since “depth> height”,
The multiple is calculated so that the depth of the parentheses is "40".
That is, the multiple in the height direction of the parentheses is four times, and the multiple in the depth direction is also four times.

【0037】次に「括弧付」の相対座標を求める。括弧
文字、数式項の基準位置は各々の項の原点であるので、
相対座標y方向は常に値”0”固定である。x方向は括
弧文字のピッチと数式項横幅で計算する。
Next, the relative coordinates of "with parentheses" are obtained. Since the parenthesis character and the reference position of the formula term are the origin of each term,
The value of the relative coordinate y direction is always fixed at “0”. The x direction is calculated based on the pitch of the bracket characters and the width of the formula term.

【0038】最後に「括弧付」全体の高さ、深さ、幅を
計算する。サイズ優先モードでは、括弧の大きさは、数
式項のy方向の大きさに合わせられる。括弧の中心位置
は、数式項の基準位置とは関係なく、数式項のy方向大
きさの中心位置と一致する。703において、括弧文字
の倍数は、数式項の「高さ+深さ」の値で計算する。括
弧文字は基準位置から高さ、深さ均等のバランスの取れ
た文字であるため、高さ方向倍数および深さ方向倍数は
計算された倍数の半分の値となる。
Finally, the height, depth, and width of the whole “with parentheses” are calculated. In the size priority mode, the size of the parentheses is adjusted to the size of the mathematical expression in the y direction. The center position of the parentheses coincides with the center position in the y-direction size of the formula term, regardless of the reference position of the formula term. In 703, the multiple of the parenthesis character is calculated by the value of “height + depth” in the mathematical expression. Since the parenthesis character is a character having a balanced height and depth from the reference position, the multiple in the height direction and the multiple in the depth direction are half the calculated multiple.

【0039】次に、前括弧文字、数式項、後括弧文字の
相対座標を計算する。x方向の相対座標は702と同様
に、括弧文字のピッチ、数式項の幅で送って計算する。
括弧文字のy座標は、(括弧文字高さ方向の大きさ)−
(数式項の高さ)で求める。このため、括弧文字の基準
位置と数式項の基準位置は一致しないが、数式項の大き
さと一致した括弧が付けられる。基準位置優先モードで
は、括弧の高さ方向倍数と深さ方向倍数を別々の値で設
定し、括弧のバランスは崩れるものの基準位置と大きさ
を一致させる方法である。702において括弧の倍数
は、数式項の「高さ」と「深さ」の各々で求める。
Next, the relative coordinates of the opening parenthesis character, the formula term, and the closing parenthesis character are calculated. Similar to 702, the relative coordinates in the x direction are calculated by sending the parenthesized characters at the pitch and the width of the formula term.
The y coordinate of the parenthesis character is (size in the parenthesis character height direction) −
(The height of the formula term). For this reason, the reference position of the parenthesis character does not match the reference position of the formula term, but a parenthesis matching the size of the formula term is attached. In the reference position priority mode, a multiple in the height direction and a multiple in the depth direction of the parentheses are set as different values, and the balance of the parentheses is lost, but the reference position and the size are matched. In 702, the multiple of the parenthesis is obtained by each of “height” and “depth” in the mathematical expression.

【0040】このモードでは、括弧の大きさは数式項の
縦方向の大きさと一致させかつ基準位置も一致させる。
従って、高さ方向倍数と深さ方向の倍数が異なることに
なる。このため従来の方法では文字倍数として1つ用意
していたデータ領域を「高さ方向倍数」「深さ方向倍
数」と拡張している。
In this mode, the size of the parentheses matches the vertical size of the mathematical expression, and also matches the reference position.
Therefore, the multiple in the height direction is different from the multiple in the depth direction. For this reason, the data area prepared as one character multiple in the conventional method is expanded to “multiple in the height direction” and “multiple in the depth direction”.

【0041】図8は本発明の一実施の形態における括弧
付項のデータ構造の説明図であり、項「括弧付」のデー
タ構造を示している。801は従来のデータ構造であ
り、802は基準位置優先モードを行うために拡張した
ものである。括弧文字の倍数が求められると、相対座標
を求める計算を行う。前括弧文字、数式項、後括弧文字
の横方向の座標は、702同様の方法で算出する。縦方
向の座標は、括弧文字の基準位置を数式項の基準位置に
一致しているので値”0”固定させるため0固定とな
る。
FIG. 8 is an explanatory diagram of the data structure of the item with parentheses in one embodiment of the present invention, and shows the data structure of the item with parentheses. Reference numeral 801 denotes a conventional data structure, and reference numeral 802 denotes an extension for performing the reference position priority mode. When a multiple of the parenthesis character is obtained, a calculation for obtaining relative coordinates is performed. The horizontal coordinates of the opening parenthesis character, the formula term, and the closing parenthesis character are calculated in the same manner as in 702. The coordinates in the vertical direction are fixed to 0 in order to fix the value “0” since the reference position of the parenthesis character matches the reference position of the formula term.

【0042】図9および図10は本発明の一実施の形態
における括弧付項を組版するフローチャートであり、次
に図9および図10を用いて3つのモードの「括弧付」
組版を説明する。木構造データ内に「括弧付」項が見つ
かると、その相対座標、大きさを算出するためにこのフ
ローチャートで示した処理が働く。まずステップ901
で、ユーザが書式として設定した括弧付組版モードを取
得する。このモードに従い組版はステップ902、90
8、912で各々の組版処理に分岐する。ステップ90
3からステップ907は括弧優先モード時の組版処理で
ある。
FIGS. 9 and 10 are flowcharts for formatting bracketed items in one embodiment of the present invention. Next, referring to FIGS. 9 and 10, three modes of “bracketed” will be described.
I explain typesetting. When the item "with parentheses" is found in the tree structure data, the processing shown in this flowchart operates to calculate the relative coordinates and size. First, step 901
To obtain the parenthesized composition mode set as a format by the user. According to this mode, typesetting is performed in steps 902 and 90
In steps 8 and 912, the process branches to each typesetting process. Step 90
Steps 3 to 907 are the typesetting processing in the parentheses priority mode.

【0043】ステップ903では、括弧付要素の数式項
について高さと深さを比較する。高さが大きい場合は、
ステップ904で高さ値を基準とした括弧文字の倍数を
算出する。深さが大きい場合は、ステップ905で深さ
値を基準とした倍数を算出する。ステップ906では前
括弧、数式項、後括弧を並べて括弧付項内部での座標
(相対座標)を決定する。
In step 903, the height and the depth are compared for the mathematical term of the parenthesized element. If the height is large,
In step 904, the multiple of the parenthesis character based on the height value is calculated. If the depth is large, a multiple based on the depth value is calculated in step 905. In step 906, the parentheses, formula terms, and parentheses are arranged to determine the coordinates (relative coordinates) inside the bracketed terms.

【0044】またステップ907では、括弧付項自体の
大きさを算出する。ステップ909からステップ911
は、サイズ優先モードでの組版処理である。先ほどの括
弧優先モードと違い、高さと深さの和から括弧文字の倍
数を計算する(ステップ909)。また、ステップ91
0の相対座標算出では、前括弧、後括弧の縦方向座標は
数式項の縦方向大きさの中心位置に置かれる。
In step 907, the size of the bracketed item itself is calculated. Steps 909 to 911
Is a typesetting process in the size priority mode. Unlike the parenthesis priority mode, a multiple of the parenthesis character is calculated from the sum of the height and the depth (step 909). Step 91
In the calculation of the relative coordinates of 0, the vertical coordinates of the parentheses and the rear parentheses are placed at the center position of the vertical size of the mathematical expression.

【0045】ステップ911では、括弧付項の大きさを
計算する。ステップ913からステップ916は基準位
置優先モードの組版である。ここでの組版では、括弧の
基準位置は括弧優先モードと同様数式項の基準位置に置
かれる。但し、基準位置から上方向の大きさ、下方向の
大きさは各々数式項の高さ、深さに合わせられる。この
ためステップ913で、括弧文字の高さ方向の倍数を算
出する。ステップ914では深さ方向の倍数を算出す
る。
In step 911, the size of the bracketed term is calculated. Steps 913 to 916 are for typesetting in the reference position priority mode. In this case, the reference position of the parentheses is set at the reference position of the mathematical expression as in the parenthesis priority mode. However, the size in the upward direction and the size in the downward direction from the reference position are adjusted to the height and the depth of the mathematical expression, respectively. Therefore, in step 913, a multiple in the height direction of the parenthesis character is calculated. In step 914, a multiple in the depth direction is calculated.

【0046】その後、ステップ915で前括弧、数式
項、後括弧の相対座標を計算し、ステップ916で括弧
付項の大きさを計算する。ステップ917はエラー処理
である。書式に設定された値が、括弧優先モード、サイ
ズ優先モード、基準位置優先モード以外であるような場
合はこの処理が実行され、ユーザへ通知する。通常この
処理は実行されない。
Thereafter, in step 915, the relative coordinates of the opening parenthesis, the formula term, and the closing parenthesis are calculated, and in step 916, the size of the term with the parenthesis is calculated. Step 917 is error processing. When the value set in the format is other than the parenthesis priority mode, the size priority mode, and the reference position priority mode, this processing is executed and the user is notified. Normally, this process is not performed.

【0047】[0047]

【発明の効果】本発明では、括弧付組版処理を3種類用
意し、ユーザがモードを切り替えることによって、記述
した数式項に対してユーザの希望通りの括弧を付けるこ
とができる。特に連分数等の高さ方向より深さ方向の大
きさが大きいもの(あるいはその逆)に対してバランス
のよい括弧が記述できる。
According to the present invention, three types of bracketing typesetting processing are prepared, and by switching the mode, the user can attach brackets as desired to the described mathematical expression. In particular, a well-balanced parenthesis can be described for those whose size in the depth direction is larger than the height direction such as a continued fraction (or vice versa).

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

【図1】本発明の一実施の形態における式編集装置のブ
ロック図
FIG. 1 is a block diagram of a formula editing apparatus according to an embodiment of the present invention.

【図2】(a)本発明の一実施の形態における数式構文
解析図 (b)本発明の一実施の形態における数式構文解析図 (c)本発明の一実施の形態における数式構文解析図 (d)本発明の一実施の形態における数式構文解析図
FIG. 2 (a) A mathematical expression syntax analysis diagram according to an embodiment of the present invention (b) A mathematical expression syntax analysis diagram according to an embodiment of the present invention (c) A mathematical expression syntax analysis diagram according to an embodiment of the present invention d) Formula syntax analysis diagram in one embodiment of the present invention

【図3】(a)本発明の一実施の形態における基本的な
数式組版の説明図 (b)本発明の一実施の形態における基本的な数式組版
の説明図 (c)本発明の一実施の形態における基本的な数式組版
の説明図 (d)本発明の一実施の形態における基本的な数式組版
の説明図
FIG. 3A is an explanatory diagram of a basic mathematical typesetting according to an embodiment of the present invention. FIG. 3B is an explanatory diagram of a basic mathematical typesetting according to an embodiment of the present invention. (D) Explanatory diagram of basic mathematical typesetting in one embodiment of the present invention

【図4】(a)本発明の一実施の形態における括弧付連
分数の組版説明図 (b)本発明の一実施の形態における括弧付連分数の組
版説明図 (c)本発明の一実施の形態における括弧付連分数の組
版説明図 (d)本発明の一実施の形態における括弧付連分数の組
版説明図 (e)本発明の一実施の形態における括弧付連分数の組
版説明図 (f)本発明の一実施の形態における括弧付連分数の組
版説明図
FIG. 4A is an explanatory diagram of a typesetting of a continued fraction with parentheses according to an embodiment of the present invention. FIG. 4B is an explanatory diagram of a typesetting of a continued fraction with parentheses according to an embodiment of the present invention. (D) Typesetting explanatory diagram of parenthesized continued fraction in one embodiment of the present invention (e) Typesetting explanatory diagram of parenthesized continued fraction in one embodiment of the present invention (f) The present invention Illustration of composition of bracketed continued fractions in one embodiment

【図5】本発明の一実施の形態における式編集装置の機
能ブロック図
FIG. 5 is a functional block diagram of a formula editing apparatus according to an embodiment of the present invention.

【図6】本発明の一実施の形態における数式データ構造
の説明図
FIG. 6 is an explanatory diagram of a mathematical expression data structure according to an embodiment of the present invention.

【図7】本発明の一実施の形態における3モードの組版
処理の説明図
FIG. 7 is an explanatory diagram of typesetting processing in three modes according to an embodiment of the present invention.

【図8】本発明の一実施の形態における括弧付頁のデー
タ構造の説明図
FIG. 8 is an explanatory diagram of a data structure of a page with parentheses according to the embodiment of the present invention;

【図9】本発明の一実施の形態における括弧付項を組版
するフローチャート
FIG. 9 is a flowchart for formatting a bracketed term according to an embodiment of the present invention;

【図10】本発明の一実施の形態における括弧付項を組
版するフローチャート
FIG. 10 is a flowchart for formatting a bracketed term according to an embodiment of the present invention;

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

501 文字入力部 502 文字列記憶部 507 表示部 508 書式情報記憶部 A 編集手段 501 Character input section 502 Character string storage section 507 Display section 508 Format information storage section A Editing means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】編集結果を表示する表示部と、式を構成す
る文字列と文字列のレイアウトに関する書式情報を入力
する文字入力部と、入力された文字列を記憶する文字列
記憶部と、入力された書式情報を記憶する書式情報記憶
部と、前記書式情報記憶部の書式情報を参照して前記文
字列記憶部の文字列のレイアウトを決定し前記表示部に
表示させる編集手段とを備え、前記編集手段は、分数式
に括弧を付けるに際し、括弧の中心位置と分数線の位置
を一致させ分数式の分母項と分子項のうち大きな方の項
の高さに合わせた括弧を生成する括弧優先モードと、括
弧の基準位置を分数線の位置に一致させ括弧の上半分を
分子項の高さに合わせ括弧の下半分を分母項の高さに合
わせる基準位置優先モードと、分数線の位置とは無関係
に分数全体の高さに合わせた括弧を生成するサイズ優先
モードとを有することを特徴とする式編集装置。
A display unit for displaying an edited result; a character input unit for inputting a character string forming an expression and format information on a layout of the character string; a character string storage unit for storing the input character string; A format information storage unit that stores the input format information; and an editing unit that determines the layout of the character strings in the character string storage unit by referring to the format information in the format information storage unit and displays the layout on the display unit. When the parentheses are attached to the fractional expression, the editing means matches the center position of the parentheses with the position of the fraction line, and generates parentheses that match the height of the larger of the denominator term and the numerator term of the fractional expression. A parenthesis priority mode, a reference position priority mode in which the reference position of the parentheses matches the position of the fraction line, the upper half of the parentheses matches the height of the numerator term, and the lower half of the parentheses matches the height of the denominator term, Total fractional height, independent of position Formula editing apparatus characterized by having a size priority mode for generating the combined parentheses.
JP9173565A 1997-06-30 1997-06-30 Expression editing device Pending JPH1125074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9173565A JPH1125074A (en) 1997-06-30 1997-06-30 Expression editing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9173565A JPH1125074A (en) 1997-06-30 1997-06-30 Expression editing device

Publications (1)

Publication Number Publication Date
JPH1125074A true JPH1125074A (en) 1999-01-29

Family

ID=15962919

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9173565A Pending JPH1125074A (en) 1997-06-30 1997-06-30 Expression editing device

Country Status (1)

Country Link
JP (1) JPH1125074A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008146289A (en) * 2006-12-08 2008-06-26 Casio Comput Co Ltd Fraction input display device and fraction input display program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008146289A (en) * 2006-12-08 2008-06-26 Casio Comput Co Ltd Fraction input display device and fraction input display program

Similar Documents

Publication Publication Date Title
US7320104B2 (en) Text grid creation tools
AU2005201993B2 (en) Aligned behavior in templated lists
JP5209113B2 (en) Hierarchical presentation of tabular data
US7478079B2 (en) Method for displaying a visual representation of mapping between a source schema and a destination schema emphasizing visually adjusts the objects such that they are visually distinguishable from the non-relevant and non-selected objects
PT671037E (en) METHOD AND SYSTEM FOR CREATION SPECIFICATION AND GENERATION PARAMETRIC SOURCES
RU2003116932A (en) PROVISION OF CONTEXT-DEPENDENT TOOLS AND REFERENCE INFORMATION FILLING IN DOCUMENTS CREATED ON A COMPUTER
JP2000155859A (en) Method for preparing mesh for analyzing numerical value and its device
US6985146B2 (en) Composite font editing device and computer program
KR20140021044A (en) Chart element variations
CN108108194B (en) User interface editing method and user interface editor
US20010034596A1 (en) Extensible framework for capturing feature information in a neutral format
US20020055953A1 (en) Method and apparatus for handling scenarios in spreadsheet documents
JP5634374B2 (en) Specification creation support device and program
JPH1125074A (en) Expression editing device
US20060082572A1 (en) Inferring of associative constraints and supporting objects for 3D curves
JP2975890B2 (en) Document layout editing device, document layout editing method, and storage medium
JP3022791B2 (en) Character input simplification device
CN115221841B (en) WEB-based engineering symbol processing method
US20060048126A1 (en) Method and a system thereof for generating a homepage content file capable of dynamically linking with a plurality of on-demand knowledge bases
JP3251125B2 (en) Interactive logic simulation system
JPH06259458A (en) Table preparing device
JP2802646B2 (en) A scaling method for character patterns using vector fonts
JPH09198375A (en) Mathematical expression/chemical formula inputting and editing system
CN117093306A (en) Wafer map processing system based on B/S architecture
JP3036064B2 (en) Document output device