KaTeX plugin and mhchem
-
hi,
thank you for the plugin, I really like it. But I’m planning to write chemical equations, so I need mhchem extension.
I’d like to keep all the scripts locally, so this is what I did: I downloaded mhchem.min.js to katex-0.12.0 folder and changed resource.php file: I registered the script:
wp_register_script( 'mhchem', KATEX__PLUGIN_URL . 'assets/katex-' . KATEX_JS_VERSION . '/mhchem.min.js', array(), // No dependencies. false, // No versioning. true // In footer. );
then added the line:
wp_enqueue_script('mhchem');
It seems to be working mostly although some formulas aren’t working, e.g. \ce{A\bond{-}B\bond{=}C\bond{#}D}
Maybe there is some better way to do it? I’m not a wordpress coder.
Besides, if I decide to use cdn, is there any easy way to change the code to use jsDelivr CDN?
Thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘KaTeX plugin and mhchem’ is closed to new replies.