2

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?

  • It could be you have to install a lua compiler for windows on your computer, but I'm not sure. If you know compiling with c or c++ there are so called make files to control the complete compiling. Could be that make4ht is a make file? – Kurt Jan 31 '15 at 8:11
  • @Kurt It seems I have texlua in my TeX installation, does this count as a lua compiler? I am pretty sure that I am missing whatever default program is responsible for Make. – EngBIRD Feb 1 '15 at 15:38
  • @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
3

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.

  • 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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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