DocumentTools[Canvas][Script]
Highlight
highlight all or part of a math canvas element
HighlightOff
remove highlights from all or part of a math canvas element
Calling Sequence
Parameters
Description
Examples
Compatibility
Highlight(script,ex,options)
HighlightOff(script,ex,options)
script
-
DocumentTools:-Canvas:-Script object
ex
(optional) a subexpression of the active math expression
id
(optional) id=string; id of a particular marked subexpression
The Highlight command adds a background color to highlight all or part of the math in the active canvas element.
The HighlightOff command removes the highlights added by a previous call to Highlight.
A "canvas" is an interactive section of a Maple document created by the NewCanvas command, or a shared web-based Maple Learn document. See the Script command for a more complete description.
with⁡DocumentTools:-Canvas:
cv≔NewCanvas⁡Einstein:
ShowCanvas⁡cv
sc≔Script⁡:
SetActive⁡sc,0:0
SetMath⁡sc,E=m⁢c2,where=below
Highlight⁡sc,c
Annotate⁡sc,the speed of light
HighlightOff⁡sc
Highlight⁡sc,m
Annotate⁡sc,mass
Highlight⁡sc,E
Annotate⁡sc,energy
Annotate⁡sc,
recreate the whole example with all of the script steps attached so that it can be played back in Maple Learn
cv2≔NewCanvas⁡Einstein,sc:
ShareCanvas⁡cv2
The DocumentTools[Canvas][Script][Highlight] and DocumentTools[Canvas][Script][HighlightOff] commands were introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
Math
NewCanvas
Script
SetActive
SetMath
SetText
Download Help Document