diff options
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/data-pre.lua | 33 | ||||
-rw-r--r-- | tex/context/base/mkiv/grph-fil.lua | 15 | ||||
-rw-r--r-- | tex/context/base/mkiv/grph-inc.lua | 5 | ||||
-rw-r--r-- | tex/context/base/mkiv/mult-fun.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 23589 -> 23576 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 248533 -> 248572 bytes |
8 files changed, 55 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index bc2a91dcf..f1fa1e266 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2021.07.22 19:11} +\newcontextversion{2021.07.23 18:50} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 061a6651d..c54db1589 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2021.07.22 19:11} +\edef\contextversion{2021.07.23 18:50} %D Kind of special: diff --git a/tex/context/base/mkiv/data-pre.lua b/tex/context/base/mkiv/data-pre.lua index f7df8b918..cab297d19 100644 --- a/tex/context/base/mkiv/data-pre.lua +++ b/tex/context/base/mkiv/data-pre.lua @@ -25,6 +25,8 @@ if not modules then modules = { } end modules ['data-pre'] = { -- version : operating system version -- release : operating system release + +local ipairs = ipairs local insert, remove = table.insert, table.remove local resolvers = resolvers @@ -40,6 +42,7 @@ local dirname = file.dirname local joinpath = file.join local isfile = lfs.isfile +local isdir = lfs.isdir prefixes.environment = function(str) return cleanpath(expansion(str)) @@ -92,6 +95,8 @@ prefixes.pathname = function(str) return cleanpath(dirname((fullname ~= "" and fullname) or str)) end +-- we can actually freeze these + prefixes.selfautoloc = function(str) local pth = getenv('SELFAUTOLOC') return cleanpath(str and joinpath(pth,str) or pth) @@ -112,6 +117,34 @@ prefixes.home = function(str) return cleanpath(str and joinpath(pth,str) or pth) end +do + local tmppth + + prefixes.temp = function(str) + if not tmppth then + for _, s in ipairs { "TMP", "TEMP", "TMPDIR", "TEMPDIR" } do + tmppth = getenv(s) + if tmppth ~= "" and isdir(tmppth) then + break + end + end + if not tmppth or tmppth == "" then + tmppth = "." + end + end + return cleanpath(str and joinpath(tmppth,str) or tmppth) + end + + prefixes.texruns = function(str) + local pth = getenv('TEXRUNS') + if pth == "" then + pth = tmppth + end + return cleanpath(str and joinpath(pth,str) or pth) + end + +end + prefixes.env = prefixes.environment prefixes.rel = prefixes.relative prefixes.loc = prefixes.locate diff --git a/tex/context/base/mkiv/grph-fil.lua b/tex/context/base/mkiv/grph-fil.lua index b39807830..e40420125 100644 --- a/tex/context/base/mkiv/grph-fil.lua +++ b/tex/context/base/mkiv/grph-fil.lua @@ -42,13 +42,20 @@ end job.register('job.files.collected', tobesaved, initializer) +-- When there is a runpath specified, we're already there, so then we only need to +-- pass the orginal path. But we pass it because it will prevent prepending the +-- current direction to the given name. + local runner = sandbox.registerrunner { name = "hashed context run", program = "context", - template = [[%options% %filename%]], + template = [[%options% --path=%path% %filename%]], + template = [[%options% %?path: --path=%path% ?% %?runpath: --runpath=%runpath% ?% %filename%]], checkers = { options = "string", filename = "readable", + path = "string", + runpath = "string", } } @@ -90,7 +97,13 @@ function jobfiles.run(name,action) -- can be anything but we assume it gets checked by the sandbox os.execute(action) elseif ta == "table" then + local path = action.path + local runpath = action.runpath + action.path = environment.arguments.path + action.runpath = environment.arguments.runpath runner(action) + action.path = path + action.runpath = runpath else report_run("processing file, no action given for processing %a",name) end diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua index c27dade9d..3789191f1 100644 --- a/tex/context/base/mkiv/grph-inc.lua +++ b/tex/context/base/mkiv/grph-inc.lua @@ -555,6 +555,11 @@ function figures.setpaths(locationset,pathlist) end end end + -- new + if environment.arguments.path then + table.insert(t,1,environment.arguments.path) + end + -- figure_paths = t last_pathlist = pathlist figures.paths = figure_paths diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua index f049422bf..50ced6ead 100644 --- a/tex/context/base/mkiv/mult-fun.lua +++ b/tex/context/base/mkiv/mult-fun.lua @@ -36,6 +36,7 @@ return { "applyparameters", "pushparameters", "popparameters", + "setluaparameter", "definecolor", -- "record", "newrecord", "setrecord", "getrecord", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 96866e655..6cc175fa2 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 8013acd66..95162e960 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf |