I composed a book in LaTeX because I wanted the equations to be set correctly -- and because I've been using LaTeX for decades and am most comfortable using it.
How do I create an ePub (or mobi) from LaTeX or PDF? I tried latex2ebook, which is based on latex2html. It crashes a few pages in. I tried calibre. I tried pdf2ebook. They just make a mess of equations and tables. I didn't scroll through the mess to check how well included graphics were done.