-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mathjax support to text input boxes boxes #269
Comments
Let me clarify the difficulty to date in adding MathJax to Metriq: By default, MathJax renders once on initial page load. However, Metriq doesn't actually have the applicable content loaded by the time of the initial page load, because it uses client-side rendering. To make MathJax work, it's necessary to manually call for it to render whenever a view finishes rendering content from API requests. This isn't easy. For that matter, React.js plugins that render MathJax commonly rely on inserting formulas into React.js tags, which works for static content, but we'd actually have to parse LaTeX expressions out of API requests and wrap them in React.js tags, (and alter the DOM). Some plugins might work with in-line expressions, but it's still difficult to get this to work with client-side rendering from content in API requests. Again, this is surprisingly hard! We also can't go the route of server-side rendering, as this contradicts the fundamental the Web development paradigm of Metriq. MathJax is a high-value addition, but we can't just drop the script into the main HTML file and expect it to work at all. |
@WrathfulSpatula Can we use KaTeX instead of MathJax? I'm looking at |
@Aaron-Robertson Sounds good to me! If it works for client-side rendering, definitely! |
Would be nice to support latex in submission boxes for things like the abstract on the submission page or method description. Might be possible to use in node mathjaxs: http://docs.mathjax.org/en/latest/server/components.html
The text was updated successfully, but these errors were encountered: