Use TypeJax as standalone LaTeX typesetter

Introduction

The JaxEdit project is separated as two parts: one is the LaTeX editor, and the other is the LaTeX typesetter named TypeJax. If you only need to display your LaTeX document in web pages, you could use TypeJax together with MathJax.

Example

The following is a minimal working example for TypeJax. Also there is a more complete example.

<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/path/to/typejax/typejax.css">
<script type="text/javascript" src="/path/to/inliner/inliner.js"></script>
<script type="text/javascript" src="/path/to/typejax/typejax.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({ skipStartupTypeset: true });
</script>
<script type="text/javascript" src="/path/to/mathjax/MathJax.js?config=TeX-AMS_HTML"></script>
</head><body>
<textarea id="source" style="display:none;">
\documentclass{article}
\newtheorem{thm}{Theorem}
\begin{document}
\begin{thm}If $x>0$, then $\tan x > x > \sin x$.\end{thm}
\end{document}
</textarea>
<div id="result" style="padding:1em;border:1px solid;"></div>
<script type="text/javascript">
  var latex = document.getElementById("source").value;
  var result = document.getElementById("result");
  typejax.updater.init(latex, latex.length, result);
</script>
</body></html>