 Group - Maple Help

DocumentTools[Layout]

 Group
 generate XML for an Execution Group element Calling Sequence Group( c ) Parameters

 c - (optional) ; content for the Execution Group, the results from the Input or Output constructors Description

 • The Group command constructs the outermost layer of an XML function call representation of an Execution Group.
 • A Group element is returned as an XML function call.
 • The generated XML may be used with the results of additional commands in the Layout Constructors package to create an entire Worksheet or Document in XML form. Such a representation of a Worksheet or Document may be inserted into the current document using the InsertContent command. Examples

 > $\mathrm{with}\left(\mathrm{DocumentTools}\right):$
 > $\mathrm{with}\left(\mathrm{DocumentTools}:-\mathrm{Layout}\right):$

Executing the Group command produces a function call.

 > $G≔\mathrm{Group}\left(\right)$
 ${G}{≔}{\mathrm{_XML_Group}}{}\left({"view"}{=}{"presentation"}{,}{"hide-input"}{=}{"false"}{,}{"hide-output"}{=}{"false"}{,}{"inline-output"}{=}{"false"}{,}{"drawlabel"}{=}{"true"}\right)$ (1)

By using additional commands from the Layout Constructors package a nested function call can be produced which represents an entire worksheet.

 > $\mathrm{xml}≔\mathrm{Worksheet}\left(G\right):$

That XML representation of a worksheet can be inserted directly. In this example the execution group has no contents, but its boundaries can be seen if Document Markers are set as visible.

 > $\mathrm{InsertContent}\left(\mathrm{xml}\right):$

A Group can contain Input and Output elements. In the next example an execution group contains only a text region as a Textfield within an Input element.

 > G≔\mathrm{Group}\left(\mathrm{Input}\left(\mathrm{Textfield}\left("Some text within an execution group.",\mathrm{alignment}=\mathrm{centered}\right)\right)\right):$\mathrm{InsertContent}\left(\mathrm{Worksheet}\left(G\right)\right):$

Some text within an execution group.

In the next example the Group contains both Input and Output, with each of those containing 2D Math generated with the Equation constructor.

 > $\mathrm{Ein}≔\mathrm{Equation}\left('2\mathrm{factor}\left(\mathrm{sum}\left(i,i=1..n\right)\right)',\mathrm{style}=\mathrm{TwoDimInput},\mathrm{executable}=\mathrm{true}\right):$$\mathrm{Eout}≔\mathrm{Equation}\left(2\mathrm{factor}\left(\mathrm{sum}\left(i,i=1..n\right)\right),\mathrm{style}=\mathrm{TwoDimOutput}\right):$\mathrm{Tin}≔\mathrm{Textfield}\left(\mathrm{Ein},\mathrm{alignment}=\mathrm{left},\mathrm{prompt}=">",\mathrm{style}=\mathrm{MapleInput}\right):$\mathrm{Tout}≔\mathrm{Textfield}\left(\mathrm{Eout}\right):$$G≔\mathrm{Group}\left(\mathrm{Input}\left(\mathrm{Tin}\right),\mathrm{Output}\left(\mathrm{Tout}\right)\right):$$\mathrm{InsertContent}\left(\mathrm{Worksheet}\left(G\right)\right):$
 > $2\mathrm{factor}\left(\sum _{i=1}^{n}i\right)$
 ${n}{}\left({n}{+}{1}\right)$ (2) Compatibility

 • The DocumentTools:-Layout:-Group command was introduced in Maple 2015.
 • For more information on Maple 2015 changes, see Updates in Maple 2015.