react-mathjax
                                
                                 react-mathjax copied to clipboard
                                
                                    react-mathjax copied to clipboard
                            
                            
                            
                        Unable to render ascii unless I change scriptType in node.js file
I am trying to render ascii math in my react component,
const mathOptions = { AsciiMath: { useMathMLspacing: true }, tex2jax: { inlineMath: [ ['$', '$'], ['\\(', '\\)'] ] }, "HTML-CSS": { linebreaks: { automatic: true } }, extensions: ['asciimath2jax.js'], jax: ['input/TeX', 'input/AsciiMath', 'output/HTML-CSS'] }; const mathScript = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML"; const mathContent = 'sum_(i=1)\\^n i=(n(n+1))\/2'; itemMarkup = <MathJax.Context options={mathOptions} script={mathScript}> <MathJax.Node>{mathContent}</MathJax.Node>  </MathJax.Context>; 
I am expecting it to render like
 but, it is rendering like
but, it is rendering like

because, it is rendering like Tex, rather than ascii. If I change
https://github.com/SamyPesse/react-mathjax/blob/master/src/node.js#L121 to
this.script.type = 'math/asciimath; ' + (inline ? '' : 'mode=display');
it works.
is there a way I can pass that config.
Thanks for the wonderful library.
@pyramation is there anything I could do to resolve this issue?
Try this, (caveat, I don't use asciimath)
const defaultOptions = {
  showProcessingMessages: false,
  messageStyle: 'none',
  showMathMenu: false,
  tex2jax: {
    processEnvironments: true,
    inlineMath: [['$', '$'], ['\\(', '\\)']],
    displayMath: [['$$', '$$'], ['\\[', '\\]']],
    preview: 'none',
    processEscapes: true
  }
};
class App extends Component {
  render() {
    return (
      <Context options={defaultOptions}>
        <div>
$\sum_{i=1}^n i= \frac{n(n+1)}{2}$
        </div>
      </Context>
    );
  }
}