# About Entering Math Characters

When you type a character string in a MathML element, Amaya parses the string and automatically generates the elements mo (operator), mn (number), mi (identifier), and mtext.

For example, to enter the formula `x=2a+b`:

1. If you are not in a mathematical expression, choose Math > New formula (math) from the Types menu.

2. Type this sequence of 6 characters: `x=2a+b`

Use the Structure view to display the following structure generated by Amaya:

`<mi>x</mi><mo>=</mo><mn>2</mn><mi>a</mi><mo>+</mo><mi>b</mi>`

If the result is not exactly what you want, select the characters that were misinterpreted and change their type with one of the commands such as Plain text (`mtext`), Identifier (`mi`), or Number (`mnmo`) from the Math submenu of the Types menu.

## Spacing

Amaya takes care of spacing within math expressions, but in some cases you may need to add some additional space. Move the cursor to the position where you want to insert space and choose Math > Space (mspace) from the Types menu. This creates a default horizontal space. You can then change its width attribute to adjust its size or you can add other attributes (height, depth, linebreak) to change vertical spacing. Refer to the MathML specification for more details.

## Bracket size

When entering brackets as in the following expression:

f ( x ) = 1 x

typing the sequence `f(x)=` would lead to:

f ( x ) = 1 x

Instead, choose Math > Parentheses from the Types menu or select the Parentheses option on the Maths palette to enter the parentheses properly.