I've often been disappointed at the type of html it's possible to force out of (La)TeX. And epubs are pretty much html, css and images.
I generally think that some kind of markdown with the help of pandoc is the happy path for pleasant writing/editing and good output for html/epub and print/pdf.
I did find this, that have some hints on how to get xml, and then xhtml with support for equations - but it looks cumbersome:
This?
https://github.com/Tufte-LaTeX/tufte-latex
I've often been disappointed at the type of html it's possible to force out of (La)TeX. And epubs are pretty much html, css and images.
I generally think that some kind of markdown with the help of pandoc is the happy path for pleasant writing/editing and good output for html/epub and print/pdf.
I did find this, that have some hints on how to get xml, and then xhtml with support for equations - but it looks cumbersome:
https://tex.stackexchange.com/questions/1551/use-latex-to-pr...
See also: https://github.com/duzyn/tufte-markdown And in particular (beautiful!): https://edwardtufte.github.io/tufte-css/