TeX4ebook is a tool for conversion from \LaTeX\ to ebook formats, such as EPUB, MOBI and EPUB 3. It is based on TeX4ht^[https://tug.org/tex4ht/], which provides instructions for the actual \LaTeX\ to HTML conversion, and on make4ht^[https://ctan.org/pkg/make4ht?lang=en].
The conversion is focused on the logical structure of the converted document and metadata. Basic visual appearance is preserved as well, but you should use custom configurations if you want to make the document more visually appealing. You can include custom CSS or fonts in a configuration file.
TeX4ebook supports the same features as make4ht, in particular build files and extensions. These may be used for post-processing of the generated HTML files, or to configure the image conversion. See the make4ht documentation to see the supported features. [ctan.org/pkg/tex4ebook]