I am trying to compile a latex document that includes lua code with tex4ht. I also make4ht to for building latex to html.
According to help on make4ht the option --lua can be used to compile with lualatex.
The compilation works ok, except when an .png image is included in the document, then it gives an error. Here is a MWE
\documentclass{article}
\usepackage[utf8]{luainputenc} %is this needed? tried with and without
\usepackage{graphicx}
\begin{document}
test
\includegraphics{some_image.png}
\end{document}
when the above is compiled using make4ht -u foo5.tex then it compiles OK. But when compiled using
make4ht --lua -u foo5.tex
then it fails:
Compiler: dvilualatex
Latex options: -jobname=foo5
tex4ht.sty : xhtml,,charset=utf-8
(/usr/local/texlive/2015/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2015/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./foo5.aux)
! String contains an invalid utf-8 sequence.
<read 0>
�PNG
l.6 \includegraphics{some_image.png}
I also tried
make4ht --lua foo5.tex
The problem shows only when including a .png image.
using TL 2015 64 bits on Linux mint.
\\RequirePackage[dvipdfmx]{graphicx}and it works very well. Now the lua code works and the result shows in the HTML which is really very good. – Nasser Jul 14 '15 at 18:19