-
Notifications
You must be signed in to change notification settings - Fork 34
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
Inline math at arbitrary position in text #4
Comments
@shenkev are you saying you'd like to render the entire text string and inline? @SamyPesse I'm happy to make an example, I found a way to pull this off with your library. In fact, you don't even need to use the nodes, only the context is required: const defaultOptions = {
showProcessingMessages: false,
messageStyle: 'none',
showMathMenu: false,
tex2jax: {
processEnvironments: true,
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\\[', '\\]']],
preview: 'none',
processEscapes: true
}
};
class App extends Component {
render() {
return (
<Context options={defaultOptions}>
<div>
25 is $5^2$
</div>
</Context>
);
}
} |
here's a pull request to add to the readme so future users can find how to achieve this: #12 |
@SamyPesse is there a way to support this original issue? I noticed you have to create all of the inline nodes, when it's not necessary as MathJax with parse text + tex as in this example. I personally don't want to use the |
Suppose
var text = 25 is
and we only want to render 5^2 but we don't know what the text is beforehand. Is this possible?
Mathjax node would render the entire string if we we wrapped it around text.
The text was updated successfully, but these errors were encountered: