Highlight - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


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

Calling Sequence

Highlight(script,ex,options)

HighlightOff(script,ex,options)

Parameters

script

-

DocumentTools:-Canvas:-Script object

ex

-

(optional) a subexpression of the active math expression

id

-

(optional) id=string; id of a particular marked subexpression

Description

• 

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.

Examples

> 

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

> 

HighlightOff⁡sc

> 

Highlight⁡sc,E

> 

Annotate⁡sc,energy

> 

HighlightOff⁡sc

> 

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

Compatibility

• 

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