-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
48 lines (40 loc) · 1.71 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* Sample React Native App Showing Mathematical formulas which contains LatexTest with multiple languages texts using mathjax
* https://github.com/ashu777
*
* @format
* @flow
*
*/
import React, {Component} from 'react';
import {StyleSheet, View} from 'react-native';
import MathJax from 'react-native-mathjax';
import {WebView} from 'react-native';
console.disableYellowBox = true;
export default class App extends Component {
render() {
return (
<MathJax
// HTML content with MathJax support
html={'$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$<br><p>This is an equation यह एक समीकरण है ఇది ఒక సమీకరణం</p>'}
// MathJax config option
mathJaxOptions=
{{
messageStyle: 'none',
extensions: [ 'tex2jax.js' ],
jax: [ 'input/TeX', 'output/HTML-CSS' ],
tex2jax:
{
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
displayMath: [ ['$$','$$'], ['\\[','\\]'] ],
processEscapes: true,
},
TeX:
{
extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js']
}
}}
/>
);
}
}