Overview of the DocumentTools:-Canvas Package
Tutorial - Using the Canvas Package
List of Commands in the Canvas Package
A "canvas" is both (1) a document template where math can be inserted and acted upon by button clicks within Maple, and (2) the document environment used by Maple Learn.
The DocumentTools:-Canvas package builds on DocumentTools component primitives to provide a way to generate such a canvas.
The NewCanvas and ShowCanvas commands can be used to construct and display math and text content organized in a grid layout. When a ScriptButton is present, additional controls and blank entry boxes are available for user input. Using Script actions the math and text can be modified and/or annotated.
In scenario (1), the canvas is viewed and interacted with directly inside a Maple document. In scenario (2), the ShareCanvas command is used to send the canvas to Maple Learn, where it can be viewed and interacted with inside a web browser.
Canvas Elements and Layout
Introducing the Script Button
Advanced Overview of Scripting
Use of Canvas Elements in Maple Library Commands
Inspect and annotate math on a canvas
Make Standard Maple Commands Interactive
Correct Solution Analysis Plus Try-Another
Initialization, Grading, and New Problem Generation
Canvas-based Word Problem with SolveFeedback
Canvas-based Click-on-Plot Example with Hidden State
The extensive gallery Maple Learn Scripting Templates provides many more examples.
The following is a list of commands within the Canvas subpackage of DocumentTools:
append to a canvas
fetch a canvas from Maple Learn
extract element from a canvas
extract math from a canvas
create a canvas group structure
create an image canvas element
create a canvas line drawing element
create a hyperlink canvas element
create a math structure with metadata
create a canvas
create a canvas 3-D plot
script canvas operations
create a canvas button element
create a canvas checkbox element
send a canvas to Maple Learn
insert a canvas
create a slider canvas element
create a canvas state placeholder
create a canvas plot
simulate a button press
create a text structure with metadata
The DocumentTools:-Canvas package was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document