DocumentTools[Layout]
Section
generate XML for a Section element
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Section( s, t, opt )
s
-
(optional) ; content of the Section
t
(optional) ; the Title of the Section
opt
(optional) ; the keyword options a described below
collapsed : truefalse:=false ; Whether the section is initially collapsed.
The Section command constructs a representation of a worksheet section.
A Section 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.
The result of calling the Title element constructor can be optionally supplied, and will be used as the title of the section. All other arguments except for the collapsed keyword option are used as the content of the section.
with⁡DocumentTools:
with⁡DocumentTools:-Layout:
Executing the Section command produces a function call.
S≔Section⁡
S≔_XML_Section⁡collapsed=false
By using additional commands from the Layout Constructors package a nested function call can be produced which represents an entire worksheet.
xml≔Worksheet⁡S:
That XML representation of a worksheet can be inserted directly.
InsertContent⁡xml:
S≔Section⁡Title⁡Textfield⁡style=Heading1,layout=Heading1,alignment=left,Introduction,Group⁡Input⁡Textfield⁡alignment=left,Some introductory text.,Group⁡Input⁡Textfield⁡InlinePlot⁡plot⁡sin:
InsertContent⁡Worksheet⁡S:
Introduction
Some introductory text.
Sections may be nested, as subsections. Sections may also be created initially collapsed.
S≔Section⁡Title⁡Textfield⁡style=Heading1,layout=Heading1,alignment=left,Plotting,Group⁡Input⁡Textfield⁡alignment=left,Some introductory text.,Section⁡Title⁡Textfield⁡style=Heading2,layout=Heading2,alignment=left,2D plots,Group⁡Input⁡Textfield⁡alignment=left,Some more text.,Section⁡collapsed,Title⁡Textfield⁡style=Heading3,layout=Heading3,alignment=left,2D animations,Group⁡Input⁡Textfield⁡alignment=left,Some more text.,Section⁡Title⁡Textfield⁡style=Heading2,layout=Heading2,alignment=left,3D plots,Group⁡Input⁡Textfield⁡alignment=left,Some more text.:InsertContent⁡Worksheet⁡S:
Plotting
2D plots
Some more text.
2D animations
3D plots
A Section can be constructed within a Table.
S≔Section⁡Title⁡Textfield⁡style=Heading2,layout=Heading2,alignment=left,Description,Group⁡Input⁡Textfield⁡alignment=left,Some text.,Section⁡collapsed,Title⁡Textfield⁡style=Heading3,layout=Heading3,alignment=left,Details,Group⁡Input⁡Textfield⁡alignment=left,Some more text.:T≔Table⁡alignment=center,interior=none,width=60.0,Row⁡InlinePlot⁡plot⁡sin⁡xx,S:InsertContent⁡Worksheet⁡T:
Some text.
Details
2D Math or a Table can be put into the Title of a Section.
S1≔Section⁡Title⁡Textfield⁡style=Heading2,layout=Heading2,alignment=left,Summation example: ,Equation⁡style=TwoDimInput,sum⁡f⁡x,i=1..N,Group⁡Input⁡Textfield⁡alignment=left,The body of the section.:
S2≔Section⁡Title⁡Textfield⁡style=Heading2,layout=Heading2,alignment=centered,Table⁡width=50,Row⁡Some description,InlinePlot⁡height=200,plot⁡sin⁡x,Group⁡Input⁡Textfield⁡alignment=left,The body of the section.:InsertContent⁡Worksheet⁡S1,S2:
Summation example: ∑i=1N⁡f⁡x
The body of the section.
Some description
The DocumentTools:-Layout:-Section command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Component Constructors
DocumentTools
InsertContent
Layout Constructors
Table
Textfield
XMLTools
Download Help Document