DocumentTools[Canvas]
Link
create a hyperlink in a canvas
Calling Sequence
Parameters
Description
Examples
Compatibility
Link(url,expression)
url
-
string
expression
anything
The Link command creates a hyperlink data structure to be used in conjunction with the Text command.
The url is a string of the form "http://www.maplesoft.com", and is the destination target page that should be opened when the link is clicked.
The expression is the text or math expression to click on.
Note: When viewing a canvas containing a hyperlink in Maple with the ShowCanvas command, the text containing the link will be static; and won't be modified by any script commands. Also, when the link expression is not a string, in Maple it will be prefixed with clickable text. These limitations are not present when using the same canvas in Maple Learn.
The Link command should be used as a % parameter's argument in a call to the Text command. Links are always embedded into a block of text or math as MathML attributes, and are not stand-alone canvas elements.
with⁡DocumentTools:-Canvas:
cv≔NewCanvas⁡Hyperlink Example,Text⁡See also %1 and %2,Link⁡http://www.maplesoft.com,Maplesoft,Link⁡https://en.wikipedia.org/wiki/Euler%27s_formula,exp⁡I⁢x=cos⁡x+I⁢sin⁡x
cv≔<canvas defaultfontsize='20'><content x='30' y='30'><text>Hyperlink Example</text></content><content align='below:0'><text><math text='true'><mrow><mtext mathcolor = 'black'>See also</mtext><mspace width = 'thickmathspace'/><mrow XML-LINK = 'simple' href = 'http://www.maplesoft.com'><mtext>Maplesoft</mtext></mrow><mspace width = 'thickmathspace'/><mtext mathcolor = 'black'>and</mtext><mspace width = 'thickmathspace'/><mrow XML-LINK = 'simple' href = 'https://en.wikipedia.org/wiki/Euler%27s_formula'><mrow><msup><mo>e</mo><mrow><mn>I</mn><mo> </mo><mi>x</mi></mrow></msup><mo>=</mo><mrow><mrow><mstyle fontstyle = 'normal'><mi>cos</mi></mstyle><mo></mo><mfenced><mi>x</mi></mfenced></mrow><mo>+</mo><mrow><mn>I</mn><mo> </mo><mrow><mstyle fontstyle = 'normal'><mi>sin</mi></mstyle><mo></mo><mfenced><mi>x</mi></mfenced></mrow></mrow></mrow></mrow></mrow></mrow></math></text></content></canvas>
ShareCanvas⁡cv
ShowCanvas⁡cv
The DocumentTools[Canvas][Link] command was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
Annotate
GetCanvas
GetMath
Math
NewCanvas
Script
ScriptButton
ShareCanvas
Text
Download Help Document