#### Initial system

This manual is built up for XenForo 1.5.9. You can download the current version on the official XenForo website and install it on your local system. We used a XAMPP installation with Apache Server and MySQL Enviroment.

### Steps

• 1

#### Decide if you want do use the MathJax CDN

You can either download the library to your local system or use their Content Delivery Network (CDN). For downloading you can go the official MathJax-site and obtain MathJax. In this example we use the CDN, which must be included in specific files of your XenForo installation.
• 2

#### Integrate MathJax library into XenForo

In this example we implement MathJax in the Page_Container of the XenForo installation. Copy the following code line and insert it into the Page_Container template of your XenForo installation. Be aware to adjust the path to MathJax, if you want to use e.g. a local copy of MathJax.
copy
<!-- MathJax CDN -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\$","\$"] ],
displayMath: [ ['$$','$$'], ["\$","\$"] ]
}
});
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML">
</script>

How to find the PAGE_CONTAINER template? Go to your Admin control panel and open the Appearance tab. Open the setting 'Search Templates' and enter 'PAGE_Container' as search term for the title
Open the PAGE_CONTAINER template and add the code e.g. at the beginning of the header.

Now you can use MathJax in your forum. Try e.g. to post $$x^2$$. You should see a rendered formula.

I suggest you to include also BBCodes for your math delimiters, so they get rendered (with something like MathJax.Hub.Queue(["Typeset",MathJax.Hub])) even if there is no new page load.

Read on another article how to spice up your XenForo forum with the LaTeX4technics equation editor.