XF 1.5 MathJax working but won't go on 1 line

PJK

Active member
I have MathJax up and working by:
1) Putting this script into the 'page_container_js_head' template:
Code:
<script type="text/javascript"
  src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG">
</script>
2) Adding a custom BBcode using these values:
https://www.dropbox.com/s/3ao8cpxcw269y4j/Screenshot 2016-04-04 17.25.32.png?dl=0

It does work, however, each time I use the math tags, it puts everything else on a new line:
https://www.dropbox.com/s/e6uc5o0gyisbibt/Screenshot 2016-04-04 17.30.54.png?dl=0

I want to allow it is be in the middle of a sentence, as shown here:
https://www.dropbox.com/s/a6z0agiejazarpy/Screenshot 2016-04-04 17.31.42.png?dl=0

What is the best way of going about this? Thanks.
 
Thanks. Is it possible to implement the tex2jax using the CDN, or does MathJax have to be installed on the server to use it? I can't quite tell after reading around there. If you know how to implement it with the CDN, please let me know. Thanks again.
 
Thanks. Is it possible to implement the tex2jax using the CDN, or does MathJax have to be installed on the server to use it? I can't quite tell after reading around there. If you know how to implement it with the CDN, please let me know. Thanks again.

I'm sorry, I do not know.
 
I found a solution. Simply add this to the page_container_js_head template and it will work like a charm:
Code:
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$$','$$'], ["\\(","\\)"] ],
      displayMath: [ ['$$$','$$$'], ["\\[","\\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
</script>
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
 
Back
Top Bottom