I added \usepackage{fontspec} to my .tex file and the magic comment % !TeX program = lualatex in the preamble of my document.
Since I did so, I can no longer convert my document to HTML from a .bat script using make4ht. I receive the error message:
htlatex: ? 45 Fatal Package fontspec Error: The fontspec package requires either XeTeX or LuaLaTeX
I read the question after changing to \usepackage{fontspec} now make4ht do not compile my Latex file in lualatex mode and I still don't understand the problem. The answer to this question (from michal.h21) states that:
Fontspec support have been just added to tex4ht, you can get it after TL update. Both XeLaTeX and LuaLaTeX are supported, although the implementation is different for both engines.
Why does make4ht not recognize the use of LuaLaTex despite the magic comment?
make4ht -l– David Carlisle Nov 07 '21 at 11:35make4htalso supports these comments, but not by default. You can trymake4ht -f html5+detect_engine filename.tex. – michal.h21 Nov 07 '21 at 11:53