1 /**********************************************************************
3 * Customize the values given below to suit your needs.
4 * You can make additional copies of this file with
5 * different customizated settings if you need to load
6 * jsMath with different parameters.
10 * <SCRIPT SRC="path-to-jsMath/easy/load.js"></SCRIPT>
12 * (If you are including this file into your page via Server-Side
13 * Includes, you should remove line above.)
15 * You can make copies of this file with different settings
16 * if you need to have several different configurations.
18 **********************************************************************/
20 if (!window.jsMath) {window.jsMath = {}}
24 // The URL of the root jsMath directory on your server
25 // (it must be in the same domain as the HTML page).
26 // It should include "http://yoursite.com/", or should
27 // be relative to the root of your server. It is possible
28 // to be a relative URL, but it will be relative to the
29 // HTML page loading this file.
31 // If you leave this blank, jsMath will try to look it up from
32 // the URL where it loaded this file, but that may not work.
37 // The default scaling factor for mathematics compared to the
43 // 1 means use the autoload plug-in to decide if jsMath should be loaded
44 // 0 means always load jsMath
49 // Setting any of these will cause the tex2math plugin to be used
50 // to add the <DIV> and <SPAN> tags that jsMath needs. See the
51 // documentation for the tex2math plugin for more information.
53 processSlashParens: 1, // process \(...\) in text?
54 processSlashBrackets: 1, // process \[...\] in text?
55 processDoubleDollars: 1, // process $$...$$ in text?
56 processSingleDollars: 0, // process $...$ in text?
57 processLaTeXenvironments: 0, // process \begin{xxx}...\end{xxx} outside math mode?
58 fixEscapedDollars: 0, // convert \$ to $ outside of math mode?
59 doubleDollarsAreInLine: 0, // make $$...$$ be in-line math?
60 allowDisableTag: 1, // allow ID="tex2math_off" to disable tex2math?
62 // If you want to use your own custom delimiters for math instead
63 // of the usual ones, then uncomment the following four lines and
64 // insert your own delimiters within the quotes. You may want to
65 // turn off processing of the dollars and other delimiters above
66 // as well, though you can use them in combination with the
67 // custom delimiters if you wish. See the tex2math documentation
71 // '[math]','[/math]', // to begin and end in-line math
72 // '[display]','[/display]' // to begin and end display math
76 // Disallow the use of the @(...) mechanism for including raw HTML
77 // in the contents of \hbox{}? (If used in a content-management system
78 // where users are allowed to enter mathematics, setting this to 0
79 // would allow them to enter arbitrary HTML code within their
80 // math formulas, and that poses a security risk.)
85 // Show TeX source when mathematics is double-clicked?
90 // Show jsMath font warning messages? (Disabling this prevents yours
91 // users from finding out that they can have a better experience on your
92 // site by installing some fonts, so don't disable this).
97 // Use "Process" or "ProcessBeforeShowing". See the jsMath
98 // author's documentation for the difference between these
104 // List of plug-ins and extensions that you want to be
105 // loaded automatically. E.g.
106 // ["plugins/mimeTeX.js","extensions/AMSsymbols.js"]
111 // List of fonts to load automatically. E.g.
117 // List of macros to define. These are of the form
119 // where 'value' is the replacement text for the macro \name.
120 // The 'value' can also be [value,n] where 'value' is the replacement
121 // text and 'n' is the number of parameters for the macro.
122 // Note that backslashes must be doubled in the replacement string.
126 // bold: ['{\\bf #1}', 1]
132 // Allow jsMath to enter global mode?
133 // (Uses frames, so may not always work with complex web sites)
138 // Disable image fonts? (In case you don't load them on your server.)
144 /****************************************************************/
145 /****************************************************************/
147 // DO NOT MAKE CHANGES BELOW THIS
149 /****************************************************************/
150 /****************************************************************/
152 if (jsMath.Easy.root == "") {
153 jsMath.Easy.root = document.getElementsByTagName("script");
154 jsMath.Easy.root = jsMath.Easy.root[jsMath.Easy.root.length-1].src
155 if (jsMath.Easy.root.match(/\/easy\/[^\/]*$/)) {
156 jsMath.Easy.root = jsMath.Easy.root.replace(/\/easy\/[^\/]*$/,"");
158 jsMath.Easy.root = jsMath.Easy.root.replace(/\/(jsMath\/(easy\/)?)?[^\/]*$/,"/jsMath");
161 jsMath.Easy.root = jsMath.Easy.root.replace(/\/$/,""); // trim trailing "/" if any
163 document.write('<script src="'+jsMath.Easy.root+'/jsMath-easy-load.js"><'+'/script>');