Applet parameters

On this page:

A typical MathFlow SDK Editor applet call looks similar to this example:

<applet archive="MFSimpleApplet.jar"
        codebase="lib"
        code="com.dessci.mathflow.sdk.editor.SimpleApplet"
        name="mySimpleApplet"
        width="690"
        height="200">
  <param name="mathML"
        value="<math><mi>x</mi><mo>-</mo><mn>4</mn></math>"</applet>

The width and height can be set arbitrarily, but the natural width of the standard toolbar is 690px.

MathFlow SDK Editor applets recognize the following optional parameters:

Input ParameterDescription
autoItalicsThe autoItalics parameter determines whether single-character variables will be automatically typeset in an italic font. The legal values for this parameter are "true" and "false" with "true" as the default.
autoStretchyThe autoStretchy parameter determines whether inserted parentheses stretch by default. The legal values for this parameter are "true" and "false" with "true" as the default.
backgroundThe background parameter sets the default background color for equations in the MathFlow SDK Editor Applet. Values should be specified as hexadecimal RGB values in the form "#rrggbb" or "#rgb," or using CSS2 color keywords, such as "blue."
commonFunctionList
(Style and Structure Editor Applets only)
The commonFunctionList parameter provides a list of common function names that the system will use to determine whether common elementary functions such as "sin" will be automatically recognized, typeset and marked up as functions. The legal values for this parameter is a comma separated list of function names. The default list is: "arccos,arcsin,arctan,arg,cos,cosh,cot,coth,cov,csc,deg,det,dim,exp,gcd, glb,hom,inf,int,ker,lg,lim,lm,ln,log,lub,max,min,mod,sec,sgn,sin,sinh,sup,tan,tanh,var".
ddDoubleStruckThe ddDoubleStruck parameter determines whether the "differential d" character will be typeset using a double struck (sometimes called openface) font, or in a normal italic font. The legal values for this parameter are "true" and "false" with "false" as the default.
displayStyleThe displayStyle parameter determines whether the MathFlow SDK Editor Applet typesets equations using inline or display notational styles. Accepted values are "true" and "false". The most noticeable differences are that limits on summations, etc. are traditionally above and below the symbol in display style, and in the sub and superscript positions in inline style. Also, the numerators and denominators of fractions shrink more in inline fractions.
enableUnsignedClipboardThe enableUnsignedClipboard parameter determines what happens when a user does a cut (Ctrl+X) or copy (Ctrl+C) operation when running an unsigned applet. This means users of the MathFlow SDK Editor Applet who have not installed the MathFlow SDK Editor Applet normally cannot copy MathML to the clipboard. By setting the enableUnsignedClipboard parameter to "true", however, each cut or copy operation will open a dialog with the MathML for the selected expression displayed in a text area. Since copying to the system clipboard from a text area is always permitted, a user can then select and copy the MathML as necessary. The legal values for this parameter are "true" and "false" with "false" as the default.
pointSizeThe pointSize parameter's value is an integer, like 12, 14, 18, 24, etc, specifying the font point size. The default is 18. You can specify any integer value; it will be rounded off to the nearest available point size. The maximum supported point size is 72.
foregroundThe foreground parameter sets the default font (foreground) color for equations in the MathFlow SDK Editor Applet. Values should be specified as hexadecimal RGB values in the form "#rrggbb" or "#rgb," or using CSS2 color keywords, such as "blue."
mathMLThe mathML parameter's value gives the markup for the initial equation to be displayed and edited. The value must be given in MathML.
p2cConversionContextThe p2cConversionContext parameter specifies hints for translating from Presentation MathML to Content MathML.
p2cFunctionNamesThe p2cFunctionNames parameter is used to specify a list of user-defined identifiers that will be treated as function names for content MathML generation. The value can be any comma-separated list of identifiers, e.g. "u, v, G, prt". By default, only "f" and "g" are always treated as function names.
preferSystemFontsThe preferSystemFonts parameter determines whether the applet should use only system fonts. The legal values for this parameter are "true" and "false" with "true" as the default. If "false" is the value for this parameter, note that the MFExtraSymFonts.jar file must be on the classpath.
recognizeCommonFunctionsThe recognizeCommonFunctions parameter determines whether common elementary functions such as "sin" will be automatically recognized, typeset and marked up as functions. The legal values for this parameter are "true" and "false" with "true" as the default.
spacebarBehaviorThe spacebarBehavior parameter determines what gets inserted when the user presses the spacebar. Legal values: 0 - Invisible times after an operand, space otherwise; 1 - Invisible times always; 2 - Space always, 3 - Nothing. The default value is 0.
toolbarMarkupThe value of the toolbarMarkup parameter is a toolbar configuration description. See the section on toolbar configuration for an explanation of the toolbar configuration language.
upperGreekNormalThe upperGreekNormal parameter determines whether uppercase Greek letters will be inserted as normal (i.e., upright, not italicized). The legal values for this parameter are "true" and "false" with "true" as the default.
urlEncodedMathMLThe urlEncodedMathML parameter is used in the same way as the 'mathML' parameter, except that the MathFlow SDK Editor Applet first URL decodes the value passed. See the MathFlow SDK Editor Applet Javascript API for details of the URL decoding algorithm. When both an 'mathML' and 'urlEncodedMathML' parameter are specified, the 'mathML' parameter will take precedence.
usePredefinedToolbar
(Style Editor Applet only)
The usePredefinedToolbar parameter determines which toolbar will be displayed. The legal values for this parameter are "#standard", "#extrasymbols", "#basic", "#websafe" and "#custom" with "#standard" as the default. Note that "#custom" is only available if toolbarMarkup is also supplied. This will not work with the Structure Applet, because has its own separate toolbar menu.

Four applet parameters are available only on the Mac:

Input ParameterDescription
disableMacButtonsWhen used on a Mac, the MathFlow SDK Editor Applet displays a "Title:" input field and a "Submit" button at the bottom of the window. This parameter can be used prevent these components from being displayed.
macButtonBackgroundThis parameter sets the background color of the additional panels that appear in the MathFlow SDK Editor Applet user interface when running on the Mac. On other platforms, the MathFlow SDK Editor Applet has no background area to color. Values should be specified as hexadecimal RGB values in the form "#rrggbb" or "#rgb," or using CSS2 color keywords, such as "blue."
titleWhen used on a Mac, the MathFlow SDK Editor Applet displays a "Title:" input field and a "Submit" button at the bottom of the window. This parameter can be used to set the initial value of the "Title" input field.
urlOn a Mac, a "Submit" button appears at the bottom of the editor window. When the user clicks that button, the applet will make an HTTP request to the URL specified by this parameter, with the MathML markup for the current equation, and the value of the "Title" input field appended as CGI arguments. See MathFlow SDK Editor Applets on the Mac for further details.