[Tex/LaTex] Install make4ht with MiKTeX

htlatexluamake4htmiktextex4ht

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

\documentclass{report}  
\usepackage{amsmath}
\begin{document}
        \begin{equation}
            \text{C~=~}{\frac{a}{b}}
        \end{equation}
\end{document}

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?

Best Answer

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

path                                                                        

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.