Difference between revisions of "OPTIONS"

From iMath
Jump to: navigation, search
Line 16: Line 16:
  
 
==== Precision of numbers ====
 
==== Precision of numbers ====
<code>precision = [[integer]]</code> 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 <code>fixedpoint</code> influences the interpretation of the precision.
+
<code>precision = [[integer]]</code> 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 <code>fixedpoint</code> influences the interpretation of the precision. The default is <code>precision = 4</code>.
  
The calculation precision of iMath is 17, so there is no point in specifying a higher precision.
+
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 ====
 
==== Fixed or floating point notation of numbers ====
Line 24: Line 24:
  
 
==== Minimum positive exponent ====
 
==== Minimum positive exponent ====
<code>highsclimit = [[integer]]</code> 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 value is 4. Available from iMath 2.2.10 onward.
+
<code>highsclimit = [[integer]]</code> 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 <code>highsclimit = 4</code>. Available from iMath 2.2.10 onward.
  
 
==== Maximum negative exponent ====
 
==== Maximum negative exponent ====
<code>lowsclimit = [[integer]]</code> 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 value is 4. Available from iMath 2.2.10 onward.
+
<code>lowsclimit = [[integer]]</code> 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 <code>lowsclimit = 4</code>. Available from iMath 2.2.10 onward.
  
 
==== Fixed exponent ====
 
==== Fixed exponent ====
<code>exponent = +&#124;-[[integer]]</code> Specifies that all numbers should be printed in scientific notation with the given exponent.
+
<code>exponent = +&#124;-[[integer]]</code> Specifies that all numbers should be printed in scientific notation with the given exponent. The default is <code>exponent = 0</code>, which suppresses this option.
  
 
==== Display of differentials ====
 
==== Display of differentials ====
<code>difftype = "line" &#124; "dot" &#124; "dfdt"</code> Specifies how differentials should be printed: With an apostrophe after the variable name ([https://en.wikipedia.org/wiki/Notation_for_differentiation#Lagrange.27s_notation f']), with a dot on top of the variable name ([https://en.wikipedia.org/wiki/Newton%27s_notation#Newton.27s_notation dot f]) or as [https://en.wikipedia.org/wiki/Leibniz_notation df/dt].  
+
<code>difftype = "line" &#124; "dot" &#124; "dfdt"</code> Specifies how differentials should be printed: With an apostrophe after the variable name ([https://en.wikipedia.org/wiki/Notation_for_differentiation#Lagrange.27s_notation f']), with a dot on top of the variable name ([https://en.wikipedia.org/wiki/Newton%27s_notation#Newton.27s_notation dot f]) or as [https://en.wikipedia.org/wiki/Leibniz_notation df/dt]. The default is <code>difftype = "dfdt"</code>
  
 
==== Automatic fraction sizing ====
 
==== Automatic fraction sizing ====
<code>autofraction = true &#124; false</code> Specifies whether iMath should automatically diminish the text size in cascaded fractions. The minimum size that will be used can be specified by <code>minimumtextsize</code>. Default is true.
+
<code>autofraction = true &#124; false</code> Specifies whether iMath should automatically diminish the text size in cascaded fractions. The minimum size that will be used can be specified by <code>minimumtextsize</code>. The default is <code>autofraction = true</code>
  
 
==== Minimum fraction text size ====
 
==== Minimum fraction text size ====
<code>minimumtextsize = [[integer]]</code> Specifies the minimum text size iMath will use for cascaded fractions. Default is 5pt.
+
<code>minimumtextsize = [[integer]]</code> Specifies the minimum text size in points that iMath will use for cascaded fractions. The default is <code>minimumtextsize = 5</code>
  
 
==== Automatic formatting of iFormulas ====
 
==== Automatic formatting of iFormulas ====
Line 45: Line 45:
  
 
==== Automatic aligning of iFormulas ====
 
==== Automatic aligning of iFormulas ====
<code>autoalign = true &#124; false</code> Specifies whether iMath should automatically align multi-line formulas at the equation symbol. Consecutive formulas must be [[merge|merged]] for this option to have any effect.
+
<code>autoalign = true &#124; false</code> Specifies whether iMath should automatically align multi-line formulas at the equation symbol. Consecutive formulas must be [[merge|merged]] for this option to have any effect. The default is <code>autoalign = true</code>
  
 
==== Automatic chaining of iFormulas ====
 
==== Automatic chaining of iFormulas ====
<code>autochain = true &#124; false</code> 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 [[merge|merged]] for this option to have any effect.
+
<code>autochain = true &#124; false</code> 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 [[merge|merged]] for this option to have any effect. The default is <code>autochain = true</code>
  
 
==== Automatic text mode ====
 
==== Automatic text mode ====
<code>autotextmode = true &#124; false</code> Specifies whether iMath should automatically recognize formulas that are not on a line by themselves and set the text mode flag on them. Default is false.
+
<code>autotextmode = true &#124; false</code> 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 <code>autotextmode = false</code>
  
 
==== Inhibit underflow exceptions ====   
 
==== Inhibit underflow exceptions ====   
Line 60: Line 60:
  
 
==== Allow implicit multiplication ====
 
==== Allow implicit multiplication ====
<code>implicitmul = true &#124; false</code> Specifies whether iMath should be able to infer a multiplication symbols between two adjacent variabels, e.g. <code>y = a x^2 + b x + c</code>. Turning off implicit multiplication forces the notation for this example to be e.g. <code>y = a cdot x^2 + b cdot x + c</code>.
+
<code>implicitmul = true &#124; false</code> Specifies whether iMath should be able to infer a multiplication symbols between two adjacent variabels, e.g. <code>y = a x^2 + b x + c</code>. Turning off implicit multiplication forces the notation for this example to be e.g. <code>y = a cdot x^2 + b cdot x + c</code>. The default is <code>implicitmul = true</code>
  
 
==== Show equation labels ====
 
==== Show equation labels ====
<code>showlabels = true &#124; false</code> Specifies whether iMath should print the equation label before the equation. This is useful  for quickly referencing earlier equations e.g. in [[SUBST]].
+
<code>showlabels = true &#124; false</code> 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 <code>showlabels = false</code>
  
 
==== Echo formula text ====
 
==== Echo formula text ====
<code>echo = true &#124; false</code> Specifies whether iMath should echo the formula text (the whole line beginning with <code>%%ii</code> before printing the result of the formula.
+
<code>echo = true &#124; false</code> Specifies whether iMath should echo the formula text (the whole line beginning with <code>%%ii</code> before printing the result of the formula. The default is <code>echo = false</code>
 
|3=
 
|3=
 
|4=
 
|4=

Revision as of 19:06, 15 November 2020

Syntax

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

Implemented in iMath since version 2.2.2 or earlier. The echo option is available since version 2.2.8.

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

Example

See also