File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 25
25
* limitations under the License.
26
26
*/
27
27
28
+
29
+ //
30
+ // Don't replace [Contrib]/mhchem if it is already loaded
31
+ //
32
+ if ( MathJax . Extension [ "TeX/mhchem" ] ) {
33
+ MathJax . Ajax . loadComplete ( "[MathJax]/extensions/TeX/mhchem.js" ) ;
34
+ } else {
35
+
28
36
MathJax . Extension [ "TeX/mhchem" ] = {
29
37
version : "2.6.0" ,
30
38
config : MathJax . Hub . CombineConfig ( "TeX.mhchem" , {
31
39
legacy : true
32
40
} )
33
41
} ;
34
42
43
+ //
44
+ // Load [Contrib]/mhchem if not configured for legacy vesion
45
+ //
35
46
if ( ! MathJax . Extension [ "TeX/mhchem" ] . config . legacy ) {
36
47
MathJax . Callback . Queue (
37
48
[ "Require" , MathJax . Ajax , "[Contrib]/mhchem/mhchem.js" ] ,
@@ -502,4 +513,5 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
502
513
} ) ;
503
514
504
515
MathJax . Ajax . loadComplete ( "[MathJax]/extensions/TeX/mhchem.js" ) ;
505
- }
516
+
517
+ } }
You can’t perform that action at this time.
0 commit comments