How to Support Math in Markdown?

Hi, you cannot do that using the XWiki Syntax 2.0+. With that Syntax you can only add new syntax elements with macros, i.e. in this case with the {{mathjax}} (or {{formula}}) macro.

We have support for a GitHub Flavored Markdown syntax in XWiki: https://extensions.xwiki.org/xwiki/bin/view/Extension/MarkdownSyntax/GitHub-Flavored%20Markdown%20Syntax%201.0/

However I’ve tested it and the underlying library we use (flexmark-java doesn’t seem to support math formulas in GH-flavored markdown yet). They seem to support that for Gitlab-flavored MD though, see Extensions · vsch/flexmark-java Wiki · GitHub. To get it, someone would need to add support for it and release a new markdown extension for XWiki though.

Now, if you find {{mathjax}} lengthy, you could introduce a wiki macro (https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingMacros/WikiMacroTutorial/) and name it something like {{x}}. It would simply call the {{mathjax}} macro on the content.