Input - 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]

  

Input

  

generate XML for an Input element

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Input( t )

Parameters

t

-

The result from the Textfield constructor, or a sequence of such results

Description

• 

The Input command returns an XML function call which represents an Input element of a Worksheet or Document.

• 

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 argument to the Input command is the result of a call to the Textfield constructor.

• 

The result of the Input command is suitable as an argument to the Group command, in the sense that an Execution Group  of a worksheet can contain an input region.

• 

An input region, represented here by the result of a call to the Input command, can be used in two key ways. One way consists of containing a Textfield comprising paragraphs of text, plots, or tables. Another way consists of containing a Textfield comprising executable statements, and this can be accompanied in an execution group by the result of the Output constructor.

Examples

withDocumentTools:

withDocumentTools:-Layout:

Executing the Input command produces a function call.

InpInputTextfieldSome text.

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

xmlWorksheetGroupInp:

That XML representation of a worksheet can be inserted directly.

InsertContentxml:

Some text.

Text can also surround inlined typeset 2D Math expressions.

E1Equationsumi,i=1..n,style=TwoDimInput:E2Equationfactorsumi,i=1..n,style=TwoDimInput:TTextfieldThe sum of the first n positive integers ,E1, is equal to ,E2,alignment=left:InsertContentWorksheetGroupInputT:

The sum of the first n positive integers i=1ni is equal to nn+12

A Textfield within an input region can also contain objects such as a plot or a table constructed respectively by the InlinePlot or Table constructors.

PInlinePlotplotsinxx,height=200:InpInputTextfieldP:InsertContentWorksheetGroupInp:

The next example illustrates using 2-D Math input with an executable statement, accompanied by the corresponding output.

EinEquationfactorsumi2,i=1..n,style=TwoDimInput,executable=true:EoutEquationfactorsumi2,i=1..n,style=TwoDimOutput:TinTextfieldEin,alignment=left,prompt=> ,style=MapleInput:ToutTextfieldEout:InsertContentWorksheetGroupInputTin,OutputTout:

factori=1ni2

nn+12n+16

(2)

The next example uses multiple lines of input, which can be a mix of text and math.

T1Textfieldalignment=left,This is a first line of text.:T2Textfieldalignment=left,This is a second line of text.:T3Textfieldalignment=left,prompt=> ,style=MapleInput,sin(x);:InsertContentWorksheetGroupInputT1,T2,T3:

This is a first line of text.

This is a second line of text.

sinx

Compatibility

• 

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

Textfield

XMLTools