I have this (below) in Admin/Layout/"Custom HTML in <head> section of every page:"
<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_HTML-full">
</script>
This piece of code above works well.
So, I removed this piece of code and I am trying to add that using a plugin in order to use the js file, instead having to access cdn.mathjax.org:
class qa_html_theme_layer extends qa_html_theme_base {
public function head_script()
{
if (!isset($this->content['script'])) {
$this->content['script'] = array();
}
$jsMathjax =QA_PLUGIN_DIR.'/Caju-add-Mathjax/MathJax.js';
$this->content['script'][] = '<script type="text/javascript" src="'.$jsMathjax.'"></script>';
$this->content['script'][] = '<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$$","$$"],["$","$"],["\\(","\\)"]] }}); </script>';
parent::head_script();
}
}
I saved the file MathJax.js in this folder. What am I doing wrong? It must not be a copy error, since I copied the code and included between ' and '.