summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua')
-rw-r--r--Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua16
1 files changed, 6 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua b/Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua
index e15e0f46a37..c0f64eaff69 100644
--- a/Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua
+++ b/Master/texmf-dist/doc/support/cluttex/src/texrunner/tex_engine.lua
@@ -1,5 +1,5 @@
--[[
- Copyright 2016 ARATA Mizuki
+ Copyright 2016,2019 ARATA Mizuki
This file is part of ClutTeX.
@@ -26,7 +26,7 @@ local shellutil = require "texrunner.shellutil"
--[[
engine.name: string
engine.type = "onePass" or "twoPass"
-engine:build_command(inputfile, options)
+engine:build_command(inputline, options)
options:
halt_on_error: boolean
interaction: string
@@ -40,7 +40,6 @@ engine:build_command(inputfile, options)
output_format: "pdf" or "dvi"
draftmode: boolean (pdfTeX / XeTeX / LuaTeX)
fmt: string
- tex_injection: string
lua_initialization_script: string (LuaTeX only)
engine.executable: string
engine.supports_pdf_generation: boolean
@@ -52,8 +51,9 @@ engine.is_luatex: true or nil
local engine_meta = {}
engine_meta.__index = engine_meta
engine_meta.dvi_extension = "dvi"
-function engine_meta:build_command(inputfile, options)
- local command = {self.executable, "-recorder"}
+function engine_meta:build_command(inputline, options)
+ local executable = options.engine_executable or self.executable
+ local command = {executable, "-recorder"}
if options.fmt then
table.insert(command, "-fmt=" .. options.fmt)
end
@@ -90,11 +90,7 @@ function engine_meta:build_command(inputfile, options)
table.insert(command, v)
end
end
- if type(options.tex_injection) == "string" then
- table.insert(command, shellutil.escape(options.tex_injection .. "\\input " .. inputfile)) -- TODO: what if filename contains spaces?
- else
- table.insert(command, shellutil.escape(inputfile))
- end
+ table.insert(command, shellutil.escape(inputline))
return table.concat(command, " ")
end