DocumentTools[Canvas][Script]
Cursor
cursor movement script command
Calling Sequence
Parameters
Description
Examples
Compatibility
Cursor(script,position)
script
-
DocumentTools:-Canvas:-Script object
position
string keyword
The Cursor command allows you to record cursor movement script commands intended for use in playback within the Maple Learn environment, and are invisible to operation within Maple.
Some cursor script commands are as follows:
n
(where n is an integer) Move to position n in the current horizontal run (starting at zero).
Down
Cursor down (May move between math containers)
Up
Cursor up (May move between math containers)
Left
Cursor left
Right
Cursor right
End
Move to the very end of the expression
Home
Move to the very start of the expression
ENDPOS
Move to the end of current horizontal run. This is not necessarily the end of the expression. With the cursor on the + in (a+b)/(c-d), ENDPOS would move to after the b
POSLEFT
decrement position in current horizontal run. Does not obey traversal rules like Left would. Stays in current horizontal run.
POSRIGHT
increment position in current horizontal run. Does not obey traversal rules like Right would. Stays in current horizontal run.
FOCUSUP
Go up one level of nesting. E.g. from inside a sqrt sign to the surrounding expression or from the denominator of a fraction to the surrounding expression. New cursor position within the outer expression is undefined, so this should be followed by POS or similar
ID:id
Find first occurrence of id in current horizontal run, starting from the left. Position cursor before that occurrence. An id is specified as an id on the MathML tag, on input. I.e. <math><mfrac><mn id=numerator>1</mn><mi>x</mi></mfrac></math>
IDEND:id
Find first occurrence of id in current horizontal run, starting from the right. Position cursor behind that occurrence
with⁡DocumentTools:-Canvas:
sc≔Script⁡mode=Learn:
SetActive⁡sc,0:0
Cursor⁡sc,End
cv≔NewCanvas⁡Title,sc:
ShareCanvas⁡cv
The DocumentTools[Canvas][Script][Cursor] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
Command
Math
NewCanvas
Script
SetActive
SetMath
SetText
Download Help Document