[tex4ht] what is the fastest way to convert large document to HTML?
Michal Hoftich
michal.h21 at gmail.com
Mon Aug 20 11:48:58 CEST 2018
Hi Reinhard,
>
> The advantage of make is not only that it can run processes in
> parallel but that it only invokes a program when the source is newer
> than the target. If pages can be processed separately, this saves an
> enourmous amount of time.
The processing is much slower when separate calls to dvisvgm are made
for every page separately. So we call dvisvgm with list of pages which
needs to be converted. This list is generated by calculating md5
hashes (md5 is fast and provided by LuaTeX by default, in contrast to
some better hashes) for individual pages in the DVI file and testing
if svg name with this hash exists.
>
> Furthermore, you can omit the -f option if the name of the file is
> "Makefile", all lowercase with a capital "M". The -f option is
> neccesary if non-standard names are involved and, of course, if there
> are two makefiles in the same directory.
>
I use custom Makefile name in order to prevent overwriting the
possible user Makefile. I think best would be to use os.tmpname() for
temporary file name and remove it after the compilation.
> I don't know how and why the variable "parallel_size" is used in your
> script. Unfortunately I can't run your script because there is no
> file "dvireader.lua" on my system. Where can I get it from?
>
It was included in my earlier post, I attached it again to this post.
It can be compiled using
make4ht -um draft -e new.mk4 small.tex
The parallel_size specifies how many pages should be used for each
dvisvgm call. The default value is 64.
Best regards,
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvisvgmhex.zip
Type: application/zip
Size: 4837 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex4ht/attachments/20180820/df8f2539/attachment-0001.zip>
More information about the tex4ht
mailing list