SamyPesse / react-mathjax

React component to display math formulas
Apache License 2.0
95 stars 35 forks source link

Options prop doesn't work #20

Closed DimaBur closed 5 years ago

DimaBur commented 6 years ago

I tried to set custom options like

tex2jax: {
    inlineMath: [['$','$'], ['\\(','\\)']],
    processEscapes: true
  }

but nothing happened. I tried to change DEFAULT_OPTIONS inside component, but nothing happened too. Then I completely removed const { options } = this.props; MathJax.Hub.Config(options); and it had no impact on the component.

bigblind commented 5 years ago

This makes sense, because according to the docs on loading and configuring MathJax, it expects a configuration script to be present before it loads:

Because MathJax starts its configuration process as soon as it is loaded, the configuration script must come before the script tag that loads MathJax.js itself. You do this by including a Githubissues.

  • Githubissues is a development platform for aggregating issues.