define a MathML viewer - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Maplets : Elements : Window Body Elements : Maplets/Elements/MathMLViewer

Maplets[Elements][MathMLViewer] - define a MathML viewer

Calling Sequence

MathMLViewer(opts)

Parameters

opts

-

equation(s) of the form option=value where option is one of background, breakwidth, fontsize, foreground, height, reference, value, visible, width, or wrapped; specify options for the MathMLViewer element

Description

• 

The MathMLViewer window body element defines a MathML viewer in a Maplet application.

  

 

• 

The MathMLViewer element features can be modified by using options. To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.

Elements, Symbols, or Types

Assumed Option or Content

 

 

algebraic

value option

range of positive integers

height and width options, respectively

 

 

• 

A MathMLViewer element cannot contain other elements.

• 

A MathMLViewer element can be contained in a Maplet or BoxLayout element, or Maplet element in a nested list representing a box layout.

• 

The following table describes the control and use of the MathMLViewer element options.

  

An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).

  

An x in the R column indicates that the option is required in the calling sequence.

  

An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.

  

An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.

Option

I

R

G

S

 

 

 

 

 

background

x

 

x

x

breakwidth

x

 

x

x

fontsize

x

 

 

 

foreground

x

 

x

x

height

x

 

x

 

reference

x

 

 

 

value

x

 

x

x

visible

x

 

x

x

width

x

 

x

 

wrapped

x

 

x

 

 

 

 

 

 

• 

The opts argument can contain one or more of the following equations that set Maplet application options.

  

 

  

background = color

  

The color of the background of the MathML viewer.  This can be a recognized color name, an RGB color structure, or a string of the form "#RRGGBB" where each pair is a two-digit hexadecimal number.

  

 

  

breakwidth = posint

  

The width, in pixels, above which the content in the MathML viewer is displayed in line mode, as opposed to full 2-D math mode. The default value is 400. It is strongly advised that this value be no smaller than the width of the MathML viewer.

  

Note: If wrapped is set to true, this parameter is ignored.

  

 

  

fontsize= posint

  

The point size of the font used in the MathML viewer. By default, this is 18.

  

 

  

foreground = color

  

The color of the text in the MathML viewer.  This can be a recognized color name, an RGB color structure, or a string of the form "#RRGGBB" where each pair is a two-digit hexadecimal number.

  

 

  

height = posint

  

The MathML viewer height in pixels.  By default, the height is 100 pixels.

  

 

  

reference = name or string

  

A reference to the MathMLViewer element.

  

 

  

value = algebraic

  

The content displayed by the MathML viewer.  The value of this attribute is passed by using the MathML[Export] function.

  

 

  

visible = true or false

  

Whether the MathML viewer is visible to the user. By default, the value is true.

  

 

  

width = posint

  

The MathML viewer width in pixels.  By default, the width is 300 pixels.

  

 

  

wrapped = true or false

  

Whether the content of the MathML viewer wraps to the next line if it is too large to be displayed in the MathML viewer window. If set to true the breakwidth parameter is ignored. By default, the value is false.

  

Note: Setting this parameter to true is equivalent to setting the breakwidth parameter to the width of the MathML viewer window minus the width needed for the scroll bar on the right.

Examples

withMaplets[Elements]:

maplet:=MapletBoxCellThe solution is:,MathMLViewer'value'=MathML[Export]∫sinx2ⅆx,ButtonOK,Shutdown:

Maplets[Display]maplet

See Also

int, Maplets/WindowBodyElements, Maplets[Display], Maplets[Elements], Maplets[Elements][BoxCell], Maplets[Elements][Button], Maplets[Elements][Font], Maplets[Elements][Maplet], Maplets[Elements][SetOption], Maplets[Elements][Shutdown], Maplets[Tools][Get], Maplets[Tools][Set], MathML, MathML[Export], Overview of Maplet Applications, plot[color]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam