Document Blocks - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Using Document Blocks

  

With the Document Block feature, you can create Maple worksheets or documents that present text and math in formats similar to those found in business and education documents. If your main purpose is to create a document, you can use Document Mode, which is a Maple worksheet comprised of document blocks.

  

With document blocks, note the following:

• 

Input prompts and execution groups are not displayed.

• 

(Optional) Before using document blocks, set your worksheet to display Markers. Icons representing document blocks are displayed in a vertical bar left of the associated text.

  

To activate markers:

• 

From the View menu, select Markers.

  

You can also create document blocks within Worksheet mode.

 

Inline Text, Math, and Computations

Executing 2-D Math in Document Blocks

Step-by-Step Evaluation

Insert New Document Block

Copy Command

View Document Block Code

Expand an Execution Group within a Document Block

Switch between 2-D Math Input and Output

Applying Document Blocks in Worksheet Mode

Inline Text, Math, and Computations

A document block is designed to let you create content that includes text and mathematics in one line.

• 

Toggle Math/Text entry mode by using F5.  For more about switching between text and math, see Select Entry Mode.

• 

Evaluate a math expression and display the result inline by using Alt + Enter (Alt + Return, for Mac).  For other ways to execute math in document blocks, see Executing 2-D Math in Document Blocks below.

• 

Use the context panel to perform context-sensitive operations. For details, see Context Panel Overview and Self-Documenting Context-Sensitive Operations.

Executing 2-D Math in Document Blocks

  

In document blocks, to execute all 2-D math input, use any of the following methods:

• 

Press Alt + Enter (Alt + Return, for Mac). This evaluates and displays results inline.

• 

Use the Evaluate menu item Evaluate and Display Inline. (This can also be invoked through the Context Panel.)

• 

Use the Evaluate menu item Evaluate.

• 

Press Enter (Return, for Mac). This evaluates and displays results on the next line or, if set in the Options dialog, simply evaluates.

  

The dual behavior of the Enter key (Evaluate menu item) is set in the Display tab of the Options dialog. See Options>Display.

Step-by-Step Evaluation

  

When you press Enter to evaluate an input, the cursor moves to the next math input. Thus, you can easily step through your document, evaluating each math input.

Insert New Document Block

  

When you want to insert white space in your document, insert new document blocks.

  

To insert a document block below the cursor location:

• 

From the Edit menu, select Document Blocks > Create Document Block.  Alternatively, from the toolbar, click Create Document Block ( ).

  

To insert a document block above the cursor location:

1. 

Move the cursor to the left (Home) position in a document block.  The cursor is now bold, as illustrated here:

2. 

Press Enter.  The in-focus prompt moves down and a new document block is created.

  

You can control this feature in the Interface tab of the Options dialog.  See Options>Interface.

Copy Command

After performing an operation from the context panel, you can copy the underlying command.

  

To copy the command:

1. 

Place the cursor on the arrow for the context-sensitive operation.

2. 

Right-click (Control-click, Mac) and select Copy Command from the menu.

3. 

On a new line, paste the command.

View Document Block Code

  

To view the contents, that is, to expand the document block to see its code and expanded execution groups:

1. 

Place the cursor in the document block region.

2. 

From the Edit menu, select Document Blocks.

3. 

Select Show Command.

4. 

To hide code again, clear the check box beside Show Command.

  

Note: Document blocks will always try to display something; output will be displayed if available. If there is no output, then input will be displayed.

Expand an Execution Group within a Document Block

  

An execution group is a grouping of Maple input with its corresponding Maple output. It is distinguished by a large square bracket called a group range at the left. As document blocks can contain many execution groups, you can select to expand one execution group within a document block.

1. 

Place the cursor in the document block region.

2. 

From the Edit > Document Blocks menu, select Show Execution Group.

3. 

To hide the group, clear the check box beside Show Execution Group.

Switch between 2-D Math Input and Output

  

You can control the display of a 2-D math input/output pair.  For example, you can show only the output from a 2-D math input.

1. 

Place the cursor in a 2-D math input or output section in a document block region.

2. 

From the Edit > Document Blocks menu, select Toggle Input/Output Display.

Applying Document Blocks in Worksheet Mode

  

General Process

1. 

Enter input at the Maple command prompt.

  

Note: These instructions are for Worksheet mode.

2. 

Execute the area, creating output that may be referenced elsewhere in the document. See Equation Labels.

3. 

Intersperse the area with the content that is to remain visible, adding references to the input and output in the appropriate locations.

4. 

Select the area (text and math content) you want to format.

5. 

From the Edit > Document Blocks menu, select Create Document Block.

6. 

Select Edit > Document Blocks > Inline Document Output.

  

The block displays text and 2-D math output only. You can select areas to display 2-D math input instead of output.

7. 

Select the output region you want to display as input. Select Edit > Document Blocks > Toggle Input/Output Display. The selected region displays input.

See Also

2-D Math

Context Panel Overview

Document Mode

Documents and Worksheets

Equation Labels

Options>Display

Options>Interface

Self-Documenting Context-Sensitive Operations