## using mathjax

sostlund
I thought I would just document my efforts to get MathJax working with Squiffy. The parameter 300'' is the millisecond delay in rendering the page. It can presumably be fiddled with to make the page render more quickly.

I put the following two lines right before the </head> line in index.template.html
<script type="text/x-mathjax-config">         MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['$$','$$']]}});         </script><script type="text/javascript"         src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">

I then used the following squiffy file which then does what I intended.

@start intro[[]]:	setTimeout("MathJax.Hub.Queue( MathJax.Hub.Typeset())", 300);[]:	setTimeout("MathJax.Hub.Queue( MathJax.Hub.Typeset())", 300);[[intro]]:We have the equation $\alpha = \beta$  which is typeset with mathjax.Then we can go to section [One].Or [[Next]].[One]:$$\beta = \gamma$$[[Next]]:Final section.

Note that you may have to reformat the spacing if you do a CODE: SELECT ALL''

See:

http://docs.mathjax.org/en/latest/typeset.html and

Thanks to Alex who helped me get this working.

This topic is now closed. Topics are closed after 60 days of inactivity.

Quest
Squiffy
ActiveLit

Documentation
Blog
GitHub

Forums