Contents Previous Next Index
7 Creating Mathematical Documents
Maple allows you to create powerful documents as business and education tools, technical reports, presentations, assignments, and handouts.
You can:
Copy, cut, and paste information
Format text for reports or course material
Add headers and footers
Insert images, tables, and symbols
Generate 2-D and 3-D plots and animations
Sketch in the document or on a plot
Insert hyperlinks to other Maple files, websites, or email addresses
Place instructions and equations side by side
Bookmark specific areas
Easily update, revise, and distribute your documents
In this chapter, we will create a document that demonstrates many of Maple's documentation features. For further examples, note that this guide was written using Maple.
7.1 In This Chapter
Section
Topics
Document Formatting - Add various text formatting elements
Copy and Paste
Quick Character Formatting
Quick Paragraph Formatting
Character and Paragraph Styles
Sections
Headers and Footers
Show or Hide Worksheet Content
Indentation and the Tab Key
Commands in Documents - Format and display or hide commands in a document
Document Blocks
Typesetting
Auto-Execute
Tables - Create tables and modify their attributes
Creating a table
Cell contents
Navigating table cells
Modifying Structural Layout
Modifying Physical Dimensions
Modifying Appearance
Printing Options
Execution Order
Drawing Canvas - Sketch an idea in the document by inserting a drawing canvas
Insert a Drawing Canvas
Drawing
Drawing Canvas Style
Inserting Images
Hyperlinks and Bookmarks - Add hyperlinks to various sources
Inserting a Hyperlink in the Document
Linking to an Email Address, Dictionary Topic, Help Page, Maplet Application, Webpage, or Document
Bookmarks
Embedded Components - Insert buttons, sliders, and more in your document
Overview of available components
Example using a task template
Spell Checking - Verify text with the Maple spell checking utility
How to Use the Spellcheck Utility
Selecting a Suggestion
User Dictionary
7.2 Document Formatting
To begin, create a new Maple document. From the File menu, select New → Document Mode. For this example, you can copy and paste text from any file. The example text below is from a Maple help page, plot, but the formatting has been removed for demonstration purposes.
You can cut, copy, and paste content within Maple documents, and from other sources.
To copy an expression, or part of an expression, to another location on the document:
Select the expression, or part of the expression, to copy. Alternatively, right-click and select Copy.
From the Edit menu, select Copy.
Place the cursor at the insertion point.
From the Edit menu, select Paste. Alternatively, right-click and select Paste.
Result:
If you paste into a math input region, Maple interprets all the pasted content as input. If you paste into a text region, Maple interprets all the pasted content as text. However, note that 2-D Math retains its format in both input and text regions.
When you copy and paste to another application, in general, Maple retains the original structure.
The Format→Character menu provides access to the following quick formatting features: Bold, Italic, Underline, Superscript, Subscript, Font Color, and Highlight Color.
To modify text:
In the document, select the text to modify.
From the Format menu, select Character, and then the appropriate feature. Alternatively, select Format→Character from the context panel.
Select the quick formatting feature you want to apply (for example, bold or italic font).
Alternatively, use the context bar icons. For example, to apply a color to the parameters "f, x=x0..x1":
Font Color Context Bar Icon
Highlight Color Context Icon
For font and highlight colors, you can select from Swatches, a color wheel, RGB values, or choose a color using the eye dropper tool. See Figure 7.1.
Figure 7.1: Select Color Dialog
In this example, choose a dark purple color, as in the help pages.
To format this text as bold, click the Bold toolbar icon, . Also, select the text "Calling Sequence" and format as bold.
Attributes Submenu: Setting Fonts, Character Size, and Attributes
You can also change various character attributes such as font, character size, style, and color in one dialog.
In the document, select text to modify.
From the Format menu, select Character, and then Attributes. The Character Style dialog opens. See Figure 7.2.
Figure 7.2: Character Style Dialog
The Format→Paragraph menu provides access to the following quick alignment features: Align Left, Center, and Align Right.
To modify a paragraph:
In the document, select the paragraph to modify.
From the Format menu, select Paragraph, and then the appropriate feature.
Attributes Submenu: Spacing, Indent, Alignment, Bullets, Line Break, and Page Break
You can change various paragraph attributes in one dialog.
From the Format menu, select Paragraph, and then Attributes. The Paragraph Style dialog opens. See Figure 7.3.
When changing spacing, you must indicate units (inches, centimeters, or points) in the Units drop-down list.
Figure 7.3: Paragraph Style Dialog
For example, in the pasted text, select all of the items under "Parameters", then open the Paragraph Style dialog. Notice that the spacing has already been set.
In the Indent section, change the Left Margin indent to 10.0 pt.
In the Bullets and Numbering section, click the Style drop-down and select Dash. Click OK to close the dialog and apply the styles.
For more information, refer to the paragraphmenu help page.
Maple has predefined styles for characters and paragraphs. A style is a set of formatting characteristics that you can apply to text in your document to change the appearance of that text. When you apply a style, you apply a group of formats in one action.
A character style controls text font, size, color, and attributes such as bold and italic. To override the character style within a paragraph style, you must apply a character style or character formatting.
A paragraph style controls all aspects of a paragraph's appearance, such as text alignment, line spacing, and indentation. In Maple, each paragraph style includes a character style.
Figure 7.4: Style Management Dialog
Applying Character Styles
By using the drop-down list in the document context bar, you can apply:
Existing Maple character styles.
New styles that you have created through the Style Management (Figure 7.4) and Character Style (Figure 7.5) dialogs.
To apply a character style to text in your document:
Select the text to modify.
In the styles drop-down list in the context bar of your document, select an appropriate character style. All character styles are preceded by the letter C. The selected text now reflects the attributes of the character style you have chosen.
(Optional) If necessary, you can remove this style. From the Edit menu, select Undo.
Creating and Modifying Character Styles
You can create custom character styles to apply to text, or change existing character styles. New styles are automatically added to the styles drop-down list in the context bar of your document.
From the Format menu, select Styles. The Style Management dialog opens. See Figure 7.4.
To create a character style:
Click Create Character Style. The Character Style dialog opens. See Figure 7.5.
In the first row of the dialog, enter a style name in the blank text region.
To modify a character style:
From the style list, select the character style to modify. Recall that all character styles are preceded by the letter C, while paragraph styles are preceded by the letter P.
Click Modify. The Character Style dialog opens with the current attributes displayed. See Figure 7.5.
For either action, continue:
Select the properties for the new character style, such as font, size, attributes, and color. In the font attributes, the Superscript and Subscript check boxes are mutually exclusive. When you select one of the two check boxes, the other is disabled. You must clear one before selecting the other.
Note: A preview of the style is displayed in the last row of the Character Style dialog.
To save the style, click OK or to abandon, click Cancel. If you have modified a style, all text in your document that uses the altered style is updated to reflect the changes.
Figure 7.5: Defining a Character Style
For example, in the pasted text, suppose we want to create a character style for the bold, purple parameter.
From the Format menu, select Styles, then click Create Character Style.
Enter the style name, "Placeholder", and then select the character attributes. In this case, click the Bold check box. Then click the Color button and choose a dark purple. Click OK to create the character style.
Now you can apply the style to any text. Under Calling Sequences, select each list of parameters inside the command. To apply the style, from the Styles drop-down menu in the toolbar, select Parameter.
Applying Paragraph Styles
Existing Maple paragraph styles.
New styles that you have created through the Style Management (Figure 7.4) and Defining a Paragraph Style (Figure 7.6) dialogs.
To apply a Maple paragraph style to text in your document:
In the styles drop-down list in the context bar of your document, select an appropriate paragraph style. All Maple paragraph styles are preceded by the letter P. The selected text now reflects the attributes of the paragraph style you have chosen.
For example, to format the title of the pasted text as a title, first select the line: "plot - create a two-dimensional plot". In the Styles drop-down, select Title.
Creating and Modifying Paragraph Styles
You can create custom paragraph styles to apply to text, or change existing paragraph styles. New styles are automatically added to the styles drop-down list in the context bar of your document.
To create a paragraph style:
Click Create Paragraph Style. The Paragraph Style dialog opens. See Figure 7.6.
In the first row of the dialog, enter a style name in the blank text field.
To modify a paragraph style:
Select a paragraph style to modify. Recall that all paragraph styles are preceded by the letter P.
Click Modify. The Paragraph Style dialog opens with the current attributes displayed.
In the Units drop-down menu, select the units used to determine spacing and indentation. Select from inches (in), centimeters (cm), or points (pt).
Select the properties to use for this paragraph style, such as Spacing, Indent, Alignment, Bullets and Numbering, Page Break Before, and Linebreak.
To add or modify a font style, click Font. The Character Style dialog opens. For detailed instructions, see Creating and Modifying Character Styles.
To save the style, click OK, or to abandon, click Cancel. If you are modifying an existing style, all text in your document that uses the altered style is updated to reflect the changes.
Figure 7.6: Defining a Paragraph Style
Style Set Management: Saving Styles for Future Use
You can use the style set of a particular document as the default style for all documents.
Figure 7.7: Style Set Management Dialog
For information on creating and managing style sets, see the worksheet/documenting/styles help page.
You can organize your document into sections, either before or after the text has been entered.
Using the Insert Menu to Add Sections
Place the cursor in the paragraph or execution group above the location at which you want to insert a new section.
If the cursor is inside a section, Maple inserts the new section after the current section.
If the cursor is in an execution group, Maple inserts the new section after the execution group.
From the Insert menu, select Section. An arrow marks the start of the section.
Move the cursor to the text area beside the arrow. Enter the section heading.
Move the cursor to the body of the section. Enter the content.
Tips for Adding Sections and Subsections
If you are in a section and select Insert→Section, a subsection is created.
To insert a subsection immediately after the current subsection, use Edit→Split or Join→Split Section. The newly created section is at the same indentation level as the existing section.
To outdent, use Edit→Remove Section. This decreases the indentation of a worksheet element by one level by removing one subsection that encloses the worksheet element.
Using the Indent and Outdent Toolbar Icons
You can shift sections to create or remove subsections.
Enclose the selection in a section or subsection
Outdent the selection to the next section level, if possible.
For example, to create two sections containing the two categories of information in the pasted text:
Select "Parameters" and all of the items under it.
Click the Indent toolbar item.
Cut and paste "Parameters" from inside the section to its title.
Similarly, create a section with the title "Calling Sequence", containing the items under that heading.
Note: The section titles are automatically formatted as section titles, but you can change the formatting through the Paragraph Style dialog.
You can add headers and footers to your document that will appear at the top and bottom of each page when you print the document.
To add or edit headers and footers:
From the Insert menu, select Header Footer. The Header Footer dialog appears. See Figure 7.8.
Figure 7.8: Header and Footer Dialog - Custom Header
The available elements include the current date, page number, number of pages, an image, the filename, or any plain text. These elements can be placed in the left or right corner or the center of the page.
You can choose one of the predefined header or footer styles in the Predefined Header and Footer tab, or create your own by clicking the Custom Header or Custom Footer tab.
For more information on header and footer options, refer to the headerfooter help page.
You can hide document elements of a specific type so that they are not visible. This does not delete them, but hides them from view. Hidden elements are not printed or exported, but they can be copied and pasted.
In a document, use the Show Contents dialog to hide all spreadsheets, input, output, or graphics, plus markers for section boundaries, execution group boundaries, hidden table borders on mouse pointer roll over, and annotations. The dialog is accessed from the View→Show/Hide Contents menu.
Using the Show Contents Dialog
A check mark beside the item indicates that all document elements of that type are displayed for the current document. See Figure 7.9.
Figure 7.9: Show Contents Dialog
From the View menu, select Show/Hide Contents. The Show Contents dialog opens with all items selected for display.
Clear the check box associated with the document components or markers to hide them.
Note: By clearing the Input check box, Maple Input (1-D Math) and 2-D Math input are hidden. However, this will not hide Text input in Document mode. Clearing the Graphics check box ensures that a plot, an image, or the Canvas inserted in the document by using the Insert menu option is also hidden.
Command Output Versus Inserted Content
Output is considered an element that results from executing a command. Inserted components are not considered output.
Consider the following examples.
The plot resulting from executing the plot(sin) command is considered output.
To show a plot from the plot(sin) command, select both the Output and Graphics check boxes in the Show Contents dialog.
Inserted images and the Canvas are not considered output. As such, they are not hidden if you clear the Output check box.
To hide an inserted image or canvas, clear the Graphics check box in the Show Contents dialog.
The Tab key has a few different uses:
Indentation
Navigation through a document or between table cells
Navigation between placeholders within a math expression
Control the behavior of the Tab key using the Tab Navigation feature in the Format menu. For more information, refer to the tabkey help page.
7.3 Commands in Documents
With document blocks, you can create documents that present text and math in formats similar to those found in business and education documents.
In a document block, an input prompt or execution group is not displayed.
By hiding Maple input such that only text and results are visible, you create a document with better presentation flow. Before using document blocks, it is recommended that you display Markers. A vertical bar is displayed along the left pane of the document. Icons representing document blocks are displayed in this vertical bar next to associated content.
To activate Markers:
From the View menu, select Markers.
For further details on document blocks, see Document Blocks in Chapter 1.
Working with Document Blocks
In document mode, each time you press Enter, a new document block appears. Documents consist of a series of document blocks.
Create a new document block after the last section of the pasted example, either by pressing Enter, or by selecting, from the Edit→Document Blocks menu, Create Document Block.
Enter text and an expression to evaluate. For example, enter "Plot the expression sinx and its derivative, ⅆⅆ x sinx". For detailed instructions on entering this phrase, see Example 6 - Enter Text and 2-D Math in the Same Line Using Toolbar Icons in Chapter 1.
Select the expression to display the context panel.
From the context panel, click Evaluate and Display Inline. The expression is evaluated.
Check that the input mode is Text, then enter the rest of the sentence: ", in the same plot." See Figure 7.10.
Before
After
Figure 7.10: Working with Document Blocks
Inline Document Output
Document blocks can display content inline, that is, text, input, and output in one line as presented in business and education documents.
To display content inline:
Place the cursor in the document block.
From the Edit→Document Blocks menu, select Inline Document Output.
View Document Code
To view the contents, that is, all code and expanded execution groups within a document block, you must expand the document block.
Place the cursor in the document block region.
From the Edit→Document Blocks menu, select Show Command.
To hide code again, clear the check box beside Show Command.
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 at the left called a group boundary.
As document blocks can contain many execution groups, you can select to expand an execution group within a document block.
Place the cursor near the end of the document block region.
From the Edit→Document Blocks menu, select Show Execution Group.
To hide the group, clear the check box beside Show Execution Group.
Switch between Input and Output
From the Edit→Document Blocks menu, select Toggle Input/Output Display.
Input from any executable math or commands is displayed in one instance, or only output is displayed.
You can control typesetting and 2-D Math equation parsing options in the Standard Worksheet interface. Extended typesetting uses a customizable set of rules for displaying expressions.
The rule-based typesetting functionality is available when the Typesetting level is set to Extended (the default). You can set the typesetting level under Tools→Options→Display tab). This parsing functionality applies to 2-D Math editing (Math mode) and output.
For example, you can change the display of derivatives to suit the content and audience of your document.
ⅆⅆxfx
f′⁡x
Tools→Options→Display tab: Typesetting level = Extended.
ⅆⅆx⁢f⁡x
Tools→Options→Display tab: Typesetting level = Maple Standard.
To specify rules, use the Typesetting Rule Assistant.
From the View menu, select Typesetting Rules. The Typesetting Rule Assistant dialog opens.
For more information, see the Typesetting, TypesettingRuleAssist, and OptionsDialogDisplay help pages.
The Autoexecute feature allows you to designate regions of a document for automatic execution. These regions are executed when the document opens or when the restart command is executed. This is useful when sharing documents. Important commands can be executed as soon as the user opens your document. The user is not required to execute all commands.
Setting the Auto-Execute Feature
Select the region to be automatically executed when the document opens.
From the Evaluate menu, select Set Selection to Autoexecute.
Regions set to Autoexecute are denoted by exclamation mark symbols in the Markers region (View → Markers), .
For example, to display a plot in your document without saving the plot, making your document use less memory, you can set a plot command to autoexecute.
After the plot instruction, enter a Maple prompt (Insert → Execution Group → After Cursor).
Enter the plot command: plotsinx,∫sinx ⅆx and press Enter to execute.
Select the plot, then select Evaluate → Remove Output from Selection.
Place the cursor in the plot command, then select Evaluate → Set Selection to Autoexecute.
Save and close the document; on reopening, the command is re-executed.
Removing the Auto-Execute Setting
To remove the setting in a region:
Select the region.
From the Evaluate menu, select Clear Selection from Autoexecute.
To remove all autoexecuted regions from a document:
From the Evaluate menu, select Clear All Autoexecute.
Repeating Auto-Execution
To execute all marked groups:
From the Evaluate menu, select Repeat Autoexecute.
Security Levels
By default, Maple prompts the user before automatically executing the document.
To set security levels for the autoexecute feature, use the Security tab in the Options dialog. For details, refer to the OptionsDialogSecurity help page.
7.4 Tables
Tables allow you to organize content in a document.
Creating a Table
To create a table:
From the Insert menu, select Table.
Specify the number of rows and columns in the table creation dialog.
Click OK.
The default properties for the table include visible borders and auto-adjustment to 100% of the document width. These options, as well as the table dimensions, can be modified after table creation.
Create a table with 4 rows and 2 columns at the end of your document. In document mode, the input mode is set to Math by default; in worksheet mode, the default is Text mode.
Cell Contents
Any content that can be placed into a document can also be placed into a table cell, including other sections and tables. Table cells can contain a mix of:
Input commands
2-D Math
Embedded components: buttons, sliders, check boxes, and more
Plots
Images
Enter a heading in both columns of the first row, in 2-D Math. You can use any text formatting features within each cell; for example, bold and center the headings.
fx
Navigating Table Cells
Use the Tab key to move to the next cell. Ensure that Format → Tab Navigation is selected.
Tab Navigation selected
Allows you to move between cells using the Tab key.
Tab Navigation not selected
Allows you to indent in the table using the Tab key.
Tab between the cells of the table and enter the following expressions in the first column. For each function, from the context panel, select Differentiate → With respect to → x. Cut and paste the resulting expression into the second column.
11+11+1x
−11+11+1x2⁢1+1x2⁢x2
sin⁡ω⁢x⁢ⅇ−5 x
cos⁡ω⁢x⁢ω⁢ⅇ−5⁢x−5⁢sin⁡ω⁢x⁢ⅇ−5 x
ⅆ2⁢ⅆx2⁢sin2x
−8⁢sin⁡x⁢cos⁡x
Modifying the Structural Layout of a Table
The number of rows and columns in a table are modified using the Insert and Delete submenus in the Table menu or by using the Cut and Copy/Paste tools. The Table menu is found under the Format menu. The same table menu options are available in the Context Panel when the cursor resides in a table.
Inserting Rows and Columns
Row and column insertion is relative to the table cell that currently contains the cursor. If the document has an active selection, insertion is relative to the selection boundaries.
Column insertion can be to the left or right of the document position marker or selection.
Row insertion can be above or below the marker or selection.
In your table, add a third column on the right to display the plots of these expressions. Add the heading, and insert a blank plot region in each cell below it, by selecting Insert → Plot → 2-D (or 3-D for the second expression). Then Ctrl-drag (Control-drag for Macintosh) each expression in the row into its plot region to display it. For details on this procedure, see Plots and Animations.
Resize the plots and table as desired.
Plot of fx and ⅆⅆxfx
⁢cosω x ω ⅇ−5⁢x−5⁢sinω⁢x⁢ⅇ−5⁢x
Deleting Rows and Columns
With deleting operations using the Delete key, the Delete Table Contents dialog opens allowing you to specify the desired behavior. For example, you can delete the selected rows, or delete the contents of the selected cells. See Figure 7.11.
Figure 7.11: Delete Table Contents Verification Dialog
Pasting
Pasting a table subselection into a table may result in the creation of additional rows or columns, overwriting existing cell content, or the insertion of a subtable within the active table cell. When there is a choice, the Table Paste Mode dialog opens, allowing you to choose. See Figure 7.12.
Figure 7.12: Table Paste Mode Selection Dialog
Merging Cells
To merge adjacent cells in a table, select the cells you would like to merge. From the Table menu, select Merge Cells. You can merge cells across row or column borders. See Figure 7.13. The resulting cell must be rectangular. The contents of the individual cells in the merge operation are concatenated in execution order. See Figure 7.14. For details on cell execution order, see Execution Order Dependency.
a+b
c+d
Figure 7.13: Two Cells
Figure 7.14: Merged Cells
Modifying the Physical Dimensions of a Table
The overall width of the table can be controlled in several ways.
The most direct way is to press the left mouse button (press mouse button, for Macintosh) while hovering over the left or right table boundary and dragging the mouse left or right. Upon release of the mouse button, the table boundary is updated. This approach can also be used to resize the relative width of table columns.
Alternatively, the size of the table can be controlled from the Table Properties dialog. The Table Properties dialog is found in the Context Panel or through the Format menu under Table and then Properties. Two sizing modes are supported.
Fixed percentage of page width. Using this option, the table width adjusts whenever the width of the document changes. This option is useful for ensuring that the entire content of the table fits in the screen or printed page.
Scale with zoom factor. This option is used to preserve the size and layout of the table regardless of the size of the document window or the zoom factor. If the table exceeds the width of the document window, the horizontal scroll bar can be used to view the rightmost columns. Note: Using this option, tables may be incomplete when printed.
Modifying the Appearance of a Table
Table Borders
The style of exterior and interior borders is set using the Table Properties dialog.
You can set all, none, or only some of the borders to be visible in a table. Exterior borders are controlled separately.
You can control the visibility of interior borders by using the Group submenu of the Table menu; grouping rows or columns suppresses interior borders, provided that the interior border style is set by row and column group.
For example, group the columns together, and group rows 2 to 4 together. Then in the Table Properties dialog, select Exterior Borders: Top and bottom, and Interior Borders: By row and column group.
Hidden borders are visible when the mouse hovers over a table. Note: You can hide the visibility of lines on mouse pointer roll over by using the View→Show/Hide Contents dialog, and clearing the Hidden Table Borders check box. This setting applies to all tables in the worksheet. You can also set controls for an individual table from the Table Properties→Show hidden borders option. Using this option, borders can be hidden in a table even if they are set to visible on roll over in the Show/Hide Contents dialog.
Alignment Options
The table alignment tools control the horizontal alignment of columns and vertical alignment of rows.
For column alignment, the current selection is expanded to encompass all rows in the selected columns. The alignment choice applies to all cells within the expanded selection. If the document does not contain a selection, the cursor position is used to identify the column.
Similarly, the selection is expanded to include all columns in the selected rows for vertical alignment options. The following table illustrates the vertical alignment options. The baseline option is useful for aligning equations across multiple cells within a row of a table.
For example, set the Row alignment to Baseline for all rows, and set the Column alignment to Center for all columns.
Cell Color
You can set the background color of any cell or collection of cells to be any color. This coloring is independent of any highlighting or text color that may also be applied.
To change the color of a cell, place the cursor in the cell, then from the Table menu, select Cell Color.... In the Select A Color dialog, choose a color from the swatches, the color wheel, or RGB. See the DrawingTools help page for details on color selection.
For example, select the first row of the table and apply a light blue color. This sets the header off from the content below.
Controlling the Visibility of Cell Content
The Table Properties dialog includes two options to control the visibility of cell content. These options allow control over the visibility of Maple input and execution group boundaries. Thus, these elements can be hidden in a table even if they are set to visible for the document in the View→Show/Hide Contents dialog.
The Table Properties dialog contains options to control the placement of page breaks when printing. You can fit a table on a single page, allow page breaks between rows, or allow page breaks within a row.
Execution Order Dependency
The order in which cells are executed is set in the Table Properties dialog. The following tables illustrate the effect of execution order.
Row-wise execution order
x:=1;
x:=1
x:=x+1;
x:=2
x:=3
x:=4
Column-wise execution order
Editable Tables
Tables can be marked as editable or non-editable. The editable property for tables is independent of the document editability, though if a document is marked as non-editable, tables cannot be edited. After a table has been marked as non-editable, any content stored in the table cannot be modified. It is not possible to add any new content such as embedded components or to run computations in execution groups or document blocks. Existing interactive embedded components inside of a table will continue to work.
A table can be marked as editable or non-editable in its Table Properties using either the DocumentTools:-SetProperty command or the Context Panel. To make a table editable or non-editable using the Context Panel, in the Table properties, select or clear the Editable check box
Additional Examples
For more practice creating and manipulating tables, try creating the following tables at the end of your document.
Table of Values
This example illustrates how to set the visibility options for cell contents to display a table of values.
y≔t→12t2:
Create a table with 2 rows and 7 columns. Enter the values as below, and then select all table cells. In the Table → Alignment menu, select Columns, and then Center.
t seconds
0
1
2
3
4
5
6
yt meters
y0
y1
12
y2
y3
92
y4
8
y5
252
y6
18
Table settings:
In the Table Properties dialog:
Set Table Size Mode to Scale with zoom factor.
Hide Maple input and execution group boundaries: Clear the Show input and Show execution group boundaries check boxes.
y(0);
y(1);
y(2);
y(3);
y(4);
y(5);
y(6);
Formatting Table Headers
The following table uses cell merging for formatting row and column headers, and row and column grouping to control the visibility of cell boundaries.
By default, invisible cell boundaries are visible on mouse pointer roll over. You can hide the visibility of lines on mouse pointer roll over by using the View→Show/Hide Contents dialog, and clearing the Hidden Table Borders check box.
Parameter 2
Low
High
Parameter 1
13
24
29
Insert a table with 4 rows and 4 columns and enter the information shown above.
Using the Table menu:
Merge the following sets of (Row,Column) cells: (R1,C1) to (R2,C2), (R1,C3) to (R1,C4), and (R3,C1) to (R4,C1).
Group columns 1 and 2, and columns 3 and 4.
Group rows 1 and 2, and rows 3 and 4.
In the Properties dialog:
Set Exterior Borders to None.
(Optional) Change Table Size Mode size option to Scale with zoom factor.
Set Alignment of columns 3 and 4 to Center.
2-D Math and Plots
The following example illustrates the use of tables to display 2-D Math and plots side by side.
Approximating exp(-x) as a rational polynomial using a 3rd order Padé approximation.
ⅇ−x≈1−12x+110x2−1120x31+12x+110x2+1120x3
Insert a table with 1 row and 2 columns. Enter the information in text and executable 2-D Math to create the calculation and plot, as shown.
Table Settings:
Set Exterior and Interior Borders to None.
Change row Alignment to Center.
7.5 Drawing Canvas
Using the drawing tools, you can sketch an idea in a canvas, draw on plots, and draw on images. See Figure 7.15. For details about the drawing feature, refer to the DrawingTools help page.
Figure 7.15: Drawing Tools and Canvas
To insert a drawing canvas:
Place the cursor where the drawing canvas is to be inserted.
From the Insert menu, select Drawing. A canvas with grid lines appears in the document at the insertion point. The Drawing icon is available and associated context bar icons are displayed.
The tools include the following: selection tool, pencil (free style drawing), eraser, text insert, straight line, rectangle, rounded rectangle, oval, diamond, alignment, drawing outline, drawing fill, drawing linestyle, and drawing canvas properties.
To draw with the pencil tool in the drawing canvas:
From the Drawing icons, select the pencil icon.
Click and drag your mouse in the canvas to draw lines. Release the mouse to complete the drawing.
To adjust the color of drawing tools:
From the Drawing icons, select the Drawing Outline icon. See Figure 7.16.
Select one of the color swatches available or select the color wheel, RGB ranges, or eye dropper icon at the bottom of the dialog and customize the color to your preference.
After selecting a new color, draw on the canvas using the pencil icon and notice the new color.
Figure 7.16: Drawing Outline Color Icon
In your document, there are three plots, two of which are 2-D plots that can be drawn on. All of the information in the table you made in the previous section could be drawn onto the plot, putting the information in a more concise layout.
Consider one of the plots from the table:
Click on the plot, and notice that the Plot toolbar is open. However, the Drawing toolbar is also available. Click on Drawing to see the toolbar.
Select the Text icon, , and click on the plot. Enter the expression fx in one text area, and its derivative in another, as shown. You can move the text areas around on the plot so that they indicate the correct lines.
For details on the rest of the drawing features, refer to the DrawingTools help page.
You can alter the Drawing in the following ways:
Add a grid of horizontal and/or vertical lines. By default, the canvas opens with a grid of horizontal and vertical lines.
Change the grid line color.
Change the spacing between grid lines.
Change the background color.
These options can be changed in the Drawing Properties Canvas Icon. See Figure 7.17.
Figure 7.17: Drawing Properties Canvas Icon - Change the Gridline Color
You can insert images in these file formats into your document.
Graphics Interchange Format - gif
Joint Photographic Experts Group - jpe, jpeg, jpg
Portable Network Graphics - png
Bitmap Graphics - bmp
Tagged Image File Format - tif, tiff, jfx
Portable aNyMap - pnm
Kodak FlashPix - fpx
To insert an image into the document at the cursor location:
From the Insert menu, select Image. The Load Image dialog opens.
Specify a path or folder name.
Select a filename.
Click Open. The image is displayed in the document.
If the source file is altered, the embedded image does not change because the original object is pasted into the document.
To resize an inserted image:
Click the image. Resizing anchors appear at the sides and corners of the image.
Move the mouse over the resize anchor. Resizing arrows appear.
Click and drag the image to the desired size.
Note: To constrain the proportions of the image as it is resized, press and hold the Shift key as you drag.
You can also draw on images in the same way as the drawing canvas.
ImageTools Package
You can manipulate image data using the ImageTools package. This package is a collection of utilities for reading and writing common image file formats, and for performing basic image processing operations within Maple.
Within Maple, images are represented as dense, rectangular Arrays of 64-bit hardware floating-point numbers. Grayscale images are 2-D, whereas color images are 3-D (the third dimension representing the color channels).
In addition to the commands in the ImageTools package, many ordinary Array and Matrix operations are useful for image processing.
For details about this feature, refer to the ImageTools help page.
7.6 Hyperlinks
Use a hyperlink in your document to access any of the following.
Webpage (URL)
Email
Worksheet
Help Topic
Task
Dictionary Topic
Maplet
Figure 7.18: Hyperlink Properties Dialog
Inserting a Hyperlink in a Document
To create a hyperlink from existing text in the document:
Highlight the text that you want to make a hyperlink.
From the Insert menu, select Hyperlink. Alternatively, from the Context Panel for the highlighted text, select Convert To→Hyperlink.
In the Hyperlink Properties dialog box, the Link Text field is dimmed since the text region you highlighted is used as the link text. This is demonstrated in Figure 7.18. The highlighted text region, Diff is dimmed.
Specify the hyperlink Type and Target as described in the appropriate following section.
To insert a text or image hyperlink into the document:
From the Insert menu, select Hyperlink.
In the Hyperlink Properties dialog box, enter the Link Text.
Optionally, use an image as the link. Select the Image check box and click Choose Image for the file. In .mw files, the image appears as the link. You can resize the image as necessary. Click and drag from the corners of the image to resize.
Linking to a Webpage
To link to a webpage:
In the Type drop-down list, select URL.
In the Target field, enter the full URL, for example, http://www.maplesoft.com.
Linking to an Email Address
To link to an email address:
In the Type drop-down list, select Email.
In the Target field, enter the email address.
Linking to a Worksheet
To link to a Maple worksheet or document:
In the Type drop-down list, select Worksheet.
In the Target field, enter the path and filename of the document or click Browse to locate the file. (Optional) In the Bookmark drop-down list, enter or select a bookmark.
Note: To link within a single Maple document, leave the Target field blank and choose the bookmark from the Bookmark drop-down list.
Tip: When linking to another document, the default is to use a relative path. When sharing documents that contain hyperlinks, ensure that target documents are in the same directory, or use a ZIP file to preserve the directory structure if you are sharing a large collection of interlinking documents..
Linking to a Help Page
To link to a help page:
In the Type drop-down list, select Help Topic.
In the Target field, enter the topic of the help page. (Optional) In the Bookmark drop-down list, enter or select a bookmark.
Linking to a Task
To link to a task:
In the Type drop-down list, select Task.
In the Target field, enter the topic name of the task template (see the status bar at the bottom of the Task Browser window).
Linking to a Dictionary Topic
To link to a Dictionary topic:
In the Type drop-down list, select Dictionary Topic.
In the Target field, enter a topic name. Dictionary topics begin with the prefix Definition/, for example, Definition/dimension.
Linking to a Maplet Application
To link to a Maplet application:
In the Type drop-down list, select Maplet.
In the Target field, enter the local path to a file with the .maplet extension. Optionally, click Browse to locate the file.
If the Maplet application exists, clicking the link launches the Maplet application. If the Maplet application contains syntax errors, then error messages are displayed in a popup window.
When sharing documents that contain links to Maplet applications, ensure that target Maplet applications are in the same directory, or use a ZIP file to preserve the directory structure if you are sharing a large collection.
Note: To link to a Maplet application available on a MapleNet™ webpage, use the URL hyperlink type to link to the webpage. For information on MapleNet, see Embedded Components and Maplets.
Linking to a Workbook Attachment
Similar to attaching to a worksheet, you can link to workbook content by directly entering the workbook file URI, or by browsing to the target workbook file.
If you want to enter the URI directly into Target field, you should copy the URI first.
To copy the URI of the content you want to link to:
In the Workbook Navigator palette, right-click on the file you want to link to.
From the context menu, select Copy Path.
The URI of the target file is now copied to the clipboard.
To link to a workbook attachment:
Select Workbook Attachment from the Type drop-down list.
In the Target field, enter the URI of the worksheet, obtained in the above instructions, or click Browse to locate the workbook file.
Linking to a Workbook File
You can link to a workbook file (instead of an attachment inside the workbook) using the hyperlink properties dialog.
Select Worksheet from the Type drop-down list.
In the Target field, enter the path and filename of the workbook (.maple) file or click Browse to locate the file.
Example
For this example, link the text "horizontal range" to the dictionary page for domain. As indicated in the section for Linking to a Dictionary Topic, select Dictionary Topic in the Type drop-down list, and then enter Definition/domain in the Target field.
Links to dictionary topics appear underlined and in red.
Use a bookmark to designate a location in an active document. This bookmark can then be accessed from other regions in your document or by using hyperlinks in other documents.
To display bookmark formatting icons, activate the Marker feature.
Figure 7.19: Bookmark Indicator
Note: You can display bookmark properties by holding the pointer over a bookmark indicator. See Figure 7.19.
Inserting, Renaming, and Deleting a Bookmark
To insert a bookmark:
Place the cursor at the location at which to place the bookmark. For example, place the cursor in the Parameters section title.
From the Format menu, select Bookmarks. The Bookmark dialog opens, listing existing bookmarks in the document.
Click New. The Create Bookmark dialog opens. See Figure 7.20. Enter a bookmark name, "parameters", and click Create.
Figure 7.20: Create Bookmark Dialog
The new bookmark appears in the Bookmark dialog list. Click OK.
Note: You can also rename and delete bookmarks using the Bookmark dialog.
Alternatively, right-click on a particular bookmark to rename or delete it.
Go to a Bookmark
You can automatically move the cursor to the location of the bookmark in the active document.
From the Edit menu, select Go To Bookmark. The Go To Bookmark dialog opens with the current bookmarks listed.
Select the bookmark "parameters" and click OK. The cursor moves to the bookmark, at the beginning of the Parameters section.
For more information, refer to the bookmarks help page.
7.7 Embedded Components
You can embed simple graphical interface components, such as a button, in your document. These components can then be associated with actions that are to be executed. For example, the value of a slider component can be assigned to a document variable, or a text field can be used to input an equation.
Adding Graphical Interface Components
The graphical interface components can be inserted by using the Components palette (Figure 7.21) or by cutting/copying and pasting existing components to another area of the document. Although copied components have most of the same characteristics, they are distinct.
By default, palettes are displayed when you launch Maple. If palettes are not visible, use the following procedure:
From the View menu, select Palettes.
Select Expand Dock.
If the Components palette is not displayed, right-click (Control-click, for Macintosh) the palette dock. From the context menu, select Show Palette, and then Components.
For more information, see Palettes.
You can embed the following items:
Button, Toggle Button
Combo Box, Check Box, List Box, Radio Button
Text Area, Label
Slider, Plot, Mathematical Expression
Dial, Meter, Rotary Gauge, Volume Gauge
Data Table
Video Player
Shortcut Component
Figure 7.21: Components Palette
Task Template with Embedded Components
In your document, you can add components that have already been configured to work together, by using a task template. Here, we use the Interactive Application template. For details on how to create and modify components, see Creating Embedded Components.
To insert the task template, from the Tools menu, select Tasks → Browse. In the table of contents, expand Document Templates, and select Interactive Application. Click Insert Minimal Content. The following is inserted into your document.
Title
author
Explanatory text, describing the application
use the Dials to set parameters
use the Plot and Math Components to display the results
parameter1
parameter2
use the Gauge component to display the result
parameter2/parameter1
Plot of
Figure 7.22: Interactive Application Task Template
This configuration of components plots a linear function with slope and y-intercept given respectively by the two dials parameter2 and parameter1, and displays the function parameter2parameter1on a gauge. For details on how these components work together, see Embedded Components and Maplets.
7.8 Spell Checking
The Spellcheck utility examines all designated text regions of your document for potential spelling mistakes, including regions that are in collapsed sections. It does not check input, output, text in execution groups, or math in text regions. See Figure 7.23.
Note: The Spellcheck utility uses American spelling.
Figure 7.23: Spellcheck Dialog
From the Tools menu, select Spellcheck. Alternatively, press F7. The Spellcheck dialog appears. It automatically begins checking the document for potential spelling mistakes.
If the Spellcheck utility finds a word that it does not recognize, that word is displayed in the Not Found text box.
You have six choices:
To ignore the word, click Ignore.
To ignore all instances of the word, click Ignore All.
To change the word, that is, accept the suggested spelling that is in the Change To text box, click Change.
To change all instances of the word, that is, accept the suggested spelling to replace all instances of the word, click Change All.
To add the word to your dictionary, click Add. For details, see the following User Dictionary section.
To close the Spellcheck dialog and stop the spelling check, click Cancel.
When the Spellcheck is complete, a dialog containing the message "The spelling check is complete" appears. Click OK to close this dialog.
Note: when using the Spellcheck utility, you can fix spelling errors in the dialog, but you cannot change the text in document. The Spellcheck utility does not check grammar.
To select one of the suggestions as the correct spelling, click the appropriate word from the list in the Suggestions text box.
If none of the suggestions are correct, highlight the word in the Change To text box and enter the correct spelling. Click Change to accept this new spelling.
You can create and maintain a custom dictionary that works with the Maple Spellcheck utility.
Properties of the Custom Dictionary File
It must be a text file, that is, have the file extension .txt. For example, mydictionary.txt.
It is a list of words, one word per line.
It is case sensitive. This means that integer and Integer require individual entries in the dictionary file.
It does not require manual maintenance. You build your dictionary file by using the Add functionality of the Spellcheck. However, you can manually edit the file.
To specify a custom dictionary to be used with the Maple Spellcheck utility:
Create a .txt file in a directory/folder of your choice.
In Maple, open the Options dialog, Tools → Options, and select the General tab.
In the User Dictionary field, enter the path and name of the .txt file you created, or click Browse to select the location and filename.
To ignore Maple words that are command and function names, clear the Use Maple words in spellchecker check box.
Click Apply to Session or Apply Globally to save the settings, or Cancel to discard.
Adding a Word to Your Dictionary
When running the spellcheck, if the word in the Not Found text box is correct, you can add the word to your dictionary.
Click the Add button. If this is the first time you are adding a word, the Select User Dictionary dialog opens.
Enter or select the custom dictionary (.txt file) you created. See User Dictionary.
Click Select. The word is automatically added to your custom dictionary file.
Note: Specifications in the Options dialog determine whether this word is recognized in your next Maple session. If you set your custom dictionary and clicked Apply to Session, then this word will not be recognized in a new Maple session. If you set your custom dictionary and clicked Apply Globally, then this new word will be recognized.
Download Help Document