-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: MathJax filter.

MathJax filter: Difference between revisions

From MoodleDocs
(removing broken link and issue link as it is now fixed)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Filters}}
{{Filters}}
{{New features}}
The MathJax filter converts any Mathematics in TeX format within Moodle texts into something that triggers the MathJax code to display it as a  Mathematics on the page.


If the default [[Text editor|text editor]] (Atto) is used, it provides an equation editor for creating Mathematical expressions in TeX format within Moodle texts.  
The MathJax filter parses Moodle texts and will fully render TeX expressions that it finds appearing within specific tokens.
 
The Mathjax filter also improves the look of buttons and preview within the equation editor that is part of the Atto [[Text editor|text editor]].


== Site administration settings ==
== Site administration settings ==
Line 9: Line 9:
The MathJax filter is enabled by default in ''Administration > Site administration > Plugins > Filters > Manage filters''. Normally, the MathJax filter should be at the top of the list of filters.
The MathJax filter is enabled by default in ''Administration > Site administration > Plugins > Filters > Manage filters''. Normally, the MathJax filter should be at the top of the list of filters.


The MathJax filter works without any additional configuration (using the [http://docs.mathjax.org/en/latest/start.html MathJax Content Delivery Network]). However, MathJax may also be installed locally if desired, to save on bandwidth or because of local proxy restrictions. See ''Administration > Site administration > Plugins > Filters > MathJax'' for further details and configuration settings.
The MathJax filter works without any additional configuration. However, MathJax may also be installed locally if desired, to save on bandwidth or because of local proxy restrictions. See ''Administration > Site administration > Plugins > Filters > MathJax'' for further details and configuration settings.
 
MathJax has a setting for "TeX filter compatibility" that changes the behaviour to match as closely as possible, the "Tex filter". This means it will support all the different delimiters of the Tex filter, and display all equations as "inline". It is only recommended to enable this setting if you have existing equations written manually using a variety of delimiters supported by the old filter. It may be hard to determine if this is the case except by searching the database for equations of the form:
<pre>
$$ equation $$, [tex] equation [/tex], <tex> equation </tex> or \( equation \)
</pre>


The [http://www.mathjax.org/ MathJax project] is large and detailed with many options, which a Moodle admin can make use of with the MathJax filter.
The [http://www.mathjax.org/ MathJax project] is large and detailed with many options, which a Moodle admin can make use of with the MathJax filter.
Note: If the MathJax filter is used instead of the Tex filter for rendering equations, the drag math (plugin for the TinyMCE text editor) setting "require tex" should be set to "off". If this is not done, TinyMCE users will not be able to use any equation editor.


==See also==
==See also==


* [[Text editor]] for more details of the equation editor
* [[Using TeX Notation]]
* [https://moodle.org/mod/forum/view.php?id=752 Mathematics tools forum] on moodle.org
* [https://moodle.org/mod/forum/view.php?id=752 Mathematics tools forum] on moodle.org


Line 21: Line 30:


[[es:Filtro MathJax]]
[[es:Filtro MathJax]]
[[de:MathJax-Filter]]
[[fr:MathJax]]

Latest revision as of 08:19, 27 January 2020


The MathJax filter parses Moodle texts and will fully render TeX expressions that it finds appearing within specific tokens.

The Mathjax filter also improves the look of buttons and preview within the equation editor that is part of the Atto text editor.

Site administration settings

The MathJax filter is enabled by default in Administration > Site administration > Plugins > Filters > Manage filters. Normally, the MathJax filter should be at the top of the list of filters.

The MathJax filter works without any additional configuration. However, MathJax may also be installed locally if desired, to save on bandwidth or because of local proxy restrictions. See Administration > Site administration > Plugins > Filters > MathJax for further details and configuration settings.

MathJax has a setting for "TeX filter compatibility" that changes the behaviour to match as closely as possible, the "Tex filter". This means it will support all the different delimiters of the Tex filter, and display all equations as "inline". It is only recommended to enable this setting if you have existing equations written manually using a variety of delimiters supported by the old filter. It may be hard to determine if this is the case except by searching the database for equations of the form:

 $$ equation $$, [tex] equation [/tex], <tex> equation </tex> or \( equation \)

The MathJax project is large and detailed with many options, which a Moodle admin can make use of with the MathJax filter.

Note: If the MathJax filter is used instead of the Tex filter for rendering equations, the drag math (plugin for the TinyMCE text editor) setting "require tex" should be set to "off". If this is not done, TinyMCE users will not be able to use any equation editor.

See also