leegao / readme2tex

Renders TeXy Math for Github Readmes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dark theme issues

jeremy-rifkin opened this issue · comments

I recognize this is a challenging problem to resolve but rendered formulas are invisible in dark mode:

image

Is it possible to add a white background to rendered formulas? Not an ideal solution, but better than invisible. Alternatively, would a white outline to text look decent?

commented

Would creating two SVGs work? One for dark mode and one for light mode. And then specifying the theme context as per https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/

This works for images in READMEs, so I imagine toggling which SVG is shown might work.

(If anyone knows how to create a dark-mode SVG from the SVG readme2tex creates, I would appreciate that too)