Units with Scalars

To directly combine units with numbers and other units, AutoMathic requires that a few special conventions be followed.  These rules will ensure that units are unambiguously communicated, but still allow some freedom of expression.  The rules are listed here with representative examples:

Units

Simple Unit A single word or abbreviation.  Abbreviations must NOT include periods (e.g. "ft."):
e.g. mile
mi
Compound Unit Multiple words or abbreviations.  Depending on its context, a "compound unit" may have to be enclosed in parentheses:
e.g. feet per second
(miles per hour)
(mi/hr)

AutoMathic's library has some common compound unit abbreviations already defined:

Since their definitions already include enclosing parentheses, a predefined abbreviation of a compound unit can be treated like a "simple unit" and be used without parentheses.

Unit Phrases

Unit Phrases combine properties, scalars, and/or units into a cohesive whole that defines a measurement.  In Unit Phrases, simple or compound units can be enclosed in square brackets to simplify and shorten the unit phrase.

Unit Phrase A "unit phrase" can be a property, followed by "measured in" or "in terms of", optionally followed by the word "unit" or "units", followed by a "unit".  If you enclose the units in square brackets, the optional word "unit" or "units" can always be omitted:
e.g. speed measured in units miles per hour
speed measured in [miles per hour]
speed in terms of miles per hour
speed in terms of [miles per hour]

A "unit phrase" can be a property, followed by "in", followed by the word "unit" or "units", followed by a "unit".  If you enclose the units in square brackets, the word "unit" or "units" can be omitted:
e.g. heights in unit centimeters
heights in [centimeters]
speed in units mi/hr
speed in [mi/hr]

A "unit phrase" can be a quantity, followed by the word "unit" or "units", followed by a "unit".  If you enclose the units in square brackets, the word "unit" or "units" can be omitted.  Spaces are not required around the square brackets:
e.g. 210 unit pounds
210 [pounds]
210[pounds]

A compound unit following a quantity must be enclosed in parentheses or square brackets, but built-in abbreviations of compound units can be treated like simple units since their definitions include enclosing parentheses.
e.g. 145 unit (mi/hr)
145 [mi/hr]
145 unit mph
145[mph]

Rules-of-Thumb

Three simple rules-of-thumb for units and unit phrases are:

  1. "measured in" or "in terms of" should go between a property (e.g. distance) and its unit (e.g. kilometers).  If the unit is in square brackets, the word "in" is sufficient.

  2. A unit following a quantity must be preceded by the word "unit" unless the unit is enclosed in square brackets.

  3. A compound unit following a quantity requires enclosing parentheses or square brackets.

Common Usage

The "unit" and "unit phrase" building-blocks can be used in a number of ways: