Textfield - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DocumentTools[Layout]

  

Textfield

  

generate XML for a Textfield element

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Textfield( c, opts )

Parameters

c

-

(optional) ; content for the element

opts

-

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

Options

• 

alignment :  identical(centered,right,left,none):=centered The horizontal alignment.

• 

layout : identical(Normal,Maple,Heading1,Heading2,Heading3):=Normal; Specifies the layout description of the element.

• 

prompt : string:=NULL The string used to represent the prompt, eg. for a line in an execution group.

• 

style : identical(Text,MapleInput,TwoDimOutput,Heading1,Heading2,Heading3):=Text Specifies the formatting style for the contents of the element.

Description

• 

The Textfield command in the Layout Constructors package returns an XML function call which represents a Textfield 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 Textfield command produces a function call.

STextfieldSome Text

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

xmlWorksheetGroupInputS:

That XML representation of a worksheet can be inserted directly.

InsertContentxml:

Some Text

The next example illustrates something other than text as content of the Textfield element.

STextfieldalignment=left,InlinePlotplotsin:

InsertContentWorksheetGroupInputS:

A Textfield can contain multiple objects.

pplotsinxx2:

imArray1..40,1..9,1..3,i,j,kevalhfiremk,4sinjπsqrti,datatype=float8,order=C_order:

sep :

TTextfieldSome text.,sep,InlinePlotp,height=120,width=200,sep,Equationsqrtxπ,sep,Imageim,height=60,width=120:

InsertContentWorksheetGroupInputT:

Some text.                 xπ        

In each of the next three examples input and output regions are inserted within an execution group. The first example shows 1D Maple Notation input and 2D Math output. The second example shows 2D Math input and 2D Math output. The third example shows 1D Maple Notation input and 1D plaintext output.

Each of these three examples place the inserted execution group in a single cell in a table, simply for visual clarity.

TinTextfieldprompt=> ,alignment=left,style=MapleInput,sprintf%a;,sinπ:

ToutTextfieldstyle=TwoDimOutput,sprintf%a,sinπ:

InsertContentWorksheetTableColumn,RowCellGroupInputTin,OutputTout:

sinπ

0

TinTextfieldprompt=> ,alignment=left,layout=Normal,style=MapleInput,Equationexecutable=true,style=TwoDimInput,sqrt4x2:

ToutTextfieldstyle=TwoDimOutput,Equationexecutable=true,style=TwoDimOutput,sqrt4x2:

InsertContentWorksheetTableColumn,RowCellGroupInputTin,OutputTout:

4x2

2x2

TinTextfieldprompt=> ,alignment=left,style=MapleInput,sprintf%a;,sinπ:

ToutTextfieldalignment=none,layout=TextOutput,style=TextOutput,sprintf %a,sinπ:

InsertContentWorksheetTableColumn,RowCellGroupInputTin,OutputTout:

sinπ

                                      0

Compatibility

• 

The DocumentTools:-Layout:-Textfield 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

XMLTools