I would like to create a blog using gatsby and write the blog posts using markdown that contains latex formulas.
I am using the plugin gatsby-transformer-remark and I am also using MathJax to render the formulas.
The problem is that sometimes the backslash isn't escaped correctly so the formulas have a missing backslash and thus aren't rendered correctly.
I analyzed what the graphql queries returned and I found this:
if I have this $$\\begin{matrix}a&b&c\\\\d&e&f\\\\g&h&i\\\\\\end{matrix}$$ in the rawMarkDown it will be transformed incorrectly to this $$\\begin{matrix}a&b&c\\d&e&f\\g&h&i\\\\end{matrix}$$ in the htmlAst while other formulas like this $A[1\\ldots n]$ are kept intact so in the website you only see $A[1\ldots n]$ and thus a correct rendered MathJax formula.
It seems like the problem are the double backslashes used to separate rows in matrices.
What can I do to avoid this?