--- jsmath.module 2008-07-11 05:20:26.000000000 -0700 +++ /usr/clients/www/alexis.m2osw.com/public_html/animals/sites/all/modules/jsmath/jsmath.module 2008-11-17 23:01:02.000000000 -0800 @@ -1,6 +1,24 @@ 'textfield', '#title' => t('customDelimiters'), - '#default_value' => variable_get('jsmath_customDelimiters', "'[math]','[/math]','[display]','[/display]'"), + '#default_value' => _jsmath_delims(), '#size' => 80, '#maxlength' => 80, '#description' => t("This array holds four strings that are used to start and stop in-line and @@ -172,7 +190,9 @@ This is because those characters are used to indicate tags and entities within HTML, and since tex2math doesn't run until after the page has been interpreted by the browser, these character are no longer part of the text that is available to tex2math when it processes the page. - In particular, that means you can't make delimiters that look like normal HTML tags." + In particular, that means you can't make delimiters that look like normal HTML tags.

+ The default delimiters are !delims", + array("!delims", JSMATH_DEFAULT_DELIMITERS) ) ); @@ -240,11 +260,17 @@ /** - * Implementation of hook_init() - * * Writes javascript into the page header for loading jsMath */ -function jsmath_init() { +function _jsmath_insert() { + static $inserted = false; + + // we want to insert it once only + if($inserted) { + return; + } + $inserted = true; + // Create javascript for setting jsMath options and loading jsMath $jsmath_path = base_path() . drupal_get_path('module', 'jsmath') . '/jsMath'; $load = "