2

The htlatex way

$ make4ht document.tex "customcfg.cfg, charset=utf-8" " -cunihtf -utf8" "" "-interaction=nonstopmode"

didn't work. Result was:

make4ht:unrecognized parameter: i.

I would also prefer make4ht's own argument system.

$ make4ht -u -c customcfg.cfg document.tex

Maybe this can be achieved by creating custom build file, but documentation (https://github.com/michal-h21/make4ht) for make4ht is somewhat difficult to understand because I don't know lua very well.

1 Answers1

3

Edit 2022:

make4ht now runs in the non-stop mode by default. It also hides most of the command line output, showing only errors and warnings detected by make4ht. I've added the -a (or --loglevel) command line option, which can modify this behavior. You can use various log levels (error, warning, notice, debug). The debug log level is the same as the original method, so it shows full terminal output, and also stops on errors, waiting for the user action.

$ make4ht -a debug filename.tex

Original answer:

In the distributed version of make4ht, you must add spaces before options passed to tex4ht, t4ht and latex, so the correct make4ht invocation should be:

 $ make4ht document.tex "customcfg.cfg, charset=utf-8" " -cunihtf -utf8" "" " -interaction=nonstopmode"

I've just figured out a fix for this issue, you can test it if you want to install the development version of make4ht from Github. It should be possible to normally call

 $ make4ht document.tex "customcfg.cfg, charset=utf-8" "-cunihtf -utf8" "" "-interaction=nonstopmode"

without those spaces.

As for the .mk4 build file, you can modify the parameters to LaTeX using settings table. The following .mk4 file suffices:

 settings.latex_par = settings.latex_par .. " -interaction=nonstopmode"

The latex_par variable contains parameters with LaTeX command line options.

michal.h21
  • 50,697
  • Great! The development version from github seems to fix the problem. Thank you! – Jarno_C-137 Aug 23 '17 at 01:03
  • is it --interaction= or -interaction= ? it seems it works both cases? Btw, I just added "-interaction=batchmode" to my make4ht command and it works, but I still see --interaction=errorstopmode in there?. But the batchmode takes over, since it shows after it in the command. It should have replaced it? Here is screen shot Mathematica graphics – Nasser Apr 15 '22 at 20:31
  • fyi, it also did not replace it, when I used "--interaction=batchmode" (with 2 dashes). But still show up. Not big deal because the one I want takes over as it shows after it. but may be this should not happen? – Nasser Apr 15 '22 at 20:34
  • @Nasser make4ht uses --interaction=nonstopmode by default now. It shows LaTeX output only with the `-a debug' option. – michal.h21 Apr 16 '22 at 07:09