summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-plain.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtx-plain.lua')
-rw-r--r--scripts/context/lua/mtx-plain.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/context/lua/mtx-plain.lua b/scripts/context/lua/mtx-plain.lua
index d10c21375..1076572fc 100644
--- a/scripts/context/lua/mtx-plain.lua
+++ b/scripts/context/lua/mtx-plain.lua
@@ -103,7 +103,11 @@ function scripts.plain.make(texengine,texformat)
end
function scripts.plain.run(texengine,texformat,filename)
- execute('%s --fmt=%s "%s"',texengine,file.removesuffix(texformat),filename)
+ local t = { }
+ for k, v in next, environment.arguments do
+ t[#t+1] = string.format("--mtx:%s=%s",k,v)
+ end
+ execute('%s --fmt=%s %s "%s"',texengine,file.removesuffix(texformat),table.concat(t," "),filename)
end
function scripts.plain.fonts()
@@ -114,7 +118,7 @@ local texformat = environment.arguments.texformat or environment.arguments.forma
local texengine = environment.arguments.texengine or environment.arguments.engine
if type(texengine) ~= "string" or texengine == "" then
- texengine = environment.arguments.jit and "luajittex" or"luatex"
+ texengine = (jit or environment.arguments.jit) and "luajittex" or "luatex"
end
if type(texformat) ~= "string" or texformat == "" then