DocumentTools[Canvas]
Text
create a text structure with metadata
Calling Sequence
Parameters
Description
Examples
Compatibility
Text(caption)
Text(caption, options)
Text(format, arguments, options)
caption
-
string
format
string containing "%1"
arguments
anything
The Text command is used by GetMath when extracting math and text from a canvas. It packages text expression up into a record where it can be saved alongside other information relevant to the context of the canvas application, such as the id, position, and annotation.
It can be useful to use the Text command when constructing a canvas that will later be deployed to Maple Learn.
The Text command supports mixed text and math notation. When given a first argument format string that contains the % character followed by a number, n, the text will display the nth argument in place of %n.
with⁡DocumentTools:-Canvas:
cv≔NewCanvas⁡Text Example,Text⁡Mix text and %1,sqrt⁡x2−1y,Text⁡Sum %1 and %2,a2,b2,Text⁡The %1,_BOLD⁡Pythagorean Theorem,Math⁡a2+b2=c2:
ShowCanvas⁡cv
Text records are returned from GetMath
url≔https://learn.maplesoft.com/beta/index.html#/?d=OULPGFDHIFNKDLJJGGMKJKNOARBJLHGRPOOKHKCQHPMFKMOTBFEHCUBUCQFNOGKSAMDOCUEFGMAJMQELFLEQEGOMETNULHFSCUGU:
cv≔GetCanvas⁡url:
M≔GetMath⁡cv,keeptext:
M1:-text
M1:-id
M1:-position
The DocumentTools[Canvas][Text] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
Annotate
GetCanvas
Math
NewCanvas
Script
ShareCanvas
Download Help Document
What kind of issue would you like to report? (Optional)