Parameters

El contenido de esta página solo está disponible en inglés.

The following tables summarizes the parameters that can be sent to WIRIS editor GUI (JavaScript), Web services and library.

Alignment properties
Key Description Values Default
centerBaseline Defines whether to add extra space to vertically center the image with the baseline. This property is only used when generating PNG images. true, false true

Style properties
Key Description Values Default
fontFamily Defines the font face family of the whole formula. The values are mapped to fonts actually installed in the server. Arial, Times New Roman, Verdana, Tahoma, Courier New (1) Arial
color Defines the color of the whole formula. A color with the form #XXXXXX #000000 (black)
backgroundColor Defines the background color of the whole formula. The constant transparent or color with the form #XXXXXX #ffffff (editor), transparent (PNG)
fontStyle Defines the fontStyle of the whole formula. normal: mi's and mn's are not italic.
italic: mi's and mn's are italic.
initial: mi's with 1 letter are italic, mi's with more than 1 letter are not italic, mn's are not italic.
initial
fontSize Defines the fontSize of the whole formula. A size with the form XXpx 16px
display Sets the display mode. The display mode inline means that the formula will appear in a paragraph with other text and it is important to be not very high. block means that the formula will appear alone in a paragraph and we want it bigger for clarity. inline, block block

(1) The font family is replaced by an equivalent one in linux (which must be installed in the server): Lucida Sans, FreeSerif, DejaVu LGC Sans, DejaVu LGC Sans and FreeMono, respectively.

Other properties
Key Description Values Default
dpi Defines the dpi's of the formula. This feature scales the formula with a factor of dpi/96. A number. 96
metadpi Use only on PNG output. Defines the dpi's metainformation that is stored inside an image. A number. 96
embedfonts Use only on SVG or EPS output. If true, the font used will be embedded in the output; the output will be bigger, but will have the same shape for all clients. If not true, output file will be smaller, but the shape of the formula will depend on the fonts the clients have installed. Actually not the whole font is embedded but only the subset of all used characters. true, false true
basepath Use only on SVG output and embedfonts=false. The client's browser or SVG reader will ask the fonts to this path. URL of the fonts folder. It can be absolute or relative to the WIRIS editor service. resources/fonts
defaultStretchy Whether the MathML of the parenthesis are interpreted as stretchy by default. For example whether <mo>(</mo> is equivalent to <mo stretchy="true">(</mo>. This attribute is useful for compatibility with other MathML engines. true, false false

The following properties are used only with the WIRIS editor user interface and are ignored when calling the Web services or library.

Editor GUI properties
Key Description Values Default
toolbar Used to rearrange buttons at the toolbar. general, quizzes, chemistry, evaluate, PARCC_Grade3_5, PARCC_Grade6_8, PARCC_Grade9_12, prototype, or a XML string. See Custom toolbar general
toolbarHidden Used to hide the toolbar. true, false false
fonts List of items for the font selector. JSON, both object and string. See Custom font list  
reservedWords The reserved words are the variables that are not italized and represent usually functions (sin) or well-known constants (e). List of reserved words separated by coma. sin, cos, tan, log, ln
mml The initial MathML content of the editor. Used to set the content at initialization time of the editor. MathML  
autoformat Replaces some symbols from keyboard by their better looking counterparts. See list of replacements. truefalse false
toolbarSize Magnifies the toolbar and its elements by a factor. 1, 1.5, 2 1

 

Regional properties
Key Description Values Default
language Language of the editor See list of languages(2) en
rtlLanguages List of Right to Left languages. When the language parameter (see above) belongs to this list, formulas are edited right to left. List of languages separated by coma. ar
ltrLanguages Used to define Left to Right languages and to overwrite rtlLanguages.
For example, if rtlLanguages is ar and ltrLanguages is ar_ma, all arabic languages are defined as RTL except arabic from Morocco.
List of languages separated by coma. ar_ma
arabicIndicLanguages Used to define languages that use Arabic-Indic numerals(3). List of languages separated by coma. ar_eg, ar_sd, ar_sa
easternArabicIndicLanguages Used to define languages that use Eastern Arabic-Indic numerals(3). List of languages separated by coma. fa, ps, ur
europeanLanguages Used to define languages that use European numerals and overwrite arabicIndicLanguages and easternArabicIndicLanguages(3). List of languages separated by coma.  

See also the arabic countries table.

(2) Locales are also supported (ar_sa) and, if the specified locale is not found, the generic language is used (in this case, ar).

(3) Numbers entered with keyboard are replaced by their equivalents in the numerals assigned to the current editor language.

Output values

When using the library to call the different services, some additional output values are returned.

Render service output values
Key Description Values Example
baseline The distance from the top of the formula to the baseline of the generated image. A number. 16
width The width in pixels of the generated image. A number. 100
height The height in pixels of the generated image. A number. 24