Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.1k views
in Q2A Core by
I tried to use MathJax in Q2A. But as they say to copy and paste the script in head section, I did the same. But still its not working. Is there a specific way to use MathJax in Q2A??

I am running Q2A 1.7 on SnowFlat theme with stock ckeditor.
Q2A version: 1.7

1 Answer

+1 vote
by

Actually there is nothing to do except including the scripts. I have included just the below scripts in the head section. This might not be a professional solution but the easiest way. You can have all customization here:

http://docs.mathjax.org/en/latest/configuration.html

<script  type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
     config: ["MMLorHTML.js"],
      jax: ["input/TeX"],
      processEscapes: true
    }
  });

MathJax.Hub.Config({
"HTML-CSS": {
linebreaks: {
automatic: true,
width: "95% container"
}
}
  });

</script>

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

by
Hello @arjunsuresh...
Do I have to add all this code in
admin> layout> Custom HTML in <head> section of every page: ?????
by
yes. I did it for every page- as mathjax appear in question lists too. If you want you can restrict it to question pages only- then yo have to add these to question.js file by modifying Q2A core- may be a plugin can also do this.
...