SiOptions class final

siunitx's settings (\sisetup{…}, a command's […]) and declarations (\DeclareSIUnit, \DeclareSIPrefix, \DeclareSIQualifier, \DeclareSIPower).

Options this implementation does not use are accepted and ignored: table layout (table-*), fonts and modes (mode, number-mode, unit-mode, reset-*, text-*, propagate-math-font), line breaking (allow-*-breaks), evaluate-expression/expression, prefix-mode (prefixes are printed as given), *-exponents (each number keeps its own exponent), *-independent-prefix, uncertainty-descriptors, input-* other than input-decimal-markers, extract-mass-in-kilograms, forbid-literal-units, per-symbol-script-correction, digit-group-* other than the sizes, final-digit-group-min-size, sexagesimal-*, fill-duration-*.

Constructors

SiOptions({PerMode perMode = PerMode.power})
Creates options; the defaults are siunitx's.
const
SiOptions.parse(String? text)
Reads key = value pairs (siunitx's names; unknown keys are kept and have no effect).
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
perMode → PerMode
How \per is written when no per-mode key says otherwise.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(String? text) → SiOptions
These options with the key = value pairs of text set.
declarePower(String before, String after, String power) → SiOptions
\DeclareSIPower{\before}{\after}{power}.
declarePrefix(String name, String symbol) → SiOptions
\DeclareSIPrefix{\name}{symbol}{power}.
declareQualifier(String name, String symbol) → SiOptions
\DeclareSIQualifier{\name}{symbol}.
declareUnit(String name, String definition, [String? options]) → SiOptions
\DeclareSIUnit[options]{\name}{definition}.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String key) → String
The value of key, or siunitx's default.