I am trying to install make4ht on a system running MiKTex. The recommended instructions https://d800fotos.wordpress.com/2015/01/19/create-e-books-from-latex-tex-files-ebook-aus-latex-tex-dateien-erstellen/ are specific to TexLive and so I am looking for some help getting this setup. I believe the root of the problem is either that MiKTeX doesn't have texmf directory or I can't figure out how to run the files themselves.

Instruction summary: I downloaded the zip files and unpacked them in the recommended directory structure:

.../texmf/scripts/lua/make4ht/[root zip extracted]

.../texmf/tex/latex/tex4ebook/[root zip extracted]

I added .../texmf/ to the roots of MikTex settings and when I click apply I see a MiKTeX maintenance dialog box scan the files.

Next to make make4ht runnable (as per the answer below) - C:\Program Files\MiKTeX 2.9\miktex\bin\x64\make4ht.bat only contains

texlua "F:\...\texmf\scripts\lua\make4ht\make4ht" %*

Sample Tex File: eqntests.tex


To compile my tex file using make4ht I run

FOR /R %%A IN (*.tex) DO ("make4ht.bat" "%%~nxA")

But I get an error message as described: [string "Make:htlatex{}..."]:1: attempt to index global 'Make' (a nil value) .../texmf/scripts/lua/make4ht/mkutils.lua:281: assertion failed!

I appear to be missing the Make program. What required program provides the Make command?

  • @EngBIRD this Make is part of make4ht and it is defined in make4ht-lib.lua file. is this file missing? – michal.h21 Feb 1 '15 at 18:52
  • @michal.h21 It is indeed present. ...\texmf\scripts\lua\make4ht\make4ht-lib.lua do I need to create a build bat file for all *.lua files? – EngBIRD Feb 1 '15 at 22:10
  • @EngBIRD no, is is needed only for make4ht. does kpsewhich make4ht-lib.lua find anything? (if you run it from different directory than make4ht is installed) – michal.h21 Feb 1 '15 at 22:24
  • @michal.h21 Yes, the kpsewhich call successfully reports the full file path. And I can confirm that I have run kpsewhich from different drives and it always reports the same file path. – EngBIRD Feb 1 '15 at 23:33
  • @EngBIRD I changed module declaration make4ht-lib, maybe it could help (it used method which is deprecated in Lua 5.2). you can try to upgrade make4ht – michal.h21 Feb 1 '15 at 23:41

I just added installation instructions to make4ht readme, I will copy Windows instructions here:

See a guide by Volker Gottwald on how to install make4ht and tex4ebook`.

Create a batch file for make4ht somewhere in the path:

texlua "C:\full\path\to\make4ht" %*                                         

you can find directories in the path with


command, or you can create new directory and add it to the path.

Note for Miktex users: you may need to create texmf directory first. See this answer on TeX.sx.

  • Thanks for the answer: I can't quite tell if my implementation of your solution was unsuccessful or if I have missed an important underlying requirement. I get an error message as described: [string "Make:htlatex{}..."]:1: attempt to index global 'Make' (a nil value) .../texmf/scripts/lua/make4ht/mkutils.lua:281: assertion failed! – EngBIRD Jan 31 '15 at 23:09
  • @EngBIRD: Make your problem description so that other can reproduce the problem. Add the exact call you are using, show the minimal document etc. – Ulrike Fischer Feb 1 '15 at 10:08
  • @UlrikeFischer I updated my question to make it reproducible (on both of my computers), but I honestly think that the solution posted above should have worked - and would have if my computer had the required prerequisites. I.e. whatever program gives ` Make` as I think the error I posted just indicates that Make is missing. – EngBIRD Feb 1 '15 at 16:02
  • I don't get this error, but I get always latex: Not enough room in an internal buffer.. @michal.h21: Is there any way to see the actual latex call a "make4ht file" call is doing? – Ulrike Fischer Feb 1 '15 at 17:38
  • @UlrikeFischer I've added latex call print. and also slightly modified some parameters which looked suspicious anw which were different than htlatex uses – michal.h21 Feb 1 '15 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.