diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-24 21:21:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-24 21:21:45 +0000 |
commit | 437cb829fc15a8874bb17cb344dc554518daafc2 (patch) | |
tree | 632fc70ebed244e4a7746dd70fad2df6de08d14c /Master | |
parent | 69e636169cd6533e5aacbe16b2edaeb9e3d8f7e5 (diff) |
make4ht (24may19)
git-svn-id: svn://tug.org/texlive/trunk@51215 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/changelog.tex | 46 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf | bin | 112999 -> 110638 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua | 16 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/make4ht/make4ht | 2 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua | 2 |
6 files changed, 63 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/support/make4ht/changelog.tex b/Master/texmf-dist/doc/support/make4ht/changelog.tex index 0c70be59a7e..8d46424decf 100644 --- a/Master/texmf-dist/doc/support/make4ht/changelog.tex +++ b/Master/texmf-dist/doc/support/make4ht/changelog.tex @@ -3,6 +3,52 @@ \begin{itemize} \item + 2019/05/24 + + \begin{itemize} + \tightlist + \item + version 0.2g released + \item + fixed failing \texttt{dvisvgm\_hashes} extension on Windows. + \end{itemize} +\item + 2019/05/02 + + \begin{itemize} + \tightlist + \item + fixed infinite loop bug in the \texttt{dvisvgm\_hashes} extension + \end{itemize} +\item + 2019/04/09 + + \begin{itemize} + \tightlist + \item + \texttt{make4ht-joincolors} fix: remove the hash character from the + color name. This caused issues with colors specified in the + hexadecimal format. + \end{itemize} +\item + 2019/04/02 + + \begin{itemize} + \tightlist + \item + \texttt{dvisvgm\_hashes} fix: update also the lgfile.images table + with generated filenames, in order to support tex4ebook + \end{itemize} +\item + 2019/04/01 + + \begin{itemize} + \tightlist + \item + fixed bug in \texttt{dvisvgm\_hashes} extension: didn't check for + table index existence in string concenation + \end{itemize} +\item 2019/03/21 \begin{itemize} diff --git a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf Binary files differindex 84653d3df82..0b7dd091ea1 100644 --- a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf +++ b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf diff --git a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua index 1b7a97be0a2..94a3a054e61 100644 --- a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua +++ b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua @@ -12,6 +12,8 @@ local function extract_colors(csscontent) local converted = "textcolor-" .. color:gsub("rgb%((.-),(.-),(.-)%)", function(r,g,b) return string.format("%02x%02x%02x", tonumber(r), tonumber(g), tonumber(b)) end) + -- remove the # characters from the converted color name + converted = converted:gsub("%#", "") -- save the id and used color colors[id] = converted used_colors[converted] = color diff --git a/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua b/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua index aae3e4bba96..83010ac388f 100644 --- a/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua +++ b/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua @@ -48,6 +48,7 @@ local function get_generated_pages(output, pages) while(pos) do pos, finish, file = string.find(output, "output written to ([^\n]+)", finish) pages[tonumber(page)] = file + if not finish then break end pos, finish, page = string.find(output, "processing page (%d+)", finish) end return pages @@ -77,7 +78,7 @@ local function make_ranges(pages) end local function read_log(dvisvgmlog) - local f = io.open(dvisvgmlog, "r") + local f = io.open(dvisvgmlog, "rb") if not f then return nil, "Cannot read dvisvgm log" end local output = f:read("*all") f:close() @@ -169,7 +170,7 @@ local function get_dvi_pages(arg) cpu_cnt = arg.cpu_cnt or extoptions.cpu_cnt or cpu_cnt dvisvgm_par.scale = arg.scale or extoptions.scale or 1.15 dvisvgm_options = dvisvgm_options % dvisvgm_par - local f = io.open(idv_file, "r") + local f = io.open(idv_file, "rb") if not f then return nil, "Cannot open idv file: " .. idv_file end local content = f:read("*all") f:close() @@ -229,6 +230,14 @@ function M.modify_build(make) lgfiles[i] = replace end end + -- tex4ebook process also the images table, so we need to replace generated filenames here as well + local lgimages = make.lgfile.images + for _, image in ipairs(lgimages) do + local replace = output_map[image.output] + if replace then + image.output = replace + end + end end end) @@ -248,7 +257,8 @@ function M.modify_build(make) -- disable the image processing for _,v in ipairs(make.build_seq) do if v.name == "t4ht" then - v.params.t4ht_par = v.params.t4ht_par .. " -p" + local t4ht_par = v.params.t4ht_par or make.params.t4ht_par or "" + v.params.t4ht_par = t4ht_par .. " -p" end end make:image(".", function() return "" end) diff --git a/Master/texmf-dist/scripts/make4ht/make4ht b/Master/texmf-dist/scripts/make4ht/make4ht index ab8e1cfbc6f..564bc6e7a04 100755 --- a/Master/texmf-dist/scripts/make4ht/make4ht +++ b/Master/texmf-dist/scripts/make4ht/make4ht @@ -27,7 +27,7 @@ make4ht [options] filename ["tex4ht.sty op." "tex4ht op." "t4ht op" "latex op"] -- set version number. the template should be replaced by the -- actual version number by the build script -local version = "v0.2f" +local version = "v0.2g" mkparams.version_number = version local args = mkparams.get_args() diff --git a/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua b/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua index f5988ee96c4..6355650ef43 100755 --- a/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua +++ b/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua @@ -103,7 +103,7 @@ local function read_opcode(opcode, str, pos) if not format then return nil, "Cannot find opcode format: " .. opcode end -- check that opcode byte in the current position is the same as required opcode local op = read_byte(str, pos) - if op ~= format.opcode then return nil, "Wrong opcode " .. op " at position " .. pos end + if op ~= format.opcode then return nil, "Wrong opcode " .. op .. " at position " .. pos end return read_arguments(str, pos+1, format.args) end |