Use TypeJax as standalone LaTeX typesetter


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.


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

<!DOCTYPE html>
<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 type="text/javascript" src="/path/to/mathjax/MathJax.js?config=TeX-AMS_HTML"></script>
<textarea id="source" style="display:none;">
\begin{thm}If $x>0$, then $\tan x > x > \sin x$.\end{thm}
<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);