[FEATURE REQUEST] LaTeX Math in Markdown

Hi. I am using a math snippet in my markdown readme file in my repository. This is the code:

  * Experiences and leveling => every entertainment bot shall have this feature and this is
    no exception! The formula for leveling taken from experiences may change in future.
    Currently, no formula is used. I am, however, thinking of this one:
    $$n = x^{l + 1} - x^l$$
    $n$ is the required experience value to gain, $l$ is current level value, $x$ a further
    unspecified constant (it's value is not yet determined). The cooldown for experience gain,
    leveling and command fetch may be 15 seconds by default.

This is how it looks like in my markdown preview as displayed by VS Code Markdown and Markdown MathJax plugins:

But this is how it looks like on GitHub:

GitHub does not render LaTeX Math notations. Why? As far as I know, it did in past. Why was that feature removed? Could you bring it back again? It breaks the page intended use. Users can get it working in GitHub pages with few extra lines of code in _ _config.yml _, but unfortunately that doesn’t work with the internal markdown renderer at the repo view. I could simply use a Chrome extension, but the downfall of the extension is that it tries to interpret the LaTeX code even inside code blocks or in in-line code notations, which is wrong.


Hi @polda18 ,

Thanks for this feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.



Thank you :blush:

It’s really bad that math does not get recognised in inner GitHub markdown renderer. If I want to put math equation to the readme, it doesn’t display correctly (as intended), it displays as is written in code.

Thank you for considering to include it :+1:


Thank you for bringing attention to this topic to the appropriate teams! One thing I suggest is using KaTeX instead of MathJax, if math support were to be implemented in the near future, due to its efficiency compared to MathJax. Although KaTeX does not support all mathematical functions MathJax supports, it does heavily reduce the loading time for markdown files infused with mathematical operations!

Best regards!

1 Like

Thanks, you’re the first one who reacts positively

Thanks for the advice, but this one I give away. I didn’t use either of the two

I think I know why. He has to hide so massively much lets say data, that it will show up real soon. I am speaking of experience now for what he did to me for putting me on that cc list. But I have already contacs with the source.

Is it possible for GitHub to switch the rendering engine to goldmark ? It has great math extension goldmark-mathjax 

I realize that some of the reasons why this wasn’t implemented earlier are because of the speed of MathJax and the maintenance issues that come with it. I think Katex may help with the speed issue, and even if it still isn’t fast enough, GitHub can detect files with a lot of math equations and have the user toggle rendering on if needed while directly rendering files that have fewer equations. I’m not sure what sorts of maintenance issues it may bring, but since jupyter notebooks on GitHub already renders equations, it should not be that difficult to extend that to all of GitHub. 

I’m looking forward to this feature been implemented. I am working on a markdown book with a good num of latex style characters, the process went 20% while I found that latex not shown on github, it is hard for me to repair this issue, which confused me so much.