Template:U/doc

Usage
This template is multi-purpose:


 * 1) Format the units notation such that it can be compactly displayed in tables, etc.
 * 2) Remove the units for certain pages (currently /Sandbox and /Data pages) that may need to do math with the numeric (magnitude) value.
 * 3) Specify conditions under which the data is valid.

Please see Oxygen/Boiling_point, Unit/Doc/Properties, and Unit/Doc/Data for examples of usage in context.

Example:

gives:

Explanation of code
The behavior is controlled (#switched) by the SUBPAGENAME.


 * In the case the subpage is a /Doc, a /doc, or a /Properties, Show a small, bold, italicized, unit with an asterisk for note (#if:  ), sword for note2 (#if:  ), etc.  Don't actually show the notes themselves.


 * In the case the subpage is a /Sandbox or a /Data page, do nothing. don't include any unit info.  This subpage can do arithmetic operations on the data and won't want pesky unit information making things difficult.


 * In the case of SUBPAGENAME = BASEPAGENAME, we are in an article! Just show a small, bold, italicized, unit with an asterisk if there are notes.  Don't actually show the notes themselves, or even more symbols if there are multiple notes.

* Then do a line break and show each symbol again, †followed by it's note. ‡Up to three notes are supported, separated by line breaks.
 * In all other cases show:
 * the small, bold, italicized,  unit *†‡ immediately followed by any symbols indicating notes.