Typesetting mathematics in GitLab markdown

Hello, I am [almost] new to GitLab, and new to this forum.

I wrote a document in GitLab mardown with a number of formulas.It does not compile correctly, and I am trying to troubleshoot it. I am not being successful so far.

Here is the document I wrote I have difficulties with:


  • What is the particular language GitLab use to typeset mathematical formulas? Some pages state that GitLab uses KaTeX to compile formulas, (while GitHub uses MathJax), but KaTeX does not define expressions like



which I had to use to typeset formulas in GitLab Markdown.

  • How can I compile and preview and troubleshoot such a document locally (on my home computer) before pushing it to GitLab?

Thanks to everyone in advance!