texlive[51215] trunk: make4ht (24may19)
commits+karl at tug.org
commits+karl at tug.org
Fri May 24 23:21:45 CEST 2019
Revision: 51215
http://tug.org/svn/texlive?view=revision&revision=51215
Author: karl
Date: 2019-05-24 23:21:45 +0200 (Fri, 24 May 2019)
Log Message:
-----------
make4ht (24may19)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht
trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex
trunk/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf
trunk/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua
trunk/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua
trunk/Master/texmf-dist/scripts/make4ht/make4ht
trunk/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua
Modified: trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht 2019-05-24 21:21:10 UTC (rev 51214)
+++ trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht 2019-05-24 21:21:45 UTC (rev 51215)
@@ -27,7 +27,7 @@
-- 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()
Modified: trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex 2019-05-24 21:21:10 UTC (rev 51214)
+++ trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex 2019-05-24 21:21:45 UTC (rev 51215)
@@ -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}
Modified: trunk/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua 2019-05-24 21:21:10 UTC (rev 51214)
+++ trunk/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincolors.lua 2019-05-24 21:21:45 UTC (rev 51215)
@@ -12,6 +12,8 @@
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
Modified: trunk/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua 2019-05-24 21:21:10 UTC (rev 51214)
+++ trunk/Master/texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua 2019-05-24 21:21:45 UTC (rev 51215)
@@ -48,6 +48,7 @@
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 @@
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 @@
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 @@
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 @@
-- 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)
Modified: trunk/Master/texmf-dist/scripts/make4ht/make4ht
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/make4ht 2019-05-24 21:21:10 UTC (rev 51214)
+++ trunk/Master/texmf-dist/scripts/make4ht/make4ht 2019-05-24 21:21:45 UTC (rev 51215)
@@ -27,7 +27,7 @@
-- 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()
Modified: trunk/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua 2019-05-24 21:21:10 UTC (rev 51214)
+++ trunk/Master/texmf-dist/scripts/make4ht/make4ht-dvireader.lua 2019-05-24 21:21:45 UTC (rev 51215)
@@ -103,7 +103,7 @@
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
More information about the tex-live-commits
mailing list