diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-26 20:31:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-26 20:31:33 +0000 |
commit | c38f2e3735eb97eaf74132a87ca64c6980519265 (patch) | |
tree | bcb896190dc5ce20972e2d10339d5d26aa01bc1e /Master/texmf-dist/scripts/tex4ebook | |
parent | 1a474c651eb1c2b83dd97da9e49738c391ebbee4 (diff) |
tex4ebook (26jul21)
git-svn-id: svn://tug.org/texlive/trunk@60083 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/tex4ebook')
-rwxr-xr-x | Master/texmf-dist/scripts/tex4ebook/tex4ebook | 3 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/tex4ebook/tex4ebook b/Master/texmf-dist/scripts/tex4ebook/tex4ebook index 91df031ffb7..2b2b38b1133 100755 --- a/Master/texmf-dist/scripts/tex4ebook/tex4ebook +++ b/Master/texmf-dist/scripts/tex4ebook/tex4ebook @@ -67,7 +67,7 @@ else end if args.version then - print "tex4ebook v0.3c" + print "tex4ebook v0.3d" return end @@ -201,4 +201,5 @@ executor.run(input,params) executor.writeContainer() executor.clean() log:status("Conversion finished") +logging.exit_status() --print(args[1]) diff --git a/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua b/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua index 75304e24942..539cf930ab6 100755 --- a/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua +++ b/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua @@ -157,6 +157,10 @@ function make_opf() local id=table.concat(dir_part,"-")..fname.."_"..ext -- remove invalid characters from id start id = id:gsub("^[%.%-]*","") + -- remove colons + id = id:gsub(":", "_") + -- id cannot start by number, add trailing "x" character + id = id:gsub("^([%d])", "x%1") return "<item id='"..id .. "' href='"..item.."' media-type='"..mimetype.."' />",id end local find_all_files= function(s,r) @@ -277,9 +281,9 @@ function make_opf() end end local function find_zip() - if io.popen("zip -v","r"):close() then + if assert(io.popen("zip -v","r"):close()) then return "zip" - elseif io.popen("miktex-zip -v","r"):close() then + elseif assert(io.popen("miktex-zip -v","r"):close()) then return "miktex-zip" end log:warning "It appears you don't have zip command installed. I can't pack the ebook" |