Many people have had difficulties with Tex filter. In most cases it is possible to give executable permissions to mimetex file in filter/tex/ but on shared hosts even this can be impossible.
If php has disabled functions or some security modules/settings do not allow executable permissions (mimetex) or if your shared host does not allow you to use local distribution of latex or you are not allowed to install extra filters or packages (for example mathtran filter or math plugins) moodle 2 has still one option left to render maths with cdn MathJax:
Step 1: As an administrator of your site go to Site administration > Appearance > Additional HTML > Within HEAD and add tags from attached file mathjaxcdn.txt and press Save changes button.
Your moodle 2 is now using MathJax from a cloud server in cdn.mathjax.org with given delimiters (in this example double dollars for inlineMaths and @d for displayMaths). You can choose to use other delimiters in configuration if you want.
Make sure that Tex filter and Algebra filter are disabled in Site administration > Plugins > Filters > Manage filters
Step 2: Since default configuration of tinymce (editor) requires that tex filter needs to be enabled before Dragmath plugin can be used you need to edit file lib/editor/tinymce/lib.php
Take a copy of that file first to make sure that you can revert changes. Find lines 107-111:
if (array_key_exists('filter/tex', $filters)) {
$xdragmath = 'dragmath,';
} else {
$xdragmath = '';
}
and replace them with
$xdragmath = 'dragmath,';
Save the file / replace the original file lib/editor/tinymce/lib.php with this modified file.
Now your editor has Dragmath plugin and cdn mathjax renders the maths that you add with Dragmath (within default delimiters = doubledollars)
Note: this example configuration is using
TeX-AMS_HTML
that is much lighter and faster than for example the more advanced mathjax configuration "TeX-AMS-MML_HTMLorMML" used elsewhere (math plugins) - TeX-AMS_HTML does not use MathML, only latex with AMS.