To Maple Text - Maple Help

Worksheet

 WorksheetToMapleText
 convert a worksheet into a 1-D Maple text string

 Calling Sequence WorksheetToMapleText( worksheet ) WorksheetToMapleText( worksheet, includeoutput )

Description

 • 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.

Notes

 • This command only fully supports worksheets.  It may not work properly for Maple documents with tables or components.

Examples

 > $\mathrm{with}\left(\mathrm{Worksheet}\right):$
 > $\mathrm{with}\left(\mathrm{DocumentTools}\right):$
 > $\mathrm{with}\left(\mathrm{DocumentTools}:-\mathrm{Layout}\right):$
 > $E≔\frac{\mathrm{sqrt}\left(x\right)}{\mathrm{\pi }}$
 ${E}{≔}\frac{\sqrt{{x}}}{{\mathrm{\pi }}}$ (1)
 > $W≔\mathrm{Worksheet}\left(\mathrm{Group}\left(\mathrm{Input}\left(\mathrm{Textfield}\left(\mathrm{Equation}\left(E,\mathrm{executable}=\mathrm{true},\mathrm{style}=\mathrm{TwoDimInput}\right),\mathrm{style}=\mathrm{MapleInput}\right)\right)\right)\right)$
 {W}{≔}{\mathrm{_XML_Worksheet}}{}\left({\mathrm{_XML_Group}}{}\left({"view"}{=}{"presentation"}{,}{"hide-input"}{=}{"false"}{,}{"hide-output"}{=}{"false"}{,}{"inline-output"}{=}{"false"}{,}{"drawlabel"}{=}{"true"}{,}{\mathrm{_XML_Input}}{}\left({\mathrm{_XML_Text-field}}{}\left({"alignment"}{=}{"centred"}{,}{"style"}{=}{"Maple Input"}{,}{"layout"}{=}{"Normal"}{,}{\mathrm{_XML_Equation}}{}\left({"executable"}{=}{"true"}{,}{"style"}{=}{"2D Input"}{,}{"input-equation"}{=}{""}{,}{"display"}{=}{"LUkmbWZyYWNHNiQlKnByb3RlY3RlZEcvJSttb2R1bGVuYW1lR0ksVHlwZXNldHRpbmdHNiRGJSUoX3N5c2xpYkc2JC1JJm1zcXJ0RzYkRiUvRidGKDYjLUkjbWlHNiRGJS9GJ0YoNiNRIng2Ii1GMjYjUSUmcGk7Rjc="}{,}{"LUkmbWZyYWNHNiQlKnByb3RlY3RlZEcvJSttb2R1bGVuYW1lR0ksVHlwZXNldHRpbmdHNiRGJSUoX3N5c2xpYkc2JC1JJm1zcXJ0RzYkRiUvRidGKDYjLUkjbWlHNiRGJS9GJ0YoNiNRIng2Ii1GMjYjUSUmcGk7Rjc="}\right)\right)\right)\right)\right) (2)
 > $\mathrm{WorksheetToMapleText}\left(W\right)$
 ${"sqrt\left(x\right)/Pi;"}$ (3)

Compatibility

 • The Worksheet:-WorksheetToMapleText command was introduced in Maple 2017.