DocumentTools[Layout] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Document Tools : Layout : DocumentTools/Layout/Table

DocumentTools[Layout]

  

Table

  

generate XML for a Table element

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Table( r, opts )

Parameters

r

-

(optional) ; row content for the Table

opts

-

(optional) ; one or more keyword options as described below

Options

• 

alignment : identical(left,right,center):=left ; How the Table is aligned within its parent.

• 

captionalignment identical(left,center,right):=left ; How the caption is aligned.

• 

captionposition identical(above,below):=below ; Whether the caption and title are positioned above or below the Table.

• 

drawcaption truefalse:=false ; Whether the caption is visible.

• 

drawtitle truefalse:=false ; Whether the title is visible.

• 

editable : truefalse:=true ; Whether the Table's editable property is set. The default is true.

• 

exterior identical(group,all,none,left,right):=all ; Indicates how exterior borders are shown.

• 

hiddenborderdisplay identical(always,never,worksheet):=worksheet ; Indicates whether hidden borders are displayed upon mouse pointer rollover. The default value is worksheet which specifies that the display will respect the Show/Hide Contents properties of the given Document or Worksheet.

• 

identity : {name,string}; The reference name of the table.

• 

interior identical(group,all,none):=all ; Indicates how internal borders are shown.

• 

order : identical(row,column):=row ; Indicates the order of execution of Table cells.

• 

pagebreak : identical(cell,none,row):=none ; Whether pagebreaks may occur.

• 

postexecute : identical(insert,advance):=advance ; Whether a new execution point will be inserted, or whether the cursor will advance, following execution within a cell.

• 

showinput : truefalse:=true ; Whether input within cells will be visible.

• 

showlabel : truefalse:=false ; Whether equation labels will be shown within cells.

• 

showgroup : truefalse:=false ; Whether execution group boundaries are shown within cells of the Table.

• 

title : string:="" ; A title for the Table.

• 

width : And(realcons,nonnegative):=100.0 ; Indicates the displayed width of the Table as a percentage of the worksheet's width in the case of option widthmode=percentage, or as the number or pixels in the case that option widthmode=pixels. The default is 100% of the displayed worksheet's width.

• 

widthmode : identical(percentage,pixels):=percentage ; Whether the width option's value is interpreted as a percentage of the worksheet's width or as a number of pixels.

Description

• 

The Table command in the Layout Constructors package returns an XML function call which represents a worksheet Table element.

• 

The generated XML may be used with the results of other 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

withDocumentTools:withDocumentTools:-Layout:

Executing the Table command produces a function call.

TTableColumn,RowCellSome text

T_XML_Tableinterior=all,id=_Table_,hiddenborderdisplay=worksheet,showinput=true,alignment=left,exterior=all,width=100%,showlabel=false,captionalignment=0,title=,drawtitle=false,order=row,drawcaption=false,randomized=false,captionposition=1,showgroup=false,plotalignlists=,pagebreak=none,postexecute=advance,_XML_Table-Columnseparator=true,weight=100,_XML_Table-Rowalign=top,separator=true,_XML_Table-Cellcolumnspan=1,backgroundstyle=0,rowspan=1,fillcolor=[255,255,255],visible=true,_XML_Text-fieldalignment=centred,style=Text,layout=Normal,Some text

(1)

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

xmlWorksheetT:

That XML representation of a worksheet can be inserted directly.

InsertContentxml:

Some text

The Cell constructor is only necessary when some non-default Cell option is wanted, or when a sequence of arguments to Row are intended to be grouped in particular Cells. Arguments to the Row constructor are otherwise automatically wrapped in calls to Cell.

RRowSome text.,CellMore text., Yet more text.,fillcolor=gold,Even more text:xmlWorksheetTable`$`Column,3,R:InsertContentxml:

Some text.

More text. Yet more text.

Even more text

TTabletitle=Title,drawtitle,Rowtext:InsertContentWorksheetT:

text

TTabletitle=Title,drawtitle,captionalignment=center,Rowtext:InsertContentWorksheetT:

text

TTabletitle=Title,drawcaption,drawtitle,captionposition=above,Rowtext:InsertContentWorksheetT:

text

TTabledrawcaption,drawtitle,captionposition=above,Rowtext:InsertContentWorksheetT:

text

TTableinterior=none,exterior=none,RowA,B,RowC,D:InsertContentWorksheetT:

A

B

C

D

TTableinterior=none,exterior=all,widthmode=pixels,width=300,alignment=left,RowA,B,RowC,D:InsertContentWorksheetT:

A

B

C

D

TTableinterior=all,exterior=none,widthmode=percentage,width=40.0,alignment=center,RowA,B,RowC,D:InsertContentWorksheetT:

A

B

C

D

When the interior borders of a Table are specified to be shown by group then the absence of separators above a row or to the left of a column is revealed.

s`$`Some text,4:TTable`$`Column,2,`$`Columnseparator=false,2,interior=group,`$`Rows,2,`$`Rows,separator=false,2:InsertContentWorksheetT:

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

Some text

By default the boundaries of execution groups are not shown in a constructed Table. For the first of the next two examples the boundary of the Group within the Table Cell will not be shown. For the second example the boundary will be shown provided that behavior is enabled for all execution groups (which is not the case for displayed Help pages). Hence the boundary will be shown if the example is executed in a worksheet while that preference is enabled.

CCellGroupInputTextfieldprompt=> ,style=MapleInput,layout=Normal,alignment=left:TTableRowC:InsertContentWorksheetT:

CCellGroupInputTextfieldprompt=> ,style=MapleInput,layout=Normal,alignment=left:TTableshowgroup,RowC:InsertContentWorksheetT:

Input regions within a Table can be hidden. The input can be shown, post-insertion, by editing the properties of the Table.

CCellGroupInputTextfieldprompt=> ,style=MapleInput,layout=Normal,alignment=left,sin(Pi/6);,OutputTextfieldEquationsinπ6:TTableshowinput=false,showgroup,RowC:InsertContentWorksheetT:

12

Compatibility

• 

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

• 

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

• 

The hiddenborderdisplay and identity options were introduced in Maple 2016.

• 

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

• 

The DocumentTools:-Layout:-Table command was updated in Maple 2020.

• 

The editable option was introduced in Maple 2020.

• 

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

See Also

Cell

Column

Component Constructors

DocumentTools

InsertContent

Layout Constructors

Row

XMLTools