OPTIONS

From iMath
Jump to navigation Jump to search

Syntax

OPTIONS { key = value ; key = value ; ... }

Implemented in iMath since version 2.2.0 or earlier.

Explanation

Please note that not all combinations of the following options make sense. Here are two examples

  • precision=0;fixedpoint=false It is not possible to display any number with zero significant digits
  • x=12.3456 with precision=0;fixedpoint=true;exponent=2 Fixed point and zero precision forces iMath to display no digits after the decimal marker. But the exponent of 2 results in a number smaller than 1 being printed. The result will be 0. cdot 10^2.

The following key-value pairs are possible:

Default units

units = { unit list } Specifies a list of units separated by ; which should be used for printing quantities. If no such list is specified, the SI base units are used, unless default units where specified in the document settings. The order in which the units are specified is important: Simple units should be specified first, more complex ones that depend on the simpler units afterwards.

Suppress display of units

suppress_units = true | false Specifies whether units should be suppressed when printing formulas or evaluation results. The default is suppress_units = false. Note that calculations will always be made with units. This option simply suppresses unit display.

Precision of numbers

precision = integer Specifies what precision is to be used for printing floating point numbers. The precision is the number of digits printed. If the result has more digits, they will be rounded away. The precision is 4 by default. The option fixedpoint influences the interpretation of the precision. The default is precision = 4.

The internal calculation precision of iMath is 17, so there is no point in specifying a higher precision.

Fixed or floating point notation of numbers

fixedpoint = true | false Specifies whether floating point numbers should be printed with a fixed number of digits after the decimal marker (true) or with a fixed number of significant digits, not counting leading zeros (false). The default is fixedpoint = false.

Minimum positive exponent

highsclimit = integer Specifies the minimum positive exponent to use for floating point numbers. For example, if this value is 4, then numbers less than 10000 will be printed without an exponent. The default is highsclimit = 4. Available from iMath 2.2.10 onward.

Maximum negative exponent

lowsclimit = integer Specifies the maximum negative exponent to use for floating point numbers. For example, if this value is 4, then numbers larger than 0.0001 will be printed without an exponent. The default is lowsclimit = 4. Available from iMath 2.2.10 onward.

Fixed exponent

exponent = +|-integer Specifies that all numbers should be printed in scientific notation with the given exponent. The default is exponent = 0, which suppresses this option.

Display of differentials

difftype = "line" | "dot" | "dfdt" Specifies how differentials should be printed: With an apostrophe after the variable name (f'), with a dot on top of the variable name (dot f) or as df/dt. The default is difftype = "dfdt".

Automatic fraction sizing

autofraction = true | false Specifies whether iMath should automatically diminish the text size in cascaded fractions. The minimum size that will be used can be specified by minimumtextsize. The default is autofraction = true.

Minimum fraction text size

minimumtextsize = integer Specifies the minimum text size in points that iMath will use for cascaded fractions. The default is minimumtextsize = 5.

Automatic formatting of iFormulas

autoformat = true | false Specifies whether iMath should do automatic formatting of your input equations. By default this option is turned off (false, meaning that the equations are printed exactly as you typed them). This of course is only possible for original equations, not for equations obtained by symbolic operations.

Automatic aligning of iFormulas

autoalign = true | false Specifies whether iMath should automatically align multi-line formulas at the equation symbol. Consecutive formulas must be merged for this option to have any effect. The default is autoalign = true.

Automatic chaining of iFormulas

autochain = true | false Specifies whether iMath should omit the left hand side of an equation in multi-line formulas if it is identical to the previous line's left hand side. Consecutive formulas must be merged for this option to have any effect. The default is autochain = true.

Automatic text mode

autotextmode = true | false Specifies whether iMath should automatically recognize formulas that are not on a line by themselves and set the text mode flag on them. The default is autotextmode = false.

Inhibit underflow exceptions

underflow = true | false Specifies whether iMath should silently ignore underflow exceptions. The default value is underflow = true. In this case numbers smaller than the underflow limit will be treated as zero.

Evaluate odd nth roots of negative bases to the real value

realroots = true | false Specifies whether iMath should return real nth roots as the result of VAL where the base is negative. By default, the root on the principal branch is returned (which is complex for negative bases). For example, the third root of -1 would be returned as 1/2 + 1/2 * sqrt(3) * I.

Allow implicit multiplication

implicitmul = true | false Specifies whether iMath should be able to infer a multiplication symbols between two adjacent variabels, e.g. y = a x^2 + b x + c. Turning off implicit multiplication forces the notation for this example to be e.g. y = a cdot x^2 + b cdot x + c. The default is implicitmul = true.

Show equation labels

showlabels = true | false Specifies whether iMath should print the equation label before the equation. This is useful for quickly referencing earlier equations e.g. in SUBST. The default is showlabels = false.

Echo formula text

echo = true | false Specifies whether iMath should echo the formula text (the whole line beginning with %%ii before printing the result of the formula. The default is echo = false. Available from iMath 2.2.8 onward.

Example

See also