Scripting the techexplorer Hypermedia Browser

Input mathematics with the expression editor


The feature described is only available in the Professional Edition of techexplorer.

The expression editor is a Java applet for editing mathematical expressions that exemplifies the use of the techexplorer Java interface to the Document Object Model (DOM) API. With the expression editor you can use the keyboard and mouse to create and edit mathematical structures that have been created either for the purpose of displaying mathematics in a document or performing a scientific computation.

The design of the expression editor is distinguished by three interrelated subcomponents:

  1. it is based on a hierarchy of mathematical objects that relates to either or both the graphical rendering of the mathematics on the printed page, and the interpretation of the formulas by a computational system;
  2. it provides for WYSIWYG (``what-you-see-is-what-you-get'') editing of mathematics by use of a single visual cue: a highlighted subexpression; and,
  3. it correlates these mathematical objects and single visual cue with keyboard actions for purposes of insertion, deletion, and navigation.

In what follows we introduce the basic use of the expression editor by examining how to create a basic expression, use the arrow keys, insert and delete mathematical expressions, undo and redo, and and matrix edit commands. We conclude with recommendations for the use of the expression editor.

Once you are ready start editing equations!

Creating a Basic Expression

First here is how you create an expression from scratch. The expression editor first presents you with an empty box. You fill this box with the first character that you type from the keyboard. As you type in new characters, the highlight moves to the right.

wpe3.jpg (37822 bytes)

The expression editor has a single visual clue, a highlighted current expression. Here is a summary of basic principles:

Arrow Keys

As is customary with text editors, the arrow keys move you in the direction indicated by the arrow. Left and right arrow move you systematically across the characters of the math expression. Up and down move from superscript to subscript, numerator to denominator, and so on. Adding the CTRL key, lets you navigate the math expression as a tree structure.

wpe5.jpg (29064 bytes)

Insertion and Deletion

Undo and Redo

The expression editor provides an infinite undo and redo facility.

The example below illustrates the use of DELETE, UNDO, and REDO to edit the last expression produced above.

wpe5.jpg (29064 bytes)

Matrices

The matrix example below illustrates many of the above points.

wpe5.jpg (29064 bytes)

Recomended techexplorer settings


Click here to to view the previous section. Click here to to view the next section.

IBM techexplorer Hypermedia Browser is a trademark of the IBM Corporation. Send comments and questions to techexpl@us.ibm.com.