Document Block - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


DocumentTools[Layout]

  

DocumentBlock

  

generate XML for an DocumentBlock element

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

DocumentBlock( c )

Parameters

c

-

(optional) ; content for the Block, as a sequence of one or more calls to the Group or Table constructors.

Description

• 

The DocumentBlock command constructs the outermost layer of an XML function call representation of a Document Block.

• 

A DocumentBlock 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

> 

with⁡DocumentTools:

> 

with⁡DocumentTools:-Layout:

Executing the DocumentBlock command produces a function call.

> 

P≔DocumentBlock⁡

P≔_XML_Presentation-Block⁡

(1)

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

> 

xml≔Worksheet⁡P:

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

> 

InsertContent⁡xml:

 

A DocumentBlock can contain one or more execution groups. In the next example such an execution group contains only a text region.

> 

G1≔Group⁡Input⁡Textfield⁡Some text in an Execution Group within a Document Block.,alignment=left:P≔DocumentBlock⁡G1:

> 

InsertContent⁡Worksheet⁡P:

Some text in an Execution Group within a Document Block.

In the next example the document block contains two execution groups. The second execution group contains both 2D Math input and output.

> 

Ein≔Equation⁡2⁢factor⁡sum⁡i,i=1..n,style=TwoDimInput,executable=true:Eout≔Equation⁡2⁢factor⁡sum⁡i,i=1..n,style=TwoDimOutput:Tin≔Textfield⁡Ein,alignment=left,prompt=> ,style=MapleInput:Tout≔Textfield⁡Eout:G2≔Group⁡Input⁡Tin,Output⁡Tout:P≔DocumentBlock⁡G1,G2:InsertContent⁡Worksheet⁡P:

Some text in an Execution Group within a Document Block.2⁢factor⁡∑i=1n⁡i

n⁢n+1

(2)

Compatibility

• 

The DocumentTools:-Layout:-DocumentBlock command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

Component Constructors

Document Block

Document Markers

DocumentTools

Equation

InsertContent

Layout Constructors

Table

Textfield

XMLTools