Once in a while I need to convert a *.tex file into html (to import it into a Word document). Usually I use tex4ht, recently I learned about make4ht. I have much respect for the current maintainer and appreciate his work.

Once in a while I typeset a *.tex file using LuaLaTeX and the fontspec package, of course.

Now I tried to convert the *.tex file with fontspec to html, which failed, because tex4ht seems not to support fontspec.

It was not troublesome at all to comment out all commands related to fontspec and to insert the packages I need for pdftex.

My questions:

  1. Is it true that tex4ht and friends don't support fontspec yet? I found the lua4ht project and this answer here. But this isn't quite easy going...
  2. If we can't use fontspec in files with fontspec (=LuaTeX), for the time being we will need fontenc and whatever -- true?

Or did I get something completely wrong?

  • 1
    make4ht --help says -l,--lua Use lualatex for document compilation so it looks like luatex support should be there, assume(?) that includes fontspec? Aug 6, 2019 at 20:55
  • 1
    Yes, make4ht -l supports fontspec, unless something is broken. XeTeX Is supported as well, using the -x switch
    – michal.h21
    Aug 6, 2019 at 21:16
  • @michal.h21 Thank you (and David as well). I searched for LuaTeX in the manual of make4ht and flipped over the first 10 pages, but failed to read the section about the commands beginning on p. 16.
    – Keks Dose
    Aug 7, 2019 at 7:28

1 Answer 1


As I have been told in the comments, the command line option -l is needed to compile a "LuaTeX" *.tex file.

make4ht -l xyz.tex

has been sufficient for my document, manual p. 17...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .