I am using react-native-mathjax. Still facing problems. Mathematical equation / Latex works well on the website. However, when using it react native it just displays the latex code:
$\int_0^1 f(x) \, \mathrm{d} x$
How can one load the mathematical equations in react native?
const mmlOptions = {
jax: ['input/MathML'],
};
const renderers = {
math: ({ value }) => (
<MathJax mathJaxOptions={mmlOptions} html={value} inlineStyle={'font-size: 16px;'} />
),
};
//Rendering part
<RenderHTML
contentWidth={width}
source={{html: data.question.content}}
baseStyle={{fontSize: 18}}
tagsStyles={{sup:{color: 'red', textAlignVertical:'top'}}}
renderers={renderers}
/>