diff --git a/README.md b/README.md index 56bbffc..cc9eb3e 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,13 @@ $ npm i react-mathjax --save ### Usage +Use `Stirng.raw` to avoid escaping javascript strings manually. + +You could render it at https://www.codecogs.com/latex/eqneditor.php. + ```js const MathJax = require('react-mathjax') -const tex = `f(x) = \\int_{-\\infty}^\\infty - \\hat f(\\xi)\\,e^{2 \\pi i \\xi x} - \\,d\\xi` +const tex = String.raw`f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi` module.exports = () => { return (