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

http://docs.textadventures.co.uk/squiffy/master.html

Thanks to Alex who helped me get this working.

© 2020 textadventures.co.uk · Privacy · Help · Contact us · Submit a game