I tried to compile a tex file with a lot of math formulae. I tried
tex4ebook -c test.cfg -f epub+dvisvgm_hashes test
with the test.tex
\documentclass{amsart}
\begin{document}
Two formulae displayed:
\[e^{i\pi}+1=0\]
and
\[\sum_{n=1}^\infty\frac1{n^2}=\frac{\pi^2}6\]
let's see the effect.
\end{document}
the test.mk4
if mode == "draft" then
Make:htlatex {}
else
-- Make:add("biber","biber ${input}")
Make:htlatex {}
-- Make:biber {}
Make:htlatex {}
Make:htlatex {}
end
Make:tex4ht{}
Make:t4ht{}
The test.cfg
\Preamble{xhtml,pic-align}
\Configure{Picture}{.svg}
\makeatletter
\makeatother
\DeclareRobustCommand{\[}{\begin{equation*}}
\DeclareRobustCommand{\]}{\end{equation*}}
\begin{document}
\EndPreamble
where the extension dvisvgm is used to accelerate the production of svg images, and it complained
...texmf-dist/scripts/make4ht/extensions/dvisvgm_hashes.lua:251: attempt to concatenate field 't4ht_par' (a nil value)
I looked at dvisvgm_hashes.lua, and inserted the code
if v.params.t4ht_par == nil then
v.params.t4ht_par = ""
end
into
for _,v in ipairs(make.build_seq) do
if v.params.t4ht_par == nil then
v.params.t4ht_par = ""
end
if v.name == "t4ht" then
v.params.t4ht_par = v.params.t4ht_par .. " -p"
end
end
Then I compiled and it complained a lot of not-found errors during Copy: cp test###x.svg test-epub/OEBPS/ ...
and the content.opf contains test###x.svg which does not exist. Seemingly it is due to an incompatibility of tex4ebook and dvisvgm_hashes. I look for a workaround.