This filter replaces the need for the latex filter in Moodle. It has a better display and supports more input types. It also has the added benefit of being completely client-side, not requiring any server side LaTeX rendering. It uses the fantastic MathJax library.
This filter renders any LaTeX within Moodle that is surrounded by special delimiters using the MathJax library. There are currently two types of LaTeX that can be rendered:
- Block
Delimiters:$$
and$$
Example:$$ \sqrt{123} $$
- Inline
Delimiters:\(
and\)
Example:\( \sqrt{123} \)
- Get the zip file mathjax.zip (DOWNLOAD)
- Upload this file to the Moodle plugin install interface and follow the instructions
http://moodle_root/admin/tool/installaddon/index.php
- Go to the Filter settings within Moodle (Administrative Settings->Plugins->Filters->Manage Filters)
- Ensure the MathJax filter is enabled
** NOTE: Moodle may not accept this zip file due to its size, alternatively:
- Extract the zip file above into
moodle_root/filter
- Visit the administration notification page
http://moodle_root/admin/index.php
- Go to the Filter settings within Moodle (Administrative Settings->Plugins->Filters->Manage Filters)
- Ensure the MathJax filter is enabled
Works great with the Moodle TinyMCE MathEditor
- Clone this repository
git clone https://github.com/oohoo/moodle-filter_mathjax.git mathjax
into themoodle_root/filter
directory cd
into the root directory of the repository- Initialise the submodule
make submodule
- Visit the administration notification page
http://moodle_root/admin/index.php
- Go to the Filter settings within Moodle (Administrative Settings->Plugins->Filters->Manage Filters)
- Ensure the MathJax filter is enabled
- To Deploy: run
make deploy
- This will create a file called
mathjax.zip
within the current directory ready for distribution
- Ensure you have done instructions 1-3 above
- Update the submodule
make update
this will fetch the latest version of MathJax - To Deploy: run
make deploy
- This will create a file called
mathjax.zip
within the current directory ready for distribution