Worksheet
WorksheetToMapleText
convert a worksheet into a 1-D Maple text string
Calling Sequence
Parameters
Description
Notes
Examples
Compatibility
WorksheetToMapleText( worksheet )
WorksheetToMapleText( worksheet, includeoutput )
worksheet
-
string or XML tree data structure
The command WorksheetToMapleText converts a Maple worksheet in .mw format into a string containing the equivalent commands as 1-D Maple text. It is similar in functionality to the Maple Text format in the File > Export As menu.
If the first argument worksheet is a string then it is treated as a filename. Otherwise, a worksheet as an XML tree data structure is expected.
This command only fully supports worksheets. It may not work properly for Maple documents with tables or components.
with⁡Worksheet:
slash≔kernelopts⁡dirsep
slash≔/
filename≔cat⁡kernelopts⁡datadir,slash,example,slash,MatrixExample.mw
filename≔/maple/cbat/active/268316/data/example/MatrixExample.mw
printf⁡WorksheetToMapleText⁡filename
m := Matrix(2,2,[[-4, sqrt(17)], [ln(45), 61/4]]); m[1,1]*m[2,2]-m[1,2]*m[2,1];
printf⁡WorksheetToMapleText⁡filename,includeoutput
m := Matrix(2,2,[[-4, sqrt(17)], [ln(45), 61/4]]); # out_1> Typesetting:-mfenced(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo("&uminus0;",mathcolor = "black",readonly = "false",fence = "false",separator = "false",stretchy = "false",symmetric = "false",largeop = "false",movablelimits = "false",accent = "false",lspace = "0.2222222em",rspace = "0.2222222em"),Typesetting:-mn("4",mathcolor = "black",readonly = "false"),mathcolor = "black",readonly = "false"),rowalign = "",columnalign = "",groupalign = "",rowspan = "1",columnspan = "1"),Typesetting:-mtd(Typesetting:-msqrt(Typesetting:-mn("17",mathcolor = "black",readonly = "false"),mathcolor = "black"),rowalign = "",columnalign = "",groupalign = "",rowspan = "1",columnspan = "1"),rowalign = "",columnalign = "",groupalign = ""),Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mi("ln",italic = "false",mathcolor = "black",readonly = "false"),Typesetting:-mo("⁡",fence = "unset",separator = "unset",stretchy = "unset",symmetric = "unset",largeop = "unset",movablelimits = "unset",accent = "unset",lspace = "0.0em",rspace = "0.0em"),Typesetting:-mfenced(Typesetting:-mn("45",mathcolor = "black",readonly = "false"),mathcolor = "black",readonly = "false"),mathcolor = "black",readonly = "false"),rowalign = "",columnalign = "",groupalign = "",rowspan = "1",columnspan = "1"),Typesetting:-mtd(Typesetting:-mfrac(Typesetting:-mn("61",mathcolor = "black",readonly = "false"),Typesetting:-mn("4",mathcolor = "black",readonly = "false"),linethickness = "1",denomalign = "center",numalign = "center",bevelled = "false",mathcolor = "black"),rowalign = "",columnalign = "",groupalign = "",rowspan = "1",columnspan = "1"),rowalign = "",columnalign = "",groupalign = ""),align = "axis",rowalign = "baseline",columnalign = "center",groupalign = "{left}",alignmentscope = "true",columnwidth = "auto",width = "auto",rowspacing = "1.0ex",columnspacing = "0.8em",rowlines = "none",columnlines = "none",frame = "none",framespacing = "0.4em 0.5ex",equalrows = "false",equalcolumns = "false",displaystyle = "false",side = "right",minlabelspacing = "0.8em"),mathcolor = "black",readonly = "false",open = "[",close = "]") m[1,1]*m[2,2]-m[1,2]*m[2,1]; # out_2> -61-sqrt(17)*ln(45)
with⁡DocumentTools:
with⁡DocumentTools:-Layout:
E≔sqrt⁡xπ
E≔xπ
W≔Worksheet⁡Group⁡Input⁡Textfield⁡Equation⁡E,executable=true,style=TwoDimInput,style=MapleInput:
printf⁡WorksheetToMapleText⁡W
sqrt(x)/Pi;
The Worksheet:-WorksheetToMapleText command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
See Also
Export as Maple Text
XMLTools
Download Help Document