Re: [tex4ht] Using texfot with make4ht, how to make it stop at error in compiling?

2023-06-28 Thread Karl Berry
Hi Nasser,

You see from above, it compiled again and again.

When I run your command,

  texfot --tee=/dev/null --ignore="Overfull" \
 make4ht -ulm default -a debug a.tex "mathjax,htm"

It sure seems to me that lualatex is only being run once, although
the error message appears twice in the log, once for the first error
and once after the "emergency stop". See log excerpt below.

By default, texfot closes stdin (I failed to mention this before), so
the program doesn't enter interactive error handling, but just exits.

Also, make4ht reports the nonzero exit status from htlatex:
[FATAL]   make4ht-lib: Fatal error. Command htlatex returned exit code 1

Thanks,
Karl

Here's my .log file from the above:

This is LuaTeX, Version 1.17.0 (TeX Live 2023)  (format=dvilualatex 2023.6.28)  
28 JUN 2023 15:50
.. lots of output ...
--- file errincl.css ---


! LaTeX Error: File `ZZZ' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H   for immediate help.
 ...  
  
l.5 \includegraphics[width=\textwidth]{ZZZ}
 %file does not exist
? 
! Emergency stop.
 ...  
  
l.5 \includegraphics[width=\textwidth]{ZZZ}
 %file does not exist
I could not locate the file with any of these extensions:
.png,.svg,.jpg,.jpeg,.eps,.pdf,.mps
Try typingto proceed.
If that doesn't work, type  X   to quit.



Here is how much of LuaTeX's memory you used:
 5608 strings out of 478026
 10,1977958 words of node,token memory allocated 1854 words of node memory 
still in use:
   6 hlist, 1 rule, 2 local_par, 1 dir, 9 glue, 3 kern, 1 penalty, 13 glyph, 175
 attribute, 52 glue_spec, 175 attribute_list, 1 temp, 2 if_stack, 2 write, 188 s
pecial nodes
   avail lists: 1:1,2:8,3:1,4:1,5:2
 25823 multiletter control sequences out of 65536+60
 17 fonts using 937791 bytes
 67i,1n,75p,831b,86s stack positions out of 1i,1000n,2p,20b,20s
!  ==> Fatal error occurred, bad output DVI file produced!
No pages of output.



Re: [tex4ht] Using texfot with make4ht, how to make it stop at error in compiling?

2023-06-28 Thread Michal Hoftich
Hi Nasser,


> > It seems like there should be a way to get make4ht to keep the output
> > and still stop on error, but that's up to Michal. Specify -a warning
> > and also errorstopmode somehow? (And not need to use texfot.) Or
> > -a debug and errorstopmode?
> >

One thing that is possible is to stop the compilation on the first
error, using -halt-on-error option. This should make the compilation
faster, if your file contains errors. Try this build file:

Make:htlatex { latex_par="-halt-on-error"}

Best,
Michal