calvinkei / react-native-mathjax

Render Mathjax content in React Native Webview
MIT License
34 stars 37 forks source link

'react-native-mathjax' not rendering for single \ #31

Closed shivam0831 closed 3 years ago

shivam0831 commented 3 years ago

I am using 'react-native-mathjax' for rendering math equations. When I add double \ in place of single \ and four \ in place of double \ in the equation, it renders the equation. how this problem can be solved?

import React, { Component } from 'react'; import { View, Text } from 'react-native'; import MathJax from 'react-native-mathjax';

function Test() {
        return (
               <View>
                 <MathJax
                    html={<p><span class="math-tex">\(\begin{bmatrix} 2 &1 \\[0.3em] 3&4\\[0.3em] \end{bmatrix}\)</span></p>} 
                   // not render
              />
               </View>
 );
}
export default Test;
shivam0831 commented 3 years ago

I was testing with local data. But when I got data from the backend API, it able to render all data.