diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-06-08 20:39:19 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-06-08 20:39:19 +0200 |
commit | 8c0a3f520d195ebe1c0f2ae06ecf8abeb915eec7 (patch) | |
tree | 57e47071315fee9ec63964b89eacd9a56bff3d64 /tex/context/base/phys-dim.lua | |
parent | 9160707731bd822be1cf9dc4001e44cb4e5d4929 (diff) | |
download | context-8c0a3f520d195ebe1c0f2ae06ecf8abeb915eec7.tar.gz |
2014-06-06 23:54:00
Diffstat (limited to 'tex/context/base/phys-dim.lua')
-rw-r--r-- | tex/context/base/phys-dim.lua | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/tex/context/base/phys-dim.lua b/tex/context/base/phys-dim.lua index 870cbd29b..db0b5740d 100644 --- a/tex/context/base/phys-dim.lua +++ b/tex/context/base/phys-dim.lua @@ -287,18 +287,29 @@ local long_units = { -- synonyms - ["Metric Ton"] = "tonne", + MetricTon = "tonne", Litre = "liter", + ["Metric Ton"] = "tonne", + -- non-SI units whose values must be obtained experimentally (Table 7) - ["Electron Volt"] = "electronvolt", + AtomicMassUnit = "atomicmassunit", + AstronomicalUnit = "astronomicalunit", + ElectronVolt = "electronvolt", Dalton = "dalton", + ["Atomic Mass Unit"] = "atomicmassunit", ["Astronomical Unit"] = "astronomicalunit", + ["Electron Volt"] = "electronvolt", -- special cases (catch doubles, okay, a bit over the top) + DegreesCelsius = "celsius", + DegreesFahrenheit = "fahrenheit", + DegreeCelsius = "celsius", + DegreeFahrenheit = "fahrenheit", + ["Degrees Celsius"] = "celsius", ["Degrees Fahrenheit"] = "fahrenheit", ["Degree Celsius"] = "celsius", @@ -323,12 +334,14 @@ local long_units = { Hg = "mercury", -- ["Millimetre Of Mercury"] = [[mmHg]], Angstrom = "angstrom", -- strictly Ångström - ["Nautical Mile"] = "nauticalmile", + NauticalMile = "nauticalmile", Barn = "barn", Knot = "knot", Neper = "neper", Bel = "bel", -- in practice only decibel used + ["Nautical Mile"] = "nauticalmile", + -- other non-SI units from CGS system (Table 9) Erg = "erg", @@ -601,7 +614,7 @@ labels.units = allocate { electronvolt = { labels = { en = [[eV]] } }, dalton = { labels = { en = [[Da]] } }, atomicmassunit = { labels = { en = [[u]] } }, - astronomicalunit = { labels = { en = [[ua]] } }, + astronomicalunit = { labels = { en = [[au]] } }, bar = { labels = { en = [[bar]] } }, angstrom = { labels = { en = [[Å]] } }, -- strictly Ångström nauticalmile = { labels = { en = [[M]] } }, @@ -799,6 +812,18 @@ local function update_parsers() -- todo: don't remap utf sequences + V("nothing") * V("shortunit") + V("longprefix") * V("shortunit") -- centi m + V("shortprefix") * V("longunit"), -- c meter + +-- combination = ( V("longprefix") -- centi meter +-- + V("nothing") +-- ) * V("longunit") +-- + ( V("shortprefix") -- c m +-- + V("nothing") +-- + V("longprefix") +-- ) * V("shortunit") -- centi m +-- + ( V("shortprefix") -- c meter +-- ) * V("longunit"), + + dimension = V("somespace") * ( V("packaged") / dimpre @@ -812,9 +837,7 @@ local function update_parsers() -- todo: don't remap utf sequences * V("somespace"), snippet = V("dimension") + V("somesymbol"), - unit = ( - V("snippet") - * (V("operator") * V("snippet"))^0 + unit = ( V("snippet") * (V("operator") * V("snippet"))^0 + V("somepackaged") )^1, } |