phillord / mathjax-latex

Wordpress Plugin for MathJax mathematics renderer
GNU General Public License v2.0
57 stars 12 forks source link

Add fields to support extensions #13

Open SamThilmany opened 8 years ago

SamThilmany commented 8 years ago

I really like the plugin as it handles the loading of the mathjax code quite well, but for some projects, you may want to add extensions such as mhchem.

Wouldn't it be great if you could remove and add these packages in the WordPress backend instead of hardcoding them by yourself?

paulschreiber commented 8 years ago

That sounds like a good improvement. Please provide a list of extensions and explain how you currently add them.

SamThilmany commented 8 years ago

Currently I'm only using mhchem to add chemical formulas in MathJax. I'm adding it with the following snippet, placed in the body of the pages, where MathJax is loaded:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    TeX: {
      extensions: ["mhchem.js"]
    }
  });
</script>

See this page in the documentation for other extensions: http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-extensions

I think that you should add support for all of them as they are already included in the MathJax package but not loaded by default. So if somebody needed to use them, they could simply check a box in the WordPress backend and the extension would be added to their site.