Today, GitHub announced that math expressions can now be rendered in Markdown on GitHub using “$$” as a delimiter for code blocks with math content or the “$” delimiter for inline math expressions. 

According to GitHub, mathematical expressions have become essential to information sharing amongst engineers, scientists, data scientists, and mathematicians. 

Support for displaying math expressions has been highly requested from the community for over eight years. Now, users can use the “$” and “$$” delimiters natively in Markdown on GitHub in order to insert math expressions in TeX and LaTeX style syntax. The content is then rendered using the MathJax library. 

MathJax is an open-source, JavaScript-based display engine that supports a wide range of LaTex macros, as well as several accessibility extensions. To learn more about MathJax see the documentation and the MathJax Accessibility Extensions Documentation

There are several different ways that users can include math expressions, such as inline with text by delimiting the expression with a dollar symbol or as a block by starting a new line and delimiting the expression with two dollar symbols.

Additionally, in order to display dollar signs as a character within the same line as a mathematical expression, the user has to escape the non-delimiter dollar sign in order to allow the line to render correctly.

Within a math expression, this can be done by adding a “\” symbol before the dollar sign and outside the expression by adding span tags around the explicit dollar sign. 

To learn more, see here.