Hi there!
First of all, thank you for this library; it's a great tool for handling rich text in Jetpack Compose.
I was wondering if there is currently any native support or a recommended approach for rendering LaTeX math formulas (e.g., via MathJax or KaTeX style syntax) within the RichText or Markdown components.
For example, I would like to parse and render strings containing standard delimiters like:
'''latex
$$f(x) = \int_{-\infty}^\infty \hat f(\xi),e^{2\pi i \xi x} ,d\xi$$
or inline math like $E = mc^2$
'''
Since the library relies on commonmark-java, is there a way to inject a specific extension for math handling? Alternatively, could the custom block rendering capabilities be leveraged to intercept these patterns and render a custom Composable (perhaps using a WebView or a Canvas-based math renderer)?
Any guidance, workaround, or future plans regarding this feature would be greatly appreciated.
Thanks!
Hi there!
First of all, thank you for this library; it's a great tool for handling rich text in Jetpack Compose.
I was wondering if there is currently any native support or a recommended approach for rendering LaTeX math formulas (e.g., via MathJax or KaTeX style syntax) within the
RichTextorMarkdowncomponents.For example, I would like to parse and render strings containing standard delimiters like:
$$f(x) = \int_{-\infty}^\infty \hat f(\xi),e^{2\pi i \xi x} ,d\xi$$ $E = mc^2$
'''latex
or inline math like
'''
Since the library relies on commonmark-java, is there a way to inject a specific extension for math handling? Alternatively, could the custom block rendering capabilities be leveraged to intercept these patterns and render a custom Composable (perhaps using a WebView or a Canvas-based math renderer)?
Any guidance, workaround, or future plans regarding this feature would be greatly appreciated.
Thanks!