Add LaTeX math support to MarkdownText with Unicode rendering and pre…#442
Add LaTeX math support to MarkdownText with Unicode rendering and pre…#442samrudha01codespace wants to merge 1 commit intogoogle-ai-edge:mainfrom
Conversation
Markdown EnhancementAdd Lightweight LaTeX Math Rendering Support to OverviewThis pull request enhances the The implementation focuses on practical, commonly used mathematical expressions while keeping the solution Compose-native and efficient. What’s Included1. LaTeX / Math Support
This enables basic math rendering directly inside Markdown without external rendering engines. 2. New Composable
3. UI & Theming Improvements
Why This Change
ScopeThe implementation focuses on commonly used mathematical constructs and is designed for future extensibility. No breaking changes introduced. |
This pull request significantly enhances the
MarkdownTextcomposable inMarkdownText.ktby adding support for rendering LaTeX-style mathematical expressions within Markdown, converting them to Unicode symbols for display. It also introduces new helper functions, UI improvements, and preview examples.LaTeX/Math Support and Processing:
convertLatexToUnicodehelper function that maps common LaTeX commands (Greek letters, math operators, superscripts, subscripts, fractions) to their Unicode equivalents, enabling basic math rendering without a LaTeX engine.MarkdownTextto process and replace inline ($...) and block (MathExpressioncomposable for rendering block and inline math in a styled manner, including background and font adjustments.UI and Theming Improvements:
RichTextStyleandTextLinkStyles, and updated color and typography handling for better readability and theme integration.customColorswith theme-aware color selection and added underline styling to links. (Fc29d3b2L