
Units (Creators)
How to author unit blanks and use variables with units
Units: Creator Guide
This document explains how content creators author unit blanks in Fill-In-The-Blank (FITB) exercises and how units are used in MathMatize variables.
Authoring unit blanks
Blank type: When creating a new blank choose the unit blank type. This enables unit-aware validation and parsing.
Allowed input: Unit blanks accept a constant numeric expression combined with a unit.
Expressions can also include MathMatize variables, e.g. [[v1]], as long as the expression evaluates to a constant.
MathMatize supports a variety of SI and non-metric units used across many fields in science.
Metric units support prefixes like k or kilo, and many units accept both a full name and an abbreviation.
For a list of SI prefixes supported by MathMatize please visit the NIST SI Prefixes page.
Physical Keyboard: Units can be typed using the <unit> syntax, e.g. <m>, <cm>, <millimeter>, <N>.
Compound units can be entered by typing the usual operators, e.g. / for "per", and ^ for exponents: <m>, <cm>, <N><m>, <kg><m>/<s>^2.
Note: prefix "micro" can be entered as u, e.g. <us> for microsecond.
Virtual Keyboard: Units can also be entered by activating the input's virtual keyboard. When units are allowed in the expression, students can open the "Units" dialog from the numeric layer of the virtual keyboard. The dialog lists supported units grouped by category, e.g. length, time, mass, energy, etc. A prefix can optionally be chosen by dragging a slider. All compatible units in the dialog will now display the chosen prefix prepended to the unit. Hence, a unit with the desired prefix can be inserted by adjusting the slider first and then clicking the unit.
Tolerance: Only tolerance expressed as a percentage or significant digits are compatible with unit blanks.
Grading: Student responses will be graded as correct if (a) the response uses a compatible unit, and (b) the response converted to the unit used in the blank constraint is within the blank tolerance.
Using MathMatize variables with units
Units can be used to define MathMatize variables.
These variables can then be inserted in unit blanks by referencing them with the [[variable_name]] syntax inside blank constraints.
The engine substitutes variable values (including units) before validation.
Similar to unit blanks, variable expressions, e.g. x <cm> are not supported in MathMatize variables.
See also: