Using MathFlow templates

Continuing with the equation in the previous section, x plus y equals 9, delete y and move the cursor into position as if you were going to replace it with something else. Select Scripts from the Insert menu, and then click Superscript. You can also select the superscript template from the Layout Templates button (the first one on the toolbar).

Insert a superscript template.

After you have inserted the superscript template, your cursor will flash inside the template box where the base expression should appear. This time enter "x" instead of "z".

After typing the base and before typing the superscript, the cursor is at the right edge of the base slot.

Now press the right arrow key a few times. Notice how the cursor and the faint gray box change to show your position, first within the superscript template, and then within the whole equation.

As you move around in an equation, the MathML Ancestry to the right of the Style pane tells what kind of template the cursor is in, and what its "ancestor" templates are. The format of the message is

… <grandparent> : <parent> : <cursor>

For example, if you position the cursor at the beginning of the equation, the cursor is on x and the display will be

<math> : <mrow> : <mi>

What this means is x is within an <mi> element which is in an <mrow> element which is, in turn, inside a <math> element. The <math> element is always the last element in the ancestor hierarchy and all other tags must stay inside of it.

Next, fill in the superscript template blank, which is a black-outlined square just above and to the right of the x you typed in. You can use the mouse or the arrow keys to move to the template blank, or from anywhere in the equation you can use Tab to jump straight to the next open template position. Fill out the template so your equation becomes x plus x squared equals 9.