glideapps / glideapps/expert-issues
Rich Text: Native Support for Inline LaTeX / Math Expressions
- Dominant language
- No language data
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Allow Rich Text (and other text-rendering components) to render LaTeX/Math expressions inline (e.g., via MathJax or KaTeX) without Web Embed workarounds.
## Summary
Partners need to display mathematical notation, formulas, and scientific symbols inside Glide apps (e.g., internal portals, docs, knowledge bases). Today this requires HTML → URL encoding → Web Embed, which looks visually out of place and breaks native styling/UX. Adding first-class LaTeX rendering to text components would let users write `$...$` / `$$...$$` math inline alongside regular content with consistent typography and theming.
**References:**
- MathJax: https://www.mathjax.org/#gettingstarted
- Example screenshot (workaround): https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/BTUmXn056f6Lugj6BJZ8/pub/JoI6KNZAFTpU8qIAYDgG/CleanShot%202025-10-21%20at%2022_29_27.png
## Current Problem
- Rich Text does not interpret LaTeX/Math syntax; expressions render as plain text or require embedding an external page.
- The current workaround (HTML → HTML-to-URL → Web Embed) introduces styling inconsistencies, adds friction to authoring, and complicates content maintenance.
- Content authors can’t easily mix math with other native Glide blocks (lists, headings, inline links) in the same component.
## Examples/Scenarios
- Internal R&D portal documenting formulas and unit conversions.
- Finance/ops dashboards with inline formulas for KPI definitions.
- Education/enablement apps showing step-by-step derivations or chemical equations.
- Technical knowledge bases explaining algorithms, statistical notation, or schematics.
## Why This Matters
- Removes inelegant/frustrating workarounds and reduces maintenance overhead.
- Improves Glide’s suitability for technical use cases (STEM, finance, analytics, research).
- Keeps typography, theming, and accessibility consistent with the rest of the app.
- Increases adoption among teams that require math rendering in daily workflows.
## Suggested UX
- **Component support:** Enable LaTeX rendering in Rich Text (and optionally Title/Paragraph, Notes, Markdown) via a toggle like “Render math (LaTeX).”
- **Syntax:** Support common delimiters:
- Inline: `$ ... $` and `$begin:math:text$...$end:math:text$`
- Block: `$$ ... $$` and `$begin:math:display$...$end:math:display$`
- **Renderer options:** Add a setting to choose **MathJax** (broader TeX support, SVG/HTML output) or **KaTeX** (faster, smaller footprint). Default to one with sensible fallbacks.
- **Styling:** Respect app fonts, sizes, and colors; match line-height and alignment with surrounding text. Provide a small set of size presets (Inline, Display) and an accessibility-friendly contrast mode.
- **Security/Sanitization:** Sanitize input and restrict to math commands to avoid script injection; render in a sandboxed context if needed.
- **Performance:** Lazy-load the renderer only when a component with math is present; cache assets; consider server-side pre-rendering for static content.
- **Authoring help:** Offer a short “Math cheatsheet” tooltip and immediate preview while typing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.