Closed sevagh closed 6 years ago
The -d
option works only for the generated output files - html, css or images. It doesn't handle the temporary files. They are in fact quite important when you work on the document, I would remove them only in the last step, when the document is done.
It is possible to remove these files using the match function in the build file, clean.mk4
:
local mkutils = require "mkutils"
if mode=="final" then
Make:htlatex{}
Make:htlatex{}
Make:htlatex{}
Make:match("tmp$", function(filename )
local basename = mkutils.remove_extension(filename)
for _, ext in ipairs {"aux", "xref", "4ct", "4tc", "dvi", "idv", "lg", "log", "tmp" } do
local filename = basename .. "." .. ext
print("Removing: " .. filename)
os.remove(filename)
end
end)
end
Compile the file using
make4ht -um final -e clean.mk4 -d build myproj.tex
Thanks for the example.
Hello!
I'm using make4ht to generate html from tex. When I use
make4ht -d build myproj.tex
, it putsmyproj.css
andmyproj.html
intobuild/
but leaves all the temporary/build files in the CWD: 4ct, 4tc, aux, dvi, idv, lg, log, tmp, xrefIs there a flag for putting those files elsewhere? Or a pull request that you're interested in?