Fork me on GitHub

Live LaTeX rendering with AngularJS and MathJax

This is a small angular module to allow live editing of math using MathJax in an AngularJS app.

Use the MathJax CDN, configure inline math with dollar signs, and allow escape characters by adding the following to your header:

<script type="text/x-mathjax-config">
		tex2jax: {
		    inlineMath: [['$','$'], ['\\(','\\)']],
		    processEscapes: true
<script type="text/javascript" src="//"></script>

Once you have a string in scope as "exampleText", you can set up the live rendering using

<span mathjax-bind=exampleText"></span>

Here is an example. Edit the text in the box below to see the results: