# XF 1.5MathJax 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

#### Brogan

##### XenForo moderator
Staff member
It would likely require changing it from a div to a span, if possible.

#### PJK

##### Active member
It would likely require changing it from a div to a span, if possible.
Would this be done in the HTML replacement? At the moment my HTML replacement doesn't have any HTML in it.

#### PJK

##### Active member
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.

#### Enay

##### Member
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.

#### PJK

##### Active member
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>

Replies
4
Views
458
Replies
6
Views
553
Replies
6
Views
1K
Replies
1
Views
1K
Replies
3
Views
1K