If you go the standard route: write in latex then pdflatex, you have no information in the pdf as to what those symbols are, right? So this is pretty close to mathematical ocr, with all of the weird symbols that math alone uses and the various meanings of different lengths of underbar or overbar in the article. Am I wrong? Is there more information left in the pdf? Obviously you can just extract images from the pdf and put that into epub, but it's a crappy solution at best.
For a long time, I've wished for something that could ocr handwritten math and make even a shitty pass at ocr-ing to latex. There appears to be no such software. I doubt there's a big market, but there are a lot of people being paid $15+/hour to latex up written math...