[tex4ht] using -d folder with make4ht issue

Michal Hoftich michal.h21 at gmail.com
Fri Sep 14 09:33:48 CEST 2018

Hi Nasser,

>> Since the whole point of using -d is to keep the current folder
>> where the latex file is clean and move all the generated files
>> during the compile to the child folder, it is possible to change
>> this behaviour to make it use "mv" instead of "cp" ?

No, the point of the -d option is to copy files created by the
conversion process to a destination directory, it is not meant for
keeping the work directory clean.

You can get list of the generated files using this command for the build file:

Make:match(".*", "echo ${filename} >> removes.txt")

It will create file removes.txt, containing all the generated files.
They can be then removed using

xargs rm < removes.txt

Another possibility is to just remove all SVG files.

> So moving the .svg file somewhere else each time, then poor
> make4ht will have hard time trying to figure where the svg
> files went in order to compare hash.
> So I will just not use -d option with the above call and leave
> all the file in current folder.  This seems to be the
> simplest solution for now so not to complicate things.

You can just use the -d option after final build, it doesn't make
sense to use it in draft compilations.


More information about the tex4ht mailing list