DragMath Documentation - Creating simple expressions

## Creating simple expressions

DragMath is based on the idea of templates for each operator or function. You can insert a template, which will consist of the traditional notation and layout for that particular operator/function and also blank boxes. The number of boxes depending upon the number of arguments the operator/function takes.

For example, inserting addition would look like this:

Any text from the keyboard can then be entered into the boxes, by clicking on it to select it, and then typing in the desired data.

To insert a template from the toolbar, there are two main ways:

Point and Click
Clicking on the object in the toolbar and then clicking onto the workspace area.
Drag and Drop
Dragging an object from the toolbar onto the workspace area.

If an operator is inserted anywhere on the workspace area it will be appended to the end of the current expression. To build up expressions of varying content, you need to insert the Mathematical objects into particular areas of the expression. They can be inserted in the following ways:

Onto a text box
Inserting an object onto a text box will insert the object at the position of the text box, and use the text box as an argument. If it is an operator the box will form the left argument, if it is a function it will form its only argument.

For example, inserting Sine onto a box of addition would look like this:

Before:

After:

Onto the notation of another template
By inserting onto any notation related to a particular template, for example a ‘+’, ‘√’ or a bracket, then the same effect happens as when inserting onto a box. The whole math object that is associated with that notation is treated as a box. So inserting the Sine function onto the symbol ‘+’, would take the whole operator template (including its arguments), and make them the argument of the Sine function.

Before:

After: