[tex4ht] what is the fastest way to convert large document to HTML?
Nasser M. Abbasi
nma at 12000.org
Mon Aug 20 23:27:23 CEST 2018
On 8/20/2018 2:24 PM, Michal Hoftich wrote:
> Hi Nasser,
>> Thank you again Michal;
>> I do not understand why it works for you and it hangs for me.
>> I made a small movie so you can see. This is animated GIF file,
>> so please click on this in your browser to see the movie
>> When I compile small.tex, it works. But when I compile try.tex
>> which is large latex file, it seems to hang.
>> make4ht -um draft -f html5+dvisvgm_hashes small.tex svg #works
>> make4ht -um draft -f html5+dvisvgm_hashes try.tex svg #hangs
>> i.e. no more output. It seems to stop in the middle
>> as you can see in the movie. I do not know if I wait 5 hrs
>> more or more it will finish as there is no indication it is doing
> It seems to hang in the tex4ht step, it is indeed strange. But it
> hangs even without the dvisvgm_hashes extension.
> I think I've found the issue: you need to compile it with LuaTeX, so
> use the -l option:
> make4ht -ulm draft -f html5+dvisvgm_hashes try.tex svg
> I don't know why it hangs with pdflatex.
> Best regards,
Yes, with -ulm instead of -um it no longer hangs. I thought
when you said it worked for you, that you used the same commnad
you showed :).
I am trying it now on the larger file try.tex. Interesting data:
On linux PC, 12 GB ram, i5 intel 8400, I get about 0.7 seconds
per math expression for conversion, where it says
pre-processing DVI file
1 of 16222 pages converted in 0.7 seconds...
While on the same file, running under windows 10 linux subsystem
on a PC with 64 GB running i7 latest and fastest CPU, it is
getting about 2.1 seconds per page. So linux PC, which is
much less powefull than the windows PC, is 3 times as fast
Using a calculator, this means on Linux inside windows (or in VBox),
it will take about 340,662 seconds to convert the math to svg,
which is 9.4 hrs. While on Linux it takes 3.15 hrs to do
And this is try.tex file, 1,000 PDF pages, which is not even the full
file I am working on now, which is 4 times as large and
about 4,000 pages.
When it is finished, I will re-run it again, to see it
if makr4ht will detect the svg files are there using the hash and
if it will not go though this whole process again and will
only do it for math that has changed.
More information about the tex4ht