Difference between revisions of "Module:Val/units"

From blackwiki
Jump to navigation Jump to search
blackwiki>Cpiral
(fix uM)
blackwiki>Cpiral
(wikilink version, with top comments; thoroughly tested, but units themselves not polished yet)
Line 1: Line 1:
-- Definitions for units known to val (short scale; see below for long scale).
+
-- Definitions for units known to val
-- There must be two or more spaces (not tab characters) after the first column,
+
-- File format is two strings and a return statement with them in it:
-- and two spaces (or one or more tab characters) between columns.
+
-- string in quotes [=[ ... builtin_units ... ]=].
-- Lines which do not have two spaces are ignored.
+
-- string in quotes [=[ ... builtin_units_long_scale ... ]=].
-- There must be a blank line before the first unit and after the last.
+
-- First string, builtin_units, is short-scale, second string is long scale.
-- Unit code       Symbol                               Link                                  Flags/Scale
+
 
 +
-- Entry format:
 +
-- One record per line, starting in first column, having 2-4 fields.
 +
-- Field separator: two or more spaces
 +
-- Between first and second fields: two or more spaces
 +
-- Between all other fields: two or more spaces, or one or more tabs
 +
-- Entries without two spaces in them are ignored.
 +
 
 +
-- There must be a blank line before the first entry and after the last.
 +
-- I.e. the first two and last two characters of the string must be newlines.
 +
 
 +
-- Format of entry. Two record types:
 +
--
 +
-- One record type is a wikilink:
 +
-- Unit-code       [[pagename|Symbol-accepts-HTML-only]]
 +
-- Text-field separator is still two spaces.
 +
--
 +
-- The other record type is all fields:
 +
-- Unit-code        symbol-accepts-HTML-only        pagename#section-OK
 +
--
 +
-- Plus there is an optional field that goes at the end after two or more spaces.
 +
-- Whether it is a number or an equation or the letters SI,
 +
-- any of these three has the same function: a wikitable sorting "scale".
 +
-- It is for sorting, and it works for either record type.
 +
-- Difference is SI can't accept HTML.  But SI correctly scales any SI prefix.
 +
-- (Optional fields ALIAS and NOSPACE and ANGLE are for advanced users.)
 +
 
 +
-- "Invalid unit" error:
 +
-- Using SI requires that the symbol equal unit-code, so never allows HTML.
 +
-- Any difference between SI or symbol must be an SI prefix, such as k, M, or G.
 +
-- A space at the end of an entry is an error.  No space at each EOL.
 +
 
 
local builtin_units = [=[
 
local builtin_units = [=[
  
Line 10: Line 41:
 
Foo  [[Hz|<samp>Foo</samp>]]
 
Foo  [[Hz|<samp>Foo</samp>]]
 
Baz  [[Hertz|baz<sub>0</sub>]]
 
Baz  [[Hertz|baz<sub>0</sub>]]
Bar  bar<abbr title="super duper">0</abbr>   Foobar
+
Bar  [[Foobar|bar<abbr title="super duper">0</abbr>]]
 +
quux  [[Foobar|<span title="super duper 2">bar0</span>]]
  
 
== Unsorted units ==
 
== Unsorted units ==
c0  ''c''<sub>0</sub> Speed of light#Numerical value, notation, and units
+
c0  [[Speed of light#Numerical value, notation, and units|''c''<sub>0</sub>]]
lbf               <span title="pound-force">lb<sub>F</sub></span> Pound (force)
+
lbf [[Pound (force)|<span title="pound-force">lb<sub>F</sub></span> ]]
lbf                lb<sub>F</sub>                        Pound (force)
+
C/mol [[Faraday constant|C/mol]]
C/mol             C/mol                                 Faraday constant
+
C.mol-1 [[Faraday constant|C&sdot;mol<sup>−1</sup>]]
C.mol-1           C&sdot;mol<sup>−1</sup>               Faraday constant
+
C/kg [[Roentgen (unit)|C/kg]]
C/kg               C/kg                                  Roentgen (unit)
+
C.kg-1 [[Roentgen (unit)|C&sdot;kg<sup>−1</sup>]]
C.kg-1             C&sdot;kg<sup>−1</sup>               Roentgen (unit)
+
F.m-1 [[vacuum permittivity|F&sdot;m<sup>−1</sup>]]
F.m-1             F&sdot;m<sup>−1</sup>                 vacuum permittivity
+
F/m [[vacuum permittivity|F/m]]
F/m               F/m                                   vacuum permittivity
+
e [[Elementary charge|''e'']]
e                 ''e''                                 Elementary charge
 
  
 
== Time and frequency ==
 
== Time and frequency ==
byte               byte                                 Byte                                  8
+
byte [[Byte|byte]]  8
byte/s             byte/s                               Bytes per second                      8
+
byte/s [[Bytes per second|byte/s]]  8
kB/s               kB/s                                 Bytes per second                      8e3
+
kB/s [[Bytes per second|kB/s]]  8e3
MB/s               MB/s                                 Bytes per second                      8e6
+
MB/s [[Bytes per second|MB/s]]  8e6
GB/s               GB/s                                 Bytes per second                      8e9
+
GB/s [[Bytes per second|GB/s]]  8e9
TB/s               TB/s                                 Bytes per second                      8e12
+
TB/s [[Bytes per second|TB/s]]  8e12
bit/s             bit/s                                 Bit per second                         1
+
bit/s [[Bit per second|bit/s]]  1
bps                bit/s                                 Bit per second                        1
+
bps  [[Bit per second|bit/s]]  1
kbit/s             kbit/s                               Kilobit per second                    1e3
+
kbit/s [[Kilobit per second|kbit/s]]  1e3
Mbit/s             Mbit/s                               Megabit per second                    1e6
+
Mbit/s [[Megabit per second|Mbit/s]]  1e6
Gbit/s             Gbit/s                               Gigabit per second                    1e9
+
Gbit/s [[Gigabit per second|Gbit/s]]  1e9
Tbit/s             Tbit/s                               Terabit per second                    1e12
+
Tbit/s [[Terabit per second|Tbit/s]]  1e12
year               year                                 Year                                  31557600
+
year [[Year|year]]  31557600
years             years                                 Year                                  31557600
+
years [[Year|years]]  31557600
yr                 yr                                    Year#Symbols y and yr                 31557600
+
yr [[Year#Symbols y and yr|yr]]  31557600
y                 y                                     Year                                  31557600
+
y [[Year|y]]  31557600
a                 a                                     Annum                                  31557600
+
a [[Annum|a]]  31557600
Ga                 Ga                                   Gigaannum                              31557600000000000
+
Ga [[Gigaannum|Ga]]  31557600000000000
Ma                 Ma                                   Megaannum                              31557600000000
+
Ma [[Megaannum|Ma]]  31557600000000
ka                 ka                                   Kiloannum                              31557600000
+
ka [[Kiloannum|ka]]  31557600000
kyr               kyr                                   kyr                                   31557600000
+
kyr [[kyr|kyr]]  31557600000
kya               kya                                   kyr                                    31557600000
+
kya [[kyr|kya]]  31557600000
myr               myr                                   myr                                   31557600000000
+
myr [[myr|myr]]  31557600000000
mya               mya                                  Mya (unit)                             31557600000000
+
mya [[Mya (unit)|mya]]  31557600000000
byr               byr                                  Billion years                         31557600000000000
+
byr [[Billion years|byr]]  31557600000000000
bya               bya                                  Billion years ago                     31557600000000000
+
bya [[Billion years ago|bya]]  31557600000000000
Gyr               Ga                                    Year#SI prefix multipliers             31557600000000000
+
Gyr [[Year#SI prefix multipliers|Ga]]  31557600000000000
BP                 BP                                    Before present
+
BP [[Before present|BP]]
uBP               <sup>14</sup>C yr BP                 Radiocarbon dating#Calibration
+
uBP [[Radiocarbon dating#Calibration|<sup>14</sup>C yr BP]]
BC                 BC                                    Before Christ                         -1
+
BC [[Before Christ|BC]]  -1
AD                 AD                                    Anno Domini                           1
+
AD [[Anno Domini|AD]]  1
BCE               BCE                                  Before the Common Era                 -1
+
BCE [[Before the Common Era|BCE]]  -1
CE                 CE                                    Common Era                             1
+
CE [[Common Era|CE]]  1
  
s-1               s<sup>−1</sup>                       Second
+
s-1 [[Second|s<sup>−1</sup>]]
s-2               s<sup>−2</sup>                       Second
+
s-2 [[Second|s<sup>−2</sup>]]
s2                 s<sup>2</sup>                         Second
+
s2 [[Second|s<sup>2</sup>]]
  
s                 s                                     Second                                SI
+
s [[Second|s]]  SI
as                 s                                    Attosecond                             SI
+
as [[Attosecond|as]]  SI
cs                 s                                    Second                                 SI
+
cs [[Second|cs]]  SI
das               s                                    Second                                 SI
+
das [[Second|das]]  SI
ds                 s                                    Second                                 SI
+
ds [[Second|ds]]  SI
Es                 s                                    Second                                 SI
+
Es [[Second|Es]]  SI
fs                 s                                    Femtosecond                           SI
+
fs [[Femtosecond|fs]]  SI
Gs                 s                                    Second                                 SI
+
Gs [[Second|Gs]]  SI
hs                 s                                    Second                                 SI
+
hs [[Second|hs]]  SI
ks                 s                                    Second                                 SI
+
ks [[Second|ks]]  SI
ms                 s                                    Millisecond                           SI
+
ms [[Millisecond|ms]]  SI
µs                 s                                    Microsecond                           SI
+
µs [[Microsecond|µs]]  SI
mus               s                                    Microsecond                           SI
+
mus [[Microsecond|mus]]  SI
Ms                 s                                    Second                                 SI
+
Ms [[Second|Ms]]  SI
ns                 s                                    Nanosecond                             SI
+
ns [[Nanosecond|ns]]  SI
ps                 s                                    Picosecond                             SI
+
ps [[Picosecond|ps]]  SI
Ps                 s                                    Second                                 SI
+
Ps [[Second|Ps]]  SI
Ts                 s                                    Second                                 SI
+
Ts [[Second|Ts]]  SI
Ys                 s                                    Second                                 SI
+
Ys [[Second|Ys]]  SI
ys                 s                                    Yoctosecond                           SI
+
ys [[Yoctosecond|ys]]  SI
Zs                 s                                    Second                                 SI
+
Zs [[Second|Zs]]  SI
zs                 s                                    Zeptosecond                           SI
+
zs [[Zeptosecond|zs]]  SI
  
Hz                 Hz                                   Hertz                                  SI
+
Hz [[Hertz|Hz]]  SI
aHz               Hz                                    Hertz                                 SI
+
aHz [[Hertz|aHz]]  SI
cHz               Hz                                    Hertz                                 SI
+
cHz [[Hertz|cHz]]  SI
daHz               Hz                                    Hertz                                 SI
+
daHz [[Hertz|daHz]]  SI
dHz               Hz                                    Hertz                                 SI
+
dHz [[Hertz|dHz]]  SI
EHz               Hz                                    Hertz                                 SI
+
EHz [[Hertz|EHz]]  SI
fHz               Hz                                    Hertz                                 SI
+
fHz [[Hertz|fHz]]  SI
hHz               Hz                                    Hertz                                 SI
+
hHz [[Hertz|hHz]]  SI
GHz               Hz                                    Gigahertz                             SI
+
GHz [[Gigahertz|GHz]]  SI
kHz               Hz                                    Kilohertz                             SI
+
kHz [[Kilohertz|kHz]]  SI
MHz               Hz                                    Megahertz                             SI
+
MHz [[Megahertz|MHz]]  SI
mHz               Hz                                    Hertz                                 SI
+
mHz [[Hertz|mHz]]  SI
muHz               Hz                                    Hertz                                 SI
+
muHz [[Hertz|muHz]]  SI
µHz               Hz                                    Hertz                                 SI
+
µHz [[Hertz|µHz]]  SI
nHz               Hz                                    Hertz                                 SI
+
nHz [[Hertz|nHz]]  SI
pHz               Hz                                    Hertz                                 SI
+
pHz [[Hertz|pHz]]  SI
PHz               Hz                                    Hertz                                 SI
+
PHz [[Hertz|PHz]]  SI
THz               Hz                                    Hertz                                 SI
+
THz [[Hertz|THz]]  SI
yHz               Hz                                    Hertz                                 SI
+
yHz [[Hertz|yHz]]  SI
YHz               Hz                                    Hertz                                 SI
+
YHz [[Hertz|YHz]]  SI
zHz               Hz                                    Hertz                                 SI
+
zHz [[Hertz|zHz]]  SI
ZHz               Hz                                    Hertz                                 SI
+
ZHz [[Hertz|ZHz]]  SI
  
 
== Length, area, volume ==
 
== Length, area, volume ==
fb-1               fb<sup>−1</sup>                       Barn (unit)
+
fb-1 [[Barn (unit)|fb<sup>−1</sup>]]
mas               mas                                   Milliarcsecond                        pi/648000000
+
mas [[Milliarcsecond|mas]]  pi/648000000
m-1               m<sup>−1</sup>                       Metre
+
m-1 [[Metre|m<sup>−1</sup>]]
m-2               m<sup>−2</sup>                       Square metre
+
m-2 [[Square metre|m<sup>−2</sup>]]
m-3               m<sup>−3</sup>                       Cubic metre
+
m-3 [[Cubic metre|m<sup>−3</sup>]]
km2               km<sup>2</sup>                       Square kilometre
+
km2 [[Square kilometre|km<sup>2</sup>]]
km3               km<sup>3</sup>                       Cubic kilometre
+
km3 [[Cubic kilometre|km<sup>3</sup>]]
m                 m                                     Metre
+
m [[Metre|m]]
meter             m                                     Metre
+
meter [[Metre|m]]
metre             m                                     Metre
+
metre [[Metre|m]]
am                 am                                   Metre
+
am [[Metre|am]]
cm                 cm                                   Centimetre
+
cm [[Centimetre|cm]]
dam               dam                                   Decametre
+
dam [[Decametre|dam]]
dm                 dm                                   Decimetre
+
dm [[Decimetre|dm]]
Em                 Em                                   Metre
+
Em [[Metre|Em]]
fm                 fm                                   Metre
+
fm [[Metre|fm]]
Gm                 Gm                                   Metre
+
Gm [[Metre|Gm]]
hm                 hm                                   Hectometre
+
hm [[Hectometre|hm]]
km                 km                                   Kilometre
+
km [[Kilometre|km]]
Mm                 Mm                                   Megametre
+
Mm [[Megametre|Mm]]
mm                 mm                                   Millimetre
+
mm [[Millimetre|mm]]
mum               µm                                   Micrometre
+
mum [[Micrometre|µm]]
µm                 µm                                   Micrometre
+
µm [[Micrometre|µm]]
nm                 nm                                   Nanometre
+
nm [[Nanometre|nm]]
Pm                 Pm                                   Metre
+
Pm [[Metre|Pm]]
pm                 pm                                   Picometre
+
pm [[Picometre|pm]]
Tm                 Tm                                   Metre
+
Tm [[Metre|Tm]]
Ym                 Ym                                   Metre
+
Ym [[Metre|Ym]]
ym                 ym                                   Metre
+
ym [[Metre|ym]]
Zm                 Zm                                   Metre
+
Zm [[Metre|Zm]]
zm                 zm                                   Metre
+
zm [[Metre|zm]]
µm2               µm<sup>2</sup>                       Square metre
+
µm2 [[Square metre|µm<sup>2</sup>]]
am2                am<sup>2</sup>                       Square metre
+
am2  [[Square metre|am<sup>2</sup>]]
cm2               cm<sup>2</sup>                       Square centimetre
+
cm2 [[Square centimetre|cm<sup>2</sup>]]
dam2               dam<sup>2</sup>                       Square metre
+
dam2 [[Square metre|dam<sup>2</sup>]]
dm2                dm<sup>2</sup>                       Square metre
+
dm2  [[Square metre|dm<sup>2</sup>]]
Em2                Em<sup>2</sup>                       Square metre
+
Em2  [[Square metre|Em<sup>2</sup>]]
fm2                fm<sup>2</sup>                       Square metre
+
fm2  [[Square metre|fm<sup>2</sup>]]
Gm2                Gm<sup>2</sup>                       Square metre
+
Gm2  [[Square metre|Gm<sup>2</sup>]]
hm2                hm<sup>2</sup>                       Square metre
+
hm2  [[Square metre|hm<sup>2</sup>]]
mm2                mm<sup>2</sup>                       Square metre
+
mm2  [[Square metre|mm<sup>2</sup>]]
Mm2                Mm<sup>2</sup>                       Square metre
+
Mm2  [[Square metre|Mm<sup>2</sup>]]
nm2                nm<sup>2</sup>                       Square metre
+
nm2  [[Square metre|nm<sup>2</sup>]]
pm2                pm<sup>2</sup>                       Square metre
+
pm2  [[Square metre|pm<sup>2</sup>]]
Pm2                Pm<sup>2</sup>                       Square metre
+
Pm2  [[Square metre|Pm<sup>2</sup>]]
Tm2                Tm<sup>2</sup>                       Square metre
+
Tm2  [[Square metre|Tm<sup>2</sup>]]
ym2                ym<sup>2</sup>                       Square metre
+
ym2  [[Square metre|ym<sup>2</sup>]]
Ym2                Ym<sup>2</sup>                       Square metre
+
Ym2  [[Square metre|Ym<sup>2</sup>]]
zm2                zm<sup>2</sup>                       Square metre
+
zm2  [[Square metre|zm<sup>2</sup>]]
Zm2                Zm<sup>2</sup>                       Square metre
+
Zm2  [[Square metre|Zm<sup>2</sup>]]
gal               gal                                   Gallon
+
gal [[Gallon|gal]]
Gal               Gal                                  Gal (unit)
+
Gal [[Gal (unit)|Gal]]
muGal             µGal                                  Gal (unit)
+
muGal [[Gal (unit)|µGal]]
µGal               µGal                                  Gal (unit)
+
µGal [[Gal (unit)|µGal]]
mGal               mGal                                  Gal (unit)
+
mGal [[Gal (unit)|mGal]]
  
 
== Velocity and acceleration ==
 
== Velocity and acceleration ==
m/s2               m/s<sup>2</sup>                       Metre per second squared
+
m/s2 [[Metre per second squared|m/s<sup>2</sup>]]
m.s-2             m&sdot;s<sup>−2</sup>                 Metre per second squared
+
m.s-2 [[Metre per second squared|m&sdot;s<sup>−2</sup>]]
m/s               m/s                                   Metre per second
+
m/s [[Metre per second|m/s]]
m.s-1             m&sdot;s<sup>−1</sup>                 Metre per second
+
m.s-1 [[Metre per second|m&sdot;s<sup>−1</sup>]]
  
 
== Mass and energy ==
 
== Mass and energy ==
lbm               <span title="pound-mass">lb<sub>m</sub></span>   Pound (mass)
+
lbm [[Pound (mass)|<span title="pound-mass">lb<sub>m</sub></span>]]
muJ               µJ                                   Joule
+
muJ [[Joule|µJ]]
J.s               J&sdot;s                             Joule-second
+
J.s [[Joule-second|J&sdot;s]]
kWh               kWh                                  Kilowatt hour
+
kWh [[Kilowatt hour|kWh]]
kW.h               kW&sdot;h                             Kilowatt hour
+
kW.h [[Kilowatt hour|kW&sdot;h]]
kW·h              kW&sdot;h                             Kilowatt hour
+
kW·h  [[Kilowatt hour|kW&sdot;h]]
J/C               J/C                                   Volt
+
J/C [[Volt|J/C]]
J/kg               J/kg                                 Joule
+
J/kg [[Joule|J/kg]]
  
g                 g                                     Gram                              SI
+
g [[Gram|g]]  SI
ag                 g                                    Attogram                           SI
+
ag [[Attogram|ag]]  SI
cg                 g                                    Centigram                         SI
+
cg [[Centigram|cg]]  SI
dag               g                                    Gram                               SI
+
dag [[Gram|dag]]  SI
dg                 g                                    Decigram                           SI
+
dg [[Decigram|dg]]  SI
Eg                 g                                    Exagram                           SI
+
Eg [[Exagram|Eg]]  SI
fg                 g                                    Femtogram                         SI
+
fg [[Femtogram|fg]]  SI
Gg                 g                                    Gigagram                           SI
+
Gg [[Gigagram|Gg]]  SI
hg                 g                                    Hectogram                         SI
+
hg [[Hectogram|hg]]  SI
kg                 g                                    Kilogram                           SI
+
kg [[Kilogram|kg]]  SI
mcg               g                                    Microgram                         SI
+
mcg [[Microgram|mcg]]  SI
Mg                 g                                    Megagram                           SI
+
Mg [[Megagram|Mg]]  SI
mg                 g                                    Milligram                         SI
+
mg [[Milligram|mg]]  SI
mug               g                                    Microgram                         SI
+
mug [[Microgram|mug]]  SI
µg                 g                                    Microgram                         SI
+
µg [[Microgram|µg]]  SI
ng                 g                                    Nanogram                           SI
+
ng [[Nanogram|ng]]  SI
Pg                 g                                    Petagram                           SI
+
Pg [[Petagram|Pg]]  SI
pg                 g                                    Picogram                           SI
+
pg [[Picogram|pg]]  SI
Tg                 g                                    Tonne                             SI
+
Tg [[Tonne|Tg]]  SI
yg                 g                                    Yoctogram                         SI
+
yg [[Yoctogram|yg]]  SI
Yg                 g                                    Yottagram                         SI
+
Yg [[Yottagram|Yg]]  SI
zg                 g                                    Zeptogram                         SI
+
zg [[Zeptogram|zg]]  SI
Zg                 g                                    Zettagram                         SI
+
Zg [[Zettagram|Zg]]  SI
  
 
== Pressure and density ==
 
== Pressure and density ==
psi               psi                                  Pounds per square inch
+
psi [[Pounds per square inch|psi]]
g/cm3             g/cm<sup>3</sup>                     Gram per cubic centimetre
+
g/cm3 [[Gram per cubic centimetre|g/cm<sup>3</sup>]]
kg/m3             kg/m<sup>3</sup>                     Kilogram per cubic metre
+
kg/m3 [[Kilogram per cubic metre|kg/m<sup>3</sup>]]
kg/cm3             kg/cm<sup>3</sup>                     Density#Formula and common units
+
kg/cm3 [[Density#Formula and common units|kg/cm<sup>3</sup>]]
g/L               g/L                                   Gram per litre
+
g/L [[Gram per litre|g/L]]
g/l               g/L                                   Gram per litre
+
g/l [[Gram per litre|g/L]]
mcg/dL             µg/dL                                 Gram per litre
+
mcg/dL [[Gram per litre|µg/dL]]
mcg/dl             µg/dL                                 Gram per litre
+
mcg/dl [[Gram per litre|µg/dL]]
mg/mL             mg/mL                                Gram per litre
+
mg/mL  [[Gram per litre|mg/mL]]
mg/ml              mg/mL                                 Gram per litre
+
mg/ml  [[Gram per litre|mg/mL]]
mug/dL             µg/dL                                 Gram per litre
+
mug/dL [[Gram per litre|µg/dL]]
mug/dl             µg/dL                                Gram per litre
+
mug/dl [[Gram per litre|µg/dL]]
μg/dL             μg/dL                                 Gram per litre
+
μg/dL [[Gram per litre|μg/dL]]
μg/dl             μg/dL                                 Gram per litre
+
μg/dl [[Gram per litre|μg/dL]]
mg/Ll             mg/dL                                 Gram per litre
+
mg/Ll [[Gram per litre|mg/dL]]
 
mg/l  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
 
mg/l  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
 
mg/L  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
 
mg/L  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
Line 228: Line 259:
  
 
== Temperature ==
 
== Temperature ==
degC               °C                                                                       ALIAS
+
degC °C ALIAS
degF               °F                                                                       ALIAS
+
degF °F ALIAS
degR               °R                                                                       ALIAS
+
degR °R ALIAS
  
K                 K                                     Kelvin                            SI
+
K [[Kelvin|K]]  SI
YK                 K                                    Yottakelvin                       SI
+
YK [[Yottakelvin|YK]]  SI
ZK                 K                                    Zettakelvin                       SI
+
ZK [[Zettakelvin|ZK]]  SI
EK                 K                                    Kelvin                         SI
+
EK [[Kelvin|EK]]  SI
PK                 K                                    Petakelvin                         SI
+
PK [[Petakelvin|PK]]  SI
TK                 K                                    Terakelvin                         SI
+
TK [[Terakelvin|TK]]  SI
GK                 K                                    Gigakelvin                         SI
+
GK [[Gigakelvin|GK]]  SI
MK                 K                                    Megakelvin                         SI
+
MK [[Megakelvin|MK]]  SI
kK                 K                                    Kilokelvin                         SI
+
kK [[Kilokelvin|kK]]  SI
hK                 K                                    Hectokelvin                       SI
+
hK [[Hectokelvin|hK]]  SI
daK               K                                    Decakelvin                         SI
+
daK [[Decakelvin|daK]]  SI
dK                 K                                    Decikelvin                         SI
+
dK [[Decikelvin|dK]]  SI
cK                 K                                    Centikelvin                       SI
+
cK [[Centikelvin|cK]]  SI
mK                 K                                    Millikelvin                       SI
+
mK [[Millikelvin|mK]]  SI
µK                 K                                    Microkelvin                       SI
+
µK [[Microkelvin|µK]]  SI
uK                 K                                    Microkelvin                       SI
+
uK [[Microkelvin|uK]]  SI
nK                 K                                    Nanokelvin                         SI
+
nK [[Nanokelvin|nK]]  SI
pK                 K                                    Picokelvin                         SI
+
pK [[Picokelvin|pK]]  SI
fK                 K                                    Femtokelvin                       SI
+
fK [[Femtokelvin|fK]]  SI
aK                 K                                    Attokelvin                         SI
+
aK [[Attokelvin|aK]]  SI
zK                 K                                    Zeptokelvin                       SI
+
zK [[Zeptokelvin|zK]]  SI
yK                 K                                    Yoctokelvin                       SI
+
yK [[Yoctokelvin|yK]]  SI
  
 
== Electromagnetism ==
 
== Electromagnetism ==
Wb                 Wb                                    Weber (unit)
+
Wb [[Weber (unit)|Wb]]
N.A-2     N&sdot;A<sup>−2</sup>   Permeability (electromagnetism)
+
N.A-2 [[Permeability (electromagnetism)|N&sdot;A<sup>−2</sup>]]
H.m-1             H·m<sup>−1</sup>                     Permeability (electromagnetism)
+
H.m-1 [[Permeability (electromagnetism)|H·m<sup>−1</sup>]]
V/m               V/m                                   Electric field
+
V/m [[Electric field|V/m]]
V.m-1             V&sdot;m<sup>−1</sup>                 Electric field
+
V.m-1 [[Electric field|V&sdot;m<sup>−1</sup>]]
  
C                 C                                     Coulomb                            SI
+
C [[Coulomb|C]]  SI
YC  Coulomb  SI
+
YC  [[Coulomb|YC]] SI
ZC                 C                                    Coulomb                           SI
+
ZC [[Coulomb|ZC]]  SI
EC                 C                                    Coulomb                           SI
+
EC [[Coulomb|EC]]  SI
PC                 C                                    Coulomb                           SI
+
PC [[Coulomb|PC]]  SI
TC                 C                                    Coulomb                           SI
+
TC [[Coulomb|TC]]  SI
GC                 C                                    Coulomb                           SI
+
GC [[Coulomb|GC]]  SI
MC                 C                                    Coulomb                           SI
+
MC [[Coulomb|MC]]  SI
kC                 C                                    Coulomb                           SI
+
kC [[Coulomb|kC]]  SI
hC                 C                                    Coulomb                           SI
+
hC [[Coulomb|hC]]  SI
daC               C                                    Coulomb                           SI
+
daC [[Coulomb|daC]]  SI
dC                 C                                    Coulomb                           SI
+
dC [[Coulomb|dC]]  SI
cC                 C                                    Coulomb                           SI
+
cC [[Coulomb|cC]]  SI
mC                 C                                    Coulomb                           SI
+
mC [[Coulomb|mC]]  SI
µC                 C                                    Coulomb                           SI
+
µC [[Coulomb|µC]]  SI
uC                 C                                    Coulomb                           SI
+
uC [[Coulomb|uC]]  SI
nC                 C                                    Coulomb                           SI
+
nC [[Coulomb|nC]]  SI
pC                 C                                    Coulomb                           SI
+
pC [[Coulomb|pC]]  SI
fC                 C                                    Coulomb                           SI
+
fC [[Coulomb|fC]]  SI
aC                 C                                    Coulomb                           SI
+
aC [[Coulomb|aC]]  SI
zC                 C                                    Coulomb                           SI
+
zC [[Coulomb|zC]]  SI
yC                 C                                    Coulomb                           SI
+
yC [[Coulomb|yC]]  SI
  
F                 F                                     Farad                              SI
+
F [[Farad|F]]  SI
YF                 F                                    Farad                             SI
+
YF [[Farad|YF]]  SI
ZF                 F                                    Farad                             SI
+
ZF [[Farad|ZF]]  SI
EF                 F                                    Farad                             SI
+
EF [[Farad|EF]]  SI
PF                 F                                    Farad                             SI
+
PF [[Farad|PF]]  SI
TF                 F                                    Farad                             SI
+
TF [[Farad|TF]]  SI
GF                 F                                    Farad                             SI
+
GF [[Farad|GF]]  SI
MF                 F                                    Farad                             SI
+
MF [[Farad|MF]]  SI
kF                 F                                    Farad                             SI
+
kF [[Farad|kF]]  SI
hF                 F                                    Farad                             SI
+
hF [[Farad|hF]]  SI
daF               F                                    Farad                             SI
+
daF [[Farad|daF]]  SI
dF                 F                                    Farad                             SI
+
dF [[Farad|dF]]  SI
cF                 F                                    Farad                             SI
+
cF [[Farad|cF]]  SI
mF                 F                                    Farad                             SI
+
mF [[Farad|mF]]  SI
µF                 F                                    Farad                             SI
+
µF [[Farad|µF]]  SI
uF                 F                                    Farad                             SI
+
uF [[Farad|uF]]  SI
nF                 F                                    Farad                             SI
+
nF [[Farad|nF]]  SI
pF                 F                                    Farad                             SI
+
pF [[Farad|pF]]  SI
fF                 F                                    Farad                             SI
+
fF [[Farad|fF]]  SI
aF                 F                                    Farad                             SI
+
aF [[Farad|aF]]  SI
zF                 F                                    Farad                             SI
+
zF [[Farad|zF]]  SI
yF                 F                                    Farad                             SI
+
yF [[Farad|yF]]  SI
  
H                 H                                    Henry (unit)                       SI
+
H [[Henry (unit)|H]]  SI
YH                 H                                    Henry (unit)                       SI
+
YH [[Henry (unit)|YH]]  SI
ZH                 H                                    Henry (unit)                       SI
+
ZH [[Henry (unit)|ZH]]  SI
EH                 H                                    Henry (unit)                       SI
+
EH [[Henry (unit)|EH]]  SI
PH                 H                                    Henry (unit)                       SI
+
PH [[Henry (unit)|PH]]  SI
TH                 H                                    Henry (unit)                       SI
+
TH [[Henry (unit)|TH]]  SI
GH                 H                                    Henry (unit)                       SI
+
GH [[Henry (unit)|GH]]  SI
MH                 H                                    Henry (unit)                       SI
+
MH [[Henry (unit)|MH]]  SI
kH                 H                                    Henry (unit)                       SI
+
kH [[Henry (unit)|kH]]  SI
hH                 H                                    Henry (unit)                       SI
+
hH [[Henry (unit)|hH]]  SI
daH               H                                    Henry (unit)                       SI
+
daH [[Henry (unit)|daH]]  SI
dH                 H                                    Henry (unit)                       SI
+
dH [[Henry (unit)|dH]]  SI
cH                 H                                    Henry (unit)                       SI
+
cH [[Henry (unit)|cH]]  SI
mH                 H                                    Henry (unit)                       SI
+
mH [[Henry (unit)|mH]]  SI
µH                 H                                    Henry (unit)                       SI
+
µH [[Henry (unit)|µH]]  SI
uH                 H                                    Henry (unit)                       SI
+
uH [[Henry (unit)|uH]]  SI
nH                 H                                    Henry (unit)                       SI
+
nH [[Henry (unit)|nH]]  SI
pH                 H                                    Henry (unit)                       SI
+
pH [[Henry (unit)|pH]]  SI
fH                 H                                    Henry (unit)                       SI
+
fH [[Henry (unit)|fH]]  SI
aH                 H                                    Henry (unit)                       SI
+
aH [[Henry (unit)|aH]]  SI
zH                 H                                    Henry (unit)                       SI
+
zH [[Henry (unit)|zH]]  SI
yH                 H                                    Henry (unit)                       SI
+
yH [[Henry (unit)|yH]]  SI
  
A                 A                                     Ampere                            SI
+
A [[Ampere|A]]  SI
YA                 A                                    Ampere                             SI
+
YA [[Ampere|YA]]  SI
ZA                 A                                    Ampere                             SI
+
ZA [[Ampere|ZA]]  SI
EA                 A                                    Ampere                             SI
+
EA [[Ampere|EA]]  SI
PA                 A                                    Ampere                             SI
+
PA [[Ampere|PA]]  SI
TA                 A                                    Ampere                             SI
+
TA [[Ampere|TA]]  SI
GA                 A                                    Ampere                             SI
+
GA [[Ampere|GA]]  SI
MA                 A                                    Ampere                             SI
+
MA [[Ampere|MA]]  SI
kA                 A                                    Ampere                             SI
+
kA [[Ampere|kA]]  SI
hA                 A                                    Ampere                             SI
+
hA [[Ampere|hA]]  SI
daA               A                                    Ampere                             SI
+
daA [[Ampere|daA]]  SI
dA                 A                                    Ampere                             SI
+
dA [[Ampere|dA]]  SI
cA                 A                                    Ampere                             SI
+
cA [[Ampere|cA]]  SI
mA                 A                                    Ampere                             SI
+
mA [[Ampere|mA]]  SI
µA                 A                                    Ampere                             SI
+
µA [[Ampere|µA]]  SI
uA                 A                                    Ampere                             SI
+
uA [[Ampere|uA]]  SI
nA                 A                                    Ampere                             SI
+
nA [[Ampere|nA]]  SI
pA                 A                                    Ampere                             SI
+
pA [[Ampere|pA]]  SI
fA                 A                                    Ampere                             SI
+
fA [[Ampere|fA]]  SI
aA                 A                                    Ampere                             SI
+
aA [[Ampere|aA]]  SI
zA                 A                                    Ampere                             SI
+
zA [[Ampere|zA]]  SI
yA                 A                                    Ampere                             SI
+
yA [[Ampere|yA]]  SI
  
V                 V                                     Volt                              SI
+
V [[Volt|V]]  SI
YV                 V                                    Volt                               SI
+
YV [[Volt|YV]]  SI
ZV                 V                                    Volt                               SI
+
ZV [[Volt|ZV]]  SI
EV                 V                                    Volt                               SI
+
EV [[Volt|EV]]  SI
PV                 V                                    Volt                               SI
+
PV [[Volt|PV]]  SI
TV                 V                                    Volt                               SI
+
TV [[Volt|TV]]  SI
GV                 V                                    Volt                               SI
+
GV [[Volt|GV]]  SI
MV                 V                                    Volt                               SI
+
MV [[Volt|MV]]  SI
kV                 V                                    Volt                               SI
+
kV [[Volt|kV]]  SI
hV                 V                                    Volt                               SI
+
hV [[Volt|hV]]  SI
daV               V                                    Volt                               SI
+
daV [[Volt|daV]]  SI
dV                 V                                    Volt                               SI
+
dV [[Volt|dV]]  SI
cV                 V                                    Volt                               SI
+
cV [[Volt|cV]]  SI
mV                 V                                    Volt                               SI
+
mV [[Volt|mV]]  SI
µV                 V                                    Volt                               SI
+
µV [[Volt|µV]]  SI
uV                 V                                    Volt                               SI
+
uV [[Volt|uV]]  SI
nV                 V                                    Volt                               SI
+
nV [[Volt|nV]]  SI
pV                 V                                    Volt                               SI
+
pV [[Volt|pV]]  SI
fV                 V                                    Volt                               SI
+
fV [[Volt|fV]]  SI
aV                 V                                    Volt                               SI
+
aV [[Volt|aV]]  SI
zV                 V                                    Volt                               SI
+
zV [[Volt|zV]]  SI
yV                 V                                    Volt                               SI
+
yV [[Volt|yV]]  SI
  
R                 R                                    Rayleigh (unit)                   SI
+
R [[Rayleigh (unit)|R]]  SI
  
G                 G                                    Gauss (unit)                       SI
+
G [[Gauss (unit)|G]]  SI
aG                 G                                    Attogauss                         SI
+
aG [[Attogauss|aG]]  SI
cG                 G                                    Centigauss                         SI
+
cG [[Centigauss|cG]]  SI
daG               G                                    Decagauss                         SI
+
daG [[Decagauss|daG]]  SI
dG                 G                                    Decigauss                         SI
+
dG [[Decigauss|dG]]  SI
EG                 G                                    Exagauss                           SI
+
EG [[Exagauss|EG]]  SI
fG                 G                                    Femtogauss                         SI
+
fG [[Femtogauss|fG]]  SI
GG                 G                                    Gigagauss                         SI
+
GG [[Gigagauss|GG]]  SI
hG                 G                                    Hectogauss                         SI
+
hG [[Hectogauss|hG]]  SI
kG                 G                                    Kilogauss                         SI
+
kG [[Kilogauss|kG]]  SI
MG                 G                                    Megagauss                         SI
+
MG [[Megagauss|MG]]  SI
mG                 G                                    Milligauss                         SI
+
mG [[Milligauss|mG]]  SI
muG               G                                    Microgauss                         SI
+
muG [[Microgauss|muG]]  SI
µG                 G                                    Microgauss                         SI
+
µG [[Microgauss|µG]]  SI
nG                 G                                    Nanogauss                         SI
+
nG [[Nanogauss|nG]]  SI
PG                 G                                    Petagauss                         SI
+
PG [[Petagauss|PG]]  SI
pG                 G                                    Picogauss                         SI
+
pG [[Picogauss|pG]]  SI
TG                 G                                    Teragauss                         SI
+
TG [[Teragauss|TG]]  SI
yG                 G                                    Yoctogauss                         SI
+
yG [[Yoctogauss|yG]]  SI
YG                 G                                    Yottagauss                         SI
+
YG [[Yottagauss|YG]]  SI
zG                 G                                    Zeptogauss                         SI
+
zG [[Zeptogauss|zG]]  SI
ZG                 G                                    Zettagauss                         SI
+
ZG [[Zettagauss|ZG]]  SI
  
T                 T                                    Tesla (unit)                       SI
+
T [[Tesla (unit)|T]]  SI
aT                 T                                    Attotesla                         SI
+
aT [[Attotesla|aT]]  SI
cT                 T                                    Centitesla                         SI
+
cT [[Centitesla|cT]]  SI
daT               T                                    Decatesla                         SI
+
daT [[Decatesla|daT]]  SI
dT                 T                                    Decitesla                         SI
+
dT [[Decitesla|dT]]  SI
ET                 T                                    Exatesla                           SI
+
ET [[Exatesla|ET]]  SI
fT                 T                                    Femtotesla                         SI
+
fT [[Femtotesla|fT]]  SI
GT                 T                                    Gigatesla                         SI
+
GT [[Gigatesla|GT]]  SI
hT                 T                                    Hectotesla                         SI
+
hT [[Hectotesla|hT]]  SI
kT                 T                                    Kilotesla                         SI
+
kT [[Kilotesla|kT]]  SI
MT                 T                                    Megatesla                         SI
+
MT [[Megatesla|MT]]  SI
mT                 T                                    Millitesla                         SI
+
mT [[Millitesla|mT]]  SI
muT               T                                    Microtesla                         SI
+
muT [[Microtesla|muT]]  SI
µT   T  Microtesla  SI
+
µT [[Microtesla|µT]] SI
nT                 T                                    Nanotesla                         SI
+
nT [[Nanotesla|nT]]  SI
PT                 T                                    Petatesla                         SI
+
PT [[Petatesla|PT]]  SI
pT                 T                                    Picotesla                         SI
+
pT [[Picotesla|pT]]  SI
TT                 T                                    Teratesla                         SI
+
TT [[Teratesla|TT]]  SI
yT                 T                                    Yoctotesla                         SI
+
yT [[Yoctotesla|yT]]  SI
YT                 T                                    Yottatesla                         SI
+
YT [[Yottatesla|YT]]  SI
zT                 T                                    Zeptotesla                         SI
+
zT [[Zeptotesla|zT]]  SI
ZT                 T                                    Zettatesla                         SI
+
ZT [[Zettatesla|ZT]]  SI
  
 
== Astrophysics ==
 
== Astrophysics ==
au                 au                                    Astronomical unit
+
au [[Astronomical unit|au]]
c                 ''c''                                 Speed of light
+
c [[Speed of light|''c'']]
ly                 ly                                    Light-year
+
ly [[Light-year|ly]]
Earth mass         ''M''<sub>⊕</sub>                     Earth mass
+
Earth mass [[Earth mass|''M''<sub>⊕</sub>]]
Earth radius       ''R''<sub>⊕</sub>                     Earth radius
+
Earth radius  [[Earth radius|''R''<sub>⊕</sub>]]
M_Earth           ''M''<sub>⊕</sub>                     Earth mass
+
M_Earth [[Earth mass|''M''<sub>⊕</sub>]]
R_Earth           ''R''<sub>⊕</sub>                     Earth radius
+
R_Earth [[Earth radius|''R''<sub>⊕</sub>]]
Jupiter mass       ''M''<sub>J</sub>                     Jupiter mass
+
Jupiter mass [[Jupiter mass|''M''<sub>J</sub>]]
Jupiter radius     ''R''<sub>J</sub>                     Jupiter radius
+
Jupiter radius  [[Jupiter radius|''R''<sub>J</sub>]]
M_Jupiter         ''M''<sub>J</sub>                     Jupiter mass
+
M_Jupiter [[Jupiter mass|''M''<sub>J</sub>]]
R_Jupiter         ''R''<sub>J</sub>                     Jupiter radius
+
R_Jupiter [[Jupiter radius|''R''<sub>J</sub>]]
Solar mass         ''M''<sub>&#x2609;</sub>             Solar mass
+
Solar mass [[Solar mass|''M''<sub>&#x2609;</sub>]]
solar mass         ''M''<sub>&#x2609;</sub>             Solar mass
+
solar mass [[Solar mass|''M''<sub>&#x2609;</sub>]]
M_Solar            ''M''<sub>&#x2609;</sub>             Solar mass
+
M_Solar  [[Solar mass|''M''<sub>&#x2609;</sub>]]
M_solar            ''M''<sub>&#x2609;</sub>             Solar mass
+
M_solar  [[Solar mass|''M''<sub>&#x2609;</sub>]]
R_Solar           ''R''<sub>&#x2609;</sub>             Solar radius
+
R_Solar [[Solar radius|''R''<sub>&#x2609;</sub>]]
R_solar            ''R''<sub>&#x2609;</sub>             Solar radius
+
R_solar  [[Solar radius|''R''<sub>&#x2609;</sub>]]
Solar radius       ''R''<sub>&#x2609;</sub>             Solar radius
+
Solar radius [[Solar radius|''R''<sub>&#x2609;</sub>]]
solar radius       ''R''<sub>&#x2609;</sub>             Solar radius
+
solar radius [[Solar radius|''R''<sub>&#x2609;</sub>]]
Solar luminosity   ''L''<sub>&#x2609;</sub>             Solar luminosity
+
Solar luminosity  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
solar luminosity   ''L''<sub>&#x2609;</sub>             Solar luminosity
+
solar luminosity [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
L_solar            ''L''<sub>&#x2609;</sub>             Solar luminosity
+
L_solar  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
L_Solar            ''L''<sub>&#x2609;</sub>             Solar luminosity
+
L_Solar  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
pc2               pc<sup>2</sup>                       Parsec
+
pc2 [[Parsec|pc<sup>2</sup>]]
pc3               pc<sup>3</sup>                       Parsec
+
pc3 [[Parsec|pc<sup>3</sup>]]
kpc2               kpc<sup>2</sup>                       Parsec#Parsecs and kiloparsecs
+
kpc2 [[Parsec#Parsecs and kiloparsecs|kpc<sup>2</sup>]]
kpc3              kpc<sup>3</sup>                       Parsec#Parsecs and kiloparsecs
+
kpc3  [[Parsec#Parsecs and kiloparsecs|kpc<sup>3</sup>]]
kpc                kpc                                  Parsec#Parsecs and kiloparsecs
+
kpc  [[Parsec#Parsecs and kiloparsecs|kpc]]
Mpc2              Mpc<sup>2</sup>                       Parsec#Megaparsecs and gigaparsecs
+
Mpc2  [[Parsec#Megaparsecs and gigaparsecs|Mpc<sup>2</sup>]]
Mpc3              Mpc<sup>3</sup>                       Parsec#Megaparsecs and gigaparsecs
+
Mpc3  [[Parsec#Megaparsecs and gigaparsecs|Mpc<sup>3</sup>]]
Mpc                Mpc                                  Parsec#Megaparsecs and gigaparsecs
+
Mpc  [[Parsec#Megaparsecs and gigaparsecs|Mpc]]
Gpc2              Gpc<sup>2</sup>                       Parsec#Megaparsecs and gigaparsecs
+
Gpc2  [[Parsec#Megaparsecs and gigaparsecs|Gpc<sup>2</sup>]]
Gpc3              Gpc<sup>3</sup>                       Parsec#Megaparsecs and gigaparsecs
+
Gpc3  [[Parsec#Megaparsecs and gigaparsecs|Gpc<sup>3</sup>]]
Gpc               Gpc                                  Parsec#Megaparsecs and gigaparsecs
+
Gpc [[Parsec#Megaparsecs and gigaparsecs|Gpc]]
  
 
== Nuclear Physics and Chemistry ==
 
== Nuclear Physics and Chemistry ==
cm-1               cm<sup>−1</sup>                       Wavenumber
+
cm-1 [[Wavenumber|cm<sup>−1</sup>]]
u                 u                                    Atomic mass unit
+
u [[Atomic mass unit|u]]
osmol             osmol                                Osmole (unit)
+
osmol [[Osmole (unit)|osmol]]
Osm               Osm                                  Osmole (unit)
+
Osm [[Osmole (unit)|Osm]]
 
M  [[Molarity|M]]
 
M  [[Molarity|M]]
 
TM  [[Molarity|TM]]  SI
 
TM  [[Molarity|TM]]  SI
Line 479: Line 510:
 
nM  [[Molarity|nM]]  SI
 
nM  [[Molarity|nM]]  SI
 
pM  [[Molarity|pM]]  SI
 
pM  [[Molarity|pM]]  SI
kg/mol             kg/mol                               Molar mass
+
kg/mol [[Molar mass|kg/mol]]
kg.mol-1           kg&sdot;mol<sup>−1</sup>             Molar mass
+
kg.mol-1 [[Molar mass|kg&sdot;mol<sup>−1</sup>]]
g/mol             g/mol                                 Molar mass
+
g/mol [[Molar mass|g/mol]]
g.mol-1           g&sdot;mol<sup>−1</sup>               Molar mass
+
g.mol-1 [[Molar mass|g&sdot;mol<sup>−1</sup>]]
eV/c2             eV/''c''<sup>2</sup>                 Electronvolt#Mass
+
eV/c2 [[Electronvolt#Mass|eV/''c''<sup>2</sup>]]
keV/c2             keV/''c''<sup>2</sup>                 Electronvolt#Mass
+
keV/c2 [[Electronvolt#Mass|keV/''c''<sup>2</sup>]]
MeV/c2             MeV/''c''<sup>2</sup>                 Electronvolt#Mass
+
MeV/c2 [[Electronvolt#Mass|MeV/''c''<sup>2</sup>]]
GeV/c2             GeV/''c''<sup>2</sup>                 Electronvolt#Mass
+
GeV/c2 [[Electronvolt#Mass|GeV/''c''<sup>2</sup>]]
TeV/c2             TeV/''c''<sup>2</sup>                 Electronvolt#Mass
+
TeV/c2 [[Electronvolt#Mass|TeV/''c''<sup>2</sup>]]
µN                 µ<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:left"><br />N</span>     Nuclear magneton
+
µN [[Nuclear magneton|µ<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:left"><br />N</span>]]
µB                 µ<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:left"><br />B</span>     Bohr magneton
+
µB [[Bohr magneton|µ<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:left"><br />B</span>]]
eV                 eV                                   Electronvolt
+
eV [[Electronvolt|eV]]
mev               meV                                   Electronvolt
+
mev [[Electronvolt|meV]]
keV               keV                                   Electronvolt
+
keV [[Electronvolt|keV]]
MeV               MeV                                   Electronvolt
+
MeV [[Electronvolt|MeV]]
GeV               GeV                                   Electronvolt
+
GeV [[Electronvolt|GeV]]
TeV               TeV                                   Electronvolt
+
TeV [[Electronvolt|TeV]]
J/mol             J/mol                                 Joule per mole
+
J/mol [[Joule per mole|J/mol]]
J.mol-1           J&sdot;mol<sup>−1</sup>               Joule per mole
+
J.mol-1 [[Joule per mole|J&sdot;mol<sup>−1</sup>]]
kJ.mol-1           kJ&sdot;mol<sup>−1</sup>             Joule per mole
+
kJ.mol-1 [[Joule per mole|kJ&sdot;mol<sup>−1</sup>]]
kJ/mol             kJ/mol                               Joule per mole
+
kJ/mol [[Joule per mole|kJ/mol]]
MJ.mol-1           MJ&sdot;mol<sup>−1</sup>             Joule per mole
+
MJ.mol-1 [[Joule per mole|MJ&sdot;mol<sup>−1</sup>]]
MJ/mol             MJ/mol                                Joule per mole
+
MJ/mol [[Joule per mole|MJ/mol]]
GJ/mol             GJ/mol                               Joule per mole
+
GJ/mol [[Joule per mole|GJ/mol]]
GJ.mol-1           GJ&sdot;mol<sup>−1</sup>             Joule per mole
+
GJ.mol-1 [[Joule per mole|GJ&sdot;mol<sup>−1</sup>]]
TJ.mol-1           TJ&sdot;mol<sup>−1</sup>             Joule per mole
+
TJ.mol-1 [[Joule per mole|TJ&sdot;mol<sup>−1</sup>]]
TJ/mol             TJ/mol                               Joule per mole
+
TJ/mol [[Joule per mole|TJ/mol]]
  
 
== Numbers and phrases ==
 
== Numbers and phrases ==
pp                 pp                                    Page (paper)
+
pp [[Page (paper)|pp]]
ppb               ppb                                  Parts per billion                     1e-9
+
ppb [[Parts per billion|ppb]]  1e-9
ppm               ppm                                  Parts per million                     1e-6
+
ppm [[Parts per million|ppm]]  1e-6
billiard           billiard                              Orders of magnitude (numbers)#1015     1e15
+
billiard [[Orders of magnitude (numbers)#1015|billiard]]  1e15
billion           billion                              1,000,000,000                         1e9
+
billion [[1,000,000,000|billion]]  1e9
billionth         billionth                            1,000,000,000                         1e-9
+
billionth [[1,000,000,000|billionth]]  1e-9
billionths         billionths                            1,000,000,000                         1e-9
+
billionths [[1,000,000,000|billionths]]  1e-9
decilliard         decilliard                            Orders of magnitude (numbers)#1063     1e63
+
decilliard [[Orders of magnitude (numbers)#1063|decilliard]]  1e63
decillion         decillion                            Orders of magnitude (numbers)#1033     1e33
+
decillion [[Orders of magnitude (numbers)#1033|decillion]]  1e33
decillionth       decillionth                          Orders of magnitude (numbers)#1033     1e-33
+
decillionth [[Orders of magnitude (numbers)#1033|decillionth]]  1e-33
decillionths       decillionths                          Orders of magnitude (numbers)#1033     1e-33
+
decillionths [[Orders of magnitude (numbers)#1033|decillionths]]  1e-33
milliard           milliard                              1,000,000,000                         1e9
+
milliard [[1,000,000,000|milliard]]  1e9
million           million                               Million                                1e6
+
million [[Million|million]]  1e6
millionth         millionth                             Million                                1e-6
+
millionth [[Million|millionth]]  1e-6
millionths         millionths                           Million                                1e-6
+
millionths [[Million|millionths]]  1e-6
nonilliard         nonilliard                            Orders of magnitude (numbers)#1057     1e57
+
nonilliard [[Orders of magnitude (numbers)#1057|nonilliard]]  1e57
nonillion         nonillion                            Orders of magnitude (numbers)#1030     1e30
+
nonillion [[Orders of magnitude (numbers)#1030|nonillion]]  1e30
nonillionth       nonillionth                          Orders of magnitude (numbers)#1030     1e-30
+
nonillionth [[Orders of magnitude (numbers)#1030|nonillionth]]  1e-30
nonillionths       nonillionths                          Orders of magnitude (numbers)#1030     1e-30
+
nonillionths [[Orders of magnitude (numbers)#1030|nonillionths]]  1e-30
octilliard         octilliard                            Orders of magnitude (numbers)#1051     1e51
+
octilliard [[Orders of magnitude (numbers)#1051|octilliard]]  1e51
octillion         octillion                            Orders of magnitude (numbers)#1027     1e27
+
octillion [[Orders of magnitude (numbers)#1027|octillion]]  1e27
octillionth       octillionth                          Orders of magnitude (numbers)#1027     1e-27
+
octillionth [[Orders of magnitude (numbers)#1027|octillionth]]  1e-27
octillionths       octillionths                          Orders of magnitude (numbers)#1027     1e-27
+
octillionths [[Orders of magnitude (numbers)#1027|octillionths]]  1e-27
quadrilliard       quadrilliard                          Orders of magnitude (numbers)#1027     1e27
+
quadrilliard [[Orders of magnitude (numbers)#1027|quadrilliard]]  1e27
quadrillion       quadrillion                          Orders of magnitude (numbers)#1015     1e15
+
quadrillion [[Orders of magnitude (numbers)#1015|quadrillion]]  1e15
quadrillionth     quadrillionth                        Orders of magnitude (numbers)#1015     1e-15
+
quadrillionth [[Orders of magnitude (numbers)#1015|quadrillionth]]  1e-15
quadrillionths     quadrillionths                        Orders of magnitude (numbers)#1015     1e-15
+
quadrillionths [[Orders of magnitude (numbers)#1015|quadrillionths]]  1e-15
quintilliard       quintilliard                          Orders of magnitude (numbers)#1033     1e33
+
quintilliard [[Orders of magnitude (numbers)#1033|quintilliard]]  1e33
quintillion       quintillion                          Orders of magnitude (numbers)#1018     1e18
+
quintillion [[Orders of magnitude (numbers)#1018|quintillion]]  1e18
quintillionth     quintillionth                        Orders of magnitude (numbers)#1018     1e-18
+
quintillionth [[Orders of magnitude (numbers)#1018|quintillionth]]  1e-18
quintillionths     quintillionths                        Orders of magnitude (numbers)#1018     1e-18
+
quintillionths [[Orders of magnitude (numbers)#1018|quintillionths]]  1e-18
septilliard       septilliard                          Orders of magnitude (numbers)#1045     1e45
+
septilliard [[Orders of magnitude (numbers)#1045|septilliard]]  1e45
septillion         septillion                            Orders of magnitude (numbers)#1024     1e24
+
septillion [[Orders of magnitude (numbers)#1024|septillion]]  1e24
septillionth       septillionth                          Orders of magnitude (numbers)#1024     1e-24
+
septillionth [[Orders of magnitude (numbers)#1024|septillionth]]  1e-24
septillionths     septillionths                        Orders of magnitude (numbers)#1024     1e-24
+
septillionths [[Orders of magnitude (numbers)#1024|septillionths]]  1e-24
sextilliard       sextilliard                          Orders of magnitude (numbers)#1039     1e39
+
sextilliard [[Orders of magnitude (numbers)#1039|sextilliard]]  1e39
sextillion         sextillion                            Orders of magnitude (numbers)#1021     1e21
+
sextillion [[Orders of magnitude (numbers)#1021|sextillion]]  1e21
sextillionth       sextillionth                          Orders of magnitude (numbers)#1021     1e-21
+
sextillionth [[Orders of magnitude (numbers)#1021|sextillionth]]  1e-21
sextillionths     sextillionths                        Orders of magnitude (numbers)#1021     1e-21
+
sextillionths [[Orders of magnitude (numbers)#1021|sextillionths]]  1e-21
trilliard         trilliard                            Orders of magnitude (numbers)#1021     1e21
+
trilliard [[Orders of magnitude (numbers)#1021|trilliard]]  1e21
trillion           trillion                              Orders of magnitude (numbers)#1012     1e12
+
trillion [[Orders of magnitude (numbers)#1012|trillion]]  1e12
trillionth         trillionth                            Orders of magnitude (numbers)#1012     1e-12
+
trillionth [[Orders of magnitude (numbers)#1012|trillionth]]  1e-12
trillionths       trillionths                          Orders of magnitude (numbers)#1012     1e-12
+
trillionths [[Orders of magnitude (numbers)#1012|trillionths]]  1e-12
  
 
== Angles ==
 
== Angles ==
Line 578: Line 609:
 
-- If val has "|long scale=on" the following definitions are used
 
-- If val has "|long scale=on" the following definitions are used
 
-- (then, if not found here, the normal definitions are used).
 
-- (then, if not found here, the normal definitions are used).
-- Unit code       Symbol                               Link                                  Flags/Scale
+
-- Unit code [[Link|Symbol]]  Flags/Scale
 
local builtin_units_long_scale = [=[
 
local builtin_units_long_scale = [=[
  
 
== Long scale numbers and phrases ==
 
== Long scale numbers and phrases ==
billion           billion                              Orders of magnitude (numbers)#1012     1e12
+
billion [[Orders of magnitude (numbers)#1012|billion]]  1e12
billionth         billionth                            Orders of magnitude (numbers)#1012     1e-12
+
billionth [[Orders of magnitude (numbers)#1012|billionth]]  1e-12
billionths         billionths                            Orders of magnitude (numbers)#1012     1e-12
+
billionths [[Orders of magnitude (numbers)#1012|billionths]]  1e-12
decillion         decillion                            Orders of magnitude (numbers)#1060     1e60
+
decillion [[Orders of magnitude (numbers)#1060|decillion]]  1e60
decillionth       decillionth                          Orders of magnitude (numbers)#1060     1e-60
+
decillionth [[Orders of magnitude (numbers)#1060|decillionth]]  1e-60
decillionths       decillionths                          Orders of magnitude (numbers)#1060     1e-60
+
decillionths [[Orders of magnitude (numbers)#1060|decillionths]]  1e-60
nonillion         nonillion                            Orders of magnitude (numbers)#1054     1e54
+
nonillion [[Orders of magnitude (numbers)#1054|nonillion]]  1e54
nonillionth       nonillionth                          Orders of magnitude (numbers)#1054     1e-54
+
nonillionth [[Orders of magnitude (numbers)#1054|nonillionth]]  1e-54
nonillionths       nonillionths                          Orders of magnitude (numbers)#1054     1e-54
+
nonillionths [[Orders of magnitude (numbers)#1054|nonillionths]]  1e-54
octillion         octillion                            Orders of magnitude (numbers)#1048     1e48
+
octillion [[Orders of magnitude (numbers)#1048|octillion]]  1e48
octillionth       octillionth                          Orders of magnitude (numbers)#1048     1e-48
+
octillionth [[Orders of magnitude (numbers)#1048|octillionth]]  1e-48
octillionths       octillionths                          Orders of magnitude (numbers)#1048     1e-48
+
octillionths [[Orders of magnitude (numbers)#1048|octillionths]]  1e-48
quadrillion       quadrillion                          Orders of magnitude (numbers)#1024     1e24
+
quadrillion [[Orders of magnitude (numbers)#1024|quadrillion]]  1e24
quadrillionth     quadrillionth                        Orders of magnitude (numbers)#1024     1e-24
+
quadrillionth [[Orders of magnitude (numbers)#1024|quadrillionth]]  1e-24
quadrillionths     quadrillionths                        Orders of magnitude (numbers)#1024     1e-24
+
quadrillionths [[Orders of magnitude (numbers)#1024|quadrillionths]]  1e-24
quintillion       quintillion                          Orders of magnitude (numbers)#1030     1e30
+
quintillion [[Orders of magnitude (numbers)#1030|quintillion]]  1e30
quintillionth     quintillionth                        Orders of magnitude (numbers)#1030     1e-30
+
quintillionth [[Orders of magnitude (numbers)#1030|quintillionth]]  1e-30
quintillionths     quintillionths                        Orders of magnitude (numbers)#1030     1e-30
+
quintillionths [[Orders of magnitude (numbers)#1030|quintillionths]]  1e-30
septillion         septillion                            Orders of magnitude (numbers)#1042     1e42
+
septillion [[Orders of magnitude (numbers)#1042|septillion]]  1e42
septillionth       septillionth                          Orders of magnitude (numbers)#1042     1e-42
+
septillionth [[Orders of magnitude (numbers)#1042|septillionth]]  1e-42
septillionths     septillionths                        Orders of magnitude (numbers)#1042     1e-42
+
septillionths [[Orders of magnitude (numbers)#1042|septillionths]]  1e-42
sextillion         sextillion                            Orders of magnitude (numbers)#1036     1e36
+
sextillion [[Orders of magnitude (numbers)#1036|sextillion]]  1e36
sextillionth       sextillionth                          Orders of magnitude (numbers)#1036     1e-36
+
sextillionth [[Orders of magnitude (numbers)#1036|sextillionth]]  1e-36
sextillionths     sextillionths                        Orders of magnitude (numbers)#1036     1e-36
+
sextillionths [[Orders of magnitude (numbers)#1036|sextillionths]]  1e-36
trillion           trillion                              Orders of magnitude (numbers)#1018     1e18
+
trillion [[Orders of magnitude (numbers)#1018|trillion]]  1e18
trillionth         trillionth                            Orders of magnitude (numbers)#1018     1e-18
+
trillionth [[Orders of magnitude (numbers)#1018|trillionth]]  1e-18
trillionths       trillionths                          Orders of magnitude (numbers)#1018     1e-18
+
trillionths [[Orders of magnitude (numbers)#1018|trillionths]]  1e-18
  
 
]=]
 
]=]
  
 
return { builtin_units = builtin_units, builtin_units_long_scale = builtin_units_long_scale }
 
return { builtin_units = builtin_units, builtin_units_long_scale = builtin_units_long_scale }

Revision as of 04:25, 16 August 2015

This where you configure Val units. The list of Val units is published at Template:Val/list, and here is the place that produces that report. So preview Template:Space Template:Val/list Template:Space from the edit box to see your changes before saving them. The file format and syntax are mostly self explanatory.

  • You can enter new units in the "Unsorted units" section if you are not sure where else it might go.
  • If the same unit code is defined twice on this page, the first one overrides the later one.
  • Convert and Val share units. If you have an issue with a unit pagename or a unit symbol, and that unit is not published at Val/list, you may decide to address it at Template talk:Convert. To override entries at Convert, make an entry here.
  • If you're not in a hurry, you may notice when editing Val/units that it consists of two Lua string assignments, and Lua comments. Be careful.

Questions or requests related to Val units are welcomed at Template talk:Val. For feedback specifically about the terminology or procedural steps seen on this page, please use the talk page.

Below are the detailed procedures, examples, descriptions of testing and previewing, explanations about sorting Val expressions, and links to helpful pages. There's also further information about Val/Convert relations.

Introduction

An entry defining a unit for Val is a single line under a section heading.[1] It starts with the unit code, followed by at least two spaces and a link. If you are adding a group of related units, you can enter a blank line around them to group them in the report at Val/list. An entry is ignored if it lacks at least two adjacent space characters.

code    [[ pagename | symbol ]]
unit code
The keyboard typeable name of the symbol that users give Val's |u=, |ul=, |up= or |upl= parameters.
  • Unit codes will be case sensitive.
  • Prefer u for the Greek letter μ, if you're not sure.
  • Composite units have dimensions that multiply, divide, and apply powers to component units. Use . to multiply, / to divide, and a signed digit for powers. For multiplication, * is deprecated. When adding a unit that includes division, consider also adding a version with multiplication by the negated power; for example, m/s2 and m.s-2 (for m/s2 and m⋅s−2).
unit pagename
Title or section of an article. When linked with ul or upl, the title or one of its redirects can expand the abbreviation for the unit.[2]
unit symbol
Verifiable, standard symbol, formatted in accordance with WP:UNITS.
  • Templates will not work for producing the unit symbol for input to this module; only Wikipedia HTML formatting is accepted.
  • Composite units use &sdot; to multiply, / to divide, and <sup>...</sup> for powers. Division is also the unit-inversion form that multiplies a negative numbered power, for example for m/s2 and m⋅s−2 (from m.s-2 and m/s2).
  • If the hover-text just shows the abbreviation, it is not a user-friendly unit-symbol. When not linked, the unit's abbreviation can be spelled out with hover-text at the symbol by way of the title attribute of either <abbr>...</abbr> or <span>...</span>.
  • For more about HTML tags and HTML symbols such as &sdot;, see Wikipedia:HTML.
  • For more information about marking up your unit symbol see WP:HTML#formatting.
  • Examples of unit codes, and hover text are at Template:Val/list.
unit code alias
The same unit/pagename/symbol, but by way of a different unit code.
Unit code aliases are commonly applied for
  • capitalization, to make the unit code case insensitive.
  • per units, for example m/s and m⋅s−1.
  • Greek letters, to allow for both US keyboard and Greek-character-input applications, for example the SI prefix μ
Preview page with this template/module
A feature, similar to a sandbox and testcases, that provides a preview of how the code currently in the edit box (sandbox) will look when applied to any page (testcases).

The preview of main interest is Template:Val/list[3], but previewing other your own page of interest with your newly added unit in a val call and in a sorting table are also part of this procedure. Template:Val/units/testcases contains Val calls for all defined Val units.

How to add a unit

To maintain Val units,

  1. Edit Module:Val/units and make your changes.
  2. Preview Template:Space Template:Val/list Template:Space .
    • Look for any messages. An "Invalid definition" message is available automatically.
    • Prove the intended link from the preview.
    • Hover the mouse over the link, and read the hover-text or URL display somewhere in the browser.
  3. Add any unit-code aliases.
  4. Add any sorting if needed. Details about sorting are covered below.
  5. Preview a test page. It will have template Val calls on it, and it may have a sortable table to test sorting. Template:Val/units/testcases is a test page containing Val calls for all units.
  6. Show changes to prove no accidental edits occurred.
  7. Save the page. Saving the page activates the changes immediately, and they go live. You're done adding your unit.

If you want a unit to add for practice, add one from List of common physics notations, or from SI units#Units and prefixes.

Changing or removing existing unit codes is possible by employing {{Template usage}} to see how Val unit codes may or may not be in use on the wiki. For example, to see about changing or removing unit code J.s, do a

{{tlusage|val|"J.s"|0}}Template:Tlusage.

Put any unit code in quotes if it contains dash, dot, or slash—anything but a letter or number. See Template:Val/units/test for a list of these searches for each Val unit.

Examples

Say you're creating a new page or revamping an old page, and discover the need for a convenient way to make several entries containing c0, and link that symbol to the page Speed of light. The following entry will define your unit code as c0, your unit symbol as ''c''<sub>0</sub>, and the unit's article as Speed of light#Numerical value, notation, and units.

c0  [[Speed of light#Numerical value, notation, and unit symbol|''c''<sub>0</sub>]]

or as explained below at §Advanced unit entry formats, you can also write

c0  ''c''<sub>0</sub>      Speed of light#Numerical value, notation, and units

Then preview with Template:Val/list, and check for an error message next to the new unit, and test the link you gave.

After that the page with the (saved) Val calls is used to test the linked and non-linked versions of the normal and the per units:

For an entire example that uses the other format to make a Val/unit entry.

  1. Put this in a sandbox: {{val|1.23|ul=tins}}Template:Val
  2. Edit Module:Val/units and insert a line like the following (do not save yet):
    tins   tins   Contins unities
  3. Under "Preview page with this module" enter Template:Val/list, and click Show preview. It shows Val/list through the version of Val/units in the edit box. Say there are no errors, the markup and hover-text look good, and the link navigates to the unit's page.
  4. Then in the same way of previewing, put the fullpagename of the sandbox from step 1, and click Show preview.
  5. Save page to save the edit to Module:Val/units.

If you want a unit to add for practice, add one from List of common physics notations, or from SI units#Units and prefixes. There are many examples of composite units that have their own page, so adding a unit code for one of those should link to its page. There are many articles that could use a new Val unit, such as molarity at Resveratrol.

Either of the test pages of these examples could have the sortable test-table shown in the next section.

Testing a new unit

To test a newly added unit not used on any page, you will need to run the preview on a sandbox page you have already created. Here are all the test cases you can preview there before saving your changes here; they are the four |u= parameters:

{{Val|9|u =            }}
{{Val|9|ul =           }}
{{Val|9|u=foo|up =     }}
{{Val|9|u=foo|upl =    }}

and the sortable table:

{| class="wikitable sortable" summary="Sortable table to test Val sorting"
! Val number and unit
|-
| {{val|5|u=      }} 
|-
| {{val|3|u=      }} 
|-
| {{val|1|u=      }} 
|-
| {{val|2|u=      }} 
|-
| {{val|4|u=      }} 
|}

This table falls into place unsorted, so when your unit accepts an SI prefix you can test, say, k, m, and G, with your unit, and compare with e notations 1e3, 1e6, and 1e9 in the number. For example, Val sorts these two as equal: 1e3 m (standard e notation) and 1 km.

What to look for
  • The linked and non-linked markup should look exactly the same.
  • Navigate to the new link. It is safe: you can go back in your browser to here.
  • The two |up= versions should have no space in front of them.
  • For SI prefixes sorting 2e3 (or 2000) should be greater than k (kilo prefix).

Advanced unit-entry format

In the usual format

code    [[pagename|symbol]]

the wikilink represents two fields itself, for a total of three fields per entry. But you cannot use a wikilink for composite units that need more than one pagename.

The other record type for adding a unit entry is also three fields. It has the same three fields, but they are in a different order.

code    symbol        pagename

This format separates each field with whitespace, and also takes tabs between fields two and three.

For a new composite unit you should probably link the whole composition, or link the largest portion which could have its own page.

  • The val user can compose a divisor unit on the fly from existing unit codes, and with individually linked numerator and denominator. For example:
{{val|99|ul=m|upl=d}}Template:Val
  • The val user can compose a multiplier unit on the fly by using the |end= parameter to prepend to the unit, and these can also be individually linked. For example (in geology) there is already Template:Val to use with |end=:
{{val|333|ul=uBP|end=&nbsp;[[megaannum|Ma]]}}Template:Val".

For example Template:Val/list says

m.s-1  [[Metre per second|m&sdot;s<sup>&minus;1</sup>]] linking to an article titled Metre per second, not

m.s-1  [[Metre|m]]&sdot;[[Second|s]]<sup>&minus;1</sup> which has separate links to already existing unit codes.

Fourth field flags

The module must be told directly about sorting factors, spacing, and aliasing for a unit code.

There is an optional field that goes at the end after two or more spaces or one or more tabs. It is a flag mainly used to provide for that unit to be sorted in a table. Flags are mainly for sorting, and they work for either record type. Just add two or more spaces, or one or more tabs, and then the flag field. (Optional flags ALIAS and NOSPACE and ANGLE are for even more advanced users. See §Advanced unit flags below.)

Using SI requires that the unit symbol compare precisely to the unit code, and so never allows HTML or other characters in the symbol. Any difference between the unit symbol and unit code must be an SI prefix, such as k, M, or G.

Sorting

Val's sorting scale factor is for comparison to other Val units that might be sorted with it.

Where Sorting is done on the wiki, it is done in sortable tables. Val entries in a sortable table will need a fourth field sorting flag. It can be a number, an equation, or an SI, but it flags the same function: a wikitable sorting "scale".

To display the sort key use |debug=yes. For example

  • {{val|999|u=uV|debug=yes}}6996998999999999999♠999 µV
  • {{val|99|u=V|debug=yes}}7001990000000000000♠99 V
  • {{val|1|u=kV|debug=yes}}7003100000000000000♠1 kV

Scale

For scaling a unit to sort properly, you need to pick a number for a sorting factor. There are numerous examples at Template:Val/list and at Template:Val/sortkey/unit. A system of units will have its base units, for example 1 bit; then the scale for sorting a kilobyte unit is then 8000 (eight bits per byte, times a kilo, or thousand). Or a year scale is seconds so that all times sort by seconds, which is a base unit. In general the scale shows to be "base unit" of the same type times the "SI prefix", and if it's not that simple, then the unit system's number has associated a number to it, such as Avogadro's number.

For example, the following defines a unit with code billion, symbol billion, link 1,000,000,000, and scale 1e9 (Template:Val). After the following entry is saved to the database

billion            billion          1,000,000,000          1e9

{{val|2|u=billion}} would start sorting after {{val|98.7|e=3}}.

SI flag

Metric prefixes in everyday use
Text Symbol Factor Power
tera T Template:Val 1012
giga G Template:Val 109
mega M Template:Val 106
kilo k Template:Val 103
hecto h 100 102
deca da 10 101
(none) (none) 1 100
deci d 0.1 10−1
centi c 0.01 10−2
milli m 0.001 10−3
micro μ Template:Val 10−6
nano n Template:Val 10−9
pico p Template:Val 10−12

SI is used because it scales Val expressions automatically, and it is a clean indicator that the unit will sort properly. It correctly scales any SI prefix for sorting, but not other unit codes.

For SI the unit symbol will not accept HTML, but will accept μ. HTML is not accepted at this time because in order to validate the entry, the unit code must differ from the unit symbol by exactly one valid SI prefix. If there is no difference, or too much difference, it is an invalid definition for sorting purposes. The exception is for the Greek letter μ: if you used a character input application to "install" the Greek letter μ in your symbol, for your "easy to type" unit code, u, these two are not a character mismatch.

All unit entries that use SI will have the same base unit as the symbol at Val/units, but they will display properly at Val/list.

For example, kilo is a thousand, but you're defining km2 for kilometers squared, and need HTML. You can't use SI with HTML, so use 1000*1000, or 1000000 in the sorting field. Use 1e-6 or 0.000001 or 1/100000 instead.

If the unit you are maintaining has SI prefixes and they are all likely to be sorted in a table, add up to twelve entries, one for each common SI unit. Some of these, like Meter in the example, may have their own article, but usually all go to the base unit's pagename. Here is how meter is defined.

m     [[Metre|m]]         SI
cm    [[Centimetre|m]]    SI
dam   [[Decametre|m]]     SI
dm    [[Decimetre|m]]     SI
hm    [[Hectometre|m]]    SI
km    [[Kilometre|m]]     SI
Mm    [[Megametre|m]]     SI
mm    [[Millimetre|m]]    SI
um    [[Micrometre|µm]]   1/1000000
µm    [[Micrometre|m]]    SI
nm    [[Nanometre|m]]     SI
pm    [[Picometre|m]]     SI

The information that was in the unit symbol is now fully specified in, and exhibited at, the unit code. SI specifies that the unit's symbol has been transformed from a symbol to a string for use in string comparison that will finally result in calculating a sorting factor. It conveniently uses the idea that the unit code is often equal to the symbol, especially with SI units. The field definitions are sacrificed for a simplicity in the user presentation, user calculation, and user entry.

In the other format, the following defines three unit codes for volts, V for sorting. V is the base unit with the SI prefix removed. A unit code defined in this manner will have its sort key scaled by the software according to the SI prefix produced by the difference between the unit code and unit symbol.

kV   V   Kilovolt    SI
µV   V   Microvolt   SI
uV   V   Microvolt   SI

Now {{val|1|u=kV}} will sort after {{val|999|u=V}} without having to resort to using a number, and with the clean representation at Val/list.

The symbol column shows "V" for each, but it is not the symbol—it is the base unit after removing the SI prefix so convert can work out what is intended to be the prefix. The following would give identical results:

kV   kV   Kilovolt    1e3
µV   µV   Microvolt   1e-6
uV   µV   Microvolt   1e-6

As you can see, without "SI", you define both the symbol, and the scale. You define the symbol with HTML or the Greek letter or other symbol, and you define the scale with a number or an equation. When "SI" is used, convert just does the right thing for the symbol and scale.

Alias a Convert unit

If you are here to change the link or markup of a unit, but it is not listed at Val/units, sometimes you can find the unit markup and link that you do want, already existing at Template:Convert#Units. In that case you can change the unit code to whatever you'd prefer, and it will achieve your goal. For example, if {{Val|1|C}} is going to Celsius instead of Coulombs, you can define your own unit code, say "degC".

The following defines degC to refer to the unit known as °C in convert. There is no link because a link is defined at Convert.

degC               °C               ALIAS

File format

If you want to reorganize sections here, note that the two lines local builtin_units and local builtin_units_long_scale require a blank line after them. The section long scale, with all the units like "billions" and "trillions", is under the latter, near the bottom of the page. All the rest of the units are in the former.

The file format is two Lua strings and a return statement with them in it: a string in quotes [=[ ... builtin_units ... ]=], and another string in quotes [=[ ... builtin_units_long_scale ... ]=]. The first string, builtin_units, is short-scale, second string is long scale. The reason there are two strings is because of the difference between British and US terms surrounding "billion", "billionth", etc.

For each string there must be a blank line before the first line of the string and after the last line of the string. In other words the first two and last two characters of each string must be newlines.

There is one record per line, starting in first column, having 2-4 fields. The field separator is two or more spaces. Between first and second fields, use two or more spaces. Between all other fields, use two or more spaces, or one or more tabs. Entries without two spaces in them are ignored.

Advanced unit flags

You can alias Convert or Val units. But these are different things.

  • A "unit code alias" is when the same unit pagename and unit symbol are defined twice. If a different unit code is assigned to the same unit symbol and unit pagename, (say, as a copy of the previous entry) it will work as a Val alias.
  • A "unit alias" is when Val alias a Convert unit code. A unit of measurement is here denoted ALIAS to mean "they are defined there". Val defaults to Convert, but it's good to this explicit for certain Val units: the ones tempting to define here, but that you don't want defined here because, says ALIAS, they are already defined there.
  • If your unit code is not listed at {{Val/list}}, you can check for it at {{Val/unitsfromconvert}}, or at {{Convert#Units}}

For spacing and aliasing:

  • ALIAS specifies that the unit's symbol is the code for a unit defined in {{convert}}}.
  • NOSPACE prevents the default insertion of a non-breaking space before the unit symbol.
  • If you see the ANGLE flag, this identifies those special units that must displayed not only after the main Val number, but also after its uncertainty#Measurements numbers.(ANGLE also implies NOSPACE.)

Interaction with Convert

Val and Convert share unit codes, but their units of measurement are different.

  • Most of the wiki's unit codes are managed by {{Convert}}.
  • Some very few unit codes here, like C and F, mean something different there. Val caters to Coulombs and Farads, while Convert caters to Celsius and Fahrenheit. Convert and Val unit codes are mostly identical, like they are for degC and for degF.
  • Val could need any unit, while not all units are needed in conversions, so Val needs all of Convert's units and some of its own.
  • Sorting functionality is handled for Val by {{convert}}.)
  • At Convert the procedure for defining a unit is much more involved than it is here, because there every unit defined must reference associated units, conversion factors, alternate spellings, and many other attributes. An entry at Convert is defined as a multi-line, multi-attribute Lua table with its attendant syntax, and inside a larger Lua script. Therefore Convert is more conservative about adding units. Val may be more liberal in this respect if only because unit entry is simpler and "wikified". Therefore WP:Be bold. Bold customization may be a worthwhile risk at Val/units, or it may get removed. Although units used in articles have definite stylistic standards, there remains room for depending on Val for markup (but see WP:Accessibility about color, link, and text). You may want to customize some Val unit codes that will automate some Val markup for special articles, the talk page, etc. See WP:HTML#formatting for possibilities.

Notes

Template:Refs

See also



  1. Module pages don't have section editing.
  2. A redirect page is easy to make; there are tools on the editor toolbars.
  3. The special relation between Val/units and Val/list is that the wikitext of Val/list is always generated by Val/units when that page is viewed, so when you preview page with this module, Val/list is generated using the contents of the edit box of Val/units.
-- Definitions for units known to val
-- File format is two strings and a return statement with them in it:
-- string in quotes [=[ ... builtin_units ... ]=].
-- string in quotes [=[ ... builtin_units_long_scale ... ]=].
-- First string, builtin_units, is short-scale, second string is long scale.

-- Entry format:
-- One record per line, starting in first column, having 2-4 fields.
-- Field separator: two or more spaces
-- Between first and second fields: two or more spaces
-- Between all other fields: two or more spaces, or one or more tabs
-- Entries without two spaces in them are ignored.

-- There must be a blank line before the first entry and after the last.
-- I.e. the first two and last two characters of the string must be newlines.

-- Format of entry. Two record types:
--
-- One record type is a wikilink:
-- Unit-code        [[pagename|Symbol-accepts-HTML-only]]
-- Text-field separator is still two spaces.
--
-- The other record type is all fields:
-- Unit-code        symbol-accepts-HTML-only        pagename#section-OK
--
-- Plus there is an optional field that goes at the end after two or more spaces.
-- Whether it is a number or an equation or the letters SI, 
-- any of these three has the same function: a wikitable sorting "scale".
-- It is for sorting, and it works for either record type.
-- Difference is SI can't accept HTML.  But SI correctly scales any SI prefix.
-- (Optional fields ALIAS and NOSPACE and ANGLE are for advanced users.)

-- "Invalid unit" error:
-- Using SI requires that the symbol equal unit-code, so never allows HTML.
-- Any difference between SI or symbol must be an SI prefix, such as k, M, or G.
-- A space at the end of an entry is an error.  No space at each EOL.

local builtin_units = [=[

== Test ==
Foo  [[Hz|<samp>Foo</samp>]]
Baz  [[Hertz|baz<sub>0</sub>]]
Bar  [[Foobar|bar<abbr title="super duper">0</abbr>]]
quux  [[Foobar|<span title="super duper 2">bar0</span>]]

== Unsorted units ==
c0  [[Speed of light#Numerical value, notation, and units|''c''<sub>0</sub>]]
lbf  [[Pound (force)|<span title="pound-force">lb<sub>F</sub></span> ]]
C/mol  [[Faraday constant|C/mol]]
C.mol-1  [[Faraday constant|C&sdot;mol<sup>−1</sup>]]
C/kg  [[Roentgen (unit)|C/kg]]
C.kg-1  [[Roentgen (unit)|C&sdot;kg<sup>−1</sup>]]
F.m-1  [[vacuum permittivity|F&sdot;m<sup>−1</sup>]]
F/m  [[vacuum permittivity|F/m]]
e  [[Elementary charge|''e'']]

== Time and frequency ==
byte  [[Byte|byte]]  8
byte/s  [[Bytes per second|byte/s]]  8
kB/s  [[Bytes per second|kB/s]]  8e3
MB/s  [[Bytes per second|MB/s]]  8e6
GB/s  [[Bytes per second|GB/s]]  8e9
TB/s  [[Bytes per second|TB/s]]  8e12
bit/s  [[Bit per second|bit/s]]  1
bps  [[Bit per second|bit/s]]  1
kbit/s  [[Kilobit per second|kbit/s]]  1e3
Mbit/s  [[Megabit per second|Mbit/s]]  1e6
Gbit/s  [[Gigabit per second|Gbit/s]]  1e9
Tbit/s  [[Terabit per second|Tbit/s]]  1e12
year  [[Year|year]]  31557600
years  [[Year|years]]  31557600
yr  [[Year#Symbols y and yr|yr]]  31557600
y  [[Year|y]]  31557600
a  [[Annum|a]]  31557600
Ga  [[Gigaannum|Ga]]  31557600000000000
Ma  [[Megaannum|Ma]]  31557600000000
ka  [[Kiloannum|ka]]  31557600000
kyr  [[kyr|kyr]]  31557600000
kya  [[kyr|kya]]  31557600000
myr  [[myr|myr]]  31557600000000
mya  [[Mya (unit)|mya]]  31557600000000
byr  [[Billion years|byr]]  31557600000000000
bya  [[Billion years ago|bya]]  31557600000000000
Gyr  [[Year#SI prefix multipliers|Ga]]  31557600000000000
BP  [[Before present|BP]]
uBP  [[Radiocarbon dating#Calibration|<sup>14</sup>C yr BP]]
BC  [[Before Christ|BC]]  -1
AD  [[Anno Domini|AD]]  1
BCE  [[Before the Common Era|BCE]]  -1
CE  [[Common Era|CE]]  1

s-1  [[Second|s<sup>−1</sup>]]
s-2  [[Second|s<sup>−2</sup>]]
s2  [[Second|s<sup>2</sup>]]

s  [[Second|s]]  SI
as  [[Attosecond|as]]  SI
cs  [[Second|cs]]  SI
das  [[Second|das]]  SI
ds  [[Second|ds]]  SI
Es  [[Second|Es]]  SI
fs  [[Femtosecond|fs]]  SI
Gs  [[Second|Gs]]  SI
hs  [[Second|hs]]  SI
ks  [[Second|ks]]  SI
ms  [[Millisecond|ms]]  SI
µs  [[Microsecond|µs]]  SI
mus  [[Microsecond|mus]]  SI
Ms  [[Second|Ms]]  SI
ns  [[Nanosecond|ns]]  SI
ps  [[Picosecond|ps]]  SI
Ps  [[Second|Ps]]  SI
Ts  [[Second|Ts]]  SI
Ys  [[Second|Ys]]  SI
ys  [[Yoctosecond|ys]]  SI
Zs  [[Second|Zs]]  SI
zs  [[Zeptosecond|zs]]  SI

Hz  [[Hertz|Hz]]  SI
aHz  [[Hertz|aHz]]  SI
cHz  [[Hertz|cHz]]  SI
daHz  [[Hertz|daHz]]  SI
dHz  [[Hertz|dHz]]  SI
EHz  [[Hertz|EHz]]  SI
fHz  [[Hertz|fHz]]  SI
hHz  [[Hertz|hHz]]  SI
GHz  [[Gigahertz|GHz]]  SI
kHz  [[Kilohertz|kHz]]  SI
MHz  [[Megahertz|MHz]]  SI
mHz  [[Hertz|mHz]]  SI
muHz  [[Hertz|muHz]]  SI
µHz  [[Hertz|µHz]]  SI
nHz  [[Hertz|nHz]]  SI
pHz  [[Hertz|pHz]]  SI
PHz  [[Hertz|PHz]]  SI
THz  [[Hertz|THz]]  SI
yHz  [[Hertz|yHz]]  SI
YHz  [[Hertz|YHz]]  SI
zHz  [[Hertz|zHz]]  SI
ZHz  [[Hertz|ZHz]]  SI

== Length, area, volume ==
fb-1  [[Barn (unit)|fb<sup>−1</sup>]]
mas  [[Milliarcsecond|mas]]  pi/648000000
m-1  [[Metre|m<sup>−1</sup>]]
m-2  [[Square metre|m<sup>−2</sup>]]
m-3  [[Cubic metre|m<sup>−3</sup>]]
km2  [[Square kilometre|km<sup>2</sup>]]
km3  [[Cubic kilometre|km<sup>3</sup>]]
m  [[Metre|m]]
meter  [[Metre|m]]
metre  [[Metre|m]]
am  [[Metre|am]]
cm  [[Centimetre|cm]]
dam  [[Decametre|dam]]
dm  [[Decimetre|dm]]
Em  [[Metre|Em]]
fm  [[Metre|fm]]
Gm  [[Metre|Gm]]
hm  [[Hectometre|hm]]
km  [[Kilometre|km]]
Mm  [[Megametre|Mm]]
mm  [[Millimetre|mm]]
mum  [[Micrometre|µm]]
µm  [[Micrometre|µm]]
nm  [[Nanometre|nm]]
Pm  [[Metre|Pm]]
pm  [[Picometre|pm]]
Tm  [[Metre|Tm]]
Ym  [[Metre|Ym]]
ym  [[Metre|ym]]
Zm  [[Metre|Zm]]
zm  [[Metre|zm]]
µm2  [[Square metre|µm<sup>2</sup>]]
am2  [[Square metre|am<sup>2</sup>]]
cm2  [[Square centimetre|cm<sup>2</sup>]]
dam2  [[Square metre|dam<sup>2</sup>]]
dm2  [[Square metre|dm<sup>2</sup>]]
Em2  [[Square metre|Em<sup>2</sup>]]
fm2  [[Square metre|fm<sup>2</sup>]]
Gm2  [[Square metre|Gm<sup>2</sup>]]
hm2  [[Square metre|hm<sup>2</sup>]]
mm2  [[Square metre|mm<sup>2</sup>]]
Mm2  [[Square metre|Mm<sup>2</sup>]]
nm2  [[Square metre|nm<sup>2</sup>]]
pm2  [[Square metre|pm<sup>2</sup>]]
Pm2  [[Square metre|Pm<sup>2</sup>]]
Tm2  [[Square metre|Tm<sup>2</sup>]]
ym2  [[Square metre|ym<sup>2</sup>]]
Ym2  [[Square metre|Ym<sup>2</sup>]]
zm2  [[Square metre|zm<sup>2</sup>]]
Zm2  [[Square metre|Zm<sup>2</sup>]]
gal  [[Gallon|gal]]
Gal  [[Gal (unit)|Gal]]
muGal  [[Gal (unit)|µGal]]
µGal  [[Gal (unit)|µGal]]
mGal  [[Gal (unit)|mGal]]

== Velocity and acceleration ==
m/s2  [[Metre per second squared|m/s<sup>2</sup>]]
m.s-2  [[Metre per second squared|m&sdot;s<sup>−2</sup>]]
m/s  [[Metre per second|m/s]]
m.s-1  [[Metre per second|m&sdot;s<sup>−1</sup>]]

== Mass and energy ==
lbm  [[Pound (mass)|<span title="pound-mass">lb<sub>m</sub></span>]]
muJ  [[Joule|µJ]]
J.s  [[Joule-second|J&sdot;s]]
kWh  [[Kilowatt hour|kWh]]
kW.h  [[Kilowatt hour|kW&sdot;h]]
kW·h  [[Kilowatt hour|kW&sdot;h]]
J/C  [[Volt|J/C]]
J/kg  [[Joule|J/kg]]

g  [[Gram|g]]  SI
ag  [[Attogram|ag]]  SI
cg  [[Centigram|cg]]  SI
dag  [[Gram|dag]]  SI
dg  [[Decigram|dg]]  SI
Eg  [[Exagram|Eg]]  SI
fg  [[Femtogram|fg]]  SI
Gg  [[Gigagram|Gg]]  SI
hg  [[Hectogram|hg]]  SI
kg  [[Kilogram|kg]]  SI
mcg  [[Microgram|mcg]]  SI
Mg  [[Megagram|Mg]]  SI
mg  [[Milligram|mg]]  SI
mug  [[Microgram|mug]]  SI
µg  [[Microgram|µg]]  SI
ng  [[Nanogram|ng]]  SI
Pg  [[Petagram|Pg]]  SI
pg  [[Picogram|pg]]  SI
Tg  [[Tonne|Tg]]  SI
yg  [[Yoctogram|yg]]  SI
Yg  [[Yottagram|Yg]]  SI
zg  [[Zeptogram|zg]]  SI
Zg  [[Zettagram|Zg]]  SI

== Pressure and density ==
psi  [[Pounds per square inch|psi]]
g/cm3  [[Gram per cubic centimetre|g/cm<sup>3</sup>]]
kg/m3  [[Kilogram per cubic metre|kg/m<sup>3</sup>]]
kg/cm3  [[Density#Formula and common units|kg/cm<sup>3</sup>]]
g/L  [[Gram per litre|g/L]]
g/l  [[Gram per litre|g/L]]
mcg/dL  [[Gram per litre|µg/dL]]
mcg/dl  [[Gram per litre|µg/dL]]
mg/mL  [[Gram per litre|mg/mL]]
mg/ml  [[Gram per litre|mg/mL]]
mug/dL  [[Gram per litre|µg/dL]]
mug/dl  [[Gram per litre|µg/dL]]
μg/dL  [[Gram per litre|μg/dL]]
μg/dl  [[Gram per litre|μg/dL]]
mg/Ll  [[Gram per litre|mg/dL]]
mg/l  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
mg/L  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
mgl-1  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]
mgL-1  [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]]

== Temperature ==
degC  °C  ALIAS
degF  °F  ALIAS
degR  °R  ALIAS

K  [[Kelvin|K]]  SI
YK  [[Yottakelvin|YK]]  SI
ZK  [[Zettakelvin|ZK]]  SI
EK  [[Kelvin|EK]]  SI
PK  [[Petakelvin|PK]]  SI
TK  [[Terakelvin|TK]]  SI
GK  [[Gigakelvin|GK]]  SI
MK  [[Megakelvin|MK]]  SI
kK  [[Kilokelvin|kK]]  SI
hK  [[Hectokelvin|hK]]  SI
daK  [[Decakelvin|daK]]  SI
dK  [[Decikelvin|dK]]  SI
cK  [[Centikelvin|cK]]  SI
mK  [[Millikelvin|mK]]  SI
µK  [[Microkelvin|µK]]  SI
uK  [[Microkelvin|uK]]  SI
nK  [[Nanokelvin|nK]]  SI
pK  [[Picokelvin|pK]]  SI
fK  [[Femtokelvin|fK]]  SI
aK  [[Attokelvin|aK]]  SI
zK  [[Zeptokelvin|zK]]  SI
yK  [[Yoctokelvin|yK]]  SI

== Electromagnetism ==
Wb  [[Weber (unit)|Wb]]
N.A-2  [[Permeability (electromagnetism)|N&sdot;A<sup>−2</sup>]]
H.m-1  [[Permeability (electromagnetism)|H·m<sup>−1</sup>]]
V/m  [[Electric field|V/m]]
V.m-1  [[Electric field|V&sdot;m<sup>−1</sup>]]

C  [[Coulomb|C]]  SI
YC  [[Coulomb|YC]]  SI
ZC  [[Coulomb|ZC]]  SI
EC  [[Coulomb|EC]]  SI
PC  [[Coulomb|PC]]  SI
TC  [[Coulomb|TC]]  SI
GC  [[Coulomb|GC]]  SI
MC  [[Coulomb|MC]]  SI
kC  [[Coulomb|kC]]  SI
hC  [[Coulomb|hC]]  SI
daC  [[Coulomb|daC]]  SI
dC  [[Coulomb|dC]]  SI
cC  [[Coulomb|cC]]  SI
mC  [[Coulomb|mC]]  SI
µC  [[Coulomb|µC]]  SI
uC  [[Coulomb|uC]]  SI
nC  [[Coulomb|nC]]  SI
pC  [[Coulomb|pC]]  SI
fC  [[Coulomb|fC]]  SI
aC  [[Coulomb|aC]]  SI
zC  [[Coulomb|zC]]  SI
yC  [[Coulomb|yC]]  SI

F  [[Farad|F]]  SI
YF  [[Farad|YF]]  SI
ZF  [[Farad|ZF]]  SI
EF  [[Farad|EF]]  SI
PF  [[Farad|PF]]  SI
TF  [[Farad|TF]]  SI
GF  [[Farad|GF]]  SI
MF  [[Farad|MF]]  SI
kF  [[Farad|kF]]  SI
hF  [[Farad|hF]]  SI
daF  [[Farad|daF]]  SI
dF  [[Farad|dF]]  SI
cF  [[Farad|cF]]  SI
mF  [[Farad|mF]]  SI
µF  [[Farad|µF]]  SI
uF  [[Farad|uF]]  SI
nF  [[Farad|nF]]  SI
pF  [[Farad|pF]]  SI
fF  [[Farad|fF]]  SI
aF  [[Farad|aF]]  SI
zF  [[Farad|zF]]  SI
yF  [[Farad|yF]]  SI

H  [[Henry (unit)|H]]  SI
YH  [[Henry (unit)|YH]]  SI
ZH  [[Henry (unit)|ZH]]  SI
EH  [[Henry (unit)|EH]]  SI
PH  [[Henry (unit)|PH]]  SI
TH  [[Henry (unit)|TH]]  SI
GH  [[Henry (unit)|GH]]  SI
MH  [[Henry (unit)|MH]]  SI
kH  [[Henry (unit)|kH]]  SI
hH  [[Henry (unit)|hH]]  SI
daH  [[Henry (unit)|daH]]  SI
dH  [[Henry (unit)|dH]]  SI
cH  [[Henry (unit)|cH]]  SI
mH  [[Henry (unit)|mH]]  SI
µH  [[Henry (unit)|µH]]  SI
uH  [[Henry (unit)|uH]]  SI
nH  [[Henry (unit)|nH]]  SI
pH  [[Henry (unit)|pH]]  SI
fH  [[Henry (unit)|fH]]  SI
aH  [[Henry (unit)|aH]]  SI
zH  [[Henry (unit)|zH]]  SI
yH  [[Henry (unit)|yH]]  SI

A  [[Ampere|A]]  SI
YA  [[Ampere|YA]]  SI
ZA  [[Ampere|ZA]]  SI
EA  [[Ampere|EA]]  SI
PA  [[Ampere|PA]]  SI
TA  [[Ampere|TA]]  SI
GA  [[Ampere|GA]]  SI
MA  [[Ampere|MA]]  SI
kA  [[Ampere|kA]]  SI
hA  [[Ampere|hA]]  SI
daA  [[Ampere|daA]]  SI
dA  [[Ampere|dA]]  SI
cA  [[Ampere|cA]]  SI
mA  [[Ampere|mA]]  SI
µA  [[Ampere|µA]]  SI
uA  [[Ampere|uA]]  SI
nA  [[Ampere|nA]]  SI
pA  [[Ampere|pA]]  SI
fA  [[Ampere|fA]]  SI
aA  [[Ampere|aA]]  SI
zA  [[Ampere|zA]]  SI
yA  [[Ampere|yA]]  SI

V  [[Volt|V]]  SI
YV  [[Volt|YV]]  SI
ZV  [[Volt|ZV]]  SI
EV  [[Volt|EV]]  SI
PV  [[Volt|PV]]  SI
TV  [[Volt|TV]]  SI
GV  [[Volt|GV]]  SI
MV  [[Volt|MV]]  SI
kV  [[Volt|kV]]  SI
hV  [[Volt|hV]]  SI
daV  [[Volt|daV]]  SI
dV  [[Volt|dV]]  SI
cV  [[Volt|cV]]  SI
mV  [[Volt|mV]]  SI
µV  [[Volt|µV]]  SI
uV  [[Volt|uV]]  SI
nV  [[Volt|nV]]  SI
pV  [[Volt|pV]]  SI
fV  [[Volt|fV]]  SI
aV  [[Volt|aV]]  SI
zV  [[Volt|zV]]  SI
yV  [[Volt|yV]]  SI

R  [[Rayleigh (unit)|R]]  SI

G  [[Gauss (unit)|G]]  SI
aG  [[Attogauss|aG]]  SI
cG  [[Centigauss|cG]]  SI
daG  [[Decagauss|daG]]  SI
dG  [[Decigauss|dG]]  SI
EG  [[Exagauss|EG]]  SI
fG  [[Femtogauss|fG]]  SI
GG  [[Gigagauss|GG]]  SI
hG  [[Hectogauss|hG]]  SI
kG  [[Kilogauss|kG]]  SI
MG  [[Megagauss|MG]]  SI
mG  [[Milligauss|mG]]  SI
muG  [[Microgauss|muG]]  SI
µG  [[Microgauss|µG]]  SI
nG  [[Nanogauss|nG]]  SI
PG  [[Petagauss|PG]]  SI
pG  [[Picogauss|pG]]  SI
TG  [[Teragauss|TG]]  SI
yG  [[Yoctogauss|yG]]  SI
YG  [[Yottagauss|YG]]  SI
zG  [[Zeptogauss|zG]]  SI
ZG  [[Zettagauss|ZG]]  SI

T  [[Tesla (unit)|T]]  SI
aT  [[Attotesla|aT]]  SI
cT  [[Centitesla|cT]]  SI
daT  [[Decatesla|daT]]  SI
dT  [[Decitesla|dT]]  SI
ET  [[Exatesla|ET]]  SI
fT  [[Femtotesla|fT]]  SI
GT  [[Gigatesla|GT]]  SI
hT  [[Hectotesla|hT]]  SI
kT  [[Kilotesla|kT]]  SI
MT  [[Megatesla|MT]]  SI
mT  [[Millitesla|mT]]  SI
muT  [[Microtesla|muT]]  SI
µT  [[Microtesla|µT]]  SI
nT  [[Nanotesla|nT]]  SI
PT  [[Petatesla|PT]]  SI
pT  [[Picotesla|pT]]  SI
TT  [[Teratesla|TT]]  SI
yT  [[Yoctotesla|yT]]  SI
YT  [[Yottatesla|YT]]  SI
zT  [[Zeptotesla|zT]]  SI
ZT  [[Zettatesla|ZT]]  SI

== Astrophysics ==
au  [[Astronomical unit|au]]
c  [[Speed of light|''c'']]
ly  [[Light-year|ly]]
Earth mass  [[Earth mass|''M''<sub>⊕</sub>]]
Earth radius  [[Earth radius|''R''<sub>⊕</sub>]]
M_Earth  [[Earth mass|''M''<sub>⊕</sub>]]
R_Earth  [[Earth radius|''R''<sub>⊕</sub>]]
Jupiter mass  [[Jupiter mass|''M''<sub>J</sub>]]
Jupiter radius  [[Jupiter radius|''R''<sub>J</sub>]]
M_Jupiter  [[Jupiter mass|''M''<sub>J</sub>]]
R_Jupiter  [[Jupiter radius|''R''<sub>J</sub>]]
Solar mass  [[Solar mass|''M''<sub>&#x2609;</sub>]]
solar mass  [[Solar mass|''M''<sub>&#x2609;</sub>]]
M_Solar  [[Solar mass|''M''<sub>&#x2609;</sub>]]
M_solar  [[Solar mass|''M''<sub>&#x2609;</sub>]]
R_Solar  [[Solar radius|''R''<sub>&#x2609;</sub>]]
R_solar  [[Solar radius|''R''<sub>&#x2609;</sub>]]
Solar radius  [[Solar radius|''R''<sub>&#x2609;</sub>]]
solar radius  [[Solar radius|''R''<sub>&#x2609;</sub>]]
Solar luminosity  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
solar luminosity  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
L_solar  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
L_Solar  [[Solar luminosity|''L''<sub>&#x2609;</sub>]]
pc2  [[Parsec|pc<sup>2</sup>]]
pc3  [[Parsec|pc<sup>3</sup>]]
kpc2  [[Parsec#Parsecs and kiloparsecs|kpc<sup>2</sup>]]
kpc3  [[Parsec#Parsecs and kiloparsecs|kpc<sup>3</sup>]]
kpc  [[Parsec#Parsecs and kiloparsecs|kpc]]
Mpc2  [[Parsec#Megaparsecs and gigaparsecs|Mpc<sup>2</sup>]]
Mpc3  [[Parsec#Megaparsecs and gigaparsecs|Mpc<sup>3</sup>]]
Mpc  [[Parsec#Megaparsecs and gigaparsecs|Mpc]]
Gpc2  [[Parsec#Megaparsecs and gigaparsecs|Gpc<sup>2</sup>]]
Gpc3  [[Parsec#Megaparsecs and gigaparsecs|Gpc<sup>3</sup>]]
Gpc  [[Parsec#Megaparsecs and gigaparsecs|Gpc]]

== Nuclear Physics and Chemistry ==
cm-1  [[Wavenumber|cm<sup>−1</sup>]]
u  [[Atomic mass unit|u]]
osmol  [[Osmole (unit)|osmol]]
Osm  [[Osmole (unit)|Osm]]
M  [[Molarity|M]]
TM  [[Molarity|TM]]  SI
GM  [[Molarity|GM]]  SI
MM  [[Molarity|MM]]  SI
kM  [[Molarity|kM]]  SI
hM  [[Molarity|hM]]  SI
daM  [[Molarity|daM]]  SI
dM  [[Molarity|dM]]  SI
cM  [[Molarity|cM]]  SI
mM  [[Molarity|mM]]  SI
uM  [[Molarity|µM]]  1e-6
nM  [[Molarity|nM]]  SI
pM  [[Molarity|pM]]  SI
kg/mol  [[Molar mass|kg/mol]]
kg.mol-1  [[Molar mass|kg&sdot;mol<sup>−1</sup>]]
g/mol  [[Molar mass|g/mol]]
g.mol-1  [[Molar mass|g&sdot;mol<sup>−1</sup>]]
eV/c2  [[Electronvolt#Mass|eV/''c''<sup>2</sup>]]
keV/c2  [[Electronvolt#Mass|keV/''c''<sup>2</sup>]]
MeV/c2  [[Electronvolt#Mass|MeV/''c''<sup>2</sup>]]
GeV/c2  [[Electronvolt#Mass|GeV/''c''<sup>2</sup>]]
TeV/c2  [[Electronvolt#Mass|TeV/''c''<sup>2</sup>]]
µN  [[Nuclear magneton|µ<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:left"><br />N</span>]]
µB  [[Bohr magneton|µ<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:left"><br />B</span>]]
eV  [[Electronvolt|eV]]
mev  [[Electronvolt|meV]]
keV  [[Electronvolt|keV]]
MeV  [[Electronvolt|MeV]]
GeV  [[Electronvolt|GeV]]
TeV  [[Electronvolt|TeV]]
J/mol  [[Joule per mole|J/mol]]
J.mol-1  [[Joule per mole|J&sdot;mol<sup>−1</sup>]]
kJ.mol-1  [[Joule per mole|kJ&sdot;mol<sup>−1</sup>]]
kJ/mol  [[Joule per mole|kJ/mol]]
MJ.mol-1  [[Joule per mole|MJ&sdot;mol<sup>−1</sup>]]
MJ/mol  [[Joule per mole|MJ/mol]]
GJ/mol  [[Joule per mole|GJ/mol]]
GJ.mol-1  [[Joule per mole|GJ&sdot;mol<sup>−1</sup>]]
TJ.mol-1  [[Joule per mole|TJ&sdot;mol<sup>−1</sup>]]
TJ/mol  [[Joule per mole|TJ/mol]]

== Numbers and phrases ==
pp  [[Page (paper)|pp]]
ppb  [[Parts per billion|ppb]]  1e-9
ppm  [[Parts per million|ppm]]  1e-6
billiard  [[Orders of magnitude (numbers)#1015|billiard]]  1e15
billion  [[1,000,000,000|billion]]  1e9
billionth  [[1,000,000,000|billionth]]  1e-9
billionths  [[1,000,000,000|billionths]]  1e-9
decilliard  [[Orders of magnitude (numbers)#1063|decilliard]]  1e63
decillion  [[Orders of magnitude (numbers)#1033|decillion]]  1e33
decillionth  [[Orders of magnitude (numbers)#1033|decillionth]]  1e-33
decillionths  [[Orders of magnitude (numbers)#1033|decillionths]]  1e-33
milliard  [[1,000,000,000|milliard]]  1e9
million  [[Million|million]]  1e6
millionth  [[Million|millionth]]  1e-6
millionths  [[Million|millionths]]  1e-6
nonilliard  [[Orders of magnitude (numbers)#1057|nonilliard]]  1e57
nonillion  [[Orders of magnitude (numbers)#1030|nonillion]]  1e30
nonillionth  [[Orders of magnitude (numbers)#1030|nonillionth]]  1e-30
nonillionths  [[Orders of magnitude (numbers)#1030|nonillionths]]  1e-30
octilliard  [[Orders of magnitude (numbers)#1051|octilliard]]  1e51
octillion  [[Orders of magnitude (numbers)#1027|octillion]]  1e27
octillionth  [[Orders of magnitude (numbers)#1027|octillionth]]  1e-27
octillionths  [[Orders of magnitude (numbers)#1027|octillionths]]  1e-27
quadrilliard  [[Orders of magnitude (numbers)#1027|quadrilliard]]  1e27
quadrillion  [[Orders of magnitude (numbers)#1015|quadrillion]]  1e15
quadrillionth  [[Orders of magnitude (numbers)#1015|quadrillionth]]  1e-15
quadrillionths  [[Orders of magnitude (numbers)#1015|quadrillionths]]  1e-15
quintilliard  [[Orders of magnitude (numbers)#1033|quintilliard]]  1e33
quintillion  [[Orders of magnitude (numbers)#1018|quintillion]]  1e18
quintillionth  [[Orders of magnitude (numbers)#1018|quintillionth]]  1e-18
quintillionths  [[Orders of magnitude (numbers)#1018|quintillionths]]  1e-18
septilliard  [[Orders of magnitude (numbers)#1045|septilliard]]  1e45
septillion  [[Orders of magnitude (numbers)#1024|septillion]]  1e24
septillionth  [[Orders of magnitude (numbers)#1024|septillionth]]  1e-24
septillionths  [[Orders of magnitude (numbers)#1024|septillionths]]  1e-24
sextilliard  [[Orders of magnitude (numbers)#1039|sextilliard]]  1e39
sextillion  [[Orders of magnitude (numbers)#1021|sextillion]]  1e21
sextillionth  [[Orders of magnitude (numbers)#1021|sextillionth]]  1e-21
sextillionths  [[Orders of magnitude (numbers)#1021|sextillionths]]  1e-21
trilliard  [[Orders of magnitude (numbers)#1021|trilliard]]  1e21
trillion  [[Orders of magnitude (numbers)#1012|trillion]]  1e12
trillionth  [[Orders of magnitude (numbers)#1012|trillionth]]  1e-12
trillionths  [[Orders of magnitude (numbers)#1012|trillionths]]  1e-12

== Angles ==
%                  %                                     Percent                                ANGLE   0.01
percent            %                                     Percent                                ANGLE   0.01
per cent           %                                     Percent                                ANGLE   0.01
‰                  ‰                                     Per mil                                ANGLE   1e-3
per mil            ‰                                     Per mil                                ANGLE   1e-3
per mill           ‰                                     Per mil                                ANGLE   1e-3
per mille          ‰                                     Per mil                                ANGLE   1e-3
permil             ‰                                     Per mil                                ANGLE   1e-3
permill            ‰                                     Per mil                                ANGLE   1e-3
permille           ‰                                     Per mil                                ANGLE   1e-3
°                  °                                     Degree (angle)                         ANGLE   pi/180
deg                °                                     Degree (angle)                         ANGLE   pi/180
'                  ′                                     Minute of arc                          ANGLE   pi/10800
′                  ′                                     Minute of arc                          ANGLE   pi/10800
arcmin             ′                                     Minute of arc                          ANGLE   pi/10800
arcminute          ′                                     Minute of arc                          ANGLE   pi/10800
"                  ″                                     Second of arc                          ANGLE   pi/648000
″                  ″                                     Second of arc                          ANGLE   pi/648000
arcsec             ″                                     Second of arc                          ANGLE   pi/648000
arcsecond          ″                                     Second of arc                          ANGLE   pi/648000

]=]

-- If val has "|long scale=on" the following definitions are used
-- (then, if not found here, the normal definitions are used).
-- Unit code  [[Link|Symbol]]  Flags/Scale
local builtin_units_long_scale = [=[

== Long scale numbers and phrases ==
billion  [[Orders of magnitude (numbers)#1012|billion]]  1e12
billionth  [[Orders of magnitude (numbers)#1012|billionth]]  1e-12
billionths  [[Orders of magnitude (numbers)#1012|billionths]]  1e-12
decillion  [[Orders of magnitude (numbers)#1060|decillion]]  1e60
decillionth  [[Orders of magnitude (numbers)#1060|decillionth]]  1e-60
decillionths  [[Orders of magnitude (numbers)#1060|decillionths]]  1e-60
nonillion  [[Orders of magnitude (numbers)#1054|nonillion]]  1e54
nonillionth  [[Orders of magnitude (numbers)#1054|nonillionth]]  1e-54
nonillionths  [[Orders of magnitude (numbers)#1054|nonillionths]]  1e-54
octillion  [[Orders of magnitude (numbers)#1048|octillion]]  1e48
octillionth  [[Orders of magnitude (numbers)#1048|octillionth]]  1e-48
octillionths  [[Orders of magnitude (numbers)#1048|octillionths]]  1e-48
quadrillion  [[Orders of magnitude (numbers)#1024|quadrillion]]  1e24
quadrillionth  [[Orders of magnitude (numbers)#1024|quadrillionth]]  1e-24
quadrillionths  [[Orders of magnitude (numbers)#1024|quadrillionths]]  1e-24
quintillion  [[Orders of magnitude (numbers)#1030|quintillion]]  1e30
quintillionth  [[Orders of magnitude (numbers)#1030|quintillionth]]  1e-30
quintillionths  [[Orders of magnitude (numbers)#1030|quintillionths]]  1e-30
septillion  [[Orders of magnitude (numbers)#1042|septillion]]  1e42
septillionth  [[Orders of magnitude (numbers)#1042|septillionth]]  1e-42
septillionths  [[Orders of magnitude (numbers)#1042|septillionths]]  1e-42
sextillion  [[Orders of magnitude (numbers)#1036|sextillion]]  1e36
sextillionth  [[Orders of magnitude (numbers)#1036|sextillionth]]  1e-36
sextillionths  [[Orders of magnitude (numbers)#1036|sextillionths]]  1e-36
trillion  [[Orders of magnitude (numbers)#1018|trillion]]  1e18
trillionth  [[Orders of magnitude (numbers)#1018|trillionth]]  1e-18
trillionths  [[Orders of magnitude (numbers)#1018|trillionths]]  1e-18

]=]

return { builtin_units = builtin_units, builtin_units_long_scale = builtin_units_long_scale }