You are here

README.txt in MathJax: LaTeX for Drupal 7

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 6 README.txt
  3. 7.2 README.txt
  4. 3.0.x README.txt
MathJax is the up-to-date ajax framework to display math in HTML environment
using LaTeX and MathML syntax. This module allows to activate MathJax-based
LaTeX rendering on your drupal website. By default, MathJax source is loaded
automatically from the internet using MathJax Content Delivery Network (CDN).

Currently there is no settings available: MathJax is activated on all nodes and
profile pages. LaTeX inline formula can be entered as $formula$ or \(formula\),
and display formula as $$formula$$ or \[formula\].

Dollar signs in formulas can be escaped using \. < and > signs must be handled
with care as they may be interpreted as start and end of HTML tags: either use
spaces around (e.g. $< dx >$) or the HTML special chars &lt; and &gt; or their
MathJax LaTeX-like equivalents \lt and \gt. More details on MathJax TeX support
on http://www.mathjax.org/resources/docs/?tex.html


INSTALLATION
============

Using MathJax CDN - recommended
-------------------------------

1. Place the "mathjax" folder in your "modules" directory (e.g. sites/all/modules/mathjax).

2. Enable the MathJax module under Administration >> Modules.

3. Test it by adding a LaTeX formula between '$' in any node body (e.g. $2 + 2 = 4$).


Using a local copy of mathjax (relies on libraries module)
----------------------------------------------------------

1. Download and install the "Libraries API" module: uncompress the "libraries"
folder, copy it to your "modules" directory, and enable it under
Administer >> Site building >> Modules.

http://drupal.org/project/libraries

2. Place the "mathjax" folder in your "modules" directory (e.g. sites/all/modules/mathjax).

3. Install third party MathJax software
     Download MathJax 1.1 source from MathJax website (e.g. https://github.com/mathjax/MathJax/zipball/v1.1a)
     Unarchive it into your "libraries" directory (e.g. sites/all/libraries).
     You may need to create the "libraries" directory first.
     Rename it to "mathjax" (lower case).
NB: Relying on libraries module to locate 'mathjax' folder allows you to place
it in a site specific (e.g. sites/mysite/libraries) or default folder
(e.g. sites/all/libraries). Site-specific versions are selected preferentially.

3. Enable the MathJax module under Administration >> Modules.

4. Disable the "Use MathJax CDN" checkbox in Administration >> Configuration >> MathJax (in the Content Authoring section, admin/config/content/mathjax)

5. Test it by adding a LaTeX formula between '$' in any node body (e.g. $2 + 2 = 4$).



INSTALLATION USING DRUSH
========================

Using MathJax CDN - recommended
-------------------------------
drush en mathjax


Using a local copy of mathjax
------------------------------
drush dl libraries
drush en libraries mathjax
drush mathjax-download
drush vset --yes mathjax_use_cdn 0


AUTHOR
======
Module written by Thomas Julou.
http://drupal.org/user/273952

MathJax
http://www.mathjax.org/


TO DO
=====
- set mathjax parameters on admin page (size, source type, ...)
- show source code in lightbox-like modules (set link attribute)
- support MathML syntax

File

README.txt
View source
  1. MathJax is the up-to-date ajax framework to display math in HTML environment
  2. using LaTeX and MathML syntax. This module allows to activate MathJax-based
  3. LaTeX rendering on your drupal website. By default, MathJax source is loaded
  4. automatically from the internet using MathJax Content Delivery Network (CDN).
  5. Currently there is no settings available: MathJax is activated on all nodes and
  6. profile pages. LaTeX inline formula can be entered as $formula$ or \(formula\),
  7. and display formula as $$formula$$ or \[formula\].
  8. Dollar signs in formulas can be escaped using \. < and > signs must be handled
  9. with care as they may be interpreted as start and end of HTML tags: either use
  10. spaces around (e.g. $< dx >$) or the HTML special chars < and > or their
  11. MathJax LaTeX-like equivalents \lt and \gt. More details on MathJax TeX support
  12. on http://www.mathjax.org/resources/docs/?tex.html
  13. INSTALLATION
  14. ============
  15. Using MathJax CDN - recommended
  16. -------------------------------
  17. 1. Place the "mathjax" folder in your "modules" directory (e.g. sites/all/modules/mathjax).
  18. 2. Enable the MathJax module under Administration >> Modules.
  19. 3. Test it by adding a LaTeX formula between '$' in any node body (e.g. $2 + 2 = 4$).
  20. Using a local copy of mathjax (relies on libraries module)
  21. ----------------------------------------------------------
  22. 1. Download and install the "Libraries API" module: uncompress the "libraries"
  23. folder, copy it to your "modules" directory, and enable it under
  24. Administer >> Site building >> Modules.
  25. http://drupal.org/project/libraries
  26. 2. Place the "mathjax" folder in your "modules" directory (e.g. sites/all/modules/mathjax).
  27. 3. Install third party MathJax software
  28. Download MathJax 1.1 source from MathJax website (e.g. https://github.com/mathjax/MathJax/zipball/v1.1a)
  29. Unarchive it into your "libraries" directory (e.g. sites/all/libraries).
  30. You may need to create the "libraries" directory first.
  31. Rename it to "mathjax" (lower case).
  32. NB: Relying on libraries module to locate 'mathjax' folder allows you to place
  33. it in a site specific (e.g. sites/mysite/libraries) or default folder
  34. (e.g. sites/all/libraries). Site-specific versions are selected preferentially.
  35. 3. Enable the MathJax module under Administration >> Modules.
  36. 4. Disable the "Use MathJax CDN" checkbox in Administration >> Configuration >> MathJax (in the Content Authoring section, admin/config/content/mathjax)
  37. 5. Test it by adding a LaTeX formula between '$' in any node body (e.g. $2 + 2 = 4$).
  38. INSTALLATION USING DRUSH
  39. ========================
  40. Using MathJax CDN - recommended
  41. -------------------------------
  42. drush en mathjax
  43. Using a local copy of mathjax
  44. ------------------------------
  45. drush dl libraries
  46. drush en libraries mathjax
  47. drush mathjax-download
  48. drush vset --yes mathjax_use_cdn 0
  49. AUTHOR
  50. ======
  51. Module written by Thomas Julou.
  52. http://drupal.org/user/273952
  53. MathJax
  54. http://www.mathjax.org/
  55. TO DO
  56. =====
  57. - set mathjax parameters on admin page (size, source type, ...)
  58. - show source code in lightbox-like modules (set link attribute)
  59. - support MathML syntax