Search code examples
githubmarkdownmathjax

Using GitHub LaTeX Markdown to color header text with specific colors


How can I tweak this mathjax block:

 ${\textrm{\color{cyan}pf\color{darkorange}UI\ \ \color{aquamarine} Zen}}$

To have it rendered like this in the header of my GitHub Markdown file (I think the font being used by GitHub is "Segoe UI" at least in Windows/Firefox)?

 # <span style="color: cyan">pf</span><span style="color: orange">UI</span></span> <span style="color: aquamarine; font-size: 44px;">Zen</span>

sample

As a last resort, I'd also be open to solutions involving third party websites' facilities like latex.codecogs.com/svg.latex (per https://stackoverflow.com/a/45603559/863651).


Solution

  • To my knowledge, GFM does not support this but you could use codecogs. They have an editor that's pretty easy to use as well.

    Editor:

    editor.codecogs.com

    Rough Example URL:

    https://latex.codecogs.com/png.image?\inline&space;\huge&space;\dpi{300}\bg{black}\texttt{{\color{Cyan}pf}{\color{Orange}UI}\;{\color{Green}Zen}}

    Rough Example Preview: