2

I am using tex4ebook to convert a .tex project into an .epub

I use a command like the following:

tex4ebook -d output -f epub3+latexmk_build -x book

My problem is that the leaves my directory littered with a host of temporary and auxiliary files. This is obnoxious, and I'd like to have all of those files stored in some sort of build directory. When producing a PDF, I do this using latexmk's -output-directory option but the similar option for tex4ebook only changes the location of the final epub not all the auxilary files.

Is there way to do this?

1 Answers1

2

In the development version of make4ht and tex4ebook, I've added a new option, --build-dir, which does exactly this, it puts auxiliary files to a temp directory. It will work like this:

$ tex4ebook -B build -d out filename.tex

With the version from CTAN, you can clean the aux files using this command:

$ make4ht -m clean book

This will call make4ht in the clean mode and it will remove all generated files for book.tex. It doesn't remove files in the output directory, and it seems that it also doesn't remove the Epub file and one special metadata file, content.opf.

michal.h21
  • 50,697