summaryrefslogtreecommitdiff
path: root/tex/context/base/phys-dim.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/phys-dim.lua')
-rw-r--r--tex/context/base/phys-dim.lua43
1 files changed, 15 insertions, 28 deletions
diff --git a/tex/context/base/phys-dim.lua b/tex/context/base/phys-dim.lua
index e40d1eabb..45a99978d 100644
--- a/tex/context/base/phys-dim.lua
+++ b/tex/context/base/phys-dim.lua
@@ -53,9 +53,6 @@ local variables = interfaces.variables
local v_reverse = variables.reverse
local allocate = utilities.storage.allocate
-local context = context
-local commands = commands
-
local trace_units = false
local report_units = logs.reporter("units")
@@ -384,15 +381,13 @@ local long_operators = {
local long_suffixes = {
- Linear = "linear",
- Square = "square",
- Cubic = "cubic",
- Quadratic = "quadratic",
- Inverse = "inverse",
- ILinear = "ilinear",
- ISquare = "isquare",
- ICubic = "icubic",
- IQuadratic = "iquadratic",
+ Linear = "linear",
+ Square = "square",
+ Cubic = "cubic",
+ Inverse = "inverse",
+ ILinear = "ilinear",
+ ISquare = "isquare",
+ ICubic = "icubic",
}
@@ -459,29 +454,23 @@ local short_suffixes = { -- maybe just raw digit match
["1"] = "linear",
["2"] = "square",
["3"] = "cubic",
- ["4"] = "quadratic",
["+1"] = "linear",
["+2"] = "square",
["+3"] = "cubic",
- ["+4"] = "quadratic",
["-1"] = "inverse",
["-1"] = "ilinear",
["-2"] = "isquare",
["-3"] = "icubic",
- ["-4"] = "iquadratic",
["^1"] = "linear",
["^2"] = "square",
["^3"] = "cubic",
- ["^4"] = "quadratic",
["^+1"] = "linear",
["^+2"] = "square",
["^+3"] = "cubic",
- ["^+4"] = "quadratic",
["^-1"] = "inverse",
["^-1"] = "ilinear",
["^-2"] = "isquare",
["^-3"] = "icubic",
- ["^-4"] = "iquadratic",
}
local symbol_units = {
@@ -586,7 +575,7 @@ labels.units = allocate {
lumen = { labels = { en = [[lm]] } },
lux = { labels = { en = [[lx]] } },
bequerel = { labels = { en = [[Bq]] } },
- gray = { labels = { en = [[Gy]] } },
+ gray = { labels = { en = [[Gr]] } },
sievert = { labels = { en = [[Sv]] } },
katal = { labels = { en = [[kat]] } },
minute = { labels = { en = [[min]] } },
@@ -646,15 +635,13 @@ labels.operators = allocate {
}
labels.suffixes = allocate {
- linear = { labels = { en = [[1]] } },
- square = { labels = { en = [[2]] } },
- cubic = { labels = { en = [[3]] } },
- quadratic = { labels = { en = [[4]] } },
- inverse = { labels = { en = [[-1]] } },
- ilinear = { labels = { en = [[-1]] } },
- isquare = { labels = { en = [[-2]] } },
- icubic = { labels = { en = [[-3]] } },
- iquadratic = { labels = { en = [[-4]] } },
+ linear = { labels = { en = [[1]] } },
+ square = { labels = { en = [[2]] } },
+ cubic = { labels = { en = [[3]] } },
+ inverse = { labels = { en = [[-1]] } },
+ ilinear = { labels = { en = [[-1]] } },
+ isquare = { labels = { en = [[-2]] } },
+ icubic = { labels = { en = [[-3]] } },
}
local function dimpus(p,u,s)