Template Editor Example

When creating complex equations text, it is sometimes necessary to create one or more templates to create the equation. Once the templates are created, they can be inserted into the text box. Templates can be embedded within other templates. The following example contains two templates, the square root template and the division template.

Example 1 - Square Root Template

This example creates a square root template to be used in the second example.

  1.  Open the Text Editor by creating new text or by editing existing text. You can use the Property Manager to edit existing text.

  2. Click the button in the Text Editor to open the Template Library dialog.

  3. Click the New button in the Template Library dialog.

  4. In the Symbol Properties dialog, choose the square root symbol for the main symbol, and then click the OK button. The square root symbol is number 182 near the bottom of the Symbol typeface.

  5. Click Add String in the Create/Edit Template dialog and a pound symbol appears.

  6. Set the Horizontal String Alignment to Left so the top line will grow with the text entered into the box.

  7. Use the arrow buttons on the left and top sides of the dialog to position the string to the right of the square root sign.

  8. Click the Add Line button.

  9. The button (extending right) should be selected in the Line Alignment group box.

  10. Use the arrow buttons to position the line above the string and to the upper right side of the square root sign.

  11. Click the Test button to view the final template.

  12. Click the OK button to add the template to the template library. Leave the Template Library dialog open for the next example.

 

Example 2 - Division Template

This example uses the square root template created in the first example.

  1. Click the New button in the Template Library dialog.

  2. In the Symbol Properties dialog, choose the empty symbol for the main symbol, then click the OK button. The empty symbol is number zero in the Symbol typeface.

  3. Click Add Line in the Create/Edit Template dialog.

  4. The button (extending right) should be selected in the Line Alignment group box.

  5. Click Add String.

  6. Use the arrow buttons at the left and top side of the dialog to position the string above the line, and to the right of the line symbol.

  7. Click Add String again.

  8. Use the arrow buttons at the left and top side of the dialog to position the string below and to the right of the line symbol.

  9. Click the Test button to view the final template in the Test Template dialog.

  10. Click the Close button to close the Test Template dialog. Click OK to close the Create/Edit Template dialog and add the template to the template library.

  11. Click the Close button to close the Template Library and return to the Text Editor. After clicking the Close button, the following dialog appears:

 


Grapher
gives you the option to
save template library changes.

  1. Click the Yes button if you want to keep the new templates that you have created. Click the No button if you want to delete the new templates.

Using Multiple Templates

Once the templates have been created, they can be inserted into the Text Editor. Templates can be inserted into other templates. To create the dividing/square root equation:

  1. In the Text Editor, click the button to open the Template Library.

  2. Click the new square root template in the Template Library, and then click the Insert button. The square root symbol appears in the Text Editor.

  3. Click inside the text box underneath the square root sign.

  4. Click the button again.

  5. Click the new division template in the Template Library, and then click the Insert button. The division template is inserted under the square root sign.

  6. Click in the numerator box and type the letter X.

  7. Click in the denominator box and type the number 2.

After the text is entered into the templates, the substrings (added lines or added symbols) can be moved around. For example, the top line on the square root symbol may not quite touch the square root. Select the line by clicking just to the left of the line where the pound sign (#) would be in the Create/Edit Template dialog. Use the Sub Position boxes in the Text Editor to move the line around.

See Also

Create/Edit Template

Text Editor