<t-var>

Declares a variable without showing anything. Use it for values that only appear in formulas, or to keep a variable's settings out of the prose.

E_k = \tfrac{1}{2}\,\tangle[m]{m}\,\tangle[v]{v}^2 = \val[%.1f]{0.5 * m * v ** 2}\ \text{J}

A kg ball at m/s carries joules.

The formula's m and v are draggable. They show their symbols until you drag them. The sentence holds two plain <t-num> views of the same variables, and hovering one highlights its twin in the formula.

Attributes

AttributeDefaultDescription
namerequiredThe variable to declare.
valueundefinedThe starting value. Ignored if the variable was already given a value.
min, maxunboundedThe range for every control bound to this variable.
step1The drag and keyboard increment, and the default display precision.
formatfrom stepThe default format wherever the variable is shown, including \tangle{} in formulas.
coloraccent colorOne CSS color, or two separated by a space for light and dark mode.
labelthe nameThe accessible name.
pixels-per-step5Drag sensitivity.
previousA variable to hold the value from before the last drag or edit (useful for \tangle{} parameters and <t-jsxgraph> points).

These are the same settings as <t-num>; a <t-var> simply doesn't render.

When to use it