Solution I: Use a format that translates to many
- Sphinx can do nice HTML, LaTeX, epub, (almost) plain text,
man pages, Gnome devhelp files, Qt help files, texinfo, JSON
- Markdown can do LaTeX, HTML, MS Word, OpenOffice, XML,
reStructuredText, epub, DocBook, ... but not Sphinx
- IPython notebook: can do LaTeX, reStructuredText, HTML, PDF,
Python script
- Sphinx and Markdown has some limited math support