Back to Blog
Sunday, November 16, 2025

Keep KaTeX math sharp on every channel

Keep KaTeX math sharp on every channel

Why pair KaTeX with an image

Markdown renders KaTeX beautifully, yet plenty of mailers and chat tools strip the styling. Keep the Markdown source for editing, but hand the audience a PNG or SVG so the layout never collapses.

Reliable writing habits

  • Reserve $…$ for inline snippets and $$…$$ for anything that should stand on its own line.
  • Break long fractions and radicals across lines so narrow viewports don’t crop the baseline.
  • Leave short comments such as <!-- used in Lesson 3 step 2 --> to help teammates reuse the block.

Exporting in Markdown2Image

  1. Paste the KaTeX markup into Markdown2Image and pick a light preset with a serif font.
  2. Bump the line height to ~1.5 to give stacked fractions breathing room.
  3. Export PNG for slides or chat, SVG/WebP for documentation and print.
The quadratic formula:
$$x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}$$

Finish the handoff

  • Alt text: “Quadratic formula showing solutions to ax²+bx+c=0”.
  • Caption: mention the topic or exercise the equation belongs to.
  • Archive: store the Markdown snippet and exported image side by side in Directus so localization teams can grab both.

KaTeX sample

Now your math survives email threads, LMS announcements, and product docs without extra clean-up.

Keep KaTeX math sharp on every channel | Markdown2Image | MarkdownToImage