Rather than PDF, you’d actually want an EPUB. All the benefits of the web in a single asset without the format where data goes to die. ePub can be rendered anywhere. PDFs are a pain on the small screen.
And AFAIK EPUB gets into the same mess of MathJax as web pages do when they want to render mathematics. No thanks.