数式の表示に mathjax を使用しています。私のhtmlファイルに次のような例を書くとうまくいきます:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
});
</script>
....
<div id="problems">
\begin{equation}
\frac{n!}{k!(n-k)!}
\end{equation}
</div>
式をjsonファイルに書きたいとしましょう。mustache.js を使用して、json ファイルから数式を読み込みます。
var html = Mustache.to_html(tpl, data);
$( document ).ready(function() {
$('#problems').html(html);
});
数学記号の代わりにLaTeX Symbols/Scriptが表示されます。
何か案が?