diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/trac-lmx.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/trac-lmx.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/trac-lmx.lua b/Master/texmf-dist/tex/context/base/trac-lmx.lua index b4bfc36d6e9..452d03002f9 100644 --- a/Master/texmf-dist/tex/context/base/trac-lmx.lua +++ b/Master/texmf-dist/tex/context/base/trac-lmx.lua @@ -38,6 +38,9 @@ lmxvariables['color-background-main'] = '#3F3F3F' lmxvariables['color-background-one'] = lmxvariables['color-background-green'] lmxvariables['color-background-two'] = lmxvariables['color-background-blue'] +lmxvariables['color-background-three'] = function() return lmxvariables['color-background-one'] end +lmxvariables['color-background-four'] = function() return lmxvariables['color-background-two'] end + function lmx.set(key, value) lmxvariables[key] = value end @@ -74,7 +77,12 @@ local function do_type(str) end local function do_variable(str) - return variables[str] or lmxvariables[str] -- or format("<!-- unset lmx instance variable: %s -->",str or "?") + local value = variables[str] or lmxvariables[str] -- or format("<!-- unset lmx instance variable: %s -->",str or "?") + if type(value) == "function" then + return value(str) + else + return value + end end function lmx.loadedfile(name) @@ -83,9 +91,9 @@ function lmx.loadedfile(name) end local function do_include(filename) - local stylepath = do_variable('includepath') + local stylepath = do_variable('includepath') -- todo: store paths of loaded files local data = lmx.loadedfile(filename) - if (not data or data == "") and stylepath ~= "" then + if (not data or data == "") and stylepath and stylepath ~= "" then data = lmx.loadedfile(file.join(stylepath,filename)) end if not data or data == "" then |