Getty Images/iStockphoto

GitHub math support in Markdown useful but tardy

GitHub math support in Markdown took eight years to arrive. Had the feature been released in 2014, a wider audience might have benefited from its use.

Math support is now available in Markdown on GitHub. The new feature helps anyone who uses mathematics in their code by allowing the insertion of math expressions in TeX- and LaTeX-style syntax. But some developers called the update tardy and said it won't be of much use to those who use high-level languages, which are well structured.

Mathematical expressions, widely used by developers in science-related industries, can now be rendered using the $ delimiter for inline math content or $$ as a delimiter for math expressions in code blocks. Challenges with implementing the feature at scale, which was first beta tested in 2014, stalled the release for eight years. While some developers are welcoming the new feature, others say it may have been more useful to a wider audience if it had been released in a timely manner.

Math support in Markdown is useful for developers who develop tools and libraries or who use low-level or machine-dependent languages like C, C++ or assembler, said Leonid Ivankin, an Android developer at MTS group, a mobile telesystems company. That's because low-level languages don't have libraries to do the calculations, he said, so developers must write documentation to explain these calculations.

Eight years in the making

The ability to render math equations on GitHub has been requested by many community members since 2014. That year, Lance Pollard, a JavaScript engineer, asked if the support was available for GitHub Flavored Markdown on a GitHub community forum post.

GitHub was "exploring ways for rendering math in a performant and maintainable way," said Brandon Keepers, a GitHub developer who originally responded to Pollard's thread.

This included unsuccessful attempts to incorporate LaTeX, a document preparation system for typesetting, and MathJax, a JavaScript display engine for math, in the past, Keepers said in a separate response on the thread.

Eight years later, Pollard, who is now a senior software engineer at Agora, a software development company based in San Francisco, said the release is "going to be really helpful for unifying the programming and math communities."

It will make it easier to share math-related content when writing docs in Markdown, he said.

Prior to the release of math support in Markdown, developers in math-intensive fields had to resort to workarounds to include mathematical expressions in their documentation. Those stop-gap solutions included using Jupyter Notebook, embedding images or a MathJax Chrome Extension, according to a GitHub community post.

Despite the function's utility, it may have been relevant to more people if it had been included in GitHub years ago, MTS's Ivankin said, before programming tasks were reduced to libraries and tools. High-level languages such as Kotlin and libraries such as RxJava or SQLite solve mathematical functions themselves, he said, which negates the need for documentation.

What took GitHub so long?

After a lag of eight years, Keepers, now a principal at app development company Sea Time Tech, said he's happy to see math support added.

"[GitHub] beta tested math support back in 2014 with some customers," he said, "but we realized it was going to take a lot more work to meet our quality standards than we could commit to it given our other priorities."

The main reason why it took so long to release the offering was that a large amount of Markdown already existed in GitHub, with the $ sign being used in ways not related to mathematical expressions, said Martin Woodward, senior director of developer relations at GitHub. As such, it needed to be introduced carefully to work at scale, he said.

GitHub math support useful for technical areas

Developers at Redgate, a software provider for compliant database DevOps in Cambridge, England, said they probably won't use the feature much but see some useful applications.

Technical industries including architecture, automotive and space -- which are math intensive fields -- might find utility in the new feature, said Steve Jones, DevOps advocate at Redgate.

Jeff Foster, head of product engineering at Redgate, thought the update would be useful to developers who want to explain exactly how requests are processed in areas like safety-critical systems, which can result in loss of life or serious injury if the requests aren't processed correctly.

Dig Deeper on Software design and development

SearchCloudComputing
SearchAppArchitecture
SearchITOperations
TheServerSide.com
SearchAWS
Close