diff options
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/mkutils.lua')
-rwxr-xr-x | Master/texmf-dist/scripts/make4ht/mkutils.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/mkutils.lua b/Master/texmf-dist/scripts/make4ht/mkutils.lua index e550ead9801..56c413ffb43 100755 --- a/Master/texmf-dist/scripts/make4ht/mkutils.lua +++ b/Master/texmf-dist/scripts/make4ht/mkutils.lua @@ -92,9 +92,13 @@ function parse_lg(filename) end +-- local cp_func = os.type == "unix" and "cp" or "copy" +-- maybe it would be better to actually move the files +-- in reality it isn't. +-- local cp_func = os.type == "unix" and "mv" or "move" function cp(src,dest) - local command = string.format('%s %s %s', cp_func, src, dest) + local command = string.format('%s "%s" "%s"', cp_func, src, dest) if cp_func == "copy" then command = command:gsub("/",'\\') end print("Copy: "..command) os.execute(command) @@ -262,15 +266,14 @@ env.Make:add("htlatex",function(par) return 1 end local len = f:seek("end") - - f:seek("set", len - 256) + f:seek("set", len - 1256) local text = f:read("*a") f:close() - if text:match("No pages of output") then return 1 end + if text:match("No pages of output") or text:match("TeX capacity exceeded, sorry") then return 1 end return 0 end ,{correct_exit=0}) -env.Make:add("tex4ht","tex4ht ${tex4ht_par} \"${input}\"", nil, 1) +env.Make:add("tex4ht","tex4ht ${tex4ht_par} \"${input}.${dvi}\"", nil, 1) env.Make:add("t4ht","t4ht ${t4ht_par} \"${input}.${ext}\"",{ext="dvi"},1) function load_config(settings, config_name) |