Closed shuttle1987 closed 4 years ago
So the right way to do this would be to have \(
and \)
for inline math and \[
and \]
for display math, like what the recommendation is for LaTeX these days.
However, the problem is that we're getting KaTeX support from this stale "package": https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-katex
And the way remark works is that it has some idiotic plugins that transform the markdown eventually into HTML... And in that code there are hardcoded values for '$' and so on.
Their official answer is here: https://github.com/remarkjs/remark-math/issues/21, which just says "fu".
Not that we could modify how we're calling that anyway since this idiotic plugin doesn't let us pass options to that library.
In other words we better go and escape old posts with \$
.
Their official answer is here: remarkjs/remark-math#21, which just says "fu".
This is very annoying
I did this quick fix, closing for now.
Since we have introduced the ability to render LaTeX we have some posts that are incorrectly rendering text as LaTeX.
For example in https://github.com/ScryEngineering/scrygroup.com/blob/ea8ef68b0e94a68746301343d276451bdea0ab3f/content/blog-posts/2019-12-26/Is-your-business-a-defacto-tech-company.md
We have this text:
Where the text between the dollar amounts is being rendered as LaTeX