summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/strc-mat.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/strc-mat.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/strc-mat.lua48
1 files changed, 27 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-mat.lua b/Master/texmf-dist/tex/context/base/strc-mat.lua
index 98b1e996c3c..87f35ed1d3a 100644
--- a/Master/texmf-dist/tex/context/base/strc-mat.lua
+++ b/Master/texmf-dist/tex/context/base/strc-mat.lua
@@ -6,28 +6,35 @@ if not modules then modules = { } end modules ['strc-mat'] = {
license = "see context related readme files"
}
+----- copytable = table.copy
+
local structures = structures
-local lists = structures.lists
-local sections = structures.sections
-local floats = structures.floats
-local helpers = structures.helpers
-local formulas = structures.formulas
+local lists = structures.lists
+local sections = structures.sections
+local floats = structures.floats
+local helpers = structures.helpers
+local formulas = structures.formulas -- not used but reserved
-lists.enhancers = lists.enhancers or { }
+----- context = context
+----- simplify = helpers.simplify
-- maybe we want to do clever things with formulas, the store might go away
-local formuladata = { }
-
-function formulas.store(data)
- formuladata[#formuladata+1] = data
- context(#formuladata)
-end
-
-function formulas.current()
- return formuladata[#formuladata]
-end
+-- local formuladata = { }
+--
+-- function formulas.store(data)
+-- formuladata[#formuladata+1] = data
+-- context(#formuladata)
+-- end
+--
+-- function formulas.current()
+-- return formuladata[#formuladata]
+-- end
+
+-- function formulas.simplify(entry)
+-- return simplify(copytable(entry or formuladata[#formuladata]))
+-- end
function helpers.formulanumber(data,spec)
if data then
@@ -38,10 +45,9 @@ function helpers.formulanumber(data,spec)
end
end
-function formulas.simplify(entry)
- return helpers.simplify(table.copy(entry or formuladata[#formuladata]))
-end
-
function lists.formulanumber(name,n,spec)
- helpers.formulanumber(lists.result[n])
+ local result = lists.result
+ if result then
+ helpers.formulanumber(result[n])
+ end
end