Infty Editor – A Mathematics Typesetting Tool witha Handwriting Interface and a Graphical Front-End
to OpenXM Servers
Mitsushi Fujimoto
Department of Information Education
Fukuoka University of Education∗
Toshihiro Kanahori
Research Center on Educational Media
Tsukuba College of Technology†

1

Masakazu Suzuki
Faculty of Mathematics
Kyushu University‡

Introduction

Infty Editor is a editor with on-line recognition of handwritten mathematical expressions, which wasdeveloped by our research group ([2]). In this handwriting interface, as soon as a character is written,
it is rewritten by neat strokes in an appropriate position and size automatically. In the interior of Infty
Editor it is used the XML format as the data format of the written mathematical expressions. Infty
Editor also supports the inputs and outputs of LATEX and MathML format.
OpenXM(Open message eXchange protocol for Mathematics) is a communication protocol for various
computer algebra systems. At present, the mathematical softwares that support OpenXM are Asir,
Mathematica, gnuplot, kan/sm1, phc, TiGERS and Macaulay2. It is efficient to combine existing usefulsystems than to build all functions on one system. Most of computer algebra systems have original
programming languages. Those are not compatible each other, however, using OpenXM one can accessvarious systems by one language. Further, OpenXM provides parallel and distributed computation sincetarget systems can play as servers and clients.
We added OpenXM translator and communication controller to Infty Editor, so that one can executecalculations for mathematical expressions inputted by handwriting using OpenXM servers. In this paper,
we describe the detail of the implementation, and introduce new functions of our system.

∗fujimoto@fukuoka-edu.ac.jp†kanahori@k.tsukuba-tech.ac.jp‡suzuki@math.kyushu-u.ac.jp

1

2

A Handwriting Interface

Users of Infty Editor can input mathematical expressions by handwriting using a mouse or a tablet
in the following window (Figure 1). We call this window Infty Handwriting Input Pad. As soon as acharacter is written, it is recognized and rewritten by neat strokes in an appropriate size and position
automatically. By this rewriting, users can identify each recognition error immediately when it occurs,
and can correct it easily. Pushing the button ‘Execute’, the expression is analyzed, and the result ispasted on the editing area in Infty Editor.

Figure 1: Infty Handwriting Input Pad

This automated rewriting method improves the accuracy of the structure analysis of the written
mathematical expressions. The detail of the algorithms for character recognition is described in [3].

3Infty XML Format Samples

Here, we introduce the XML format for mathematical expressions in Infty Editor. First sample is apolynomial x3 − y 2 .
<MathBlock><MathUnit italic="1">x<MathLink type="RSUP"><MathUnit>3</MathUnit></MathLink></MathUnit><MathUnit>&minus;</MathUnit><MathUnit italic="1">y<MathLink type="RSUP"><MathUnit>2</MathUnit></MathLink></MathUnit>
2

</MathBlock>
The top tag is MATHBLOCK. x3 is enclosed by a tag MATHUNIT, The exponent 3 is also enclosed by MATHUNIT
and a tag MATHLINK with a type RSUP. The entity &minus; which means ‘−’ is also enclosed by MATHUNIT.
5
Second sample is a fraction .
x<MathBlock><MathUnit>&frac;<MathLink type="UPPER"><MathUnit>5</MathUnit></MathLink><MathLink type="UNDER"><MathUnit italic="1">x</MathUnit></MathLink></MathUnit></MathBlock>
The entity &frac; which means a fraction is enclosed by MATHUNIT. The numerator is expressed byMATHLINK with a type UPPER. The denominator is by MATHLINK with LOWER.
As the above examples show, the Infty XML format has not semantic structures of mathematicalexpressions. It is only for printing and previewing.

4Communication with Computer Algebra Systems

The previous version (Ver.1) of Infty Editor could communicate with Mathematica using MathLink([5]). In the current version (Ver.2), we planned to build the environment to use various computer algebra
systems including Mathematica from Infty Editor.
However, the following differences make it difficult: (1) Each of computer algebra systems has own
user interface. (2) Notations of mathematical expressions are different. (3) They use different function
names, command names and user languages. (4) Some of them have communication function, and theothers have not.
Thus, we needed infrastructure for mathematical software systems. Then, we adopted OpenXM.
OpenXM is the specification which defined the communication protocol and the communication modelin order to absorb the difference among various computer algebra systems ([4]).
Advantages of OpenXM are the following: (i) New system can be constructed by assembling different
OpenXM servers. (ii) Functions can be added using a language on a favorite system. (iii) Distributed
computations and competitive computations are possible. (iv) Since shutdowns of OpenXM servers
release memories, the increase of memory can be controlled. (v) The development of a system can be
distributed.
The URL of the OpenXM official web page is http://www.openxm.org/. It is provided not only thespecification of communication protocol for OpenXM but also packages of mathematical software systems
supporting OpenXM. Further, the head branch of sources is available from the anonymous CVS server.
However, the sources distributed are for UNIX platforms.

35Implementation of Communication Function

First, we prepared the binaries of OpenXM servers for Windows platform. Target systems are Mathematica, Asir, phc, gnuplot. The sources of these wrappers or patches provided by OpenXM project are forUNIX platforms. Therefore, we used Cygwin (see http://cygwin.com/), which is a UNIX environment
including GNU C compiler and runtime DLLs for Windows, in order to creating their Windows binaries. The main OpenXM server for Infty Editor is Asir. Other OpenXM servers are called through Asir.
The communication function of Infty Editor is provided as Windows Dynamic Link Libraries (DLL). It
consists of Infty–Asir translator, OpenXM communication controller and a dialog box, which is used inorder to execute calculations and to obtain the results.
Figure 2 expresses computing processes. The left side is for Infty Editor. The right side is for OpenXM
servers. The inputted data is converted to the Asir string. It is transmitted to Asir by OpenXM protocol.
Asir computes it (using other OpenXM servers if required), and converts the computation result to theInfty XML format. It is transmitted to Infty Editor and outputted in the dialog box. User pastes it onEditor.

Asir

Input
(XML)

Stringfor Asir

ConvertOpenXM

Mathematica

ComputeConvert

Outputon Editor

OutputOpenXM
on Dialog

PastePHCgnuplot

XMLfor Infty
AsirInfty Editor

OX servers

Figure 2: Computing Processes

The software environment required is as follows:
OSWindows 2000 or Windows XPEditor
CygwinOX launcher
OpenXM server
X serverInftyED2.exe
cygwin1.dll, etc
ox.exeAsir(ox asir), Mathematica(ox math), etc
XFree86

At present, since gnuplot called from Infty Editor is for X-window, X server is required when users executegnuplot or ox plot.

4

6

Available Functions
Currently available computation functions are as follows:• Evaluate (Asir)• Summation (Asir)• Expand (Asir)• Factorize (Asir)• Differentiate (Asir)• Integrate (Mathematica)• Solve– Equation (Mathematica)– System of Equations (phc)• Plot– Explicit function (gnuplot)– Implicit function (ox plot)
After choosing a mathematical notation, users can send it to OpenXM servers by choosing a computing
command from the calculation menu in the dialog box (Figure 3).

Figure 3: Calculate Menu

Then, the result is displayed within the dialog box (Figure 4). The pastes of calculation results into
Infty Editor are performed from the paste menu in the dialog box. There are three paste mode. Firstmode is the paste with the equal symbol ‘=’ (With ‘=’ Mode). Second is with line feed (With LF Mode).
5Figure 4: OpenXM Dialog Box

Another one is the paste of calculation results only (Normal Mode). Furthermore, users can choose auto
paste mode by a maximize/minimize button.
Figure 5 is a screen shot of Infty Editor.

Figure 5: Screen Shot

7

Support of Asir User Language
Asir user language is a programming language just like C language. Type declarations of variables

are unnecessary, and lists are available for data objects.
On Infty Editor, users can define new functions by using Asir user language, and use them. Thefollowing is an example of a function which calculates the sum from 1 to N by Asir user language.

6

def sum(N){R=0;for(I=1;I<=N;I++)
R=R+I;
return R;}
What is needed in order to define the new function ‘sum’ is to choose ‘Asir language’ from the calculation
menu of the dialog box.
It is also possible to send Asir commands directly. There are two methods for sending Asir commands.
One is the method choosing ‘Asir string’ from the calculation menu of the dialog box. In this case, users
get the plain strings which Asir returns (Figure 6).

Figure 6: Execution of Asir String

Another one is the method inputting Asir commands in the small window (Asir String Box). In thiscase, the calculation result is converted to the Infty XML format as much as possible (Figure 7).

Figure 7: Asir String Box7

8Conclusion and Further WorkWe linked Infty Editor, which has a handwriting interface, to various computer algebra systems using
OpenXM. Three paste modes for computation results were also prepared in consideration of various scenes
creating documents. Further, we supported a programming by Asir user languages. As a consequence,
users don’t have to learn complex commands and operations in cases of inputting and computing formathematical expressions. Moreover, if users have knowledges of the first step about C language, they
can do a programming for other computer algebra systems, for example Mathematica, through Asir fromInfty Editor.
First author is also a member of the committer team of OpenXM, and it can be said that Infty
Editor is a graphical front-end to OpenXM servers. Advantages of Infty Editor to other systems arewith a handwriting interface, linking functions to various computer algebra systems, and a programming
function.
The following are raised as further works: (1) Preparing Windows binaries of ox plot and gnuplot
which does not need a X server. (2) Addition of target softwares – MuPad, Maple, Gap, etc. (3)Optimization for Tablet PC. (4) Implementation for Linux and PDA. (5) Adopting standard common
command names for mathematical operations proposed by [1].

9

How to get Infty Editor

Finally, we shall explain how to get Infty Editor. Infty Editor is a shareware, and one can downloadfrom http://www.caisystem.co.jp/infty/eng/. Additional DLLs for computing functions describedin this paper are distributed by http://www.fukuoka-edu.ac.jp/~fujimoto/files/.

References[1] OpenMath Project, http://www.openmath.org/[2] Infty Project, http://infty.math.kyushu-u.ac.jp/[3] Kanahori, T., Tabata, K., Cong, W., Tamari, F., Suzuki, M.: On-Line Recognition of Mathematical
Expressions Using Automatic Rewriting Method, Advances in Multimodal Interfaces – ICMI2000,
pp. 394–401, Springer LNCS 1948, 2000.
[4] Maekawa, M., Noro, M., Ohara, K., Tamura, K.: The Design and Implementation of OpenXM-RFC
100 and 101, Computer Mathematics, Proceedings of the Fifth Asian Symposium (ASCM 2001),
pp. 102–111, World Scientific, 2001.
[5] Okamura, H., Kanahori, T., Cong, W., Fukuda, R., Tamari, F., Suzuki, M.: A Handwriting Interface for Computer Algebra Systems, Proceedings of the Fourth Asian Technology Conference onMathematics, pp. 291–300, ATCM, Inc., 1999.

8