[tex4ht] erorr code 256, possible perl error code, come up with using --lua option with make4ht, error --- Improper dvi file

Nasser M. Abbasi nma at 12000.org
Sat Dec 5 00:08:36 CET 2015

I found the conflict!  And also got a better error. It comes from


--- error --- Improper op while scanning font defs in postamble
Make4ht: Fatal error. Command tex4ht returned exit code 256

It is something to do with


and also when using --lua option at the same time.

If I remove the above package, or remove --lua, tex4ht compiles ok.

This only shows up with including Matlab code using the listings package.

The MWE looks like this:

... matlab code...

That is all !

I am trying to find which part of the Matlab code is causing this
erorr, but so far having hard time. But will try later more.

It is now all self contained. I put the Matlab code
inside the latex file. So one file. No additional anything
needed. No includes. It is called KERNEL.tex, same folder, here it is


Same compile command:

make4ht -u --lua -c ./nma.cfg -e ./main.mk4 KERNEL.tex "htm,3,pic-align,notoc*" -d KERNEL

--- error --- Improper op while scanning font defs in postamble
Make4ht: Fatal error. Command tex4ht returned exit code 256

May be the above will help some expert figure the issue behind this.

I do not know why I had \usepackage{ae,aecompl} in there now.
I have large include file where I load all the packages so I
do not have to worry about these things. But this seems to cause
problems somethimes due to conflicts.

Thank you,

On 12/4/2015 3:14 PM, Nasser M. Abbasi wrote:
> On 12/4/2015 2:11 PM, William F Hammond wrote:
>> On Thu, Dec 3, 2015 at 1:19 PM, Nasser M. Abbasi <nma at 12000.org> wrote:
>> I just put a new zip file with this missing .tex included file:
>> OK, that helps.  I also had to go looking online for mcode.sty.
> Sorry. I'll add this to the zip file soon.
>> It builds with make4ht if I remove the \subimport-ing for e97 and e98.
>> In fact, I had trouble with one of those (I think) in building pdf with
>> pdftex -- a complaint about a double superscript that I did not want to
>> take the time to find after a small bit of looking.  I don't know why we
>> should expect tex4ht to support \subimport.  (Does it?)  Beyond that, I
>> think I see package conflicts with e97
>>    and e98 ... packages loaded followed by the \input of commonlatex which
>> loads some of the same.
> Thanks!  Yes. It is a package conflict !  I am trying now to make
> a MWE to show this. It is in one of these 2 files that I subimport.
> Your hint lead to this.
> Now for the issue of subimport. It does with with tex4ht. I use
> standalone package and subimport very heavily in all my documents.
> I forgot to mention that one needs a patched standalone package
> to make it work with tex4ht. It is a long story. But Martin Scharrer
> was kind enough to patch the standalone package to make it work
> with tex4ht few years ago. It is not yet in the main TL 2015 tree.
> So each time I make new TL, I download the patch and replace
> the current standalone.sty with the patched one.
> https://bitbucket.org/martin_scharrer/standalone/raw/635aacfa0e8f2cba4f4086f4f15d57791b18bf64/standalone.sty
> I'll add this to the zip file also so it is all self contained.
> Here is the related question on tex stackexchange with Martin explaining
> the issue in the comment.
> http://tex.stackexchange.com/questions/95701/syntax-error-when-using-tex4ht-on-latex-file-that-uses-the-standalone-package
> Again, standalone and subimport work with tex4ht. But one needs to use
> the above .sty file, not the one that comes with TL 2015.
> I am trying now to find which package loading is causing the
> conflict. I narrowed down the latex file to only this:
> -----------------------------------------------
> \documentclass[12pt,notitlepage]{report}%
> \input{commonlatex}
> \usepackage{standalone}
> \usepackage{import}
> \begin{document}
> \subimport{problems/e97/}{e97}
> \subimport{problems/e98/}{e98} % in here seems to be the problem
> \end{document}
> -------------------------------------------
> And the above causes the error code to show.
> I will update the mailing list once I find where the conflict is
> and make new zip file.  We are getting close!
>> The HTML document I made (one big file without e97 and e98) looks
>> reasonable.  I ran it through the validator for my private SGML profile of
>> HTML5, and from that I have several comments.
>> There are about 500 img open tags with a loose semi-colon between attribute
>> specs, probably due to some issue in one of your tex4ht configs.  In fact,
>> they are all
>>          class="math";align="absmiddle"
>> There are 7 complaints about </p> tags for which p is not open.
>> Aside from that I would suggest for HTML5 (one is suppoosed to see an HTML5
>> document as a DOM object with two serializations, one xml) that the element
>> names SCRIPT and IMG and the img attribute names SRC, ALT, and WIDTH all be
>> lower case, cf. \HCode for mma_movie_100.
>>               -- Bill
> Thank you,
> --Nasser

More information about the tex4ht mailing list