Using Macros

Top  Previous  Next

Macros let you enter a complex expression by writing a simple string.

 

A macro has a name and a value:

 

The name is at least two alphanumeric characters, including Greek characters
The value is any expression or subexpression

 

When you enter the name in an empty area of the display and recognize it, the value of the macro appears.

 

Let's step through the process of creating, listing and using a very simple macro.

 

To define a macro

 

Suppose you want the expression "a - b" to appear whenever you write "mc".

 

1.First enter the value for the macro, by entering and recognizing the expression "a - b".
2.In a separate region, write and recognize the name for the macro "mc" in this case.
3.Select the first expression by circling "a - b". When we define the macro, the value will be the selected part of the current region.

 

Here's what it looks like:

macro1

 

Now choose "Define macro" from the Grammar menu. A popup will prompt you to select the name of the macro do this by circling "mc" in the second region. You have now added a macro to the system.

 

To view defined macros

 

Choose the Grammar menu again, and pick the "List macros..." item. A dialog appears showing all your defined macros:

macro2

 

You can tap a macro to select it and then tap the Delete button to delete it. Tap the Close button when you are done with the Macros dialog.

 

To use a macro

 

Enter your macro name in an empty area of the display and press the Enter button or use the enter gesture to recognize it. Instead of seeing the name in text form, MoboMath replaces it with the value of the macro.

 

You can use the macro value in other editing operations. Don't forget to delete the macro when you're done experimenting with it.