Enabling MathML support on a Drupal-based website

To enable MathML support on a Drupal-based website, please do the following steps:

  • In the databases, make sure that all the tables and the database itself have the collation utf8_general_ci
    • in some cases for example if the Drupal installation was made over cpanel, the collation tends to be latin1_swedish_ci
    • The collation is important for the system to be able to view special mathematical characters correctly, for example ?, ? and ?
  • After making sure that the collation is correct, please insert (copy & paste) the attached script to the head of your Drupal theme's page.tpl.php
  • To insert standard MathML code in a document, make sure that the input type for the document is set to "Full HTML", if this is not selected the Drupal system will filter out MathML code

α=$a

We have so far tested this on Firefox where the syntax works fine. Following as an example:

x=-b±b2-4ac2a
Technorati Tags:Technorati Tags:

Trackback URL for this post:

http://www.jem-thematic.net/sv/trackback/676
BilagaStorlek
mathml.js.txt5.19 kB

Thanks to David Carlisle

David has pointed out first in his blog how the modification of the script of Peter Jipsen's asciimathml could be used in our drupal site also.

One word of caution: if you cut&paste from MathML-enabled sources, make sure there are no newlines in the XML.

Link?

RE: "David has pointed out first in his blog" --

What is the url?

First MathML test

David's test was based on the same idea he used to modify his usual blog hosted on Blogger.

Prenumerera på innehåll