Lot of the things that are on your list are already implemented:
tex4ht
can produce xhtml with mathml
tex4ht
can produce SVG figures from tikz/pgf figures
- METAPOST already outputs SVG out of the box
- Linking to parts of your documents is done by the
hyperref
package, for pdf and html/xhtml.
Connecting to Wolfram|Alpha is surely not a "web standard", and may be difficult, since math in TeX is mostly described in a "presentation", rather than semantic way. On the other hand, it should be possible to do it for each individual equation using the hyperref
package. I do not really see any way to do it automatically.
I know it is possible to produce tooltips and include animations in a pdf document, I am not sure how would that work when converting to html.
Update 07/2020:
The code bellow is not needed anymore. TeX4ht has now full support for the MathJax output. The equivalent of the code bellow is this:
make4ht filename.tex "mathml,mathjax"
If you want to keep your LaTeX math as plain text, use just:
make4ht filename.tex "mathjax"
make4ht
is replacement for htlatex
that converts to HTML5 and UTF-8 by default, so no special configurations as in the old answer are necessary.
Original answer:
You can use TeX4ht
. It can output math as mathml
which can be then displayed with mathjax
. You can also configure html
header to load mathjax
script from mathjax's cdn
:
\Preamble{xhtml,mathml}
\Configure{VERSION}{}
\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
\Configure{@HEAD}{}
\Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht
(http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}
\Configure{@HEAD}{\HCode{<link
rel="stylesheet" type="text/css"
href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}
\Configure{@HEAD}{\HCode{<script type="text/javascript"\Hnewline
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"\Hnewline
></script>\Hnewline}}
\Configure{@HEAD}{\HCode{<style type="text/css">\Hnewline
.MathJax_MathML {text-indent: 0;}\Hnewline
</style>\Hnewline}}
\begin{document}
\EndPreamble
With this config file, we request to output math as mathml
, then configure html
header so resulting file is html5
. Save it as for example ht5mjlatex.cfg
and then call from command line:
htlatex filename.tex "ht5mjlatex.cfg, charset=utf-8" " -cunihtf -utf8"
or you can use William F. Hammond's script (at bottom of the page)
Best Answer
Although it doesn't convert LaTeX directly into HTML, I can really recommend PDF2htmlEX. It's a free software project, which delivers stunning results from the output of PDFtex. Its available for all major platforms (Linux, Mac Windows).