Creating Tasks - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Getting Started : Menus : Document Menu Bar : Tools Menu : Help Database : worksheet/help/creatingtasks

Creating Tasks

This help page describes how to write tasks in the Maple worksheet and add them to a help database file.

To create tasks, complete the following four steps.

1. 

Author the content.

2. 

Mark placeholders and content that is not inserted.

3. 

Save the task to a help database.

4. 

Distribute the help database file.

 

Author the Content

(Optional) Mark Placeholders and Content that is Not Inserted

Save the Task to a Help Database

Distribute the Help Database File

Author the Content

Create a new worksheet for performing the task. You can include 2-D Math, graphics, and any other worksheet content.

  

Important: All instances of variables names must have a leading and trailing double underscore, for example, __x__. To enter a double underscore, enter _\_ (underscore backslash underscore). The double underscore does not appear in output in your worksheet, and does not appear in input or output in the Help System view of your task. This marker will cause users of the task to be warned if the variable has already been assigned within their worksheet. In this case, users will have an opportunity to rename the task variables.

  

Note: Do not include a double underscore around Maple option names, to prevent users from renaming these option names. It is recommended that you use unevaluation quotes ('') around any Maple option names. For example, the following is incorrect: Student[Calculus1][NewtonQuotient](__x__^2,__h__= 0.1);. Instead, use this statement: Student[Calculus1][NewtonQuotient](__x__^2, 'h'=0.1);.

  

It is recommended that you enclose the task content in a section with an appropriate title. Also, it is recommended that you provide an overview of the purpose of the task.

(Optional) Mark Placeholders and Content that is Not Inserted

Placeholders are parameters, which are meant to be replaced by the user after the task has been inserted into a worksheet.  They typically include expressions, variables, and options.  The text or math will appear in purple, rather than the default black font.

To mark content as a placeholder:

1. 

Select the parameter, for example sin(__x__).

2. 

From the Format menu, select Task Authoring, and then Mark as Placeholder.

  

 

Non-insert content (for example, hyperlinks to help pages) is not inserted in standard or minimal insertion mode.

To mark non-insert content:

1. 

Select the content.

2. 

From the Format menu, select Task Authoring, and then Mark as Non-Insert.

  

 

Optional content (for example, the title or text descriptions) is inserted in standard but not minimal insertion mode.

To mark optional content:

1. 

Select the content.

2. 

From the Format menu, select Task Authoring, and then Mark as Optional.

Task Elements

To highlight marked content, from the View menu, select Task Elements.

• 

Blue indicates optional content.

• 

Pink indicates non-insert content.

• 

Green indicates a placeholder.

  

Below is an example of what your document should look like when it is ready to be used. The example is an existing Maple task template, so you can see the result by going to Tasks/Algebra/Solve Analytically in Specified Interval.

Save the Task to a Help Database

You must insert your task into a help database so that it can be used.  When your task is viewed in the help system or task browser, the top bar with the copy buttons will be automatically generated.

There are three methods you can use to save a task to a help database:

Save a Worksheet as a Task Using Menu Options

This method saves an entire worksheet as a task.

To insert your task into a help database:

1. 

From the Tools menu, select Help Database, and then Save as Task.

2. 

In the Save Task dialog, enter values in the following fields.

• 

Select Writable Database - The Maple help database (HELP) file (that must contain "task" or "Task" in its name) to which to add the task. If the file does not exist, Maple creates it.

• 

Task Name - The unique name (topic) associated with the task in the help system.

• 

Table of Contents Entry - The location of the task in the left pane of the Browse Tasks window, and the Table of Contents tab in the left pane of the Help Navigator.

  

Also specify a description for all the variables and parameter placeholders.

3. 

Click the Save button.

Repeat the previous steps to create additional tasks.

Save a Selection as a Task Using Menu Options

This method is useful to save a portion of your worksheet as a task.

To insert your task into the default tasks.help help database do the following:

1. 

Highlight a selection in a worksheet that contains the content for the task

2. 

From the Edit menu, select Create Task. Alternatively, right-click to display the context menu, then select Create Task.

3. 

Enter a value in the task name field. To save a task to the default help database, click Save.

To save the task to a help database other than the default help database, do the following:

  

Instead of Save, click Advanced.

4. 

In the Save Task dialog, enter values in the following fields.

• 

Select Writable Database - The help database (HELP) file (that must contain "task" or "Task" in its name) to which to add the task. If the file does not exist, Maple creates it.

• 

Task Name - The unique name (topic) associated with the task in the help system.

• 

Table of Contents Entry - The location of the task in the left pane of the Browse Tasks window, and the Table of Contents tab in the left pane of the Help Navigator.

  

Also specify a description for all the variables and parameter placeholders.

5. 

Click the Save button.

Repeat the previous steps to create additional tasks.

Obtain the XML for a Worksheet to Save a Task to a Help Database

To insert your task into the default task.help help database:

1. 

Use a command such as Worksheet[ReadFile] to generate an XML data structure that represents the worksheet. This XML data structure is the content for the task.

2. 

Using the XML data structure obtained in the previous step, and providing an appropriate name for the task, run the DocumentTools[CreateTask] command to create the task. Note: By default the .help file the task will be saved to is task.help. If you want to save your task to a different .help file you must use the task=pathname option in the DocumentTools[CreateTask] command, where pathname is the path to the .help file.

3. 

Your task is saved to the specified .help file.

Repeat the previous steps to create additional tasks.

Distribute the Help Database File

To use a collection of tasks that you have added to a help database file:

1. 

Send the HELP file that contains your tasks to the users.

2. 

The users must place a copy of the HELP file in one of the paths in their libname, or add the path of the HELP file to libname in Maple.

3. 

Start Maple. Your tasks are available.

See Also

libname

Maple Tasks

Removing a Task from a Help Database

unevaluation quotes

Using Tasks

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam