Search code examples
csslatexmarkdown

Github markdown equations change textcolor


This StackOverflow question shows how to put equations into the GitHub's markdown and the given solution is to use codecogs or iTex2Img.

I use a dark theme in my GitHub and I can't see the equations with the transparent background. I put a solid white background on the equations to make them visible for these with dark theme and white theme, but having many white boxes in the middle of the text is annoying.

The question is: Is there a way to change the equation's text color to match the user's theme? That is, put black text color when the user's background is white and put white text color when the user's background is black.


Solution

  • Since May 2022, GitHub's markdown accepts equations in LaTeX form by using $ symbol.

    It solves the theme matching problem of this question.