[tex4ht] DVI error: page count in postamble doesn't match actual number of pages

Nasser M. Abbasi nma at 12000.org
Sat Aug 18 12:52:05 CEST 2018

On 8/18/2018 5:13 AM, Michal Hoftich wrote:
> Hi Nasser,

> The max_count error is caused by the .mk4 file, the max_count
> specifies maximal length of number in the .svg file names. The default
> value is 5, which means that it supports up to 99999 images. You need
> to try to increase this value in your case. For example
> local max_count = 7

Thanks Michal for the suggestion.

I tried max_count=10, it still failed. Tried max_count=50, it still failed,
then tried max_count=100, it still failed. How large can this counter be
and still be safe?

Is it possible to do this without one having to fix such counters by hand
depending on the file? may be automate it and have make4ht figure
the correct value?  Am I using make4ht correctly using main.mk4 or
may be there is a better way to do all of this?

>> And I am wondering now if this is why compiling this file to HTML
>> always takes so long. May be these error messages are what is slowing
>> htlatex.
> Your main file is 7 MB and it includes another 1732 files. It will
> always take a lot of time to compile this, I am afraid.

Yes, I understand.  But many hrs, vs. 2 minutes for lualatex is too much.

I am starting to think this whole mixing of HTML and math is not practical.

May be I should just use PDF files for everything and forget about conversion to

After all, browsers have build-in PDF readers now, and PDF reader are everywhere.
I need to think more about this.

>> The file does eventually get compiled to HTML, yes. I just did not
>> know if there are problems in the generated HTML. Too many web page
>> to check visually that each page has the correct math placed on it
>> or not.
> You may try some automated tools for html testing.
> Best regards,
> Michal

I am not sure how an automated tool testing for HTML will tell
is wrong math image is on a page or not. But thank you again
for the suggestion. I am still learning all this math and HTML


More information about the tex4ht mailing list