# How to create and use a Maple repository in Maple TA browsing

• This guide will help you set up a repository - first in Maple and then in Maple TA.

# Maple

The best resource to help understand how to use Maple functions is, of course, the official Maple documentation. However, we will go through an overview of the commands required to create and update a repository.

A Maple repository must first be created in Maple and then uploaded to Maple TA for use in questions. The first step is to use the Maple Archive manager, march. A link to more complete documentation for this command is given above, though for the purposes of this document it can be assumed to work only as shown below.

The function march('create', "[location]") creates a repository at the location specified. For example,

march('create',"C:/LocalMaple/UOB.lib"):


creates the repository UOB.lib at C:/LocalMaple/. Note the function requires the directory to already exist prior to repository creation.

Once the repository is created, it is simple to add items. This is done via savelib, documentation for which is again given above. An expression to be saved must first be defined in Maple. Then variable savelibname must be provided, which is the directory of the repository the expression should be saved to. Finally savelibname([expression])' should be called. For example,

a := 5:
savelibname := "C:/LocalMaple/UOB.lib":
savelib('a'):



adds the variable a with value 5 to the repository UOB.lib. This can be compressed:

a := 5:
b := 2:
savelib('a','b',"C:/LocalMaple/UOB.lib")



though particular care must be taken to ensure the correct quotation marks are around the correct arguments.

# Maple TA

Adding a Maple repository to Maple TA is simple. First navigate to the Content Repository section, then click View Files. Now the class name should be visible, along with any files or folders already on the system. To add a new repository click the arrow shape to the far right of the class name. To add it to a subfolder, hover over the folder name until the arrow appears and then click it. Note, to update a repository it is not necessary to delete it first - just upload it with the same name, as if it were new. However, caution is needed while doing this as the old file will be overwritten.

Click the "Browse..." button, select the .ind file of your repository. Then click the text input box below and it should automatically fill with the file name. Click "OK" then return to this page to add the .lib file, following the same procedure.

Once this has been completed, the repository should be accessible in Maple TA questions contained within this class.

To use the functions and variables the repository uploaded contains, a Maple-graded response area must be used. Within the editor, click the "Maple Repository" button and select the repository needed. Then functions and variables from within the repository can be called as if they had been already defined. The easiest way to find the location is to use the designer, accessed by clicking "Show Designer" on the left hand side of the Algorithm section. Then click the "Maple Repository" button and select the .lib file containing the repository needed. Now to the right the URL should appear, which can then be used as the location in the start of the Maple call above.

This repository can then be used within that Maple call - if you have another it will not be included by default.
maple(",libname=/bham/web/Jxm276d000/Public_Html/UOBlib.lib; UOBmatrixgrade($a,$b,\$c)");
Note the comma before and the semicolon after the libname declaration.