The Maple interface

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

The native file format in Maple is called a worksheet. When you first launch Maple, a new worksheet that shows a command prompt (>) enclosed in an execution group appears. Each execution group is indicated by a square bracket on the left of the worksheet and contains a group of input commands that are to be evaluated as a group. To get a new execution group with a command prompt, choose Insert → Execution Group → After Cursor.

Doing calculations

To do a calculation, you type a command followed by a semicolon after the command prompt, and then press Enter to evaluate the input. The result of the calculation is returned as output immediately below the input. A typical Maple command consists of a Maple function name followed by one or more arguments for the function enclosed in parentheses. All function names start with a lowercase letter. Here is an example of a Maple command:

int(sin(x), x=0..Pi);

Here, int and sin are Maple functions that represent the integration and the sine function, respectively. Pressing Enter causes Maple to evaluate the command, and the resulting output is printed just below the input. The following figure shows an example of Maple input and output in a worksheet.

Maple interface showing a worksheet, toolbars, and palettes

Figure: The Maple interface showing a worksheet, toolbars, and palettes.

Entering mathematical notation

You can enter input for evaluation in two forms:

  • Maple input: consists of plain-text commands written in a Maple-specific syntax.
  • Standard mathematical notation: simulates the two-dimensional layout of traditional mathematical notation.

To enter input in Maple syntax, choose Insert → Maple Input. When you are in Maple input mode, any text you type appears directly in the worksheet after the command prompt.

The following figure shows an example of Maple input in an execution group, with the corresponding output displayed below it.

Worksheet showing result of evaluating command in Maple input

Figure: A worksheet that shows the result of evaluating a command in Maple input.

You can toggle between Maple input and standard mathematical notation by clicking the x button in the toolbar at the top of the application window. For example, you can use this button to convert the Maple input of the figure above into standard mathematical notation, shown in the following figure.

Same input shown in standard mathematical notation

Figure: The same input as in the figure above shown in standard mathematical notation instead of Maple input.

To directly enter executable input in standard mathematical notation, choose Insert → Standard Math Input. When you are in this mode, a question mark (?) appears in the input area, and a text editing window appears at the top of the screen. Any text you type first appears in this editing window. If you then press Enter, the text in the editing window is copied into the worksheet at the position of the ? sign.

The next figure shows the Insert menu, which contains commands for entering text, standard mathematical notation, and Maple input and standard mathematical input.

Maple Insert menu showing different types of input formats

Figure: The Maple Insert menu, which shows the different types of input formats.

You can then construct the mathematical notation you want using the templates from the Expression palette as building blocks. The Expression palette contains buttons for entering most of the standard types of mathematical notation, such as subscripts, superscripts, fractions, square roots, or integrals. There are also separate palettes for entering vectors, matrices, and symbols such as Greek characters.

If you press any of the buttons on the Expression palette, a template for the corresponding notation appears in the worksheet, with the different parts of the template indicated by ? signs. You can move between the different ? positions by pressing Tab.

Entering text and inline equations

You can intersperse text with the input and output by creating text areas. To enter text, choose Insert → Text or click the T button in the toolbar. Any text you type then appears in a text region of the worksheet. You can format paragraphs in a specific style (such as that of a heading, subheading, or normal text) by choosing one of the predefined styles from the Format → Style menu. By combining text in specific styles with execution groups that contain input-output pairs, you can create nicely formatted technical documents.

You can include mathematical notation in a text cell in the form of inline equations (see the following figure). To do this in a text region, choose Insert → Standard Math or click in the tool bar. This inserts a ? sign at the position of the cursor. You can type in the notation in the text box at the top of the document and then press Enter for the corresponding notation to be inserted into the text cell to replace the ? sign.

Maple: Entering inline equation in text region using Expression palette

Figure: Entering an inline equation in a text region using the Expression palette.


<< back next >>





Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America