diff --git a/package.json b/package.json index 6efe375..c8ab15d 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@mui/material": "^5.4.3", "react": "^17.0.2", "react-dom": "^17.0.2", + "react-mathjax": "^1.0.1", "react-stepper-horizontal": "^1.0.11", "styled-components": "^5.3.3" } diff --git a/src/ExampleComponent.js b/src/ExampleComponent.js index 90d3818..83f9a46 100644 --- a/src/ExampleComponent.js +++ b/src/ExampleComponent.js @@ -1,4 +1,5 @@ import React from 'react'; +import MathJax from 'react-mathjax' import { Box, Button, Divider, TextField, Typography } from '@mui/material' @@ -13,6 +14,11 @@ import { Box, Button, Divider, TextField, Typography } from '@mui/material' } */ +const tex = { + quadratic_solution: 'x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}', + tex_example: `f(x) = \\int_{-\\infty}^\\infty \\hat f(\\xi)\\,e^{2 \\pi i \\xi x} \\,d\\xi`, +} + const ExampleComponent = ({ triggerQuery, model, modelUpdate }) => { const handleChange = (e) => { modelUpdate({ @@ -21,34 +27,14 @@ const ExampleComponent = ({ triggerQuery, model, modelUpdate }) => { } return( <> - - {model.greeting}{model.username} - {model.message} - - - - - Want to trigger a query? - - - - - - - - - - + + {model.text} + + + + {model.question} + + ); } export default ExampleComponent; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9ee0223..976c1bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2827,6 +2827,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +load-script@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4" + integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ= + loader-runner@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" @@ -2963,9 +2968,9 @@ minimatch@^3.0.4: brace-expansion "^1.1.7" minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mkdirp@^0.5.5: version "0.5.5" @@ -3422,6 +3427,13 @@ react-is@^17.0.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-mathjax@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/react-mathjax/-/react-mathjax-1.0.1.tgz#a8c282e75d277a201632dfd07edf41edda372b4b" + integrity sha512-+mjFcciZY3GQoqiQm3aRTyDjgBKuoaXpY+SCONX00jScuPpTKwnASeFMS5+pbTIzDf5zPT2Y9ZZfQ9U/d4CKtQ== + dependencies: + load-script "^1.0.0" + react-stepper-horizontal@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/react-stepper-horizontal/-/react-stepper-horizontal-1.0.11.tgz#ac10549c2ccb2d39ce820bdfe4bfeac113c90813"